Changes between Version 6 and Version 7 of Language/Overview/EffectSystem

Show
Ignore:
Timestamp:
06/17/10 02:56:30 (4 years ago)
Author:
benl (IP: 129.94.242.38)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Language/Overview/EffectSystem

    v6 v7  
    4949 
    5050== Extended type information == 
    51 From the previous example, it might look as though we've lost the information that `putStr` has an effect and descended into the quagmire of untracked side effects and imperative programming. This would be true if `map` only had the simple type that it does in Haskell (or ML), because there'd be no way to track the fact that the ''application'' of `map` also causes a `!Console` effect like its argument does. However, during type inference DDC performs an effect analysis on the program and can determine that this code also writes to the screen. Although you don't usually see it in source programs, the "extended" type of map is: 
     51From the previous example, it might look as though we've lost the information that `putStr` has an effect and descended into the quagmire of untracked side effects and imperative programming. This would be true if `map` only had the simple type that it does in Haskell (or ML), because there'd be no way to track the fact that the ''application'' of `map` also causes a `!Console` effect like its argument does. However, during type inference DDC performs an effect analysis on the program and can determine that this code also writes to the screen. Although you usually don't see it in source programs, the "extended" type of map is: 
    5252 
    5353{{{