mirror of
https://github.com/Lysxia/first-class-families.git
synced 2024-10-27 11:59:44 +03:00
More Exp in UnMaybe
This commit is contained in:
parent
04d58a4c5c
commit
b38537016f
@ -60,9 +60,9 @@ data BimapEither
|
||||
type instance Eval (BimapEither f g ('Left x)) = 'Left (Eval (f x))
|
||||
type instance Eval (BimapEither f g ('Right y)) = 'Right (Eval (g y))
|
||||
|
||||
data UnMaybe :: b -> (a -> b) -> Maybe a -> Exp b
|
||||
type instance Eval (UnMaybe y f 'Nothing) = y
|
||||
type instance Eval (UnMaybe y f ('Just x)) = f x
|
||||
data UnMaybe :: Exp b -> (a -> Exp b) -> Maybe a -> Exp b
|
||||
type instance Eval (UnMaybe y f 'Nothing) = Eval y
|
||||
type instance Eval (UnMaybe y f ('Just x)) = Eval (f x)
|
||||
|
||||
data Foldr :: (a -> b -> Exp b) -> b -> [a] -> Exp b
|
||||
type instance Eval (Foldr f y '[]) = y
|
||||
|
Loading…
Reference in New Issue
Block a user