[Haskell-cafe] Re: If wishes were horses...

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Fri Mar 12 06:13:47 EST 2010

Ketil Malde <ketil <at> malde.org> writes:

> > Prelude Data.List> :t foldl
> > foldl :: (a -> b -> a) -> a -> [b] -> a
> What should the type look like?  

Good question - and in my posting I tried to avoid the impression
that I have an answer, because I really haven't.

My suggestion was that some of the annotations that are currently
hidden in ghc interface files, could perhaps be lifted to source level
(so the programmer can write down the properties she expects).

Perhaps an analogy could be "mode" annotations for Prolog?

I agree that "this must have been discussed before",
and I'd appreciate some pointers.

More information about the Haskell-Cafe mailing list