[GHC] #12094: Unlifted types and pattern synonym signatures

#12094: Unlifted types and pattern synonym signatures -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 (Type checker) | Keywords: pattern | Operating System: Unknown/Multiple synonyms | Architecture: | Type of failure: GHC rejects Unknown/Multiple | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following program is rejected by ghc-8.0.1: {{{#!hs {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} module Foo where import GHC.Exts (Int#) pattern Zero :: Int# -- commenting out this line works pattern Zero <- 0# }}} {{{ % ghc-stage2 unlifted-pattern-synonym.hs [1 of 1] Compiling Foo ( unlifted-pattern-synonym.hs, unlifted-pattern-synonym.o ) unlifted-pattern-synonym.hs:7:17: error: • Expecting a lifted type, but ‘Int#’ is unlifted • In the type ‘Int#’ }}} Commenting out the type signature removes the error. GHC 7.10.3 accepts this program, with and without the type signature. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12094 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12094: Unlifted types and pattern synonym signatures -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * cc: mpickering (added) * keywords: pattern synonyms => PatternSynonyms Comment: Also fails in HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12094#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12094: Unlifted types and pattern synonym signatures -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2255 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => patch * differential: => Phab:D2255 Comment: Easy fix. Thanks for reporting the bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12094#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12094: Unlifted types and pattern synonym signatures
-------------------------------------+-------------------------------------
Reporter: akio | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.0.1
checker) | Keywords:
Resolution: | PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2255
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Matthew Pickering

#12094: Unlifted types and pattern synonym signatures -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2255 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12094#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12094: Unlifted types and pattern synonym signatures -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2255 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Bidirectional form also works {{{#!hs -- ghci> let a@(I# Zero) = I# Zero in a -- 0 pattern Zero = 0# }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12094#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12094: Unlifted types and pattern synonym signatures -------------------------------------+------------------------------------- Reporter: akio | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: Resolution: fixed | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2255 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: => 8.0.2 Comment: Merged to `ghc-8.0` as 04d05617e98f6cb4062aaf405055821e6a09fbbd. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12094#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC