Skip to content
Snippets Groups Projects
  • Sebastian Graf's avatar
    30f5ac07
    Much simpler language for PmCheck · 30f5ac07
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    Simon realised that the simple language composed of let bindings, bang
    patterns and flat constructor patterns is enough to capture the
    semantics of the source pattern language that are important for
    pattern-match checking. Well, given that the Oracle is smart enough to
    connect the dots in this less informationally dense form, which it is
    now.
    
    So we transform `translatePat` to return a list of `PmGrd`s relative to
    an incoming match variable. `pmCheck` then trivially translates each of
    the `PmGrd`s into constraints that the oracle understands.
    
    Since we pass in the match variable, we incidentally fix #15884
    (coverage checks for view patterns) through an interaction with !1746.
    30f5ac07
    History
    Much simpler language for PmCheck
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    Simon realised that the simple language composed of let bindings, bang
    patterns and flat constructor patterns is enough to capture the
    semantics of the source pattern language that are important for
    pattern-match checking. Well, given that the Oracle is smart enough to
    connect the dots in this less informationally dense form, which it is
    now.
    
    So we transform `translatePat` to return a list of `PmGrd`s relative to
    an incoming match variable. `pmCheck` then trivially translates each of
    the `PmGrd`s into constraints that the oracle understands.
    
    Since we pass in the match variable, we incidentally fix #15884
    (coverage checks for view patterns) through an interaction with !1746.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
DsBinds.hs-boot 166 B
module DsBinds where
import DsMonad     ( DsM )
import CoreSyn     ( CoreExpr )
import TcEvidence (HsWrapper)

dsHsWrapper :: HsWrapper -> DsM (CoreExpr -> CoreExpr)