Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Scoped l = Scoped (NameInfo l) l
- data NameInfo l
- = GlobalSymbol Symbol (QName ())
- | LocalValue SrcLoc
- | TypeVar SrcLoc
- | ValueBinder
- | TypeBinder
- | Import (Map (QName ()) [Symbol])
- | ImportPart [Symbol]
- | Export [Symbol]
- | RecPatWildcard [Symbol]
- | RecExpWildcard [(Name (), NameInfo l)]
- | None
- | ScopeError (Error l)
- annotateDecl :: forall a l. (Resolvable (a (Scoped l)), Functor a, Typeable l) => Scope -> a l -> a (Scoped l)
Documentation
A pair of the name information and original annotation. Used as an annotation type for AST.
Information about the names used in an AST.
GlobalSymbol Symbol (QName ()) | global entitiy and the way it is referenced |
LocalValue SrcLoc | local value, and location where it is bound |
TypeVar SrcLoc | type variable, and location where it is bound |
ValueBinder | here the value name is bound |
TypeBinder | here the type name is defined |
Import (Map (QName ()) [Symbol]) |
|
ImportPart [Symbol] | part of an |
Export [Symbol] | part of an |
RecPatWildcard [Symbol] | wildcard in a record pattern. The list contains resolved names of the fields that are brought in scope by this pattern. |
RecExpWildcard [(Name (), NameInfo l)] | wildcard in a record construction expression. The list contains resolved names of the fields and information about values assigned to those fields. |
None | no annotation |
ScopeError (Error l) | scope error |
annotateDecl :: forall a l. (Resolvable (a (Scoped l)), Functor a, Typeable l) => Scope -> a l -> a (Scoped l) Source #