diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2022-11-28 15:36:25 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2022-11-29 08:37:50 +0000 |
commit | 3e695c2bfd97095a44f69f03b607e05876bbdc11 (patch) | |
tree | dde8bdf59b91ca0948842e59c1f93dc4b47e5c09 /testsuite/tests/patsyn/should_compile/T22521.hs | |
parent | b5d9558e6dcef2a6f1c315f5058eafd7113f9860 (diff) | |
download | haskell-wip/T22516.tar.gz |
Use mkNakedFunTy in tcPatSynSigwip/T22516
As #22521 showed, in tcPatSynSig we make a "fake type" to
kind-generalise; and that type has unzonked type variables in it. So
we must not use `mkFunTy` (which checks FunTy's invariants) via
`mkPhiTy` when building this type. Instead we need to use
`mkNakedFunTy`.
Easy fix.
Diffstat (limited to 'testsuite/tests/patsyn/should_compile/T22521.hs')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/T22521.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/T22521.hs b/testsuite/tests/patsyn/should_compile/T22521.hs new file mode 100644 index 0000000000..0fbac4f49e --- /dev/null +++ b/testsuite/tests/patsyn/should_compile/T22521.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE ViewPatterns #-} +module Bug (pattern P) where + +pattern P :: C a => a +pattern P <- (m -> True) + +class C a where + m :: a -> Bool |