aboutsummaryrefslogtreecommitdiff
path: root/frontend/syntax.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r--frontend/syntax.dcl18
1 files changed, 11 insertions, 7 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index cfae612..bdbaecd 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -176,12 +176,15 @@ cIsNotAFunction :== False
:: FunKind = FK_Function !Bool | FK_Macro | FK_Caf | FK_NodeDefOrFunction | FK_Unknown
+:: StrictnessList = NotStrict | Strict !Int | StrictList !Int StrictnessList
+
cNameNotLocationDependent :== False
cNameLocationDependent :== True
:: ParsedSelector =
{ ps_field_name :: !Ident
, ps_selector_name :: !Ident
+ , ps_field_annotation :: !Annotation
, ps_field_type :: !AType
, ps_field_var :: !Ident
, ps_field_pos :: !Position
@@ -192,6 +195,7 @@ cNameLocationDependent :== True
, pc_cons_arity :: !Int
, pc_exi_vars :: ![ATypeVar]
, pc_arg_types :: ![AType]
+ , pc_args_strictness :: !StrictnessList
, pc_cons_prio :: !Priority
, pc_cons_pos :: !Position
}
@@ -814,6 +818,7 @@ cNonRecursiveAppl :== False
:: SymbolType =
{ st_vars :: ![TypeVar]
, st_args :: ![AType]
+ , st_args_strictness :: !StrictnessList
, st_arity :: !Int
, st_result :: !AType
, st_context :: ![TypeContext]
@@ -829,7 +834,6 @@ cNonRecursiveAppl :== False
:: AType =
{ at_attribute :: !TypeAttribute
- , at_annotation :: !Annotation
, at_type :: !Type
}
@@ -838,6 +842,7 @@ cNonRecursiveAppl :== False
:: Type = TA !TypeSymbIdent ![AType]
+ | TAS !TypeSymbIdent ![AType] !StrictnessList
| (-->) infixr 9 !AType !AType
| TArrow /* (->) */
| TArrow1 !AType /* ((->) a) */
@@ -924,7 +929,6 @@ cNonRecursiveAppl :== False
:: ATypeVar =
{ atv_attribute :: !TypeAttribute
- , atv_annotation :: !Annotation
, atv_variable :: !TypeVar
}
@@ -939,7 +943,7 @@ cNonRecursiveAppl :== False
, av_info_ptr :: !AttrVarInfoPtr
}
-:: Annotation = AN_Strict | AN_None
+:: Annotation = AN_Strict | AN_None
:: BasicType = BT_Int | BT_Char | BT_Real | BT_Bool | BT_Dynamic
| BT_File | BT_World
@@ -1322,8 +1326,8 @@ EmptyTypeDefInfo :== { tdi_kinds = [], tdi_properties = cAllBitsClear, tdi_group
MakeTypeVar name :== { tv_name = name, tv_info_ptr = nilPtr }
MakeVar name :== { var_name = name, var_info_ptr = nilPtr, var_expr_ptr = nilPtr }
-MakeAttributedType type :== { at_attribute = TA_None, at_annotation = AN_None, at_type = type }
-MakeAttributedTypeVar type_var :== { atv_attribute = TA_None, atv_annotation = AN_None, atv_variable = type_var }
+MakeAttributedType type :== { at_attribute = TA_None, at_type = type }
+MakeAttributedTypeVar type_var :== { atv_attribute = TA_None, atv_variable = type_var }
EmptyFunInfo :== { fi_calls = [], fi_group_index = NoIndex, fi_def_level = NotALevel,
fi_free_vars = [], fi_local_vars = [], fi_dynamics = [], fi_properties=0 }
@@ -1345,12 +1349,12 @@ MakeTypeSymbIdent type_index name arity
ParsedSelectorToSelectorDef sd_type_index ps :==
{ sd_symb = ps.ps_selector_name, sd_field_nr = NoIndex, sd_pos = ps.ps_field_pos, sd_type_index = sd_type_index,
sd_exi_vars = [], sd_type_ptr = nilPtr, sd_field = ps.ps_field_name,
- sd_type = { st_vars = [], st_args = [], st_result = ps.ps_field_type, st_arity = 0, st_context = [],
+ sd_type = { st_vars = [], st_args = [], st_args_strictness=NotStrict, st_result = ps.ps_field_type, st_arity = 0, st_context = [],
st_attr_env = [], st_attr_vars = [] }}
ParsedConstructorToConsDef pc :==
{ cons_symb = pc.pc_cons_name, cons_pos = pc.pc_cons_pos, cons_priority = pc.pc_cons_prio, cons_index = NoIndex, cons_type_index = NoIndex,
- cons_type = { st_vars = [], st_args = pc.pc_arg_types, st_result = MakeAttributedType TE,
+ cons_type = { st_vars = [], st_args = pc.pc_arg_types, st_args_strictness=pc.pc_args_strictness, st_result = MakeAttributedType TE,
st_arity = pc.pc_cons_arity, st_context = [], st_attr_env = [], st_attr_vars = []},
cons_exi_vars = pc.pc_exi_vars, cons_type_ptr = nilPtr, cons_arg_vars = [] }