I have 3 wishes for Haskell (specially Hugs)
1.- Show "some" Warnings
-------------------------
Hugs only reports when a program is wrong, but it could also
try to detect common mistakes and report them as warnings.
Of course, there are a lot of possible warnings, but it would be
nice to include the most common (I can't be more precise)
As an example, suppose you write a long program and you define:
> f = "First definition . . . ."
And you define two or more pages below a second and different
(while type correct) definition for f
> f = "Second definition . . ."
Suppose that:
1.- You load the program and it compiles
2.- When you run it, it crashes!
3.- You don't remember the first definition of 'f'
and you try to repair the second definition
4.- and you go back a little more desperate to step (1)
. . .
The Hugs system could help the programmer with a little warning telling
that f's definition was repeated
2.- Try to recover from the first error
---------------------------------------
Hugs could give a list of [line number]-[error message] instead
of reporting only the first error.
3.- Type-check incomplete programs
-----------------------------------
It would be useful to check if your code is type correct without having all
the definitions, assuming only that when a function is not defined, the type
declaration is right.
As an example, suppose you want to define the following function:
> f :: TypeA -> TypeB
And you have a module with the function g :: TypeA -> TypeC
Then, you could try to check if the following incomplete program is type
correct
> f = h . g
>
> h :: TypeC -> TypeB
>
Without supplying the definition of h
Best Regards, Jose E. Labra
http://lsi.uniovi.es/~labra