From 5b645ab42fcf2b5ae5d193b4af9cb30746470b1e Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Tue, 28 Jun 2022 14:34:56 +0200 Subject: [PATCH] normalForm should also sort the fields in a record type --- src/compiler/GF/Compile/Compute/Concrete.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/GF/Compile/Compute/Concrete.hs b/src/compiler/GF/Compile/Compute/Concrete.hs index 020b09439..aede6b7aa 100644 --- a/src/compiler/GF/Compile/Compute/Concrete.hs +++ b/src/compiler/GF/Compile/Compute/Concrete.hs @@ -133,7 +133,7 @@ eval env (Prod b x t1 t2)[] = do v1 <- eval env t1 [] return (VProd b x v1 (VClosure env t2)) eval env (Typed t ty) vs = eval env t vs eval env (RecType lbls) [] = do lbls <- mapM (\(lbl,ty) -> fmap ((,) lbl) (eval env ty [])) lbls - return (VRecType lbls) + return (VRecType (sortRec lbls)) eval env (R as) [] = do as <- mapM (\(lbl,(_,t)) -> fmap ((,) lbl) (newThunk env t)) as return (VR as) eval env (P t lbl) vs = do v <- eval env t []