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
83c8b2e3
Commit
83c8b2e3
authored
Sep 04, 2013
by
Björn Peemöller
Browse files
Fixed bug in output of FlatCurry interfaces
parent
2b8e9fad
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Generators/GenFlatCurry.hs
View file @
83c8b2e3
...
...
@@ -518,19 +518,28 @@ isExportedQualIdent qident ((CS.ExportModule _):exps)
--
qualifyIDecl
::
ModuleIdent
->
CS
.
IDecl
->
CS
.
IDecl
qualifyIDecl
mid
ent
(
CS
.
IInfixDecl
pos
fixi
prec
qid
ent
)
=
(
CS
.
IInfixDecl
pos
fixi
prec
(
qualQualify
mid
ent
qid
ent
)
)
qualifyIDecl
mid
ent
(
CS
.
IDataDecl
pos
qid
ent
idents
cdecl
s
)
=
(
CS
.
IDataDecl
pos
(
qualQualify
mid
ent
qid
ent
)
idents
cdecls
)
qualifyIDecl
mident
(
CS
.
INewtypeDecl
pos
qident
idents
ncdecl
)
=
(
CS
.
INewtypeDecl
pos
(
qualQualify
mident
qident
)
idents
ncdecl
)
qualifyIDecl
mident
(
CS
.
ITypeDecl
pos
qident
idents
texpr
)
=
(
CS
.
ITypeDecl
pos
(
qualQualify
mident
qident
)
idents
texpr
)
qualifyIDecl
mident
(
CS
.
IFunctionDecl
pos
qident
arity
texpr
)
=
(
CS
.
IFunctionDecl
pos
(
qualQualify
mident
qident
)
arity
(
qualifyCSType
texpr
)
)
where
qualifyCSType
=
fromType
.
toQual
Type
mid
ent
[]
qualifyIDecl
mid
(
CS
.
IInfixDecl
pos
fixi
prec
qid
)
=
CS
.
IInfixDecl
pos
fixi
prec
(
qualQualify
mid
qid
)
qualifyIDecl
mid
(
CS
.
IDataDecl
pos
qid
vs
c
s
)
=
CS
.
IDataDecl
pos
(
qualQualify
mid
qid
)
vs
$
map
(
fmap
(
qualifyIConstrDecl
mid
))
cs
qualifyIDecl
mid
(
CS
.
INewtypeDecl
pos
qid
vs
nc
)
=
CS
.
INewtypeDecl
pos
(
qualQualify
mid
qid
)
vs
nc
qualifyIDecl
mid
(
CS
.
ITypeDecl
pos
qid
vs
ty
)
=
CS
.
ITypeDecl
pos
(
qualQualify
mid
qid
)
vs
ty
qualifyIDecl
mid
(
CS
.
IFunctionDecl
pos
qid
arity
ty
)
=
CS
.
IFunctionDecl
pos
(
qualQualify
mid
qid
)
arity
(
qualifyCS
Type
mid
ty
)
qualifyIDecl
_
idecl
=
idecl
qualifyIConstrDecl
::
ModuleIdent
->
CS
.
ConstrDecl
->
CS
.
ConstrDecl
qualifyIConstrDecl
mid
(
CS
.
ConstrDecl
pos
vs
cid
tys
)
=
CS
.
ConstrDecl
pos
vs
cid
(
map
(
qualifyCSType
mid
)
tys
)
qualifyIConstrDecl
mid
(
CS
.
ConOpDecl
pos
vs
ty1
op
ty2
)
=
CS
.
ConOpDecl
pos
vs
(
qualifyCSType
mid
ty1
)
op
(
qualifyCSType
mid
ty2
)
qualifyCSType
::
ModuleIdent
->
CS
.
TypeExpr
->
CS
.
TypeExpr
qualifyCSType
mid
=
fromType
.
toQualType
mid
[]
--
typeArity
::
IL
.
Type
->
Int
...
...
src/Modules.hs
View file @
83c8b2e3
...
...
@@ -272,7 +272,7 @@ writeFlat :: Options -> FilePath -> CompilerEnv -> ModuleSummary -> IL.Module
writeFlat
opts
fn
env
modSum
il
=
do
when
(
extTarget
||
fcyTarget
)
$
do
writeFlatCurry
opts
fn
env
modSum
il
writeFlatIntf
opts
fn
env
modSum
il
writeFlatIntf
opts
fn
env
modSum
il
when
(
xmlTarget
)
$
writeFlatXml
opts
fn
modSum
il
where
extTarget
=
ExtendedFlatCurry
`
elem
`
optTargetTypes
opts
...
...
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