RE: Unexpected boxing in generated code

2007-08-07 Thread Simon Peyton-Jones
| I've got an inner loop that I think I can see is strict in the Int | argument being passed around, but that GHC 6.6.1 isn't unboxing. In the | following example both functions take a GHC.Base.Int, which I think | should be an Int#. OK this is an interesting one. Here's the smallest program that

Re: Unexpected boxing in generated code

2007-08-07 Thread Neil Mitchell
Hi Simon, > OK this is an interesting one. Here's the smallest program that demonstrates > the problem. > > foreign import ccall unsafe "stdio.h getchar" getchar :: IO CInt > > f56 :: State# RealWorld -> Int -> Int > f56 s v2 = case (unIO getchar s) of >(# s' , v6 #) -> >

Re: Unexpected boxing in generated code

2007-08-07 Thread Simon Marlow
Simon Peyton-Jones wrote: | I've got an inner loop that I think I can see is strict in the Int | argument being passed around, but that GHC 6.6.1 isn't unboxing. In the | following example both functions take a GHC.Base.Int, which I think | should be an Int#. OK this is an interesting one. Here'