From 340d408024980bddac83971dbef7d6a17c407382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sun, 19 Jan 2025 20:01:05 +0100 Subject: Export declaration --- src/Parser/Core.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Parser/Core.hs') 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 -- cgit v1.2.3