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
- lookupMethod :: Name l -> Table -> (Result l, Maybe QName)
- lookupName :: QName l -> Table -> Result l
- filterTable :: (Symbol -> Bool) -> Table -> Table
- isValue :: Symbol -> Bool
- isType :: Symbol -> Bool
- isMethod :: 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
lookupMethod :: Name l -> Table -> (Result l, Maybe QName) Source
Methods can sometimes be referenced unqualified and still be resolved to a symbols 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