Changes between Version 2 and Version 3 of Ticket #114


Ignore:
Timestamp:
Nov 10, 2006 12:14:10 AM (8 years ago)
Author:
claus
Comment:

add a missing return in motivation, point 3; fix more formatting bugs

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #114 – Description

    v2 v3  
    8585  (|(Just x)-> x)  
    8686 
    87   \fresh->do { Just x <- fresh; return x }  
     87  \fresh->do { Just x <- return fresh; return x }  
    8888 
    8989  \fresh->case fresh of { Just x -> return x; _ -> fail "no match" } 
     
    171171model. if programmers make substantial use of this new functionality  
    172172in Haskell' (as I strongly suspect they will - I have been doing similar  
    173 translations by hand for some time now), it will be up to Haskell'' to  
     173translations by hand for some time now), it will be up to Haskell' ' to  
    174174turn the table, and to define the current complex model on top of a  
    175175compositional one.  
     
    181181 * the first directly builds on the existing, complex case constructs with their built-in (pattern) guards and match fall-through support; this eases adding the new, simpler features to implementations that support the old, complex ones (like GHC), but completely foregoes any attempt to simplify those implementations in the process; ''[the attached patch for GHC follows this route]'' 
    182182 
    183  * the second translation avoids any direct reference to case, employing do-notation instead; this requires slightly more effort, eg. in translating pattern guards into the match monad, but is eminently suitable for adding the new features to implementations that do not support pattern guards yet, or that simply want to reduce the number of built-in constructs. ''[patchers for Hugs, etc., might want to follow this route 
     183 * the second translation avoids any direct reference to case, employing do-notation instead; this requires slightly more effort, eg. in translating pattern guards into the match monad, but is eminently suitable for adding the new features to implementations that do not support pattern guards yet, or that simply want to reduce the number of built-in constructs. ''[patchers for Hugs, etc., might want to follow this route]'' 
    184184 
    185185finally, while it is not directly relevant for the present proposal,