lude

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

commit 14be6a03279b09647779ed8c8dd2b698c28253c8
parent 098439357da9990196fab7027b36215cca6a995a
Author: Robert Russell <robert@rr3.xyz>
Date:   Fri,  9 Oct 2026 12:45:19 -0700

Haskell: add For

Diffstat:
Msrc/Lude/Haskell/Type.hs | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/Lude/Haskell/Type.hs b/src/Lude/Haskell/Type.hs @@ -2,6 +2,7 @@ module Lude.Haskell.Type ( Type#, Type, Type1, + For, ) where import GHC.Exts qualified as GHC @@ -19,3 +20,11 @@ type Type = Type# Repr.BoxL type Type1 :: Kind -> Kind type Type1 i = i -> Type + +-------------------------------------------------------------------------------- + +-- | Insert visible type parameters to deal with ambiguous types +-- +-- @For x a = forall x' -> (x' ~ x) => a@ +type For :: forall {i} (r :: Repr). i -> Type# r -> Type +type For x a = forall x' -> (x' ~ x) => a