[project @ 1997-09-05 16:23:41 by simonpj]
[ghc-hetmet.git] / ghc / compiler / prelude / PrelInfo.lhs
index 37de70c..5b84197 100644 (file)
@@ -52,15 +52,16 @@ import TysWiredIn
 -- others:
 import SpecEnv         ( SpecEnv )
 import RdrHsSyn                ( RdrName(..), varQual, tcQual, qual )
+import BasicTypes      ( IfaceFlavour )
 import Id              ( GenId, SYN_IE(Id) )
-import Name            ( Name, OccName(..), DefnInfo(..), Provenance(..),
+import Name            ( Name, OccName(..), Provenance(..),
                          getName, mkGlobalName, modAndOcc )
 import Class           ( Class(..), GenClass, classKey )
 import TyCon           ( tyConDataCons, mkFunTyCon, TyCon )
 import Type
 import Bag
 import Unique          -- *Key stuff
-import UniqFM          ( UniqFM, listToUFM, Uniquable(..) ) 
+import UniqFM          ( UniqFM, listToUFM ) 
 import Util            ( isIn )
 \end{code}
 
@@ -250,7 +251,8 @@ Ids, Synonyms, Classes and ClassOps with builtin keys.
 
 \begin{code}
 mkKnownKeyGlobal :: (RdrName, Unique) -> Name
-mkKnownKeyGlobal (Qual mod occ, uniq) = mkGlobalName uniq mod occ VanillaDefn Implicit
+mkKnownKeyGlobal (Qual mod occ hif, uniq)
+  = mkGlobalName uniq mod occ (Implicit hif)
 
 allClass_NAME    = mkKnownKeyGlobal (allClass_RDR,   allClassKey)
 main_NAME       = mkKnownKeyGlobal (main_RDR,       mainKey)
@@ -492,7 +494,12 @@ deriving_occ_info
                         showParen_RDR, showSpace_RDR, showList___RDR])
     , (readClassKey,   [intTyCon_RDR, numClass_RDR, ordClass_RDR, append_RDR, 
                         lex_RDR, readParen_RDR, readList___RDR])
-    , (ixClassKey,     [intTyCon_RDR, numClass_RDR, and_RDR, map_RDR, enumFromTo_RDR])
+    , (ixClassKey,     [intTyCon_RDR, numClass_RDR, and_RDR, map_RDR, enumFromTo_RDR, 
+                        returnM_RDR, zeroM_RDR])
+                            -- the last two are needed to force returnM, thenM and zeroM
+                            -- in before typechecking the list(monad) comprehension
+                            -- generated for derived Ix instances (range method)
+                            -- of single constructor types.  -- SOF 8/97
     ]
        -- intTyCon: Practically any deriving needs Int, either for index calculations, 
        --              or for taggery.