lude

Haskell prelude alternative
git clone git://git.rr3.xyz/lude | git clone gits://git.rr3.xyz/lude
Log | Files | Refs | LICENSE

commit e9e58113e990affacef44e78376bcd6977fbc7a7
parent 0bc08b1b68e4048ad9b4bef33ece8f62c5472087
Author: Robert Russell <robert@rr3.xyz>
Date:   Tue, 10 Mar 2026 18:11:48 -0700

Add Fst and Snd

Diffstat:
Msrc/Lude/Kind.hs | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/Lude/Kind.hs b/src/Lude/Kind.hs @@ -1,5 +1,7 @@ module Lude.Kind ( Kind, + Fst, + Snd, Type, TypeL, TypeU, @@ -20,6 +22,14 @@ type Kind = GHC.TYPE Repr.BoxL -------------------------------------------------------------------------------- +type family Fst (p :: (i, j)) :: i where + Fst '(a, b) = a + +type family Snd (p :: (i, j)) :: j where + Snd '(a, b) = b + +-------------------------------------------------------------------------------- + type Type :: forall (r :: Repr). Kind type Type @r = GHC.TYPE r