[Haskell-cafe] Combine `StateT` and `InputT` to maintain state on Ctrl-C interrupt

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Wed Aug 12 15:15:33 UTC 2015

On Wed, Aug 12, 2015 at 04:26:59PM +0200, haskell at stefan-klinger.de wrote:
> Version two: `InputT` inside `StateT`
> > main :: IO ()
> > main = runInputT defaultSettings . noesc $ evalStateT repl 0

Instead of this, how about `hoist`ing noesc inside the StateT?

(I would have tried this myself but it would be too fiddly to reconstitute
working code from your email.)


More information about the Haskell-Cafe mailing list