On Wed, May 21, 2014 at 12:45 AM, Miguel Mitrofanov <miguelimo38@yandex.ru> wrote:
Actually, something like

do ...
    if <- checkCondition
      then doReportSuccess
      else doReportFailure

as well as

do ...
    case <- generateResult of
      Nothing -> ...
      Just r -> ...

Yes, this looks like nice syntax sugar to me. And I gather that the recent (to me, anyway) lambda-case and lambda-if have abated the incromulence:

https://ghc.haskell.org/trac/ghc/ticket/4359

Quote: "The motivating examples seem to be of the form
getArgs >>= case of
            [] -> error "No args"
            fs -> doit fs
"
So

do ...
    case <- generateResult of
      Nothing -> ...
      Just r -> ...

becomes

do
    generateResult >>= \case
      Nothing -> ...
      Just r -> ...

Nevertheless, upward and onward to an even finer imperative language!

-- Kim-Ee