Skip to content
  • Matthew Pickering's avatar
    b66cf8ad
    Fix infinite looping in hptSomeModulesBelow · b66cf8ad
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    When compiling Agda we entered into an infinite loop as the stopping
    condition was a bit wrong in hptSomeModulesBelow.
    
    The bad situation was something like
    
    * We would see module A (NotBoot) and follow it dependencies
    * Later on we would encounter A (Boot) and follow it's dependencies,
      because the lookup would not match A (NotBoot) and A (IsBoot)
    * Somewhere in A (Boot)s dependencies, A (Boot) would appear again and
      lead us into an infinite loop.
    
    Now the state marks whether we have been both variants (IsBoot and
    NotBoot) so we don't follow dependencies for A (Boot) many times.
    b66cf8ad
    Fix infinite looping in hptSomeModulesBelow
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    When compiling Agda we entered into an infinite loop as the stopping
    condition was a bit wrong in hptSomeModulesBelow.
    
    The bad situation was something like
    
    * We would see module A (NotBoot) and follow it dependencies
    * Later on we would encounter A (Boot) and follow it's dependencies,
      because the lookup would not match A (NotBoot) and A (IsBoot)
    * Somewhere in A (Boot)s dependencies, A (Boot) would appear again and
      lead us into an infinite loop.
    
    Now the state marks whether we have been both variants (IsBoot and
    NotBoot) so we don't follow dependencies for A (Boot) many times.
Loading