Require a bang pattern when unlifted types are where/let bound; #3182
[ghc-hetmet.git] / compiler / cmm / CmmParse.y
index 9382994..9df499e 100644 (file)
@@ -7,7 +7,7 @@
 -----------------------------------------------------------------------------
 
 {
-{-# OPTIONS -w #-}
+{-# OPTIONS -Wwarn #-}
 -- 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
@@ -52,6 +52,7 @@ import FastString
 import Panic
 import Constants
 import Outputable
+import BasicTypes
 import Bag              ( emptyBag, unitBag )
 
 import Control.Monad
@@ -202,7 +203,7 @@ static      :: { ExtFCode [CmmStatic] }
        | 'CLOSURE' '(' NAME lits ')'
                { do lits <- sequence $4;
                     return $ map CmmStaticLit $
-                       mkStaticClosure (mkForeignLabel $3 Nothing True)
+                       mkStaticClosure (mkForeignLabel $3 Nothing True IsData)
                          -- mkForeignLabel because these are only used
                          -- for CHARLIKE and INTLIKE closures in the RTS.
                         dontCareCCS (map getLit lits) [] [] [] }
@@ -247,7 +248,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                -- ptrs, nptrs, closure type, description, type
                { do prof <- profilingInfo $11 $13
                     return (mkRtsEntryLabelFS $3,
-                       CmmInfoTable prof (fromIntegral $9)
+                       CmmInfoTable False prof (fromIntegral $9)
                                     (ThunkInfo (fromIntegral $5, fromIntegral $7) NoC_SRT),
                        []) }
        
@@ -255,7 +256,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                -- ptrs, nptrs, closure type, description, type, fun type
                { do prof <- profilingInfo $11 $13
                     return (mkRtsEntryLabelFS $3,
-                       CmmInfoTable prof (fromIntegral $9)
+                       CmmInfoTable False prof (fromIntegral $9)
                                     (FunInfo (fromIntegral $5, fromIntegral $7) NoC_SRT
                                      0  -- Arity zero
                                      (ArgSpec (fromIntegral $15))
@@ -269,7 +270,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                -- ptrs, nptrs, closure type, description, type, fun type, arity
                { do prof <- profilingInfo $11 $13
                     return (mkRtsEntryLabelFS $3,
-                       CmmInfoTable prof (fromIntegral $9)
+                       CmmInfoTable False prof (fromIntegral $9)
                                     (FunInfo (fromIntegral $5, fromIntegral $7) NoC_SRT (fromIntegral $17)
                                      (ArgSpec (fromIntegral $15))
                                      zeroCLit),
@@ -284,7 +285,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                     -- but that's the way the old code did it we can fix it some other time.
                     desc_lit <- code $ mkStringCLit $13
                     return (mkRtsEntryLabelFS $3,
-                       CmmInfoTable prof (fromIntegral $11)
+                       CmmInfoTable False prof (fromIntegral $11)
                                     (ConstrInfo (fromIntegral $5, fromIntegral $7) (fromIntegral $9) desc_lit),
                        []) }
        
@@ -292,7 +293,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                -- selector, closure type, description, type
                { do prof <- profilingInfo $9 $11
                     return (mkRtsEntryLabelFS $3,
-                       CmmInfoTable prof (fromIntegral $7)
+                       CmmInfoTable False prof (fromIntegral $7)
                                     (ThunkSelectorInfo (fromIntegral $5) NoC_SRT),
                        []) }
 
@@ -300,7 +301,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                -- closure type (no live regs)
                { do let infoLabel = mkRtsInfoLabelFS $3
                     return (mkRtsRetLabelFS $3,
-                       CmmInfoTable (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
+                       CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
                                     (ContInfo [] NoC_SRT),
                        []) }
 
@@ -308,7 +309,7 @@ info        :: { ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]) }
                -- closure type, live regs
                { do live <- sequence (map (liftM Just) $7)
                     return (mkRtsRetLabelFS $3,
-                       CmmInfoTable (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
+                       CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
                                     (ContInfo live NoC_SRT),
                        live) }
 
@@ -824,7 +825,7 @@ newLocal ty name = do
 -- PIC code for them.
 newImport :: FastString -> ExtFCode ()
 newImport name
-   = addVarDecl name (CmmLit (CmmLabel (mkForeignLabel name Nothing True)))
+   = addVarDecl name (CmmLit (CmmLabel (mkForeignLabel name Nothing True IsFunction)))
 
 newLabel :: FastString -> ExtFCode BlockId
 newLabel name = do