Changes between Version 1 and Version 2 of StandardClasses


Ignore:
Timestamp:
Sep 3, 2006 2:49:00 PM (9 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StandardClasses

    v1 v2  
    1212 * The default definitions of `enum`* would make more sense if `toEnum` and `fromEnum` used `Integer` instead of `Int`.
    1313
     14== The Functor class ==
     15Proposal:
     16 * Add instances for `((->) a)`, `((,) a)` and `Either a`.
     17
    1418== The Monad class ==
    1519Issues:
    1620 * Monads are really functors, but programmers can't always assume that `fmap` is defined for them, and so must use `liftM` instead.
    1721   Similarly, code parameterized by `Functor` cannot be used with monads.
     22 * The `fail` method was added to the class in Haskell 98 to implement pattern match failure in `do` expressions.
     23   However the assumption that errors are strings can be problematic (e.g. cf the `Error` class in [http://www.haskell.org/ghc/docs/6.4-latest/html/libraries/mtl/Control-Monad-Error.html Control.Monad.Error], or for internationalization).
    1824
    1925Proposals:
     26 * Add instance for `((->) a)`.
    2027 * Make `Functor` a superclass of `Monad`.
    2128   This would impose an extra burden on those who just want to define a `Monad`.