indigo-0.2.2: Convenient imperative eDSL over Lorentz.
Safe HaskellNone
LanguageHaskell2010

Indigo.Rebinded

Description

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 #-}
Synopsis

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 #

Methods

fromLabel :: a #

Instances

Instances details
(KnownSymbol name, s ~ name) => IsLabel s (Label name) 
Instance details

Defined in Util.Label

Methods

fromLabel :: Label name #

name ~ name' => IsLabel name' (Name name) 
Instance details

Defined in Named.Internal

Methods

fromLabel :: Name name #

(p ~ NamedF f a name, InjValue f) => IsLabel name (a -> Param p) 
Instance details

Defined in Named.Internal

Methods

fromLabel :: a -> Param p #

(name ~ name', a ~ a', InjValue f) => IsLabel name (a -> NamedF f a' name') 
Instance details

Defined in Named.Internal

Methods

fromLabel :: a -> NamedF f a' name' #