forked from GitHub/gf-core
lincat typecheck and abstract-interface extension fixed
This commit is contained in:
@@ -214,6 +214,7 @@ checkCncInfo gr m (a,abs) (c,info) = do
|
|||||||
-- cat for cf, typ for pe
|
-- cat for cf, typ for pe
|
||||||
|
|
||||||
CncCat (Yes typ) mdef mpr -> chIn "linearization type of" $ do
|
CncCat (Yes typ) mdef mpr -> chIn "linearization type of" $ do
|
||||||
|
checkErr $ lookupCatContextSrc gr a c
|
||||||
typ' <- checkIfLinType gr typ
|
typ' <- checkIfLinType gr typ
|
||||||
mdef' <- case mdef of
|
mdef' <- case mdef of
|
||||||
Yes def -> do
|
Yes def -> do
|
||||||
|
|||||||
@@ -93,6 +93,9 @@ moduleDeps ms = mapM deps ms where
|
|||||||
|
|
||||||
-- check for superficial compatibility, not submodule relation etc: what can be extended
|
-- check for superficial compatibility, not submodule relation etc: what can be extended
|
||||||
compatMType mt0 mt = case (mt0,mt) of
|
compatMType mt0 mt = case (mt0,mt) of
|
||||||
|
(MTResource, MTConcrete _) -> True
|
||||||
|
(MTInstance _, MTConcrete _) -> True
|
||||||
|
(MTInterface, MTAbstract) -> True
|
||||||
(MTConcrete _, MTConcrete _) -> True
|
(MTConcrete _, MTConcrete _) -> True
|
||||||
(MTInstance _, MTInstance _) -> True
|
(MTInstance _, MTInstance _) -> True
|
||||||
(MTReuse _, MTReuse _) -> True
|
(MTReuse _, MTReuse _) -> True
|
||||||
|
|||||||
@@ -343,16 +343,20 @@ isModTrans m = case mtype m of
|
|||||||
_ -> False
|
_ -> False
|
||||||
|
|
||||||
sameMType :: Eq i => ModuleType i -> ModuleType i -> Bool
|
sameMType :: Eq i => ModuleType i -> ModuleType i -> Bool
|
||||||
sameMType m n = case (m,n) of
|
sameMType m n = case (n,m) of
|
||||||
(MTConcrete _, MTConcrete _) -> True
|
(MTConcrete _, MTConcrete _) -> True
|
||||||
|
|
||||||
(MTInstance _, MTInstance _) -> True
|
(MTInstance _, MTInstance _) -> True
|
||||||
(MTInstance _, MTResource) -> True
|
(MTInstance _, MTResource) -> True
|
||||||
(MTInstance _, MTInterface) -> True
|
(MTInstance _, MTConcrete _) -> True
|
||||||
(MTResource, MTInstance _) -> True
|
|
||||||
(MTResource, MTInterface) -> True
|
(MTInterface, MTInstance _) -> True
|
||||||
(MTAbstract, MTInterface) -> True -- for reuse
|
(MTInterface, MTResource) -> True -- for reuse
|
||||||
(MTConcrete _, MTResource) -> True -- for reuse
|
(MTInterface, MTAbstract) -> True -- for reuse
|
||||||
(MTInterface,MTResource) -> True
|
|
||||||
|
(MTResource, MTInstance _) -> True
|
||||||
|
(MTResource, MTConcrete _) -> True -- for reuse
|
||||||
|
|
||||||
_ -> m == n
|
_ -> m == n
|
||||||
|
|
||||||
-- | don't generate code for interfaces and for incomplete modules
|
-- | don't generate code for interfaces and for incomplete modules
|
||||||
|
|||||||
Reference in New Issue
Block a user