CoreLint error in safe program
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.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | goldfire |
Operating system | |
Architecture |