| > >I was thinking it would be nice if one could put a pragma on CAFs
that
| > >basically made ghc treat them as WHNF so it would float them inward
as
| > >far as possible including inside lambdas. in particular, constant
| > >strings that are created (cheaply) from efficient internal
| > >representations should not be held onto in their inefficient form.

I think the way to do this is to explain to GHC that 
        unpackCString :: String# -> [Char]
is a "cheap" function; that is, applications of it can safely be
duplicated.  There's no pragma to do this to an arbitrary at present,
but it'd be a sensible sort of pragma to have.

I wonder if it would make any difference in practice.

Simon 
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to