From a98f4aa4be7b72a310a8b5826e3cc82c7edb8f40 Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 6 Dec 2013 15:43:34 +0000 Subject: Show relative file paths in error messages This is to avoid one trivial reason for failures in the test suite. --- src/compiler/GF/Grammar/Parser.y | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/compiler/GF/Grammar') diff --git a/src/compiler/GF/Grammar/Parser.y b/src/compiler/GF/Grammar/Parser.y index 028da18c6..6f7f5854e 100644 --- a/src/compiler/GF/Grammar/Parser.y +++ b/src/compiler/GF/Grammar/Parser.y @@ -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" -- cgit v1.2.3