Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module is designed to be imported qualified.
- type Table = Map QName [Symbol]
- empty :: Table
- mergeTables :: Table -> Table -> Table
- data Result l
- = SymbolFound Symbol
- | Error (Error l)
- | Special
- lookupValue :: QName l -> Table -> Result l
- lookupType :: QName l -> Table -> Result l
- lookupUnqualifiedAsQualified :: Name l -> Table -> (Result l, Maybe QName)
- lookupName :: QName l -> Table -> Result l
- filterTable :: (Symbol -> Bool) -> Table -> Table
- isValue :: Symbol -> Bool
- isType :: Symbol -> Bool
- isMethodOrAssociated :: Symbol -> Bool
- fromList :: [(QName, Symbol)] -> Table
Documentation
type Table = Map QName [Symbol] Source
Global symbol table — contains names declared somewhere at the top level.
mergeTables :: Table -> Table -> Table Source
For each name take the union of the lists of symbols they refer to.
lookupValue :: QName l -> Table -> Result l Source
lookupType :: QName l -> Table -> Result l Source
lookupUnqualifiedAsQualified :: Name l -> Table -> (Result l, Maybe QName) Source
Methods and associated types in instance declarations are referenced unqualified and still resolved to a symbol that is only in scope qualified. https://www.haskell.org/pipermail/haskell-prime/2008-April/002569.html The test for this is testsannotationsQualifiedMethods.hs
lookupName :: QName l -> Table -> Result l Source
isMethodOrAssociated :: Symbol -> Bool Source