Added a map of name attributes (ready for things like PRAGMA SHARED) to the CompState
This should possibly (and could in future) be combined into NameDef and the main csNames map
This commit is contained in:
parent
d3fc6a1a90
commit
f612b99a49
|
@ -85,6 +85,8 @@ instance Ord UnifyIndex where
|
|||
-- | An entry in the map corresponding to a UnifyIndex
|
||||
type UnifyValue = TypeExp A.Type
|
||||
|
||||
data NameAttr = NameShared deriving (Typeable, Data, Eq, Show, Ord)
|
||||
|
||||
-- | State necessary for compilation.
|
||||
data CompState = CompState {
|
||||
-- This structure needs to be printable with pshow.
|
||||
|
@ -114,6 +116,7 @@ data CompState = CompState {
|
|||
csNames :: Map String A.NameDef,
|
||||
csUnscopedNames :: Map String String,
|
||||
csNameCounter :: Int,
|
||||
csNameAttr :: Map String NameAttr,
|
||||
|
||||
-- Set by passes
|
||||
csTypeContext :: [Maybe A.Type],
|
||||
|
@ -153,6 +156,7 @@ emptyState = CompState {
|
|||
csNames = Map.empty,
|
||||
csUnscopedNames = Map.empty,
|
||||
csNameCounter = 0,
|
||||
csNameAttr = Map.empty,
|
||||
|
||||
csTypeContext = [],
|
||||
csNonceCounter = 0,
|
||||
|
|
Loading…
Reference in New Issue
Block a user