[GHC] #15899: Testcase tcfail158 is broken
GHC
ghc-devs at haskell.org
Mon Nov 26 13:54:26 UTC 2018
#15899: Testcase tcfail158 is broken
-------------------------------------+-------------------------------------
Reporter: RolandSenn | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Test Suite | Version: 8.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: #12906 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Here is a somewhat simplified version of the issue:
{{{#!hs
module Bug where
f, g :: Maybe
f = Nothing
g = undefined
}}}
In GHC 8.6.2, this simply errors with:
{{{
$ ~/Software/haskell/ghc-8.6.2/bin/ghc Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:3:9: error:
• Expecting one more argument to ‘Maybe’
Expected a type, but ‘Maybe’ has kind ‘* -> *’
• In the type signature: f :: Maybe
|
3 | f, g :: Maybe
| ^^^^^
}}}
But in GHC HEAD (as of commit df570d920fa66db631f936fa377e598fe92bd2a1),
we get many more errors:
{{{
$ ghc/inplace/bin/ghc-stage2 Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:3:9: error:
• Expecting one more argument to ‘Maybe’
Expected a type, but ‘Maybe’ has kind ‘* -> *’
• In the type signature: f :: Maybe
|
3 | f, g :: Maybe
| ^^^^^
Bug.hs:4:5: error:
• Couldn't match expected type ‘Maybe’ with actual type ‘Maybe a1’
• In the expression: Nothing
In an equation for ‘f’: f = Nothing
|
4 | f = Nothing
| ^^^^^^^
Bug.hs:5:5: error:
• Couldn't match kind ‘* -> *’ with ‘*’
When matching types
a0 :: *
Maybe :: * -> *
• In the expression: undefined
In an equation for ‘g’: g = undefined
|
5 | g = undefined
| ^^^^^^^^^
}}}
I'll try tracking down which commit introduced this regression when I get
a chance.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15899#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list