18 Jan
2017
18 Jan
'17
2:58 a.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