X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeItbls.lhs;h=a05cfc1b63b97f81c1bb70ff4cb38ff449282f8b;hb=5bbb7af7ff683e60d99aaad3b78da034bf80cbc7;hp=9b2dac0618d6801b3ee6ce27badeef3b09154f53;hpb=cdce647711c0f46f5799b24de087622cb77e647f;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs index 9b2dac0..a05cfc1 100644 --- a/compiler/ghci/ByteCodeItbls.lhs +++ b/compiler/ghci/ByteCodeItbls.lhs @@ -6,6 +6,13 @@ ByteCodeItbls: Generate infotables for interpreter-made bytecodes \begin{code} {-# OPTIONS -optc-DNON_POSIX_SOURCE #-} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module ByteCodeItbls ( ItblEnv, ItblPtr(..), itblCode, mkITbls , StgInfoTable(..) ) where @@ -31,7 +38,6 @@ import Data.Bits ( Bits(..), shiftR ) import GHC.Exts ( Int(I#), addr2Int# ) import GHC.Ptr ( Ptr(..) ) -import GHC.Prim import Debug.Trace import Text.Printf @@ -117,7 +123,7 @@ make_constr_itbls cons , code = code #endif } - qNameCString <- newCString $ dataConIdentity dcon + qNameCString <- newArray0 0 $ dataConIdentity dcon let conInfoTbl = StgConInfoTable { conDesc = qNameCString, infoTable = itbl @@ -273,7 +279,7 @@ type HalfWord = Word16 #endif data StgConInfoTable = StgConInfoTable { - conDesc :: CString, + conDesc :: Ptr Word8, infoTable :: StgInfoTable }