This commit is contained in:
Iavor S. Diatchki 2017-10-05 15:52:50 -07:00
parent 4e65ad03f9
commit 13ac2d9f05
2 changed files with 8 additions and 1 deletions

View File

@ -217,7 +217,8 @@ qualifiedEnv me = fold $
newtype LoadedModules = LoadedModules
{ getLoadedModules :: [LoadedModule]
} deriving (Show, Generic, NFData)
-- ^ Invariant: All the dependencies of any module `m` must precede `m` in the list.
-- ^ Invariant: All the dependencies of any module `m` must precede `m`
-- in the list.
instance Monoid LoadedModules where
mempty = LoadedModules []

View File

@ -59,6 +59,12 @@ data Module = Module { mName :: !ModName
, mDecls :: [DeclGroup]
} deriving (Show, Generic, NFData)
isParametrizedModule :: Module -> Bool
isParametrizedModule m = not (null (mParamTypes m) &&
null (mParamConstraints m) &&
null (mParamFuns m))
data Expr = EList [Expr] Type -- ^ List value (with type of elements)