[Haskell-cafe] Removing polymorphism from type classes (viz. Functor) (Again)

Stephen Tetley stephen.tetley at gmail.com
Sat Aug 14 15:27:51 EDT 2010


The non-type-changing map can be implemented as a type class - in my
graphics lib Wumpus, I call it pointwise:

class Pointwise  sh where
  type Pt sh :: *
  pointwise :: (Pt sh -> Pt sh) -> sh -> sh

I think other people have posted it to the cafe under a different
name, before I did:

http://www.haskell.org/pipermail/haskell-cafe/2010-July/079784.html

If I was doing Wumpus again though, I'd probably do with Pointwise.

Best wishes

Stephen


More information about the Haskell-Cafe mailing list