From bryan at haskell.foundation Wed Feb 1 06:57:07 2023 From: bryan at haskell.foundation (Bryan Richter) Date: Wed, 1 Feb 2023 08:57:07 +0200 Subject: Slow downloads In-Reply-To: References: Message-ID: I don't know if we have the monitoring infrastructure set up to visualize and inspect potential issues like this one. The service provider Equinix has a console, but it has very little information about traffic rates. Adding some monitoring and alerting infrastructure is one of the things I think we should look into eventually. For now, I assume this was an intermittent issue, and now there's nothing further that can be done about it. -_- -Bryan On Sun, 29 Jan 2023 at 19:49, Simon Peyton Jones < simon.peytonjones at gmail.com> wrote: > I'm getting very low transfer rates on Git operations. Like 16 kb/s. > Things that usually take a second or two are still going 10 minutes later. > See below > > My internet connection appears to be solid at 100Mb/s upload and download. > > Any ideas? > > Simon > > > [image: image.png] > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 90114 bytes Desc: not available URL: From matthewtpickering at gmail.com Wed Feb 1 09:48:06 2023 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Wed, 1 Feb 2023 09:48:06 +0000 Subject: 9.2.6 forthcoming release Message-ID: Hi all, We are preparing potentially the final release in the 9.2.* series. Zubin is preparing the release and we hope to deliver the release in the next 1-2 weeks. The two most critical bugs which 9.2.6 will fix is * #22425 which is a performance regression introduced in 9.2.5. * #22497 which will fix 9.2.* on recent aarch64-darwin platforms. There are a few other bugs which will be fixed in the release but we are being very conservative at this stage about introducing potential breakage. The backport set is being prepared on this branch: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9775 Cheers, Matt From djsamperi at gmail.com Wed Feb 1 22:31:31 2023 From: djsamperi at gmail.com (Dominick Samperi) Date: Wed, 1 Feb 2023 17:31:31 -0500 Subject: FFI changes? In-Reply-To: References: <87ilgtq7pg.fsf@smart-cactus.org> Message-ID: No Carter, I'm using a PC, and I think the issue was caused by my own mistake resulting in bad interaction with R's garbage collector, and was likely not caused by changes to the ghc FFI API. On Mon, Jan 30, 2023 at 5:05 PM Carter Schonwald wrote: > Hey domninick: what platform are you using? > > Is this on an arm flavor mac? > > On Thu, Jan 26, 2023 at 5:00 PM Ben Gamari wrote: > >> Dominick Samperi writes: >> >> > Hello, >> > >> > I have been working with a program that uses FFI to communicate with R >> > for several years, but today there is a segmentation fault while >> > importing functions or data from R. Before giving up on this project, >> > I'm posting a few detail here, in case anybody has ideas...perhaps >> > something changed with FFI? >> > >> Hi Dominick, >> >> As far as I know nothing should have changed that would break >> previously-correct FFI programs. >> >> More information would be helpful: Which GHC version are you using? >> Which platform are you running on? Can you provide a reproducer? >> If so, please open a ticket [1]. >> >> Cheers, >> >> - Ben >> >> >> [1] https://gitlab.haskell.org/ghc/ghc/-/issues/new >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewtpickering at gmail.com Thu Feb 2 11:13:52 2023 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Thu, 2 Feb 2023 11:13:52 +0000 Subject: LLVM Support Range Bump (dropping LLVM 10 support) Message-ID: Hi all, We are intending to bump the range of supported LLVM versions in the 9.6, release. For 9.4 the range is 10-14 (inclusive) For 9.6 we will support 11-15 (inclusive) If dropping support for LLVM 10 is a concern for anyone please let us know. Cheers, Matt From sandy at sandymaguire.me Sat Feb 4 09:29:26 2023 From: sandy at sandymaguire.me (Sandy Maguire) Date: Sat, 04 Feb 2023 01:29:26 -0800 Subject: Preventing inert caching in TC plugin? Message-ID: Hi all, I'm working on a little TC plugin that solves the following class: ```haskell class KnownAnnotations where rawAnnotationsVal :: [Annotation] ``` Like `HasCallStack`, the result of `KnownAnnotations` is unique to each callsite. Thus, I am trying to prevent my TC plugin from adding the solved constraint to the inert set. As an example, the following program: ``` t2 :: ([Annotation], Int) t2 = (rawAnnotationsVal, test2) t3 :: ([Annotation], Int) t3 = (rawAnnotationsVal, test3) ``` dumps this output with `-ddump-cs-trace`: ``` Step 1[l:0,d:0] Kept as inert: [WD] $dKnownAnnotations_a18UB {0}:: KnownAnnotations Step 2[l:0,d:0] Dict equal (keep inert): [WD] $dKnownAnnotations_a18UD {0}:: KnownAnnotations ``` Is there some trick to prevent the inert caching for these solved wanteds? Cheers, Sandy -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: This is a digitally signed message part URL: From adam at well-typed.com Sat Feb 4 12:49:46 2023 From: adam at well-typed.com (Adam Gundry) Date: Sat, 4 Feb 2023 12:49:46 +0000 Subject: Preventing inert caching in TC plugin? In-Reply-To: References: Message-ID: <2d395978-d9ac-ee9f-48d5-763bd9666871@well-typed.com> Hi Sandy, I don't think you can easily prevent GHC from caching solutions to specific constraints, and even if you could, the simplifier feels free to common-up dictionaries with the same type and hence would potentially introduce unintended semantic changes to the program. You might be able to address at least the second issue by using implicit parameters instead. But I think a more robust approach would be to introduce an extra type parameter: class KnownAnnotations a where rawAnnotationsVal :: [Annotation] Now each rawAnnotationsVal call site will introduce a fresh unification variable α and the wanted constraint `KnownAnnotations α`. Your plugin can spot this constraint and solve it, while leaving α uninstantiated. Hence each call site will have a different constraint type, and the problems should go away. Perhaps you could even make the parameter invisible/inferred, so it wouldn't change the user-visible API. Something like this might work, but I haven't tested it: type KnownAnnotations :: forall {a} . Constraint class KnownAnnotations where rawAnnotationsVal :: [Annotation] Hope this helps, Adam On 04/02/2023 09:29, Sandy Maguire via ghc-devs wrote: > Hi all, > > I'm working on a little TC plugin that solves the following class: > > ```haskell > class KnownAnnotations where > rawAnnotationsVal :: [Annotation] > ``` > > Like `HasCallStack`, the result of `KnownAnnotations` is unique to each > callsite. Thus, I am trying to prevent my TC plugin from adding the > solved constraint to the inert set. > > As an example, the following program: > > ``` > t2 :: ([Annotation], Int) > t2 = (rawAnnotationsVal, test2) > > t3 :: ([Annotation], Int) > t3 = (rawAnnotationsVal, test3) > ``` > > dumps this output with `-ddump-cs-trace`: > > ``` > > Step 1[l:0,d:0] Kept as inert: > [WD] $dKnownAnnotations_a18UB {0}:: KnownAnnotations > Step 2[l:0,d:0] Dict equal (keep inert): > [WD] $dKnownAnnotations_a18UD {0}:: KnownAnnotations > ``` > > Is there some trick to prevent the inert caching for these solved > wanteds? > > Cheers, > Sandy -- Adam Gundry, Haskell Consultant Well-Typed LLP, https://www.well-typed.com/ Registered in England & Wales, OC335890 27 Old Gloucester Street, London WC1N 3AX, England From sandy at sandymaguire.me Sat Feb 4 18:00:34 2023 From: sandy at sandymaguire.me (Sandy Maguire) Date: Sat, 04 Feb 2023 10:00:34 -0800 Subject: Preventing inert caching in TC plugin? In-Reply-To: <2d395978-d9ac-ee9f-48d5-763bd9666871@well-typed.com> References: <2d395978-d9ac-ee9f-48d5-763bd9666871@well-typed.com> Message-ID: <4fb36d7453db73a4b5aaadc2b9f8f914ecde835f.camel@sandymaguire.me> Hi Adam, Thakns for the pointer. Adding the type variable indeed seems to solve the problem. Greatly appreciated! Best, Sandy On Sat, 2023-02-04 at 12:49 +0000, Adam Gundry wrote: > Hi Sandy, > > I don't think you can easily prevent GHC from caching solutions to > specific constraints, and even if you could, the simplifier feels > free > to common-up dictionaries with the same type and hence would > potentially > introduce unintended semantic changes to the program. > > You might be able to address at least the second issue by using > implicit > parameters instead. But I think a more robust approach would be to > introduce an extra type parameter: > >      class KnownAnnotations a where >        rawAnnotationsVal :: [Annotation] > > Now each rawAnnotationsVal call site will introduce a fresh > unification > variable α and the wanted constraint `KnownAnnotations α`. Your > plugin > can spot this constraint and solve it, while leaving α > uninstantiated. > Hence each call site will have a different constraint type, and the > problems should go away. > > Perhaps you could even make the parameter invisible/inferred, so it > wouldn't change the user-visible API. Something like this might work, > but I haven't tested it: > >      type KnownAnnotations :: forall {a} . Constraint >      class KnownAnnotations where >        rawAnnotationsVal :: [Annotation] > > Hope this helps, > > Adam > > > > On 04/02/2023 09:29, Sandy Maguire via ghc-devs wrote: > > Hi all, > > > > I'm working on a little TC plugin that solves the following class: > > > > ```haskell > > class KnownAnnotations where > >    rawAnnotationsVal :: [Annotation] > > ``` > > > > Like `HasCallStack`, the result of `KnownAnnotations` is unique to > > each > > callsite. Thus, I am trying to prevent my TC plugin from adding the > > solved constraint to the inert set. > > > > As an example, the following program: > > > > ``` > > t2 :: ([Annotation], Int) > > t2 = (rawAnnotationsVal, test2) > > > > t3 :: ([Annotation], Int) > > t3 = (rawAnnotationsVal, test3) > > ``` > > > > dumps this output with `-ddump-cs-trace`: > > > > ``` > > > > Step 1[l:0,d:0] Kept as inert: > >      [WD] $dKnownAnnotations_a18UB {0}:: KnownAnnotations > > Step 2[l:0,d:0] Dict equal (keep inert): > >      [WD] $dKnownAnnotations_a18UD {0}:: KnownAnnotations > > ``` > > > > Is there some trick to prevent the inert caching for these solved > > wanteds? > > > > Cheers, > > Sandy > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: This is a digitally signed message part URL: From eternal.recursion at proton.me Sat Feb 4 21:04:15 2023 From: eternal.recursion at proton.me (Eternal Recursion) Date: Sat, 04 Feb 2023 21:04:15 +0000 Subject: Using GHC API with multiple targets Message-ID: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> Hi Everyone! I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? This is my current code: withPath :: FilePath -> IO () withPath target = do let targetDir = takeDirectory target let targetFile = takeFileName target listing <- listDirectory targetDir let imports = filter (\f -> takeExtension f == ".hs") listing print imports let moduleName = mkModuleName targetFile g <- defaultErrorHandler defaultFatalMessager defaultFlushOut $ runGhc (Just libdir) $ do initGhcMonad (Just libdir) dynflags <- getSessionDynFlags setSessionDynFlags $ dynflags { ghcLink = LinkInMemory , ghcMode = CompManager , backend = Interpreter , mainModuleNameIs = moduleName , workingDirectory = Just targetDir , importPaths = [targetDir] ++ importPaths dynflags } targets <- mapM (\t -> guessTarget t Nothing Nothing) imports setTargets targets setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] load LoadAllTargets liftIO . print . ppr =<< getTargets getModuleGraph putStrLn "Here we go!" print $ ppr $ mgModSummaries g putStrLn "☝️ " However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: $ cabal run cli -- example/app/Main.hs Up to date ["Main.hs","Lib.hs","Lib2.hs"] [main:Main.hs, main:Lib.hs, main:Lib2.hs] Here we go! [ModSummary { ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be ms_mod = Lib, unit = main ms_textual_imps = [(, Prelude)] ms_srcimps = [] }, ModSummary { ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd ms_mod = Lib2, unit = main ms_textual_imps = [(, Prelude)] ms_srcimps = [] }, ModSummary { ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f ms_mod = Main, unit = main ms_textual_imps = [(, Prelude), (, Lib2)] ms_srcimps = [] }] ☝ example/app/Main.hs:4:1: error: Could not find module ‘Lib2’ Use -v (or `:set -v` in ghci) to see a list of the files searched for. | 4 |import qualified Lib2 as L2 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cli: example/app/Main.hs:4:1: error: Could not find module `Lib2' Use -v (or `:set -v` in ghci) to see a list of the files searched for. ​What do I need to do differently to make this work? I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! Sincerely, Bob Sent with [Proton Mail](https://proton.me/) secure email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ccycle713 at gmail.com Mon Feb 6 06:41:05 2023 From: ccycle713 at gmail.com (ccycle) Date: Mon, 6 Feb 2023 15:41:05 +0900 Subject: Registering account in gitlab.haskell.org In-Reply-To: <7e2dcb9c-5d26-4bdb-8382-10e7840efa00@Spark> References: <7e2dcb9c-5d26-4bdb-8382-10e7840efa00@Spark> Message-ID: <8bfda1a8-5fe6-4730-b7b6-045ec16ccb05@Spark> Hi, I'm new to ghc-devs at haskell.org and would like to report a bug in GHC that I have encountered. I tried to log in with an account registered in gitlab.haskell.org to create an issue and then I got the following error: > Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab administrator if you think this is an error. Could someone approve my account? My account pending approval is: Username: ccycle Email: ccycle713 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan at haskell.foundation Mon Feb 6 07:42:30 2023 From: bryan at haskell.foundation (Bryan Richter) Date: Mon, 6 Feb 2023 09:42:30 +0200 Subject: Registering account in gitlab.haskell.org In-Reply-To: <8bfda1a8-5fe6-4730-b7b6-045ec16ccb05@Spark> References: <7e2dcb9c-5d26-4bdb-8382-10e7840efa00@Spark> <8bfda1a8-5fe6-4730-b7b6-045ec16ccb05@Spark> Message-ID: You've been approved! Sorry for the hiccup, there was a spam problem on the server for a while. On Mon, 6 Feb 2023 at 08:41, ccycle wrote: > Hi, I'm new to ghc-devs at haskell.org and > would like to report a bug in GHC that I have encountered. I tried to log > in with an account registered in gitlab.haskell.org to create an issue > and then I got the following error: > > > Your account is pending approval from your GitLab administrator and > hence blocked. Please contact your GitLab administrator if you think this > is an error. > > Could someone approve my account? My account pending approval is: > > Username: ccycle > Email: ccycle713 at gmail.com > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ccycle713 at gmail.com Mon Feb 6 10:40:31 2023 From: ccycle713 at gmail.com (ccycle) Date: Mon, 6 Feb 2023 19:40:31 +0900 Subject: Registering account in gitlab.haskell.org In-Reply-To: References: <7e2dcb9c-5d26-4bdb-8382-10e7840efa00@Spark> <8bfda1a8-5fe6-4730-b7b6-045ec16ccb05@Spark> Message-ID: Thank you, but now I got same error and cannot log in. Will I able to log in after a while? On Feb 6, 2023 16:42 +0900, Bryan Richter , wrote: > You've been approved! Sorry for the hiccup, there was a spam problem on the server for a while. > > > On Mon, 6 Feb 2023 at 08:41, ccycle wrote: > > > Hi, I'm new to ghc-devs at haskell.org and would like to report a bug in GHC that I have encountered. I tried to log in with an account registered in gitlab.haskell.org to create an issue and then I got the following error: > > > > > > > Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab administrator if you think this is an error. > > > > > > Could someone approve my account? My account pending approval is: > > > > > > Username: ccycle > > > Email: ccycle713 at gmail.com > > > > > > > > > _______________________________________________ > > > ghc-devs mailing list > > > ghc-devs at haskell.org > > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan at haskell.foundation Mon Feb 6 10:47:51 2023 From: bryan at haskell.foundation (Bryan Richter) Date: Mon, 6 Feb 2023 12:47:51 +0200 Subject: Registering account in gitlab.haskell.org In-Reply-To: References: <7e2dcb9c-5d26-4bdb-8382-10e7840efa00@Spark> <8bfda1a8-5fe6-4730-b7b6-045ec16ccb05@Spark> Message-ID: My fault. I chose the wrong "confirmation" option in the admin panel. It is the one that manually confirms your email address. Now I've also approved your account! On Mon, 6 Feb 2023 at 12:40, ccycle wrote: > Thank you, but now I got same error and cannot log in. Will I able to log > in after a while? > On Feb 6, 2023 16:42 +0900, Bryan Richter , > wrote: > > You've been approved! Sorry for the hiccup, there was a spam problem on > the server for a while. > > On Mon, 6 Feb 2023 at 08:41, ccycle wrote: > >> Hi, I'm new to ghc-devs at haskell.org and >> would like to report a bug in GHC that I have encountered. I tried to log >> in with an account registered in gitlab.haskell.org to create an issue >> and then I got the following error: >> >> > Your account is pending approval from your GitLab administrator and >> hence blocked. Please contact your GitLab administrator if you think this >> is an error. >> >> Could someone approve my account? My account pending approval is: >> >> Username: ccycle >> Email: ccycle713 at gmail.com >> >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ccycle713 at gmail.com Mon Feb 6 11:22:24 2023 From: ccycle713 at gmail.com (ccycle) Date: Mon, 6 Feb 2023 20:22:24 +0900 Subject: Registering account in gitlab.haskell.org In-Reply-To: References: <7e2dcb9c-5d26-4bdb-8382-10e7840efa00@Spark> <8bfda1a8-5fe6-4730-b7b6-045ec16ccb05@Spark> Message-ID: Now I can successfully log in. Thank you for approving! On Feb 6, 2023 19:48 +0900, Bryan Richter , wrote: > My fault. I chose the wrong "confirmation" option in the admin panel. It is the one that manually confirms your email address. > > Now I've also approved your account! > > > On Mon, 6 Feb 2023 at 12:40, ccycle wrote: > > > Thank you, but now I got same error and cannot log in. Will I able to log in after a while? > > > On Feb 6, 2023 16:42 +0900, Bryan Richter , wrote: > > > > You've been approved! Sorry for the hiccup, there was a spam problem on the server for a while. > > > > > > > > > On Mon, 6 Feb 2023 at 08:41, ccycle wrote: > > > > > > Hi, I'm new to ghc-devs at haskell.org and would like to report a bug in GHC that I have encountered. I tried to log in with an account registered in gitlab.haskell.org to create an issue and then I got the following error: > > > > > > > > > > > > > Your account is pending approval from your GitLab administrator and hence blocked. Please contact your GitLab administrator if you think this is an error. > > > > > > > > > > > > Could someone approve my account? My account pending approval is: > > > > > > > > > > > > Username: ccycle > > > > > > Email: ccycle713 at gmail.com > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > ghc-devs mailing list > > > > > > ghc-devs at haskell.org > > > > > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From eternal.recursion at proton.me Mon Feb 6 12:42:41 2023 From: eternal.recursion at proton.me (Eternal Recursion) Date: Mon, 06 Feb 2023 12:42:41 +0000 Subject: Using GHC API with multiple targets In-Reply-To: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> Message-ID: If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. Sincerely, Bob Sent with [Proton Mail](https://proton.me/) secure email. ------- Original Message ------- On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs wrote: > Hi Everyone! > > I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. > > How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? > > What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? > > This is my current code: > > withPath :: FilePath -> IO () > withPath target = do > let targetDir = takeDirectory target > let targetFile = takeFileName target > listing <- listDirectory targetDir > let imports = filter (\f -> takeExtension f == ".hs") listing > print imports > let moduleName = mkModuleName targetFile > g <- defaultErrorHandler defaultFatalMessager defaultFlushOut > $ runGhc (Just libdir) $ do > initGhcMonad (Just libdir) > dynflags <- getSessionDynFlags > setSessionDynFlags $ dynflags { ghcLink = LinkInMemory > , ghcMode = CompManager > , backend = Interpreter > , mainModuleNameIs = moduleName > , workingDirectory = Just targetDir > , importPaths = [targetDir] ++ importPaths dynflags > } > > targets <- mapM (\t -> guessTarget t Nothing Nothing) imports > setTargets targets > setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] > load LoadAllTargets > liftIO . print . ppr =<< getTargets > getModuleGraph > putStrLn "Here we go!" > print $ ppr $ mgModSummaries g putStrLn "☝️ " > > However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: > > $ cabal run cli -- example/app/Main.hs > Up to date > ["Main.hs","Lib.hs","Lib2.hs"] > [main:Main.hs, main:Lib.hs, main:Lib2.hs] > Here we go! > [ModSummary { > ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be > ms_mod = Lib, > unit = main > ms_textual_imps = [(, Prelude)] > ms_srcimps = [] > }, > ModSummary { > ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd > ms_mod = Lib2, > unit = main > ms_textual_imps = [(, Prelude)] > ms_srcimps = [] > }, > ModSummary { > ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f > ms_mod = Main, > unit = main > ms_textual_imps = [(, Prelude), (, Lib2)] > ms_srcimps = [] > }] > ☝ > > example/app/Main.hs:4:1: error: > Could not find module ‘Lib2’ > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > | > 4 |import qualified Lib2 as L2 > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > cli: example/app/Main.hs:4:1: error: > Could not find module `Lib2' > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > ​What do I need to do differently to make this work? > > I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! > > Sincerely, > > Bob > > Sent with [Proton Mail](https://proton.me/) secure email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From klebinger.andreas at gmx.at Mon Feb 6 12:53:36 2023 From: klebinger.andreas at gmx.at (Andreas Klebinger) Date: Mon, 6 Feb 2023 13:53:36 +0100 Subject: Using GHC API with multiple targets In-Reply-To: References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> Message-ID: <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more help tehre. I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various things when using the ghc api to implement your own interpreter. Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting:                   , workingDirectory = Just targetDir                   , importPaths      = [targetDir] ++ importPaths dynflags would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > If this is the wrong forum for this question (which as I think about > it, I suppose it is) then redirection to a more appropriate mailing > list or forum (or any advice, really) would be appreciated. I just > figured this would be the forum with the best understanding of how the > GHC API works (and has changed over time), and my longer term goal is > indeed to contribute to it after I get past my learning curve. > > Sincerely, > > Bob > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via > ghc-devs wrote: > >> Hi Everyone! >> >> I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. >> >> How do I correctly set a GHC Session's DynFlags (and/or other >> properties) to ensure local libraries imported by the main target are >> resolved properly at compile time? >> >> What flags need to be set so that GHC is able to load/analyze/compile >> all relevant Libraries in a package? >> >> This is my current code: >> >> withPath :: FilePath -> IO () >> withPath target = do >> let targetDir = takeDirectory target >>   let targetFile = takeFileName target >> listing <- listDirectory targetDir >>   let imports = filter (\f -> takeExtension f == ".hs") listing >>   print imports >>   let moduleName = mkModuleName targetFile >>   g <- defaultErrorHandler defaultFatalMessager defaultFlushOut >>     $ runGhc (Just libdir) $ do >> initGhcMonad (Just libdir) >> dynflags <- getSessionDynFlags >> setSessionDynFlags $ dynflags { ghcLink          = LinkInMemory >>                           , ghcMode          = CompManager >>                           , backend          = Interpreter >>                           , mainModuleNameIs = moduleName >>                           , workingDirectory = Just targetDir >>                           , importPaths      = [targetDir] ++ >> importPaths dynflags >>                           } >> targets <- mapM (\t -> guessTarget t Nothing Nothing) imports >> setTargets targets >> setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] >> load LoadAllTargets >> liftIO . print . ppr =<< getTargets >> getModuleGraph >> putStrLn "Here we go!" >>   print $ ppr $ mgModSummaries g >> putStrLn "☝️ " >> >> However, when I run it (passing to example/app/Main.hs, in which >> directory are Lib.hs and Lib2.hs, the latter being imported into >> Main), I get: >> >> $cabal run cli -- example/app/Main.hs >> Up to date >> ["Main.hs","Lib.hs","Lib2.hs"] >> [main:Main.hs, main:Lib.hs, main:Lib2.hs] >> Here we go! >> [ModSummary { >>    ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be >>    ms_mod = Lib, >>    unit = main >>    ms_textual_imps = [(, Prelude)] >>    ms_srcimps = [] >> }, >> ModSummary { >>    ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd >>    ms_mod = Lib2, >>    unit = main >>    ms_textual_imps = [(, Prelude)] >>    ms_srcimps = [] >> }, >> ModSummary { >>    ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f >>    ms_mod = Main, >>    unit = main >>    ms_textual_imps = [(, Prelude), (, Lib2)] >>    ms_srcimps = [] >> }] >> ☝ >> >> example/app/Main.hs:4:1: error: >>    Could not find module ‘Lib2’ >>    Use -v (or `:set -v` in ghci) to see a list of the files searched for. >>  | >> 4 |import qualified Lib2 as L2 >>  |^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> cli: example/app/Main.hs:4:1: error: >>    Could not find module `Lib2' >>    Use -v (or `:set -v` in ghci) to see a list of the files searched >> for. >> >> ​What do I need to do differently to make this work? >> >> I have a local Cabal file I could use, but to know what I need out of >> it, I need to understand the minimum required info to get this to >> work. TIA! >> >> Sincerely, >> >> Bob >> >> Sent with Proton Mail secure email. > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewtpickering at gmail.com Mon Feb 6 12:59:42 2023 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Mon, 6 Feb 2023 12:59:42 +0000 Subject: Using GHC API with multiple targets In-Reply-To: <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> Message-ID: Looks like it would work to me if you remove ``` setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] ``` Why do you have this line? Matt On Mon, Feb 6, 2023 at 12:54 PM Andreas Klebinger wrote: > > I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more > help tehre. > > I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various > things when using the ghc api to implement your own interpreter. > > Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting: > > , workingDirectory = Just targetDir > , importPaths = [targetDir] ++ importPaths dynflags > > would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. > > Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > > If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. > > Sincerely, > > Bob > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs wrote: > > Hi Everyone! > > I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. > > How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? > > What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? > > This is my current code: > > withPath :: FilePath -> IO () > withPath target = do > let targetDir = takeDirectory target > let targetFile = takeFileName target > listing <- listDirectory targetDir > let imports = filter (\f -> takeExtension f == ".hs") listing > print imports > let moduleName = mkModuleName targetFile > g <- defaultErrorHandler defaultFatalMessager defaultFlushOut > $ runGhc (Just libdir) $ do > initGhcMonad (Just libdir) > dynflags <- getSessionDynFlags > setSessionDynFlags $ dynflags { ghcLink = LinkInMemory > , ghcMode = CompManager > , backend = Interpreter > , mainModuleNameIs = moduleName > , workingDirectory = Just targetDir > , importPaths = [targetDir] ++ importPaths dynflags > } > > targets <- mapM (\t -> guessTarget t Nothing Nothing) imports > setTargets targets > setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] > load LoadAllTargets > liftIO . print . ppr =<< getTargets > getModuleGraph > putStrLn "Here we go!" > print $ ppr $ mgModSummaries g > putStrLn "☝️ " > > However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: > > $ cabal run cli -- example/app/Main.hs > Up to date > ["Main.hs","Lib.hs","Lib2.hs"] > [main:Main.hs, main:Lib.hs, main:Lib2.hs] > Here we go! > [ModSummary { > ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be > ms_mod = Lib, > unit = main > ms_textual_imps = [(, Prelude)] > ms_srcimps = [] > }, > ModSummary { > ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd > ms_mod = Lib2, > unit = main > ms_textual_imps = [(, Prelude)] > ms_srcimps = [] > }, > ModSummary { > ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f > ms_mod = Main, > unit = main > ms_textual_imps = [(, Prelude), (, Lib2)] > ms_srcimps = [] > }] > ☝ > > example/app/Main.hs:4:1: error: > Could not find module ‘Lib2’ > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > | > 4 | import qualified Lib2 as L2 > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > cli: example/app/Main.hs:4:1: error: > Could not find module `Lib2' > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > What do I need to do differently to make this work? > > I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! > > Sincerely, > > Bob > > Sent with Proton Mail secure email. > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From eternal.recursion at proton.me Mon Feb 6 13:18:11 2023 From: eternal.recursion at proton.me (Eternal Recursion) Date: Mon, 06 Feb 2023 13:18:11 +0000 Subject: Using GHC API with multiple targets In-Reply-To: References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> Message-ID: Tbh, the current code is a bit of a Frankenstein cobbled together from the dead limbs of online GHC API tutorials past. I think that line was the swollen appendix of something. :) But I can confirm that commenting out that line does not help. I get exactly the same module graph output and error message. I will add enhanced verbosity as Andreas suggests and see under what rocks it's looking for Lib2. I can't believe it can't find it. I mean, it's right there. Looking at the module graph, I gather I should want to see the local modules Lib and Lib2 in the ms_srcimps list. The ms_textual_imps list appears to be just a list of what modules are listed in the imports statements. I also note parenthetically that the Lib import line is commented out in Main.hs. When I add it, it seems to be resolving to the wrong Lib module (libiserve or something like that IIRC) and then complains the function I'm trying to call isn't exported by it. Any background about DynFlags for context is appreciated. It seems a rather large construct that has seen some mission creep and redesign efforts over the years... Sincerely, Bob Sent with Proton Mail secure email. ------- Original Message ------- On Monday, February 6th, 2023 at 7:59 AM, Matthew Pickering wrote: > Looks like it would work to me if you remove > > `setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ]` > > Why do you have this line? > > Matt > > On Mon, Feb 6, 2023 at 12:54 PM Andreas Klebinger > klebinger.andreas at gmx.at wrote: > > > I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more > > help tehre. > > > > I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various > > things when using the ghc api to implement your own interpreter. > > > > Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting: > > > > , workingDirectory = Just targetDir > > , importPaths = [targetDir] ++ importPaths dynflags > > > > would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. > > > > Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > > > > If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. > > > > Sincerely, > > > > Bob > > > > Sent with Proton Mail secure email. > > > > ------- Original Message ------- > > On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs ghc-devs at haskell.org wrote: > > > > Hi Everyone! > > > > I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. > > > > How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? > > > > What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? > > > > This is my current code: > > > > withPath :: FilePath -> IO () > > withPath target = do > > let targetDir = takeDirectory target > > let targetFile = takeFileName target > > listing <- listDirectory targetDir > > let imports = filter (\f -> takeExtension f == ".hs") listing > > print imports > > let moduleName = mkModuleName targetFile > > g <- defaultErrorHandler defaultFatalMessager defaultFlushOut > > $ runGhc (Just libdir) $ do > > initGhcMonad (Just libdir) > > dynflags <- getSessionDynFlags > > setSessionDynFlags $ dynflags { ghcLink = LinkInMemory > > , ghcMode = CompManager > > , backend = Interpreter > > , mainModuleNameIs = moduleName > > , workingDirectory = Just targetDir > > , importPaths = [targetDir] ++ importPaths dynflags > > } > > > > targets <- mapM (\t -> guessTarget t Nothing Nothing) imports > > setTargets targets > > setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] > > load LoadAllTargets > > liftIO . print . ppr =<< getTargets > > getModuleGraph > > putStrLn "Here we go!" > > print $ ppr $ mgModSummaries g > > putStrLn "☝️ " > > > > However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: > > > > $ cabal run cli -- example/app/Main.hs > > Up to date > > ["Main.hs","Lib.hs","Lib2.hs"] > > [main:Main.hs, main:Lib.hs, main:Lib2.hs] > > Here we go! > > [ModSummary { > > ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be > > ms_mod = Lib, > > unit = main > > ms_textual_imps = [(, Prelude)] > > ms_srcimps = [] > > }, > > ModSummary { > > ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd > > ms_mod = Lib2, > > unit = main > > ms_textual_imps = [(, Prelude)] > > ms_srcimps = [] > > }, > > ModSummary { > > ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f > > ms_mod = Main, > > unit = main > > ms_textual_imps = [(, Prelude), (, Lib2)] > > ms_srcimps = [] > > }] > > ☝ > > > > example/app/Main.hs:4:1: error: > > Could not find module ‘Lib2’ > > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > | > > 4 | import qualified Lib2 as L2 > > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > cli: example/app/Main.hs:4:1: error: > > Could not find module `Lib2' Use -v (or` :set -v` in ghci) to see a list of the files searched for. > > > > What do I need to do differently to make this work? > > > > I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! > > > > Sincerely, > > > > Bob > > > > Sent with Proton Mail secure email. > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From eternal.recursion at proton.me Mon Feb 6 13:34:19 2023 From: eternal.recursion at proton.me (Eternal Recursion) Date: Mon, 06 Feb 2023 13:34:19 +0000 Subject: Using GHC API with multiple targets In-Reply-To: <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> Message-ID: Thanks, Andreas! I will check out the hint​ package and also play with verbosity and workingDirectory. I considered using the Cabal library to derive the inputs from the project's cabal file, but it does help first to know what the needful inputs are, and where to stash them in the DynFlags session settings. It's got to be one of those "One Weird Trick (tm)" gotcha settings that make it suddenly work. It seems obvious what some of the settings mean, but I suppose with more familiarity will come appreciation of nuances that make the apparently obvious meaning seem obviously wrong. Sincerely, Bob Sent with [Proton Mail](https://proton.me/) secure email. ------- Original Message ------- On Monday, February 6th, 2023 at 7:53 AM, Andreas Klebinger wrote: > I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more > help tehre. > > I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various > things when using the ghc api to implement your own interpreter. > > Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting: > > , workingDirectory = Just targetDir > , importPaths = [targetDir] ++ importPaths dynflags > > would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. > > Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > >> If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. >> >> Sincerely, >> >> Bob >> >> Sent with [Proton Mail](https://proton.me/) secure email. >> >> ------- Original Message ------- >> On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs [](mailto:ghc-devs at haskell.org) wrote: >> >>> Hi Everyone! >>> >>> I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. >>> >>> How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? >>> >>> What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? >>> >>> This is my current code: >>> >>> withPath :: FilePath -> IO () >>> withPath target = do >>> let targetDir = takeDirectory target >>> let targetFile = takeFileName target >>> listing <- listDirectory targetDir >>> let imports = filter (\f -> takeExtension f == ".hs") listing >>> print imports >>> let moduleName = mkModuleName targetFile >>> g <- defaultErrorHandler defaultFatalMessager defaultFlushOut >>> $ runGhc (Just libdir) $ do >>> initGhcMonad (Just libdir) >>> dynflags <- getSessionDynFlags >>> setSessionDynFlags $ dynflags { ghcLink = LinkInMemory >>> , ghcMode = CompManager >>> , backend = Interpreter >>> , mainModuleNameIs = moduleName >>> , workingDirectory = Just targetDir >>> , importPaths = [targetDir] ++ importPaths dynflags >>> } >>> >>> targets <- mapM (\t -> guessTarget t Nothing Nothing) imports >>> setTargets targets >>> setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] >>> load LoadAllTargets >>> liftIO . print . ppr =<< getTargets >>> getModuleGraph >>> putStrLn "Here we go!" >>> print $ ppr $ mgModSummaries g putStrLn "☝️ " >>> >>> However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: >>> >>> $ cabal run cli -- example/app/Main.hs >>> Up to date >>> ["Main.hs","Lib.hs","Lib2.hs"] >>> [main:Main.hs, main:Lib.hs, main:Lib2.hs] >>> Here we go! >>> [ModSummary { >>> ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be >>> ms_mod = Lib, >>> unit = main >>> ms_textual_imps = [(, Prelude)] >>> ms_srcimps = [] >>> }, >>> ModSummary { >>> ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd >>> ms_mod = Lib2, >>> unit = main >>> ms_textual_imps = [(, Prelude)] >>> ms_srcimps = [] >>> }, >>> ModSummary { >>> ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f >>> ms_mod = Main, >>> unit = main >>> ms_textual_imps = [(, Prelude), (, Lib2)] >>> ms_srcimps = [] >>> }] >>> ☝ >>> >>> example/app/Main.hs:4:1: error: >>> Could not find module ‘Lib2’ >>> Use -v (or `:set -v` in ghci) to see a list of the files searched for. >>> | >>> 4 |import qualified Lib2 as L2 >>> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> cli: example/app/Main.hs:4:1: error: >>> Could not find module `Lib2' >>> Use -v (or `:set -v` in ghci) to see a list of the files searched for. >>> >>> ​What do I need to do differently to make this work? >>> >>> I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! >>> >>> Sincerely, >>> >>> Bob >>> >>> Sent with [Proton Mail](https://proton.me/) secure email. >> >> _______________________________________________ >> ghc-devs mailing list >> ghc-devs at haskell.org >> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewtpickering at gmail.com Mon Feb 6 13:56:03 2023 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Mon, 6 Feb 2023 13:56:03 +0000 Subject: Using GHC API with multiple targets In-Reply-To: References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> Message-ID: Can you put the whole example into a github repo and then I will look at what is wrong? Matt On Mon, Feb 6, 2023 at 1:34 PM Eternal Recursion via ghc-devs wrote: > > Thanks, Andreas! > > I will check out the hint package and also play with verbosity and workingDirectory. > > I considered using the Cabal library to derive the inputs from the project's cabal file, but it does help first to know what the needful inputs are, and where to stash them in the DynFlags session settings. > > It's got to be one of those "One Weird Trick (tm)" gotcha settings that make it suddenly work. It seems obvious what some of the settings mean, but I suppose with more familiarity will come appreciation of nuances that make the apparently obvious meaning seem obviously wrong. > > Sincerely, > > Bob > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Monday, February 6th, 2023 at 7:53 AM, Andreas Klebinger wrote: > > I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more > help tehre. > > I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various > things when using the ghc api to implement your own interpreter. > > Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting: > > , workingDirectory = Just targetDir > , importPaths = [targetDir] ++ importPaths dynflags > > would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. > > Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > > If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. > > Sincerely, > > Bob > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs wrote: > > Hi Everyone! > > I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. > > How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? > > What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? > > This is my current code: > > withPath :: FilePath -> IO () > withPath target = do > let targetDir = takeDirectory target > let targetFile = takeFileName target > listing <- listDirectory targetDir > let imports = filter (\f -> takeExtension f == ".hs") listing > print imports > let moduleName = mkModuleName targetFile > g <- defaultErrorHandler defaultFatalMessager defaultFlushOut > $ runGhc (Just libdir) $ do > initGhcMonad (Just libdir) > dynflags <- getSessionDynFlags > setSessionDynFlags $ dynflags { ghcLink = LinkInMemory > , ghcMode = CompManager > , backend = Interpreter > , mainModuleNameIs = moduleName > , workingDirectory = Just targetDir > , importPaths = [targetDir] ++ importPaths dynflags > } > targets <- mapM (\t -> guessTarget t Nothing Nothing) imports > setTargets targets > setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] > load LoadAllTargets > liftIO . print . ppr =<< getTargets > getModuleGraph > putStrLn "Here we go!" > print $ ppr $ mgModSummaries g > putStrLn "☝️ " > > However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: > > $ cabal run cli -- example/app/Main.hs > Up to date > ["Main.hs","Lib.hs","Lib2.hs"] > [main:Main.hs, main:Lib.hs, main:Lib2.hs] > Here we go! > [ModSummary { > ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be > ms_mod = Lib, > unit = main > ms_textual_imps = [(, Prelude)] > ms_srcimps = [] > }, > ModSummary { > ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd > ms_mod = Lib2, > unit = main > ms_textual_imps = [(, Prelude)] > ms_srcimps = [] > }, > ModSummary { > ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f > ms_mod = Main, > unit = main > ms_textual_imps = [(, Prelude), (, Lib2)] > ms_srcimps = [] > }] > ☝ > > example/app/Main.hs:4:1: error: > Could not find module ‘Lib2’ > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > | > 4 | import qualified Lib2 as L2 > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > cli: example/app/Main.hs:4:1: error: > Could not find module `Lib2' > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > What do I need to do differently to make this work? > > I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! > > Sincerely, > > Bob > > Sent with Proton Mail secure email. > > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From zubin at well-typed.com Fri Feb 10 14:50:14 2023 From: zubin at well-typed.com (Zubin Duggal) Date: Fri, 10 Feb 2023 20:20:14 +0530 Subject: [Haskell] [ANNOUNCE] GHC 9.2.6 released Message-ID: <20230210145014.mr7gkdghbqzivd2h@zubin-pc> The GHC developers are happy to announce the availability of GHC 9.2.6. Binary distributions, source distributions, and documentation are available at [downloads.haskell.org](https://downloads.haskell.org/ghc/9.2.6). Download Page: https://www.haskell.org/ghc/download_ghc_9_2_6.html Blog Post: https://www.haskell.org/ghc/blog/20230210-ghc-9.2.6-released.html This release is primarily a bugfix release addressing a few issues found in 9.2.5. These include: * Fixes for a number of simplifier issues typically resulting in compiler panics (#22491, #22482, #19824, #22718, #22662, #22039). * Fix for a simplifier regression in 9.2.5 that could impact runtime performance when compiling with optimisations due to duplication of expensive work (#22425). * Various stability improvments and bug fixes for the non moving and parallel GCs (#22528, #20221, #22264, #22327, #22929, #22927, #22929, #22930). * Allow certain keywords which can be used as variable names with `-XOverloadedRecordDot` (#20723). * Improvements to typechecker performance for modules with holes in type signatures (#14766) * Bump `gmp-tarballs` to a version which doesn't use the reserved `x18` register on AArch64/Darwin systems, and also has fixes for CVE-2021-43618 (#22497, #22789). * ... and a few more. See the [release notes] for a full accounting. As some of the fixed issues do affect correctness users are encouraged to upgrade promptly. We would like to thank Microsoft Azure, GitHub, IOG, the Zw3rk stake pool, Well-Typed, Tweag I/O, Serokell, Equinix, SimSpace, Haskell Foundation, and other anonymous contributors whose on-going financial and in-kind support has facilitated GHC maintenance and release management over the years. Finally, this release would not have been possible without the hundreds of open-source contributors whose work comprise this release. As always, do give this release a try and open a [ticket][] if you see anything amiss. Happy compiling, - Zubin [ticket]: https://gitlab.haskell.org/ghc/ghc/-/issues/new [release notes]: https://downloads.haskell.org/~ghc/9.2.6/docs/html/users_guide/9.2.6-notes.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: not available URL: From hecate at glitchbra.in Mon Feb 13 18:03:30 2023 From: hecate at glitchbra.in (=?UTF-8?Q?H=c3=a9cate?=) Date: Mon, 13 Feb 2023 19:03:30 +0100 Subject: Getting Info Table Profiling to the finish line Message-ID: <1f3c0770-a7e4-750e-237f-db8d735a5f0a@glitchbra.in> Hello fellow devs, I am indexing the work necessary to bring Info Table Profiling to the finish line: Seamless for the user to employ. Some of the tickets refer to external ticket trackers, they have been marked as FOREIGN. Their counterpart tickets will be opened there when the situation unlocks on our side. The epic is at https://gitlab.haskell.org/groups/ghc/-/epics/3 Please feel free to link future tickets that are related to this newer, better way of doing space profiling. My thanks to Matthew Pickering, David Eichmann, and Ben Gamari. Cheers, Hécate (with a project manager hat on, apparently!) -- Hécate ✨ 🐦: @TechnoEmpress IRC: Hecate WWW: https://glitchbra.in RUN: BSD From allbery.b at gmail.com Mon Feb 13 19:14:49 2023 From: allbery.b at gmail.com (Brandon Allbery) Date: Mon, 13 Feb 2023 14:14:49 -0500 Subject: `ideclImplicit` in compiler/GHC/Iface/Ext/Ast.hs? Message-ID: I'm researching a potential GHC proposal to allow "Prelude-like" imports, which in practice means silencing warnings about implicit use of symbols from them (-Wmissing-import-lists and similar). So far, it looks like `ideclImplicit` does almost exactly what I want and all I need is syntax to set it on imports other than the implicit Prelude import. With one notable exception: around compiler/GHC/Iface/Ext/Ast.hs line 326 (HEAD as of Saturday) there is a use that appears to intend to exclude the implicit Prelude import, without conditionalizing on Prelude like e.g. compiler/GHC/Tc/Module.hs lines 1685--1687. I have several questions about it. 1. The implicit import, but not explicit imports, are excluded from the extended .hi file? This seems wrong-ish to me; I'm wondering if it's actually looking to do something else such as strip it down to only the symbols in use. But I don't really know what the code here is supposed to do. 2. Should other "implicit" imports also be excluded the same way? -- brandon s allbery kf8nh allbery.b at gmail.com From matthewtpickering at gmail.com Tue Feb 14 12:04:27 2023 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Tue, 14 Feb 2023 12:04:27 +0000 Subject: Using GHC API with multiple targets In-Reply-To: References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> Message-ID: The GHC API code you give is fine, and works correctly. In the whole reproducer there is some additional code `getCoreFS` which is where the error comes from. On Mon, Feb 6, 2023 at 1:56 PM Matthew Pickering wrote: > > Can you put the whole example into a github repo and then I will look > at what is wrong? > > Matt > > On Mon, Feb 6, 2023 at 1:34 PM Eternal Recursion via ghc-devs > wrote: > > > > Thanks, Andreas! > > > > I will check out the hint package and also play with verbosity and workingDirectory. > > > > I considered using the Cabal library to derive the inputs from the project's cabal file, but it does help first to know what the needful inputs are, and where to stash them in the DynFlags session settings. > > > > It's got to be one of those "One Weird Trick (tm)" gotcha settings that make it suddenly work. It seems obvious what some of the settings mean, but I suppose with more familiarity will come appreciation of nuances that make the apparently obvious meaning seem obviously wrong. > > > > Sincerely, > > > > Bob > > > > Sent with Proton Mail secure email. > > > > ------- Original Message ------- > > On Monday, February 6th, 2023 at 7:53 AM, Andreas Klebinger wrote: > > > > I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more > > help tehre. > > > > I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various > > things when using the ghc api to implement your own interpreter. > > > > Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting: > > > > , workingDirectory = Just targetDir > > , importPaths = [targetDir] ++ importPaths dynflags > > > > would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. > > > > Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > > > > If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. > > > > Sincerely, > > > > Bob > > > > Sent with Proton Mail secure email. > > > > ------- Original Message ------- > > On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs wrote: > > > > Hi Everyone! > > > > I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. > > > > How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? > > > > What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? > > > > This is my current code: > > > > withPath :: FilePath -> IO () > > withPath target = do > > let targetDir = takeDirectory target > > let targetFile = takeFileName target > > listing <- listDirectory targetDir > > let imports = filter (\f -> takeExtension f == ".hs") listing > > print imports > > let moduleName = mkModuleName targetFile > > g <- defaultErrorHandler defaultFatalMessager defaultFlushOut > > $ runGhc (Just libdir) $ do > > initGhcMonad (Just libdir) > > dynflags <- getSessionDynFlags > > setSessionDynFlags $ dynflags { ghcLink = LinkInMemory > > , ghcMode = CompManager > > , backend = Interpreter > > , mainModuleNameIs = moduleName > > , workingDirectory = Just targetDir > > , importPaths = [targetDir] ++ importPaths dynflags > > } > > targets <- mapM (\t -> guessTarget t Nothing Nothing) imports > > setTargets targets > > setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] > > load LoadAllTargets > > liftIO . print . ppr =<< getTargets > > getModuleGraph > > putStrLn "Here we go!" > > print $ ppr $ mgModSummaries g > > putStrLn "☝️ " > > > > However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: > > > > $ cabal run cli -- example/app/Main.hs > > Up to date > > ["Main.hs","Lib.hs","Lib2.hs"] > > [main:Main.hs, main:Lib.hs, main:Lib2.hs] > > Here we go! > > [ModSummary { > > ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be > > ms_mod = Lib, > > unit = main > > ms_textual_imps = [(, Prelude)] > > ms_srcimps = [] > > }, > > ModSummary { > > ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd > > ms_mod = Lib2, > > unit = main > > ms_textual_imps = [(, Prelude)] > > ms_srcimps = [] > > }, > > ModSummary { > > ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f > > ms_mod = Main, > > unit = main > > ms_textual_imps = [(, Prelude), (, Lib2)] > > ms_srcimps = [] > > }] > > ☝ > > > > example/app/Main.hs:4:1: error: > > Could not find module ‘Lib2’ > > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > | > > 4 | import qualified Lib2 as L2 > > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > cli: example/app/Main.hs:4:1: error: > > Could not find module `Lib2' > > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > > > What do I need to do differently to make this work? > > > > I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! > > > > Sincerely, > > > > Bob > > > > Sent with Proton Mail secure email. > > > > > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > > > _______________________________________________ > > ghc-devs mailing list > > ghc-devs at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From ben at well-typed.com Tue Feb 14 13:39:08 2023 From: ben at well-typed.com (Ben Gamari) Date: Tue, 14 Feb 2023 08:39:08 -0500 Subject: [ANNOUNCE] GHC 9.6.1-alpha3 is now available Message-ID: <87k00knz88.fsf@smart-cactus.org> The GHC team is very pleased to announce the availability of GHC 9.6.1-alpha3. As usual, binaries and source distributions are available at downloads.haskell.org: https://downloads.haskell.org/ghc/9.6.1-alpha3/ Beginning with GHC 9.6.1, GHC can be built as a cross-compiler to WebAssembly and JavaScript. This is an important step towards robust support for compiling Haskell to the Web, but there are a few caveats to be aware of in the 9.6 series: - Both the Javascript and WebAssembly backends are still at an early stage of development and are present in this release as a technology preview - Using GHC as a cross-compiler is not as easy as we would like it to be; in particular, there are challenges related to Template Haskell - GHC is not yet run-time retargetable; a given GHC binary targets exactly one platform, and both WebAssembly and JavaScript are considered platforms for this purpose. Cross-compilers must be built from source by their users We hope to lift all of these limitations in future releases. Additionally, 9.6.1 will include: - Significant latency improvements in the non-moving garbage collector - Efficient runtime support for delimited continuations - Improvements in compiler error messages - Numerous improvements in the compiler's memory usage See the [release notes] for a comprehensive accounting of changes in this release. As always, one can find a [migration guide] to aid in transitioning from older releases on the GHC Wiki. We have also recently started extending our release process to cover a wider set of Linux distributions. In particular, we now offer Rocky 8 and Ubuntu 20.04 binary distributions which cover RedHat-derivative and distributions using older `glibc` releases (namely 2.27), respectively. Please do give this release a try and open a [ticket] if you see anything amiss. Cheers, - Ben [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ [migration guide]: https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.6 [release notes]: https://downloads.haskell.org/ghc/9.6.1-alpha3/docs/users_guide/9.6.1-notes.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From george.colpitts at gmail.com Tue Feb 14 15:21:45 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Tue, 14 Feb 2023 11:21:45 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha3 is now available In-Reply-To: <87k00knz88.fsf@smart-cactus.org> References: <87k00knz88.fsf@smart-cactus.org> Message-ID: Hi I get a strange warning on MacOS when I do ./configure: checking Xcode version... xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance not found (too old?) I also get a related strange warning when I do a compile: ghc hello.hs [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object file] [2 of 2] Linking hello [Objects changed] ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' I'm on macOS 13.2.1. I was previously on ghc 9.4.4. Thanks George On Tue, Feb 14, 2023 at 9:39 AM Ben Gamari wrote: > > The GHC team is very pleased to announce the availability of GHC > 9.6.1-alpha3. > As usual, binaries and source distributions are available at > downloads.haskell.org: > > https://downloads.haskell.org/ghc/9.6.1-alpha3/ > > Beginning with GHC 9.6.1, GHC can be built as a cross-compiler to > WebAssembly and JavaScript. This is an important step towards robust > support for compiling Haskell to the Web, but there are a few caveats to > be aware of in the 9.6 series: > > - Both the Javascript and WebAssembly backends are still at an early > stage of development and are present in this release as a technology > preview > > - Using GHC as a cross-compiler is not as easy as we would like it to > be; in particular, there are challenges related to Template Haskell > > - GHC is not yet run-time retargetable; a given GHC binary targets > exactly one platform, and both WebAssembly and JavaScript are considered > platforms for this purpose. Cross-compilers must be built from source by > their users > > We hope to lift all of these limitations in future releases. > > Additionally, 9.6.1 will include: > > - Significant latency improvements in the non-moving garbage collector > > - Efficient runtime support for delimited continuations > > - Improvements in compiler error messages > > - Numerous improvements in the compiler's memory usage > > See the [release notes] for a comprehensive accounting of changes in this > release. > > As always, one can find a [migration guide] to aid in transitioning from > older > releases on the GHC Wiki. We have also recently started extending our > release process to cover a wider set of Linux distributions. In > particular, we now offer Rocky 8 and Ubuntu 20.04 binary distributions > which cover RedHat-derivative and distributions using older `glibc` > releases (namely 2.27), respectively. > > Please do give this release a try and open a [ticket] if you see anything > amiss. > > Cheers, > > - Ben > > > [ticket]: https://gitlab.haskell.org/ghc/ghc/issues/ > [migration guide]: > https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.6 > [release notes]: > https://downloads.haskell.org/ghc/9.6.1-alpha3/docs/users_guide/9.6.1-notes.html > _______________________________________________ > ghc-devs mailing list > ghc-devs at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at well-typed.com Wed Feb 15 17:20:26 2023 From: ben at well-typed.com (Ben Gamari) Date: Wed, 15 Feb 2023 12:20:26 -0500 Subject: [ANNOUNCE] GHC 9.6.1-alpha3 is now available In-Reply-To: References: <87k00knz88.fsf@smart-cactus.org> Message-ID: <874jrmongf.fsf@smart-cactus.org> George Colpitts writes: > Hi > > I get a strange warning on MacOS when I do ./configure: > > checking Xcode version... xcode-select: error: tool 'xcodebuild' requires > Xcode, but active developer directory '/Library/Developer/CommandLineTools' > is a command line tools instance > not found (too old?) > > > I also get a related strange warning when I do a compile: > > ghc hello.hs > [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object > file] > [2 of 2] Linking hello [Objects changed] > ld: warning: directory not found for option > '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' > Hmm, that is indeed odd. It sounds like you Xcode installation may be broken. Did you upgrade your operating system recently? Do you have Xcode, the CLT package, or both installed? Cheers, - Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From george.colpitts at gmail.com Wed Feb 15 17:51:22 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Wed, 15 Feb 2023 13:51:22 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha3 is now available In-Reply-To: <874jrmongf.fsf@smart-cactus.org> References: <87k00knz88.fsf@smart-cactus.org> <874jrmongf.fsf@smart-cactus.org> Message-ID: Hi Ben Thanks for replying. As I mentioned in my original email I'm on Ventura,13.2.1, I just upgraded to that before installing alpha3. I have command line tools. I did the following to reinstall them and got the same results stated in my email: sudo rm -rf /Library/Developer/CommandLineTools Password: bash-3.2$ xcode-select --install xcode-select: note: install requested for command line developer tools Looking more carefully at the error message: checking Xcode version... xcode-select: error: tool 'xcodebuild' requires > Xcode, but active developer directory '/Library/Developer/CommandLin eTools' > is a command line tools instance > not found (too old?) It seems to be saying that I need Xcode not command line tools. That's also consistent with the linker warning message: ld: warning: directory not found for option '-L/Applications/*Xcode.app* /Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' There is no urgency on my part to get this resolved. We may want to just wait to see if anybody else on 13.2.1 got this also. Thanks George On Wed, Feb 15, 2023 at 1:20 PM Ben Gamari wrote: > George Colpitts writes: > > > Hi > > > > I get a strange warning on MacOS when I do ./configure: > > > > checking Xcode version... xcode-select: error: tool 'xcodebuild' requires > > Xcode, but active developer directory > '/Library/Developer/CommandLineTools' > > is a command line tools instance > > not found (too old?) > > > > > > I also get a related strange warning when I do a compile: > > > > ghc hello.hs > > [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing object > > file] > > [2 of 2] Linking hello [Objects changed] > > ld: warning: directory not found for option > > > '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' > > > Hmm, that is indeed odd. It sounds like you Xcode installation may be > broken. Did you upgrade your operating system recently? Do you have > Xcode, the CLT package, or both installed? > > Cheers, > > - Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.colpitts at gmail.com Wed Feb 15 18:04:52 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Wed, 15 Feb 2023 14:04:52 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha3 is now available In-Reply-To: References: <87k00knz88.fsf@smart-cactus.org> <874jrmongf.fsf@smart-cactus.org> Message-ID: It seems wrong to me that the configure file references Xcode.app and MacOSX12.1: bash-3.2$ fgrep Xcode.app configure FFIIncludeDir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/ffi FFILibDir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib On Wed, Feb 15, 2023 at 1:51 PM George Colpitts wrote: > > Hi Ben > > Thanks for replying. > > As I mentioned in my original email I'm on Ventura,13.2.1, I just upgraded > to that before installing alpha3. > > I have command line tools. I did the following to reinstall them and got > the same results stated in my email: > > sudo rm -rf /Library/Developer/CommandLineTools > Password: > bash-3.2$ xcode-select --install > xcode-select: note: install requested for command line developer tools > > > Looking more carefully at the error message: > > checking Xcode version... xcode-select: error: tool 'xcodebuild' requires > > Xcode, but active developer directory '/Library/Developer/CommandLin > eTools' > > is a command line tools instance > > not found (too old?) > > It seems to be saying that I need Xcode not command line tools. That's > also consistent with the linker warning message: > > ld: warning: directory not found for option '-L/Applications/*Xcode.app* > /Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' > > > There is no urgency on my part to get this resolved. We may want to just > wait to see if anybody else on 13.2.1 got this also. > > Thanks > George > > > On Wed, Feb 15, 2023 at 1:20 PM Ben Gamari wrote: > >> George Colpitts writes: >> >> > Hi >> > >> > I get a strange warning on MacOS when I do ./configure: >> > >> > checking Xcode version... xcode-select: error: tool 'xcodebuild' >> requires >> > Xcode, but active developer directory >> '/Library/Developer/CommandLineTools' >> > is a command line tools instance >> > not found (too old?) >> > >> > >> > I also get a related strange warning when I do a compile: >> > >> > ghc hello.hs >> > [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing >> object >> > file] >> > [2 of 2] Linking hello [Objects changed] >> > ld: warning: directory not found for option >> > >> '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' >> > >> Hmm, that is indeed odd. It sounds like you Xcode installation may be >> broken. Did you upgrade your operating system recently? Do you have >> Xcode, the CLT package, or both installed? >> >> Cheers, >> >> - Ben >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.colpitts at gmail.com Thu Feb 16 16:42:16 2023 From: george.colpitts at gmail.com (George Colpitts) Date: Thu, 16 Feb 2023 12:42:16 -0400 Subject: [ANNOUNCE] GHC 9.6.1-alpha3 is now available In-Reply-To: References: <87k00knz88.fsf@smart-cactus.org> <874jrmongf.fsf@smart-cactus.org> Message-ID: reported as https://gitlab.haskell.org/ghc/ghc/-/issues/22993 Thanks & Regards George On Wed, Feb 15, 2023 at 2:04 PM George Colpitts wrote: > It seems wrong to me that the configure file references Xcode.app and > MacOSX12.1: > > bash-3.2$ fgrep Xcode.app configure > > FFIIncludeDir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/ffi > > FFILibDir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib > > > On Wed, Feb 15, 2023 at 1:51 PM George Colpitts > wrote: > >> >> Hi Ben >> >> Thanks for replying. >> >> As I mentioned in my original email I'm on Ventura,13.2.1, I just >> upgraded to that before installing alpha3. >> >> I have command line tools. I did the following to reinstall them and got >> the same results stated in my email: >> >> sudo rm -rf /Library/Developer/CommandLineTools >> Password: >> bash-3.2$ xcode-select --install >> xcode-select: note: install requested for command line developer tools >> >> >> Looking more carefully at the error message: >> >> checking Xcode version... xcode-select: error: tool 'xcodebuild' requires >> > Xcode, but active developer directory '/Library/Developer/CommandLin >> eTools' >> > is a command line tools instance >> > not found (too old?) >> >> It seems to be saying that I need Xcode not command line tools. That's >> also consistent with the linker warning message: >> >> ld: warning: directory not found for option '-L/Applications/*Xcode.app* >> /Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' >> >> >> There is no urgency on my part to get this resolved. We may want to just >> wait to see if anybody else on 13.2.1 got this also. >> >> Thanks >> George >> >> >> On Wed, Feb 15, 2023 at 1:20 PM Ben Gamari wrote: >> >>> George Colpitts writes: >>> >>> > Hi >>> > >>> > I get a strange warning on MacOS when I do ./configure: >>> > >>> > checking Xcode version... xcode-select: error: tool 'xcodebuild' >>> requires >>> > Xcode, but active developer directory >>> '/Library/Developer/CommandLineTools' >>> > is a command line tools instance >>> > not found (too old?) >>> > >>> > >>> > I also get a related strange warning when I do a compile: >>> > >>> > ghc hello.hs >>> > [1 of 2] Compiling Main ( hello.hs, hello.o ) [Missing >>> object >>> > file] >>> > [2 of 2] Linking hello [Objects changed] >>> > ld: warning: directory not found for option >>> > >>> '-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/lib' >>> > >>> Hmm, that is indeed odd. It sounds like you Xcode installation may be >>> broken. Did you upgrade your operating system recently? Do you have >>> Xcode, the CLT package, or both installed? >>> >>> Cheers, >>> >>> - Ben >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From eternal.recursion at proton.me Sun Feb 19 12:57:47 2023 From: eternal.recursion at proton.me (Eternal Recursion) Date: Sun, 19 Feb 2023 12:57:47 +0000 Subject: Using GHC API with multiple targets In-Reply-To: References: <4G_W1bzN3G8w1avQp9q86Ik16oN0AUFiQ7FjpSQbes2WhGofBFQVGR1kItYWuHQPktkeP3YiBX9bCLm_kkkPE-xgDjzGBAshmczhCr7wvC0=@proton.me> <601ebbb0-194a-d409-6e33-f1ccccf7f186@gmx.at> Message-ID: Hi Matt et al.! Just to close the circle on this (I meant to post this several days ago), the error ended up being the fact that getCoreFS also made a call to runGhc, effectively creating a new environment with new session flags that needed to be set (duh). I'm still puzzling over the nuances of the many available DynFlags knobs and buttons, but no longer stuck on the errors I was getting. Sincerely, Bob Sent with Proton Mail secure email. ------- Original Message ------- On Tuesday, February 14th, 2023 at 7:04 AM, Matthew Pickering wrote: > The GHC API code you give is fine, and works correctly. In the whole > reproducer there is some additional code `getCoreFS` which is where > the error comes from. > > On Mon, Feb 6, 2023 at 1:56 PM Matthew Pickering > matthewtpickering at gmail.com wrote: > > > Can you put the whole example into a github repo and then I will look > > at what is wrong? > > > > Matt > > > > On Mon, Feb 6, 2023 at 1:34 PM Eternal Recursion via ghc-devs > > ghc-devs at haskell.org wrote: > > > > > Thanks, Andreas! > > > > > > I will check out the hint package and also play with verbosity and workingDirectory. > > > > > > I considered using the Cabal library to derive the inputs from the project's cabal file, but it does help first to know what the needful inputs are, and where to stash them in the DynFlags session settings. > > > > > > It's got to be one of those "One Weird Trick (tm)" gotcha settings that make it suddenly work. It seems obvious what some of the settings mean, but I suppose with more familiarity will come appreciation of nuances that make the apparently obvious meaning seem obviously wrong. > > > > > > Sincerely, > > > > > > Bob > > > > > > Sent with Proton Mail secure email. > > > > > > ------- Original Message ------- > > > On Monday, February 6th, 2023 at 7:53 AM, Andreas Klebinger klebinger.andreas at gmx.at wrote: > > > > > > I think this is an ok forum for this kind of question. You could also try the haskell mailing list but I'm not sure if you will get more > > > help tehre. > > > > > > I recently played around with the ghc api and I found the `hint` package to be quite helpful as an example on how to do various > > > things when using the ghc api to implement your own interpreter. > > > > > > Have you tried setting verbose? Perhaps the include dir is relative to the working directory. In that case setting: > > > > > > , workingDirectory = Just targetDir > > > , importPaths = [targetDir] ++ importPaths dynflags > > > > > > would mean ghc will search in targetDir/targetDir for Lib/Lib2. Should be easy to say for sure by enabling verbosity and looking at the output. > > > > > > Am 06/02/2023 um 13:42 schrieb Eternal Recursion via ghc-devs: > > > > > > If this is the wrong forum for this question (which as I think about it, I suppose it is) then redirection to a more appropriate mailing list or forum (or any advice, really) would be appreciated. I just figured this would be the forum with the best understanding of how the GHC API works (and has changed over time), and my longer term goal is indeed to contribute to it after I get past my learning curve. > > > > > > Sincerely, > > > > > > Bob > > > > > > Sent with Proton Mail secure email. > > > > > > ------- Original Message ------- > > > On Saturday, February 4th, 2023 at 4:04 PM, Eternal Recursion via ghc-devs ghc-devs at haskell.org wrote: > > > > > > Hi Everyone! > > > > > > I'm new here, trying to learn the GHC API. using 944 with cabal 3.8.1.0. > > > > > > How do I correctly set a GHC Session's DynFlags (and/or other properties) to ensure local libraries imported by the main target are resolved properly at compile time? > > > > > > What flags need to be set so that GHC is able to load/analyze/compile all relevant Libraries in a package? > > > > > > This is my current code: > > > > > > withPath :: FilePath -> IO () > > > withPath target = do > > > let targetDir = takeDirectory target > > > let targetFile = takeFileName target > > > listing <- listDirectory targetDir > > > let imports = filter (\f -> takeExtension f == ".hs") listing > > > print imports > > > let moduleName = mkModuleName targetFile > > > g <- defaultErrorHandler defaultFatalMessager defaultFlushOut > > > $ runGhc (Just libdir) $ do > > > initGhcMonad (Just libdir) > > > dynflags <- getSessionDynFlags > > > setSessionDynFlags $ dynflags { ghcLink = LinkInMemory > > > , ghcMode = CompManager > > > , backend = Interpreter > > > , mainModuleNameIs = moduleName > > > , workingDirectory = Just targetDir > > > , importPaths = [targetDir] ++ importPaths dynflags > > > } > > > targets <- mapM (\t -> guessTarget t Nothing Nothing) imports > > > setTargets targets > > > setContext [ IIDecl $ simpleImportDecl (mkModuleName "Prelude") ] > > > load LoadAllTargets > > > liftIO . print . ppr =<< getTargets > > > getModuleGraph > > > putStrLn "Here we go!" > > > print $ ppr $ mgModSummaries g > > > putStrLn "☝️ " > > > > > > However, when I run it (passing to example/app/Main.hs, in which directory are Lib.hs and Lib2.hs, the latter being imported into Main), I get: > > > > > > $ cabal run cli -- example/app/Main.hs > > > Up to date > > > ["Main.hs","Lib.hs","Lib2.hs"] > > > [main:Main.hs, main:Lib.hs, main:Lib2.hs] > > > Here we go! > > > [ModSummary { > > > ms_hs_hash = 23f9c4415bad851a1e36db9d813f34be > > > ms_mod = Lib, > > > unit = main > > > ms_textual_imps = [(, Prelude)] > > > ms_srcimps = [] > > > }, > > > ModSummary { > > > ms_hs_hash = e1eccc23af49f3498a5a9566e63abefd > > > ms_mod = Lib2, > > > unit = main > > > ms_textual_imps = [(, Prelude)] > > > ms_srcimps = [] > > > }, > > > ModSummary { > > > ms_hs_hash = 5f6751d7f0d5547a1bdf39af84f8c07f > > > ms_mod = Main, > > > unit = main > > > ms_textual_imps = [(, Prelude), (, Lib2)] > > > ms_srcimps = [] > > > }] > > > ☝ > > > > > > example/app/Main.hs:4:1: error: > > > Could not find module ‘Lib2’ > > > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > > > | > > > 4 | import qualified Lib2 as L2 > > > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > cli: example/app/Main.hs:4:1: error: > > > Could not find module `Lib2' Use -v (or` :set -v` in ghci) to see a list of the files searched for. > > > > > > What do I need to do differently to make this work? > > > > > > I have a local Cabal file I could use, but to know what I need out of it, I need to understand the minimum required info to get this to work. TIA! > > > > > > Sincerely, > > > > > > Bob > > > > > > Sent with Proton Mail secure email. > > > > > > _______________________________________________ > > > ghc-devs mailing list > > > ghc-devs at haskell.org > > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > > > _______________________________________________ > > > ghc-devs mailing list > > > ghc-devs at haskell.org > > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs From djsamperi at gmail.com Tue Feb 21 23:23:07 2023 From: djsamperi at gmail.com (Dominick Samperi) Date: Tue, 21 Feb 2023 18:23:07 -0500 Subject: Status of ghcup? Message-ID: I watched an interesting YouTube video explaining how to install and use the Haskell extension in VS code, but the information appears to be obsolete, because there is no mention of ghcup, and ghcup is now required, along with a new version of the Haskell extension (the old one is labeled "legacy"). Unfortunately, I could not install ghcup on Windows due to obscure PowerShell security issues, or missing libraries in MSYS. While wrestling with this problem I discovered that Unix tools from Rtools must not be in PATH while working with Stack, probably due to incompatible MSYS versions. But removing Rtools from PATH does not resolve the ghcup installation problems. Any tips on ghcup installation under Windows would be appreciated. Thanks, Dominick -------------- next part -------------- An HTML attachment was scrubbed... URL: From eternal.recursion at proton.me Wed Feb 22 00:18:36 2023 From: eternal.recursion at proton.me (Eternal Recursion) Date: Wed, 22 Feb 2023 00:18:36 +0000 Subject: Status of ghcup? In-Reply-To: References: Message-ID: HI Dominick! It's been awhile since I discovered the proper incantations on Windoze, but what I remember is that installation went better if I already had Msys pre-installed, and simply told the ghcup installer where to find it (it asks at some point). I also found this helpful: https://www.haskell.org/ghcup/guide/#troubleshooting Specifically the section about certificate authority errors. Disabling curl and using wget is what I recall doing. Sent with [Proton Mail](https://proton.me/) secure email. ------- Original Message ------- On Tuesday, February 21st, 2023 at 6:23 PM, Dominick Samperi wrote: > I watched an interesting YouTube video explaining how to install and use > the Haskell extension in VS code, but the information appears to be > obsolete, because there is no mention of ghcup, and ghcup is now > required, along with a new version of the Haskell extension (the old one > is labeled "legacy"). > > Unfortunately, I could not install ghcup on Windows due to obscure PowerShell > security issues, or missing libraries in MSYS. While wrestling with this problem > I discovered that Unix tools from Rtools must not be in PATH while working > with Stack, probably due to incompatible MSYS versions. But removing Rtools > from PATH does not resolve the ghcup installation problems. > > Any tips on ghcup installation under Windows would be appreciated. > > Thanks, > Dominick -------------- next part -------------- An HTML attachment was scrubbed... URL: From djsamperi at gmail.com Wed Feb 22 00:55:02 2023 From: djsamperi at gmail.com (Dominick Samperi) Date: Tue, 21 Feb 2023 19:55:02 -0500 Subject: Status of ghcup? In-Reply-To: References: Message-ID: Thanks Recursion, I tried that, only installing GHCup and not MSYS and friends, then using Rtools version of MSYS, but this didn't work, perhaps because of a non-standard layout of the tools in Rtools. FYI, placing Rtools\usr\bin in path (to get sh.exe and other Unix tools) breaks Haskell mode in emacs. When starting ghci with Ctrl-C Ctrol-L, it immediately terminates for no apparent reason. Removing Rtools from PATH fixes this problem! When different apps like R, GHCup, Stack, Chocolatey, Cygwin, etc. all install different versions of MSYS, we are asking for trouble. Dominick On Tue, Feb 21, 2023 at 7:18 PM Eternal Recursion < eternal.recursion at proton.me> wrote: > HI Dominick! > > It's been awhile since I discovered the proper incantations on Windoze, > but what I remember is that installation went better if I already had Msys > pre-installed, and simply told the ghcup installer where to find it (it > asks at some point). I also found this helpful: > > https://www.haskell.org/ghcup/guide/#troubleshooting > > Specifically the section about certificate authority errors. Disabling > curl and using wget is what I recall doing. > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Tuesday, February 21st, 2023 at 6:23 PM, Dominick Samperi < > djsamperi at gmail.com> wrote: > > I watched an interesting YouTube video explaining how to install and use > the Haskell extension in VS code, but the information appears to be > obsolete, because there is no mention of ghcup, and ghcup is now > required, along with a new version of the Haskell extension (the old one > is labeled "legacy"). > > Unfortunately, I could not install ghcup on Windows due to obscure > PowerShell > security issues, or missing libraries in MSYS. While wrestling with this > problem > I discovered that Unix tools from Rtools must not be in PATH while working > with Stack, probably due to incompatible MSYS versions. But removing Rtools > from PATH does not resolve the ghcup installation problems. > > Any tips on ghcup installation under Windows would be appreciated. > > Thanks, > Dominick > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From djsamperi at gmail.com Wed Feb 22 01:46:12 2023 From: djsamperi at gmail.com (Dominick Samperi) Date: Tue, 21 Feb 2023 20:46:12 -0500 Subject: Status of ghcup? In-Reply-To: References: Message-ID: Downloading msys2 directly (not using the version in Rtools) and then installing GHCup with a pointer to the downloaded version of msys2 works, thanks for the tip. So the problem going forward is for everyone to agree on one version of msys2 instead of maintaining their own version! This is the way things used to be when there was only cygwin. On Tue, Feb 21, 2023 at 7:55 PM Dominick Samperi wrote: > Thanks Recursion, > > I tried that, only installing GHCup and not MSYS and friends, then using > Rtools > version of MSYS, but this didn't work, perhaps because of a non-standard > layout > of the tools in Rtools. > > FYI, placing Rtools\usr\bin in path (to get sh.exe and other Unix tools) > breaks > Haskell mode in emacs. When starting ghci with Ctrl-C Ctrol-L, it > immediately > terminates for no apparent reason. Removing Rtools from PATH fixes this > problem! > > When different apps like R, GHCup, Stack, Chocolatey, Cygwin, etc. all > install > different versions of MSYS, we are asking for trouble. > > Dominick > > On Tue, Feb 21, 2023 at 7:18 PM Eternal Recursion < > eternal.recursion at proton.me> wrote: > >> HI Dominick! >> >> It's been awhile since I discovered the proper incantations on Windoze, >> but what I remember is that installation went better if I already had Msys >> pre-installed, and simply told the ghcup installer where to find it (it >> asks at some point). I also found this helpful: >> >> https://www.haskell.org/ghcup/guide/#troubleshooting >> >> Specifically the section about certificate authority errors. Disabling >> curl and using wget is what I recall doing. >> >> Sent with Proton Mail secure email. >> >> ------- Original Message ------- >> On Tuesday, February 21st, 2023 at 6:23 PM, Dominick Samperi < >> djsamperi at gmail.com> wrote: >> >> I watched an interesting YouTube video explaining how to install and use >> the Haskell extension in VS code, but the information appears to be >> obsolete, because there is no mention of ghcup, and ghcup is now >> required, along with a new version of the Haskell extension (the old one >> is labeled "legacy"). >> >> Unfortunately, I could not install ghcup on Windows due to obscure >> PowerShell >> security issues, or missing libraries in MSYS. While wrestling with this >> problem >> I discovered that Unix tools from Rtools must not be in PATH while working >> with Stack, probably due to incompatible MSYS versions. But removing >> Rtools >> from PATH does not resolve the ghcup installation problems. >> >> Any tips on ghcup installation under Windows would be appreciated. >> >> Thanks, >> Dominick >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From zubin at well-typed.com Mon Feb 27 14:37:11 2023 From: zubin at well-typed.com (Zubin Duggal) Date: Mon, 27 Feb 2023 20:07:11 +0530 Subject: [Haskell] [ANNOUNCE] GHC 9.2.7 released Message-ID: <20230227143711.asabyw5v2435wqcb@zubin-pc.sungrazer-frog.ts.net> The GHC developers are happy to announce the availability of GHC 9.2.7. Binary distributions, source distributions, and documentation are available at [downloads.haskell.org](https://downloads.haskell.org/ghc/9.2.7). Download Page: https://www.haskell.org/ghc/download_ghc_9_2_7.html Blog Post: https://www.haskell.org/ghc/blog/20230227-ghc-9.2.7-released.html This release is primarily a bugfix release addressing a few issues found in 9.2.6. These include: * A fix for a bug with the RTS linker being unable to resolve the `setKeepCafs` symbol which started being used by the GHC library in 9.2.6, resulting in code depending on this symbol failing to load in GHCi or via a compile time splice when using a statically linked GHC, such as on Windows (#22961). * A fix a bug with the alignment of RTS data structures that could result in segfaults when compiled with high optimisation settings on certain platforms (#22975 , #22965). * A fix for a bug in the simplifier related to placeholder values (rubbish literals) emitted by the worker/wrapper optimisation leading to -dcore-lint errors and compiler panics in certain cases (#19882, #22914, #23000). * Easier installation of binary distribution on MacOS platforms by changing the installation Makefile to remove the quarantine attribute when installing. * ... and a few more. See the [release notes] for a full accounting. As some of the fixed issues do affect correctness users are encouraged to upgrade promptly. We would like to thank Microsoft Azure, GitHub, IOG, the Zw3rk stake pool, Well-Typed, Tweag I/O, Serokell, Equinix, SimSpace, Haskell Foundation, and other anonymous contributors whose on-going financial and in-kind support has facilitated GHC maintenance and release management over the years. Finally, this release would not have been possible without the hundreds of open-source contributors whose work comprise this release. As always, do give this release a try and open a [ticket][] if you see anything amiss. Happy compiling, - Zubin [ticket]: https://gitlab.haskell.org/ghc/ghc/-/issues/new [release notes]: https://downloads.haskell.org/~ghc/9.2.7/docs/html/users_guide/9.2.7-notes.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: not available URL: