h&a])             !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~         !!!""""""""""""" #$$$$$$$$$$$$$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'''''''''''((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))*****++++++++++++++++++++++++,,---........................................................////////////////000000000000000000000000000111111111111111222222222223333333333333333333333333333333333333333333333334444455555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555                                                                                                                                                                                                        6 6 6                                                        7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >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YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]^_`aaaaabbbbccccdddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee                                                                                                                       fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffggggggggggggggggggggggggggggggggggggggggg g g g g h h h h h h h h h h h h h h h h h h h h h h i i i i i i i i i i i i i i i i i i i i i i j j j j j j j j j j j j j j j j j j k k k k k k k k k k k k k k k k k k k k k k l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l!l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%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%z%{%{%{%{%|%|%|%|%|%|%|%|%|%|%|%}%}%}%}%}%}%}%}% % % % % % % % % % % % %~%~%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))) Safe-Inferred;!#$%&'(),./01245789:;<>?j7morleyBuild a binary representation of a Zarith natural. This function is partial, only defined for nonnegative )s.(The reason it's not defined to accept a ) is mostly to avoid )/) conversions at the use sites, since not all libraries, notably  cryptonite , support ).123456789:;<=>123496785=;:<> Safe-Inferred;!#$%&'(),./01245789:;<>?k?morley#Encode a number as tezos does this.>In the Tezos reference implementation this encoding is called zarith.?? Safe-Inferred;!#$%&'(),./01245789:;<>?uY@morleyA new type that can wrap values so that the RenderDoc instances of the combined value can have a different behavior for the pretty printer.BmorleyGeneralize converting a type into a Text.PrettyPrint.Leijen.Text.Doc. Used to pretty print Michelson code and define Fmt.Buildable instances.DmorleyWhether a value can be represented in Michelson code. Normally either all values of some type are renderable or not renderable. However, in case of instructions we have extra instructions which should not be rendered. Note: it's not sufficient to just return ) for such instructions, because sometimes we want to print lists of instructions and we need to ignore them complete (to avoid putting redundant separators).Emorley/Environment carried during recursive rendering.)morleyWhether the current expression is going to be used as part of top-level expression or in a similar context. When set to ), you may need to wrap your rendered expression into parentheses.FmorleyRenders a list of B elements surrounded with square brackets, separated by a comma and a space.HmorleyConvert ) to ) with a line width of 80.ImorleyConvert ) to ) in the same manner as H.JmorleyConvert ) to ) in the same manner as H.KmorleyGeneric way to render the different op types that get passed to a contract.Lmorley0Render a comma-separated list of items in bracesMmorley:Render a semi-colon-separated list of items without bracesNmorleyWrap documents in parentheses if there are two or more in the list.Omorley#Turn something that is instance of B into a )". It's formatted the same way as H formats docs.Pmorley Works as O; above, but doesn't force the doc to be printed in one line)morley9Here using a page width of 80 and a ribbon width of 1.0 https://hackage.haskell.org/package/wl-pprint-1.2.1/docs/Text-PrettyPrint-Leijen.htmlQmorleyConstructors for ERmorleyConstructors for ESmorleyAdd parentheses if needed.Tmorley2Add parentheses if needed, multiline if necessary.UmorleyEnsure parentheses are not required, for case when you cannot sensibly wrap your expression into them.@ABCDEFGHIJKLMNOPQRSTUBCD@AHIJKLMGNOPFEQRSTU Safe-Inferred;!#$%&'(),./01245789:;<>?wXmorleyPath to a leaf (some field or constructor) in generic tree representation.YmorleyWhich branch to choose in generic tree representation: left, straight or right. [ is used when there is one constructor with one field (something newtype-like).The reason why we need [ 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 [, in both cases path will be the same ([L]).XYZ\[YZ\[X Safe-Inferred;!#$%&'(),./01245789:;<>?{]morleyCompute a cryptographic hash of a bytestring using the Blake2b_256 cryptographic hash function. It's used by the BLAKE2B instruction in Michelson.^morleyCompute a cryptographic hash of a bytestring using the Blake2b_160 cryptographic hash function._morleyCompute a cryptographic hash of a bytestring using the Sha256 cryptographic hash function.`morleyCompute a cryptographic hash of a bytestring using the Sha512 cryptographic hash function.amorleyCompute a cryptographic hash of a bytestring using the Sha3_256 cryptographic hash function. It is used by the SHA3 Michelson instruction.bmorleyCompute a cryptographic hash of a bytestring using the Keccak_256 cryptographic hash function. It is used by the KECCAK Michelson instruction.]^_`ab]^b_a` Safe-Inferred;!#$%&'(),./01245789:;<>?|}cmorleyOptions that we use in morley-based packages (including morley ) by default.cc Safe-Inferred<!#$%&'(),./01245789:;<=>?&dmorley+Datatype representing arbitrary annotation.hmorley*Field annotation for the entire parameter.imorley#A convenience synonym for variable yjmorley A convenience synonym for field ykmorleyA convenience synonym for type ylmorley'Type-level tag for variable annotationsmmorley$Type-level tag for field annotationsnmorley#Type-level tag for type annotationsomorleyA constraint representing that type-level annotation tag is known at compile-timepmorleyWhat prefix is used for the given annotation type (identified by tag) in Michelson code, i.e. % for field annotations, @ for variable annotations, : for type annotationsqmorleyAn q contains all the typefield variable ys , with each group in order, associated with an entity. Note that in its rendering/show instances the unnecessary annotations will be omitted, as well as in some of the functions operating with it. Necessary ys are the ones strictly required for a consistent representation. In particular, for each group (tf v): - if all annotations are * they are all omitted - if one or more  follow a non-empty y', they are omitted - if one or more  precede a non-empty y%, they are kept - every non-empty y is obviously kept This is why order for each group is important as well as separation of different groups of ys.vmorley&Either one or two variable annotationsymorley Generic TypeFieldVariable AnnotationAs per Michelson documentation, this type has an invariant: (except for the first character, here parametrized in the type tag) the allowed character set is the one matching the following regexp: %|%%|%|[:%][_0-9a-zA-Z][_0-9a-zA-Z.%@]*|morley8Unidirectional pattern synonym used to pattern-match on y without invoking z}morleyAn q without any y.~morleyAn q with only a single y (of any kind).morleyAn q with several ys of the same kind.morleyAn q built from all 3 kinds of y.morleyReturns ) if all ys in the Set are unnecessaryempty. False otherwise.morleyReturns the amount of y;s that are necessary for a consistent representation. See q.morleyRemoves all unnecessary ys. See q.)morleyRemoves all unnecessary ys from a list of the same typemorley%Returns the number of annotations in q for each type.morleyReturns the first annotation in a list of annotations of a specific type in q, or  if this list is empty.morleyReturns the second annotation in a list of annotations of a specific type in q, or , if this list contains less than 2 elements.)morley0Retrieves an annotation of a specific type from q using the passed function.)morleyRenders a single y, this is used in every rendering instance of it. Note that this also renders empty ones/s because a single y does not have enough context to know if it can be omitted, use ~! if you want to hide it instead.)morleyRenders a list of y#s, omitting unnecessary empty ones/'. This is used (3 times) to render an q.morleyEmpty y, i.e. no annotationmorley Makes an y" from its textual value, prefix (%@:) excluded Returns a ) error message if the given ) contains invalid charactersmorley :t [annQ||],... :: forall {k} {tag :: k}. Annotation tag:t [annQ|abc|],... :: forall {k} {tag :: k}. Annotation tagmorley:t [typeAnnQ||]... :: TypeAnn:t [typeAnnQ|abc|]... :: TypeAnnmorley:t [fieldAnnQ||]... :: FieldAnn:t [fieldAnnQ|abc|]... :: FieldAnnmorley:t [varAnnQ||] ... :: VarAnn:t [varAnnQ|abc|] ... :: VarAnnmorley>List of all the special Variable Annotations, only allowed in CAR and CDR instructions, prefix (@) excluded. These do not respect the rules of  and .morley3The only special Field Annotation, only allowed in PAIR, LEFT and RIGHT instructions, prefix (%) excluded. This does not respect the rules of  and .morley Checks if a )6 is valid to be the first of an annotation, prefix (%@8:) excluded, the ones following should be checked with  instead. Note that this does not check Special Annotations, see  and morley Checks if a ) is valid to be part of an annotation, following a valid first character (see ) and the prefix (%@<:). Note that this does not check Special Annotations, see  and .defghijklmnopqrstuvwxyz{|}~.yz{vwx|qrstu}~opkjihnmldefg Safe-Inferred;!#$%&'(),./01245789:;<>?   Safe-Inferred;!#$%&'(),./01245789:;<>?`morleyIsomorphism between  Bimap a b and  Bimap b a.morley Left-biased )& instance. It assumes the left value a is the key (just like the  At (Map k v) instance).!To flip this assumption, use the  optic.morley Left-biased )& instance. It assumes the left value a is the key (just like the  Ix (Map k v) instance).!To flip this assumption, use the  optic. Safe-Inferred;!#$%&'(),./01245789:;<>? morleyDescribes how  should decode tag-dependent data. We expect bytes of such structure: 5 followed by a bytestring which will be parsed with .morleySpecialization of  to ) transformer.morleyAny decoding error.morley Alias for  constructor specialized to )morley Alias for  constructor.morleyGet a bytestring of the given length leaving no references to the original data in serialized form.morleyGet remaining available bytes.Note that reading all remaining decoded input may be expensive and is thus discouraged, use can use this function only when you know that amount of data to be consumed is limited, e.g. within  call.morleyFail with "unknown tag" error.morleyCommon decoder for the case when packed data starts with a tag (1 byte) that specifies how to decode remaining data.This is a version of  specialized to naked ) monad.morleyCommon decoder for the case when packed data starts with a tag (1 byte) that specifies how to decode remaining data.This is a general version of  that allows )' to be wrapped in a monad transformer.00 Safe-Inferred;!#$%&'(),./01245789:;<>?morleyError that can happen during parsing of cryptographic primitive types.morley*Encode a bytestring in Base58Check format.morley,Decode a bytestring from Base58Check format.morleyParse a base58check encoded value expecting some prefix. If the actual prefix matches the expected one, it's stripped of and the resulting payload is returned.morley!Template for 'format*' functions.morley Template for 'parse*' functions.morleyReturns first encountered )2 in a list. If there are none, returns arbitrary )%. It is useful to implement parsing.morley*Do randomized action using specified seed.morleyMake a ) from raw bytes.Raw bytes are in the format of Compressed SEC Format. Refer to this article on how this is parsed: https://www.oreilly.com/library/view/programming-bitcoin/9781492031482/ch04.htmlmorley Convert a ) to raw bytes.morley Convert a ) to raw bytes.morley Convert a ) to raw bytes.morleyMake a ) from raw bytes.morleyMake a )* from raw bytes representing a secret key. Safe-Inferred;!#$%&'(),./01245789:;<>?amorleyNewtype wrapper for ByteString which uses hexadecimal representation for JSON serialization. Safe-Inferred<!#$%&'(),./01245789:;<=>?HmorleyAlways truthful unary constraint. Can be used to essentially turn  into a somewhat inefficient Some.morleyMap over argument.morleyTraverse over argument.morley#Apply function to constrained valuemorleyMonadic morleyFlipped version of morleyFlipped version of     Safe-Inferred;!#$%&'(),./01245789:;<>? Safe-Inferred;!#$%&'(),./01245789:;<>?morleyIf monadic action returns a ) value, it will be thrown. Otherwise the returned value will be returned as is.  Safe-Inferred;!#$%&'(),./01245789:;<>?morley Similar to , but compares types via  DefaultEq& used in singletons comparisons (see Data.Eq.Singletons module).  Safe-Inferred;!#$%&'(),./01245789:;<>?Pmorley5Extract datatype name via its Generic representation.:For polymorphic types this throws away all type arguments.morleyRebuild a list into a binary tree of exactly the same form which  Data.Generics uses to represent datatypes.Along with the original list you have to provide constructor for intermediate nodes - it accepts zero-based index of the leftmost element of the right tree and merged trees themselves.! Safe-Inferred;!#$%&'(),./01245789:;<>?" Safe-Inferred;!#$%&'(),./01245789:;<>?LmorleyA ) of morleyDatatype encoding transformations we apply to a quoter input and output. Note the order is important! We first unescape, then unindent, then trim.morleyUsed to generate quasi-quotersmorley Generate TH )/ for a quoter based on a set of transformationsmorleyMake a )$ using a given set of transformaions)morley A version of  Fmt.indentF' that doesn't indent the first line, and keeps the final line break intact.    Safe-Inferred;!#$%&'(),./01245789:;<>?7morley?For datatype with "myNyan" field it will create "myNyanL" lens.# Safe-Inferred;!#$%&'(),./01245789:;<>?JmorleySome defaults in Haskell are debatable and we typically want to customize them in our applications. Some customizations are done at the level of main!. Currently we have two of them: ) from the  with-utf8 package.) from the uncaught-exception package.'This function is supposed to apply all main- customizations that we typcally want to do.$ Safe-Inferred;!#$%&'(),./01245789:;<>?GmorleyA helper record datatype representing a mismatch between two values of some type. One is assumed to be in some sense the "expected" value, the other one is assumed to be the "actual" value.morleyExpected valuemorley Actual valuemorley$Render a mismatch error with a diff.1This is intended to be used with types for which B outputs multiline )'. Generally those are types wrapped in @.morley-Render a mismatch error of lists with a diff.1This is intended to be used with types for which B outputs multiline )'. Generally those are types wrapped in @.% Safe-Inferred<!#$%&'(),./01245789:;<=>?morleyMichelson Typemorley>Since Babylon parameter type can have special root annotation.morley,Annotated Michelson type. We don't name it ) to avoid conflicts with .morley2Extract a raw Michelson type from an annotated onemorleyRender a type representationOrdering between different kinds of annotations is not significant, but ordering among annotations of the same kind is. Annotations of a same kind must be grouped together. (prim @v :t %x arg1 arg2 ...)these are equivalent -PAIR :t @my_pair %x %y PAIR %x %y :t @my_pairmorleyConstruct non-annotated option type from an annotated typemorleyConstruct non-annotated pair type from two annotated typesmorleyConstruct non-annotated or type from two annotated typesmorleyConstruct annotated int type with an empty annotationmorleyConstruct annotated nat type with an empty annotationmorleyConstruct annotated unit type with an empty annotationmorleyConstruct annotated bool type with an empty annotationmorleyConstruct annotated pair type with an empty annotationmorleyConstruct annotated or type with an empty annotationmorleyFor implicit account, which Ty its parameter seems to have from outside.morleyCheck if type is atomic.morleyPredicate checking if type is key)morleyPredicate checking if type is unitmorleyPredicate checking if type is  signature)morleyPredicate checking if type is  operationmorley8Predicate checking if type is comparable, i.e. true for int, nat, string , etc. see  ,https://tezos.gitlab.io/michelson-reference/) for a complete list of comparable types.morleyPredicate checking if type is mutezmorleyPredicate checking if type is  timestampmorleyPredicate checking if type is keyhashmorleyPredicate checking if type is boolmorleyPredicate checking if type is stringmorley-Predicate checking if type is integral, i.e. nat, int, mutez, or  timestampmorleyPredicate checking if type is natmorleyPredicate checking if type is intmorleyPredicate checking if type is bytes??& Safe-Inferred;!#$%&'(),./01245789:;<>? morleyAn inline test assertionmorley!A comment with optional embedded  s. Used with PRINT extended instruction.morleyA stack pattern-matchmorley"A type-variable or a type-constantmorleyA (named) type variablemorleyA reference into the stack.morley3Implementation-specific instructions embedded in a NOP primitive, which mark a specific point during a contract's typechecking or execution.These instructions are not allowed to modify the contract's stack, but may impose additional constraints that can cause a contract to report errors in type-checking or testing.Additionaly, some implementation-specific language features such as type-checking of LetMacro6s are implemented using this mechanism (specifically FN and FN_END).morley,Matches current stack against a type-patternmorley8Copy the current stack and run an inline assertion on itmorley'Print a comment with optional embedded StackRefsmorleyA comment in Michelson codemorleyConvert # to a list of types. Also returns ) which is ). if the pattern is a fixed list of types and )2 if it's a pattern match on the head of the stack.morley+Get the set of variables in a stack pattern' Safe-Inferred;!#$%&'(),./01245789:;<>?morleyA second-order analogue of ,'. This serves the same purpose as the Data.Singletons. class. However, the  singletons version requires a separate instance for each type in order to support GHC versions that don't offer QuantifiedConstraints+. We only need one instance for all types.morley Version of ) that uses ,morleySuppose you have a data type X with parameter a and you have two values:  x1 :: X a1 and  x2 :: X a2 . You can't compare them using ), because they have different types. However, you can compare them using  as long as both parameters have SingI instances and their kind is ).morley Version of  for types with 2 parameters.morley Version of  for types with 3 parameters.morley Version of  for types with 3 parameters.morleyHelper function to generate , and  instances using Sing" as prefix for the type names and S for constructors'.morley"Singleton-based implementation of geq  ( Safe-Inferred;!#$%&'(),./01245789:;<>?VmorleyAddress "kind"morleyan implicit address, tz1-tz3morleya contract address, KT1morleya transaction rollup address, txr1) Safe-Inferred;!#$%&'(),./01245789:;<>?morley&A product type of all classifications.morley5Whether an instruction carries Michelson annotations.morleyStandard means that the first constructor argument contains all annotations as Anns type, which is true for most annotated instructions. There are a couple exceptions, however.morley9There is corresponding instruction in the Michelson spec.morley"Extended instructions". Don't affect execution on chain, but may affect execution on the morley emulator.morley%Wrappers that don't affect execution.morleyMichelson structures that are not instructions, e.g. a nested code block.morleyWhether an instruction always fails. An example of always-failing instruction is NEVER.morleyInstruction always fails.morleyInstruction might fail if inputs are incorrect, but will generally work.morleyNumber of children instructions a given instruction constructor has.morleyIt is unknown at compile-time whether the instruction has children or not.morley3The instruction has children indirectly, as values.morley The instruction has no children.morleyThe instruction has one child.morley!The instruction has two children.* Safe-Inferred;!#$%&'(),./01245789:;<>?morley Generates an ) instance for a GADT.On superclass constraints for type arguments: we use heuristics to guess for which type arguments we need to add NFData instance. If this behaves not as you want, probably it's just worth starting passing the necessary constraints to this function manually.morleyCheck if name is a typemorleyAccepts a type constructor and fills it with variables until getting a type of kind *.morleyGiven a list of types, produce the type of a tuple of those types. This is analogous to ) and ). tupT [[t|Int|], [t|Char|], [t|Bool]] = [t| (Int, Char, Bool) |] + Safe-Inferred;!#$%&'(),./01245789:;<>?.)morley0Reorders entries corresponding to constructors (a) and fields (b) according to some rule.)morleySimple type synonym used (internally) between functions, basically extending ) with the )s of the constructor and its fields. For fields it carries both names in the original order and in the order specified by the strategy (and the latter is paired with depths).)morleyConstructor's depth)morleyConstructor's name)morley2Names of constructor fields in the original order.)morleys for it. This function should when possible make checks and ), using the constructors' ) provided by the ).)morley'Reorder constructors given their names.)morleyReorder fields given their names, the argument depends on whether fields are part of record (and thus named) or not (unnamed).)morleySimple tuple that carries basic info about a constructor: it's name, number of its fields and their names. Used only in this module.)morleySimple tuple that defines the "shape" of a constructor: it's name and number of fields. Used only in this module.)morleySimple tuple specifying the depth of a constuctor and a list of depths for its fields.This is used as a way to specify the tree topology of the Generic instance to derive.morleyIn this strategy the desired depths of contructors (in the type tree) and fields (in each constructor's tree) are provided manually and simply checked against the number of actual constructors and fields.morleyStrategy to make right-balanced instances (both in constructors and fields)..This will try its best to produce a flat tree:4the balances of all leaves differ no more than by 1;leaves at left will have equal or lesser depth than leaves at right.morleyStrategy to make left-balanced instances (both in constructors and fields).)This is the same as symmetrically mapped .morleyStrategy to make fully right-leaning instances (both in constructors and fields).morleyStrategy to make fully left-leaning instances (both in constructors and fields).morleyStrategy to make Haskell's Generics-like instances (both in constructors and fields).This is similar to , except for the "flat" part:for each node, size of the left subtree is equal or less by one than size of the right subtree.This strategy matches A1.1.!customGeneric "T" haskellBalanced is equivalent to mere deriving stock Generic T.morley.Modify given strategy to reorder constructors.The reordering will take place before depths are evaluated and structure of generic representation is formed. Example: .reorderingConstrs alphabetically rightBalanced.morley(Modify given strategy to reorder fields.Same notes as for  apply here. Example: reorderingFields forbidUnnamedFields alphabetically rightBalanced.morley9Modify given strategy to reorder constructors and fields.Same notes as for  apply here. Example: ?reorderingData forbidUnnamedFields alphabetically rightBalanced.morley$Sort entries by name alphabetically.morley4Leave unnamed fields intact, without any reordering.morleyFail in case records are unnamed and we cannot figure out the necessary reordering.)morleyConstruct a strategy that only constructs Generic instance of given form, without e.g. changing the order of entries.morleyHelper to make a strategy that created depths for constructor and fields in the same way, just from their number.The provided function f" must satisfy the following rules: length (f n) D n"sum $ (x -> 2 ^^ (-x)) <$> f n D 1 (unless n = 0)morleyLike , but allows specifying different strategies for constructors and fields.morley&Helper for making a constructor depth.Note that this is only intended to be more readable than directly using a tuple with 1 and for the ability to be used in places where RebindableSyntax) overrides the number literal resolution.morley Helper for making a field depth.Note that this is only intended to be more readable than directly using a tuple with 1 and for the ability to be used in places where RebindableSyntax) overrides the number literal resolution.morleyIf a )2 type is given, this function will generate a new ) instance with it, and generate the appropriate "to" and "from" methods. Otherwise, it'll generate a new ) instance as well.)morleyApply a reordering strategy.This uses given  [CstrNames] to understand how constructors and their fields should be reordered, and applies the same transposition to entries within ).morley*Reifies info from a type name (given as a )<). The lookup happens from the current splice's scope (see )) and the only accepted result is a "plain" data type (no GADTs).morleyDerives, as well as possible, a type definition from its name, its kind (where known) and its variables.)morley4Extract the info for each of the given constructors.)morley#Combines depths with constructors, )*ing in case of mismatches, and generates )"s for the constructors' arguments.)morley Creates the ) type for an unbalanced ) instance, for a type given its name, constructors' depths and derived full type.Note: given that these types definition can be very complex to generate, especially in the metadata, here we let generic-deriving# make a balanced value first (see )!) and then de-balance the result.)morleyBreaks down a tree of Generic types from the contructor of "nodes" and the constructor for "leaves" metadata.This expects (and should always be the case) the "root" to be a Generic metadata contructor, which is returned in the result alongside the list of leaves (in order).)morleyCreate the unbalanced * fuction declaration for a type starting from its list of weighted constructors.*morleyCreate the unbalanced * fuction declaration for a type starting from its list of weighted constructors.*morleyRecursively aggregates the values in the given list by merging (with the given function) the ones that are adjacent and with the same depth.This will fail for every case in which the list cannot be folded into a single 0-depth value.*morley(Original name of a constructor or field.morleyPatch a given strategy by applying a transformation function to constructor names before passing them through ordering function.morleyPatch a given strategy by applying a transformation function to field names before passing them through ordering function., Safe-Inferred;!#$%&'(),./01245789:;<>?~morleyDefault layout in LIGO.To be used with  , see this method for more info.This is similar to , but!fields are sorted alphabetically;always puts as large complete binary subtrees as possible at left.morleyComb layout in LIGO ( [@layout:comb] ).To be used with .Note: to make comb layout work for sum types, make sure that in LIGO all the constructors are preceded by the bar symbol in your type declaration: type my_type = [@layout:comb] | Ctor1 of nat C bar symbol _must_ be here | Ctor2 of int ... !Though the situation may change:  .https://gitlab.com/ligolang/ligo/-/issues/1104.- Safe-Inferred;!#$%&'(),./01245789:;<>?fmorley,Leads first character of text to lower case.(For empty text this will throw an error. Safe-Inferred;!#$%&'(),./01245789:;<>? morley*Constaints that can be provided on demand.Needless to say, this is a pretty unsafe operation. This typeclass makes using it safer in a sense that getting a segfault becomes harder, but still it deceives the type system and should be used only if providing a proper proof would be too difficult.morley%Produce a constraint out of thin air.morley"A value of type parametrized with some type parameter.morleyData.List.Singletons.SList analogue for .morley Similar to SingI [], but does not require individual elements to be also instance of SingI.morleyBring type-level list at term-level using given function to demote its individual elements.morleyMake sure given type is evaluated. This type family fits only for types of ) kind.morley-Fail with given error if the condition holds.morley5Fail with given error if the condition does not hold.morleyFail with given error if the condition does not hold. Otherwise, return the third argument.morley A version of - that imposes an equality constraint on its ) argument.morleyFail with given error if the condition does not hold. Otherwise, return the third argument.%There is a subtle difference between FailWhenElsePoly# and the following type definition::{/type FailWhenElsePolyAlternative cond msg els = If cond (DelayError msg) els:}If cond cannot be fully reduced (e.g., it's a stuck type family application or an ambiguous type) then:FailWhenElsePoly will state that the constraint cannot be deduced (and this error message will be suppressed if there are also custom type errors).FailWhenElsePolyAlternative) will fail with the given error message, err. For example::{-- Partial function-type family IsZero (n :: Peano) :: Bool where IsZero ('S _) = 'False--f1 :: ( IsZero n ~ 'True , FailWhenElsePoly (IsZero n) ('Text "Expected zero") (() :: Constraint)) => ()f1 = ()--f2 :: ( IsZero n ~ 'True , FailWhenElsePolyAlternative (IsZero n) ('Text "Expected zero") (() :: Constraint)) => ()f2 = ():}f1 @'Z...2... @ Couldn't match type @IsZero 'Z@ with @'True@...f2 @'Z...... @ Expected zero...%As you can see, the error message in f2res is misleading (because the type argument actually _is_ zero), so it's preferable to fail with the standard GHC error message.morley A version of - that imposes an equality constraint on its ) argument.morleyAn old name for .morleyConstrain two types to be equal, and produce an error message if they are found not to be.:k! FailUnlessEqual Int Int ('Text "This should not result in a failure")FailUnlessEqual Int Int ('Text "This should not result in a failure") :: Constraint= (() :: Constraint, Int ~ Int):k! FailUnlessEqual Bool Int ('Text "This should result in a failure")FailUnlessEqual Bool Int ('Text "This should result in a failure") :: Constraint= ((TypeError ...), Bool ~ Int)morleyConstrain two types to be equal. If they are found not to be, produce an error message. If they are shown to be equal, impose an additional given constraint.:k! FailUnlessEqualElse Int Int ('Text "This should not result in a failure") ()FailUnlessEqualElse Int Int ('Text "This should not result in a failure") () :: Constraint= (() :: Constraint, Int ~ Int):k! FailUnlessEqualElse Bool Int ('Text "This should result in a failure") ()FailUnlessEqualElse Bool Int ('Text "This should result in a failure") () :: Constraint= ((TypeError ...), Bool ~ Int)the ~ constraint might seem redundant, but, without it, GHC would reject:{=foo :: FailUnlessEqualElse a b ('Text "MyError") () => a -> bfoo = id:}%GHC needs to "see" the type equality ~ in order to actually "learn" something from a type family's result.We use * here, rather than , so this will work with type variables known to be equal, even if nothing is known about them concretely. For example, the following will compile::{=foo :: FailUnlessEqualElse a b ('Text "MyError") () => a -> b foo x = x-- bar :: a -> a bar = foo:} If we used (==), then bar would be rejected.(==)- has its place (see the comments below it in Data.Type.Equality) but I don't think it has anything to offer us here. In particular, the equality constraint we bundle up seems to win us all the reasoning power that (==) would provide and more. The following adaptation of the example in the Data.Type.Equality comments compiles::{>foo :: FailUnlessEqualElse (Maybe a) (Maybe b) ('Text "yo") ()3 :- FailUnlessEqualElse a b ('Text "heya") ()foo = Sub Dict:}In this example, the entire consequent follows from the equality constraint in the antecedent; the  part of it is irrelevant, so we don't need to be able to reason from it. If we were reasoning solely using (==), foo< would be rejected because the error messages are different.morleyDifference between two lists.morley+Remove all occurences of the given element.morleyAppend for type-level lists. We use this synonym instead of using the one from Data.Vinyl.TypeLevel directly because the latter is missing a fixity declaration. See the  .https://github.com/VinylRecords/Vinyl/pull/165vinyl pull request.morley+Equality constraint in form of a typeclass.morleyA natural conclusion from the fact that an error has not occurred.morley Given a type-level list that is ,(, construct evidence that it is also a  . Note that 8 is weaker, hence this construction is always possible.morleySplit a record into two pieces.morleyGHC can't deduce this itself because in general a type family might be not associative, what brings extra difficulties and redundant constraints, especially if you have complex types. But (++) type family is associative, so let's define this small hack.morleyUtility function to help transform the first argument of a binfunctor.morleyIn majority of the cases we don't want to mock typeclass constraints since coercing instances of typeclasses with methods is utterly unsafe.((5 Safe-Inferred<!#$%&'(),./01245789:;<=>? morleyA convenient alias.We are going to use . numbers for type-dependent logic and normal *0s in user API, need to distinguish them somehow.morleyWe can have `RequireLongerOrSameLength = (RequireLongerOrSameLength' l a, LongerOrSameLength l a)`, but apparently the printed error message can be caused by  rather than `. We do not know for sure how it all works, but we think that if we require constraint X before Y (using multiple `=>`)s) then X will always be evaluated first.*morley in form of constraint that produces good error message. Should be used together with  because  gives GHC more information. We use it in combination, so that it gives enough information to GHC and also producess good error messages.*morleyComparison of type-level naturals, raises human-readable compile error when does not hold.%Here we use the same approach as for  , this type family is internal.*morleyEvaluates list length.This type family is a best-effort attempt to display neat error messages when list is known only partially.For instance, when called on Int ': Int ': s, the result will be OfLengthWithTail 2 s! - compare with result of simple  - 1 + 1 + Length s.5For concrete types this will be identical to calling FromPeano (Length l).morley; in form of constraint that gives most information to GHC.morley Similar to , but returns )/ when list length equals to the passed number.morley3Comparison of type-level naturals, as a constraint.morley1Comparison of type-level naturals, as a function.It is as lazy on the list argument as possible - there is no need to know the whole list if the natural argument is small enough. This property is important if we want to be able to extract reusable parts of code which are aware only of relevant part of stack.morleyA "lazier" version of .  LazyTake n xs( will always produce a list of exactly n elements. If xs has less than n elements, then some of the elements of the result will be stuck. Similarly, if some tail of xs is stuck or ambiguous, then elements of the result past that point will be stuck.  LazyTake ( 4) '[1,2,3,4,5] ~ '[1,2,3,4] LazyTake (ToPeano 4) (1 ': 2 ': 3 ': 4 ': Any) ~ '[1,2,3,4] LazyTake (ToPeano 4) '[1,2] ~ '[1, 2, Head '[], Head (Tail '[])] LazyTake is often better than Take? for driving type inference. For example, given the constraint 5xs ~ Take (ToPeano 3) xs ++ q ': Drop (ToPeano 4) xs ,GHC can't infer anything about the shape of xs. However, the constraint 9xs ~ LazyTake (ToPeano 3) xs ++ q ': Drop (ToPeano 4) xs will allow GHC to infer 0xs ~ x1 ': x2 ': x3 ': q ': Drop (ToPeano 4) xs morleyA type-level version of ". Note that in many cases, using % instead will improve type inference.morley Out of two  naturals, return the larger onemorley Out of two ! naturals, return the smaller onemorley naturals subtractionmorley naturals additionmorley naturals comparissonmorley naturals comparissonmorleyA synonym for SingI (ToPeano n)/. Essentially requires that we can construct a  singleton for a given *morley"A constraint asserting that GHC's Nat n and Peano p% are the same (up to an isomorphism)morley;Get the peano singleton for a given type-level nat literal. peanoSing @2 SS (SS SZ)morleySame as , but only requires * instance.'Witnesses half the equivalence between  KnownNat n and SingI (ToPeano n)morleyRun a computation requiring SingI (ToPeano n) in a context which only has  KnownNat n. Mostly useful when used with *morleyLift a given term-level ) to the type level for a given computation. The computation is expected to accept a * for the sake of convenience: it's easier to get at the type-level natural with ScopedTypeVariables) when pattern-matching on the proxy, e.g. (x :: Natural) `withSomePeano` \(_ :: Proxy n) -> doSomeNatComputation @nmorley Utility to  a Peano *leton.'Useful when dealing with the constraintmorleySingleton additionmorleyConvenience synonym for *morleyProof that for naturals, k + (m + 1) = n entails n > kmorleyProof that for naturals, x + (y + 1) = (x + y) + 1morley Proof that  x + y = y + xmorleyProof that for naturals,  min(n, n) = nmorleyProof that for naturals,  x >= y > z implies x > z0-./00/0-.1. Safe-Inferred;!#$%&'(),./01245789:;<>?5!morleyExistential capturing a fixed-size list whose length is only known at runtime.In most cases, it's probably better to use regular lists, but this can be occasionally useful.We do not provide the * and * instances, since "zipper" applicative is ill-defined for lists of different length, and having inconsistent instances between this and  is more confusing than useful.Unlike regular sized list,  SomeSizedList is a * and a *:>fromList "ab" <> fromList "de" <> mempty :: SomeSizedList CharSomeSizedList (SS (SS (SS (SS SZ)))) ('a' :< 'b' :< 'd' :< 'e' :< Nil)morley-Actual fixed-size list GADT, parametrized by  natural. You generally don't want to use this directly, since % is not very ergonomic. Prefer using  unless writing utility functions that need to do type-level arithmetic..Note that while this has the usual instances, * and * are not the same as for regular lists: they implement "zipper" semantics, i.e. f <*> x is the same as zipWith ($) f xmorley?The primary fixed-size list type. Parametrized by a type-level *% as length and type as element type.Internally powered by  numbersmorleySized list Nil pattern. Unlike  this pattern can be used to auto-deduce the type of the result, see .morley Sized list cons pattern. Unlike  this pattern can be used to auto-deduce the type of the result, e.g.!a ::< b ::< c ::< Nil' = pure 'a' (a, b, c) ('a','a','a')morley;Try to make a fixed-size list from a regular list, given a * . Returns *+ if the regular list has incorrect length.fromListMaybe @3 [1, 2, 3]Just (1 :< 2 :< 3 :< Nil)fromListMaybe @4 [1, 2, 3]NothingmorleySame as , but accepts an explicit  singleton.morleyRun some computation with a * list converted to ". Similar to pattern-matching on , but asserts on the type level that list is in fact not empty.morley.Run some computation with a list converted to #. The same as pattern-matching on .morleyConstruct a list of given length from a regular list. Raise error if length is inconsistent.unsafeFromList @3 [1, 2, 3]1 :< 2 :< 3 :< NilunsafeFromList @1 [1, 2, 3]*** Exception: Invalid list size in Morley.Util.SizedList.unsafeFromList...*morleySame as , but accepts explicit  singletonmorley Convert a  to *morleyReplicate a value n times. This is a version returning an existential. You probably want  or `.morleyReplicate a value n times, where n is passed as a type-level natural. This is essentially a synonym for *.replicateT @5 'a'&'a' :< 'a' :< 'a' :< 'a' :< 'a' :< NilmorleyAs , but accepts an explicit  singleton.morleyZip two lists of potentially different lengths. If one list is longer, extraneous elements will be ignored.8zip (unsafeFromList @3 "abc") (unsafeFromList @4 "defg")*('a','d') :< ('b','e') :< ('c','f') :< NilmorleyZip using a binary operation.morleyGiven a type-level *" and a generator function, make a Indexing starts at 0generate @3 (+1)1 :< 2 :< 3 :< NilmorleySame as , but accepts an explicit  singleton, and passes an explicit singleton as index to the generator functionmorley Reverse a reverse $ generate @3 (+1)3 :< 2 :< 1 :< NilmorleyAppend two sized lists.+generate @3 (+1) `append` generate @3 (+11)$1 :< 2 :< 3 :< 11 :< 12 :< 13 :< Nilmorley#Unzip a sized list using a functionmorleyUnzip a sized list of pairsmorley-Index into a list using a type-level constant#index @2 $ unsafeFromList @5 [1..5]3morleySame as , but accepts an explicit  singleton(Note, that if you wish to use this with `, indexing into some other list, for one, you may want to rethink your approach, since it's pretty inefficient. For two, you may run into arcane compiler error messages, e.g.'let someList = 'a' :< 'b' :< 'c' :< Nilgenerate' @_ @Char (peanoSing @2) $ \(sg, _) -> index' sg someList...5 @ Could not deduce: ('S ('S ('S 'Z)) > m) ~ 'True...To make this work, use  proof:let slLen = length' someListlet len = peanoSing @2generate' @_ @Char len $ \(sg, _) -> transitivity slLen len sg |- index' sg someList'a' :< 'b' :< NilmorleyUse a term-level ) to index into a list. Since the natural can be larger than the length of the list, returns a *.morley)Get the first element of a non-empty listmorleyGet elements after the firstmorleyConstruct a list of one elementmorley7Take a fixed number of elements, given by a type-level *,. Must be smaller than the size of the list"take @3 $ unsafeFromList @5 [1..5]1 :< 2 :< 3 :< Nilmorley7Drop a fixed number of elements, given by a type-level *,. Must be smaller than the size of the list"drop @3 $ unsafeFromList @5 [1..5] 4 :< 5 :< Nilmorley(splitAt @n xs = (take @n xs, drop @n xs)#, but traverses the list only once%splitAt @3 $ unsafeFromList @5 [1..5]"(1 :< 2 :< 3 :< Nil,4 :< 5 :< Nil)morley5Return a Peano singleton representing the list lengthmorley Empty listmorleyCons&(555 Safe-Inferred;!#$%&'(),./01245789:;<>?7  / Safe-Inferred;!#$%&'(),./01245789:;<>?70 Safe-Inferred;!#$%&'(),./01245789:;<>?