1{-# LANGUAGE DeriveDataTypeable #-}
3module Language.PureScript.TypeClassDictionaries where
7import Language.PureScript.Names
8import Language.PureScript.Types
11-- Data representing a type class dictionary which is in scope
13data TypeClassDictionaryInScope
14 = TypeClassDictionaryInScope {
15 -- | The identifier with which the dictionary can be accessed at runtime
16 tcdName :: Qualified Ident
17 -- | How to obtain this instance via superclass relationships
18 , tcdPath :: [(Qualified (ProperName 'ClassName), Integer)]
19 -- | The name of the type class to which this type class instance applies
20 , tcdClassName :: Qualified (ProperName 'ClassName)
21 -- | The types to which this type class instance applies
22 , tcdInstanceTypes :: [Type]
23 -- | Type class dependencies which must be satisfied to construct this dictionary
24 , tcdDependencies :: Maybe [Constraint]
25 } deriving (Show, Read, Data, Typeable)
28-- A simplified representation of expressions which are used to represent type
29-- class dictionaries at runtime, which can be compared for equality
33 -- A dictionary which is brought into scope by a local constraint
35 = LocalDictionaryValue (Qualified Ident)
37 -- A dictionary which is brought into scope by an instance declaration
39 | GlobalDictionaryValue (Qualified Ident)
41 -- A dictionary which depends on other dictionaries
43 | DependentDictionaryValue (Qualified Ident) [DictionaryValue]
45 -- A subclass dictionary
47 | SubclassDictionaryValue DictionaryValue (Qualified (ProperName 'ClassName)) Integer
48 deriving (Show, Read, Ord, Eq)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list