Changes between Version 43 and Version 44 of TypeNats/Basics
 Timestamp:
 Oct 16, 2012 5:31:51 AM (4 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

TypeNats/Basics
v43 v44 82 82 is the definition of the `Show` instance: 83 83 {{{ 84 instance Show (SingRep a) => Show (Sing a) where84 instance (SingE (KindOf a, Show (Demote a)) => Show (Sing a) where 85 85 showsPrec p = showsPrec p . fromSing 86 86 }}} … … 93 93 withSing f = f sing 94 94 95 singThat :: Sing I a => (SingRepa > Bool) > Maybe (Sing a)95 singThat :: SingRep a => (Demote a > Bool) > Maybe (Sing a) 96 96 singThat p = withSing $ \x > if p (fromSing x) then Just x else Nothing 97 97 }}} … … 120 120 121 121 {{{ 122 instance (Sing I a, Read (SingRep a), Eq (SingRepa)) => Read (Sing a) where122 instance (SingRep a, Read (Demote a), Eq (Demote a)) => Read (Sing a) where 123 123 readsPrec p cs = do (x,ys) < readsPrec p cs 124 124 case singThat (== x) of