[Git][ghc/ghc][master] Add regression test for #18186
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: c3e64915 by Simon Jakobi at 2026-03-11T15:01:31-04:00 Add regression test for #18186 The original TypeInType language extension is replaced with DataKinds+PolyKinds for compatibility. Closes #18186. - - - - - 3 changed files: - + testsuite/tests/polykinds/T18186.hs - + testsuite/tests/polykinds/T18186.stderr - testsuite/tests/polykinds/all.T Changes: ===================================== testsuite/tests/polykinds/T18186.hs ===================================== @@ -0,0 +1,15 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeFamilies #-} + +module Main (main) where + +import Data.Kind (Type) + +type family F :: k -> Type +type family B (a :: k) (b :: k) :: k + +main :: IO () +main = + \(_ :: F n) -> (undefined :: B n 1) ===================================== testsuite/tests/polykinds/T18186.stderr ===================================== @@ -0,0 +1,10 @@ +T18186.hs:15:32: error: [GHC-83865] + • Expected a type, + but ‘B n 1’ has kind + ‘GHC.Internal.Bignum.Natural.Natural’ + • In an expression type signature: B n 1 + In the expression: undefined :: B n 1 + The lambda expression ‘\ (_ :: F n) -> ...’ + has one visible argument, + but its type ‘IO ()’ has none + ===================================== testsuite/tests/polykinds/all.T ===================================== @@ -223,6 +223,7 @@ test('T16902', normal, compile_fail, ['']) test('CuskFam', normal, compile, ['']) test('T17841', normal, compile_fail, ['']) test('T17963', normal, compile_fail, ['']) +test('T18186', normal, compile_fail, ['']) test('T18300', normal, compile_fail, ['']) test('T18451', normal, compile_fail, ['']) test('T18451a', normal, compile_fail, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c3e649152f1ad14eec4e83c1ec1be3a0... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c3e649152f1ad14eec4e83c1ec1be3a0... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)