[project @ 2001-10-24 13:46:58 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcForeign.lhs
index 3236ec0..b13dec3 100644 (file)
@@ -34,7 +34,7 @@ import Inst           ( emptyLIE, LIE, plusLIE )
 import ErrUtils                ( Message )
 import Id              ( Id, mkLocalId )
 import Name            ( nameOccName )
-import PrimRep         ( getPrimRepSize )
+import PrimRep         ( getPrimRepSize, isFloatingRep )
 import Type            ( typePrimRep )
 import TcType          ( Type, tcSplitFunTys, tcSplitTyConApp_maybe, tcSplitForAllTys,
                          isFFIArgumentTy, isFFIImportResultTy, 
@@ -161,16 +161,19 @@ checkFEDArgs arg_tys
   where
     words_of_args = sum (map (getPrimRepSize . typePrimRep) arg_tys)
     err = ptext SLIT("On SPARC, I can only handle 4 words of arguments to foreign export dynamic")
-#elsif alpha_TARGET_ARCH
+#else
+#if alpha_TARGET_ARCH
 checkFEDArgs arg_tys
   = check (integral_args <= 4) err
   where
-    integral_args = sum (map (getPrimRepSize . filter (not . isFloatingRep)
-                                             . typePrimRep) arg_tys)
+    integral_args = sum (map getPrimRepSize $
+                         filter (not . isFloatingRep) $
+                         map typePrimRep arg_tys)
     err = ptext SLIT("On Alpha, I can only handle 4 non-floating-point arguments to foreign export dynamic")
 #else
 checkFEDArgs arg_tys = returnNF_Tc ()
 #endif
+#endif
 \end{code}