
With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ``` Anyone have any pointers on what is going wrong and what I should be looking at? -- *Shayne Fletcher* Language Engineer */* +1 917 699 7663 *Digital Asset* https://digitalasset.com/, creators of *DAML https://daml.com/* -- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.

On June 19, 2020 5:55:01 PM EDT, Shayne Fletcher via ghc-devs
With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs
examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ```
Anyone have any pointers on what is going wrong and what I should be looking at?
I have a hypothesis for what might be happening here. Investigating

On Fri, Jun 19, 2020 at 6:27 PM Ben Gamari
On June 19, 2020 5:55:01 PM EDT, Shayne Fletcher via ghc-devs < ghc-devs@haskell.org> wrote:
With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs
examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ```
Anyone have any pointers on what is going wrong and what I should be looking at?
I have a hypothesis for what might be happening here. Investigating
Breaks at commit `96aa57878fd6e6a7b92e841a0df8b5255a559c97` ( https://gitlab.haskell.org/ghc/ghc/-/commit/96aa57878fd6e6a7b92e841a0df8b525...) "Update compiler". -- Shayne Fletcher

On Fri, Jun 19, 2020 at 9:23 PM Shayne Fletcher < shayne.fletcher.50@gmail.com> wrote:
On Fri, Jun 19, 2020 at 6:27 PM Ben Gamari
wrote: On June 19, 2020 5:55:01 PM EDT, Shayne Fletcher via ghc-devs < ghc-devs@haskell.org> wrote:
With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs
examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ```
Anyone have any pointers on what is going wrong and what I should be looking at?
I have a hypothesis for what might be happening here. Investigating
Breaks at commit `96aa57878fd6e6a7b92e841a0df8b5255a559c97` ( https://gitlab.haskell.org/ghc/ghc/-/commit/96aa57878fd6e6a7b92e841a0df8b525...) "Update compiler".
Actually it seems almost certain to be `40fa237e1daab7a76b9871bb6c50b953a1addf23`, the linear types patch. So my current theory is that it is probably not a bug but instead points to a ghc-prim mismatch. -- Shayne Fletcher

Ben Gamari
On June 19, 2020 5:55:01 PM EDT, Shayne Fletcher via ghc-devs
wrote: ... Anyone have any pointers on what is going wrong and what I should be looking at?
I have a hypothesis for what might be happening here. Investigating
My initial hypothesis was a unique conflict (as I had to resolve some merge conflicts in this area while merging). However, a cursory look at the relevant implementation didn't reveal any. I had to drop this last night due to another engagement but I will try to resume today. Indeed having a ticket would be helpful. Cheers, - Ben

Ben Gamari
On June 19, 2020 5:55:01 PM EDT, Shayne Fletcher via ghc-devs
wrote: With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs
examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ```
Anyone have any pointers on what is going wrong and what I should be looking at?
One additional question: Can you confirm that this is reproducible with a clean build? Specifically, this sort of thing is very likely to occur if you have stale interface files (e.g. build GHC, pull some commits, and do an incremental build). It would be good to exclude this possibility. Cheers, - Ben

On Fri, Jun 19, 2020 at 5:55 PM Shayne Fletcher
With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs
examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ```
Anyone have any pointers on what is going wrong and what I should be looking at?
Breaks at commit `96aa57878fd6e6a7b92e841a0df8b5255a559c97` ( https://gitlab.haskell.org/ghc/ghc/-/commit/96aa57878fd6e6a7b92e841a0df8b525...) "Update compiler". -- *Shayne Fletcher* Language Engineer */* +1 917 699 7663 *Digital Asset* https://digitalasset.com/, creators of *DAML https://daml.com/* -- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.

Hi, I would think it's more related to the linear types patch given that it added ghc-prim:GHC.Types.One (wired-in). Could you open a ticket with a way to reproduce the failure? Thanks, Sylvain On 19/06/2020 23:55, Shayne Fletcher via ghc-devs wrote:
With the recent MR that removes integer-simple in favor of ghc-bignum, I find that I get a runtime failure when I try to use ghc-lib to generate core: ``` # Running: stack --no-terminal exec -- mini-compile examples/mini-compile/test/MiniCompileTest.hs
examples/mini-compile/test/MiniCompileTest.hs:66:5: error: * GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] * In the definition of data constructor `TrNameS' In the data declaration for `TrName' | 66 | = TrNameS Addr# -- Static | ^^^^^^^^^^^^^ mini-compile: GHC internal error: `One' is not in scope during type checking, but it passed the renamer tcl_env of environment: [628 :-> ATcTyCon TrName :: *, 62b :-> APromotionErr RecDataConPE, 62e :-> APromotionErr RecDataConPE] ```
Anyone have any pointers on what is going wrong and what I should be looking at?
-- *Shayne Fletcher* Language Engineer */* +1 917 699 7663 *Digital Asset* https://digitalasset.com/, creators of *DAML https://daml.com/*
This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

On Sat, Jun 20, 2020 at 5:43 AM Sylvain Henry
I would think it's more related to the linear types patch given that it added ghc-prim:GHC.Types.One (wired-in). Could you open a ticket with a way to reproduce the failure?
That makes a lot of sense Sylvain. Thanks, will do. -- *Shayne Fletcher* Language Engineer */* +1 917 699 7663 *Digital Asset* https://digitalasset.com/, creators of *DAML https://daml.com/* -- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.

On Sat, Jun 20, 2020 at 6:56 AM Shayne Fletcher
On Sat, Jun 20, 2020 at 5:43 AM Sylvain Henry
wrote: I would think it's more related to the linear types patch given that it added ghc-prim:GHC.Types.One (wired-in). Could you open a ticket with a way to reproduce the failure?
That makes a lot of sense Sylvain. Thanks, will do.
After some scratching around, I've pretty much convinced myself that there isn't an issue here to be raised against GHC upstream. There IS a problem to be solved in how ghc-lib relates with ghc-prim but that problem is firmly on the ghc-lib side. So, there won't be a ticket for now that stems from this. Thanks again for your input Sylvain! -- *Shayne Fletcher* Language Engineer */* +1 917 699 7663 *Digital Asset* https://digitalasset.com/, creators of *DAML https://daml.com/* -- This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.digitalasset.com/emaildisclaimer.html http://www.digitalasset.com/emaildisclaimer.html. If you are not the intended recipient, please delete this message.
participants (4)
-
Ben Gamari
-
Shayne Fletcher
-
Shayne Fletcher
-
Sylvain Henry