Commit ab34e1ea authored by Mike Ledger's avatar Mike Ledger

fix parsing

parent e6061d6a
......@@ -53,11 +53,11 @@ data MapExpr
parseMapExpr :: Parser MapExpr
parseMapExpr =
buildExpressionParser
[ [ binary "*" Intersection AssocLeft
, binary "*." LongIntersection AssocLeft
[ [ binary "*." LongIntersection AssocLeft
, binary "*" Intersection AssocLeft
]
, [ binary "+" Union AssocRight
, binary "+." LongUnion AssocRight
, [ binary "+." LongUnion AssocRight
, binary "+" Union AssocRight
, binary "-" Difference AssocLeft
]
]
......@@ -159,7 +159,7 @@ interpret me0 v = go me0
DocNum i -> v V.! (i - 1)
Union a b -> Map.union (go a) (go b)
Difference a b -> Map.difference (go a) (go b)
Intersection a b -> Map.difference (go a) (go b)
Intersection a b -> Map.intersection (go a) (go b)
LongUnion a b -> Map.unionWith mappend (go a) (go b)
LongIntersection a b -> Map.intersectionWith mappend (go a) (go b)
......
Markdown is supported
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