WIP associate postproc

corecursive
This commit is contained in:
crumbtoo
2024-02-07 15:19:03 -07:00
parent 98bed84807
commit 2a51daf356
2 changed files with 64 additions and 5 deletions

View File

@@ -1,7 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms, ViewPatterns, ImplicitParams #-}
module Rlp.Parse.Associate
{-# WARNING "temporarily unimplemented" #-}
( associate
)
where
@@ -14,6 +11,20 @@ import Rlp.Parse.Types
import Rlp.Syntax
--------------------------------------------------------------------------------
associate x y = y
{-# WARNING associate "temporarily undefined" #-}
associate :: OpTable -> RlpExpr' RlpcPs -> RlpExpr' RlpcPs
associate pt e = undefined
examplePrecTable :: OpTable
examplePrecTable = H.fromList
[ ("+", (InfixL,6))
, ("*", (InfixL,7))
, ("^", (InfixR,8))
, (".", (InfixR,7))
, ("~", (Infix, 9))
, ("=", (Infix, 4))
, ("&&", (Infix, 3))
, ("||", (Infix, 2))
, ("$", (InfixR,0))
, ("&", (InfixL,0))
]