
12 Mar
2010
12 Mar
'10
6:13 a.m.
Ketil Malde
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.