[GHC] #9038: Foreign calls don't make their arguments look strict
GHC
ghc-devs at haskell.org
Sun Oct 19 09:51:40 UTC 2014
#9038: Foreign calls don't make their arguments look strict
-------------------------------------+-------------------------------------
Reporter: tibbe | Owner:
Type: bug | Status: infoneeded
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets: 1592
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by tibbe):
I might have been mistaken. I read the core for `add3` above and assumed
that since `add3` isn't worker-wrappered the argument wouldn't be unboxed.
I tried calling add3 (which is really the
`System.Metrics.Distribution.add` function in the ekg-core package)
function in this little test program
{{{
module Test where
import System.Metrics.Distribution
test :: Distribution -> IO ()
test distrib = add distrib 1.0
}}}
and things seem to be unboxed correctly.
Here's the demand signature for `add3`:
{{{
add3
:: Distribution
-> Double
-> Int64
-> State# RealWorld
-> (# State# RealWorld, () #)
[GblId,
Arity=4,
Caf=NoCafRefs,
Str=DmdType <L,1*U(U)><L,1*U(U)><L,1*U(U)><L,U>,
Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True,
ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [0 20 20 0] 156 30}]
}}}
How do I read the `DmdType <L,1*U(U)><L,1*U(U)><L,1*U(U)><L,U>` line?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9038#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list