Changes between Version 8 and Version 9 of Language/Overview/EffectSystem
- Timestamp:
- 08/26/10 01:56:35 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Language/Overview/EffectSystem
v8 v9 40 40 In this type, `!e1` is an ''effect variable'', much like `a` is a type variable. `!Console` is an ''effect constructor'' that tells us what else happens when `putStr` is called, besides returning a unit value. 41 41 42 Because this second version of `putStr` doesn't have the monad in its type, we can just use the plain version of `map` and not have to worry about `mapM`.42 Because this second version of `putStr` doesn't have the monad in its type, in most cases we can just use the plain version of `map` and not have to worry about `mapM`. 43 43 44 44 {{{ … … 47 47 ... 48 48 }}} 49 50 This isn't to say that the `Monad` type class is not useful, and Disciple supports it as well. However, when writing Haskell programs we've found that most uses of `Monad` are to manage the internal state of the program. When writing Disciple programs we use effects for most state-based functions, and reserve `Monad` for things that a definitely use a different notion of sequence, like parser combinators. 49 51 50 52 == Extended type information ==
