Skip to content
GitLab
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
6abbe3d8
Commit
6abbe3d8
authored
Oct 19, 2011
by
Björn Peemöller
Browse files
exportCheck is now done prior to qualification
parent
f5693969
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Modules.hs
View file @
6abbe3d8
...
...
@@ -159,11 +159,9 @@ checkModule opts env mdl = kindCheck env mdl -- should be only syntax checking ?
>>=
uncurry
(
syntaxCheck
opts
)
>>=
uncurry
precCheck
>>=
(
if
withTypeCheck
then
uncurry
typeCheck
else
return
)
>>=
return
.
(
uncurry
qual
)
>>=
uncurry
exportCheck
>>=
return
.
qualEnv
>>=
return
.
(
uncurry
(
qual
opts
))
where
qualEnv
(
e
,
m
)
=
(
qualifyEnv
opts
e
,
m
)
withTypeCheck
=
any
(`
elem
`
optTargetTypes
opts
)
[
FlatCurry
,
ExtendedFlatCurry
,
FlatXml
,
AbstractCurry
]
...
...
src/Transformations.hs
View file @
6abbe3d8
...
...
@@ -24,6 +24,8 @@ import Transformations.Qual as Q (qual)
import
Transformations.Simplify
as
S
(
simplify
)
import
CompilerEnv
import
CompilerOpts
import
Imports
(
qualifyEnv
)
import
qualified
IL
-- |Add missing case branches
...
...
@@ -50,8 +52,8 @@ lift mdl env = (mdl', env { valueEnv = tyEnv', evalAnnotEnv = eEnv' })
where
(
mdl'
,
tyEnv'
,
eEnv'
)
=
L
.
lift
(
valueEnv
env
)
(
evalAnnotEnv
env
)
mdl
-- |Fully qualify used constructors and functions
qual
::
CompilerEnv
->
Module
->
(
CompilerEnv
,
Module
)
qual
env
(
Module
m
es
is
ds
)
=
(
env
,
Module
m
es
is
ds'
)
qual
::
Options
->
CompilerEnv
->
Module
->
(
CompilerEnv
,
Module
)
qual
opts
env
(
Module
m
es
is
ds
)
=
(
qualifyEnv
opts
env
,
Module
m
es
is
ds'
)
where
ds'
=
Q
.
qual
(
moduleIdent
env
)
(
tyConsEnv
env
)
(
valueEnv
env
)
ds
-- |Simplify the source code
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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