Skip to content
  • batterseapower's avatar
    Attempt to detect loops through imported function RULEs · 83d9b380
    batterseapower authored
    This is motivated by the fact that before this change marking e.g.
    GHC.List.filter as INLINABLE caused the compiler to diverge when
    you tried to make use of the function.
    
    The response is to say that a RULE on an imported function introduces
    a dependency edge between the FVs of its LHS and RHS for the purposes
    of computing loop breakers. This will not perfectly prevent all those
    potential inlinings that could cause the compiler to non-terminate,
    but it works well enough for the particular case we are interested in.
    83d9b380