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
5f895d0b
Commit
5f895d0b
authored
Sep 07, 2011
by
Björn Peemöller
Browse files
Resolved bug of type constructor renaming
parent
da1c1277
Changes
2
Show whitespace changes
Inline
Side-by-side
src/CompilerEnv.hs
View file @
5f895d0b
...
...
@@ -38,7 +38,7 @@ data CompilerEnv = CompilerEnv
,
opPrecEnv
::
PEnv
-- ^ operator precedences
,
tyConsEnv
::
TCEnv
-- ^ type constructors
,
valueEnv
::
ValueEnv
-- ^ functions and data constructors
}
}
deriving
Show
initCompilerEnv
::
ModuleIdent
->
CompilerEnv
initCompilerEnv
mid
=
CompilerEnv
...
...
src/Modules.lhs
View file @
5f895d0b
...
...
@@ -97,7 +97,7 @@ code are obsolete and commented out.
>
-- generate target code
>
let
intf
=
exportInterface
env
modul
>
let
modSum
=
summarizeModule
(
tyConsEnv
env2
)
intf
modul
>
writeFlat
opts
fn
env2
modSum
il
>
writeFlat
opts
fn
(
qualifyEnv
opts
env2
)
modSum
il
>
where
>
withFlat
=
any
(`
elem
`
optTargetTypes
opts
)
>
[
FlatCurry
,
FlatXml
,
ExtendedFlatCurry
]
...
...
@@ -176,8 +176,7 @@ Haskell and original MCC where a module obtains \texttt{main}).
-- ---------------------------------------------------------------------------
>
checkModule
::
Options
->
CompilerEnv
->
CS
.
Module
->
(
CompilerEnv
,
CS
.
Module
)
>
checkModule
opts
env
mdl
=
qualifyEnvs
>
$
expand
>
checkModule
opts
env
mdl
=
expand
>
$
uncurry
qual
>
$
(
if
withFlat
then
uncurry
typeCheck
else
id
)
>
$
uncurry
precCheck
...
...
@@ -185,7 +184,6 @@ Haskell and original MCC where a module obtains \texttt{main}).
>
$
kindCheck
env
mdl
>
where
>
expand
(
e
,
m
)
=
if
withFlat
then
(
e
,
expandInterface
e
m
)
else
(
e
,
m
)
>
qualifyEnvs
(
e
,
m
)
=
(
qualifyEnv
opts
e
,
m
)
>
withFlat
=
any
(`
elem
`
optTargetTypes
opts
)
>
[
FlatCurry
,
FlatXml
,
ExtendedFlatCurry
]
...
...
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