Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
44877 commits behind, 1 commit ahead of the upstream repository.
  • Simon Peyton Jones's avatar
    f895f334
    Fix egregious instantiation bug in matchOneConLike (fixing Trac #9023) · f895f334
    Simon Peyton Jones authored
    We simply weren't giving anything like the right instantiating types
    to patSynInstArgTys in matchOneConLike.
    
    To get these instantiating types would have involved matching the
    result type of the pattern synonym with the pattern type, which is
    tiresome.  So instead I changed ConPatOut so that instead of recording
    the type of the *whole* pattern (in old field pat_ty), it not records
    the *instantiating* types (in new field pat_arg_tys).  Then we canuse
    TcHsSyn.conLikeResTy to get the pattern type when needed.
    
    There are lots of knock-on incidental effects, but they mostly made
    the code simpler, so I'm happy.
    
    (cherry picked from commit 0a55a3ca)
    f895f334
    History
    Fix egregious instantiation bug in matchOneConLike (fixing Trac #9023)
    Simon Peyton Jones authored
    We simply weren't giving anything like the right instantiating types
    to patSynInstArgTys in matchOneConLike.
    
    To get these instantiating types would have involved matching the
    result type of the pattern synonym with the pattern type, which is
    tiresome.  So instead I changed ConPatOut so that instead of recording
    the type of the *whole* pattern (in old field pat_ty), it not records
    the *instantiating* types (in new field pat_arg_tys).  Then we canuse
    TcHsSyn.conLikeResTy to get the pattern type when needed.
    
    There are lots of knock-on incidental effects, but they mostly made
    the code simpler, so I'm happy.
    
    (cherry picked from commit 0a55a3ca)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.