summaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-07-07 12:23:21 +0000
committerkrasimir <krasimir@chalmers.se>2010-07-07 12:23:21 +0000
commit95f1d40c5636d6e9ba8d4877d044b83f41bbbf65 (patch)
treea133568fe20f11ca852f5a2b743a623a188ac68b /src/runtime
parentc066721dd1b200eb7e22c8c242bf48a83e5fcc69 (diff)
report type errors in the shell from command "p"
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/haskell/PGF/Parse.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/haskell/PGF/Parse.hs b/src/runtime/haskell/PGF/Parse.hs
index 1d09359ed..6bf0979a4 100644
--- a/src/runtime/haskell/PGF/Parse.hs
+++ b/src/runtime/haskell/PGF/Parse.hs
@@ -44,11 +44,12 @@ data ParseInput
-- | This data type encodes the different outcomes which you could get from the parser.
data ParseOutput
= ParseFailed Int -- ^ The integer is the position in number of tokens where the parser failed.
- | TypeError FId [TcError] -- ^ The parsing was successful but none of the trees is type correct.
+ | TypeError [(FId,TcError)] -- ^ The parsing was successful but none of the trees is type correct.
-- The forest id ('FId') points to the bracketed string from the parser
-- where the type checking failed. More than one error is returned
-- if there are many analizes for some phrase but they all are not type correct.
- | ParseOk [Tree] -- ^ If the parsing was successful we get a list of abstract syntax trees. The list should be non-empty.
+ | ParseOk [Tree] -- ^ If the parsing and the type checkeing are successful we get a list of abstract syntax trees.
+ -- The list should be non-empty.
parse :: PGF -> Language -> Type -> [Token] -> (ParseOutput,BracketedString)
parse pgf lang typ toks = loop (initState pgf lang typ) toks