From: simonpj@microsoft.com Date: Fri, 12 Nov 2010 17:44:39 +0000 (+0000) Subject: More modules that need LANGUAGE BangPatterns X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5289f5d85610f71625a439747a09384876655eb5 More modules that need LANGUAGE BangPatterns --- diff --git a/compiler/basicTypes/Unique.lhs b/compiler/basicTypes/Unique.lhs index 6e0ee20..4180604 100644 --- a/compiler/basicTypes/Unique.lhs +++ b/compiler/basicTypes/Unique.lhs @@ -16,6 +16,7 @@ Some of the other hair in this code is to be able to use a Haskell). \begin{code} +{-# LANGUAGE BangPatterns #-} module Unique ( -- * Main data types Unique, Uniquable(..), diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x index a5defb6..50e9aea 100644 --- a/compiler/cmm/CmmLex.x +++ b/compiler/cmm/CmmLex.x @@ -11,6 +11,7 @@ ----------------------------------------------------------------------------- { +{-# LANGUAGE BangPatterns #-} {-# OPTIONS -Wwarn -w #-} -- The above -Wwarn supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix diff --git a/compiler/ghci/ByteCodeLink.lhs b/compiler/ghci/ByteCodeLink.lhs index 7d94d2c..b1f7e39 100644 --- a/compiler/ghci/ByteCodeLink.lhs +++ b/compiler/ghci/ByteCodeLink.lhs @@ -4,6 +4,7 @@ ByteCodeLink: Bytecode assembler and linker \begin{code} +{-# LANGUAGE BangPatterns #-} {-# OPTIONS -optc-DNON_POSIX_SOURCE #-} {-# OPTIONS -w #-} diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index c8a5378..07179b8 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -32,6 +32,7 @@ { -- XXX The above flags turn off warnings in the generated code: +{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} diff --git a/compiler/profiling/CostCentre.lhs b/compiler/profiling/CostCentre.lhs index 2648d1e..9e08831 100644 --- a/compiler/profiling/CostCentre.lhs +++ b/compiler/profiling/CostCentre.lhs @@ -10,7 +10,7 @@ -- any warnings in the module. See -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details -{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE BangPatterns, DeriveDataTypeable #-} module CostCentre ( CostCentre(..), CcName, IsDupdCC(..), IsCafCC(..), diff --git a/compiler/utils/Pretty.lhs b/compiler/utils/Pretty.lhs index 3c00398..317022d 100644 --- a/compiler/utils/Pretty.lhs +++ b/compiler/utils/Pretty.lhs @@ -152,6 +152,7 @@ Relative to John's original paper, there are the following new features: \begin{code} +{-# LANGUAGE BangPatterns #-} {-# OPTIONS -fno-warn-unused-imports #-} -- XXX GHC 6.9 seems to be confused by unpackCString# being used only in -- a RULE diff --git a/compiler/utils/StringBuffer.lhs b/compiler/utils/StringBuffer.lhs index 869cb8a..5d1bfa6 100644 --- a/compiler/utils/StringBuffer.lhs +++ b/compiler/utils/StringBuffer.lhs @@ -6,6 +6,7 @@ Buffers for scanning string input stored in external arrays. \begin{code} +{-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected