!G      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None.67=>?@AEHIMUVX_kpErefined a is equivalent to   a for any type a.refinedA monad transformer that adds s to other monads.The  and E functions yield computations that produce the given value, while >>=8 sequences two subcomputations, exiting on the first .refined)An exception encoding the way in which a $ failed.refinedA  for failures involving the " predicate.refinedA  for failures involving the ! predicate.refinedA  for failures involving the  predicate.refinedA - for failures involving all other predicates.refinedThe  of the " p type.refinedThe  for the p failure.refinedA " encoding which branch(es) of the ! failed: if the  came from the l! predicate, then this will be , if it came from the r predicate, this will be , and if it came from both l and r, this will be .refinedThe  for the l failure.refinedThe  for the l failure.refinedA custom message to display.refinedZA typeclass containing "safe" conversions between refined predicates where the target is weakerp than the source: that is, all values that satisfy the first predicate will be guarunteed to satisy the second.hTake care: writing an instance declaration for your custom predicates is the same as an assertion that   is safe to use:  instance  Pred1 Pred2 dFor most of the instances, explicit type annotations for the result value's type might be required. refinedA $ ensuring that the  is non-empty. refinedA $. ensuring that the value is not equal to zero. refined.An inclusive range of values from zero to one. refinedA $: ensuring that the value is greater than or equal to zero.refinedA $+ ensuring that the value is less than zero.refinedA $7 ensuring that the value is less than or equal to zero.refinedA $. ensuring that the value is greater than zero.refinedA $s ensuring that the value is greater or equal than a negative number specified as a type-level (positive) number n1 and less than a type-level (positive) number m.refinedA $L ensuring that the value is not equal to the specified type-level number n.refinedA $H ensuring that the value is equal to the specified type-level number n.refinedA $6 ensuring that the value is within an inclusive range.refinedA $U ensuring that the value is less than or equal to the specified type-level number.refinedA $X ensuring that the value is greater than or equal to the specified type-level number.refinedA $L ensuring that the value is greater than the specified type-level number.refinedA $I ensuring that the value is less than the specified type-level number.refinedA $ ensuring that the 3 contains elements in a strictly descending order.refinedA $ ensuring that the 2 contains elements in a strictly ascending order.refinedA $ ensuring that the A has a length which is equal to the specified type-level number.refinedA $ ensuring that the E has a length which is greater than the specified type-level number.refinedA $ ensuring that the B has a length which is less than the specified type-level number.refined"The disjunction of two predicates.refined"The disjunction of two predicates. refined"The conjunction of two predicates.!refined"The conjunction of two predicates."refinedThe negation of a predicate.#refined-A predicate which is satisfied for all types.$refinedPA typeclass which defines a runtime interpretation of a type-level predicate p for type x.%refinedCheck the value x according to the predicate p=, producing an error string if the value does not satisfy.&refined/A refinement type, which wraps a value of type x7, ensuring that it satisfies a type-level predicate p.refined FIXME: doc(refined!Helper function, stolen from the flow package.)refined!Helper function, stolen from the flow package.refined FIXME: docrefined FIXME: doc*refinedA smart constructor of a &- value. Checks the input value at runtime.+refined Constructs a & value at run-time, calling 0 if the value does not satisfy the predicate.,refined Constructs a & value at run-time, calling 0 if the value does not satisfy the predicate.-refined Constructs a & value at run-time, calling  0 if the value does not satisfy the predicate..refined Constructs a & value at compile-time using -XTemplateHaskell. For example:'$$(refineTH 23) :: Refined Positive Int Refined 23&Here's an example of an invalid value:&$$(refineTH 0) :: Refined Positive Int<interactive>:6:4: Value is not greater than 01 In the Template Haskell splice $$(refineTH 0)= In the expression: $$(refineTH 0) :: Refined Positive Int In an equation for it :3 it = $$(refineTH 0) :: Refined Positive IntIf it's not evident, the example above indicates a compile-time failure, which means that the checking was done at compile-time, thus introducing a zero runtime overhead compared to a plain value construction./It may be useful to use this function with the `th-lift-instances` package at 6https://hackage.haskell.org/package/th-lift-instances//refinedExtracts the refined value.0refinedIThis function helps type inference. It is equivalent to the following: instance Weaken (And l r) l 1refinedIThis function helps type inference. It is equivalent to the following: instance Weaken (And l r) r 2refinedIThis function helps type inference. It is equivalent to the following: instance Weaken l (Or l r) 3refinedIThis function helps type inference. It is equivalent to the following: instance Weaken r (Or l r) 4refined Display a  as a  ann5refinedThe inverse of .6refined7Map the unwrapped computation using the given function. 5 (6 f m) = f (5 m)7refined Constructs a computation in the  monad. (The inverse of 8).8refinedRun a monadic action of type  a, yielding an   a.This is just defined as   5.9refined One can use 96 inside of a monadic context to begin processing a .:refined&A handler function to handle previous 7s and return to normal execution. A common idiom is: # do { action1; action2; action3 } ` catchRefine' handler$where the action functions can call 9G. Note that handler and the do-block must have the same return type.;refinedA handler for a .;* is useful for defining what behaviour %1 should have in the event of a predicate failure.Frefined Encode a  for use with Control.Exception.GrefinedPretty-print a .Zrefined1This instance makes sure to check the refinement.;refinedThe  of the $%. This can usually be given by using .refinedA  7 encoding a custom error message to be pretty-printed. <  !"#$%&'()*+,-./0123456789:;<&'*+,-./$%"! #   0123456789:;()2 3(0)9 NoneVs8  !"#$%&*+,-./0123456789:;8&*+,-./$%"! #   0123456789:;NoneuNoneXuS NoneuNoneSXqrefined Constructs a & value at run-time, calling 0 if the value does not satisfy the predicate.$WARNING: this function is not total!refined Constructs a &z value, completely ignoring any refinements! Use this only when you can manually prove that the refinement holds.refined@A coercion between a type and any refinement of that type. See Data.Type.Coercion& for functions manipulating coercions.refinedA coercion between two &U types, magicking up the claim that one predicate is entirely equivalent to another.refined Reveal that x and & p x are  for all x and p simultaneously.Example reallyUnsafePredEquiv :: Coercion (Refined p x) (Refined q x) reallyUnsafePredEquiv = reallyUnsafeAllUnderlyingRefined Coercion && None3&'&' !"#$%&'()*+,-./012345  6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!refined-0.4-1Ly2nnRfmnJ9IeL6JEZ6QRefined.InternalRefined.Orphan.AesonRefined.Orphan.QuickCheckRefined.Unsafe Control.MonadreturnControl.Monad.CatchthrowMControl.Monad.Error throwErrorRefinedRefined.OrphanRefined.Unsafe.Type*prettyprinter-1.2.1-JPC8f5cJn5SAkoQXDSGO7Z"Data.Text.Prettyprint.Doc.InternalprettyRefineMRefineTRefineExceptionRefineNotExceptionRefineAndExceptionRefineOrExceptionRefineOtherExceptionWeakenweakenNonEmptyNonZero ZeroToOne NonNegativeNegative NonPositivePositiveNegativeFromTo NotEqualToEqualToFromToToFrom GreaterThanLessThan Descending Ascending SizeEqualToSizeGreaterThan SizeLessThan||Or&&AndNotIdPred Predicatevalidate|>.>refine refineThrow refineFail refineErrorrefineTHunrefineandLeftandRightleftOrrightOrdisplayRefineException runRefineT mapRefineTrefineM runRefineM throwRefine catchRefinethrowRefineOtherException $fLiftRefined$fWeakenFromToTo$fWeakenFromToFrom$fWeakenFromToFromTo$fWeakenFromFrom$fWeakenGreaterThanFrom$fWeakenGreaterThanGreaterThan $fWeakenToTo$fWeakenLessThanTo$fWeakenLessThanLessThan$fExceptionRefineException$fPrettyRefineException$fShowRefineException$fPredicateNegativeFromTox$fPredicateNotEqualTox$fPredicateEqualTox$fPredicateFromTox$fPredicateTox$fPredicateFromx$fPredicateGreaterThanx$fPredicateLessThanx$fPredicateDescendingt$fPredicateAscendingt$fPredicateSizeEqualTot$fPredicateSizeGreaterThant$fPredicateSizeLessThant$fPredicateOrx$fPredicateAndx$fPredicateNotx$fPredicateIdPredx $fReadRefined $fEqRefined$fFoldableRefined $fOrdRefined $fShowRefined$fGenericIdPred $fGenericNot $fGeneric1Not $fGenericAnd $fGeneric1And $fGenericOr $fGeneric1Or$fGenericSizeLessThan$fGenericSizeGreaterThan$fGenericSizeEqualTo$fGenericAscending$fGenericDescending$fGenericLessThan$fGenericGreaterThan $fGenericFrom $fGenericTo$fGenericFromTo$fGenericEqualTo$fGenericNotEqualTo$fGenericNegativeFromTo$fGenericRefineException$fFunctorRefineT$fApplicativeRefineT$fMonadRefineT$fMonadFixRefineT$fMonadErrorRefineT$fMonadTransRefineT$fGenericRefineT$fGeneric1RefineT$fToJSONRefined$fFromJSONRefined$fArbitraryRefined unsafeRefinereallyUnsafeRefinereallyUnsafeUnderlyingRefinedreallyUnsafePredEquiv reallyUnsafeAllUnderlyingRefinedbaseData.Functor.IdentityIdentityGHC.Basepure_RefineException_typeRep Data.TypeableTypeRep_RefineException_notChild_RefineException_andChildthese-0.8-9wgUxemvjEQWnU42wPp6o Data.TheseTheseThisThat_RefineException_orLChild_RefineException_orRChild_RefineException_message Data.FoldableFoldableOrderedincdecControl.Monad.FailfailDoc Data.EitherEither runIdentity.typeOf Data.VoidVoidGHC.Errerrorghc-prim GHC.Types Coercible