Safe Haskell | None |
---|---|
Language | Haskell2010 |
Reimplementation of some syntax sugar
You need the following module pragmas to make it work smoothly:
{-# LANGUAGE NoApplicativeDo, RebindableSyntax #-} {-# OPTIONS_GHC -Wno-unused-do-bind #-}
ifthenelse
construct
ifThenElse :: (IfConstraint a b, IsExpr exa Bool) => exa -> IndigoM a -> IndigoM b -> IndigoM (RetVars a) Source #
Defines semantics of if ... then ... else ...
construction for Indigo
where the predicate is a generic exa
for which IsExpr exa Bool
holds
Numerical literals resolution
fromInteger :: Integer -> NumType n t -> t Source #
Defines numerical literals resolution for Indigo.
It is implemented with an additional NumType
argument that disambiguates
the resulting type.
This allows, for example, 1 int
to be resolved to 1 :: Integer
.
nat :: NumType 'Nat Natural Source #
Numerical literal disambiguation value for a Natural
, see fromInteger
.
int :: NumType 'Int Integer Source #
Numerical literal disambiguation value for an Integer
, see fromInteger
.
mutez :: NumType 'Mtz Mutez Source #
Numerical literal disambiguation value for a Mutez
, see fromInteger
.
Re-exports
class IsLabel (x :: Symbol) a where #
Instances
(KnownSymbol name, s ~ name) => IsLabel s (Label name) | |
Defined in Util.Label | |
name ~ name' => IsLabel name' (Name name) | |
Defined in Named.Internal | |
(p ~ NamedF f a name, InjValue f) => IsLabel name (a -> Param p) | |
Defined in Named.Internal | |
(name ~ name', a ~ a', InjValue f) => IsLabel name (a -> NamedF f a' name') | |
Defined in Named.Internal |