[GHC] #12730: Pattern synonym signature fails with unlifted type
GHC
ghc-devs at haskell.org
Tue Oct 18 02:49:50 UTC 2016
#12730: Pattern synonym signature fails with unlifted type
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | 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:
-------------------------------------+-------------------------------------
{{{#!hs
pattern P2# a b = (# a, b #)
}}}
works but adding a type signture makes it fail
{{{#!hs
-- tp0w.hs:130:25-34: error: …
-- • Expecting a lifted type, but ‘(# a, b #)’ is unlifted
-- • In the type ‘(# a, b #)’
-- Compilation failed.
pattern P2# :: a -> b -> (# a, b #)
pattern P2# a b = (# a, b #)
}}}
Same with these
{{{#!hs
pattern True :: Int#
pattern True = 1#
pattern False :: Int#
pattern False = 0#
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12730>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list