[GHC] #10494: Representational equalities over AppTys are not hard failures

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- If I say {{{ module App where import Data.Coerce foo :: Coercible (a b) (c d) => a b -> c d foo = undefined }}} I get {{{ App.hs:5:8: error: Couldn't match representation of type ‘a b’ with that of ‘c d’ Inaccessible code in the type signature for: foo :: Coercible (a b) (c d) => a b -> c d In the ambiguity check for the type signature for ‘foo’: foo :: forall (a :: * -> *) b (c :: * -> *) d. Coercible (a b) (c d) => a b -> c d To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the type signature for ‘foo’: foo :: Coercible (a b) (c d) => a b -> c d }}} This is very silly, indeed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Richard Eisenberg

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | typecheck/should_compile/T10494 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => merge * testcase: => typecheck/should_compile/T10494 * milestone: => 7.10.3 Comment: Merge if convenient. Another real bug, but I doubt it's ruining anyone's day. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * version: 7.11 => * resolution: => fixed Comment: I am a bit confused; the cited example appears to compile for me with 7.8, 7.10.1, and 7.10.2. Perhaps this was introduced since 7.10 branched from master? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 7.10.3 => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Replying to [comment:3 bgamari]:
I am a bit confused; the cited example appears to compile for me with 7.8, 7.10.1, and 7.10.2. Perhaps this was introduced since 7.10 branched from master?
Quite possible. I guess I didn't test in 7.10. And, in any case, you've simply decided that it's not convenient to merge the change. :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by crockeea): Replying to [comment:2 goldfire]:
Merge if convenient. Another real bug, but I doubt it's ruining anyone's day.
This is ruining my day, see #10428. Replying to [comment:5 goldfire]:
Quite possible. I guess I didn't test in 7.10. And, in any case, you've simply decided that it's not convenient to merge the change. :)
So what's the status of this fix? It appears that the example in this ticket may be moot, but apparently the fix affects #10428, which *is* present in 7.10.1. Did the patch make 7.10.2? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * status: closed => merge * milestone: => 7.10.3 Comment: Replying to [comment:6 crockeea]:
This is ruining my day, see #10428.
Hm. I'm a little confused here, then. Could this fix be merged for 7.10.3 (if that happens)? The original case in #10428 compiles with HEAD but fails with 7.10.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): So, @crockeea, are you asking for 7.10.3? i.e. is this a serious problem for you (and if so can you elaborate on why)? See [wiki:Status/GHC-7.10.3]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by crockeea): I'm about to release a package that triggers the bug, so it currently has crufty work-around code that I'd like to kill. I have a collection of functions that coerce functions of one signature to functions of another signature. Many of the definitions are simply `coerce`, but the explicit functions are needed for type inference. Here's an example: Instead of writing {{{ coerceBasis :: (Coercible (o r) (n m' r)) => Tagged '(m,m') ([o r]) -> Tagged m [n m' r] coerceBasis = coerce }}} I have to write {{{ coerceBasis :: (a ~ (o r), b ~ (n m' r), Coercible a b) => Tagged '(m,m') ([o r]) -> Tagged m [n m' r] coerceBasis = coerce }}} introducing two new intermediate type variables and constraints. Is this enough of a problem to make you go through the work of releasing 7.10.3 just for it? Certainly not. Mostly I was just unsure of the status of the patch and didn't want the original bug to be forgotten. That said, I *would* like it resolved sooner rather than later. I saw something on GHC-Devs about releasing builds, which makes a lot of sense to me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * owner: goldfire => * status: merge => new * resolution: fixed => * priority: normal => high Comment: So far as I can tell, this (and it's dup #10428) are * Fixed in HEAD * But not merged to 7.10.3 And @crockeea would like it in 7.10.3 if poss. I have no idea how hard or easy it will be to merge. I suggest giving it a go, but not losing sleep if it's not easy. Hence 'high'. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: merge Priority: high | Milestone: 7.10.3 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => merge Comment: Shouldn't this be "merge" then? Changed accordingly. Do let me know if I can be of help sorting this out for the merge. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: merge Priority: high | Milestone: 7.10.3 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): goldfire, I've committed more head-scratching to porting this forward that perhaps I should have. Do you suppose you could port this to 7.10 (perhaps using `ghc-7.10.2-release` as a base commit)? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 7.10.3
Component: Compiler | Version:
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_compile/T10494
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* status: merge => closed
* resolution: => fixed
Comment:
The problem here is the fix seems to depend upon,
{{{
commit c1edbdfd9148ad9f74bfe41e76c524f3e775aaaa
Author: Richard Eisenberg

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * milestone: 7.10.3 => 8.0.1 Comment: Changing Milestone accordingly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10494: Representational equalities over AppTys are not hard failures -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T10494 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Ah -- thanks for sorting that out. I'll move this out of my queue then. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10494#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC