morley-0.3.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Typed.Haskell.Instr.Helpers

Synopsis

Documentation

data Branch Source #

Which branch to choose in generic tree representation: left, straight or right. S is used when there is one constructor with one field (something newtype-like).

The reason why we need S can be explained by this example: data A = A1 B | A2 Integer data B = B Bool Now we may search for A1 constructor or B constructor. Without S in both cases path will be the same ([L]).

Constructors

L 
S 
R 

type Path = [Branch] Source #

Path to a leaf (some field or constructor) in generic tree representation.

class RSplit (l :: [k]) (r :: [k]) where Source #

Split a record into two pieces.

Methods

rsplit :: forall f. Rec f (l ++ r) -> (Rec f l, Rec f r) Source #

Instances
RSplit ([] :: [k]) (r :: [k]) Source # 
Instance details

Defined in Michelson.Typed.Haskell.Instr.Helpers

Methods

rsplit :: Rec f ([] ++ r) -> (Rec f [], Rec f r) Source #

RSplit ls r => RSplit (l ': ls :: [k]) (r :: [k]) Source # 
Instance details

Defined in Michelson.Typed.Haskell.Instr.Helpers

Methods

rsplit :: Rec f ((l ': ls) ++ r) -> (Rec f (l ': ls), Rec f r) Source #