Me too, for (A)!  (B) looks too ugly for me.  A type declaration should
refer to the "most local" definition of the name.  I think of the type
declaration, though optional, as being _part of_ the definition, so the
name should look the same.

Btw, why would one declare the type of a function defined outside the
current module?  For documentation only?  I would just use a comment if
that's the case.  IMHO, if allowed, such declarations should always have
to be qualified to avoid confusion.

Matt

P.S.   M.reverse line corrected below.

> > Since it's a Haskell 98 issue, I am in favour of (A):
> >
> >       reverse :: [a] -> [a]
> >       reverse xs      =  Prelude.reverse (tail xs)
> >
> > Alternative (B) looks rather ugly:
> >
> >       M.reverse       :: [a] -> [a]
> >       reverse xs      =  Prelude.reverse (tail xs)
> >
> > Cheers, Ralf
> 
> I completely agree.
> 
> Erik

Reply via email to