projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweak alternative layout rule
[ghc-hetmet.git]
/
compiler
/
prelude
/
TysWiredIn.lhs
diff --git
a/compiler/prelude/TysWiredIn.lhs
b/compiler/prelude/TysWiredIn.lhs
index
16ebf58
..
3689479
100644
(file)
--- a/
compiler/prelude/TysWiredIn.lhs
+++ b/
compiler/prelude/TysWiredIn.lhs
@@
-38,7
+38,7
@@
module TysWiredIn (
mkListTy,
-- * Tuples
mkListTy,
-- * Tuples
- mkTupleTy,
+ mkTupleTy, mkBoxedTupleTy,
tupleTyCon, tupleCon,
unitTyCon, unitDataCon, unitDataConId, pairTyCon,
unboxedSingletonTyCon, unboxedSingletonDataCon,
tupleTyCon, tupleCon,
unitTyCon, unitDataCon, unitDataConId, pairTyCon,
unboxedSingletonTyCon, unboxedSingletonDataCon,
@@
-539,6
+539,10
@@
mkTupleTy :: Boxity -> [Type] -> Type
mkTupleTy boxity [ty] | Boxed <- boxity = ty
mkTupleTy boxity tys = mkTyConApp (tupleTyCon boxity (length tys)) tys
mkTupleTy boxity [ty] | Boxed <- boxity = ty
mkTupleTy boxity tys = mkTyConApp (tupleTyCon boxity (length tys)) tys
+-- | Build the type of a small tuple that holds the specified type of thing
+mkBoxedTupleTy :: [Type] -> Type
+mkBoxedTupleTy tys = mkTupleTy Boxed tys
+
unitTy :: Type
unitTy = mkTupleTy Boxed []
\end{code}
unitTy :: Type
unitTy = mkTupleTy Boxed []
\end{code}