lude

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

Type.hs (703B)


      1 module Lude.Haskell.Type (
      2     Type#,
      3     Type,
      4     Type1,
      5     For,
      6 ) where
      7 
      8 import GHC.Exts qualified as GHC
      9 
     10 import Lude.Haskell.Core
     11 import Lude.Haskell.Repr qualified as Repr
     12 
     13 --------------------------------------------------------------------------------
     14 
     15 type Type# :: Repr -> Kind
     16 type Type# = GHC.TYPE
     17 
     18 type Type :: Kind
     19 type Type = Type# Repr.BoxL
     20 
     21 type Type1 :: Kind -> Kind
     22 type Type1 i = i -> Type
     23 
     24 --------------------------------------------------------------------------------
     25 
     26 -- | Insert visible type parameters to deal with ambiguous types
     27 --
     28 -- @For x a = forall x' -> (x' ~ x) => a@
     29 type For :: forall {i} (r :: Repr). i -> Type# r -> Type
     30 type For x a = forall x' -> (x' ~ x) => a