more effect stuff, incl. ST

This commit is contained in:
rhiannon morris 2023-08-25 18:09:06 +02:00
parent 4b6b3853a1
commit a221380d61
17 changed files with 395 additions and 204 deletions

View file

@ -1,6 +1,7 @@
module Quox.Parser.FromParser.Error
import Quox.Parser.Parser
import Quox.Parser.LoadFile
import Quox.Typing
import System.File
@ -28,7 +29,7 @@ data Error =
| DimNameInTerm Loc PBaseName
| DisplacedBoundVar Loc PName
| WrapTypeError TypeError
| LoadError Loc String FileError
| LoadError Loc FilePath FileError
| WrapParseError String ParseError
@ -100,9 +101,9 @@ parameters (showContext : Bool)
prettyError (WrapTypeError err) =
Typing.prettyError showContext $ trimContext 2 err
prettyError (LoadError loc str err) = pure $
prettyError (LoadError loc file err) = pure $
vsep [!(prettyLoc loc),
"couldn't load file" <++> text str,
"couldn't load file" <++> text file,
text $ show err]
prettyError (WrapParseError file err) =