aboutsummaryrefslogtreecommitdiff
path: root/frontend/syntax.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r--frontend/syntax.dcl32
1 files changed, 20 insertions, 12 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index fed82c2..e3be8f8 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -58,6 +58,9 @@ instance toString Ident
instances are accumulated.
*/
| STE_BelongingSymbol !Int
+
+ | STE_UsedType !Index !STE_Kind
+ /* used during binding of types to mark types that have been applied. The first */
:: Declaration = Declaration !DeclarationRecord
@@ -369,16 +372,15 @@ cIsImportedObject :== False
:: ParsedTypeDef :== TypeDef RhsDefsOfType
:: CheckedTypeDef :== TypeDef TypeRhs
-/*
-cIsHyperStrict :== True
-cIsNotHyperStrict :== False
-*/
-
cAllBitsClear :== 0
-
cIsHyperStrict :== 1
cIsNonCoercible :== 2
-// cMayBeNonCoercible :== 4
+cIsAnalysed :== 4
+
+:: GlobalIndex =
+ { gi_module ::!Int
+ , gi_index ::!Int
+ }
:: TypeDef type_rhs =
{ td_name :: !Ident
@@ -390,16 +392,17 @@ cIsNonCoercible :== 2
, td_rhs :: !type_rhs
, td_attribute :: !TypeAttribute
, td_pos :: !Position
+ , td_used_types :: ![GlobalIndex]
}
:: TypeDefInfo =
{ tdi_kinds :: ![TypeKind]
, tdi_properties :: !BITVECT
- , tdi_group :: ![Global Index]
+ , tdi_group :: ![GlobalIndex]
, tdi_group_nr :: !Int
, tdi_group_vars :: ![Int]
, tdi_cons_vars :: ![Int]
- , tdi_tmp_index :: !Int
+ , tdi_index_in_group :: !Index
, tdi_classification :: !TypeClassification
}
@@ -1034,7 +1037,10 @@ cNonUniqueSelection :== False
| PS_Array !ParsedExpr
| PS_Erroneous
-:: GeneratorKind = IsListGenerator | IsOverloadedListGenerator | IsArrayGenerator
+:: GeneratorKind :== Bool
+
+IsListGenerator :== True
+IsArrayGenerator :== False
:: LineAndColumn = {lc_line :: !Int, lc_column :: !Int}
@@ -1268,6 +1274,8 @@ instance <<< FunctionBody
instance == TypeAttribute
instance == Annotation
+instance == GlobalIndex
+
/*
ErrorToString :: Error -> String
@@ -1282,7 +1290,7 @@ EmptySymbolTableEntryCAF :: BoxedSymbolTableEntry
cNotAGroupNumber :== -1
EmptyTypeDefInfo :== { tdi_kinds = [], tdi_properties = cAllBitsClear, tdi_group = [], tdi_group_vars = [], tdi_cons_vars = [],
- tdi_classification = EmptyTypeClassification, tdi_group_nr = cNotAGroupNumber, tdi_tmp_index = NoIndex }
+ tdi_classification = EmptyTypeClassification, tdi_group_nr = cNotAGroupNumber, tdi_index_in_group = NoIndex }
MakeTypeVar name :== { tv_name = name, tv_info_ptr = nilPtr }
MakeVar name :== { var_name = name, var_info_ptr = nilPtr, var_expr_ptr = nilPtr }
@@ -1334,7 +1342,7 @@ ParsedInstanceToClassInstance pi members :==
MakeTypeDef name lhs rhs attr contexts pos :==
{ td_name = name, td_index = -1, td_arity = length lhs, td_args = lhs, td_attrs = [], td_attribute = attr, td_context = contexts,
- td_pos = pos, td_rhs = rhs }
+ td_pos = pos, td_rhs = rhs, td_used_types = [] }
MakeDefinedSymbol ident index arity :== { ds_ident = ident, ds_arity = arity, ds_index = index }