summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Compile/GrammarToGFCC.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-05-24 07:44:16 +0000
committeraarne <aarne@cs.chalmers.se>2008-05-24 07:44:16 +0000
commit77178cd2abf6774397259af547aec75ac07be26d (patch)
treea39604a037485d64577d38bf4f12f4b786f5a57a /src-3.0/GF/Compile/GrammarToGFCC.hs
parent1eb1d7e055ce91e4e972079c906deb24ebbf2fbd (diff)
sort records so that s field is first (use Macros.sortRec)
Diffstat (limited to 'src-3.0/GF/Compile/GrammarToGFCC.hs')
-rw-r--r--src-3.0/GF/Compile/GrammarToGFCC.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src-3.0/GF/Compile/GrammarToGFCC.hs b/src-3.0/GF/Compile/GrammarToGFCC.hs
index 928180973..2aad8bb05 100644
--- a/src-3.0/GF/Compile/GrammarToGFCC.hs
+++ b/src-3.0/GF/Compile/GrammarToGFCC.hs
@@ -399,7 +399,7 @@ term2term cgr env@(labels,untyps,typs) tr = case tr of
App _ _ -> mkValCase (unrec tr)
QC _ _ -> mkValCase tr
R rs -> R [(mkLab i, (Nothing, t2t t)) |
- (i,(l,(_,t))) <- zip [0..] (sort (unlock rs))]
+ (i,(l,(_,t))) <- zip [0..] (GM.sortRec (unlock rs))]
P t l -> r2r tr
PI t l i -> EInt $ toInteger i
@@ -529,7 +529,7 @@ notlock (l, t) = case t of --- need not look at l
_ -> True
unlockTy ty = case ty of
- RecType ls -> RecType $ sort [(l, unlockTy t) | (l,t) <- ls, notlock (l,t)]
+ RecType ls -> RecType $ GM.sortRec [(l, unlockTy t) | (l,t) <- ls, notlock (l,t)]
_ -> GM.composSafeOp unlockTy ty