diff options
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/StgCmmForeign.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmForeign.hs b/compiler/codeGen/StgCmmForeign.hs index 7e26e7e118..172dcba219 100644 --- a/compiler/codeGen/StgCmmForeign.hs +++ b/compiler/codeGen/StgCmmForeign.hs @@ -619,6 +619,9 @@ typeToStgFArgType typ | tycon == mutableByteArrayPrimTyCon = StgByteArrayType | otherwise = StgPlainType where - -- should be a tycon app, since this is a foreign call + -- Should be a tycon app, since this is a foreign call. We look + -- through newtypes so the offset does not change if a user replaces + -- a type in a foreign function signature with a representationally + -- equivalent newtype. tycon = tyConAppTyCon (unwrapType typ) |