1
0
forked from GitHub/gf-core

Show relative file paths in error messages

This is to avoid one trivial reason for failures in the test suite.
This commit is contained in:
hallgren
2013-12-06 15:43:34 +00:00
parent e2fe50e585
commit a98f4aa4be
7 changed files with 63 additions and 63 deletions

View File

@@ -116,9 +116,7 @@ ModDef
(extends,with,content) = $4
(opens,jments,opts) = case content of { Just c -> c; Nothing -> ([],[],noOptions) }
jments <- mapM (checkInfoType mtype) jments
defs <- case buildAnyTree id jments of
Ok x -> return x
Bad msg -> fail (optDecode opts msg)
defs <- buildAnyTree id jments
return (id, ModInfo mtype mstat opts extends with opens [] "" Nothing defs) }
ModHeader :: { SourceModule }
@@ -614,12 +612,6 @@ Posn
happyError :: P a
happyError = fail "syntax error"
-- Quick fix to render error messages from UTF-8-encoded source files correctly.
optDecode opts =
{-if map toLower (getEncoding opts) `elem` ["utf8","utf-8"]
then decodeString
else-} id
mkListId,mkConsId,mkBaseId :: Ident -> Ident
mkListId = prefixIdent "List"
mkConsId = prefixIdent "Cons"