plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Repr.Internal

Synopsis

Documentation

newtype PStruct (struct :: [[S -> Type]]) (s :: S) Source #

@since WIP

Constructors

PStruct 

Fields

newtype PRec (struct :: [S -> Type]) (s :: S) Source #

@since WIP

Constructors

PRec 

Fields

pletL :: All SListI as => SOP (Term s) as -> (SOP (Term s) as -> Term s r) -> Term s r Source #

@since WIP

grecEq :: forall (s :: S) (struct :: [S -> Type]). All PEq struct => NP (Term s) struct -> NP (Term s) struct -> Term s PBool Source #

@since WIP

gstructEq :: forall (s :: S) (struct :: [[S -> Type]]). All2 PEq struct => SOP (Term s) struct -> SOP (Term s) struct -> Term s PBool Source #

@since WIP

groupHandlers :: forall (s :: S) (r :: S -> Type). [(Integer, Term s r)] -> Term s PInteger -> Term s r Source #

This function handles optimization of function that require multiple handlers by checking hashes of each | handler item and merging them in a way it will minimize size and cost of all computation

@since WIP

class (Generic (a s), AllZipN @Type (Prod SOP) (LiftedCoercible I (Term s)) (Code (a s)) struct, AllZipN @Type (Prod SOP) (LiftedCoercible (Term s) I) struct (Code (a s))) => StructSameRepr s a struct Source #

@since WIP

Instances

Instances details
(Generic (a s), AllZipN (Prod (SOP :: (Type -> Type) -> [[Type]] -> Type)) (LiftedCoercible I (Term s)) (Code (a s)) struct, AllZipN (Prod (SOP :: (Type -> Type) -> [[Type]] -> Type)) (LiftedCoercible (Term s) I) struct (Code (a s))) => StructSameRepr s a (struct :: l1) Source # 
Instance details

Defined in Plutarch.Repr.Internal

type family UnTermRec (struct :: [Type]) :: [S -> Type] where ... Source #

@since WIP

Equations

UnTermRec '[] = '[] 
UnTermRec (Term _ a ': rest) = a ': UnTermRec rest 

type UnTermStruct x = UnTermStruct' (Code x) Source #

@since WIP

type RecTypePrettyError struct = RecTypePrettyError' struct ~ 'True Source #

@since WIP