imported return type not masked
This might be difficult to reproduce. Try this:
Haskell looks like this:
foreign import foo :: IO Word8
do {
f <- foo;
putStrLn (show f);
}
C looks like this:
HsWord8 foo ()
{
HsWord8 f;
... f should be zero
return f;
}
On running, I might get something like this:
1074803456
...which is clearly not a Word8, although the low byte is zero.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 5.02 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | ResolvedFixed |
| Component | Compiler (FFI) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |