FIX #3079, dodgy parsing of LANGUAGE pragmas 2009-03-13
authorSimon Marlow <marlowsd@gmail.com>
Thu, 12 Mar 2009 14:11:03 +0000 (14:11 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 12 Mar 2009 14:11:03 +0000 (14:11 +0000)
commitc197fe602ed4aadf09affe0cdc18e7158d262012
tree9547c1d169510e0b3c5e19539981fd6ad3d83975
parentc5e9e31045f8f96a87c0d0793af33cb83c3da5d7
FIX #3079, dodgy parsing of LANGUAGE pragmas
I ended up rewriting this horrible bit of code, using (yikes) lazy I/O
to slurp in the source file a chunk at a time.  The old code tried to
read the file a chunk at a time, but failed with LANGUAGE pragmas
because the parser for LANGUAGE has state and the state wasn't being
saved between chunks.  We're still closing the Handle eagerly, so
there shouldn't be any problems here.
compiler/main/HeaderInfo.hs