diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-04-21 09:45:58 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-04-21 09:45:58 +0000 |
commit | 56f147d470b4ea26dd279554eb71cf419579bce4 (patch) | |
tree | e55e8fe603afb5a05018cb872935ae3af9955a59 /compiler | |
parent | 709c9ce0ec4ecaabc1e4ee0f05dbad87fc6aca4d (diff) | |
download | haskell-56f147d470b4ea26dd279554eb71cf419579bce4.tar.gz |
FIX #3153: we lost an EOF sentinel in the event of a lexical error
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/HeaderInfo.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs index 89f4661fd9..0fd62f5a68 100644 --- a/compiler/main/HeaderInfo.hs +++ b/compiler/main/HeaderInfo.hs @@ -123,8 +123,9 @@ lazyGetToks dflags filename handle = do _other -> do rest <- lazyLexBuf handle state' eof return (t : rest) _ | not eof -> getMore handle state - | otherwise -> return [] - + | otherwise -> return [L (last_loc state) ITeof] + -- parser assumes an ITeof sentinel at the end + getMore :: Handle -> PState -> IO [Located Token] getMore handle state = do -- pprTrace "getMore" (text (show (buffer state))) (return ()) |