1
0
forked from GitHub/gf-core

prefix and postfix in lib Formal

This commit is contained in:
aarne
2010-08-30 09:34:45 +00:00
parent d3e7095ceb
commit 59c341b9ed

View File

@@ -19,6 +19,11 @@ resource Formal = open Prelude in {
infixn : Prec -> Str -> (_,_ : TermPrec) -> TermPrec = \p,f,x,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
usePrec : Prec -> TermPrec -> Str = \p,x ->