[ ghc-Bugs-721511 ] Non-exhaustive patterns in ParseMonad.hs

SourceForge.net noreply at sourceforge.net
Mon Apr 14 20:40:20 EDT 2003


Bugs item #721511, was opened at 2003-04-14 17:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=721511&group_id=8032

Category: hslibs/hssource
Group: 5.04.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Bryn Keller (xoltar)
Assigned to: Nobody/Anonymous (nobody)
Summary: Non-exhaustive patterns in ParseMonad.hs

Initial Comment:
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.




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=721511&group_id=8032



More information about the Glasgow-haskell-bugs mailing list