[GHC] #12115: CoreLint error in safe program
GHC
ghc-devs at haskell.org
Wed May 25 09:16:58 UTC 2016
#12115: CoreLint error in safe program
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
This correct program is failing with a CoreLint error:
{{{
{-# LANGUAGE MagicHash, UnboxedTuples #-}
module Main where
import GHC.Prim
import GHC.Types
showAlt0 :: (# Void#, (# #) #) -> String
showAlt0 (# _, (# #) #) = "()"
main :: IO ()
main = return ()
}}}
Error:
{{{
*** Core Lint errors : in result of Desugar (after optimization) ***
<no location info>: warning:
In the type ‘(# Void#, (# #) #) -> String’
Kind application error in type ‘(# Void#, (# #) #)’
Function kind = * -> * -> TYPE 'UnboxedTupleRep
Arg kinds = [('VoidRep, RuntimeRep),
('UnboxedTupleRep, RuntimeRep), (Void#, TYPE 'VoidRep),
((# #), TYPE 'VoidRep)]
core_err.hs:13:1: warning:
[RHS of showAlt0 :: (# Void#, (# #) #) -> String]
The type of this binder doesn't match the type of its RHS: showAlt0
Binder's type: (# Void#, (# #) #) -> String
Rhs type: (# Void#, (# #) #) -> String
}}}
Tried with: GHC HEAD, 8.0.1.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12115>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list