Custom Query (29 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (4 - 6 of 29)

1 2 3 4 5 6 7 8 9 10
Ticket Resolution Summary Owner Reporter
#35 fixed ForeignFunctionInterface chak@… ijones
Description

see ForeignFunctionInterface.

#24 fixed HierarchicalModules simonmar@… ijones
Description

See HierarchicalModules.

#113 superseded Joined-Up Classes none ashley@…
Description

Currently the Monad class is not a subclass of Functor. It should be.

Proposal:

  1. Add this:
      class (Functor f) => Idiom f where -- or Applicative
        return :: a -> f a
        ap :: f (a -> b) -> f a -> f b
        (>>) :: f a -> f b -> f b
        fa >> fb = ap (fmap (const id) fa) fb
    

(See also Control.Applicative in GHC HEAD.)

  1. Replace existing Monad class with this:
      class (Idiom m) => Monad m where
        (>>=) :: m a -> (a -> m b) -> m b
        fail :: String -> m a
        fail = error
    
  2. Remove existing "ap", generalise and remove redundant Prelude functions as appropriate.
1 2 3 4 5 6 7 8 9 10
Note: See TracQuery for help on using queries.