Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family IndigoWithParams n inp a where ...
- type family AreIndigoParams n stk :: Constraint where ...
- fromIndigoWithParams :: forall inp n a. (AreIndigoParams n inp, KnownValue a) => IndigoWithParams n inp a -> MetaData inp -> Sing n -> (IndigoM a, MetaData inp)
Documentation
type family IndigoWithParams n inp a where ... Source #
Type of a function with n
Var
arguments and IndigoM a
result.
Note that the arguments are the first n
elements of the inp
stack in
inverse order, for example:
IndigoWithParams ('S ('S 'Z)) '[a, b, c] x
is the same as:
Var b -> Var a -> IndigoM x
IndigoWithParams 'Z _ a = IndigoM a | |
IndigoWithParams ('S n) inp a = Var (At n inp) -> IndigoWithParams n inp a |
type family AreIndigoParams n stk :: Constraint where ... Source #
Typeable and stack size constraint for the parameters of an IndigoWithParams
.
AreIndigoParams 'Z _ = () :: Constraint | |
AreIndigoParams ('S n) stk = (KnownValue (At n stk), RequireLongerThan stk n, AreIndigoParams n stk) |
fromIndigoWithParams :: forall inp n a. (AreIndigoParams n inp, KnownValue a) => IndigoWithParams n inp a -> MetaData inp -> Sing n -> (IndigoM a, MetaData inp) Source #
Converts an IndigoWithParams
to its form without input Var
s, alongside
the MetaData
to use it with.
If there is an Ops
to the bottom of the stack it also assigns a Var
to it.