mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-10 03:32:51 -06:00
adapt Precedence.gf to new syntax; bug fix in Swedish mkA
This commit is contained in:
@@ -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 ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user