Simon Jakobi pushed to branch wip/sjakobi/regression-tests-3 at Glasgow Haskell Compiler / GHC

Commits:

5 changed files:

Changes:

  • testsuite/tests/typecheck/T13180/T13180.hs
    1
    +module T13180 (T, f) where
    
    2
    +
    
    3
    +import qualified T13180A
    
    4
    +
    
    5
    +type T = Int
    
    6
    +
    
    7
    +f :: T -> T
    
    8
    +f x = T13180A.f x

  • testsuite/tests/typecheck/T13180/T13180.hs-boot
    1
    +module T13180 where
    
    2
    +
    
    3
    +data T
    
    4
    +f :: T -> T

  • testsuite/tests/typecheck/T13180/T13180.stderr
    1
    +[1 of 3] Compiling T13180[boot]     ( T13180.hs-boot, T13180.o-boot )
    
    2
    +[2 of 3] Compiling T13180A          ( T13180A.hs, T13180A.o )
    
    3
    +[3 of 3] Compiling T13180           ( T13180.hs, T13180.o )
    
    4
    +T13180.hs-boot:3:1: error: [GHC-15843]
    
    5
    +    • Type constructor ‘T’ has conflicting definitions in the module
    
    6
    +      and its hs-boot file.
    
    7
    +      Main module: type T :: *
    
    8
    +                   type T = Int
    
    9
    +        Boot file: type T :: *
    
    10
    +                   data T
    
    11
    +    • In the type synonym declaration for ‘T’
    
    12
    +

  • testsuite/tests/typecheck/T13180/T13180A.hs
    1
    +module T13180A (f) where
    
    2
    +
    
    3
    +import {-# SOURCE #-} T13180

  • testsuite/tests/typecheck/T13180/all.T
    1
    +# Historically this scenario resulted in a second error:
    
    2
    +# 
    
    3
    +#    Identifier ‘f’ has conflicting definitions in the module
    
    4
    +#    and its hs-boot file
    
    5
    +#    Main module: f :: T -> T
    
    6
    +#    Boot file:   f :: T -> T
    
    7
    +#    The two types are different
    
    8
    +test('T13180', normal, multimod_compile_fail, ['T13180', '-fforce-recomp'])