[GHC] #8947: Depending on hint/ghc API fixes the binary version I can use

#8947: Depending on hint/ghc API fixes the binary version I can use ----------------------------+---------------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects valid program Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | ----------------------------+---------------------------------------------- When I `build-depend` on hint-0.4.0.0 with GHC 7.6.3, I get {{{ % cabal configure Resolving dependencies... cabal: Could not resolve dependencies: trying: pointcloudviewer-0.1.0 (user goal) trying: hint-0.4.0.0/installed-cf3... (dependency of pointcloudviewer-0.1.0) trying: ghc-7.6.3/installed-494... (dependency of hint-0.4.0.0/installed-cf3...) trying: bin-package-db-0.0.0.0/installed-608... (dependency of ghc-7.6.3/installed-494...) trying: GLUtil-0.7.4/installed-223... (dependency of pointcloudviewer-0.1.0) next goal: linear (dependency of GLUtil-0.7.4/installed-223...) rejecting: linear-1.6/installed-300... (conflict: bin-package-db => binary==0.5.1.1/installed-72e..., linear => binary==0.7.1.0/installed-a33...) }}} This fails because `linear` uses a `binary > 0.5.1.1`, but through my use of `hint` which depends on `ghc` (`hint` does not directly depend on `binary`), I pull in a constraint `binary == 0.5.1.1`. I believe this is bad, because depending on the GHC API in any way fixes the binary version I can use, which immediately makes a range of newer libraries unavailable to my program. Probably GHC should somehow hide the fact that binary is used inside, and let the rest of my program use whatever binary it likes. ---- I am aware that this might not be immediately easy, since the GHC API might expose some `binary` types to my program that I could try use with my newer binary version, which of course would be illegal. Maybe it is possible to implement such a check into actual typechecking, and let it pass if I don't actually use types from the old version with functions from the new library. I actually believe I have seen compiler errors in the past where two identical types where not unified because one was from a different version, so maybe infrastructure for this is already in place? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8947 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8947: Depending on hint/ghc API fixes the binary version I can use ----------------------------------------------+---------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects valid program | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ----------------------------------------------+---------------------------- Changes (by nomeata): * cc: mail@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8947#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8947: Depending on hint/ghc API fixes the binary version I can use -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Resolution: | Keywords: backpack Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: rejects valid program | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * keywords: => backpack -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8947#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8947: Depending on hint/ghc API fixes the binary version I can use -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Resolution: | Keywords: backpack Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by ezyang): Technically this is this Cabal bug: the required feature is for Cabal to understand how some dependencies of a package should be considered "private" and thus have an extra degree of freedom when dependency solving. GHC already has the capability to link against multiple versions of binary; the problem is convincing Cabal that this is kosher. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8947#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8947: Depending on hint/ghc API fixes the binary version I can use -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by ezyang): * keywords: backpack => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8947#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8947: Depending on hint/ghc API fixes the binary version I can use -------------------------------------+------------------------------------- Reporter: nh2 | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: GHC API | Version: 7.6.3 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => invalid Comment: Replying to [comment:3 ezyang]:
Cabal bug:
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8947#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC