-isStgTypeArg other = False
-
-isDllArg :: HomeModules -> StgArg -> Bool
- -- Does this argument refer to something in a different DLL?
-isDllArg hmods (StgTypeArg v) = False
-isDllArg hmods (StgVarArg v) = isDllName hmods (idName v)
-isDllArg hmods (StgLitArg lit) = False
-
-isDllConApp :: HomeModules -> DataCon -> [StgArg] -> Bool
- -- Does this constructor application refer to
- -- anything in a different DLL?
- -- If so, we can't allocate it statically
-isDllConApp hmods con args
- = isDllName hmods (dataConName con) || any (isDllArg hmods) args
+isStgTypeArg _ = False
+
+isDllConApp :: PackageId -> DataCon -> [StgArg] -> Bool
+-- Does this constructor application refer to
+-- anything in a different *Windows* DLL?
+-- If so, we can't allocate it statically
+#if mingw32_TARGET_OS
+isDllConApp this_pkg con args
+ = isDllName this_pkg (dataConName con) || any is_dll_arg args
+ where
+ is_dll_arg ::StgArg -> Bool
+ is_dll_arg (StgVarArg v) = isDllName this_pkg (idName v)
+ is_dll_arg _ = False
+#else
+isDllConApp _ _ _ = False
+#endif