Language.PureScript.TypeClassDictionaries

purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.TypeClassDictionaries

Synopsis

- data TypeClassDictionaryInScope v = TypeClassDictionaryInScope {
  - tcdChain :: Maybe ChainId
  - tcdIndex :: Integer
  - tcdValue :: v
  - tcdPath :: [(Qualified (ProperName 'ClassName), Integer)]
  - tcdClassName :: Qualified (ProperName 'ClassName)
  - tcdForAll :: [(Text, SourceType)]
  - tcdInstanceKinds :: [SourceType]
  - tcdInstanceTypes :: [SourceType]
  - tcdDependencies :: Maybe [SourceConstraint]
  - tcdDescription :: Maybe SourceType
  }
- type NamedDict = TypeClassDictionaryInScope (Qualified Ident)
- superclassName :: Qualified (ProperName 'ClassName) -> Integer -> Text

# Documentation

data TypeClassDictionaryInScope v #

Constructors

TypeClassDictionaryInScope |
Fields tcdChain :: Maybe ChainId The instance chain tcdIndex :: Integer Index of the instance chain tcdValue :: v The value with which the dictionary can be accessed at runtime tcdPath :: [(Qualified (ProperName 'ClassName), Integer)] How to obtain this instance via superclass relationships tcdClassName :: Qualified (ProperName 'ClassName) The name of the type class to which this type class instance applies tcdForAll :: [(Text, SourceType)] Quantification of type variables in the instance head and dependencies tcdInstanceKinds :: [SourceType] The kinds to which this type class instance applies tcdInstanceTypes :: [SourceType] The types to which this type class instance applies tcdDependencies :: Maybe [SourceConstraint] Type class dependencies which must be satisfied to construct this dictionary tcdDescription :: Maybe SourceType If this instance was unnamed, the type to use when describing it in error messages

#### Instances

Instances details

Functor TypeClassDictionaryInScope # |
Instance details Defined in Language.PureScript.TypeClassDictionaries Methods fmap :: (a -> b) -> TypeClassDictionaryInScope a -> TypeClassDictionaryInScope b # (<$) :: a -> TypeClassDictionaryInScope b -> TypeClassDictionaryInScope a #
Foldable TypeClassDictionaryInScope # |
Instance details Defined in Language.PureScript.TypeClassDictionaries Methods fold :: Monoid m => TypeClassDictionaryInScope m -> m # foldMap :: Monoid m => (a -> m) -> TypeClassDictionaryInScope a -> m # foldMap' :: Monoid m => (a -> m) -> TypeClassDictionaryInScope a -> m # foldr :: (a -> b -> b) -> b -> TypeClassDictionaryInScope a -> b # foldr' :: (a -> b -> b) -> b -> TypeClassDictionaryInScope a -> b # foldl :: (b -> a -> b) -> b -> TypeClassDictionaryInScope a -> b # foldl' :: (b -> a -> b) -> b -> TypeClassDictionaryInScope a -> b # foldr1 :: (a -> a -> a) -> TypeClassDictionaryInScope a -> a # foldl1 :: (a -> a -> a) -> TypeClassDictionaryInScope a -> a # toList :: TypeClassDictionaryInScope a -> [a] # null :: TypeClassDictionaryInScope a -> Bool # length :: TypeClassDictionaryInScope a -> Int # elem :: Eq a => a -> TypeClassDictionaryInScope a -> Bool # maximum :: Ord a => TypeClassDictionaryInScope a -> a # minimum :: Ord a => TypeClassDictionaryInScope a -> a # sum :: Num a => TypeClassDictionaryInScope a -> a # product :: Num a => TypeClassDictionaryInScope a -> a #
Traversable TypeClassDictionaryInScope # |
Instance details Defined in Language.PureScript.TypeClassDictionaries Methods traverse :: Applicative f => (a -> f b) -> TypeClassDictionaryInScope a -> f (TypeClassDictionaryInScope b) # sequenceA :: Applicative f => TypeClassDictionaryInScope (f a) -> f (TypeClassDictionaryInScope a) # mapM :: Monad m => (a -> m b) -> TypeClassDictionaryInScope a -> m (TypeClassDictionaryInScope b) # sequence :: Monad m => TypeClassDictionaryInScope (m a) -> m (TypeClassDictionaryInScope a) #
NFData v => NFData (TypeClassDictionaryInScope v) # |
Instance details Defined in Language.PureScript.TypeClassDictionaries Methods rnf :: TypeClassDictionaryInScope v -> () #
Generic (TypeClassDictionaryInScope v) # |
Instance details Defined in Language.PureScript.TypeClassDictionaries Associated Types
type Rep (TypeClassDictionaryInScope v) |
Instance details Defined in Language.PureScript.TypeClassDictionaries type Rep (TypeClassDictionaryInScope v) = D1 ('MetaData "TypeClassDictionaryInScope" "Language.PureScript.TypeClassDictionaries" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TypeClassDictionaryInScope" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tcdChain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChainId)) :*: S1 ('MetaSel ('Just "tcdIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "tcdValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v) :*: (S1 ('MetaSel ('Just "tcdPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Qualified (ProperName 'ClassName), Integer)]) :*: S1 ('MetaSel ('Just "tcdClassName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName)))))) :*: ((S1 ('MetaSel ('Just "tcdForAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, SourceType)]) :*: S1 ('MetaSel ('Just "tcdInstanceKinds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])) :*: (S1 ('MetaSel ('Just "tcdInstanceTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType]) :*: (S1 ('MetaSel ('Just "tcdDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [SourceConstraint])) :*: S1 ('MetaSel ('Just "tcdDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SourceType)))))))
Methods from :: TypeClassDictionaryInScope v -> Rep (TypeClassDictionaryInScope v) x # to :: Rep (TypeClassDictionaryInScope v) x -> TypeClassDictionaryInScope v #
Show v => Show (TypeClassDictionaryInScope v) # |
Instance details Defined in Language.PureScript.TypeClassDictionaries Methods showsPrec :: Int -> TypeClassDictionaryInScope v -> ShowS # show :: TypeClassDictionaryInScope v -> String # showList :: [TypeClassDictionaryInScope v] -> ShowS #
type Rep (TypeClassDictionaryInScope v) # |
Instance details Defined in Language.PureScript.TypeClassDictionaries type Rep (TypeClassDictionaryInScope v) = D1 ('MetaData "TypeClassDictionaryInScope" "Language.PureScript.TypeClassDictionaries" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "TypeClassDictionaryInScope" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tcdChain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChainId)) :*: S1 ('MetaSel ('Just "tcdIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "tcdValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 v) :*: (S1 ('MetaSel ('Just "tcdPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Qualified (ProperName 'ClassName), Integer)]) :*: S1 ('MetaSel ('Just "tcdClassName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName)))))) :*: ((S1 ('MetaSel ('Just "tcdForAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, SourceType)]) :*: S1 ('MetaSel ('Just "tcdInstanceKinds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType])) :*: (S1 ('MetaSel ('Just "tcdInstanceTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [SourceType]) :*: (S1 ('MetaSel ('Just "tcdDependencies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [SourceConstraint])) :*: S1 ('MetaSel ('Just "tcdDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SourceType)))))))

type NamedDict = TypeClassDictionaryInScope (Qualified Ident) #

superclassName :: Qualified (ProperName 'ClassName) -> Integer -> Text #

Generate a name for a superclass reference which can be used in generated code.