I recently encountered an error while using
threepenny-gui and it was solved by changing the code from pattern match in the do notation with <-
to pattern matching with the let notation.
Is there any reasons why I should expect a change in behavior when changing between these two forms of pattern matching?
Specifically the following code:
In the IO monad:
Just events <- Map.lookup elid <$> readMVar sElementEvents
was changed to:
mevents <- Map.lookup elid <$> readMVar sElementEvents
let Just events = mevents
Here is a link to the commit the fixed the problem for me: https://github.com/Davorak/threepenny-gui/commit/fbf6cbe25875fafdc64f7a111ddebf485b45143b
Additional platform details: os: 10.8.5 ghc: 7.6.3
edit: added the fact that this is happening the IO monad