YhcSource codeContentsIndex
ImportState
Description

Internal state of the compiler used from need analysis until renaming

Needs IdSupply?

Synopsis
data ImportState = ImportState {
visibleIS :: Bool
uniqueIS :: Id
rpsIS :: PackedString
sectionRpsIS :: PackedString
needIS :: (Set TokenId)
renameIS :: (Map (TokenId, IdKind) (Either [Pos] [Id]))
symtabIS :: (Map (TokenId, IdKind) Info)
instsIS :: [(TokenId, TokenId, TokenId, [Id], [(Pos, TokenId, Id)])]
fixityIS :: (TokenId -> (InfixClass TokenId, Int))
errorsIS :: [Error]
}
initIS :: Map (TokenId, IdKind) [Pos] -> ImportState
putModidIS :: ImportState -> PackedString -> ImportState
putModid2IS :: ImportState -> Bool -> PackedString -> ImportState
getNeedIS :: ImportState -> (PackedString, PackedString, Set TokenId)
getSymbolTableIS :: ImportState -> Map (TokenId, IdKind) Info
getRenameTableIS :: ImportState -> Map (TokenId, IdKind) (Either [Pos] [Id])
getErrIS :: ImportState -> Either [Error] ImportState
importError :: Error -> a -> () -> ImportState -> (a, ImportState)
addNeedIS :: TokenId -> State0 a ImportState ImportState
addSymbolIS :: (TokenId, IdKind) -> Info -> State0 a ImportState ImportState
findSymbolIS :: (TokenId, IdKind) -> State a ImportState (Maybe Info) ImportState
module Info
data Decl id
Documentation
data ImportState
It is probably best to refrain from direct access to the fields...
Constructors
ImportState
visibleIS :: Bool
uniqueIS :: Idnext unique Id
rpsIS :: PackedStringmodid of interface file
sectionRpsIS :: PackedStringmodid of this section of .hi file
needIS :: (Set TokenId)new identifiers needed
renameIS :: (Map (TokenId, IdKind) (Either [Pos] [Id]))rename (name -> unique)
symtabIS :: (Map (TokenId, IdKind) Info)symboltable (real name -> info)
instsIS :: [(TokenId, TokenId, TokenId, [Id], [(Pos, TokenId, Id)])]
(mod,realClass, realData, free, Ctxs)
fixityIS :: (TokenId -> (InfixClass TokenId, Int))fixity information (name -> fixity)
errorsIS :: [Error]errors
show/hide Instances
initIS :: Map (TokenId, IdKind) [Pos] -> ImportState
initial import state
putModidIS :: ImportState -> PackedString -> ImportState
put modid of interface file into import state
putModid2IS :: ImportState -> Bool -> PackedString -> ImportState
put modid of current section of interface file into import state
getNeedIS :: ImportState -> (PackedString, PackedString, Set TokenId)
getSymbolTableIS :: ImportState -> Map (TokenId, IdKind) Info
getRenameTableIS :: ImportState -> Map (TokenId, IdKind) (Either [Pos] [Id])
getErrIS :: ImportState -> Either [Error] ImportState
importError :: Error -> a -> () -> ImportState -> (a, ImportState)
addNeedIS :: TokenId -> State0 a ImportState ImportState
Maybe this should be rolled into addSymbolIS?
addSymbolIS :: (TokenId, IdKind) -> Info -> State0 a ImportState ImportState
findSymbolIS :: (TokenId, IdKind) -> State a ImportState (Maybe Info) ImportState
module Info
data Decl id
show/hide Instances
Produced by Haddock version 0.8