Copyright | Copyright (C) 2015 Kyle Carter |
---|---|
License | BSD3 |
Maintainer | Kyle Carter <kylcarte@indiana.edu> |
Stability | experimental |
Portability | RankNTypes |
Safe Haskell | None |
Language | Haskell2010 |
Convenient type families for working with type-level Maybe
s.
- type family MaybeC mc :: Constraint
- type family IsNothing a :: Bool
- nothingCong :: (a ~ b) :- (IsNothing a ~ IsNothing b)
- nothingNotJust :: (Nothing ~ Just a) :- Fail
- type family f <$> a :: Maybe l
- maybeFmapCong :: (f ~ g, a ~ b) :- ((f <$> a) ~ (g <$> b))
- type family f <&> a :: Maybe l
- maybePamfCong :: (f ~ g, a ~ b) :- ((f <&> a) ~ (g <&> b))
- type family f <*> a :: Maybe l
- maybeApCong :: (f ~ g, a ~ b) :- ((f <*> a) ~ (g <*> b))
- type family a <|> b :: Maybe k
- maybeAltCong :: (a ~ c, b ~ d) :- ((a <|> b) ~ (c <|> d))
- type family FromJust m :: k
- fromJustCong :: (a ~ b) :- (FromJust a ~ FromJust b)
Documentation
type family MaybeC mc :: Constraint Source
Take a Maybe Constraint
to a Constraint
.
nothingCong :: (a ~ b) :- (IsNothing a ~ IsNothing b) Source
maybeFmapCong :: (f ~ g, a ~ b) :- ((f <$> a) ~ (g <$> b)) Source
maybePamfCong :: (f ~ g, a ~ b) :- ((f <&> a) ~ (g <&> b)) Source
maybeApCong :: (f ~ g, a ~ b) :- ((f <*> a) ~ (g <*> b)) Source
maybeAltCong :: (a ~ c, b ~ d) :- ((a <|> b) ~ (c <|> d)) Source
fromJustCong :: (a ~ b) :- (FromJust a ~ FromJust b) Source