Re: [GHC] #9741: Interpreter stack checks are not quite right

2014-11-11 Thread Simon Marlow
On 06/11/2014 09:56, Simon Peyton Jones wrote: | Oh, and the reason you have the debug RTS in your compiler is because | `-ticky` implies `-debug Interesting. I didn't know that. Is that a good idea? Wouldn't it be better to make them independent? See #3439, as you'll note it was your

Re: [GHC] #9781: Make list monad operations fuse

2014-11-11 Thread Kim-Ee Yeoh
From the patch fragment at https://phabricator.haskell.org/D455?id=1311#inline-3123 What's the justification for expanding out the definition of mapM from sequence . map f into do-notation and duplicated code? Observe how mapM now duplicates code from sequence. The absence of benchmarks is bad

Re: [GHC] #9781: Make list monad operations fuse

2014-11-11 Thread David Feuer
On Nov 11, 2014 3:56 AM, Kim-Ee Yeoh k...@atamo.com wrote: From the patch fragment at https://phabricator.haskell.org/D455?id=1311#inline-3123 What's the justification for expanding out the definition of mapM from sequence . map f into do-notation and duplicated code? Observe how mapM now

RE: [commit: ghc] master: Define list monad operations using comprehensions (4923cea)

2014-11-11 Thread Simon Peyton Jones
The Note doesn't mention one of the main points, which is (if I understand rightly) to improve fusion. Would it be wotth making this point, and giving an example in the Note? Simon | -Original Message- | From: ghc-commits [mailto:ghc-commits-boun...@haskell.org] On Behalf | Of

RE: [GHC] #9781: Make list monad operations fuse

2014-11-11 Thread Simon Peyton Jones
The inliner is a finicky beast. In response to your insults, I will say that although GHC has beautiful ideas in it, a lot of the details of the optimization passes and how they fit together *are* a bit of a crapshoot, chosen by benchmarks rather than theory. It’s true that, particularly for

Re: Typechecker plugins: request for review and another workflow question

2014-11-11 Thread Adam Gundry
I've just pushed wip/tc-plugins-amg, in which I remove the hs-boot file and unify the core2core and typechecker plugins under a single -fplugin flag. This did involve making a separate module for plugins, which I think is probably a good thing. I looked at using a hook instead, with a plugin to

Re: Concrete syntax for pattern synonym type signatures

2014-11-11 Thread Richard Eisenberg
Let me restate the proposals more concretely. Correct me if I'm wrong! Suppose we have the following declarations: data T a b where MkT :: (Eq a, Ord b, Show c) = a - (b, b) - c - T a b pattern P x y = MkT 5 (y, True) x What is the type of P? Simon's proposal: pattern P :: (Eq a,

RE: [GHC] #9781: Make list monad operations fuse

2014-11-11 Thread David Feuer
Note also that there are fairly clear reasons that fusion is flakier than many other optimizations. In particular, it requires the compiler to do things that seem *weird*, and that in most other cases are just *bad ideas*. At least, it requires: 1. Inlining things that look large and/or