Re: Does the Strict extension make monadic bindings strict?
In which case, I've created a ticket to record this bug and to track its fix: https://ghc.haskell.org/trac/ghc/ticket/11193 On 10 December 2015 at 15:26, Adam Sandberg Eriksson < a...@sandbergericsson.se> wrote: > I agree that this seems to be a bug. I have a lot to do currently, but > might be able to look at it sometime during next week. > > Adam Sandberg Eriksson > > > On Thu, 10 Dec 2015, at 03:34 PM, Johan Tibell wrote: > > I believe this is just a bug, since the desugaring ought to be strict in > the \x. > > On Tue, Dec 8, 2015 at 6:35 PM, Ömer Sinan Ağacan <omeraga...@gmail.com> > wrote: > > I think this is a problem/bug in the implementation. In the "function > definitions" section of the wiki page it says the argument will have a > bang pattern. But then this code: > > do x <- ... >return (x + 1) > > which is just a syntactic sugar for `... >>= \x -> return (x + 1)` > doesn't have the bang pattern in `x`. > > (See also a related email I sent to ghc-devs yesterday: > https://mail.haskell.org/pipermail/ghc-devs/2015-December/010699.html) > > 2015-12-08 12:27 GMT-05:00 David Kraeutmann <k...@kane.cx>: > > While there's a fundamental difference between (>>=) and let-bindings, it > > might be worth adding to the docs that -XStrict only makes let bindings > > strict. > > > > > > On 12/08/2015 06:22 PM, Rob Stewart wrote: > > > > Are the following two programs equivalent with respect to the strictness > > of `readFile`? > > > > --8<---cut here---start->8--- > > {-# LANGUAGE BangPatterns #-} > > > > module Main where > > > > main = do > > !contents <- readFile "foo.txt" > > print contents > > --8<---cut here---end--->8--- > > > > And: > > > > --8<---cut here---start->8--- > > {-# LANGAUGE Strict #-} > > > > module Main where > > > > main = do > > contents <- readFile "foo.txt" > > print contents > > --8<---cut here---end--->8--- > > > > The documentation on "Strict-by-default pattern bindings" gives > > let/where binding as an example, but there is not a monadic bind example. > > > http://downloads.haskell.org/~ghc/master/users-guide/glasgow_exts.html#strict-by-default-pattern-bindings > > > > Inspecting GHC Core for these two programs suggests that > > > > !contents <- readFile "foo.txt" > > > > is not equivalent to (with Strict enabled): > > > > contents <- readFile "foo.txt" > > > > Here's core using BangPatterns: > > > > (readFile (unpackCString# "foo.txt"#)) > > (\ (contents_asg :: String) -> > >case contents_asg of contents1_Xsk { __DEFAULT -> > >print @ String $dShow_rYy contents1_Xsk > >}) > > > > Here's core using Strict: > > > > (readFile (unpackCString# "foo.txt"#)) > > (\ (contents_asg :: String) -> > >print @ String $dShow_rYv contents_asg) > > > > Does this core align with the design of the Strict extension? > > > > If it does, are users going to understand that using Strict is going to > > make let/where bindings strict, but is not going to make <- or >>= > > bindings strict? > > > > -- > > Rob Stewart > > > > > > ___ > > ghc-devs mailing list > > ghc-devs@haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > > > > > ___ > > ghc-devs mailing list > > ghc-devs@haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > *___* > ghc-devs mailing list > ghc-devs@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > > > ___ > ghc-devs mailing list > ghc-devs@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs > > ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Does the Strict extension make monadic bindings strict?
Are the following two programs equivalent with respect to the strictness of `readFile`? --8<---cut here---start->8--- {-# LANGUAGE BangPatterns #-} module Main where main = do !contents <- readFile "foo.txt" print contents --8<---cut here---end--->8--- And: --8<---cut here---start->8--- {-# LANGAUGE Strict #-} module Main where main = do contents <- readFile "foo.txt" print contents --8<---cut here---end--->8--- The documentation on "Strict-by-default pattern bindings" gives let/where binding as an example, but there is not a monadic bind example. http://downloads.haskell.org/~ghc/master/users-guide/glasgow_exts.html#strict-by-default-pattern-bindings Inspecting GHC Core for these two programs suggests that !contents <- readFile "foo.txt" is not equivalent to (with Strict enabled): contents <- readFile "foo.txt" Here's core using BangPatterns: (readFile (unpackCString# "foo.txt"#)) (\ (contents_asg :: String) -> case contents_asg of contents1_Xsk { __DEFAULT -> print @ String $dShow_rYy contents1_Xsk }) Here's core using Strict: (readFile (unpackCString# "foo.txt"#)) (\ (contents_asg :: String) -> print @ String $dShow_rYv contents_asg) Does this core align with the design of the Strict extension? If it does, are users going to understand that using Strict is going to make let/where bindings strict, but is not going to make <- or >>= bindings strict? -- Rob Stewart ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Re: GHC contribution guidelines and infrastructure talk on 6th September at HIW?
On 18 July 2014 09:01, Joachim Breitner m...@joachim-breitner.de wrote: Am Freitag, den 18.07.2014, 07:25 + schrieb Simon Peyton Jones: | On Saturday 6th September is the Haskell Implementers Workshop. There | has been plenty of discussion over the last 12 months about making | contributions to GHC less formidable. Is this story going to be told at | HIW? A talk about revised contribution guidelines and helpful tool | support might engage those sat on, or peering over, the fence. I think that's a great idea. Maybe Simon M, or Joachim, or Austin, or Herbert? Of some coalition thereof I agree, and I’d be available for it, or for joining a coalition. I gentle nudge about the idea of a HIW talk on contributing to GHC development. I'm glad some people think that this is a good idea. However, given that the official deadline for talk proposals has already passed, at least an abstract would have to be submitted to the HIW committee very soon to be considered. The presentation content can of course be put together much closer to the time. I don't want to create work for anyone, of course. -- Rob ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
GHC contribution guidelines and infrastructure talk on 6th September at HIW?
Hi, On Saturday 6th September is the Haskell Implementers Workshop. There has been plenty of discussion over the last 12 months about making contributions to GHC less formidable. Is this story going to be told at HIW? A talk about revised contribution guidelines and helpful tool support might engage those sat on, or peering over, the fence. This might include: * Phabricator code review demonstration. * Continuous integration infrastructure. * Trac demonstration, e.g. how to contribute to design discussions. * Wiki navigation, and important new pages born in recent months. * GHC coding guidelines, e.g. using notes and haddock documentation. * Git policies, e.g. use of submodules. * What GHC needs.. Windows testers? * Old contribution guidelines that no longer apply. Is HIW on 6th September a good place to give a GHC contributions and infrastructure talk? -- Rob ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Related to #8677, I'm getting p_dyn libraries for package ‘integer-gmp’
HI, I'm getting hit by an issue relating to tick 8677 https://ghc.haskell.org/trac/ghc/ticket/8677 I'm sure the problem I'm facing is a user error, though I'm not sure how to resolve it. I'm compiling with `-Odph -rtsopts -threaded -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000 -fllvm -optlo-O3 -prof -auto-all` --8---cut here---start-8--- Top level: Failed to load interface for ‘GHC.Integer.Type’ Perhaps you haven't installed the p_dyn libraries for package ‘integer-gmp’? Use -v to see a list of the files searched for. cabal: Error: some packages failed to install: ripl-frontend-0.0.1 failed during the building phase. The exception was: ExitFailure 1--8---cut here---end---8--- From reading the ticket details, I see that I probably should not be using -dynamic-too. But how do I enforce this? I'm not using this flag (see above). Moreover my ~/.cabal/config files includes the following: --8---cut here---start-8--- library-profiling: False executable-dynamic: False executable-profiling: False --8---cut here---end---8--- What else am I to do? -- Rob ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Re: ticket for adding ARM backend to NCG?
On 3 January 2014 12:37, Simon Peyton-Jones simo...@microsoft.com wrote: * But using LLVM has some disadvantages. c) we play some efficiency tricks (notably tables next to code) that LLVM can't play (yet). I think. In fact, this could well be implemented in the GHC 7.10, as this has been committed in LLVM on 15th September: http://www.haskell.org/pipermail/ghc-devs/2013-September/002565.html Implementing tables next to code in the LLVM IR generation may be something to get one's teeth into in time for 7.10 ? Carter: was this discussed further on #haskell-llvm ? -- Rob | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Karel | Gardas | Sent: 03 January 2014 11:24 | To: Jens Petersen | Cc: ghc-devs@haskell.org | Subject: Re: ticket for adding ARM backend to NCG? | | | Guys, | | I've been tinkering with ARM NCG idea for quite some time now, but | honestly I've been always in doubts if it's the best way for GHC at all. | I've thought that the plan was to kind of move out of NCG to LLVM based | backends and I've though that although this plan may be kind of stuck | now, it's still on the table. | | Yes, I know that GHC is volunteering effort so if someone comes and asks | for an ARM NCG implementation merge it'll be probably done in some time, | but I'm not sure if it's what's the most welcome at the end. | | Just some of my doubts about it... | | I would really appreciate some authoritative word about the topic from | more involved GHC developers... I mean especially about NCG future... | | Thanks! | Karel | | On 01/ 3/14 09:35 AM, Jens Petersen wrote: | On 3 January 2014 03:10, Corey O'Connor coreyocon...@gmail.com | mailto:coreyocon...@gmail.com wrote: | | My interest is just to get involved somehow in the NCG. Starting a | new backend seemed reasonable only because I couldn't break | something that didn't exist. ;-) | | | Well a big +1 from me for armv7 NCG. | | | ___ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs | | ___ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
Fwd: [Haddock] error: utils/haddock_dist_PROGNAME is not set
Hi Ian, That may well be true. However, I ran multiple ./sync-all commands, due to the following error that I am seeing with the parallel library: $ ./sync-all -r http://darcs.haskell.org --extra get -b ghc-7.6 ... Cloning into 'libraries/process'... == libraries/process: running git config --local core.ignorecase true == running git clone http://darcs.haskell.org/packages/template-haskell.git libraries/template-haskell -b ghc-7.6 Cloning into 'libraries/template-haskell'... == libraries/template-haskell: running git config --local core.ignorecase true == running git clone http://darcs.haskell.org/packages/unix.git libraries/unix -b ghc-7.6 Cloning into 'libraries/unix'... == libraries/unix: running git config --local core.ignorecase true == running git clone http://darcs.haskell.org/packages/parallel.git libraries/parallel -b ghc-7.6 Cloning into 'libraries/parallel'... fatal: Remote branch ghc-7.6 not found in upstream origin Unexpected end of command stream git failed: 32768 at ./sync-all line 193. -- Rob On 24 March 2013 19:03, Ian Lynagh i...@well-typed.com wrote: On Sun, Mar 24, 2013 at 07:50:34PM +0100, David Waern wrote: Not sure what's wrong here. Maybe someone on ghc-devs@ knows. 2013/3/24 Rob Stewart robstewar...@gmail.com I am not able to build ghc 7.6 from source, and come across an error in utils/haddock/ghc.mk utils/haddock/ghc.mk:28: *** utils/haddock_dist_PROGNAME is not set. I suspect that either your haddock repository is out-of-date, or that some of your repositories are on the 7.6 branch and some are on master. Thanks Ian ___ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs