From 1682c4c5f216b009d6e06a3ede07c3b9d864dd15 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Tue, 24 Sep 2019 19:34:51 -0700 Subject: [PATCH] Fix inferred type for record projection (#1342) This ensures that record projection correctly sorts the fields in the inferred type This fixes the regression test in https://github.com/dhall-lang/dhall-lang/pull/750 --- dhall/src/Dhall/TypeCheck.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhall/src/Dhall/TypeCheck.hs b/dhall/src/Dhall/TypeCheck.hs index 6e435cc..849639e 100644 --- a/dhall/src/Dhall/TypeCheck.hs +++ b/dhall/src/Dhall/TypeCheck.hs @@ -1130,7 +1130,7 @@ infer typer = loop let adapt = VRecord . Dhall.Map.fromList - fmap adapt (traverse process (Dhall.Set.toList xs)) + fmap adapt (traverse process (Dhall.Set.toList (Dhall.Set.sort xs))) _ -> do let text =