Changes between Version 21 and Version 22 of Plugins/TypeChecker

May 18, 2018 2:24:16 PM (3 months ago)



  • Plugins/TypeChecker

    v21 v22  
    207207'''Richard:''' This makes me uncomfortable, in exactly the same way that I was made to feel uncomfortable in the comments starting with comment:4:ticket:9840. The fact that the new, (what I will call) ''external'' type families will behave differently than internal type families is further evidence that something is amiss. (The difference in behavior I'm referring to is the difference between `matchFam` and `reduceTyFamApp_maybe`.) This, of course, ties into #9636 as well and to some of the more esoteric issues that cropped up while working on #6018/Phab:D202 and perhaps even #10327. I would love to approach this problem with the idea of making broader changes instead of looking for a minimal change just to support typechecker plugins better. '''End Richard'''
    209 === Under discussion: Embedding CoreExpr in EvTerm ===
     209=== Implemented: Embedding CoreExpr in EvTerm ===
    211211At the moment, the `EvTerm` type used to represent evidence for constraints is quite restricted. In particular, it permits a selection of special cases (e.g. `EvLit`, `EvCallStack`, `EvTypeable`) but does not permit general `CoreExpr`s. This makes it difficult to constraint evidence for typeclass constraints, because they must use `EvDFunApp` with an existing dfun, rather than generating a dictionary directly. See [ "EvTerms and how they are used" on ghc-devs] for discussion of this.
    221221I'm not very clear on whether we need to extend zonking to work on `CoreExpr`? Or should `EvCoreExpr` take a pre-zonked expression?
     223This is now implemented; see #14691.
    223225=== Under discussion: Evidence for axioms ===
    241243== Outstanding issues ==
    243  * Dynamic loading seems to be subtly broken on Windows or when using multiple plugins (see #10301). There is a [ workaround].
     245 * The current API does not make it possible to express the fact that a plugin solved some constraints but discovered others were impossible to solve. The only option is to solve the valid constraints and leave the others as unsolved, rather than identifying the contradiction.
    245247 * For units of measure, it would be nice to be able to extend the