Skip to content
  • Simon Peyton Jones's avatar
    Make tcg_dus behave more sanely; fixes a mkUsageInfo panic · b2d9ef84
    Simon Peyton Jones authored
    The tcg_dus field used to contain *uses* of type and class decls,
    but not *defs*.  That was inconsistent, and it really went wrong
    for Template Haskell bracket.  What happened was that
     foo = [d| data A = A
           	   f :: A -> A
           	   f x = x |]
    would find a "use" of A when processing the top level of the module,
    which in turn led to a mkUsageInfo panic in MkIface.  The cause was
    the fact that the tcg_dus for the nested quote didn't have defs for
    A.
    b2d9ef84