Changes between Version 8 and Version 9 of Language/Overview/EffectSystem

Show
Ignore:
Timestamp:
08/26/10 01:56:35 (4 years ago)
Author:
benl (IP: 203.206.176.236)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Language/Overview/EffectSystem

    v8 v9  
    4040In 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. 
    4141 
    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`. 
     42Because 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`. 
    4343 
    4444{{{ 
     
    4747        ... 
    4848}}} 
     49 
     50This 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. 
    4951 
    5052== Extended type information ==