Commit ea280135 authored by Ian Lynagh's avatar Ian Lynagh

Remove datatype contexts from base

The Haskell' committee decided to remove datatype contexts from the language:
http://www.haskell.org/pipermail/haskell-prime/2011-January/003335.html
parent 81443da0
......@@ -249,7 +249,7 @@ instance Monad m => ArrowApply (Kleisli m) where
-- | The 'ArrowApply' class is equivalent to 'Monad': any monad gives rise
-- to a 'Kleisli' arrow, and any instance of 'ArrowApply' defines a monad.
newtype ArrowApply a => ArrowMonad a b = ArrowMonad (a () b)
newtype ArrowMonad a b = ArrowMonad (a () b)
instance ArrowApply a => Monad (ArrowMonad a) where
return x = ArrowMonad (arr (\_ -> x))
......
......@@ -67,7 +67,7 @@ infix 6 :+
-- For a complex number @z@, @'abs' z@ is a number with the magnitude of @z@,
-- but oriented in the positive real direction, whereas @'signum' z@
-- has the phase of @z@, but unit magnitude.
data (RealFloat a) => Complex a
data Complex a
= !a :+ !a -- ^ forms a complex number from its real and imaginary
-- rectangular components.
# if __GLASGOW_HASKELL__
......
......@@ -355,13 +355,13 @@ type IPr = (Int, Int)
-- | The type of immutable non-strict (boxed) arrays
-- with indices in @i@ and elements in @e@.
data Ix i => Array i e
= Array !i -- the lower bound, l
!i -- the upper bound, u
!Int -- a cache of (rangeSize (l,u))
-- used to make sure an index is
-- really in range
(Array# e) -- The actual elements
data Array i e
= Array !i -- the lower bound, l
!i -- the upper bound, u
!Int -- a cache of (rangeSize (l,u))
-- used to make sure an index is
-- really in range
(Array# e) -- The actual elements
-- | Mutable, boxed, non-strict arrays in the 'ST' monad. The type
-- arguments are as follows:
......
......@@ -43,7 +43,7 @@ default () -- Double isn't available yet,
\begin{code}
-- | Rational numbers, with numerator and denominator of some 'Integral' type.
data (Integral a) => Ratio a = !a :% !a deriving (Eq)
data Ratio a = !a :% !a deriving (Eq)
-- | Arbitrary-precision rational numbers, represented as a ratio of
-- two 'Integer' values. A rational number may be constructed using
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment