Re: [Haskell] Types of when and unless in Control.Monad
 
            
            
            
            
                6 Jun
                
                    2012
                
            
            
                6 Jun
                
                '12
                
            
            
            
        
    
                4:56 a.m.
            
        On Jun 06, 2012, at 08:44 AM, Andreas Abel 
Well, but nothing in the type system prevents you from writing
mapM f xs >> cont
or
do mapM f xs cont
so you are not warned of a space leak in the common situations anyway,
At least the second form will trigger a warning in GHC (although admittedly not from the type system, but from -fwarn-unused-do-bind). It is a jolly useful warning at times. Regards, Malcolm
        4895
        
      
          Age (days ago)
        
      
        4895
        
    
          Last active (days ago)
        
        
        
        0 comments
    
    
        
        1 participants
    
    
    
    
    
    
    
    
    participants (1)
- 
                 malcolm.wallace malcolm.wallace