[GHC] #15050: ScopedTypeVariables could allow more programs

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.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: -------------------------------------+------------------------------------- Consider {{{ data P a = P data T1 a where MkT1 :: forall a. P a -> T1 a MkT2 :: forall a. P a -> T1 (a,a) MkT3 :: forall a b. b ~ Int => P a -> P b -> T1 a MkT4 :: forall a b. P a -> P b -> T1 a MkT5 :: forall a b c. b ~ c => P a -> P b -> P c -> T1 a }}} I can write this function {{{ foo :: T1 (Int, Int) -> () foo (MkT1 (P::P (Int,Int))) = () foo (MkT2 (P::P x)) = (() :: x ~ Int => ()) foo (MkT3 P (P::P Int)) = () foo (MkT4 P (P::P b)) = () foo (MkT5 P (P::P b) (P::P b)) = () }}} but this these two equations fail {{{ foo (MkT1 (P::P (Int,x))) = (() :: x ~ Int => ()) foo (MkT1 (P::P x)) = (() :: x ~ (Int,Int) => ()) }}} I am especially surprised by the second one, given that the very similar equation with `MkT2` works. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 goldfire): This is a consequence of the fact that a scoped type variable must be a variable, never a type. Another way of saying this is that a type variable brought into scope in a pattern type annotation simply names an existing type variable; it can't, say, bind a type variable to a type. Of course, with type equalities (and therefore GADTs), you can have a type variable `a` and the constraint `a ~ Int`. In this case, you ''can'' bind a scoped type variable to `a`, despite the equality constraint saying that you're essentially binding a scoped type variable to a type. I've personally never liked this design choice around scoped type variables, believing that a pattern-bound type variable should be able to be bound to any type. The lack of ability to do this has actually been a pain point in `singletons` from the beginning, and these examples show that the current behavior isn't even truly self-consistent. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 RyanGlScott): Another layer of inconsistency can be found between values and types. GHC accepts this: {{{#!hs data T a where MkT :: Bool -> T Bool f :: T a -> a f (MkT (y :: z)) = y }}} But not this: {{{#!hs type family F (t :: T a) :: a where F (MkT (y :: z)) = y }}} {{{ • Expected kind ‘Bool’, but ‘(y :: z)’ has kind ‘z’ • In the first argument of ‘MkT’, namely ‘(y :: z)’ In the first argument of ‘F’, namely ‘(MkT (y :: z))’ In the type family declaration for ‘F’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 goldfire): I think comment:3 is a red herring. You're right that GHC rejects that type family, but that has more to do with the way that GHC does type-level GADT pattern matching than anything with scoped type variables. You could argue that it's suboptimal (though it matches what Agda does, I believe), but it's a separate matter from this ticket, I believe. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata):
This is a consequence of the fact that a scoped type variable must be a variable, never a type. Another way of saying this is that a type variable brought into scope in a pattern type annotation simply names an existing type variable; it can't, say, bind a type variable to a type.
TBH, I don’t understand that part of the docs for `ScopedTypeVariables`. What does it mean for a type variable to be a type variable? Is there a global set of variables in existing? Is it referring to the variables in the signature of of the constructor? … I guess the latter could be, but I agree with your sentiment that that is pretty odd and unsatisfying, especially given the type variables in the type signature of the constructor are not in scope here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 simonpj):
What does it mean for a type variable to be a type variable?
Imagine the fully-typechecked Core program. Now, does the source-level type variable name a type variable, or some other non-type-variable type? Example: {{{ data T a = MkT a f1 :: T b -> Int f1 (MkT (x::z)) = ... -- OK f2 :: T Boll -> Int f2 (MkT (x::z)) = ... -- Not OK }}} In `f1` the source-level lexical type variable `z` names a type variable in Core. The elaborated version of `f1` could be {{{ f1 = /\b. \(x::T b). case x of { MkT (x::b) -> ... } }}} So `z` names `b`. In `f2`, you'll see that `z` names `Int`. I agree this is a questionable choice. At the time I was worried that it'd be confusing to have a type variable that was just an alias for `Int`; that is not a type variable at all. But in these days of GADTs and type equalities we are all used to that. We'd make a different choice today. Feel free to make a GHC proposal to change this behaviour. It'd be backward compatible! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata):
Imagine the fully-typechecked Core program.
That’s an unsatisfying way to explain a Haskell feature :-)
Feel free to make a GHC proposal to change this behaviour. It'd be backward compatible!
Is there someone who is confident about type-checker features that feels inspired to turn this into a proposal? (Richard? :-)) I still feel mostly like a clueless user with a too strong sense of entitlement… But I can give it a shot, of course. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 goldfire): I've got enough proposals in the air right now. :) So I'll pass the buck: Ryan? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 RyanGlScott): Nope. I have a personal policy that I never make a GHC proposal unless I understand how it would be implemented in GHC and would be willing to implement it myself, and I don't meet these criteria. Nor am I particularly eager to dive into this part of the codebase—typechecking scoped type variables is black magic, and I'm content to let the experts handle it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata): Here is another case where `ScopedTypeVariables` are less powerful than one might expect. This works: {{{ {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} type family F a where F Bool = Int data T a where MkT :: forall b a. b ~ F a => b -> T a foo :: T Bool -> () foo (MkT (_ :: Int)) = () }}} but the equivalent(?) formulation using `TypeFamilies` does not: {{{ {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} class C b a | a -> b instance C Int Bool data T a where MkT :: forall b a. C b a => b -> T a foo :: T Bool -> () foo (MkT (_ :: Int)) = () }}} gives {{{ /tmp/Foo.hs:11:11: error: • Couldn't match expected type ‘b’ with actual type ‘Int’ ‘b’ is a rigid type variable bound by a pattern with constructor: MkT :: forall b a. C b a => b -> T a, in an equation for ‘foo’ at /tmp/Foo.hs:11:6-19 • When checking that the pattern signature: Int fits the type of its context: b In the pattern: _ :: Int In the pattern: MkT (_ :: Int) }}} }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.1
Resolution: | Keywords:
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 Joachim Breitner

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata): I can get the example from the original ticket to work simply by using `TauTv` instead of `SigTv`. But I’m sure that breaks stuff – in particular since `SigTv` are also used for type-checking (see faec8d358985e5d0bf363bd96f23fe76c9e281f7 and 8361b2c5a9f7a00f0024f44a43b851998ae41e33) – maybe a separate `KindTv` would be cleaner? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata): An experimental implementation of this is in `wip/T15050`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 simonpj): Your patch looks fine. Easiest to leave `SigTv` alone; and just change what sort of tyvar is used in a pattern type signature; which is what you have done. It's a simple change. Just a question of deciding what we want. I'm ok with binding a type variable to an arbitrary type. GHC proposal? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata):
Easiest to leave `SigTv` alone; and just change what sort of tyvar is used in a pattern type signature; which is what you have done.
You don't the name to be changed? Good with me.
GHC proposal?
There are so many proposals already … but I guess that’s a good thing :-) Will whip something up. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata): Proposed at https://github.com/ghc-proposals/ghc-proposals/pull/128 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 simonpj):
You don't the name to be changed?
Well, not yet. Comments, maybe! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: 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 nomeata):
Comments, maybe!
Sure, I will have to go through all of the related notes (which are already partly out-of-date even before my patch). I’ll do that after the proposal process. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: patch Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4980 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => patch * differential: => Phab:D4980 Comment: I put the current code up for review, but there isn’t really anything to see; I am just changing one function call :-) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: feature request | Status: patch
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4980
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4980 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4980 Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Thanks, nomeata! Do you think you could add a mention of this new feature in the 8.8.1 release notes? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15050: ScopedTypeVariables could allow more programs
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4980
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#15050: ScopedTypeVariables could allow more programs
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4980
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4980 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Links * [https://github.com/ghc-proposals/ghc- proposals/blob/master/proposals/0031-type-applications-in-patterns.rst GHC proposal] * [https://github.com/ghc-proposals/ghc-proposals/pull/126 GHC proposal discussion] * [https://arxiv.org/abs/1806.03476 paper] (Type variables in patterns) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC