summaryrefslogtreecommitdiff
path: root/src/Parser.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 3c43a69..6d6809b 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -8,6 +8,7 @@ import Control.Monad
import Control.Monad.State
import Control.Monad.Writer
+import Data.Map qualified as M
import Data.Maybe
import Data.Set qualified as S
import Data.Text qualified as T
@@ -66,8 +67,10 @@ parseTestFile path = do
[ map (fmap someVarValueType) builtins
]
, testContext = SomeExpr RootNetwork
+ , testNextTypeVar = 0
+ , testTypeUnif = M.empty
}
- (res, _) = flip evalState initState $ runWriterT $ runParserT (parseTestModule absPath) path content
+ (res, _) = runWriter $ flip (flip runParserT path) content $ flip evalStateT initState $ parseTestModule absPath
case res of
Left err -> putStr (errorBundlePretty err) >> exitFailure