Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dreixel committed Jan 15, 2013
1 parent ba7affb commit 0e5b68e
Show file tree
Hide file tree
Showing 188 changed files with 8,053 additions and 6,271 deletions.
58 changes: 0 additions & 58 deletions compiler/basicTypes/BasicTypes.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ module BasicTypes(
EP(..),
HsBang(..), isBanged, isMarkedUnboxed,
StrictnessMark(..), isMarkedStrict,
DefMethSpec(..),
SwapFlag(..), flipSwap, unSwap,
Expand Down Expand Up @@ -572,61 +569,6 @@ instance Outputable OccInfo where
| otherwise = empty
\end{code}

%************************************************************************
%* *
Strictness indication
%* *
%************************************************************************

The strictness annotations on types in data type declarations
e.g. data T = MkT !Int !(Bool,Bool)

\begin{code}
-------------------------
-- HsBang describes what the *programmer* wrote
-- This info is retained in the DataCon.dcStrictMarks field
data HsBang = HsNoBang
| HsStrict
| HsUnpack -- {-# UNPACK #-} ! (GHC extension, meaning "unbox")
| HsUnpackFailed -- An UNPACK pragma that we could not make
-- use of, because the type isn't unboxable;
-- equivalant to HsStrict except for checkValidDataCon
| HsNoUnpack -- {-# NOUNPACK #-} ! (GHC extension, meaning "strict but not unboxed")
deriving (Eq, Data, Typeable)
instance Outputable HsBang where
ppr HsNoBang = empty
ppr HsStrict = char '!'
ppr HsUnpack = ptext (sLit "{-# UNPACK #-} !")
ppr HsUnpackFailed = ptext (sLit "{-# UNPACK (failed) #-} !")
ppr HsNoUnpack = ptext (sLit "{-# NOUNPACK #-} !")
isBanged :: HsBang -> Bool
isBanged HsNoBang = False
isBanged _ = True
isMarkedUnboxed :: HsBang -> Bool
isMarkedUnboxed HsUnpack = True
isMarkedUnboxed _ = False
-------------------------
-- StrictnessMark is internal only, used to indicate strictness
-- of the DataCon *worker* fields
data StrictnessMark = MarkedStrict | NotMarkedStrict
instance Outputable StrictnessMark where
ppr MarkedStrict = ptext (sLit "!")
ppr NotMarkedStrict = empty
isMarkedStrict :: StrictnessMark -> Bool
isMarkedStrict NotMarkedStrict = False
isMarkedStrict _ = True -- All others are strict
\end{code}


%************************************************************************
%* *
Default method specfication
Expand Down
Loading

0 comments on commit 0e5b68e

Please sign in to comment.