]> git.unchartedbackwaters.co.uk Git - francis/ofc.git/commitdiff
Make power operator right associative.
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Fri, 21 Sep 2012 00:04:05 +0000 (01:04 +0100)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Fri, 21 Sep 2012 00:04:05 +0000 (01:04 +0100)
OFC/Parser.hs

index 6469ccea6a0c6721b13e813e0357534c958aadc6..29f893be286eb333a072df0e8bda3bef2db6885f 100644 (file)
@@ -39,7 +39,7 @@ TokenParser {
 } = makeTokenParser oflDef
 
 oflOperatorTable :: OperatorTable String st Identity Expression
-oflOperatorTable = [[Infix  (do _ <- lSymbol "^"; return Power) AssocLeft],
+oflOperatorTable = [[Infix  (do _ <- lSymbol "^"; return Power) AssocRight],
                     [Prefix (do _ <- lSymbol "-"; return Negate)],
                     [Infix  (do _ <- lSymbol "*"; return Multiply) AssocLeft
                     ,Infix  (do _ <- lSymbol "/"; return Divide) AssocLeft],