Proposal: die to System.Exit (and/or Prelude)

Andreas Abel andreas.abel at ifi.lmu.de
Mon Dec 16 13:57:30 UTC 2013


On 14.12.2013 12:54, Simon Hengel wrote:
>      main :: IO ()
>      main = getContents >>= either die run . parseInput

Funny way to write a pipeline.  Its neither left-to-right, which would be

   getContents >>= (parseInput >>> either die run)

nor right-to-left:

   either die run . parseInput =<< getContents

A case for hlint.
So much for my smart-ass comments.

About "(to) die or not (to) die" I am rather agnostic.
-1 for adding it to the Prelude.

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/


More information about the Libraries mailing list