cvs commit: fptools/ghc/compiler/typecheck TcSimplify.lhs
Ross Paterson
ross at soi.city.ac.uk
Fri May 20 11:35:57 EDT 2005
Simon Peyton Jones <simonpj at haskell.org> writes:
> The H98 defaulting rules are these. Group constraints of the form (C v),
> for some particular type variable v. Then default v if
>
> a) v appears only in this group (no implicit params or D [v])
> b) at least one of the C's is numeric
> c) all the C's are standard
>
> GHCi changed rules (b) to
>
> (b') at least one of the C's is numeric, or Eq,Ord,Show
>
> This commit further liberalises GHCi to change (c):
>
> (c') any of the C's are standard
>
> Otherwise the existence of a non-standard class (e.g. Random) is enough
> to kill defaulting altogether.
The wording for (c) in the Report is "all of these classes are defined
in the Prelude or a standard library", which would include Random, I
think.
More information about the Cvs-ghc
mailing list