first-class-instances-0.1.0.0: First class typeclass instances

Safe HaskellSafe
LanguageHaskell2010

FCI.Internal.Types

Description

Core types. This module is internal and provides no guarantees about stability and safety of it's interface.

Synopsis

Documentation

type family Inst (c :: Constraint) = (t :: Type) | t -> c Source #

Type family that maps constraint to it's first class representation - should be generally used instead of it's concrete result for consistency.

Instances
type Inst (Monad m) Source # 
Instance details

Defined in FCI.Control.Monad

type Inst (Monad m) = Dict (Monad m)
type Inst (Functor f) Source # 
Instance details

Defined in FCI.Data.Functor

type Inst (Functor f) = Dict (Functor f)
type Inst (Applicative f) Source # 
Instance details

Defined in FCI.Control.Applicative

data family Dict :: Constraint -> Type Source #

Data family, instances of which are generated by TH for normal typeclasses (see mkInstRep). Do not write these by hand, instead, create new instance of Inst mapping to separate datatype when working on library.

Instances
data Dict (Monad m) Source # 
Instance details

Defined in FCI.Control.Monad

data Dict (Monad m) = Monad {}
data Dict (Functor f) Source # 
Instance details

Defined in FCI.Data.Functor

data Dict (Functor f) = Functor {
  • _fmap :: forall a b. (a -> b) -> f a -> f b
  • (|<$) :: forall a b. a -> f b -> f a
}
data Dict (Applicative f) Source # 
Instance details

Defined in FCI.Control.Applicative

data Dict (Applicative f) = Applicative {
  • _Functor :: Inst (Functor f)
  • _pure :: forall a. a -> f a
  • (|<*>) :: forall a b. f (a -> b) -> f a -> f b
  • _liftA2 :: forall a b c. (a -> b -> c) -> f a -> f b -> f c
  • (|*>) :: forall a b. f a -> f b -> f b
  • (|<*) :: forall a b. f a -> f b -> f a
}