!zN0      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                        ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                           !"#$%&'()*+,-./Safe3,!dhallA  (Context a) associates  labels with values of type a . Each 1 label can correspond to multiple values of type aThe  is used for type-checking when  (a = Expr X) You create a  using  and You transform a  using 0You consume a  using   and  The difference between a  and a  is that a ^ lets you have multiple ordered occurrences of the same key and you can query for the nth occurrence of a given key.dhall(An empty context with no key-value pairsdhallAdd a key-value pair to the  dhall"Pattern match" on a  Jmatch (insert k v ctx) = Just (k, v, ctx) match empty = Nothing dhallLook up a key by name and index lookup _ _ empty = Nothing lookup k 0 (insert k v c) = Just v lookup k n (insert k v c) = lookup k (n - 1) c lookup k n (insert j v c) = lookup k n c -- k /= j dhall+Return all key-value associations as a list JtoList empty = [] toList (insert k v ctx) = (k, v) : toList ctx  None"#1K/dhallA ! that is almost identical to Text.Megaparsec.19 except treating Haskell-style comments as whitespacedhallSource code extract23456789:;None "#13456BQVa dhallSyntax tree for expressionsdhallLabel for a bound variableThe % field is the variable's name (i.e. "x").The <! field disambiguates variables with the same name if there are multiple bound variables of the same name in scope. Zero refers to the nearest bound variable and the index increases by one for each bound variable of the same name going outward. The following diagram may help: p % %%refers to%%% % % v % (x : Type) ! (y : Type) ! (x : Type) ! x@0 % %%%%%%%%%%%%%%%%%refers to%%%%%%%%%%%%%%%%%% % % v % (x : Type) ! (y : Type) ! (x : Type) ! x@1This <_ behaves like a De Bruijn index in the special case where all variables have the same name.+You can optionally omit the index if it is 0:  % %refers to%% % % v % (x : Type) ! (y : Type) ! (x : Type) ! x.Zero indices are omitted when pretty-printing 6s and non-zero indices appear as a numeric suffix.dhall Constants for a pure type systemThe only axiom is:  " Type : Kind!... and the valid rule pairs are: " Type ! Type : Type -- Functions from terms to terms (ordinary functions) " Kind ! Type : Type -- Functions from types to terms (polymorphic functions) " Kind ! Kind : Kind -- Functions from types to types (type constructors)*These are the same rule pairs as System FzNote that Dhall does not support functions from terms to types and therefore Dhall is not a dependently typed languagedhall A reified U, which can be stored in structures without running into impredicative polymorphism.dhall-Use this to wrap you embedded functions (see 0) to make them polymorphic enough to be used.dhallThe body of an interpolated Text literaldhall -Const c ~ c dhall ]Var (V x 0) ~ x Var (V x n) ~ x@n!dhall 9Lam x A b ~ (x : A) -> b"dhall sPi "_" A B ~ A -> B Pi x A B ~ "(x : A) -> B#dhall /App f a ~ f a$dhall }Let x Nothing r e ~ let x = r in e Let x (Just t) r e ~ let x : t = r in e%dhall 1Annot x t ~ x : t&dhall 0Bool ~ Bool'dhall -BoolLit b ~ b(dhall 2BoolAnd x y ~ x && y)dhall 2BoolOr x y ~ x || y*dhall 2BoolEQ x y ~ x == y+dhall 2BoolNE x y ~ x != y,dhall >BoolIf x y z ~ if x then y else z-dhall 3Natural ~ Natural.dhall -NaturalLit n ~ n/dhall 8NaturalFold ~ Natural/fold0dhall 9NaturalBuild ~ Natural/build1dhall :NaturalIsZero ~ Natural/isZero2dhall 8NaturalEven ~ Natural/even3dhall 7NaturalOdd ~ Natural/odd4dhall =NaturalToInteger ~ Natural/toInteger5dhall 8NaturalShow ~ Natural/show6dhall 1NaturalPlus x y ~ x + y7dhall 1NaturalTimes x y ~ x * y8dhall 3Integer ~ Integer9dhall .IntegerLit n ~ n:dhall 8IntegerShow ~ Integer/show;dhall <IntegerToDouble ~ Integer/toDouble<dhall 2Double ~ Double=dhall -DoubleLit n ~ n>dhall 7DoubleShow ~ Double/show?dhall 0Text ~ Text@dhall >TextLit (Chunks [(t1, e1), (t2, e2)] t3) ~ "t1${e1}t2${e2}t3"Adhall 2TextAppend x y ~ x ++ yBdhall 0List ~ ListCdhall tListLit (Just t ) [x, y, z] ~ [x, y, z] : List t ListLit Nothing [x, y, z] ~ [x, y, z]Ddhall 1ListAppend x y ~ x # yEdhall 6ListBuild ~ List/buildFdhall 5ListFold ~ List/foldGdhall 7ListLength ~ List/lengthHdhall 5ListHead ~ List/headIdhall 5ListLast ~ List/lastJdhall 8ListIndexed ~ List/indexedKdhall 8ListReverse ~ List/reverseLdhall 4Optional ~ OptionalMdhall yOptionalLit t (Just e) ~ [e] : Optional t OptionalLit t Nothing ~ [] : Optional tNdhall 9OptionalFold ~ Optional/foldOdhall :OptionalBuild ~ Optional/buildPdhall @Record [(k1, t1), (k2, t2)] ~ { k1 : t1, k2 : t1 }Qdhall @RecordLit [(k1, v1), (k2, v2)] ~ { k1 = v1, k2 = v2 }Rdhall AUnion [(k1, t1), (k2, t2)] ~ < k1 : t1 | k2 : t2 >Sdhall IUnionLit k v [(k1, t1), (k2, t2)] ~ < k = v | k1 : t1 | k2 : t2 >Tdhall 1Combine x y ~ x "' yUdhall 1CombineTypes x y ~ x *S yVdhall 1CombineRight x y ~ x * yWdhall oMerge x y (Just t ) ~ merge x y : t Merge x y Nothing ~ merge x yXdhall :Constructors e ~ constructors eYdhall /Field e x ~ e.xZdhall 4Project e xs ~ e.{ xs }[dhall -Note s x ~ e\dhall 3ImportAlt ~ e1 ? e2]dhall 2Embed import ~ import_dhallType synonym for `&, provided for backwards compatibility`dhall!Reference to an external resourceddhallA k= extended with an optional hash for semantic integrity checkshdhallGHow to interpret the import's contents (i.e. as Dhall code or raw text)kdhall:The type of import (i.e. local vs. remote vs. environment)ldhall Local pathmdhall?URL of remote resource and optional headers stored in an importndhallEnvironment variable{dhallEThe beginning of a file path which anchors subsequent path components|dhall Absolute path}dhallPath relative to .~dhallPath relative to ~dhallA  is a @ followed by one additional path component representing the  namedhall[Internal representation of a directory that stores the path components in reverse orderIn other words, the directory  /foo/bar/baz is encoded as 2Directory { components = [ "baz", "bar", "foo" ] }dhallk is used by both normalization and type-checking to avoid variable capture by shifting variable indicesIFor example, suppose that you were to normalize the following expression: 4(a : Type) ! (x : a) ! ((y : a) ! (x : a) ! y) xIf you were to substitute y with x^ without shifting any variable indices, then you would get the following incorrect result: C(a : Type) ! (x : a) ! (x : a) ! x -- Incorrect normalized formIn order to substitute x in place of y we need to  x by 13 in order to avoid being misinterpreted as the x8 bound by the innermost lambda. If we perform that  then we get the correct result: '(a : Type) ! (x : a) ! (x : a) ! x@1ZAs a more worked example, suppose that you were to normalize the following expression: [ (a : Type) ! (f : a ! a ! a) ! (x : a) ! (x : a) ! ((x : a) ! f x x@1) x@1'The correct normalized result would be: J (a : Type) ! (f : a ! a ! a) ! (x : a) ! (x : a) ! f x@1 xuThe above example illustrates how we need to both increase and decrease variable indices as part of substitution:+We need to increase the index of the outer x@1 to x@2 before we substitute it into the body of the innermost lambda expression in order to avoid variable capture. This substitution changes the body of the lambda expression to  (f x@2 x@1)UWe then remove the innermost lambda and therefore decrease the indices of both xs in  (f x@2 x@1) to  (f x@1 x)) in order to reflect that one less x( variable is now bound within that scope Formally, (shift d (V x n) e) modifies the expression e by adding d+ to the indices of all variables named x$ whose indices are greater than (n + m), where mH is the number of bound variables of the same name within that scope In practice, d is always 1 or -1 because we either:increment variables by 1. to avoid variable capture during substitutiondecrement variables by 1) when deleting lambdas after substitutionn starts off at 0 when substitution begins and increments every time we descend into a lambda or let expression that binds a variable of the same name in order to avoid shifting the bound variables by mistake.dhall;Substitute all occurrences of a variable with an expression subst x C B ~ B[x := C]dhall=-normalize an expression by renaming all bound variables to "_"4 and using De Bruijn indices to distinguish them\alphaNormalize (Lam "a" (Const Type) (Lam "b" (Const Type) (Lam "x" "a" (Lam "y" "b" "x"))))oLam "_" (Const Type) (Lam "_" (Const Type) (Lam "_" (Var (V "_" 1)) (Lam "_" (Var (V "_" 1)) (Var (V "_" 1)))))/-normalization does not affect free variables:alphaNormalize "x" Var (V "x" 0)dhallBReduce an expression to its normal form, performing beta reduction does not type-check the expression. You may want to type-check expressions before normalizing them since normalization can convert an ill-typed expression into a well-typed expression. However, g will not fail if the expression is ill-typed and will leave ill-typed sub-expressions unevaluated.=dhall6This function is used to determine whether folds like  Natural/fold or  List/foldW should be lazy or strict in their accumulator based on the type of the accumulatorIf this function returns >, then they will be strict in their accumulator since we can guarantee an upper bound on the amount of work to normalize the accumulator on each step of the loop. If this function returns ?k then they will be lazy in their accumulator and only normalize the final result at the end of the folddhall Remove all [ constructors from an   (i.e. de-[)dhallkReduce an expression to its normal form, performing beta reduction and applying any custom definitions.& is designed to be used with function typeWith. The typeWithV function allows typing of Dhall functions in a custom typing context whereas 9 allows evaluating Dhall expressions in a custom context.To be more precise i applies the given normalizer when it finds an application term that it cannot reduce by other means.Note that the context used in normalization will determine the properties of normalization. That is, if the functions in custom context are not total then the Dhall language, evaluated with those functions is not total either.dhallReturns >> if two expressions are -equivalent and -equivalent and ? otherwisedhallTCheck if an expression is in a normal form given a context of evaluation. Unlike @, this will fully normalize and traverse through the expression.!It is much more efficient to use .dhall0Quickly check if an expression is in normal formdhall@Detect if the given variable is free within the given expression"x" `freeIn` "x"True"x" `freeIn` "y"False%"x" `freeIn` Lam "x" (Const Type) "x"FalsedhallUtility function used to throw internal errors that should never happen (in theory) but that are not enforced by the type systemdhall6The set of reserved identifiers for the Dhall languagedhall-Generates a syntactically valid Dhall program &<8-?R#PYB !"$%'()*+,./012345679:;=>@ACDEFGHIJKLMNOQSTUVWXZ[\]^_`abcdefghijknlmopqtrsuvwxyz{|~}{|~}`abcdefghijknlmopqtrsuvw_xyz^ &<8-?R#PYB !"$%'()*+,./012345679:;=>@ACDEFGHIJKLMNOQSTUVWXZ[\]None"#t@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None"#$-dhall Similar to  except that this doesn't bother to render interpolated expressions to avoid a `Buildable a` constraint. The interpolated contents are not necessary for computing how much to dedent a multi-line stringjThis also doesn't include the surrounding quotes since they would interfere with the whitespace detection,None"#dhallA parsing errordhall'Parser for a top-level Dhall expressiondhallParser for a top-level Dhall expression. The expression is parameterized over any parseable type, allowing the language to be extended as needed.dhallParse an expression from  containing a Dhall programdhallLike u but also returns the leading comments and whitespace (i.e. header) up to the last newline before the code begins5In other words, if you have a Dhall file of the form: -- Comment 1 2Then this will preserve  Comment 1 , but not  Comment 2This is used by  dhall-format, to preserve leading comments and whitespacedhallUUser-friendly name describing the input expression, used in parsing error messagesdhallInput expression to parsedhallUUser-friendly name describing the input expression, used in parsing error messagesdhallInput expression to parse  None"#dhall"Supported protocol version stringsdhallProtocol version string "1.0"dhallcConvert a function applied to multiple arguments to the base function and the list of argumentsdhall1Encode a Dhall expression using protocol version 1.0dhallDecode a Dhall expressionThis auto-detects whiich protocol version to decode based on the included protocol version string in the decoded expressiondhall.Encode a Dhall expression using the specified  None0ydhallfAnnotation type used to tag elements in a pretty-printed document for syntax highlighting purposesdhall Escape a % literal using Dhall's escaping rules8Note that the result does not include surrounding quotesdhallPretty-print a valuedhallPretty print an expressiondhallUsed for syntactic keywordsdhall:Syntax punctuation such as commas, parenthesis, and bracesdhall Record labelsdhall%Literals such as integers and stringsdhallBuiltin types and valuesdhall OperatorsdhallUConvert annotations to their corresponding color for syntax highlighting purposesdhallZInternal utility for pretty-printing, used when generating element lists to supply to  or z. This utility indicates that the compact represent is the same as the multi-line representation for each elementdhallPretty-print a listdhall%Pretty-print union types and literalsdhall&Pretty-print record types and literalsdhall3Pretty-print anonymous functions and function typesdhallcFormat an expression that holds a variable number of elements, such as a list, record, or uniondhallmFormat an expression that holds a variable number of elements without a trailing document such as nested `let`, nested lambdas, or nested sdhall Escape a ; literal using Dhall's escaping rules for single-quoted Textdhall-Beginning document for compact representationdhall0Beginning document for multi-line representationdhall$Separator for compact representationdhall'Separator for multi-line representationdhall*Ending document for compact representationdhall-Ending document for multi-line representationdhall-Elements to format, each of which is a pair: (compact, multi-line)dhall-Beginning document for compact representationdhall0Beginning document for multi-line representationdhall$Separator for compact representationdhall'Separator for multi-line representationdhall-Elements to format, each of which is a pair: (compact, multi-line)*None1dhallDefault layout options  None4dhallImplementation of the  dhall format subcommanddhall5Modify file in-place if present, otherwise read from stdin and write to stdoutNone"#6dhall@Render the difference between the normal form of two expressionsdhall-Render the difference between two expressions None"#1QVL|  dhalloNewtype used to wrap error messages so that they render with a more detailed explanation of what went wrong dhall-A structured type error that includes context dhall6Default succinct 1-line explanation of what went wrong dhall1Longer and more detailed explanation of the errordhallThe specific type errorFdhallLike %, except with a shorter inferred typeIdhall+Function that converts the value inside an ]& constructor into a new expressionJdhallzType-check an expression and return the expression's type if type-checking succeeds or an error if type-checking failsJ does not necessarily normalize the type since full normalization is not necessary for just type-checking. If you actually care about the returned type then you may want to  it afterwards. The supplied h records the types of the names in scope. If these are ill-typed, the return value may be ill-typed.KdhallGeneralization of J that allows type-checking the ]" constructor with custom logicLdhallL is the same as J with an empty context, meaning that the expression must be closed (i.e. no free variables), otherwise type-checking will fail.MdhallcThis function verifies that a custom context is well-formed so that type-checking will not loop Note that J already calls M for you on the  that you supplyC   E<=>? "!CD@AB)$%#&(*+,/-.0123468759;:'FGHIJKLMCJLKMIFGH   E<=>? "!CD@AB)$%#&(*+,/-.0123468759;:' NonePOYdhall(Automatically improve a Dhall expression#Currently this only removes unused let bindingsYYNone"#_ZdhallWrapper around  HttpExceptions with a prettier   instance.8In order to keep the library API constant even when the  with-httpP Cabal flag is disabled the pretty error message is pre-rendered and the real  HttpExcepion is stored in a   dhallfThis exception indicates that there was an internal error in Dhall's import-related logic the expected type then the extractB function must succeed. If not, then this exception is thrown)This exception indicates that an invalid Type was provided to the input function\dhall,State threaded throughout the import processdhall Stack of `@s that we've imported along the way to get to the current pointdhalllCache of imported expressions in order to avoid importing the same expression twice with different valuesdhallCache for the HTTP Manager so that we only acquire it oncedhallDefault starting \! that is polymorphic in the base Z[ \]^_`abcNone"#_ None "#$1QVAdhall.Exception thrown when an integrity check failsdhall .canonicalize (canonicalize x) = canonicalize xdhallNException thrown when a HTTP url is imported but dhall was built without the  with-http Cabal flag.ddhallCList of Exceptions we encounter while resolving Import Alternativesfdhall8Exception thrown when an environment variable is missingidhall1Exception thrown when an imported file is missingkdhall6Extend another exception with the current import stackmdhall)Imports resolved so far, in reverse orderndhallThe nested exceptionodhallDhall tries to ensure that all expressions hosted on network endpoints are weakly referentially transparent, meaning roughly that any two clients will compile the exact same result given the same URL.To be precise, a strong interpretaton of referential transparency means that if you compiled a URL you could replace the expression hosted at that URL with the compiled result. Let's call this "static linking". Dhall (very intentionally) does not satisfy this stronger interpretation of referential transparency since "statically linking" an expression (i.e. permanently resolving all imports) means that the expression will no longer update if its dependencies change.`In general, either interpretation of referential transparency is not enforceable in a networked context since one can easily violate referential transparency with a custom DNS, but Dhall can still try to guard against common unintentional violations. To do this, Dhall enforces that a non-local import may not reference a local import.Local imports are defined as:A fileA URL with a host of  localhost or  127.0.0.1-All other imports are defined to be non-localqdhallThe offending opaque importrdhall7An import failed because of a cycle in the import graphtdhallThe offending cyclic importudhallParse an expression from a ` containing a Dhall programvdhallDefault starting \,, importing relative to the given directory.wdhallGeneralized version of x;You can configure the desired behavior through the initial \ that you supplyxdhall(Resolve all imports within an expressionydhall Hash a fully resolved expressionzdhalliConvenience utility to hash a fully resolved expression and return the base-16 encoded hash with the sha256: prefix{In other words, the output of this function can be pasted into Dhall source code to add an integrity check to an importdhall3canonicalize (Directory {components = ["..",".."]})$Directory {components = ["..",".."]}!Z[\]^_`abcdefghijklmnopqrstuvwxyz!uxwyz\v]^_`abcrstopqklmnZ[ijfghde NoneXdhallImplementation of the  dhall hash subcommand Nonedhall Retrieve an `1 and update the hash to match the latest contentsdhallImplementation of the  dhall freeze subcommanddhall5Modify file in-place if present, otherwise read from stdin and write to stdoutNone"#0367;<=KQSTVCO6dhallThe + applicative functor allows you to build a  parser from a Dhall record.8For example, let's take the following Haskell data type: mdata Project = Project { projectName :: Text , projectDescription :: Text , projectStars :: Natural }XAnd assume that we have the following Dhall record that we would like to parse as a Project: w{ name = "dhall-haskell" , description = "A configuration language guaranteed to terminate" , stars = 289 }Our parser has type  Project=, but we can't build that out of any smaller parsers, as $s cannot be combined (they are only  s). However, we can use a  to build a  for Project: project :: Type Project project = record ( Project <$> field "name" string <*> field "description" string <*> field "stars" natural )dhall-This is the underlying class that powers the H class's support for automatically deriving a generic implementationdhallThis class is used by  instance for functions: 6instance (Inject a, Interpret b) => Interpret (a -> b)You can convert Dhall functions with "simple" inputs (i.e. instances of this class) into Haskell functions. This works by:QMarshaling the input to the Haskell function into a Dhall expression (i.e. x :: Expr Src X)"Applying the Dhall function (i.e. f :: Expr Src X!) to the Dhall input (i.e. App f x)"Normalizing the syntax tree (i.e. normalize (App f x))CMarshaling the resulting Dhall expression back into a Haskell valuedhallAn  (InputType a)- represents a way to marshal a value of type 'a' from Haskell into Dhalldhall,Embeds a Haskell value as a Dhall expressiondhallDhall type of the Haskell valuedhall-This is the underlying class that powers the H class's support for automatically deriving a generic implementationdhallMUse these options to tweak how Dhall derives a generic implementation of dhall\Function used to transform Haskell field names into their corresponding Dhall field namesdhallhFunction used to transform Haskell constructor names into their corresponding Dhall alternative namesdhallAny value that implements G can be automatically decoded based on the inferred return type of -input auto "[1, 2, 3]" :: IO (Vector Natural)[1,2,3]RThis class auto-generates a default implementation for records that implement C. This does not auto-generate an instance for recursive types.dhallA (Type a)- represents a way to marshal a value of type 'a' from Dhall into HaskellYou can produce s either explicitly: 3example :: Type (Vector Text) example = vector text... or implicitly using : ,example :: Type (Vector Text) example = autoYou can consume  s using the  function: input :: Type a -> Text -> IO adhall0Extracts Haskell value from the Dhall expressiondhallDhall type of the Haskell valuedhalldhalldhalldhallEvery I must obey the contract that if an expression's type matches the the  type then the B function must succeed. If not, then this exception is thrown)This exception indicates that an invalid  was provided to the  functiondhall5Default input settings: resolves imports relative to .@ (the current working directory), report errors as coming from (input)(, and default evaluation settings from .dhall4Access the directory to resolve imports relative to.dhallAccess the name of the source to report locations from; this is only used in error messages, so it's okay if this is a best guess or something symbolic.dhallkDefault evaluation settings: no extra entries in the initial context, and no special normalizer behaviour.dhallBAccess the starting context used for evaluation and type-checking.dhallAccess the custom normalizer.dhallqAccess the protocol version used when encoding or decoding Dhall expressions to and from a binary representationdhallIType-check and evaluate a Dhall program, decoding the result into Haskell@The first argument determines the type of value that you decode:input integer "+2"2"input (vector double) "[1.0, 2.0]" [1.0,2.0]Use T to automatically select which type to decode based on the inferred return type:input auto "True" :: IO BoolTrueThis uses the settings from .dhallExtend  with a root directory to resolve imports relative to, a file to mention in errors as the source, a custom typing context, and a custom normalization process.dhallNType-check and evaluate a Dhall program that is read from the file-system.This uses the settings from .dhallExtend E with a custom typing context and a custom normalization process.dhall Similar to %, but without interpreting the Dhall   into a Haskell type.Uses the settings from .dhallExtend  with a root directory to resolve imports relative to, a file to mention in errors as the source, a custom typing context, and a custom normalization process.dhallUse this function to extract Haskell values directly from Dhall AST. The intended use case is to allow easy extraction of Dhall values for making the function  easier to use.For other use cases, use  from Dhall; module. It will give you a much better user experience.dhall0Use this to provide more detailed error messages {> input auto "True" :: IO Integer *** Exception: Error: Expression doesn't match annotation True : Integer (input):1:1  > detailed (input auto "True") :: IO Integer *** Exception: Error: Expression doesn't match annotation Explanation: You can annotate an expression with its type or kind using the 'p:'q symbol, like this: % %%%%%%%% % x : t % 'px'q is an expression and 'pt'q is the annotated type or kind of 'px'q %%%%%%%%% The type checker verifies that the expression's type or kind matches the provided annotation For example, all of the following are valid annotations that the type checker accepts: % %%%%%%%%%%%%%% % 1 : Natural % 'p1'q is an expression that has type 'pNatural'q, so the type %%%%%%%%%%%%%%% checker accepts the annotation % %%%%%%%%%%%%%%%%%%%%%%%% % Natural/even 2 : Bool % 'pNatural/even 2'q has type 'pBool'q, so the type %%%%%%%%%%%%%%%%%%%%%%%%% checker accepts the annotation % %%%%%%%%%%%%%%%%%%%%% % List : Type ! Type % 'pList'q is an expression that has kind 'pType ! Type'q, %%%%%%%%%%%%%%%%%%%%%% so the type checker accepts the annotation % %%%%%%%%%%%%%%%%%%% % List Text : Type % 'pList Text'q is an expression that has kind 'pType'q, so %%%%%%%%%%%%%%%%%%%% the type checker accepts the annotation However, the following annotations are not valid and the type checker will reject them: % %%%%%%%%%%% % 1 : Text % The type checker rejects this because 'p1'q does not have type %%%%%%%%%%%% 'pText'q % %%%%%%%%%%%%%% % List : Type % 'pList'q does not have kind 'pType'q %%%%%%%%%%%%%%% You or the interpreter annotated this expression: ! True ... with this type or kind: ! Integer ... but the inferred type or kind of the expression is actually: ! Bool Some common reasons why you might get this error: % The Haskell Dhall interpreter implicitly inserts a top-level annotation matching the expected type For example, if you run the following Haskell code: % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % >>> input auto "1" :: IO Text % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ... then the interpreter will actually type check the following annotated expression: % %%%%%%%%%%% % 1 : Text % %%%%%%%%%%%% ... and then type-checking will fail %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% True : Integer (input):1:1dhall Decode a !input bool "True"Truedhall Decode a input natural "42"42dhall Decode an "input integer "+42"42dhall Decode a #input scientific "1e1000000000"1.0e1000000000dhall Decode a $input double "42.0"42.0dhall Decode lazy input lazyText "\"Test\"""Test"dhallDecode strict input strictText "\"Test\"""Test"dhall Decode a %.input (maybe natural) "[1] : Optional Natural"Just 1dhall Decode a = - >>> input (sequence natural) "[1, 2, 3]" fromList [1,2,3]dhall Decode a list input (list natural) "[1, 2, 3]"[1,2,3]dhall Decode a "input (vector natural) "[1, 2, 3]"[1,2,3]dhallDecode () from an empty record.=input unit "{=}" -- GHC doesn't print the result if it is ()dhall Decode a &input string "\"ABC\"""ABC"dhallGiven a pair of ,s, decode a tuple-record into their pairing.3input (pair natural bool) "{ _1 = 42, _2 = False }" (42,False)dhall=Use the default options for interpreting a configuration file 'auto = autoWith defaultInterpretOptionsdhall# is the default implementation for  if you derive &. The difference is that you can use - without having to explicitly provide an 5 instance for a type as long as the type derives dhallFDefault interpret options, which you can tweak or override, like this: \autoWith (defaultInterpretOptions { fieldModifier = Data.Text.Lazy.dropWhile (== '_') })dhall-Use the default options for injecting a value 'inject = inject defaultInterpretOptionsdhallRun a  parser to build a  parser.dhall!Parse a single field of a record.dhallThe ? divisible (contravariant) functor allows you to build an  injector for a Dhall record.8For example, let's take the following Haskell data type: mdata Project = Project { projectName :: Text , projectDescription :: Text , projectStars :: Natural }XAnd assume that we have the following Dhall record that we would like to parse as a Project: w{ name = "dhall-haskell" , description = "A configuration language guaranteed to terminate" , stars = 289 }Our injector has type  Project?, but we can't build that out of any smaller injectors, as $s cannot be combined (they are only 's). However, we can use an InputRecordType to build an  for Project: ,injectProject :: InputType Project injectProject = inputRecord ( adapt >$< inputFieldWith "name" inject >*< inputFieldWith "description" inject >*< inputFieldWith "stars" inject ) where adapt (Project{..}) = (projectName, (projectDescription, projectStars))"Or, since we are simply using the . instance to inject each field, we could write  injectProject :: InputType Project injectProject = inputRecord ( adapt >$< inputField "name" >*< inputField "description" >*< inputField "stars" ) where adapt (Project{..}) = (projectName, (projectDescription, projectStars))Infix (dhall1The type of value to decode from Dhall to HaskelldhallThe Dhall programdhallThe decoded value in Haskelldhall1The type of value to decode from Dhall to HaskelldhallThe Dhall programdhallThe decoded value in Haskelldhall1The type of value to decode from Dhall to HaskelldhallThe path to the Dhall program.dhallThe decoded value in Haskell.dhall1The type of value to decode from Dhall to HaskelldhallThe path to the Dhall program.dhallThe decoded value in Haskell.dhallThe Dhall programdhallThe fully normalized ASTdhallThe Dhall programdhallThe fully normalized ASTdhall1The type of value to decode from Dhall to HaskelldhallAa closed form Dhall program, which evaluates to the expected typedhallThe decoded value in HaskellJJ5NoneENoneGdhallkThis fully resolves, type checks, and normalizes the expression, so the resulting AST is self-contained.None$<IdhallImplementation of the  dhall repl subcommandSafeIe)*+,-./0None"#8MadhallThe subcommands for the dhall executable$dhallTop-level program options*dhall1 for the $ type+dhall2 for the $ type,dhall!Run the command specified by the $ type-dhallEntry point for the dhall executable! "#$%(&)'*+,-$%(&)'! "#*+,-3 !"#$%&'()*+,-./01234567899:;;<=>?@@ABCC87DEFGHIJKLMNO"PQRSTUVWXYZ[\]^_`%abcdefghijklmnopqrstuvwxyz{|}~      !"#$% & & ' ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ _ ` a b c d e f g h i j k l m n o p qrrstuvwxyz { { | | } ~ ~                                       yxw      !"#$%&'(()*+w,-./0123456789:;<=>?@ABCDABEABFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~uY     2s  ! "2#ABI$%Z&'(AB^2)2*)*+),-./0123456796789#dhall-1.17.0-4LpWOp2zlHk5Uzkfyiez39Dhall Dhall.Context Dhall.Core Dhall.Parser Dhall.Pretty Dhall.Binary Dhall.Format Dhall.DiffDhall.TypeCheck Dhall.Lint Dhall.Import Dhall.Hash Dhall.FreezeDhall.TH Dhall.Repl Dhall.MainData.MapMapDhall.Parser.CombinatorsDhall.Parser.TokenDhall.Parser.Expression renderChunksDhall.Pretty.Internal Data.VoidVoidDhall.Import.TypesDhall.Import.HTTPDhall.Tutorial Paths_dhallbase GHC.GenericsGeneric GHC.NaturalNatural text-1.2.3.0Data.Text.InternalTextcontainers-0.5.11.0Data.Sequence.InternalSeq(contravariant-1.5-5VBqEYOPGpyDW8QIali4BAData.Functor.Contravariant>$<&vector-0.12.0.1-GC2xzdMF0QQGz7ZCcRBJRL Data.VectorVectorContextemptyinsertmatchlookuptoList$fFunctorContextExprVarConstParserunParserSrcAnn escapeTextpretty prettyExprReifiedNormalizergetReifiedNormalizer NormalizerChunksLamPiAppLetAnnotBoolBoolLitBoolAndBoolOrBoolEQBoolNEBoolIf NaturalLit NaturalFold NaturalBuild NaturalIsZero NaturalEven NaturalOddNaturalToInteger NaturalShow NaturalPlus NaturalTimesInteger IntegerLit IntegerShowIntegerToDoubleDouble DoubleLit DoubleShowTextLit TextAppendListListLit ListAppend ListBuildListFold ListLengthListHeadListLast ListIndexed ListReverseOptional OptionalLit OptionalFold OptionalBuildRecord RecordLitUnionUnionLitCombine CombineTypesPreferMerge ConstructorsFieldProjectNote ImportAltEmbedVPathImport importHashed importMode ImportHashedhash importType ImportModeCodeRawText ImportTypeLocalRemoteEnvMissingURLscheme authoritypathqueryfragmentheadersSchemeHTTPHTTPS FilePrefixAbsoluteHereHomeFile directoryfile Directory componentsTypeKindshiftsubstalphaNormalize normalizedenote normalizeWithjudgmentallyEqualisNormalizedWith isNormalizedfreeIn internalErrorreservedIdentifiers $fPrettyConst$fPrettyDirectory$fSemigroupDirectory$fSemigroupFile $fPrettyFile$fPrettyFilePrefix$fPrettyImportHashed$fSemigroupImportHashed$fPrettyImportType$fSemigroupImportType$fPrettyImport$fSemigroupImport $fPrettyVar $fIsStringVar $fPrettyExpr$fIsStringChunks$fMonoidChunks$fSemigroupChunks$fIsStringExpr$fBifunctorExpr $fMonadExpr$fApplicativeExpr $fShowConst $fEqConst $fDataConst$fBoundedConst $fEnumConst$fGenericConst $fEqDirectory$fGenericDirectory$fOrdDirectory$fShowDirectory$fEqFile $fGenericFile $fOrdFile $fShowFile$fEqFilePrefix$fGenericFilePrefix$fOrdFilePrefix$fShowFilePrefix $fEqScheme$fGenericScheme $fOrdScheme $fShowScheme$fEqImportMode$fGenericImportMode$fOrdImportMode$fShowImportMode$fEqImportHashed$fGenericImportHashed$fOrdImportHashed$fShowImportHashed$fEqImportType$fGenericImportType$fOrdImportType$fShowImportType$fEqURL $fGenericURL$fOrdURL $fShowURL $fEqImport$fGenericImport $fOrdImport $fShowImport $fDataVar $fGenericVar$fEqVar $fShowVar$fFunctorChunks$fFoldableChunks$fGenericChunks$fTraversableChunks $fShowChunks $fEqChunks $fDataChunks $fFunctorExpr$fFoldableExpr $fGenericExpr$fTraversableExpr $fShowExpr$fEqExpr $fDataExpr ParseErrorunwrapinputexprexprA exprFromTextexprAndHeaderFromText$fExceptionParseError$fShowParseErrorDecodingFailure!CannotDecodeProtocolVersionString UnsupportedProtocolVersionStringCBORIsNotDhallProtocolVersionV_1_0defaultProtocolVersionparseProtocolVersiondecodeencode$fShowDecodingFailure$fExceptionDecodingFailure$fEqDecodingFailureKeywordSyntaxLabelLiteralBuiltinOperatorannToAnsiStyle layoutOptsformatdiffNormalizeddiff$fIsStringDiff $fMonoidDiff$fSemigroupDiffDetailedTypeError TypeErrorcontextcurrent typeMessage TypeMessageUnboundVariableInvalidInputTypeInvalidOutputType NotAFunction TypeMismatch AnnotMismatchUntypedMissingListTypeMismatchedListElementsInvalidListElementInvalidListTypeInvalidOptionalElementInvalidOptionalTypeInvalidPredicateIfBranchMismatchIfBranchMustBeTerm InvalidFieldInvalidFieldTypeFieldAnnotationMismatch FieldMismatchInvalidAlternativeInvalidAlternativeTypeListAppendMismatchDuplicateAlternativeMustCombineARecordRecordMismatchCombineTypesRequiresRecordTypeRecordTypeMismatchFieldCollisionMustMergeARecordMustMergeUnion UnusedHandlerMissingHandlerHandlerInputTypeMismatchHandlerOutputTypeMismatchInvalidHandlerOutputTypeMissingMergeTypeHandlerNotAFunctionConstructorsRequiresAUnionType NotARecord MissingFieldCantAndCantOrCantEQCantNECantInterpolateCantTextAppendCantListAppendCantAdd CantMultiplyNoDependentTypesXabsurdTypertypeWith typeWithAtypeOf checkContext $fPrettyX$fDataX$fEqX$fShowX$fPrettyTypeError$fExceptionTypeError$fShowTypeError$fPrettyDetailedTypeError$fExceptionDetailedTypeError$fShowDetailedTypeError$fShowTypeMessagelintPrettyHttpExceptionStatusstackcachemanagerprotocolVersion normalizerstartingContextresolverMissingImportsMissingEnvironmentVariablename MissingFileImported importStacknestedReferentiallyOpaque opaqueImportCycle cyclicImportexprFromImport emptyStatusloadWithloadhashExpressionhashExpressionToCode $fShowCycle$fExceptionCycle$fShowReferentiallyOpaque$fExceptionReferentiallyOpaque$fShowImported$fExceptionImported$fShowMissingFile$fExceptionMissingFile $fShowMissingEnvironmentVariable%$fExceptionMissingEnvironmentVariable$fShowMissingImports$fExceptionMissingImports$fShowCannotImportHTTPURL$fExceptionCannotImportHTTPURL$fCanonicalizeImport$fCanonicalizeImportHashed$fCanonicalizeImportType$fCanonicalizeFile$fCanonicalizeDirectory$fShowHashMismatch$fExceptionHashMismatch hashImportfreezeRecordInputType RecordType GenericInjectgenericInjectWithInject injectWith InputTypeembeddeclaredGenericInterpretgenericAutoWithInterpretOptions fieldModifierconstructorModifier InterpretautoWithextractexpectedHasEvaluateSettingsEvaluateSettings InputSettings InvalidTypedefaultInputSettings rootDirectory sourceNamedefaultEvaluateSettingsinputWithSettings inputFileinputFileWithSettings inputExprinputExprWithSettingsrawInputdetailedboolnaturalinteger scientificdoublelazyText strictTextmaybesequencelistvectorunitstringpairauto genericAutodefaultInterpretOptionsinjectrecordfield>*<inputFieldWith inputField inputRecord$fExceptionInvalidType$fShowInvalidType%$fHasEvaluateSettingsEvaluateSettings"$fHasEvaluateSettingsInputSettings$fGenericInterpret:*:$fGenericInterpretU1$fGenericInterpretM1$fGenericInterpret:+:$fGenericInterpret:+:0$fGenericInterpret:+:1$fGenericInterpret:+:2$fGenericInterpretV1$fGenericInterpretM10$fGenericInterpretM11$fInterpret(,)$fInterpretVector $fInterpret[]$fInterpretSeq$fInterpretMaybe$fInterpretText$fInterpretText0$fInterpret[]0$fInterpretDouble$fInterpretScientific$fInterpretInteger$fInterpretNatural$fInterpretBool$fContravariantInputType$fGenericInjectU1$fGenericInject:*:$fGenericInject:+:$fGenericInject:+:0$fGenericInject:+:1$fGenericInject:+:2$fGenericInjectM1$fGenericInjectM10$fGenericInjectM11 $fInject(,) $fInjectSet$fInjectVector $fInject[] $fInjectSeq $fInjectMaybe $fInject()$fInjectDouble$fInjectScientific$fInjectWord64$fInjectWord32$fInjectWord16 $fInjectWord8 $fInjectInt$fInjectInteger$fInjectNatural $fInjectText $fInjectText0 $fInjectBool$fInterpret(->)$fDivisibleRecordInputType$fContravariantRecordInputType $fFunctorType$fFunctorRecordType$fApplicativeRecordTypestaticDhallExpressionreplModeDefaultVersionResolve NormalizeReplFormatFreezeHashDiffLintannotateOptionsmodeexplainplain parseOptionsparserInfoOptionscommandmain$fShowImportResolutionDisabled#$fExceptionImportResolutionDisabledGHC.Basefmap'megaparsec-6.5.0-4VKBtSFJhna3iLscGKIZAPText.MegaparsecParseccountrangeoptionstarplussatisfy takeWhile takeWhile1 noDuplicatestoMapghc-prim GHC.TypesInt boundedTypeTrueFalse whitespacenonemptyWhitespacealphadigithexdig doubleLiteralintegerLiteralnaturalLiteral identifierwhitespaceChunk hexNumber lineComment blockCommentblockCommentChunkblockCommentContinue simpleLabel backtickLabellabelslabelbashEnvironmentVariableposixEnvironmentVariable!posixEnvironmentVariableCharacter pathCharacter pathComponentfile_scheme_httpRaw authority_userinfohostport ipLiteral ipVFuture ipV6Addressh16ls32 ipV4AddressdecOctetregNamepcharquery_ fragment_ pctEncoded subDelims unreservedreservedkeyword_if_then_else_let_in_as_using_merge _constructors _NaturalFold _NaturalBuild_NaturalIsZero _NaturalEven _NaturalOdd_NaturalToInteger _NaturalShow _IntegerShow_IntegerToDouble _DoubleShow _ListBuild _ListFold _ListLength _ListHead _ListLast _ListIndexed _ListReverse _OptionalFold_OptionalBuild_Bool _Optional_Natural_Integer_Double_Text_List_True_False_Type_Kind_equal_or_plus _textAppend _listAppend_and_times _doubleEqual _notEqual_dot _openBrace _closeBrace _openBracket _closeBracket _openAngle _closeAngle_bar_comma _openParens _closeParens_colon_at_missing _importAlt_combine _combineTypes_prefer_lambda_forall_arrownoted expressionannotatedExpressionemptyCollectionnonEmptyOptionaloperatorExpressionmakeOperatorExpressionimportAltExpression orExpressionplusExpressiontextAppendExpressionlistAppendExpression andExpressioncombineExpressionpreferExpressioncombineTypesExpressiontimesExpressionequalExpressionnotEqualExpressionapplicationExpressionimportExpressionselectorExpressionprimitiveExpressiondoubleQuotedChunkdoubleQuotedLiteralsingleQuoteContinuesingleQuoteLiteral textLiteralrecordTypeOrLiteralnonEmptyRecordTypeOrLiteralunionTypeOrLiteralnonEmptyUnionTypeOrLiteralnonEmptyListLiteralcompleteExpressionenvlocalRawlocalhttpmissing importType_ importHashed_import_dedentunApplyencodeWithVersion_1_0 duplicateencloseenclose'anglesbracesarrowsforallescapeSingleQuotedText prettyConst prettyVarliteralbuiltinoperatorcommalbracketrbracketlangleranglelbracerbracelparenrparenpiperarrowcolonlambdaequalsdot prettyLabel prettyLabels prettyNumber prettyNaturalprettyScientificprettyToStringdocToStrictTextprettyToStrictTextshortlongGHC.ShowShow Data.DynamicDynamic InternalError_stack_cache_manageremptyStatusWithMonad _resolver_startingContext _normalizer_protocolVersionmkPrettyHttpExceptionrenderPrettyHttpException needManagerfetchFromHttpUrl HashMismatch CanonicalizeCannotImportHTTPURLFunctor integer-gmpGHC.Integer.Type)scientific-0.3.6.2-6iSmt8nz6tU2FDxmPZmwKNData.Scientific ScientificMaybeString Contravariant$Data.Functor.Contravariant.Divisibledividedversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName4optparse-applicative-0.14.2.0-6OZZZ7amjMJ9aql6WYjCH7Options.Applicative.Types ParserInfo