Re: In opposition of Functor as super-class of Monad

2011-01-04 Thread Martijn van Steenbergen
Method C: Define fmap in terms of bind instance Monad m => Functor (Iteratee el m) where fmap = liftM Now you need to do the inspection of Iteratee only once: in the definition of the bind. However, to use liftM as implementation of fmap the superclass constraint of the Functor instance ha

Re: Propsal: NoDatatypeContexts

2010-10-21 Thread Martijn van Steenbergen
+1 On Sunday, July 18, 2010, Ian Lynagh wrote: > > Hi all, > > H98 and H2010 allow a context to be given for datatypes, e.g. the > "Eq a" in > >    data Eq a => Foo a = Constr a > > I have made a proposal to remove support for that context (ticket #139). > More details are on the proposal wiki p

Re: PROPOSAL: Include record puns in Haskell 2011

2010-02-24 Thread Martijn van Steenbergen
Ian Lynagh wrote: I have a feeling I'm in the minority, but I find record punning an ugly feature. Given data T = C { f :: Int } we implicitly get f :: T -> Int which punning shadows with f :: Int whereas I generally avoid shadowing completely. I agree with Ian. Groetjes, Martijn