adapt Precedence.gf to new syntax; bug fix in Swedish mkA

This commit is contained in:
aarne
2009-03-26 22:40:44 +00:00
parent 14f606449c
commit 76fb2055da
2 changed files with 17 additions and 12 deletions

View File

@@ -7,8 +7,8 @@ resource Precedence = open Prelude in {
param
Prec = p4 | p3 | p2 | p1 | p0 ;
lintype
PrecTerm = Prec => Str ;
oper
PrecTerm : Type = Prec => Str ;
oper
pss : PrecTerm -> {s : PrecTerm} = \s -> {s = s} ;
@@ -75,7 +75,7 @@ mkInfixR : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm =
-- alternative:
-- precedence as inherent feature
lintype TermWithPrec = {s : Str ; p : Prec} ;
oper TermWithPrec : Type = {s : Str ; p : Prec} ;
oper
mkpPrec : Str -> Prec -> TermWithPrec =
@@ -114,4 +114,4 @@ mkpInfixL : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
mkpInfixR : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
\f -> \p -> \x -> \y ->
mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y p) p ;
} ;
} ;