From 5ece8bbb9193a05c9cb60080e7162b16cd899da3 Mon Sep 17 00:00:00 2001 From: Iavor Diatchki Date: Fri, 15 Jul 2022 17:52:15 +0300 Subject: [PATCH] Correct the order of declaratoins in functors. Fixes #1385 --- src/Cryptol/TypeCheck/Monad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cryptol/TypeCheck/Monad.hs b/src/Cryptol/TypeCheck/Monad.hs index 8a13cc154..4f70d5dc4 100644 --- a/src/Cryptol/TypeCheck/Monad.hs +++ b/src/Cryptol/TypeCheck/Monad.hs @@ -947,7 +947,7 @@ endSubmodule = case iScope rw of x@Module { mName = SubModule m } : y : more -> rw { iScope = z : more } where - x1 = x { mName = m } + x1 = x { mName = m, mDecls = reverse (mDecls x) } isFun = isParametrizedModule x1