mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
prefix and postfix in lib Formal
This commit is contained in:
@@ -19,6 +19,11 @@ resource Formal = open Prelude in {
|
|||||||
infixn : Prec -> Str -> (_,_ : TermPrec) -> TermPrec = \p,f,x,y ->
|
infixn : Prec -> Str -> (_,_ : TermPrec) -> TermPrec = \p,f,x,y ->
|
||||||
mkPrec p (usePrec (nextPrec p) x ++ f ++ usePrec (nextPrec p) y) ;
|
mkPrec p (usePrec (nextPrec p) x ++ f ++ usePrec (nextPrec p) y) ;
|
||||||
|
|
||||||
|
prefix : Prec -> Str -> TermPrec -> TermPrec = \p,f,x ->
|
||||||
|
mkPrec p (f ++ usePrec p x) ;
|
||||||
|
postfix : Prec -> Str -> TermPrec -> TermPrec = \p,f,x ->
|
||||||
|
mkPrec p (usePrec p x ++ f) ;
|
||||||
|
|
||||||
-- auxiliaries, should not be needed so much
|
-- auxiliaries, should not be needed so much
|
||||||
|
|
||||||
usePrec : Prec -> TermPrec -> Str = \p,x ->
|
usePrec : Prec -> TermPrec -> Str = \p,x ->
|
||||||
|
|||||||
Reference in New Issue
Block a user