Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type KnownType cls t = KnownTypeT cls t Identity
- newtype KnownTypeT (cls :: ck) (t :: tk) (m :: * -> *) (a :: *) = KnownTypeT (IdentityT m a)
- type family Infer (p :: k) m where ...
- type family TryInfer (p :: k) m a :: Constraint where ...
- inferT :: forall cls t m a. KnownTypeT cls t m a -> m a
Documentation
type KnownType cls t = KnownTypeT cls t Identity Source #
The Inferable type class describes a monad with a functional dependency on the given type. It allows for writing polymorphic code and ensuring Haskell that the type will be resolved while evaluating the monadic stack.
newtype KnownTypeT (cls :: ck) (t :: tk) (m :: * -> *) (a :: *) Source #
KnownTypeT (IdentityT m a) |
Instances
type family Infer (p :: k) m where ... Source #
Infer p (KnownTypeT p t m) = t | |
Infer p (t m) = Infer p m |
type family TryInfer (p :: k) m a :: Constraint where ... Source #
TryInfer p (KnownTypeT p t m) a = a ~ t | |
TryInfer p (t m) a = TryInfer p m a | |
TryInfer p m a = () |
inferT :: forall cls t m a. KnownTypeT cls t m a -> m a Source #