Commit adda624b authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Adapted latest curry-base changes

parent 2258a104
......@@ -35,7 +35,7 @@ import Modules (checkModule, checkModuleHeader, compileModule, loadModule)
"CurrySyntax").
-}
parse :: FilePath -> String -> MessageM Module
parse fn src = parseModule True fn src >>= genCurrySyntax
parse fn src = parseModule fn src >>= genCurrySyntax
where
genCurrySyntax mod1
| null hdrErrs = return mdl
......
......@@ -17,9 +17,9 @@ import Data.Maybe (fromMaybe, isJust)
import Curry.Base.Ident (QualIdent (..), unqualify)
import Curry.Base.Message (fromIO)
import Curry.Files.PathUtils (readModule, writeModule, lookupCurryFile
, dropExtension, takeFileName)
import Curry.Syntax (lexFile)
import Curry.Files.PathUtils
(readModule, writeModule, lookupCurryFile, dropExtension, takeFileName)
import Curry.Syntax (lexSource)
import Html.SyntaxColoring
......@@ -27,7 +27,6 @@ import Base.Messages (abortWith)
import CompilerOpts (Options(..), TargetType (..))
import Frontend (parse, fullParse)
--- translate source file into HTML file with syntaxcoloring
--- @param outputfilename
--- @param sourcefilename
......@@ -58,7 +57,7 @@ filename2program opts filename = do
typingParseRes <- fromIO $ fullParse opts filename cont
fullParseRes <- fromIO $ fullParse (opts { optTargetTypes = [UntypedAbstractCurry]}) filename cont
let parseRes = parse filename cont
lexRes = lexFile filename cont
lexRes = lexSource filename cont
return $ genProgram cont [typingParseRes, fullParseRes, parseRes] lexRes
......
......@@ -757,7 +757,8 @@ token2string (Token LineComment a) = attributes2string a
token2string (Token NestedComment (StringAttributes sv _)) = sv
token2string (Token NestedComment a) = attributes2string a
token2string (Token LeftBraceSemicolon _) = "{;"
token2string (Token Binds _) = ":="
token2string (Token Bind _) = ":="
token2string (Token Select _) = ":>"
attributes2string :: Attributes -> [Char]
attributes2string NoAttributes = ""
......
......@@ -111,7 +111,7 @@ loadModule opts fn = do
Nothing -> abortWithMessages [message $ text $ "Missing file: " ++ fn] -- TODO
Just src -> do
-- parse module
case runMsg $ CS.parseModule True fn src of
case runMsg $ CS.parseModule fn src of
Left err -> abortWithMessages [err]
Right (parsed, _) -> do
-- check module header
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment