Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
curry
curry-frontend
Commits
adda624b
Commit
adda624b
authored
Sep 25, 2012
by
Björn Peemöller
Browse files
Adapted latest curry-base changes
parent
2258a104
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Frontend.hs
View file @
adda624b
...
...
@@ -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
...
...
src/Html/CurryHtml.hs
View file @
adda624b
...
...
@@ -15,18 +15,17 @@ module Html.CurryHtml (source2html) where
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
(
lexFil
e
)
import
Curry.Base.Ident
(
QualIdent
(
..
),
unqualify
)
import
Curry.Base.Message
(
fromIO
)
import
Curry.Files.PathUtils
(
readModule
,
writeModule
,
lookupCurryFile
,
dropExtension
,
takeFileName
)
import
Curry.Syntax
(
lexSourc
e
)
import
Html.SyntaxColoring
import
Base.Messages
(
abortWith
)
import
CompilerOpts
(
Options
(
..
),
TargetType
(
..
))
import
Frontend
(
parse
,
fullParse
)
import
CompilerOpts
(
Options
(
..
),
TargetType
(
..
))
import
Frontend
(
parse
,
fullParse
)
--- translate source file into HTML file with syntaxcoloring
--- @param outputfilename
...
...
@@ -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
=
lex
Fil
e
filename
cont
lexRes
=
lex
Sourc
e
filename
cont
return
$
genProgram
cont
[
typingParseRes
,
fullParseRes
,
parseRes
]
lexRes
...
...
src/Html/SyntaxColoring.hs
View file @
adda624b
...
...
@@ -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
=
""
...
...
src/Modules.hs
View file @
adda624b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment