Closed Ciantic closed 6 years ago
Also found in another haskell file with a similar problem:
Error reformatting Main.hs: <interactive>: 125: 19: Parse error: x-u hfmt.exe: app\Main.hs:(71,1)-(73,41): Non-exhaustive patterns in function sourceChangedOrHasSuggestions
type PointInSpace = (Float, Float)
(.-) , (.+) :: PointInSpace -> PointInSpace -> PointInSpace
(x,y) .- (u,v) = (x-u,y-v)
(x,y) .+ (u,v) = (x+u,y+v)
It started working when I added spaces (x-u to x - u, ...)
This should be be fixed in 0.2.0: https://hackage.haskell.org/package/hfmt-0.2.0
Any errors encountered during formatting would previously have run in to that non-exhaustive pattern error, thanks for catching and reporting. Such errors should now be nicely printed out, so if you run into an error again feel free to open a new issue with the hopefully much improved error message.
I'm getting error from HFMT.exe
<interactive>: 29: 20: Parse error: group hfmt.EXE: app\Main.hs:(71,1)-(73,41): Non-exhaustive patterns in function sourceChangedOrHasSuggestions