[project @ 1996-04-20 10:37:06 by partain]
[ghc-hetmet.git] / ghc / compiler / simplStg / SatStgRhs.lhs
index 2c9dcfc..5290a54 100644 (file)
@@ -71,11 +71,10 @@ import Id           ( idType, getIdArity, addIdArity, mkSysLocal,
                        )
 import IdInfo          ( arityMaybe )
 import SrcLoc          ( mkUnknownSrcLoc )
+import Type            ( splitSigmaTy, splitFunTy )
 import UniqSupply      ( returnUs, thenUs, mapUs, getUnique, UniqSM(..) )
 import Util            ( panic, assertPanic )
 
-splitTypeWithDictsAsArgs = panic "SatStgRhs.splitTypeWithDictsAsArgs (ToDo)"
-
 type Count = Int
 
 type ExprArityInfo = Maybe Int     -- Just n  => This expression has a guaranteed
@@ -167,7 +166,9 @@ satRhs top env (b, StgRhsClosure cc bi fv u args body)
            new_arity = num_args + needed_args
 
             -- get type info for this function:
-           (_,all_arg_tys,_) = splitTypeWithDictsAsArgs (idType b)
+           (_,rho_arg_tys,tau_ty) = splitSigmaTy (idType b)
+           (tau_arg_tys, _) = splitFunTy tau_ty
+           all_arg_tys = ASSERT(null rho_arg_tys) {-rho_arg_tys ++-} tau_arg_tys
 
             -- now, we already have "args"; we drop that many types
            args_we_dont_have_tys = drop num_args all_arg_tys