1-----------------------------------------------------------------------------
3-- Module : Language.PureScript.TypeClassDictionaries
4-- Copyright : (c) 2014 Phil Freeman
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
13-----------------------------------------------------------------------------
15{-# LANGUAGE DeriveDataTypeable #-}
17module Language.PureScript.TypeClassDictionaries where
21import Language.PureScript.Names
22import Language.PureScript.Types
25-- Data representing a type class dictionary which is in scope
27data TypeClassDictionaryInScope
28 = TypeClassDictionaryInScope {
30 -- The identifier with which the dictionary can be accessed at runtime
32 tcdName :: Qualified Ident
34 -- The name of the type class to which this type class instance applies
36 , tcdClassName :: Qualified ProperName
38 -- The types to which this type class instance applies
40 , tcdInstanceTypes :: [Type]
42 -- Type class dependencies which must be satisfied to construct this dictionary
44 , tcdDependencies :: Maybe [(Qualified ProperName, [Type])]
46 -- The type of this dictionary
48 , tcdType :: TypeClassDictionaryType
49 } deriving (Show, Data, Typeable)
52-- The type of a type class dictionary
54data TypeClassDictionaryType
56 -- A regular type class dictionary
60 -- A type class dictionary which is an alias for an imported dictionary from another module
62 | TCDAlias (Qualified Ident) deriving (Show, Eq, Data, Typeable)
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