summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Update.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Compile/Update.hs')
-rw-r--r--src/compiler/GF/Compile/Update.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/Update.hs b/src/compiler/GF/Compile/Update.hs
index 4c1520961..143a4f96f 100644
--- a/src/compiler/GF/Compile/Update.hs
+++ b/src/compiler/GF/Compile/Update.hs
@@ -109,8 +109,9 @@ rebuildModule cwd gr mo@(i,mi@(ModInfo mt stat fs_ me mw ops_ med_ msrc_ env_ js
-- add the instance opens to an incomplete module "with" instances
Just (ext,incl,ops) -> do
let (infs,insts) = unzip ops
- let stat' = ifNull MSComplete (const MSIncomplete)
- [i | i <- is, notElem i infs]
+ let stat' = if all (flip elem infs) is
+ then MSComplete
+ else MSIncomplete
unless (stat' == MSComplete || stat == MSIncomplete)
(checkError ("module" <+> i <+> "remains incomplete"))
ModInfo mt0 _ fs me' _ ops0 _ fpath _ js <- lookupModule gr ext