Changes between Version 22 and Version 23 of Languages/Haskell


Ignore:
Timestamp:
Nov 13, 2018, 9:05:18 AM (15 months ago)
Author:
schiptsov
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Languages/Haskell

    v22 v23  
    6262See also [wiki:/Kundalini]
    6363
     64== Side Effects ==
     65So called "actions", usually instances of a {{{Monad}}}, are descriptions of ''side-effects'' which will be performed ''eventually'' by the runtime.
     66
     67"Actions" don't do anything until they are sequenced appropriately using a ''do-notation'' expression (a ''syntactic sugar''), which implicitly serializes actions using ''nesting of function calls'' (this is how a function composition is actually implemented) - the only way to ensure the evaluation order in a lazy language - by producing a ''single expression of nested function application'' (like {{{\x -> \y -> x + y}}}, which, unsurprisingly, looks like ''currying'') to be ''eventually'' evaluated.
     68
     69The Haskell runtime runs the {{{main}}} function to get this description of all your effects, and then runs the effects per your instructions.
     70
    6471== Unnecessary wrapping ==
    6572Haskell in the hands of narcissistic idiots is famous for unnecessary wrapping of everything into everything - unnecessary ''type-classes'', more and more general monads, etc. Tooling is not an exception.