plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Internal.TypeFamily

Synopsis
  • type family ToPType as where ...
  • type family ToPType2 as where ...
  • type family UnTerm x where ...
  • type family Snd ab where ...

Documentation

type family ToPType as where ... Source #

Convert a list of `Term s a` to a list of a.

Equations

ToPType '[] = '[] 
ToPType (a ': as) = UnTerm a ': ToPType as 

type family ToPType2 as where ... Source #

Equations

ToPType2 '[] = '[] 
ToPType2 (a ': as) = ToPType a ': ToPType2 as 

type family UnTerm x where ... Source #

Equations

UnTerm (Term _ a) = a 
UnTerm invalid = TypeError (('Text "Non-term in Plutarch data type not allowed. Got: `" ':<>: 'ShowType invalid) ':<>: 'Text "`") 

type family Snd ab where ... Source #

Equations

Snd '(_, b) = b