RE: behaviour of {-# NOINLINE #-} in where clauses

2006-08-14 Thread Simon Peyton-Jones
- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] | On Behalf Of Duncan Coutts | Sent: 13 August 2006 23:34 | To: GHC-users list; GHC-bugs list | Subject: behaviour of {-# NOINLINE #-} in where clauses | | This doesn't have the effect I expected: | | loop xs = | case blah of | One thing

Re: behaviour of {-# NOINLINE #-} in where clauses

2006-08-14 Thread Bulat Ziganshin
Hello Duncan, Monday, August 14, 2006, 2:33:31 AM, you wrote: Reversing the test doesn't help because either way ghc turns it into: case thing of _DEFAULT - 4096 - to be exact, ghc passes code for default case separately from code for other cases. look at emitSwitch procedure to know

RE: behaviour of {-# NOINLINE #-} in where clauses

2006-08-14 Thread Duncan Coutts
On Mon, 2006-08-14 at 10:12 +0100, Simon Peyton-Jones wrote: [Narrowing to ghc users only] That's odd. I tried it (the HEAD) and it worked fine. Input and output below You'll notice that the binding for 'realloc' got floated into the branch of the case (that's FloatIn), but it is never

behaviour of {-# NOINLINE #-} in where clauses

2006-08-13 Thread Duncan Coutts
This doesn't have the effect I expected: loop xs = case blah of One thing - ... loop The other - ... realloc ... where {-# NOINLINE realloc #-} realloc = do something loop ... My intention here was that the loop would not contain the code for realloc and that