[project @ 2000-10-13 16:36:21 by simonpj]
[ghc-hetmet.git] / ghc / compiler / basicTypes / Module.lhs
index 61e6251..9266c58 100644 (file)
@@ -21,7 +21,7 @@ in a different DLL, by setting the DLL flag.
 \begin{code}
 module Module 
     (
-      Module, mod_name, mod_kind
+      Module, moduleName, mod_kind
                            -- abstract, instance of Eq, Ord, Outputable
     , ModuleName
     , ModuleKind(..)
@@ -94,11 +94,16 @@ as the one being compiled, i.e. a home module.  @InPackage@ means one
 from a different package.
 
 \begin{code}
+data Module = Module ModuleName ModuleKind
+
 data ModuleKind
    = SourceOnly FilePath            -- .hs
    | ObjectCode FilePath FilePath   -- .o, .hi
    | InPackage  PackageName
 
+moduleName (Module m _) = m
+moduleKind (Module _ k) = k
+
 isLocalModuleKind (InPackage _) = False
 isLocalModuleKind _             = True
 
@@ -192,13 +197,6 @@ mkSysModuleNameFS s = ModuleName s
 \end{code}
 
 \begin{code}
-data Module = Module ModuleName ModuleKind
-
-mod_name (Module nm kind) = nm
-mod_kind (Module nm kind) = kind
-\end{code}
-
-\begin{code}
 instance Outputable Module where
   ppr = pprModule
 
@@ -312,4 +310,4 @@ rngModuleEnv        = eltsUFM
 unitModuleEnv       = unitUFM
 isEmptyModuleEnv    = isNullUFM
 foldModuleEnv       = foldUFM
-\end{code}
\ No newline at end of file
+\end{code}