Why Nostr? What is Njump?
2025-04-15 14:46:08
in reply to

Andres Löh on Nostr: nprofile1q…4rs4v This is tricky because it mixes behaviour specific to GHCi with ...

This is tricky because it mixes behaviour specific to GHCi with the Haskell IO semantics. Typing `x <- action` in GHCi executes the action and binds its result to `x` for further use. As the type of `putStrLn "hello"` is `IO ()`, the result of that action is always `()`.

The GHCi syntax is reminiscent of the syntax used in do blocks, where `do x <- action1; somethingElse x` gets desugared to `action1 >>= \ x -> somethingElse x`.
Author Public Key
npub1q8tuxwdxkr54fv08qrs2yja0e3u0tyju69qje6ht9fldlagre8dqwymqnn