From: simonpj Date: Fri, 30 Aug 2002 14:29:52 +0000 (+0000) Subject: [project @ 2002-08-30 14:29:51 by simonpj] X-Git-Tag: nhc98-1-18-release~884 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c0c7d71b8e9dfc2d05e714c07d54f99479dcbf62;p=ghc-base.git [project @ 2002-08-30 14:29:51 by simonpj] * Do not export built-in syntax (H98 conformance) * Add 'assert' to GHC.Base (no need to merge to stable branch) --- diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 6a307fd..e3bc346 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -86,7 +86,7 @@ Other Prelude modules are much easier with fewer complex dependencies. module GHC.Base ( module GHC.Base, - module GHC.Prim, -- Re-export GHC.Prim and GHC.Err, to avoid lots + module GHC.Prim, -- Re-export GHC.Prim and GHC.Err, to avoid lots module GHC.Err -- of people having to import it explicitly ) where @@ -595,6 +595,11 @@ id x = x lazy :: a -> a lazy x = x +-- Assertion function. This simply ignores its boolean argument. +-- The compiler may rewrite it to (assertError line) +assert :: Bool -> a -> a +assert pred r = r + -- constant function const :: a -> b -> a const x _ = x diff --git a/GHC/List.lhs b/GHC/List.lhs index 426fad0..99c1b5b 100644 --- a/GHC/List.lhs +++ b/GHC/List.lhs @@ -15,7 +15,7 @@ ----------------------------------------------------------------------------- module GHC.List ( - [] (..), + -- [] (..), -- Not Haskell 98; built in syntax map, (++), filter, concat, head, last, tail, init, null, length, (!!), diff --git a/GHC/PArr.hs b/GHC/PArr.hs index 7e0f732..a1e3deb 100644 --- a/GHC/PArr.hs +++ b/GHC/PArr.hs @@ -72,7 +72,7 @@ -- module GHC.PArr ( - [::], -- abstract + -- [::], -- Built-in syntax mapP, -- :: (a -> b) -> [:a:] -> [:b:] (+:+), -- :: [:a:] -> [:a:] -> [:a:] diff --git a/Prelude.hs b/Prelude.hs index b833edb..60ae545 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -24,12 +24,12 @@ module Prelude ( Ordering(..), Char, String, Int, Integer, Float, Double, IO, Rational, - []((:), []), + -- []((:), []), -- Not legal Haskell 98; available through built-in syntax module Data.Tuple, -- Includes tuple types + fst, snd, curry, uncurry - ()(..), -- The unit type - (->), -- functions + -- ()(..), -- Not legal Haskell 98 + -- (->), -- ... available through built-in syntax -- * Basic type classes Eq(..),