!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                             Safe-.=>?@ACHUV% & dimensionsRemove suffix bs from a list asbs if bs is a suffix; fail otherwise.' dimensionsRemove prefix as from a list asbs if as is a prefix; fail otherwise.( dimensionsAppend two lists. dimensions1A helper data type that makes possible injective * and ) families.%It assures GHC type checker that the *T operation on a non-empty list yields a list that contains at least two elements. dimensionsIAn important invariant: the argument list contains at least two elements.) dimensions'Reverse elements of a list (injective).* dimensions/Appending a list on the other side (injective).+ dimensionsAExtract all but last elements of a list, which must be non-empty., dimensions<Extract the last element of a list, which must be non-empty.- dimensionsGExtract the elements after the head of a list, which must be non-empty.. dimensions=Extract the first element of a list, which must be non-empty.&'()*+,-. None,-.=?@AHSUVXk- dimensionsThis class should have the same runtime representation as its parameter ctx. The point is to make sure GHC won't segfault if it mixes up `UnreachableConstraint ctx` with ctx itself:JIf GHC mistakenly recognizes `UnreachableConstraint ctx` dictionary as ctxP dictionary, a call to this dictionary should return an error as defined by  function rather than the panic.Note, I must not put ctxA in the superclass position to prevent GHC from trying to use it.0 None,-.=>?@ACHSUVXk9 dimensionsExtra evidence provided by / in various cases dimensionsExtra evidence provided by / in various cases/ dimensions/Represent a triple of lists forming a relation (as ++ bs) ~ asbsNB: functional dependency  bs asbs -> as does not seem to be possible, because dependency checking happens before constraints checking and does not take constraints into account.0 dimensionsRepresent two lists that are ) of each other1 dimensionsGRepresent a decomposition of a list by appending an element to its end.2 dimensionsDerive  ConcatList given Concat3 dimensionsDerive  ConcatList given  StripSuffix4 dimensionsDerive  ConcatList given  StripPrefix/01234(c) Artem ChirkinBSD3None&',-.HUVXK 5 dimensionsGet the kind of a given list type. Useful when we don't want to introduce another type parameter into a type signature (because the kind is determined by the type), but need to have some constraints on the type's kind.6 dimensionsGet the kind of a given type. Useful when we don't want to introduce another type parameter into a type signature (because the kind is determined by the type), but need to have some constraints on the type's kind.7 dimensions3Comparison of type-level naturals, as a constraint.8 dimensions&Maximum among two type-level naturals.9 dimensions&Miminum among two type-level naturals.: dimensionsSingleton-style version of ]. Pattern-match againts its constructor to witness the result of type-level comparison.> dimensionsConvert a type-level Nat into a type-level Symbol.? dimensionsfPattern-match against the result of this function to get the evidence of comparing type-level Nats.@ dimensionsiPattern-match against the result of this function to get the evidence of comparing type-level Symbols., 56789:;<=>?@,65 98> 7:;<=?@ (c) Artem ChirkinBSD3None,-.>HUVXkY A dimensions'Check if an item is a member of a list.B dimensions1Unmap a functor over the elements of a type list.C dimensions/Map a functor over the elements of a type list.D dimensions=All elements of a type list must satisfy the same constraint.E dimensions%Infix-style synonym for concatenationF dimensionsSynonym for a type-level Snoc.G dimensionsSynonym for a type-level Cons.H dimensionsNumber of elements in a list.I dimensions Drop n xs drops up to n elements of xs.J dimensions Take n xs( returns the prefix of a list of length max n (length xs).K dimensions Appending a list, represents an Op counterpart of (':).L dimensionsEmpty list, same as '[].M dimensionsGiven a Typeable+ list, infer this constraint for its parts.&'()*+,-./01234ABCDEFGHIJKLMEFGLK*.-,+('&)JIHDCBA10/342ME5F6G5(c) Artem ChirkinBSD3None%&',-.12=>?@AEFHSUVXgk)Q dimensions]Representable type lists. Allows getting type information about list structure at runtime.R dimensionsGet type-level constructed listS dimensions;A list of dicts for the same constraint over several types.T dimensionsSame as #O, but allows to separate constraint function from the type it is applied to.V dimensionsA list of type proxiesW dimensionsType-indexed listX dimensionsReverse a typed listY dimensions3Constructing a type-indexed list from the other endZ dimensions5Constructing a type-indexed list in the canonical way[ dimensions Constructing a type-indexed list\ dimensions"Zero-length type list; synonym to ].] dimensionsZero-length type list^ dimensionsPattern matching against this allows manipulating lists of constraints. Useful when creating functions that change the shape of dimensions._ dimensions%Pattern matching against this causes Qc instance come into scope. Also it allows constructing a term-level list out of a constraint.` dimensionsO(1)! append an element in front of a  TypedList (same as `(:)` for lists).a dimensionsO(n)# append an element to the end of a  TypedList.b dimensionsO(n) return elements of a  TypedList in reverse order.c dimensionsO(1) Extract the first element of a  TypedList, which must be non-empty.d dimensionsO(1)* Extract the elements after the head of a  TypedList, which must be non-empty.e dimensionsO(n) Return all the elements of a  TypedList5 except the last one (the list must be non-empty).f dimensionsO(n) Extract the last element of a  TypedList, which must be non-empty.g dimensions O(min(n,k))  take k xs returns a prefix of xs of length min(length xs, k). It calls - under the hood, so expect the same behavior.h dimensions O(min(n,k))  drop k xs returns a suffix of xs of length max(0, length xs - k). It calls - under the hood, so expect the same behavior.i dimensions#Return the number of elements in a  TypedList (same as l).j dimensions O(min(n,k))  splitAt k xs has the same effect as (g k xs, h k xs). It calls - under the hood, so expect the same behavior.k dimensions-Return the number of elements in a type list xs bound by a constraint RepresentableList xs (same as l , but takes no value arguments).l dimensions#Return the number of elements in a  TypedList (same as i).m dimensions Concat two  TypedListJs. It calls `Prelude.(++)` under the hood, so expect the same behavior.n dimensionsDrops the given prefix from a  TypedList. It returns  if the  TypedList- does not start with the prefix given, or  the  TypedList+ after the prefix, if it does. It calls  - under the hood, so expect the same behavior.tThis function can be used to find the type-level evidence that one type-level list is indeed a prefix of another.o dimensionsDrops the given suffix from a  TypedList. It returns  if the  TypedList+ does not end with the suffix given, or  the  TypedList before the suffix, if it does.tThis function can be used to find the type-level evidence that one type-level list is indeed a suffix of another.p dimensionsZReturns two things at once: (Evidence that types of lists match, value-level equality).q dimensions,Map a function over contents of a typed listr dimensionsGet a constructible V from any other W/; Pattern matching agains the result brings Q constraint into the scope:  case types ts of TypeList -> ...s dimensions Construct a  TypeList xs if there is an instance of  Typeable xs around.This way, you can always bring Q* instance into the scope if you have a  instance.t dimensionsIf all elements of a  TypedList are Typeable-, then the list of these elements is also Typeable.u dimensionsGeneric show function for a  TypedList.v dimensionsGeneric show function for a  TypedList.w dimensionsGeneric read function for a  TypedListE. Requires a "template" to enforce the structure of the type list.x dimensionsGeneric read function for a  TypedList of unknown length. dimensions8This function does GHC's magic to convert user-supplied R& function to create an instance of Qd typeclass at runtime. The trick is taken from Edward Kmett's reflection library explained in Chttps://www.schoolofhaskell.com/user/thoughtpolice/using-reflectiony dimensionsTerm-level structure of a TypedList f xs$ is fully determined by its type  Typeable xs . Thus, gunfold! does not use its last argument (Constr<) at all, relying on the structure of the type parameter.u dimensionsOverride cons symbol dimensionsHow to show a single elementv dimensionsHow to show a single elementw dimensionsOverride cons symbol dimensionsHow to read a single element dimensions(Enforce the type structure of the resultx dimensionsHow to read a single element dimensionsConsume the resultD&'()*+,-./01234ABCDEFGHIJKLMQRSTUVW][\_^ZYX`abcdefghijklmnopqrstuvwx0W][\_^ZYX][\_^ZYXQRTUSVrstlk`abghcdfejnopmiquvwx[5(c) Artem ChirkinBSD3None!%&'-.24567=>?@AFHMSUVXgk  dimensions"A tuple indexed by a list of types dimensions#This is an almost complete copy of  by (c) Andy Gill 2001. dimensions Constructing a type-indexed list dimensions Constructing a type-indexed list dimensionsGrow a tuple on the left O(1). dimensionsAGrow a tuple on the left while evaluating arguments to WHNF O(1). dimensionsMGrow a tuple on the right. Note, it traverses an element list inside O(n). dimensionspGrow a tuple on the right while evaluating arguments to WHNF. Note, it traverses an element list inside O(n). dimensions5Lexicorgaphic ordering; same as normal Haskell lists.W][\_ZYXW][\_ZYX][\_ZYX555555(c) Artem ChirkinBSD3None!%&'-.24567=>?@AFHMSUVXgk  dimensions"A tuple indexed by a list of types dimensions#This is an almost complete copy of  by (c) Andy Gill 2001. dimensions Constructing a type-indexed list dimensions Constructing a type-indexed list dimensionsGrow a tuple on the left O(1). dimensionsAGrow a tuple on the left while evaluating arguments to WHNF O(1). dimensionsMGrow a tuple on the right. Note, it traverses an element list inside O(n). dimensionspGrow a tuple on the right while evaluating arguments to WHNF. Note, it traverses an element list inside O(n). dimensions5Lexicorgaphic ordering; same as normal Haskell lists.W][\_ZYXW][\_ZYX][\_ZYX555555(c) Artem ChirkinBSD3None  dimensionsO(n) Convert a lazy Tuple to a strict Tuple6, forcing all its values to the WHNF along the way. dimensionsO(n) Convert a strict Tuple to a lazy Tuple by means of a simple coercion.W\XZY][_(c) Artem ChirkinBSD3None %&',-.2=>?@AEFHISUVX_gkmlN dimensions3Singleton type to store type-level dimension value.On the one hand, it can be used to let type-inference system know relations between type-level naturals. On the other hand, this is just a newtype wrapper on the Word type.Usually, the type parameter of Dim is either Nat or XNat=. If dimensionality of your data is known in advance, use NatY; if you know the size of some dimensions, but do not know the size of others, use XNats to represent them.O dimensions Similar to ;, but returns Nothingi if the result would be negative. Pattern-matching against the result would produce the evindence KnownDim (n - m).P dimensions Similar to  from , but returns . dimensions Constrain Nat dimensions hidden behind XNatbs. This is a link connecting the two types of type-level dims; you often need it to convert Dims, Idxs , and data. dimensions Get a minimal or exact bound of Dims.This is a plural form of . BoundedDims is a somewhat weaker form of  Dimensions:It is defined for both [Nat] and [XNat]; Instance of  Dimensions ds always implies BoundedDims ds. BoundedDims is a powerful inference tool: its instances do not require much, but it provides a lot via the superclass constraints. dimensionsPlural form for  dimensionsPlural form for .Given a Dims ys@, test if its runtime value satisfies constraints imposed by BoundedDims xs!, and returns it back coerced to Dims xs on success.This function allows to guess safely individual dimension values, as well as the length of the dimension list. It returns Nothing if xs and ys5 have different length or if any of the values in ys+ are less than the corresponding values of xs. dimensionsThis is a technical "helper" family that allows to infer BoundedDims constraint on a tail of a list via the superclass relation. dimensionsEvery dim in a list is either Nat , or a known XNat (i.e. N n). dimensionsMinimal or exact bound of Dims. This is a plural form of . dimensionsPut runtime evidence of 2 value inside function constraints. Similar to  or , but for lists of numbers.Note, kind of the  Dimensions list is usually Nat, restricted by KnownDim being also Nat3-indexed (it is impossible to create a unique KnownDim (XN m)* instance). Nevertheless, you can have KnownDim (N n) , which is useful in some cases. dimensionsFGet dimensionality of a space at runtime, represented as a list of N.0Note, this function is supposed to be used with TypeApplications. For example, you can type::set -XTypeApplications:set -XDataKinds:t dims @'[17, 12]!dims @'[17, 12] :: Dims '[17, 12] :t dims @'[]dims @'[] :: Dims '[]:t dims @(Tail '[3,2,5,7])*dims @(Tail '[3,2,5,7]) :: Dims '[2, 5, 7] dimensionsTSame as SomeNat, but for Dimensions: Hide all information about Dimensions inside dimensionsThis is either Nat , or a known XNat (i.e. N n). dimensionsLConstraints given by an XNat type on possible values of a Nat hidden inside. dimensions"Get a minimal or exact bound of a Dim.To satisfy the  BoundedDim means to be equal to N n or be not less than XN m. dimensionsMinimal or exact bound of a DimQ. Useful for indexing: it is safe to index something by an index less than  DimBound n (for both Nat and Xnat indexed dims). dimensionsGet such a minimal Dim (DimBound n), that Dim n& is guaranteed to be not less than dimBound if n ~ XN a, otherwise, the return Dim is the same as n. dimensionsIf the runtime value of Dim y satisfies  dimBound x, then coerce to Dim x. Otherwise, return  Nothing@.To satisfy the dimBound means to be equal to N n or be not less than XN m. dimensionsThis class provides the N& associated with a type-level natural.Note, kind of the KnownDim argument is usually Nat3, because it is impossible to create a unique KnownDim (XN m)) instance. Nevertheless, you can have KnownDim (N n) , which is useful in some cases. dimensions'Get value of type-level dim at runtime.0Note, this function is supposed to be used with TypeApplications. For example, you can type::set -XTypeApplications:set -XDataKinds :t dim @3dim @3 :: Dim 3:set -XTypeOperators:t dim @(13 - 6)dim @(13 - 6) :: Dim 7 dimensionsType-level dimensionality. dimensionsSame as  dimensions/Figure out whether the type-level dimension is  or  . dimensionsDPattern-match against this to out the kind of the dim type variable. dimensions/Figure out whether the type-level dimension is , or `N Nat`, or `XN Nat`. dimensionsLPattern-match against this to out the value (type) of the dim type variable. dimensionsGADT to support : type class. Match against its constructors to know if k is Nat or XNat dimensions Working on Nat. dimensions Working on XNat. dimensionsGADT to support 4 type class. Find out if this type variable is a Nat or XNat, and whether XNat! is of known or constrained type. dimensionsThis is a plain Nat dimensionsGiven XNat is known dimensionsGiven XNat is constrained unknown dimensionsKnown natural number  dimensionsBUnknown natural number, known to be not smaller than the given Nat  dimensions6Either known or unknown at compile-time natural number  dimensions O(Length ds)0 A heavy weapon against all sorts of type errors dimensionsO(n) Pattern-matching against this constructor reveals Nat-kinded list of dims, pretending the dimensionality is known at compile time within the scope of the pattern match. This is the main recommended way to get F at runtime; for example, reading a list of dimensions from a file. dimensionsO(1)4 Pattern-matching against this constructor brings a  instance into the scope. Thus, you can do arbitrary operations on your dims and use this pattern at any time to reconstruct the class instance at runtime. dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat dimensionsMatch Dim n against a concrete Nat  dimensionsMatch Dim n against a concrete Nat! dimensionsMatch Dim n against a concrete Nat" dimensionsMatch Dim n against a concrete Nat# dimensionsMatch Dim n against a concrete Nat$ dimensionsMatch Dim n against a concrete Nat% dimensionsMatch Dim n against a concrete Nat& dimensionsMatch Dim n against a concrete Nat' dimensionsMatch Dim n against a concrete Nat( dimensionsMatch Dim n against a concrete Nat) dimensionsMatch Dim n against a concrete Nat* dimensions - that is unknown at compile time. Same as f, but for a dimension: Hide dimension size inside, but allow specifying its minimum possible value.+ dimensionsStatically known  , dimensions$Match against this pattern to bring  instance into scope.- dimensionsReturns the minimal Dim that satisfies the  BoundedDim" constraint (this is the exact dim for Nats and the minimal bound for XNats).. dimensions Similar to  from , but returns ./ dimensions Construct a Dim n if there is an instance of  Typeable n around.Note: we can do this only for Nat-indexed dim, because the type XN mF does not have enough information to create a dim at runtime.0 dimensions If you have  KnownDim d, then d can only be Nat or a known type of XNat (i.e. N nJ). This function assures the type checker that this is indeed the case.1 dimensions Similar to  from .2 dimensions% with explicitly-passed constraining Dim to avoid AllowAmbiguousTypes.3 dimensions#Decrease minimum allowed size of a  Dim (XN x).4 dimensionskWe either get evidence that this function was instantiated with the same type-level numbers, or Nothing.Note, this function works on Nat%-indexed dimensions only, because  Dim (XN x)) does not have runtime evidence to infer x6 and `KnownDim x` does not imply `KnownDim (XN x)`.5 dimensionskWe either get evidence that this function was instantiated with the same type-level numbers, or Nothing.6 dimensionsWe either get evidence that x is not greater than y , or Nothing.7 dimensionsWe either get evidence that x is not greater than y , or Nothing.8 dimensionsOrdering of dimension values.Note:   forces type parameters to kind *; if you want to compare unknown  s, use  instance of N.9 dimensionsOrdering of dimension values.Note:   forces type parameters to kind *; if you want to compare unknown  s, use  instance of N.: dimensions^Same as `Prelude.(+)`. Pattern-matching against the result would produce the evindence KnownDim (n + m).; dimensions^Same as `Prelude.(-)`. Pattern-matching against the result would produce the evindence KnownDim (n - m).< dimensions^Same as `Prelude.(*)`. Pattern-matching against the result would produce the evindence KnownDim (n * m).= dimensions^Same as `Prelude.(^)`. Pattern-matching against the result would produce the evindence KnownDim (n ^ m).> dimensionsSame as I. Pattern-matching against the result would produce the evindence KnownDim (Div n m).? dimensionsSame as I. Pattern-matching against the result would produce the evindence KnownDim (Mod n m).@ dimensionshReturns log base 2 (round down). Pattern-matching against the result would produce the evindence KnownDim (Log2 n).A dimensionsSame as I. Pattern-matching against the result would produce the evindence KnownDim (Min n m).B dimensionsSame as I. Pattern-matching against the result would produce the evindence KnownDim (Max n m).C dimensions If you have  Dimensions ds, then ds can only be [Nat] or a known type of [XNa]t (i.e. all N nJ). This function assures the type checker that this is indeed the case.D dimensionsMinimal runtime Dims dsI value that satifies the constraints imposed by the type signature of Dims ds (this is the exact dims for Nats and the minimal bound for XNats).E dimensions Construct a Dims ds if there is an instance of  Typeable ds around.F dimensionsDims (ds :: [Nat]) is always Typeable.G dimensionsO(1) Convert Dims xs, to a plain haskell list of dimension sizes. Note, for XNatS-indexed list it returns actual content dimensions, not the constraint numbers (XN m)H dimensions^Convert a plain haskell list of dimension sizes into an unknown type-level dimensionality O(1).I dimensionsProduct of all dimension sizes  O(Length xs).J dimensionsProduct of all dimension sizes  O(Length xs).K dimensionsDrop the given prefix from a Dims list. It returns Nothing if the list did not start with the prefix given, or Just the Dims after the prefix, if it does.L dimensionsDrop the given suffix from a Dims list. It returns Nothing if the list did not end with the suffix given, or Just the Dims before the suffix, if it does.M dimensionsfWe either get evidence that this function was instantiated with the same type-level Dimensions, or   O(Length xs).N dimensionsfWe either get evidence that this function was instantiated with the same type-level Dimensions, or   O(Length xs).O dimensionsRestricted version of  , similar to  asProxyTypeOf.; to be used on such implicit functions as ,  etc.P dimensionsTry to instantiate the  constraint given two Dims lists. The first Dims is assumed to be the output of  minimalDims , i.e. %listDims xns == toList (listDims xns).8If you input a list that is not equal to its type-level  DimsBound., you will just have a lower chance to get  Just Dict result. dimensionsgA very unsafe function that bypasses all type-level checks and constructs the evidence from nothing.Q dimensionsInfer ) if you know that all of dims are exact (d ~ N n1). This function is totally safe and faithful. dimensions8This function does GHC's magic to convert user-supplied & function to create an instance of d typeclass at runtime. The trick is taken from Edward Kmett's reflection library explained in Chttps://www.schoolofhaskell.com/user/thoughtpolice/using-reflection 56789:;<=N,+*)('&%$#"! OPQRVW ][\_ZYXklr    -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ    N,+*)('&%$#"! ,+*)('&%$#"! 0-P./145678923:;O<=>?@AB :;<=798CDPQW ][\_ZYX ][\_ZYXEFGHIJMNOKLQRVrlk65 (c) Artem ChirkinBSD3None%&',-.127=>?EFHMVXgkB dimensions;Typically, this exception can occur in the following cases:#Converting from integral values to Idx d when d ~ N n or d :: Nat.Using Enum and Num when d ~ N n or d :: Nat.Converting from Idx (XN m :: XNat) to Idx (n :: Nat). Indexing or slicing data using Idx (XN m :: XNat).}If you are mad and want to avoid any overhead related to bounds checking and the related error handling, you can turn on the  unsafeindices5 flag to remove all of this from the library at once. dimensions&A value that should have been a valid  dimensionsA runtime value of a N dimensions5When used for slicing, this should have satisfied oodIdx + oodSubDim <= oodDim. dimensions,If available, contains (Dims xns, Idxs xns). dimensionsCShort description of the error location, typically a function name. dimensionsIFunction call stack, if available. Note, this field is ignored in the  and  instances. dimensionskType-level dimensional indexing with arbitrary Word values inside. Most of the operations on it require  or  constraint, because the Idxs3 itself does not store info about dimension bounds. dimensions.This type is used to index a single dimension. (k ~ Nat) => the range of indices is from 0 to d-1. (d ~ N n) => the range of indices is from 0 to n-1. (d ~ XN m) => the range of indices is from 0 to maxBound :: Word.That is, using Idx (n :: Nat) or  Idx (N n)C is guaranteed to be safe by the type system. But an index of type  Idx (XN m)/ can have any value, and using it may yield an ) exception -- just the same as a generic index function that takes a plain Int or Word3 as an argument. Thus, if you have data indexed by (XN m), I would suggest to use lookup-like functions that return Maybe. You're warned. dimensionsTransform between Nat -indexed and XNat -indexed Idxs.Note, this pattern is not a COMPLETE match, because converting from XNat to Nat indexed Idxs may fail (see ). dimensionsConvert between  and .Converting from  to  is always safe.Converting from  to  generally is unsafe: (k ~ Nat) => if w >= d, it fails with an  exception. (d ~ N n) => if w >= n, it fails with an  exception. (d ~ XN m) =>[ the constructor always succeeds, but using the result for indexing may fail with an  exception later.If  unsafeindices2 flag it turned on, this function always succeeds. dimensionsConvert an arbitrary Word to Idx/. This is a safe alternative to the pattern Idx. Note, when  (d ~ XN m) , it returns Nothing if w >= m\. Thus, the resulting index is always safe to use (but you cannot index stuff beyond  DimBound d this way). dimensionsGet the value of an Idx. dimensionsO(1) Convert Idxs xs to a plain list of words. dimensionsO(n)' Convert a plain list of words into an Idxs%, while checking the index bounds. Same as with _, it is always safe to use the resulting index, but you cannot index stuff outside of the  DimsBound ds this way. dimensionsO(1) Coerce a Nat -indexed list of indices into a XNat_-indexed one. This function does not need any runtime checks and thus runs in constant time. dimensionsO(n) Coerce a XNat -indexed list of indices into a Nat[-indexed one. This function checks if an index is within Dim bounds for every dimension. dimensions Coerce a XNat -indexed list of indices into a Nat-indexed one. Can throw an  exception unless  unsafeindices flag is active. dimensions/Show type of Idxs (for displaying nice errors). dimensions Throw an * exception without the CallStack attached. dimensions Throw an  exception. dimensionsds must be fixed (either [Nat]6 or all (N n)) to know exact bounds in each dimension. dimensionsCompare indices by their importance in lexicorgaphic order from the first dimension to the last dimension (the first dimension is the most significant one). Literally, /compare a b = compare (listIdxs a) (listIdxs b)This is the same compare rule, as for *. This is also consistent with offsets: sort == sortOn fromEnum dimensionsNote, this instance ignores  dimensionsNote, this instance ignores  dimensions Although  Num (Idx d) requires  BoundedDim d, it does not use maxBound when  (d ~ XN m). That is, if  (d ~ XN m) then i = fromIntegral n always succeeds. dimensions Although  Enum (Idx d) requires  BoundedDim d, it does not use maxBound when  (d ~ XN m)9. You can use list comprehensions safely for known dims ( (k ~ Nat) or  (d ~ N d)G), but you may get an index larger than your struct to be indexed when d ~ XN m. dimensionsLabel (e.g. function name) dimensions Bad index dimensions Target dim dimensionsSubSpace Dim, if applicable. dimensionsLarger picture: Dims and Idxs dimensionsLabel (e.g. function name) dimensions Bad index dimensions Target dim dimensionsSubSpace Dim, if applicable. dimensionsLarger picture: Dims and IdxsW][\ZYX$W][\ZYX][\ZYX(c) Artem ChirkinBSD3None !#"%$&'()*+,-./0123456789:;<=ABCDEFGHIJKLMN,(+*)'&%$#"! OPQRVW\XZY ][_klr    -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ !#"%$ !"#$%&'()*+,-.//012345567867967:67:67;67< = > ? @ A B C D E F G H I J KLMNOPQRSTUVWXYZ[\]^_`abcdefghijkklm@Abncoplqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab c c d e f g h i j k l k m n o p q r s t u v w x y z { | } ~                c                 xy{ )dimensions-2.1.0.0-35Ahfvt0GoU5KscbJsPaPEData.Type.LitsNumeric.DimensionsData.Type.ListNumeric.Dimensions.DimNumeric.TypedListNumeric.Tuple.StrictNumeric.Tuple.Lazy Numeric.TupleNumeric.Dimensions.IdxData.Type.List.FamiliesData.Type.List.InternalData.Type.List.ClassesPrelude stripPrefix Data.FunctorIdentityGHCTypeNatsbase GHC.TypeNatsKnownNat GHC.TypeLits KnownSymbolghc-prim GHC.TypesNatSymbol+*^- CmpSymbolCmpNatDivModLog2 TypeError AppendSymbolText:<>::$$:ShowType sameSymbol someSymbolVal symbolVal' symbolVal SomeSymbol ErrorMessagesameNat someNatValnatVal'natValSomeNat3constraints-deriving-1.1.1.0-8zlhS6aIMwNIU6v9NtD9AyData.ConstraintmapDict\\DictSub:- StripSuffix StripPrefixConcatReverseSnocInitLastTailHead ConcatList ReverseListSnocList inferConcatinferStripSuffixinferStripPrefixKindOfElKindOf<=MaxMin SOrderingSLTSEQSGTShowNatcmpNat cmpSymbolElemUnMapMapAll+++::+LengthDropTakeConsEmptyinferTypeableConsDim minusDimMdimValRepresentableListtListDictListDict1TypeList TypedList:*UEvListconssnocreverseheadtailinitlasttakedroplengthsplitAtorder'orderconcat stripSuffixsameListmaptypes typeablesinferTypeableListtypedListShowsPrecCtypedListShowsPrectypedListReadPrecwithTypedListReadPrec$fDataTypedList$fGenericTypedList $fDataDict1$fRepresentableListk:$fRepresentableListk[] $fShowDict1 $fOrdDict1 $fEqDict1TupleIdrunId:!:$*$*!$*!* $fMonadZipId $fMonadFixId $fMonadId$fApplicativeId $fFunctorId $fFoldableId$fOrd1Id$fEq1Id $fShow1Id $fRead1Id$fShowId$fReadId$fReadTypedList$fShowTypedList$fOrdTypedList $fEqTypedList$fBoundedTypedList$fMonoidTypedList$fSemigroupTypedList$fBitsId $fBoundedId$fDataId$fEnumId$fEqId$fFiniteBitsId $fFloatingId$fFractionalId $fGenericId $fGeneric1Id $fIntegralId $fIsStringId$fIxId $fMonoidId$fNumId$fOrdId$fRealId $fRealFracId $fRealFloatId $fSemigroupId $fStorableId$fTraversableIdtoStrict fromStrict FixedDims BoundedDims dimsBound constrainDims ExactDims DimsBound DimensionsdimsSomeDimsExactDimFixedDim BoundedDimDimBounddimBound constrainDimKnownDimdimDimsSomeDim KnownDimKinddimKind KnownDimTypedimTypeDimKindDimKNatDimKXNatDimTypeDimTNat DimTXNatN DimTXNatXNXNXNat KnownDimsXDimsD25D24D23D22D21D20D19D18D17D16D15D14D13D12D11D10D9D8D7D6D5D4D3D2D1D0DxDnD minimalDimdimVal' typeableDim withKnownXDim someDimVal constrainByrelaxsameDimsameDim' lessOrEqDim lessOrEqDim' compareDim compareDim'plusDimminusDimtimesDimpowerDimdivDimmodDimlog2DimminDimmaxDimwithKnownXDims minimalDims typeableDimsinferTypeableDimslistDims someDimsValtotalDim totalDim'stripPrefixDimsstripSuffixDimssameDims sameDims' inSpaceOfinferFixedDimsinferExactFixedDims$fKnownDimTypeXNatXN$fKnownDimTypeXNatN$fKnownDimTypeNatn$fClassKnownDimKindKnownDimType$fKnownDimKindXNat$fKnownDimKindNat $fShowDim$fOrdDim $fOrdDim0$fEqDim$fEqDim0 $fDataDim$fOrdTypedList0$fEqTypedList0 $fGenericDim$fClassKnownNatKnownDim$fKnownDimXNatN$fKnownDimNat25$fKnownDimNat24$fKnownDimNat23$fKnownDimNat22$fKnownDimNat21$fKnownDimNat20$fKnownDimNat19$fKnownDimNat18$fKnownDimNat17$fKnownDimNat16$fKnownDimNat15$fKnownDimNat14$fKnownDimNat13$fKnownDimNat12$fKnownDimNat11$fKnownDimNat10$fKnownDimNat9$fKnownDimNat8$fKnownDimNat7$fKnownDimNat6$fKnownDimNat5$fKnownDimNat4$fKnownDimNat3$fKnownDimNat2$fKnownDimNat1$fKnownDimNat0$fKnownDimNatn $fReadDim$fBoundedDimXNatXN$fBoundedDimXNatN$fBoundedDimNatn$fReadSomeDims$fShowSomeDims $fOrdSomeDims $fEqSomeDims$fDimensionsk:$fDimensionsk[]$fBoundedDimsXNat:$fBoundedDimsXNat[]$fBoundedDimsNatnsOutOfDimBoundsoodIdxoodDim oodSubDim oodDimsCtxoodName oodCallStackIdxsIdxXIdxs idxFromWord idxToWordlistIdxs idxsFromWordsliftIdxs unliftIdxsunsafeUnliftIdxsoutOfDimBoundsNoCallStackoutOfDimBounds$fNumIdx $fEnumIdx $fBoundedIdx $fShowIdx $fReadIdx$fEnumTypedList$fExceptionOutOfDimBounds$fShowOutOfDimBounds$fOrdOutOfDimBounds$fEqOutOfDimBounds $fDataIdx $fGenericIdx $fStorableIdx$fEqIdx$fOrdIdx $fNumIdx0 $fRealIdx $fIntegralIdx $fEnumIdx0List TwoOrMoreReverse'Snoc'RunListSingleUnreachableConstraint unreachable=->MagicrunMagic unsafeEqTypesConcatListCtx2ConcatListCtx1nilInstSnocListconsInstSnocListincohInstSnocListconsInstReverseListincohInstReverseListincohInstConcatListnilInstConcatListconsInstConcatListOrderingGHC.List GHC.MaybeNothingJustData.Typeable.InternalTypeable reifyRepListWordBoundedDimsTail GHC.ClassesOrdGHC.RealdivmodminmaxGHC.BaseconstunsafeInferFixedDimsreifyDimEq showIdxsType