Changes between Version 2 and Version 3 of Ticket #12708, comment 2


Ignore:
Timestamp:
Oct 14, 2016 11:24:16 PM (3 years ago)
Author:
Iceland_jack
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12708, comment 2

    v2 v3  
    1818  a == b = isTrue# (a ==# b)
    1919
     20instance Eq (Addr# :: TYPE AddrRep) where
     21  (==) :: Addr# -> Addr# -> Bool
     22  a == b = isTrue# (eqAddr# a b)
     23
    2024is5 :: Int# -> Bool
    2125is5 5 = True
    2226is5 _ = False
     27
     28class Eq a => Ord (a :: TYPE rep) where
     29  (<) :: a -> a -> Bool
     30
     31instance Ord (Int# :: TYPE IntRep) where
     32  a < b = isTrue# (a <# b)
    2333}}}
     34
     35Enjoy the possibility of rep polymorphic `Bits`, maybe even `Semigroup`, `Monoid`...
    2436
    2537((any idea why