
Hi, I have a question, what's the best way to program? - put all the signatures in the Haskell Code? - Only put the type signatures needed to compile (like monomorphism errors or ambiguous signature)? Until now, I prefer the second one, but when I use the -Wall option, there's a lot of complains about type signature. Maybe the type signature is something that not need to be checked as a warning. But if the best practice is to put all the signatures, I found that Cabal generated code need to be fixed, because -Wall complains about it also. -- Thanks, Luis Cabellos,

On Dec 5, 2007 7:43 AM, Luis Cabellos
Hi,
I have a question, what's the best way to program? - put all the signatures in the Haskell Code? - Only put the type signatures needed to compile (like monomorphism errors or ambiguous signature)?
Until now, I prefer the second one, but when I use the -Wall option, there's a lot of complains about type signature. Maybe the type signature is something that not need to be checked as a warning.
But if the best practice is to put all the signatures, I found that Cabal generated code need to be fixed, because -Wall complains about it also.
Hi Luis, I don't know what the best way to program is, but I usually put signatures on all functions. I think it often helps get smarter error messages from the compiler. ;-) So I like the warning about missing signatures. If you don't like it you can disable it like this: -Wall -fno-warn-missing-signatures or maybe use -W instead of -Wall, apparently the warn-missing-signatures is not comprised in the -W flag. Cheers, Olivier.

Am Mittwoch, 5. Dezember 2007 13:43 schrieb Luis Cabellos:
Hi,
I have a question, what's the best way to program? - put all the signatures in the Haskell Code? - Only put the type signatures needed to compile (like monomorphism errors or ambiguous signature)?
Until now, I prefer the second one, but when I use the -Wall option, there's a lot of complains about type signature. Maybe the type signature is something that not need to be checked as a warning.
But if the best practice is to put all the signatures, I found that Cabal generated code need to be fixed, because -Wall complains about it also.
Inserting all type signatures is definitely best practice. Best wishes, Wolfgang
participants (3)
-
Luis Cabellos
-
Olivier Boudry
-
Wolfgang Jeltsch