diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2018-05-08 10:52:28 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2018-05-08 10:52:28 -0400 |
| commit | 849547bd3a5bc6876268c94f97bf3e79c31340ec (patch) | |
| tree | ff246ce99e299fb7fffce59bce325a4f55d108d1 /compiler | |
| parent | 981bf4718de7daef7817a363ccc14030c2688632 (diff) | |
| download | haskell-849547bd3a5bc6876268c94f97bf3e79c31340ec.tar.gz | |
Revert "Normalize the element type of ListPat, fix #14547"
This reverts commit 981bf4718de7daef7817a363ccc14030c2688632.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/deSugar/Check.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs index 7a5f889423..545aacef51 100644 --- a/compiler/deSugar/Check.hs +++ b/compiler/deSugar/Check.hs @@ -790,13 +790,10 @@ translatePat fam_insts pat = case pat of -- overloaded list ListPat (ListPatTc elem_ty (Just (pat_ty, _to_list))) lpats | Just e_ty <- splitListTyConApp_maybe pat_ty - , (_, norm_e_ty) <- normaliseType fam_insts Nominal e_ty - -- e_ty can be a type family instance, like - -- `It (List a)`, but we prefer `a`, see Trac #14547 , (_, norm_elem_ty) <- normaliseType fam_insts Nominal elem_ty -- elem_ty is frequently something like -- `Item [Int]`, but we prefer `Int` - , norm_elem_ty `eqType` norm_e_ty -> + , norm_elem_ty `eqType` e_ty -> -- We have to ensure that the element types are exactly the same. -- Otherwise, one may give an instance IsList [Int] (more specific than -- the default IsList [a]) with a different implementation for `toList' |
