[Haskell-cafe] Refactoring status

Emil Axelsson emax at cs.chalmers.se
Mon Jan 7 04:54:02 EST 2008

One approach to programming in Haskell, which I use all the time, is to write 
the type signature before the function body. This means that if I'm trying to do 
something strange, I will often be warned by the type checker even before I've 
written the strange code.

But I've also been bitten by the problem of having to change a lot of type 
signatures just because I want to e.g. show an overloaded variable.

/ Emil

On 2008-01-04 19:19, Peter Verswyvelen wrote:
> Yes, sometimes it is neccerary to give an explicit type. But in so many
> cases, type inference works fine no? What I usually do, is use the GHCi t:
> command, copy/paste that in my code, and then make the type signature more
> specific if it has to be. It's often funny to see how generic the code
> really is :) 

More information about the Haskell-Cafe mailing list