Changes between Version 14 and Version 15 of Language/Overview/EffectSystem
- Timestamp:
- 08/26/10 02:03:05 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Language/Overview/EffectSystem
v14 v15 59 59 }}} 60 60 61 The variables starting with `%` are region variables, and the type `(List %r0 a)` represents a list in a region of memory called `%r0` andhas 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.61 The 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. 62 62 63 63 The 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.
