Plutonomicon / plutarch-core

Plutarch 2.0
MIT License
19 stars 6 forks source link

Add type family `T` #11

Closed L-as closed 1 year ago

L-as commented 2 years ago
type family T :: forall (edsl :: EDSLKind).  EType -> Type
type family T a where
  T @edsl a = Term edsl a

This is useful for annotating types inside terms

L-as commented 2 years ago

An alternative:

phe :: forall a edsl. Term edsl a -> Term edsl a
phe = id

x :: PConstructable edsl PBool => Term edsl PBool
x = phe @PBool $ pcon ETrue 
L-as commented 1 year ago

Fixed