diff options
| author | aarne <aarne@chalmers.se> | 2011-03-12 11:24:14 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2011-03-12 11:24:14 +0000 |
| commit | 7361ddea45727e80a79ba42af34e45f9641fc993 (patch) | |
| tree | e4f979850e31a630c42be93515dac7aa92a3c542 /src/compiler/GF/Compile | |
| parent | 3ddc29f2dcf57f46c1bd8ff5cc5ebbb910545afd (diff) | |
make it possible to override opers defined in an interface by syntax 'instance Foo of Bar - [f,g,h]'
Diffstat (limited to 'src/compiler/GF/Compile')
| -rw-r--r-- | src/compiler/GF/Compile/ReadFiles.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Update.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/ReadFiles.hs b/src/compiler/GF/Compile/ReadFiles.hs index 83f99ec17..68f16a5d8 100644 --- a/src/compiler/GF/Compile/ReadFiles.hs +++ b/src/compiler/GF/Compile/ReadFiles.hs @@ -178,7 +178,7 @@ importsOfModule (m,mi) = (modName m,depModInfo mi []) depModType (MTResource) xs = xs depModType (MTInterface) xs = xs depModType (MTConcrete m2) xs = modName m2:xs - depModType (MTInstance m2) xs = modName m2:xs + depModType (MTInstance (m2,_)) xs = modName m2:xs depExtends es xs = foldr depInclude xs es diff --git a/src/compiler/GF/Compile/Update.hs b/src/compiler/GF/Compile/Update.hs index b5f301e8b..1dcae722c 100644 --- a/src/compiler/GF/Compile/Update.hs +++ b/src/compiler/GF/Compile/Update.hs @@ -89,10 +89,10 @@ rebuildModule gr mo@(i,mi@(ModInfo mt stat fs_ me mw ops_ med_ js_)) = do ("module" +++ showIdent i +++ "has open interfaces and must therefore be declared incomplete") case mt of - MTInstance i0 -> do + MTInstance (i0,mincl) -> do m1 <- lookupModule gr i0 testErr (isModRes m1) ("interface expected instead of" +++ showIdent i0) - js' <- extendMod gr False (i0,const True) i (jments m1) (jments mi) + js' <- extendMod gr False (i0, isInherited mincl) i (jments m1) (jments mi) --- to avoid double inclusions, in instance I of I0 = J0 ** ... case extends mi of [] -> return $ replaceJudgements mi js' |
