Commit 96c1b6b7 authored by John van Groningen's avatar John van Groningen
Browse files

add optimizations for generic bimap,

add bimap instances for standard generic types to compiler
parent 247ba963
This diff is collapsed.
...@@ -530,24 +530,25 @@ NoGlobalIndex :== {gi_module=NoIndex,gi_index=NoIndex} ...@@ -530,24 +530,25 @@ NoGlobalIndex :== {gi_module=NoIndex,gi_index=NoIndex}
, tdi_gen_rep :: !Optional GenericTypeRep , tdi_gen_rep :: !Optional GenericTypeRep
} }
// AA..
// type structure is used to specialize a generic to a type // type structure is used to specialize a generic to a type
:: GenTypeStruct :: GenTypeStruct
= GTSAppCons TypeKind [GenTypeStruct] = GTSAppCons TypeKind [GenTypeStruct]
| GTSAppVar TypeVar [GenTypeStruct] | GTSAppVar TypeVar [GenTypeStruct]
| GTSVar TypeVar | GTSVar TypeVar
| GTSArrow GenTypeStruct GenTypeStruct // needed for simplifying bimaps
| GTSAppConsBimapKindConst // needed for simplifying bimaps
| GTSCons DefinedSymbol GenTypeStruct | GTSCons DefinedSymbol GenTypeStruct
| GTSField DefinedSymbol GenTypeStruct | GTSField DefinedSymbol GenTypeStruct
| GTSObject DefinedSymbol GenTypeStruct | GTSObject DefinedSymbol GenTypeStruct
| GTSE | 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 = :: GenericTypeRep =
{ gtr_type :: GenTypeStruct // generic structure type { gtr_type :: GenTypeStruct // generic structure type
, gtr_iso :: DefinedSymbol // the conversion isomorphism , gtr_iso :: DefinedSymbol // the conversion isomorphism
} }
// ..AA
:: TypeDefInfos :== {# .{# TypeDefInfo}} :: TypeDefInfos :== {# .{# TypeDefInfo}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment