From c5ab9649d99d742d0f992c08faa2ab8e4f4e2e4d Mon Sep 17 00:00:00 2001 From: Iavor Diatchki Date: Wed, 29 May 2019 12:53:50 -0700 Subject: [PATCH] Allow multiple fat arrows in schemas. The qualifiers from all arrows are combined into a single set. Fixes #599 --- src/Cryptol/Parser.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Cryptol/Parser.y b/src/Cryptol/Parser.y index 7dcb3a522..36ffec606 100644 --- a/src/Cryptol/Parser.y +++ b/src/Cryptol/Parser.y @@ -613,6 +613,10 @@ schema_vars :: { Located [TParam PName] } | '{' schema_params '}' { Located (rComb $1 $3) (reverse $2) } schema_quals :: { Located [Prop PName] } + : schema_quals schema_qual { at ($1,$2) $ fmap (++ thing $2) $1 } + | schema_qual { $1 } + +schema_qual :: { Located [Prop PName] } : type '=>' {% fmap (\x -> at (x,$2) x) (mkProp $1) } kind :: { Located Kind }