• Joachim Breitner's avatar
    Turn EvTerm (almost) into CoreExpr (#14691) · 0e022e56
    Joachim Breitner authored
    Ideally, I'd like to do
    
        type EvTerm = CoreExpr
    
    and the type checker builds the evidence terms as it goes. This failed,
    becuase the evidence for `Typeable` refers to local identifiers that are
    added *after* the typechecker solves constraints. Therefore, `EvTerm`
    stays a data type with two constructors: `EvExpr` for `CoreExpr`
    evidence, and `EvTypeable` for the others.
    
    Delted `Note [Memoising typeOf]`, its reference (and presumably
    relevance) was removed in 8fa4bf9a.
    
    Differential Revision: https://phabricator.haskell.org/D4341
    0e022e56
TcEvTerm.hs 2.26 KB