summaryrefslogtreecommitdiff
path: root/src/Parser/Core.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-01-19 20:01:05 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-01-19 22:18:26 +0100
commit340d408024980bddac83971dbef7d6a17c407382 (patch)
tree1413d32097dde665b314a388a1d48d5b8279ad5d /src/Parser/Core.hs
parent4547c9887353c6486873876e18f29ae91a5c84b4 (diff)
Export declarationHEADmaster
Diffstat (limited to 'src/Parser/Core.hs')
-rw-r--r--src/Parser/Core.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Parser/Core.hs b/src/Parser/Core.hs
index 5fb4c5f..2b8837a 100644
--- a/src/Parser/Core.hs
+++ b/src/Parser/Core.hs
@@ -40,6 +40,7 @@ runTestParser path content initState (TestParser parser) = runIdentity . flip (f
data Toplevel
= ToplevelTest Test
| ToplevelDefinition ( VarName, SomeExpr )
+ | ToplevelExport VarName
data TestParserState = TestParserState
{ testVars :: [ ( VarName, SomeExprType ) ]
@@ -204,7 +205,7 @@ localState inner = do
put s { testNextTypeVar = testNextTypeVar s', testTypeUnif = testTypeUnif s' }
return x
-toplevel :: (a -> Toplevel) -> TestParser a -> TestParser Toplevel
+toplevel :: (a -> b) -> TestParser a -> TestParser b
toplevel f = return . f <=< L.nonIndented scn
block :: (a -> [b] -> TestParser c) -> TestParser a -> TestParser b -> TestParser c