This repository was archived by the owner on May 22, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/Language/PureScript/CST Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module Language.PureScript.CST.Parser
5
5
, parseExpr
6
6
, parseModule
7
7
, parse
8
- , ModuleResult (..)
8
+ , PartialResult (..)
9
9
) where
10
10
11
11
import Prelude hiding (lex)
@@ -723,15 +723,15 @@ lexer :: (SourceToken -> Parser a) -> Parser a
723
723
lexer k = munch >>= k
724
724
725
725
parse :: Text -> Either (NE.NonEmpty ParserError) (Module ())
726
- parse = parseModule >=> modFull
726
+ parse = parseModule >=> resFull
727
727
728
- data ModuleResult = ModuleResult
729
- { modHeaderOnly :: Module ()
730
- , modFull :: Either (NE.NonEmpty ParserError) (Module ())
731
- }
728
+ data PartialResult a = PartialResult
729
+ { resPartial :: a
730
+ , resFull :: Either (NE.NonEmpty ParserError) a
731
+ } deriving (Functor)
732
732
733
- parseModule :: Text -> Either (NE.NonEmpty ParserError) ModuleResult
734
- parseModule src = fmap (\h eader -> ModuleResult header (parseFull header)) headerRes
733
+ parseModule :: Text -> Either (NE.NonEmpty ParserError) (PartialResult (Module ()))
734
+ parseModule src = fmap (\h eader -> PartialResult header (parseFull header)) headerRes
735
735
where
736
736
(st, headerRes) =
737
737
runParser (ParserState (lex src) []) parseModuleHeader
You can’t perform that action at this time.
0 commit comments