17 Jan
2017
17 Jan
'17
1:28 p.m.
thanks and what is the purpose of
fail _ = nothing
’fail’ is called for pattern match errors, pretty much the error you’ve got from ’Just x <- ...’. The IO Monad instance raises the exception you've seen. For the Maybe Monad instance just 'Nothing' is returned. Greetings, Daniel