[Git][ghc/ghc][wip/sjakobi/regression-tests-3] Add regression test for #13180
Simon Jakobi pushed to branch wip/sjakobi/regression-tests-3 at Glasgow Haskell Compiler / GHC Commits: 88202378 by Simon Jakobi at 2026-03-06T01:39:05+01:00 Add regression test for #13180 Closes #13180. - - - - - 5 changed files: - + testsuite/tests/typecheck/T13180/T13180.hs - + testsuite/tests/typecheck/T13180/T13180.hs-boot - + testsuite/tests/typecheck/T13180/T13180.stderr - + testsuite/tests/typecheck/T13180/T13180A.hs - + testsuite/tests/typecheck/T13180/all.T Changes: ===================================== testsuite/tests/typecheck/T13180/T13180.hs ===================================== @@ -0,0 +1,8 @@ +module T13180 (T, f) where + +import qualified T13180A + +type T = Int + +f :: T -> T +f x = T13180A.f x ===================================== testsuite/tests/typecheck/T13180/T13180.hs-boot ===================================== @@ -0,0 +1,4 @@ +module T13180 where + +data T +f :: T -> T ===================================== testsuite/tests/typecheck/T13180/T13180.stderr ===================================== @@ -0,0 +1,12 @@ +[1 of 3] Compiling T13180[boot] ( T13180.hs-boot, T13180.o-boot ) +[2 of 3] Compiling T13180A ( T13180A.hs, T13180A.o ) +[3 of 3] Compiling T13180 ( T13180.hs, T13180.o ) +T13180.hs-boot:3:1: error: [GHC-15843] + • Type constructor ‘T’ has conflicting definitions in the module + and its hs-boot file. + Main module: type T :: * + type T = Int + Boot file: type T :: * + data T + • In the type synonym declaration for ‘T’ + ===================================== testsuite/tests/typecheck/T13180/T13180A.hs ===================================== @@ -0,0 +1,3 @@ +module T13180A (f) where + +import {-# SOURCE #-} T13180 ===================================== testsuite/tests/typecheck/T13180/all.T ===================================== @@ -0,0 +1,8 @@ +# Historically this scenario resulted in a second error: +# +# Identifier ‘f’ has conflicting definitions in the module +# and its hs-boot file +# Main module: f :: T -> T +# Boot file: f :: T -> T +# The two types are different +test('T13180', normal, multimod_compile_fail, ['T13180', '-fforce-recomp']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8820237861b23f051443000d5f7b0b65... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8820237861b23f051443000d5f7b0b65... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)