diff options
| author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-06-27 09:15:39 +0000 |
|---|---|---|
| committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-06-27 09:15:39 +0000 |
| commit | 82282e8dc0599c105996fe2071b5439d50323225 (patch) | |
| tree | 9d534a8eaa89d77b4535438e9086b8cf0a4c8242 /compiler/utils | |
| parent | ff1cc262cf6bcac5a8f714c4aff5a4fd945cff73 (diff) | |
| download | haskell-82282e8dc0599c105996fe2071b5439d50323225.tar.gz | |
Remove some `undefined`s
These get annoying when `undefined` is actually used as placeholder in WIP code.
Some of these were also completely redundant (just call `deAnnotate'` instead of
`deAnnotate` etc.).
Diffstat (limited to 'compiler/utils')
| -rw-r--r-- | compiler/utils/BufWrite.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/utils/BufWrite.hs b/compiler/utils/BufWrite.hs index 48a2c4c940..eff57059de 100644 --- a/compiler/utils/BufWrite.hs +++ b/compiler/utils/BufWrite.hs @@ -64,9 +64,8 @@ bPutStr :: BufHandle -> String -> IO () bPutStr (BufHandle buf r hdl) !str = do i <- readFastMutInt r loop str i - where loop _ i | i `seq` False = undefined - loop "" i = do writeFastMutInt r i; return () - loop (c:cs) i + where loop "" !i = do writeFastMutInt r i; return () + loop (c:cs) !i | i >= buf_size = do hPutBuf hdl buf buf_size loop (c:cs) 0 |
