Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
2c6cabd0
Commit
2c6cabd0
authored
Aug 16, 2001
by
Vincent Zweije
Browse files
Change user-defined symbol representation
parent
b48541b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
sucl/coreclean.dcl
View file @
2c6cabd0
...
...
@@ -4,7 +4,7 @@ definition module coreclean
from
strat
import
Strategy
from
rule
import
Rule
from
syntax
import
TypeSymbIdent
,
Ident
,
TypeVar
,
ExprInfoPtr
,
VarInfoPtr
from
syntax
import
TypeSymbIdent
,
Ident
,
TypeVar
,
ExprInfoPtr
,
VarInfoPtr
,
SymbKind
// Transitive necessities
from
strat
import
Substrategy
...
...
@@ -34,7 +34,7 @@ from StdString import String
sucltypeheap
::
[
SuclTypeVariable
]
::
SuclSymbol
=
SuclUser
Ident
=
SuclUser
SymbKind
|
SuclCase
ExprInfoPtr
|
SuclApply
Int
|
SuclInt
Int
...
...
sucl/coreclean.icl
View file @
2c6cabd0
...
...
@@ -30,7 +30,7 @@ sucltypeheap :: [SuclTypeVariable]
sucltypeheap
=:
map
SuclANONYMOUS
[
0
..]
::
SuclSymbol
=
SuclUser
Ident
=
SuclUser
SymbKind
|
SuclCase
ExprInfoPtr
|
SuclApply
Int
|
SuclInt
Int
...
...
@@ -76,6 +76,18 @@ where (==) (SuclUser id1 ) (SuclUser id2 ) = id1 == id2
(==)
(
SuclBool
bool1
)
(
SuclBool
bool2
)
=
bool1
==
bool2
(==)
_
_
=
False
instance
==
SymbKind
where
(==)
SK_Unknown
SK_Unknown
=
True
(==)
(
SK_Function
gi1
)
(
SK_Function
gi2
)
=
gi1
==
gi2
(==)
(
SK_LocalMacroFunction
i1
)
(
SK_LocalMacroFunction
i2
)
=
i1
==
i2
(==)
(
SK_OverloadedFunction
gi1
)
(
SK_OverloadedFunction
gi2
)
=
gi1
==
gi2
(==)
(
SK_Generic
gi1
tk1
)
(
SK_Generic
gi2
tk2
)
=
gi1
==
gi2
&&
tk1
==
tk2
(==)
(
SK_Constructor
gi1
)
(
SK_Constructor
gi2
)
=
gi1
==
gi2
(==)
(
SK_Macro
gi1
)
(
SK_Macro
gi2
)
=
gi1
==
gi2
(==)
(
SK_GeneratedFunction
fip1
i1
)
(
SK_GeneratedFunction
fip2
i2
)
=
fip1
==
fip2
&&
i1
==
i2
(==)
SK_TypeCode
SK_TypeCode
=
True
(==)
_
_
=
False
instance
==
SuclVariable
where
(==)
(
SuclAnonymous
i1
)
(
SuclAnonymous
i2
)
=
i1
==
i2
(==)
(
SuclNamed
p1
)
(
SuclNamed
p2
)
=
p1
==
p2
...
...
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