From bc6b51d70a783df161f8fb43264ea1558ff37bac Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Thu, 16 Jan 2020 19:14:22 +0000 Subject: Allow effects on mappings --- src/parser.mly | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/parser.mly') diff --git a/src/parser.mly b/src/parser.mly index 0b09468c..6a579b7a 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -657,9 +657,13 @@ typschm: | Forall typquant Dot typ MinusGt typ Effect effect_set { (fun s e -> mk_typschm $2 (mk_typ (ATyp_fn ($4, $6, $8)) s e) s e) $startpos $endpos } | typ Bidir typ - { (fun s e -> mk_typschm mk_typqn (mk_typ (ATyp_bidir ($1, $3)) s e) s e) $startpos $endpos } + { (fun s e -> mk_typschm mk_typqn (mk_typ (ATyp_bidir ($1, $3, mk_typ (ATyp_set []) s e)) s e) s e) $startpos $endpos } | Forall typquant Dot typ Bidir typ - { (fun s e -> mk_typschm $2 (mk_typ (ATyp_bidir ($4, $6)) s e) s e) $startpos $endpos } + { (fun s e -> mk_typschm $2 (mk_typ (ATyp_bidir ($4, $6, mk_typ (ATyp_set []) s e)) s e) s e) $startpos $endpos } + | typ Bidir typ Effect effect_set + { (fun s e -> mk_typschm mk_typqn (mk_typ (ATyp_bidir ($1, $3, $5)) s e) s e) $startpos $endpos } + | Forall typquant Dot typ Bidir typ Effect effect_set + { (fun s e -> mk_typschm $2 (mk_typ (ATyp_bidir ($4, $6, $8)) s e) s e) $startpos $endpos } typschm_eof: | typschm Eof -- cgit v1.2.3