Changes between Version 14 and Version 15 of Language/Overview/EffectSystem

Show
Ignore:
Timestamp:
08/26/10 02:03:05 (4 years ago)
Author:
benl (IP: 203.206.176.236)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Language/Overview/EffectSystem

    v14 v15  
    5959}}} 
    6060 
    61 The variables starting with `%` are region variables, and the type `(List %r0 a)` represents a list in a region of memory called `%r0` and has elements of type `a`. The ''effect sum''  `!{!Read %r0; !e0}` records the fact that the `map` function, when applied to both its arguments, has the effect of reading the input list as well as doing whatever the argument function does. 
     61The variables starting with `%` are region variables, and the type `(List %r0 a)` represents a list in a region of memory called `%r0` which has elements of type `a`. The ''effect sum''  `!{!Read %r0; !e0}` records the fact that the `map` function, when applied to both its arguments, has the effect of reading the input list as well as doing whatever the argument function does. 
    6262 
    6363The Disciplined Disciple Compiler (DDC) uses this ''effect discipline'' to track which parts of the program cause computational effects and which are pure. This allows it to check the type safety of programs that use these effects, and to perform the same sort of code transformation style optimizations as done by other Haskell compilers such as GHC.