From 77178cd2abf6774397259af547aec75ac07be26d Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 24 May 2008 07:44:16 +0000 Subject: sort records so that s field is first (use Macros.sortRec) --- src-3.0/GF/Compile/GrammarToGFCC.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-3.0/GF/Compile/GrammarToGFCC.hs') 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 -- cgit v1.2.3