5 module Types.Data.Maybe
19 import Types.Data.Bool
26 instance Maybe Nothing
27 instance Maybe (Just a)
29 type family IsNothing m
30 type instance IsNothing Nothing = True
31 type instance IsNothing (Just a) = False
34 type instance IsJust Nothing = False
35 type instance IsJust (Just a) = True
37 type family FromJust m
38 type instance FromJust (Just a) = a
40 type family FromMaybe a m
41 type instance FromMaybe a Nothing = a
42 type instance FromMaybe a (Just a') = a'