Skip to content
  • pcapriotti's avatar
    Improve definition of forever (#5205) · b3ef6457
    pcapriotti authored
    The previous implementation was:
    
        forever a = a >> forever a
    
    which can create a space leak in some cases, even with optimizations.
    The current implementation:
    
        forever a = let a' = a >> a' in a'
    
    prevents repeated thunk allocations by creating a single thunk for the
    final result, even without optimizations.
    b3ef6457