Avoiding CAF's
Simon Peyton-Jones
simonpj at microsoft.com
Wed May 16 08:54:48 EDT 2007
| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-bounces at haskell.org] On
| Behalf Of Neil Mitchell
| Sent: 16 May 2007 10:16
| To: glasgow-haskell-users at haskell.org
| Subject: Avoiding CAF's
|
| Hi,
|
| I'm trying to avoid CAF's being created, and I was wondering how is
| the best way to do it with GHC. For example:
|
| f = ....
|
| Can I attach {-# INLINE #-} to f, and expect the CAF to be removed
| that way? Is there any NOCAF annotation. I can always f _, then change
| the callers to f () - if I'm doing that what is the most efficient
| fake argument, and should I annotate f in any way? If the dummy
| argument isn't used, is GHC going to float the let outside and re-CAF
| it?
See this thread:
http://www.nabble.com/%7B---INLINE-me_harder---%7D-tf3599366.html
|
| The next example is:
|
| foreign import ccall safe "stdio.h getchar" getchar2 :: CInt
|
| Can I stop this being CAF'd in any way?
What is the problem you are trying to solve?
S
More information about the Glasgow-haskell-users
mailing list