[Haskell-cafe] Refactoring status

Henning Thielemann lemming at henning-thielemann.de
Fri Jan 4 15:46:38 EST 2008


On Fri, 4 Jan 2008, Peter Verswyvelen wrote:

> > It's already possible to write
> > asTypeOf ::
> >     a   {- ^ the input value to be passed through -}
> >  -> a   {- ^ the value is ignored, but the type is unified with the first
> parameter -}
> >  -> a   {- ^ the value of the first parameter -}
>
> Nice. Still using "first parameter" though ;-)

This was the problem I mentioned earlier.

I tend to write comments like

{- | @asTypeOf x y@  returns the value of @x@, while the types of @x@ and @y@ are unified   -}
asTypeOf :: a -> a -> a


This way I can introduce parameter names for the reader.


More information about the Haskell-Cafe mailing list