Add GHC.Unit for the definition of the () type
authorIan Lynagh <igloo@earth.li>
Tue, 24 Jun 2008 14:49:55 +0000 (14:49 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 24 Jun 2008 14:49:55 +0000 (14:49 +0000)
GHC/Unit.hs [new file with mode: 0644]
ghc-prim.cabal

diff --git a/GHC/Unit.hs b/GHC/Unit.hs
new file mode 100644 (file)
index 0000000..09ebe73
--- /dev/null
@@ -0,0 +1,18 @@
+
+{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+
+module GHC.Unit where
+
+import GHC.Generics ()
+
+default ()
+
+{-
+The Unit type is here because GHC.PrimopWrappers needs to use it in a
+type signature.
+-}
+
+-- | The unit datatype @()@ has one non-undefined member, the nullary
+-- constructor @()@.
+data () = ()
+
index f4235f6..0983598 100644 (file)
@@ -17,6 +17,7 @@ Library {
         GHC.PrimopWrappers
         GHC.IntWord32
         GHC.IntWord64
+        GHC.Unit
     c-sources:
         cbits/longlong.c
     extensions: CPP, MagicHash, ForeignFunctionInterface, UnliftedFFITypes