SWP-Ubau-SoSe2014-Haskell / SWPSoSe14

Rail compiler written in Haskell
MIT License
3 stars 1 forks source link

Extend 'equal' instruction to work with lists. #168

Closed Tblue closed 10 years ago

Tblue commented 10 years ago

Once lists are implemented (#24), the 'equal' instruction needs to be extended to work with lists (and nil). The Rail wiki says:

'q' Is equal to (a b -- c) 
    If a and b are strings, then c is true iff the two strings are equal. If a and b are
    lists, then they are equal iff car(a) == car(b) && cdr(a) == cdr(b). The NIL list
    is always equal to itself. If a and b are of different types, then they are always
    unequal.
    Pre:
    Post: is_bool(c) 

--> #24 is blocking this issue.

Tblue commented 10 years ago

Done in the intertarget-code branch.