Hi Neil,

This is awesome, thank you. :-) It found a 'use liftM', 'use on' and three eta-reduces in Yogurt.

It seems like the line numbers could be a bit more accurate:

./Network/Yogurt/IO.hs:54:3: Use liftM
Found:
  rec >>= return . (c :)
Why not:
  liftM (c :) rec

Where the code is:

50 -- Waits for input, but once the first character is read, waits
51 -- no longer than the specified number of ms before giving up.
52 hGetImpatientLine :: Handle -> Int -> IO String
53 hGetImpatientLine h patience = rec where
54   rec = do
55     c <- hGetChar h
56     if c == '\n'
57       then return [c]
58       else do
59         b <- hWaitForInput h patience
60         if b
61           then rec >>= return . (c:)
62           else return [c]

I imagine it could have told me to look at line 61 right away.

Thanks,

Martijn.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to