| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Plutarch.Repr.Internal
Synopsis
- type family RecAsHaskell (x :: [S -> Type]) :: [Type] where ...
- type family StructAsHaskell (x :: [[S -> Type]]) :: [[Type]] where ...
- newtype PStruct (struct :: [[S -> Type]]) (s :: S) = PStruct {}
- newtype PRec (struct :: [S -> Type]) (s :: S) = PRec {}
- pletL :: forall (as :: [[S -> Type]]) (s :: S) (r :: S -> Type). All (SListI :: [S -> Type] -> Constraint) as => SOP (Term s) as -> (SOP (Term s) as -> Term s r) -> Term s r
- grecEq :: forall (s :: S) (struct :: [S -> Type]). All PEq struct => NP (Term s) struct -> NP (Term s) struct -> Term s PBool
- gstructEq :: forall (s :: S) (struct :: [[S -> Type]]). All2 PEq struct => SOP (Term s) struct -> SOP (Term s) struct -> Term s PBool
- groupHandlers :: forall (s :: S) (r :: S -> Type). [(Integer, Term s r)] -> Term s PInteger -> Term s r
- class (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 :: S) (a :: S -> Type) (struct :: [k])
- type family UnTermRec (struct :: [Type]) :: [S -> Type] where ...
- type UnTermStruct x = UnTermStruct' (Code x)
- type family UnTermStruct' (struct :: [[Type]]) :: [[S -> Type]] where ...
- type RecTypePrettyError (struct :: [[k]]) = RecTypePrettyError' struct ~ 'True
Documentation
type family RecAsHaskell (x :: [S -> Type]) :: [Type] where ... Source #
Equations
| RecAsHaskell (x ': xs) = AsHaskell x ': RecAsHaskell xs | |
| RecAsHaskell ('[] :: [S -> Type]) = '[] :: [Type] |
type family StructAsHaskell (x :: [[S -> Type]]) :: [[Type]] where ... Source #
Equations
| StructAsHaskell (x ': xs) = RecAsHaskell x ': StructAsHaskell xs | |
| StructAsHaskell ('[] :: [[S -> Type]]) = '[] :: [[Type]] |
pletL :: forall (as :: [[S -> Type]]) (s :: S) (r :: S -> Type). All (SListI :: [S -> Type] -> Constraint) as => SOP (Term s) as -> (SOP (Term s) as -> Term s r) -> Term s r Source #
Since: 1.10.0
grecEq :: forall (s :: S) (struct :: [S -> Type]). All PEq struct => NP (Term s) struct -> NP (Term s) struct -> Term s PBool Source #
Since: 1.10.0
gstructEq :: forall (s :: S) (struct :: [[S -> Type]]). All2 PEq struct => SOP (Term s) struct -> SOP (Term s) struct -> Term s PBool Source #
Since: 1.10.0
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: 1.10.0
class (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 :: S) (a :: S -> Type) (struct :: [k]) Source #
Since: 1.10.0
Instances
| (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 :: [k]) Source # | |
Defined in Plutarch.Repr.Internal | |
type UnTermStruct x = UnTermStruct' (Code x) Source #
Since: 1.10.0
type family UnTermStruct' (struct :: [[Type]]) :: [[S -> Type]] where ... Source #
Equations
| UnTermStruct' ('[] :: [[Type]]) = '[] :: [[S -> Type]] | |
| UnTermStruct' (x ': rest) = UnTermRec x ': UnTermStruct' rest |
type RecTypePrettyError (struct :: [[k]]) = RecTypePrettyError' struct ~ 'True Source #
Since: 1.10.0