[GHC] #11993: RFC, allow local bindings in pattern synonyms

#11993: RFC, allow local bindings in pattern synonyms -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Code from #11992, allow users to write something like {{{#!hs pattern Suc :: Int -> Int pattern Suc n <- (hasSuc -> Just n) where Suc n = n + 1 hasSuc :: Int -> Maybe Int hasSuc n = [ n - 1 | n > 0 ] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11993 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11993: RFC, allow local bindings in pattern synonyms -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I don't think this is a terrible idea but it does mean that the overloaded `where` could also be used in a non-overloaded way. I'm inclined to say that we should leave things as they are for now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11993#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11993: RFC, allow local bindings in pattern synonyms -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): It becomes a lot more worthwhile when you have local data ''and'' pattern synonym declarations because they interplay, I'll get back to this -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11993#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC