[GHC] #8584: Pattern synonym type signatures

#8584: Pattern synonym type signatures ------------------------------------+------------------------------------- Reporter: cactus | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: 5144 | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Currently, the only way to specify a type signature for a pattern synonym is by adding type annotations to the right-hand side, like this: {{{ {-# LANGUAGE PatternSynonyms, ScopedTypeVariables #-} pattern Single x = ([x] :: [Int]) }}} Bespoke syntax for adding type signatures for pattern synonyms would probably be useful. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------ Reporter: cactus | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 5144 Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by nomeata): JFTR: The code in master already contains a `PatSynSig` constructor, but it is dead code... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------ Reporter: cactus | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 5144 Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by cactus): It is not dead, just dormant :) Haddock uses it. The plan for this ticket is to add frontend (parser/typechecker) support for `PatSynSig`, but it's not done yet. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: cactus | Owner: cactus Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: pattern synonyms (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: 5144 Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * keywords: => pattern synonyms * owner: => cactus * component: Compiler => Compiler (Type checker) * milestone: => 7.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: cactus | Owner: cactus Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: pattern synonyms (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: 5144 Unknown/Multiple | Related Tickets: 8581 Type of failure: | None/Unknown | Test Case: | Blocking: 8968 | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * related: => 8581 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: cactus | Owner: cactus Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: pattern synonyms (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: 5144 Unknown/Multiple | Related Tickets: 8581 Type of failure: | None/Unknown | Test Case: | Blocking: 8968 | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Link to [wiki:PatternSynonyms] for pattern synonym signatures -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: cactus | Owner: cactus Type: feature | Status: new request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: pattern synonyms (Type checker) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: 5144 Unknown/Multiple | Related Tickets: 8581 Type of failure: | None/Unknown | Test Case: | Blocking: 8968 | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by simonpj: Old description:
Currently, the only way to specify a type signature for a pattern synonym is by adding type annotations to the right-hand side, like this:
{{{ {-# LANGUAGE PatternSynonyms, ScopedTypeVariables #-}
pattern Single x = ([x] :: [Int]) }}}
Bespoke syntax for adding type signatures for pattern synonyms would probably be useful.
New description: Currently, the only way to specify a type signature for a pattern synonym is by adding type annotations to the right-hand side, like this: {{{ {-# LANGUAGE PatternSynonyms, ScopedTypeVariables #-} pattern Single x = ([x] :: [Int]) }}} Bespoke syntax for adding type signatures for pattern synonyms would probably be useful. Link to [wiki:PatternSynonyms] for pattern synonym signatures for specification. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: cactus | Owner: cactus Type: feature | Status: closed request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: pattern synonyms (Type checker) | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: 5144 Unknown/Multiple | Related Tickets: 8581 Type of failure: | None/Unknown | Test Case: | Blocking: 8968 | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8584: Pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: cactus | Owner: cactus Type: feature | Status: closed request | Milestone: 7.10.1 Priority: normal | Version: Component: Compiler | Keywords: PatternSynonyms (Type checker) | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: 5144 Unknown/Multiple | Related Tickets: 8581 Type of failure: | None/Unknown | Test Case: | Blocking: 8968 | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by cactus): * keywords: pattern synonyms => PatternSynonyms -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8584#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC