Permalink
Browse files

Move lazy from GHC.Base to GHC.Magic

  • Loading branch information...
1 parent 5334361 commit 14cddc1487bd735e01b96a5cb99f8fd1f9c9f1c7 @igfoo igfoo committed Nov 13, 2012
Showing with 2 additions and 12 deletions.
  1. +2 −11 GHC/Base.lhs
  2. +0 −1 GHC/Exts.hs
View
@@ -99,6 +99,7 @@ module GHC.Base
module GHC.Base,
module GHC.Classes,
module GHC.CString,
+ module GHC.Magic,
module GHC.Types,
module GHC.Prim, -- Re-export GHC.Prim and GHC.Err, to avoid lots
module GHC.Err -- of people having to import it explicitly
@@ -108,6 +109,7 @@ module GHC.Base
import GHC.Types
import GHC.Classes
import GHC.CString
+import GHC.Magic
import GHC.Prim
import {-# SOURCE #-} GHC.Err
import {-# SOURCE #-} GHC.IO (failIO)
@@ -510,17 +512,6 @@ maxInt = I# 0x7FFFFFFFFFFFFFFF#
id :: a -> a
id x = x
--- | The call '(lazy e)' means the same as 'e', but 'lazy' has a
--- magical strictness property: it is lazy in its first argument,
--- even though its semantics is strict.
-lazy :: a -> a
-lazy x = x
--- Implementation note: its strictness and unfolding are over-ridden
--- by the definition in MkId.lhs; in both cases to nothing at all.
--- That way, 'lazy' does not get inlined, and the strictness analyser
--- sees it as lazy. Then the worker/wrapper phase inlines it.
--- Result: happiness
-
-- Assertion function. This simply ignores its boolean argument.
-- The compiler may rewrite it to @('assertError' line)@.
View
@@ -64,7 +64,6 @@ import Prelude
import GHC.Prim
import GHC.Base
-import GHC.Magic
import GHC.Word
import GHC.Int
import GHC.Ptr

0 comments on commit 14cddc1

Please sign in to comment.