Non-exhaustive patterns in ParseMonad.hs
Running this code:
import Language.Haskell.Parser
import System.Environment (getArgs)
parseFile s = do
file <- readFile s
case parseModule file of
ParseOk m -> putStrLn "Parsed!"
ParseFailed loc s -> putStrLn $ "Parse
error at " ++ (show loc) ++ ": " ++ s
main = do
[fileName] <- getArgs
parseFile fileName
on this file (on Windows 2000) :
-- Right xs -> print xs
produces this error at runtime:
Fail: Language/Haskell/ParseMonad.hs:143:
Non-exhaustive patterns in lambda
The original file to be parsed contained some other
things too, but this one line turned out to be the
cause of the problem.
Trac metadata
Trac field |
Value |
Version |
5.04.3 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
hslibs/hssource |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|