[Haskell-beginners] GHC warnings
Emanuel Koczwara
poczta at emanuelkoczwara.pl
Sat Feb 23 22:25:35 CET 2013
Hi,
Why GHC doesn't tell me such things like hpaste? (example here:
http://hpaste.org/82917)
27:12: Error: Use replicateM
Found:
sequence $ replicate gridSize getLine
Why not:
Control.Monad.replicateM gridSize getLine
50:14: Warning: Use list comprehension
Found:
if y > 0 then [(UP, (x, y - 1))] else []
Why not:
[(UP, (x, y - 1)) | y > 0]
81:1: Error: Eta reduce
Found:
sortByPathCost p ps = sortBy compareHeuristic ps
Why not:
sortByPathCost p = sortBy compareHeuristic
Can I enable this kind of verbosity in GHC somehow?
Emanuel
More information about the Beginners
mailing list