Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry
curry-frontend
Commits
ce2b3c4a
Commit
ce2b3c4a
authored
Oct 09, 2014
by
Jan Rasmus Tikovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fix.
parent
259e2bd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/Imports.hs
src/Imports.hs
+5
-6
No files found.
src/Imports.hs
View file @
ce2b3c4a
...
...
@@ -31,6 +31,7 @@ import Base.CurryTypes (toQualType, toQualTypes)
import
Base.Messages
import
Base.TopEnv
import
Base.Types
import
Base.TypeSubst
(
expandAliasType
)
import
Env.Interface
import
Env.ModuleAlias
(
importAliases
,
initAliasEnv
)
...
...
@@ -557,12 +558,10 @@ expandRecordTypes tcEnv (Label qid r (ForAll n ty)) =
Label
qid
r
(
ForAll
n
(
expandRecords
tcEnv
ty
))
expandRecords
::
TCEnv
->
Type
->
Type
-- jrt 2014-10-09: Deactivated to enable (mutually) recursive record types
-- expandRecords tcEnv (TypeConstructor qid tys) = case qualLookupTC qid tcEnv of
-- [AliasType _ _ rty@(TypeRecord _ _)]
-- -> expandRecords tcEnv $ expandAliasType (map (expandRecords tcEnv) tys) rty
-- _ -> TypeConstructor qid $ map (expandRecords tcEnv) tys
expandRecords
tcEnv
(
TypeConstructor
qid
tys
)
=
TypeConstructor
qid
$
map
(
expandRecords
tcEnv
)
tys
expandRecords
tcEnv
(
TypeConstructor
qid
tys
)
=
case
qualLookupTC
qid
tcEnv
of
[
AliasType
_
_
rty
@
(
TypeRecord
_
_
)]
->
expandRecords
tcEnv
$
expandAliasType
(
map
(
expandRecords
tcEnv
)
tys
)
rty
_
->
TypeConstructor
qid
$
map
(
expandRecords
tcEnv
)
tys
expandRecords
tcEnv
(
TypeConstrained
tys
v
)
=
TypeConstrained
(
map
(
expandRecords
tcEnv
)
tys
)
v
expandRecords
tcEnv
(
TypeArrow
ty1
ty2
)
=
...
...
Write
Preview
Markdown
is supported
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