Copyright | (c) Aaron Friel |
---|---|
License | BSD-3 |
Maintainer | Aaron Friel <mayreply@aaronfriel.com> |
Stability | unstable |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Documentation
class GPointed f where Source #
Graph indexed pointed functor.
The pure element of the graph index.
type PureCxt f (i :: p) :: Constraint Source #
A constraint on generating a pure index from a free variable. Default is empty.
gpure :: forall a. a -> f (Pure f) a Source #
Return a pointed functor indexed by the Pure
type instance (pure
).
>>>
:t gpure @_ @(GWrapped Maybe) "Hello, World"
:: GWrapped Maybe () [Char]
gpure :: PureCxt f (Pure f) => a -> f (Pure f) a Source #
Return a pointed functor indexed by the Pure
type instance (pure
).
>>>
:t gpure @_ @(GWrapped Maybe) "Hello, World"
:: GWrapped Maybe () [Char]
gpure' :: forall t a. PureCxt f t => a -> f t a Source #
Return a pointed functor indexed by a type t
in the domain of p
.
Accessible with type applications, e.g.:
>>>
:t gpure' @_ @(GWrapped Maybe) @Int
gpure' @_ @(GWrapped Maybe) @Int :: a -> GWrapped Maybe Int a