diff options
author | simonpj <unknown> | 2002-03-08 15:47:19 +0000 |
---|---|---|
committer | simonpj <unknown> | 2002-03-08 15:47:19 +0000 |
commit | 4593b1053cdc55c10f3df804630a1d90890d8473 (patch) | |
tree | 4c499703cda89d125b8d17be358a7775bf17f7b1 /ghc/compiler/ghci/ByteCodeGen.lhs | |
parent | 354f17ec86e2e11f2e77a159916b2e7be74979c9 (diff) | |
download | haskell-4593b1053cdc55c10f3df804630a1d90890d8473.tar.gz |
[project @ 2002-03-08 15:47:18 by simonpj]
------------------------
Kill Type.splitRepFunTys
------------------------
splitRepFunTys was a Bad Function that split up a function type
looking through even recursive newtypes. Alas, it diverged if
when we had a recursive newtype with a function whose result was
the newtype itself.
I've replaced it with ordinary splitFunTys, plus a new function
Type.dropForAlls, which does what you would expect.
Diffstat (limited to 'ghc/compiler/ghci/ByteCodeGen.lhs')
-rw-r--r-- | ghc/compiler/ghci/ByteCodeGen.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index 1f631d87e4..1863229c1e 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -32,7 +32,7 @@ import DataCon ( dataConTag, fIRST_TAG, dataConTyCon, import TyCon ( TyCon(..), tyConFamilySize, isDataTyCon, tyConDataCons, isFunTyCon, isUnboxedTupleTyCon ) import Class ( Class, classTyCon ) -import Type ( Type, repType, splitRepFunTys ) +import Type ( Type, repType, splitFunTys, dropForAlls ) import Util ( zipEqual, zipWith4Equal, naturalMergeSortLe, nOfThem, isSingleton, lengthIs ) import DataCon ( dataConRepArity ) @@ -976,7 +976,7 @@ mkDummyLiteral pr maybe_getCCallReturnRep :: Type -> Maybe PrimRep maybe_getCCallReturnRep fn_ty - = let (a_tys, r_ty) = splitRepFunTys fn_ty + = let (a_tys, r_ty) = splitFunTys (dropForAlls fn_ty) maybe_r_rep_to_go = if isSingleton r_reps then Nothing else Just (r_reps !! 1) (r_tycon, r_reps) |