commit 89e6d8e2f0a2a924da32230a201e5f6238ddbe36
parent c7d572c46f5c458a5a6a079db41f0bf6fdabca1e
Author: Robert Russell <robert@rr3.xyz>
Date: Tue, 22 Sep 2026 18:02:24 -0700
Unit: add Unit#
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/Lude/Haskell/Repr.hs b/src/Lude/Haskell/Repr.hs
@@ -1,6 +1,7 @@
module Lude.Haskell.Repr (
Levity (..),
Repr,
+ Unit,
Tuple,
Sum,
Box,
@@ -34,6 +35,7 @@ import GHC.Exts qualified as GHC
type Repr = GHC.RuntimeRep
+type Unit = GHC.TupleRep []
type Tuple = GHC.TupleRep
type Sum = GHC.SumRep
type Box = GHC.BoxedRep
diff --git a/src/Lude/Unit.hs b/src/Lude/Unit.hs
@@ -1,9 +1,17 @@
module Lude.Unit (
Unit,
+ Unit#,
) where
import Prelude.Experimental (Unit)
+import Prelude.Experimental qualified as GHC
+
+import Lude.Haskell
+import Lude.Haskell.Repr qualified as Repr
-- TODO: Instances
--------------------------------------------------------------------------------
+
+type Unit# :: Type# Repr.Unit
+type Unit# = GHC.Unit#