#5249: Non-understandable comment in compiler/main/GHC.hs
---------------------------------+------------------------------------------
    Reporter:  dterei            |       Owner:              
        Type:  task              |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.1               |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 the file [[GhcFile(compiler/main/GHC.hs)]] contains a comment that
 follows:

 {{{
 -- | Request information about a loaded 'Module'
 getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo)  -- XXX:
 Maybe X
 getModuleInfo mdl = withSession $ \hsc_env -> do
   let mg = hsc_mod_graph hsc_env
   if mdl `elem` map ms_mod mg
         then liftIO $ getHomeModuleInfo hsc_env (moduleName mdl)
         else do
   {- if isHomeModule (hsc_dflags hsc_env) mdl
         then return Nothing
         else -} liftIO $ getPackageModuleInfo hsc_env mdl
    -- getPackageModuleInfo will attempt to find the interface, so
    -- we don't want to call it for a home module, just in case there
    -- was a problem loading the module and the interface doesn't
    -- exist... hence the isHomeModule test here.  (ToDo: reinstate)
 }}}

 Neither myself or Simon M know what the comment means. We should figure it
 out and fix up this code and comment accordingly. The XXX: Maybe X doesn't
 make sense either.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5249>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to