Commit b8711eeb authored by simonpj's avatar simonpj
Browse files

[project @ 2001-09-07 12:34:03 by simonpj]

-------------------
	Newtypes and ccalls
	     [addendum]
	-------------------

	MERGE WITH STABLE BRANCH

I accidentally omitted these two wibbles from my previous commit.
I've added PrelNames.unitTyConKey, and used it in TcType and DsCCall.
parent f16df743
......@@ -44,7 +44,8 @@ import RdrName ( RdrName, mkOrig, mkUnqual )
import UniqFM
import Unique ( Unique, Uniquable(..), hasKey,
mkPreludeMiscIdUnique, mkPreludeDataConUnique,
mkPreludeTyConUnique, mkPreludeClassUnique
mkPreludeTyConUnique, mkPreludeClassUnique,
mkTupleTyConUnique
)
import BasicTypes ( Boxity(..), Arity )
import UniqFM ( UniqFM, listToUFM )
......@@ -752,6 +753,8 @@ usManyTyConKey = mkPreludeTyConUnique 78
crossTyConKey = mkPreludeTyConUnique 79
plusTyConKey = mkPreludeTyConUnique 80
genUnitTyConKey = mkPreludeTyConUnique 81
unitTyConKey = mkTupleTyConUnique Boxed 0
\end{code}
%************************************************************************
......
......@@ -132,7 +132,7 @@ import OccName ( OccName, mkDictOcc )
import NameSet
import PrelNames -- Lots (e.g. in isFFIArgumentTy
import TysWiredIn ( ptrTyCon, funPtrTyCon, addrTyCon, unitTyCon )
import Unique ( Unique, Uniquable(..), mkTupleTyConUnique )
import Unique ( Unique, Uniquable(..) )
import SrcLoc ( SrcLoc )
import Util ( cmpList, thenCmp )
import Maybes ( maybeToBool, expectJust )
......@@ -559,7 +559,7 @@ isIntegerTy = is_tc integerTyConKey
isIntTy = is_tc intTyConKey
isAddrTy = is_tc addrTyConKey
isBoolTy = is_tc boolTyConKey
isUnitTy = is_tc (mkTupleTyConUnique Boxed 0)
isUnitTy = is_tc unitTyConKey
is_tc :: Unique -> Type -> Bool
-- Newtypes are opaque to this
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment