summaryrefslogtreecommitdiff
path: root/src/GF/Compile/Rebuild.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-09-15 14:36:27 +0000
committeraarne <unknown>2004-09-15 14:36:27 +0000
commita25ee154e760a424ef4aef46a6e3d6fdf1079cf1 (patch)
tree50315c6fe03325fca09e1a922172de111faa7639 /src/GF/Compile/Rebuild.hs
parent7697b222d0b7053e4b955a6ab9ba2ad0d6c9c512 (diff)
introducing multiple inheritance
Diffstat (limited to 'src/GF/Compile/Rebuild.hs')
-rw-r--r--src/GF/Compile/Rebuild.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GF/Compile/Rebuild.hs b/src/GF/Compile/Rebuild.hs
index 048af3c7c..491c9c9f2 100644
--- a/src/GF/Compile/Rebuild.hs
+++ b/src/GF/Compile/Rebuild.hs
@@ -34,12 +34,14 @@ rebuildModule ms mo@(i,mi) = do
js' <- extendMod False i0 (jments m1) (jments m)
--- to avoid double inclusions, in instance I of I0 = J0 ** ...
case extends m of
- Nothing -> return $ replaceJudgements m js'
- Just j0 -> do
+ [] -> return $ replaceJudgements m js'
+ j0:jj -> do
m0 <- lookupModMod gr j0
let notInM0 c = not $ isInBinTree (fst c) $ mapTree fst $ jments m0
let js2 = sorted2tree $ filter notInM0 $ tree2list js'
- return $ replaceJudgements m js2
+ if null jj
+ then return $ replaceJudgements m js2
+ else Bad "FIXME: handle multiple inheritance in instance"
return $ ModMod m'
_ -> return mi