
#11350: Allow visible type application in patterns -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: | TypeApplications 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): Notes, similar to [https://hackage.haskell.org/package/base-4.9.0.0/docs /GHC-OverloadedLabels.html GHC.OverloadedLabels.IsLabel]: {{{#!hs class IsLeibel (str::Symbol) a where fromLeibel :: a }}} would the following work {{{#!hs instance forall x r a. HasField x r a => IsLeibel x (r -> a) where fromLeibel :: r -> a fromLeibel @x = getField @x }}} Does `fromLeibel @x` bring `x` into scope, shadowing `instance forall x r a.`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11350#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler