Changes between Version 2 and Version 3 of OptimizeCountingGADTs


Ignore:
Timestamp:
May 25, 2016 10:43:51 PM (3 years ago)
Author:
dfeuer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OptimizeCountingGADTs

    v2 v3  
    1111In the simplest case where there are no base fields, this would turn a strict natural singleton into a `Word64`.
    1212
    13 The actual reason I was thinking about this, however, is that Andres Löh had an interesting idea for defunctionalizing functions on finger trees that use such a counting GADT with a non-trivial base case.
     13The actual reason I was thinking about this, however, is that Andres Löh had an interesting idea for defunctionalizing functions on finger trees that use a counting GADT with a non-trivial base case. That particular one is not in quite the right form, but can easily be massaged into it.
    1414
    1515One tricky point: The representation must be fixed when the module containing the type definition is compiled, and that decision recorded. It's possible that type information will reveal later that the type has the required shape, but that's just too late. I think the easy, sensible path here is to make the call purely syntactically, ignoring any type families that could reduce to the correct recursive form.