Copyright | (C) 2014 Jan Stolarek |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Jan Stolarek (jan.stolarek@p.lodz.pl) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Defines promoted functions and datatypes relating to Maybe
,
including a promoted version of all the definitions in Data.Maybe
.
Because many of these definitions are produced by Template Haskell,
it is not possible to create proper Haddock documentation. Please look
up the corresponding operation in Data.Maybe
. Also, please excuse
the apparent repeated variable names. This is due to an interaction
between Template Haskell and Haddock.
- maybe_ :: b -> (a -> b) -> Maybe a -> b
- type family Maybe_ (a :: b) (a :: TyFun a b -> Type) (a :: Maybe a) :: b where ...
- type family IsJust (a :: Maybe a) :: Bool where ...
- type family IsNothing (a :: Maybe a) :: Bool where ...
- type family FromJust (a :: Maybe a) :: a where ...
- type family FromMaybe (a :: a) (a :: Maybe a) :: a where ...
- type family MaybeToList (a :: Maybe a) :: [a] where ...
- type family ListToMaybe (a :: [a]) :: Maybe a where ...
- type family CatMaybes (a :: [Maybe a]) :: [a] where ...
- type family MapMaybe (a :: TyFun a (Maybe b) -> Type) (a :: [a]) :: [b] where ...
- type NothingSym0 = Nothing
- data JustSym0 (l :: TyFun a3530822107858468865 (Maybe a3530822107858468865))
- type JustSym1 (t :: a3530822107858468865) = Just t
- data Maybe_Sym0 (l :: TyFun b6989586621679426444 (TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type) -> Type))
- data Maybe_Sym1 (l :: b6989586621679426444) (l :: TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type))
- data Maybe_Sym2 (l :: b6989586621679426444) (l :: TyFun a6989586621679426445 b6989586621679426444 -> Type) (l :: TyFun (Maybe a6989586621679426445) b6989586621679426444)
- type Maybe_Sym3 (t :: b6989586621679426444) (t :: TyFun a6989586621679426445 b6989586621679426444 -> Type) (t :: Maybe a6989586621679426445) = Maybe_ t t t
- data IsJustSym0 (l :: TyFun (Maybe a6989586621679427557) Bool)
- type IsJustSym1 (t :: Maybe a6989586621679427557) = IsJust t
- data IsNothingSym0 (l :: TyFun (Maybe a6989586621679427556) Bool)
- type IsNothingSym1 (t :: Maybe a6989586621679427556) = IsNothing t
- data FromJustSym0 (l :: TyFun (Maybe a6989586621679427555) a6989586621679427555)
- type FromJustSym1 (t :: Maybe a6989586621679427555) = FromJust t
- data FromMaybeSym0 (l :: TyFun a6989586621679427554 (TyFun (Maybe a6989586621679427554) a6989586621679427554 -> Type))
- data FromMaybeSym1 (l :: a6989586621679427554) (l :: TyFun (Maybe a6989586621679427554) a6989586621679427554)
- type FromMaybeSym2 (t :: a6989586621679427554) (t :: Maybe a6989586621679427554) = FromMaybe t t
- data MaybeToListSym0 (l :: TyFun (Maybe a6989586621679427553) [a6989586621679427553])
- type MaybeToListSym1 (t :: Maybe a6989586621679427553) = MaybeToList t
- data ListToMaybeSym0 (l :: TyFun [a6989586621679427552] (Maybe a6989586621679427552))
- type ListToMaybeSym1 (t :: [a6989586621679427552]) = ListToMaybe t
- data CatMaybesSym0 (l :: TyFun [Maybe a6989586621679427551] [a6989586621679427551])
- type CatMaybesSym1 (t :: [Maybe a6989586621679427551]) = CatMaybes t
- data MapMaybeSym0 (l :: TyFun (TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (TyFun [a6989586621679427549] [b6989586621679427550] -> Type))
- data MapMaybeSym1 (l :: TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (l :: TyFun [a6989586621679427549] [b6989586621679427550])
- type MapMaybeSym2 (t :: TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (t :: [a6989586621679427549]) = MapMaybe t t
Promoted functions from Data.Maybe
The preceding two definitions is derived from the function maybe
in
Data.Maybe
. The extra underscore is to avoid name clashes with the type
Maybe
.
type family FromMaybe (a :: a) (a :: Maybe a) :: a where ... Source #
FromMaybe d x = Case_6989586621679427658 d x x |
type family MaybeToList (a :: Maybe a) :: [a] where ... Source #
MaybeToList Nothing = '[] | |
MaybeToList (Just x) = Apply (Apply (:$) x) '[] |
type family ListToMaybe (a :: [a]) :: Maybe a where ... Source #
ListToMaybe '[] = NothingSym0 | |
ListToMaybe ((:) a _z_6989586621679427639) = Apply JustSym0 a |
Defunctionalization symbols
type NothingSym0 = Nothing Source #
data Maybe_Sym0 (l :: TyFun b6989586621679426444 (TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type) -> Type)) Source #
SuppressUnusedWarnings (TyFun b6989586621679426444 (TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type) -> Type) -> *) (Maybe_Sym0 a6989586621679426445 b6989586621679426444) Source # | |
type Apply b6989586621679426444 (TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type) -> Type) (Maybe_Sym0 a6989586621679426445 b6989586621679426444) l Source # | |
data Maybe_Sym1 (l :: b6989586621679426444) (l :: TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type)) Source #
SuppressUnusedWarnings (b6989586621679426444 -> TyFun (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type) -> *) (Maybe_Sym1 a6989586621679426445 b6989586621679426444) Source # | |
type Apply (TyFun a6989586621679426445 b6989586621679426444 -> Type) (TyFun (Maybe a6989586621679426445) b6989586621679426444 -> Type) (Maybe_Sym1 a6989586621679426445 b6989586621679426444 l1) l2 Source # | |
data Maybe_Sym2 (l :: b6989586621679426444) (l :: TyFun a6989586621679426445 b6989586621679426444 -> Type) (l :: TyFun (Maybe a6989586621679426445) b6989586621679426444) Source #
SuppressUnusedWarnings (b6989586621679426444 -> (TyFun a6989586621679426445 b6989586621679426444 -> Type) -> TyFun (Maybe a6989586621679426445) b6989586621679426444 -> *) (Maybe_Sym2 a6989586621679426445 b6989586621679426444) Source # | |
type Apply (Maybe a) b (Maybe_Sym2 a b l1 l2) l3 Source # | |
type Maybe_Sym3 (t :: b6989586621679426444) (t :: TyFun a6989586621679426445 b6989586621679426444 -> Type) (t :: Maybe a6989586621679426445) = Maybe_ t t t Source #
data IsJustSym0 (l :: TyFun (Maybe a6989586621679427557) Bool) Source #
SuppressUnusedWarnings (TyFun (Maybe a6989586621679427557) Bool -> *) (IsJustSym0 a6989586621679427557) Source # | |
type Apply (Maybe a) Bool (IsJustSym0 a) l Source # | |
type IsJustSym1 (t :: Maybe a6989586621679427557) = IsJust t Source #
data IsNothingSym0 (l :: TyFun (Maybe a6989586621679427556) Bool) Source #
SuppressUnusedWarnings (TyFun (Maybe a6989586621679427556) Bool -> *) (IsNothingSym0 a6989586621679427556) Source # | |
type Apply (Maybe a) Bool (IsNothingSym0 a) l Source # | |
type IsNothingSym1 (t :: Maybe a6989586621679427556) = IsNothing t Source #
data FromJustSym0 (l :: TyFun (Maybe a6989586621679427555) a6989586621679427555) Source #
SuppressUnusedWarnings (TyFun (Maybe a6989586621679427555) a6989586621679427555 -> *) (FromJustSym0 a6989586621679427555) Source # | |
type Apply (Maybe a) a (FromJustSym0 a) l Source # | |
type FromJustSym1 (t :: Maybe a6989586621679427555) = FromJust t Source #
data FromMaybeSym0 (l :: TyFun a6989586621679427554 (TyFun (Maybe a6989586621679427554) a6989586621679427554 -> Type)) Source #
SuppressUnusedWarnings (TyFun a6989586621679427554 (TyFun (Maybe a6989586621679427554) a6989586621679427554 -> Type) -> *) (FromMaybeSym0 a6989586621679427554) Source # | |
type Apply a6989586621679427554 (TyFun (Maybe a6989586621679427554) a6989586621679427554 -> Type) (FromMaybeSym0 a6989586621679427554) l Source # | |
data FromMaybeSym1 (l :: a6989586621679427554) (l :: TyFun (Maybe a6989586621679427554) a6989586621679427554) Source #
SuppressUnusedWarnings (a6989586621679427554 -> TyFun (Maybe a6989586621679427554) a6989586621679427554 -> *) (FromMaybeSym1 a6989586621679427554) Source # | |
type Apply (Maybe a) a (FromMaybeSym1 a l1) l2 Source # | |
type FromMaybeSym2 (t :: a6989586621679427554) (t :: Maybe a6989586621679427554) = FromMaybe t t Source #
data MaybeToListSym0 (l :: TyFun (Maybe a6989586621679427553) [a6989586621679427553]) Source #
SuppressUnusedWarnings (TyFun (Maybe a6989586621679427553) [a6989586621679427553] -> *) (MaybeToListSym0 a6989586621679427553) Source # | |
type Apply (Maybe a) [a] (MaybeToListSym0 a) l Source # | |
type MaybeToListSym1 (t :: Maybe a6989586621679427553) = MaybeToList t Source #
data ListToMaybeSym0 (l :: TyFun [a6989586621679427552] (Maybe a6989586621679427552)) Source #
SuppressUnusedWarnings (TyFun [a6989586621679427552] (Maybe a6989586621679427552) -> *) (ListToMaybeSym0 a6989586621679427552) Source # | |
type Apply [a] (Maybe a) (ListToMaybeSym0 a) l Source # | |
type ListToMaybeSym1 (t :: [a6989586621679427552]) = ListToMaybe t Source #
data CatMaybesSym0 (l :: TyFun [Maybe a6989586621679427551] [a6989586621679427551]) Source #
SuppressUnusedWarnings (TyFun [Maybe a6989586621679427551] [a6989586621679427551] -> *) (CatMaybesSym0 a6989586621679427551) Source # | |
type Apply [Maybe a] [a] (CatMaybesSym0 a) l Source # | |
type CatMaybesSym1 (t :: [Maybe a6989586621679427551]) = CatMaybes t Source #
data MapMaybeSym0 (l :: TyFun (TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (TyFun [a6989586621679427549] [b6989586621679427550] -> Type)) Source #
SuppressUnusedWarnings (TyFun (TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (TyFun [a6989586621679427549] [b6989586621679427550] -> Type) -> *) (MapMaybeSym0 a6989586621679427549 b6989586621679427550) Source # | |
type Apply (TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (TyFun [a6989586621679427549] [b6989586621679427550] -> Type) (MapMaybeSym0 a6989586621679427549 b6989586621679427550) l Source # | |
data MapMaybeSym1 (l :: TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) (l :: TyFun [a6989586621679427549] [b6989586621679427550]) Source #
SuppressUnusedWarnings ((TyFun a6989586621679427549 (Maybe b6989586621679427550) -> Type) -> TyFun [a6989586621679427549] [b6989586621679427550] -> *) (MapMaybeSym1 a6989586621679427549 b6989586621679427550) Source # | |
type Apply [a] [b] (MapMaybeSym1 a b l1) l2 Source # | |