Skip to content
  • Simon Marlow's avatar
    Use names like '$fOrdInt' for dfuns (and TF instances), rather than '$f21' · a6f29db0
    Simon Marlow authored
    2 reasons for this:
      - compilation is more predictable.  Adding or removing an instance
        is less likely to force unnecessary recompilation due to
        renumbering other dfun names.
      - it makes it easier to read Core / C-- / asm
    
    The names aren't completely deterministic.  To do that, we'd have to
    include package and module names, which would make the symbol names
    long and reduce readability.  So the compromise is that if there's a
    clash, we disambiguate by adding an integer suffix.  This is fairly
    unlikely in practice unless you're using overlapping instances.
    
    Type family instances are handled in the same way, with the same
    disambiguation strategy.
    a6f29db0