Proposal: remove datatype contexts from base

Ian Lynagh igloo at
Wed May 25 02:22:29 CEST 2011

On Tue, May 24, 2011 at 03:08:14PM +0100, Ross Paterson wrote:
> The Haskell' committee decided to remove datatype contexts from the language:
> (though this doesn't seem to be in the Report yet.)
> In the base package there are 4 of these:
>   Data/Complex.hs:data (RealFloat a) => Complex a
>   GHC/Arr.lhs:data Ix i => Array i e
>   GHC/Real.lhs:data  (Integral a)      => Ratio a = !a :% !a  deriving (Eq)
>   Control/Arrow.hs:newtype ArrowApply a => ArrowMonad a b = ArrowMonad (a () b)
> As far as I know, removing them won't break any code that compiles now,
> so let's do it.


I was going to make legacy copies in the haskell98 package with the
datatype contexts, but copying the Array type would mean copying lots of
unpleasant GHC code, and copying the Complex and Ratio types would mean
also going through and copying lots of instances, so I wimped out and
did nothing. So technically the haskell98 modules don't export precisely
the right types any more.


More information about the Libraries mailing list