X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fprelude%2FTysWiredIn.lhs;h=78d3583ed1a520781b4cb93502a6d5abb390714c;hp=436b121adcf2862129cd4d86814f92d3710462d4;hb=7fc749a43b4b6b85d234fa95d4928648259584f4;hpb=b00b5bc04ff36a551552470060064f0b7d84ca30 diff --git a/compiler/prelude/TysWiredIn.lhs b/compiler/prelude/TysWiredIn.lhs index 436b121..78d3583 100644 --- a/compiler/prelude/TysWiredIn.lhs +++ b/compiler/prelude/TysWiredIn.lhs @@ -10,6 +10,13 @@ This module tracks the ``state interface'' document, ``GHC prelude: types and operations.'' \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module TysWiredIn ( wiredInTyCons, @@ -38,9 +45,10 @@ module TysWiredIn ( unitTyCon, unitDataCon, unitDataConId, pairTyCon, unboxedSingletonTyCon, unboxedSingletonDataCon, unboxedPairTyCon, unboxedPairDataCon, + + boxedTupleArr, unboxedTupleArr, unitTy, - voidTy, -- parallel arrays mkPArrTy, @@ -68,7 +76,7 @@ import DataCon ( DataCon, mkDataCon, dataConWorkId, dataConSourceArity ) import Var ( TyVar, tyVarKind ) import TyCon ( TyCon, AlgTyConRhs(DataTyCon), tyConDataCons, mkTupleTyCon, mkAlgTyCon, tyConName, - AlgTyConParent(NoParentTyCon) ) + TyConParent(NoParentTyCon) ) import BasicTypes ( Arity, RecFlag(..), Boxity(..), isBoxed, StrictnessMark(..) ) @@ -308,22 +316,6 @@ unboxedPairDataCon = tupleCon Unboxed 2 %************************************************************************ \begin{code} --- The Void type is represented as a data type with no constructors --- It's a built in type (i.e. there's no way to define it in Haskell; --- the nearest would be --- --- data Void = -- No constructors! --- --- ) It's lifted; there is only one value of this --- type, namely "void", whose semantics is just bottom. --- --- Haskell 98 drops the definition of a Void type, so we just 'simulate' --- voidTy using (). -voidTy = unitTy -\end{code} - - -\begin{code} charTy = mkTyConTy charTyCon charTyCon = pcNonRecDataTyCon charTyConName [] [charDataCon] @@ -495,7 +487,7 @@ done by enumeration\srcloc{lib/prelude/InTup?.hs}. mkTupleTy :: Boxity -> Int -> [Type] -> Type mkTupleTy boxity arity tys = mkTyConApp (tupleTyCon boxity arity) tys -unitTy = mkTupleTy Boxed 0 [] +unitTy = mkTupleTy Boxed 0 [] \end{code} %************************************************************************