diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-12-20 19:53:05 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-12-20 19:53:05 +0000 |
commit | c7cc8467ca1835c8f96ccb5be7c976a26d262433 (patch) | |
tree | 007845bfd68c97ce88056912942617424c2f93a8 /src/Micro/Parser.hs | |
parent | 9ebeada35c00160b19161928be74e44093686985 (diff) | |
download | micro-lang-hs-c7cc8467ca1835c8f96ccb5be7c976a26d262433.tar.gz micro-lang-hs-c7cc8467ca1835c8f96ccb5be7c976a26d262433.zip |
Updated to use GHC 9.4.x and floating dependencies
Diffstat (limited to 'src/Micro/Parser.hs')
-rw-r--r-- | src/Micro/Parser.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Micro/Parser.hs b/src/Micro/Parser.hs index 48e1900..6b6fafb 100644 --- a/src/Micro/Parser.hs +++ b/src/Micro/Parser.hs @@ -10,19 +10,17 @@ import Data.Maybe (isJust) import Micro.Ast import Micro.Lexer import Text.Parsec -import qualified Text.Parsec.Expr as E +import Text.Parsec.Expr qualified as E import Text.Parsec.String (Parser) binary :: String -> Op -> E.Assoc -> E.Operator String () Identity Expr -binary s f assoc = +binary s f = E.Infix ( reservedOp s >> do -- FIXME: this is the second operand - pos <- getPosition - return $ BinOp f pos + BinOp f <$> getPosition ) - assoc opTable :: [[E.Operator String () Identity Expr]] opTable = |