[GHC] #11572: BangPatterns-related behavior regressions on GHC 8.0
GHC
ghc-devs at haskell.org
Sat Feb 13 00:35:41 UTC 2016
#11572: BangPatterns-related behavior regressions on GHC 8.0
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 8.0.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Another strange facet of the GHCi portion of the bug: the behavior is
different depending on whether a wildcard or a named type variable is
used. Here's another bizarre error you can get in GHCi (but not compiled
code):
{{{
λ> :set -XMagicHash -XBangPatterns
λ> import GHC.Prim
λ> let !a = (undefined :: Int#) in print 2
<interactive>:3:5: error:
• You can't mix polymorphic and unlifted bindings
!a = (undefined :: Int#)
Probable fix: add a type signature
• In the expression: let !a = (undefined :: Int#) in print 2
In an equation for ‘it’:
it = let !a = (undefined :: Int#) in print 2
}}}
This works without issue in GHCi 7.10.3.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11572#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list