-- | Core types. This module is internal and provides no guarantees about -- stability and safety of it's interface. module FCI.Internal.Types (Inst, Dict) where import Data.Kind (Type, Constraint) ------------------------------------------------------------------------------- -- | Type family that maps constraint to it's first class representation - -- should be generally used instead of it's concrete result for consistency. type family Inst (c :: Constraint) = (t :: Type) | t -> c -- TODO: should be TC plugin? - tuples, QuantifiedConstraints etc. ------------------------------------------------------------------------------- -- | Data family, instances of which are generated by TH for normal typeclasses -- (see 'FCI.TH.mkInstRep'). Do not write these by hand, instead, create new -- instance of 'Inst' mapping to separate datatype when working on library. data family Dict :: Constraint -> Type