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
96c1b6b7
Commit
96c1b6b7
authored
Feb 05, 2010
by
John van Groningen
Browse files
add optimizations for generic bimap,
add bimap instances for standard generic types to compiler
parent
247ba963
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
frontend/generics1.icl
View file @
96c1b6b7
This diff is collapsed.
Click to expand it.
frontend/syntax.dcl
View file @
96c1b6b7
...
...
@@ -530,24 +530,25 @@ NoGlobalIndex :== {gi_module=NoIndex,gi_index=NoIndex}
,
tdi_gen_rep
::
!
Optional
GenericTypeRep
}
// AA..
// type structure is used to specialize a generic to a type
::
GenTypeStruct
=
GTSAppCons
TypeKind
[
GenTypeStruct
]
|
GTSAppVar
TypeVar
[
GenTypeStruct
]
|
GTSVar
TypeVar
|
GTSArrow
GenTypeStruct
GenTypeStruct
// needed for simplifying bimaps
|
GTSAppConsBimapKindConst
// needed for simplifying bimaps
|
GTSCons
DefinedSymbol
GenTypeStruct
|
GTSField
DefinedSymbol
GenTypeStruct
|
GTSObject
DefinedSymbol
GenTypeStruct
|
GTSE
|
GTSArrow
GenTypeStruct
GenTypeStruct
// for optimizing bimaps
|
GTSAppConsBimapKindConst
// for optimizing bimaps
|
GTSAppBimap
TypeKind
[
GenTypeStruct
]
// for optimizing bimaps
|
GTSPair
!
GenTypeStruct
!
GenTypeStruct
// for optimizing bimaps
|
GTSEither
!
GenTypeStruct
!
GenTypeStruct
// for optimizing bimaps
::
GenericTypeRep
=
{
gtr_type
::
GenTypeStruct
// generic structure type
,
gtr_iso
::
DefinedSymbol
// the conversion isomorphism
}
// ..AA
::
TypeDefInfos
:==
{#
.{#
TypeDefInfo
}}
...
...
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