top.errors doesn't need to be an IORef
This commit is contained in:
@@ -43,8 +43,7 @@ instance Show TopContext where
|
||||
emptyTop : ∀ io. {{Monad io}} {{HasIO io}} -> io TopContext
|
||||
emptyTop = do
|
||||
let mcctx = MC emptyMap Nil 0 CheckAll
|
||||
errs <- newIORef $ the (List Error) Nil
|
||||
pure $ MkTop emptyMap Nil emptyMap Nil emptyMap mcctx 0 errs emptyMap
|
||||
pure $ MkTop emptyMap Nil emptyMap Nil emptyMap mcctx 0 Nil emptyMap
|
||||
|
||||
|
||||
setFlag : QName → FC → EFlag → M Unit
|
||||
@@ -91,4 +90,4 @@ addHint qn = do
|
||||
addError : Error -> M Unit
|
||||
addError err = do
|
||||
top <- getTop
|
||||
modifyIORef top.errors (_::_ err)
|
||||
modifyTop [ errors $= _::_ err ]
|
||||
|
||||
@@ -433,7 +433,7 @@ record TopContext where
|
||||
|
||||
-- Global values
|
||||
verbose : Int -- command line flag
|
||||
errors : IORef (List Error)
|
||||
errors : List Error
|
||||
ops : Operators
|
||||
|
||||
-- we'll use this for typechecking, but need to keep a TopContext around too.
|
||||
|
||||
Reference in New Issue
Block a user