2      !"#$%&'()*+,-./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 { | } ~                                                None 9;@DRzThis class could also be called replicate. Looking forward, however, it may be useful to consider a Representable such as *VectorThing a = Vector a | Single a | Zeroand then ,singleton a = Single a singleton zero = Zeroshort-circuiting an expensive computation. As the class action then doesn't actually involve replication, it would be mis-named.1Not everything that has a shape is representable.Atodo: Structure is a useful alternative concept/naming convention   Safe@ CAn Abelian Group is associative, unital, invertible and commutative -A Group is associative, unital and invertible A Loop is unital and invertible 9A CMonoidal Magma is commutative, associative and unital.+A Monoidal Magma is associative and unital.An Idempotent Magma  a " a = aAn Invertible Magma " a " T: inv a " T&law is true by construction in HaskellA Commutative Magma  a " b = b " aAn Associative Magma (a " b) " c = a " (b " c)A Unital Magma unit " a = a a " unit = aA  -https://en.wikipedia.org/wiki/Magma_(algebra)Magma is a tuple (T,") consisting of a type a, anda function (") :: T -> T -> T&The mathematical laws for a magma are:2" is defined for all possible pairs of type T, and7" is closed in the set of all possible values of type Tor, more tersly, " a, b " T: a " b " TFThese laws are true by construction in haskell: the type signature of magma. and the above mathematical laws are synonyms.see 8http://chris-taylor.github.io/blog/2013/02/25/xor-trick/    Safe@ Minus () is reserved for where both the left and right cancellative laws hold. This then implies that the AdditiveGroup is also Abelian.Syntactic unary negation - substituting "negate a" for "-a" in code - is hard-coded in the language to assume a Num instance. So, for example, using ''-a = zero - a' for the second rule below doesn't work. Ha - a = zero negate a = zero - a negate a + a = zero a + negate a = zeroNon-commutative right minus a `plus` negate a = zeroNon-commutative left minus negate a `plus` a = zero>Additive is commutative, unital and associative under addition Ezero + a == a a + zero == a (a + b) + c == a + (b + c) a + b == b + a!Idempotent magma for addition. a `plus` a == a"Invertible magma for addition. " a " A: negate a " A&law is true by construction in Haskell$Commutative magma for addition. a `plus` b == b `plus` a%Associative magma for addition. .(a `plus` b) `plus` c == a `plus` (b `plus` c)&Unital magma for addition. %zero `plus` a == a a `plus` zero == a()D is used as the operator for the additive magma to distinguish from  , which, by convention, implies commutativity " a,b " A: a `plus` b " A&law is true by construction in Haskell*;sum definition avoiding a clash with the Sum monoid in base< !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST !"#$%&'()*()&'%$"#!* 5 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST666 6Safe@ UDivide (V) is reserved for where both the left and right cancellative laws hold. This then implies that the MultiplicativeGroup is also Abelian. Aa / a = one recip a = one / a recip a * a = one a * recip a = oneWNon-commutative right divide a `times` recip a = oneYNon-commutative left divide recip a `times` a = one[JMultiplicative is commutative, associative and unital under multiplication Cone * a == a a * one == a (a * b) * c == a * (b * c) a * b == b * a$Idempotent magma for multiplication. a `times` a == a]$Invertible magma for multiplication. " a " A: recip a " A&law is true by construction in Haskell_%Commutative magma for multiplication. a `times` b == b `times` a`%Associative magma for multiplication. 2(a `times` b) `times` c == a `times` (b `times` c)a Unital magma for multiplication. %one `times` a == a a `times` one == acdJ is used as the operator for the multiplicative magam to distinguish from \, which, by convention, implies commutativity " a,b " A: a `times` b " A&law is true by construction in HaskelleCproduct definition avoiding a clash with the Product monoid in base7UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~UVWXYZ[\]^_`abcdecdab`_]^e[\WXYZUV0UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~V7X7Z7\7None9;<=@element by element division a ./. a == singleton one!element by element multiplication e(a .*. b) .*. c == a .*. (b .*. c) singleton one .*. a = a a .*. singelton one = a a .*. b == b .*. aelement by element subtraction a .-. a = singleton zeroelement by element addition S(a .+. b) .+. c == a .+. (b .+. c) zero .+. a = a a .+. zero = a a .+. b == b .+. a 7767Safe@$Distribution (and annihilation) laws [a * (b + c) == a * b + a * c (a + b) * c == a * c + b * c a * zero == zero zero * a == zeroSafe@ICRing is a Ring with Multiplicative Commutation. It arises often due to \9 being defined as a multiplicative commutative operation.ARing a summary of the laws inherited from the ring super-classes szero + a == a a + zero == a (a + b) + c == a + (b + c) a + b == b + a a - a = zero negate a = zero - a negate a + a = zero a + negate a = zero one `times` a == a a `times` one == a (a `times` b) `times` c == a `times` (b `times` c) a `times` (b + c) == a `times` b + a `times` c (a + b) `times` c == a `times` c + b `times` c a `times` zero == zero zero `times` a == zeroSemiringSafe@ Trigonometric Field`A bounded field includes the concepts of infinity and NaN, thus moving away from error throwing. one / zero + infinity == infinity infinity + a == infinity isNaN (infinity - infinity) isNaN (infinity / infinity) isNaN (nan + a) zero / zero != nan}Note the tricky law that, although nan is assigned to zero/zero, they are never-the-less not equal. A committee decided this.Pquotient fields explode constraints if they allow for polymorphic integral types Ra - one < floor a <= a <= ceiling a < a + one round a == floor (a + one/(one+one))A hyperbolic field class Ysqrt . (**2) == identity log . exp == identity for +ive b, a != 0,1: a ** logBase a b "H bTA Field is a Ring plus additive invertible and multiplicative invertible operations.<A summary of the rules inherited from super-classes of Field pzero + a == a a + zero == a (a + b) + c == a + (b + c) a + b == b + a a - a = zero negate a = zero - a negate a + a = zero a + negate a = zero one * a == a a * one == a (a * b) * c == a * (b * c) a * (b + c) == a * b + a * c (a + b) * c == a * c + b * c a * zero == zero zero * a == zero a * b == b * a a / a = one recip a = one / a recip a * a = one a * recip a = one:A Semifield is a Field without Commutative Multiplication. prints as Infinity prints as  `-Infinity`Otodo: work out boundings for complex as it stands now, complex is different eg $one / (zero :: Complex Float) == nan!todo: bottom is here somewhere???3## Safe9;<=@ftodo: This should probably be split off into some sort of alternative Equality logic, but to what end?distance between numbers distance a b >= zero distance a a == zero \a b c -> distance a c + distance b c - distance a b >= zero && distance a b + distance b c - distance a c >= zero && distance a b + distance a c - distance b c >= zero &&@Like Signed, except the codomain can be different to the domain.signumz from base is not an operator replicated in numhask, being such a very silly name, and preferred is the much more obvious . Compare with Norm and Banach$ where there is a change in codomain abs a * sign a == aGeneralising this class tends towards size and direction (abs is the size on the one-dim number line of a vector with its tail at zero, and sign is the direction, right?).-todo: is utf perfectly acceptable these days?!4 Safe@+fromInteger is the most problematic of the Num class operators. Particularly heinous, it is assumed that any number type can be constructed from an Integer, so that the broad classes of objects that are composed of multiple elements is avoided in haskell.KtoInteger is kept separate from Integral to help with compatability issues.  Integral laws /b == zero || b * (a `div` b) + (a `mod` b) == a  coercion of  s fromIntegral a == a                      7 7 None +9;<=@DQR generalised outer product 3a><b + c><b == (a+c) >< b a><b + a><c == a >< (b+c)6todo: work out why these laws down't apply > a *. (b> c)== (a<b) .* c > (a> b).* c == a *. (b<c)representation synthesistensorial type4the inner product of a representable over a semiring ba <.> b == b <.> a a <.> (b +c) == a <.> b + a <.> c a <.> (s *. b + c) == s * (a <.> b) + a <.> c (s0 *. a)  . (s1 *. b) == s0 * s1 * (a  . b)zBanach (with Norm) laws form rules around size and direction of a number, with a potential crossing into another codomain. 1a == singleton zero || normalize a *. size a == a Division Module Laws ?nearZero a || a ./ one == a b == zero || a ./ b == recip b *. a#Multiplicative Module Laws xa .* one == a (a + b) .* c == (a .* c) + (b .* c) c *. (a + b) == (c *. a) + (c *. b) a .* zero == zero a .* b == b *. a&Subtraction Module Laws `(a + b) .- c == a + (b .- c) (a + b) .- c == (a .- c) + b a .- zero == a a .- b == negate b +. a)Additive Module Laws Y(a + b) .+ c == a + (b .+ c) (a + b) .+ c == (a .+ c) + b a .+ zero == a a .+ b == b +. a, synonym for ( .) !"#$%&'()*+,-./012 !"#$%&(')+*,)*+&'(#$% !", !"#$%&'()*+,-./012 888!7"7$7%7'6(6*6+6None@  !"#$%&'()*UVWXYZ[\]^_`abcde      !"#$%&(')+*, None,2349;<=@DIOQRT3GShapeV is used to generate sensible lengths for arbitrary instances of 6 and  SomeMatrix6Ca one-dimensional array where shape is specified at the value level8A one-dimensional array where shape is specified at the type level The main purpose of this, beyond safe-typing, is to supply the Representable instance with an initial object. A boxed  is used under the hood.;convert from a 8 to a 6<convert from a 6 to a 8 with no shape check=convert from a 6 to a 8, checking shapec pads with ' s if needed33456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde 3456789:;<= 89:67;<=345.3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde None+,2349:;<=@DOQRTn6used to get sensible arbitrary instances of SomeMatrixqa two-dimensional array where shape is specified at the value level as a '(Int,Int)' Use this to avoid type-level hasochism by demoting a s with vsA two-dimensional array where shape is specified at the type level The main purpose of this, beyond safe typing, is to supply the Representable instance with an initial object. A single Boxed c is used underneath for efficient slicing, but this may change or become polymorphic in the future.^todo: the natural type for a matrix, the output from a vector outer product for example, is a 8 (8a a). We should be able to unify to a different representation such as this, using type families.vconvert from a s to a qwconvert from a q to a s with no shape checkxconvert from a q to a s, checking shapey.conversion from a double Vector representationz,conversion to a double Vector representation{ convert a 8 to a column s| convert a 8 to a row s}convert a row s to a 8~convert a column s to a 8extract a row from a s as a 8extract a column from a s as a 8,resize matrix, appending with zero if needed-reshape matrix, appending with zero if neededmatrix transpositiontrans . trans == identity'extract the matrix diagonal as a vector getDiag one == one.create a matrix using a vector as the diagonal 1diagonal one = one getDiag . diagonal == identity+map a homomorphic vector function, row-wise.map a homomorphic vector function, column-wisematrix multiplicationjoin column-wise join row-wisefrom nested listfrom flat list<nopqrstuvwxyz{|}~nopqrstuvwxyz{|}~stuqrvwxyz{|}~nop7nopqrstuvwxyz{|}~None@H      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:  !"#$%&'()*UVWXYZ[\]^_`abcde      !"#$%&(')+*,3456789:;<=nopqrstuvwxyz{|}~None,@; !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                    ! " # $ % & ' ( ) * + , - . / , 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G G H I 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 { | } ~ ~                                                                  &      !"#$%&'(')'*'+',-.-/-0-1-2-3-4-5-6-7-8-9-:-;-<-=->-?@A@BCDCEFGFHFIJKLMNONPNQNRNSNTNUNVNWXYXZX[X\]^_`abNcNdNeNfghijkNlNmnonpnqnrstsuvwvxvyNz-{-|-|-}-}-~----------------NN@NvFFFFFFFFFFF          !"#"$%&%&%'%(%)%*%*%+%,%-./.0.1.234356789:;<=>?@A@B@C@DEFEGEHEIJKJLJMJNJOJPJQJRJSTUVWXYZ[\]^_`a'b'c'd'e'f'ghihjhjhklmnonpnqrstutvtwtxtytzt{t|t}~~n--------------      !n"n#n$@%@&@'@(@)@)@*@*+,+-+.+/+012131414v5v6v7v8v9:;:<:=:>:?:@A@ABCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSTUTVTVWXWYWZW[W\W]W^W_W`WaWbWcWdWeWfWgWhWiWjWkWlWmWnWoWpWqWrWsWtuvuwuxyzy{y|}~                              !  "#$%&'(&')&'*&'+&',&'-&'.&'/&'0&'1&'2&'3&'4&'5&'6&'7898:8;8<8=8>8?@8?A8?B8?C8?D8?E8?F8?G8?H8I8J8K8L8M8N8O8P8Q8RS8RT8RT8RU8V8W8X8YZ8Y[8Y\8]^8]_8]`8]a8]b8]c8]d8Oe8Of8Og8Oh8Oi8Oj8Ok8Ol8Om8wn8wo8wp8wq8wr8ws8t8uv8uw8ux8uy8z{8z|8z}8z~8z8z8z8z8z8z8z8z8z8z8z8z8z8z8z8#numhask-0.1.1-C359uxzg5fcEstP8eNTh7 NumHask.ShapeNumHask.Algebra.MagmaNumHask.Algebra.AdditiveNumHask.Algebra.MultiplicativeNumHask.Algebra.BasisNumHask.Algebra.DistributionNumHask.Algebra.RingNumHask.Algebra.FieldNumHask.Algebra.MetricNumHask.Algebra.IntegralNumHask.Algebra.ModuleNumHask.VectorNumHask.MatrixNumHask.Algebra Data.VectorVectorNumHask.PreludeNumHask.Examples%adjunctions-4.3-X2U0XIVJySEv6aJWzZmLLData.Functor.RepindextabulateRep Representable Singleton singletonHasShapeShapeshape $fSingletonfAbelianGroupLoop CMonoidalMonoidal Idempotent Invertibleinv Commutative AssociativeUnitalunitMagma⊕ groupSwap AdditiveGroup-AdditiveRightCancellative-~AdditiveLeftCancellative~-Additive+AdditiveIdempotentAdditiveInvertiblenegateAdditiveCommutativeAdditiveAssociativeAdditiveUnitalzero AdditiveMagmaplussum$fAdditiveGroupComplex$fAdditiveGroupInteger$fAdditiveGroupInt$fAdditiveGroupFloat$fAdditiveGroupDouble$fAdditiveComplex$fAdditiveBool$fAdditiveInteger $fAdditiveInt$fAdditiveFloat$fAdditiveDouble$fAdditiveIdempotentBool$fAdditiveInvertibleComplex$fAdditiveInvertibleBool$fAdditiveInvertibleInteger$fAdditiveInvertibleInt$fAdditiveInvertibleFloat$fAdditiveInvertibleDouble$fAdditiveCommutativeComplex$fAdditiveCommutativeBool$fAdditiveCommutativeInteger$fAdditiveCommutativeInt$fAdditiveCommutativeFloat$fAdditiveCommutativeDouble$fAdditiveAssociativeComplex$fAdditiveAssociativeBool$fAdditiveAssociativeInteger$fAdditiveAssociativeInt$fAdditiveAssociativeFloat$fAdditiveAssociativeDouble$fAdditiveUnitalComplex$fAdditiveUnitalBool$fAdditiveUnitalInteger$fAdditiveUnitalInt$fAdditiveUnitalFloat$fAdditiveUnitalDouble$fAdditiveMagmaComplex$fAdditiveMagmaBool$fAdditiveMagmaInteger$fAdditiveMagmaInt$fAdditiveMagmaFloat$fAdditiveMagmaDoubleMultiplicativeGroup/MultiplicativeRightCancellative/~MultiplicativeLeftCancellative~/Multiplicative*MultiplicativeInvertiblerecipMultiplicativeCommutativeMultiplicativeAssociativeMultiplicativeUnitaloneMultiplicativeMagmatimesproduct$fMultiplicativeGroupComplex$fMultiplicativeGroupFloat$fMultiplicativeGroupDouble$fMultiplicativeComplex$fMultiplicativeBool$fMultiplicativeInteger$fMultiplicativeInt$fMultiplicativeFloat$fMultiplicativeDouble$fMultiplicativeIdempotentBool!$fMultiplicativeInvertibleComplex$fMultiplicativeInvertibleFloat $fMultiplicativeInvertibleDouble"$fMultiplicativeCommutativeComplex$fMultiplicativeCommutativeBool"$fMultiplicativeCommutativeInteger$fMultiplicativeCommutativeInt $fMultiplicativeCommutativeFloat!$fMultiplicativeCommutativeDouble"$fMultiplicativeAssociativeComplex$fMultiplicativeAssociativeBool"$fMultiplicativeAssociativeInteger$fMultiplicativeAssociativeInt $fMultiplicativeAssociativeFloat!$fMultiplicativeAssociativeDouble$fMultiplicativeUnitalComplex$fMultiplicativeUnitalBool$fMultiplicativeUnitalInteger$fMultiplicativeUnitalInt$fMultiplicativeUnitalFloat$fMultiplicativeUnitalDouble$fMultiplicativeMagmaComplex$fMultiplicativeMagmaBool$fMultiplicativeMagmaInteger$fMultiplicativeMagmaInt$fMultiplicativeMagmaFloat$fMultiplicativeMagmaDoubleMultiplicativeGroupBasis./.MultiplicativeBasis.*.AdditiveGroupBasis.-. AdditiveBasis.+.$fMultiplicativeGroupBasisra$fMultiplicativeBasisra$fAdditiveGroupBasisra$fAdditiveBasisra Distribution$fDistributionComplex$fDistributionBool$fDistributionInteger$fDistributionInt$fDistributionFloat$fDistributionDoubleCRingRingSemiring$fCRingComplex$fCRingInteger $fCRingInt $fCRingFloat $fCRingDouble $fRingComplex $fRingInteger $fRingInt $fRingFloat $fRingDouble$fSemiringComplex$fSemiringBool$fSemiringInteger $fSemiringInt$fSemiringFloat$fSemiringDouble TrigFieldpisincostanasinacosatansinhcoshtanhasinhacoshatanhatan2 BoundedFieldmaxBoundminBoundnanisNaN QuotientFieldroundceilingfloor^^ExpFieldexploglogBase**sqrtField Semifieldinfinity neginfinity$fTrigFieldFloat$fTrigFieldDouble$fBoundedFieldComplex$fBoundedFieldDouble$fBoundedFieldFloat$fQuotientFieldDouble$fQuotientFieldFloat$fExpFieldComplex$fExpFieldFloat$fExpFieldDouble$fFieldComplex $fFieldFloat $fFieldDouble$fSemifieldComplex$fSemifieldFloat$fSemifieldDoubleEpsilonnearZero aboutEqualpositive veryPositive veryNegativeMetricdistanceNormedsizeSignedsignabs≈$fEpsilonComplex$fEpsilonInteger $fEpsilonInt$fEpsilonFloat$fEpsilonDouble$fMetricComplexa$fMetricIntegerInteger$fMetricIntInt$fMetricFloatFloat$fMetricDoubleDouble$fNormedComplexa$fNormedIntegerInteger$fNormedIntInt$fNormedFloatFloat$fNormedDoubleDouble$fSignedInteger $fSignedInt $fSignedFloat$fSignedDouble FromInteger fromInteger ToInteger toIntegerIntegraldivmoddivMod fromIntegral$fToIntegerInteger$fToIntegerInt$fFromIntegerInteger$fFromIntegerInt$fFromIntegerFloat$fFromIntegerDouble$fIntegralInteger $fIntegralInt TensorProduct><outer timesleft timesrightHilbert<.>Banach normalizeMultiplicativeGroupModule.//.MultiplicativeModule.**.AdditiveGroupModule.--.AdditiveModule.++.inner$fTensorProductr $fBanachra$fMultiplicativeGroupModulera$fMultiplicativeModulera$fAdditiveGroupModulera$fAdditiveModuleraShapeVunshapeV SomeVectortoVec someVectorunsafeToVectortoVector$fHilbertVectora$fIntegralVector$fMetricVectora$fEpsilonVector$fNormedVectora$fSignedVector$fBoundedFieldVector$fExpFieldVector $fFieldVector $fCRingVector $fRingVector$fSemiringVector$fDistributionVector$fMultiplicativeGroupVector$fMultiplicativeVector $fMultiplicativeInvertibleVector!$fMultiplicativeCommutativeVector!$fMultiplicativeAssociativeVector$fMultiplicativeUnitalVector$fMultiplicativeMagmaVector$fAdditiveGroupVector$fAdditiveVector$fAdditiveInvertibleVector$fAdditiveCommutativeVector$fAdditiveAssociativeVector$fAdditiveUnitalVector$fAdditiveMagmaVector$fArbitrarySomeVector$fArbitraryShapeV$fIsListSomeVector$fShowSomeVector$fHasShapeSomeVector$fArbitraryVector$fApplicativeVector$fRepresentableVector$fDistributiveVector$fHasShapeVector$fIsListVector $fShowVector $fEq1Vector $fEqVector$fFunctorVector$fFoldableVector$fTraversableVector$fFunctorSomeVector$fEqSomeVector$fFoldableSomeVector$fOrdSomeVectorShapeMunshapeM SomeMatrixMatrix flattenMatrix someMatrixunsafeToMatrixtoMatrix unsafeFromVVtoVVtoColtoRowfromColfromRowrowcolresizereshapetransgetDiagdiagonalmaprmapcmmultjoincjoinr$fHilbertMatrixa$fEpsilonMatrix$fSemifieldMatrix $fRingMatrix$fSemiringMatrix$fDistributionMatrix $fMultiplicativeInvertibleMatrix!$fMultiplicativeAssociativeMatrix$fMultiplicativeUnitalMatrix$fMultiplicativeMagmaMatrix$fAdditiveGroupMatrix$fAdditiveMatrix$fAdditiveInvertibleMatrix$fAdditiveCommutativeMatrix$fAdditiveAssociativeMatrix$fAdditiveUnitalMatrix$fAdditiveMagmaMatrix$fArbitrarySomeMatrix$fArbitraryShapeM$fIsListSomeMatrix$fIsListMatrix$fShowSomeMatrix$fHasShapeSomeMatrix$fRepresentableMatrix$fDistributiveMatrix$fArbitraryMatrix $fShowMatrix$fHasShapeMatrix$fFunctorMatrix $fEqMatrix$fFoldableMatrix$fTraversableMatrix$fFunctorSomeMatrix$fEqSomeMatrix$fFoldableSomeMatrixMultiplicativeIdempotent TensorRep toDMatrix fromDMatrixbaseGHC.Base++ghc-primGHC.PrimseqGHC.Listfilterzip Data.Tuplefstsnd otherwise$GHC.Real realToFrac Control.MonadguardjoinGHC.EnumEnumenumFrom enumFromThenenumFromThenTo enumFromTofromEnumtoEnumsuccpred GHC.ClassesEq==/= GHC.FloatFloatinglog1pexpm1log1pexplog1mexp Fractional fromRationalMonad>>=>>returnFunctorfmap<$GHC.NumNumsignumOrd>=minmax><<=compareGHC.ReadReadReal toRational RealFloat floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloat isInfiniteisDenormalizedisNegativeZeroisIEEERealFracproperFractiontruncateGHC.ShowShowData.Typeable.InternalTypeable Data.StringIsString Applicativepure<*>*><* Data.FoldableFoldabletoListfoldrfoldMapnulllengthfoldlfoldl'maximumminimumelemfoldfoldr'Data.Traversable TraversabletraversemapM sequenceAsequence GHC.GenericsGenericfromtoGeneric1Datatype moduleName datatypeName packageName isNewtype ConstructorconName conFixity conIsRecordSelectorselNameselSourceUnpackednessselSourceStrictnessselDecidedStrictness GHC.TypeLitsKnownNat KnownSymbolGHC.OverloadedLabelsIsLabel fromLabelData.Semigroup SemigroupsconcatstimesMonoidmemptymappendmconcat GHC.TypesBoolFalseTrueCharDoubleD#FloatF#IntGHC.IntInt8Int16Int32Int64 integer-gmpGHC.Integer.TypeIntegerMaybeJustNothingOrderingLTEQGTRatio:%Rational GHC.Stable StablePtrIOWordGHC.WordWord8Word16Word32Word64GHC.PtrPtrFunPtr Data.EitherEitherLeftRight ConstraintV1U1K1unK1M1unM1:+:L1R1:*::.:Comp1unComp1Rec0D1C1S1URecNatSymbolCmpNat Coercible GHC.StaticPtr StaticPtrGHC.Stack.Types CallStackTypeRepGHC.STSTliftMeitherliftR3liftR2 extractRep extendRep duplicateRep extendedRep duplicatedRep extractRepBy extendRepByduplicateRepBy distributeRepapReplocalRepaskRepmzipRep mzipWithRepmfixRepbindReppureRepfmapRep tabulatedCounCo mtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6Control.Monad.State.Class MonadStategetstateputControl.Monad.Reader.Class MonadReaderreaderlocalaskGHC.IO.Handle.TypesHandle GHC.Conc.SyncforkOnWithUnmaskforkIOWithUnmaskforkOnControl.ConcurrentforkOSThreadId$async-2.1.1.1-8yywY4inVGRLJSCg60gBXjControl.Concurrent.Async concurrentlyrace_racelink2linkwaitBothwaitEitherCancel waitEither_ waitEitherwaitEitherCatchCancelwaitEitherCatch waitAnyCancelwaitAnywaitAnyCatchCancel waitAnyCatch cancelWithcancelpoll waitCatchwait withAsyncOnwithAsyncBound withAsyncasyncOn asyncBoundasyncAsync asyncThreadId ConcurrentlyrunConcurrentlyintegralEnumFromThenTointegralEnumFromTointegralEnumFromThenintegralEnumFromgcdWord'gcdInt'^^%^^^%^numericEnumFromThenTonumericEnumFromTonumericEnumFromThennumericEnumFrom notANumber ratioPrec1 ratioPrec overflowErrorratioZeroDenominatorError divZeroErrorreduceboundedEnumFromThenboundedEnumFrommaxIntminIntData.Functor.IdentityIdentity runIdentitydiffoption mtimesDefaultstimesIdempotentstimesIdempotentMonoid stimesMonoidcycle1 WrappedMonoidOption getOptionData.List.NonEmptynonEmptyNonEmpty:| Data.VoidvacuousabsurdVoid Data.Complexphase magnitudepolarcismkPolar conjugateimagPartrealPartComplex:+ System.Exit exitSuccess exitFailureexitWithSystem.EnvironmentgetArgsGHC.ExecutionStackshowStackTrace getStackTraceGHC.ExecutionStack.InternalSrcLoc sourceFile sourceLine sourceColumnLocation objectName functionNamesrcLocData.Bifunctor BifunctorfirstsecondbimapControl.Monad.IO.ClassMonadIOliftIOthreadWaitWriteSTMthreadWaitReadSTMthreadWaitWritethreadWaitReadrunInUnboundThreadrunInBoundThreadisCurrentThreadBoundforkOSWithUnmask forkFinallyrtsSupportsBoundThreadsControl.Concurrent.QSemN signalQSemN waitQSemNnewQSemNQSemNControl.Concurrent.QSem signalQSemwaitQSemnewQSemQSemControl.Concurrent.ChanwriteList2ChangetChanContents isEmptyChan unGetChandupChanreadChan writeChannewChanChanmfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMfoldMapDefault fmapDefault mapAccumR mapAccumLforMforControl.ApplicativeoptionalZipList getZipList System.IOwithFileGHC.IO.Handle.FDopenFilestderrstdin GHC.Conc.IO threadDelayControl.Concurrent.MVar mkWeakMVaraddMVarFinalizermodifyMVarMaskedmodifyMVarMasked_ modifyMVar modifyMVar_withMVarMaskedwithMVarswapMVar GHC.StackwithFrozenCallStack callStackControl.ExceptionallowInterruptcatchesControl.Exception.BasebracketOnErrorbracket_finallybracket onExceptiontryJusttry mapException handleJusthandle catchJustcatchPatternMatchFail RecSelError RecConError RecUpdError NoMethodError TypeErrorNonTerminationNestedAtomically Text.Read readMaybe readEitherreadsalwaysalwaysSucceedscatchSTMthrowSTMorElseretry atomicallymkWeakThreadIdthreadCapability myThreadId killThreadsetNumCapabilitiesgetNumCapabilitiesforkIOSTMstdoutGHC.IO.ExceptionioErrorasyncExceptionFromExceptionasyncExceptionToExceptionBlockedIndefinitelyOnMVarBlockedIndefinitelyOnSTMDeadlockAllocationLimitExceededAssertionFailedSomeAsyncExceptionAsyncException StackOverflow HeapOverflow ThreadKilled UserInterruptArrayExceptionIndexOutOfBoundsUndefinedElementExitCode ExitSuccess ExitFailure Foreign.PtrWordPtrIntPtrData.Functor.ConstConstgetConstForeign.StorableStorablefindnotElem minimumBy maximumByallanyorand concatMapconcatmsumasum sequence_ sequenceA_forM_mapM_for_ traverse_foldlMfoldrM Data.Monoid<>DualgetDualEndoappEndoAllgetAllAnygetAnySumgetSumProduct getProductFirstgetFirstLastgetLastAltgetAltFixityPrefixInfixFixityIPrefixIInfixI AssociativityLeftAssociativeRightAssociativeNotAssociativeMetaMetaDataMetaConsMetaSelGHC.IOevaluateuninterruptibleMaskuninterruptibleMask_maskmask_getMaskingState interruptibleFilePath MaskingStateUnmaskedMaskedInterruptibleMaskedUninterruptible IOException GHC.ExceptionprettyCallStack prettySrcLoc Exception toException fromExceptiondisplayException ErrorCallErrorCallWithLocationArithExceptionOverflow UnderflowLossOfPrecision DivideByZeroDenormalRatioZeroDenominator Data.TypeableeqTcasttypeRep byteSwap64 byteSwap32 byteSwap16 someSymbolVal someNatVal symbolValnatValSomeNat SomeSymbol GHC.IO.IOModeIOModeReadMode WriteMode AppendMode ReadWriteModeData.Type.Coercionrepr coerceWithCoercionisRightisLeftpartitionEithersrightsleftsData.Type.Equality gcastWithcastWithsym:~:Refl Data.ProxyProxy Data.OldListunfoldrsortBysort permutations subsequencestailsinitsgroupgenericReplicategenericSplitAt genericDrop genericTake genericLength transpose intercalate intersperse isPrefixOfData.Ord comparingDown Data.BitstoIntegralSizedpopCountDefaulttestBitDefault bitDefaultBits.&..|.xor complementshiftrotatezeroBitsbitsetBitclearBit complementBittestBit bitSizeMaybebitSizeisSignedshiftLshiftRrotateLrotateRpopCount FiniteBits finiteBitSizecountLeadingZeroscountTrailingZeros Data.Function&onfix Data.Functorvoid$><$>runSTfixSTlcmgcdoddeven denominator numerator%GHC.CharchrunzipzipWithreversebreaksplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanrscanl Data.MaybemapMaybe catMaybes listToMaybe maybeToList fromMaybe isNothingisJustmaybeswapuncurrycurry GHC.Stack.CCScurrentCallStacksubtractGHC.MVar isEmptyMVar tryReadMVar tryPutMVar tryTakeMVarputMVarreadMVartakeMVarnewMVar newEmptyMVarMVarasTypeOfuntilflip.constordapliftM5liftM4liftM3liftM2when=<<liftA3liftA2liftA<**> Alternativeempty<|>somemany MonadPlusmzeromplus SomeException getCallStack HasCallStack&&||notbytestring-0.10.8.1Data.ByteString.Internal ByteStringcontainers-0.5.7.1Data.IntMap.BaseIntMapData.IntSet.BaseIntSet Data.Map.BaseMap Data.SequenceSeq Data.Set.BaseSetdeepseq-1.4.2.0Control.DeepSeqforce$!!deepseqNFDatarnf'hashable-1.2.6.1-BImGDn7vOUG6aLx2AeaDaoData.Hashable.Class hashUsingHashable hashWithSalthashtransformers-0.5.2.0Control.Monad.Trans.ClassliftControl.Monad.Error.Class MonadError throwError catchErrorasksgetsmodifyControl.Monad.Trans.ExceptExceptTExcept runExcept runExceptTControl.Monad.Trans.ReaderReaderT runReaderTReader runReaderControl.Monad.Trans.State.LazyStateT runStateTStaterunState evalState execState withState evalStateT execStateT#text-1.2.2.2-KC7dWoG09dA1F6jKj5GSqhData.Text.Encoding.ErrorUnicodeException OnDecodeErrorOnError strictDecode lenientDecodeignorereplaceData.Text.InternalTextData.Text.EncodingdecodeUtf8With decodeUtf8 decodeUtf8' encodeUtf8 Data.Text.IOreadFile writeFile appendFileinteract getContentsgetLineData.Text.LazytoStrict fromStrict"stm-2.4.4.1-JQn4hNPyYjP5m9AcbI88VeControl.Monad.STMcheck"safe-0.3.15-2Yd45VWFfdcKqKyispOifYSafetailMaytailDeftailSafeinitMayinitDefinitSafeheadMaylastMayheadDeflastDef minimumMay maximumMay foldr1May foldl1MayatMayatDef$protolude-0.2-FSkSjSsnac16LO619k0O5V<<*>>liftAA2purereitherAorEmptyorAltDebug undefinednotImplementedtraceIdtraceM traceShowM traceShowId traceShowtraceIOtraceputLByteString putByteStringputLTextputTextPrinthPutStr hPutStrLnputStrputStrLnPanicpanic FatalErrorfatalErrorMessageliftM2'liftM' concatMapM ExceptionstryIOnotehushConvtoSLtoSLeniencyStrictLenient StringConvstrConvguardMifMunlessMwhenMbool<&&>&&^<||>||^ maybeToEither maybeEmpty maybeToLeft maybeToRight rightToMaybe leftToMaybe<<$>>ListlistordNubsortOnhead ProtoludedieshowliftIO2liftIO1guardedAguardedpass<&>foreachthrowTothrowIOprintapplyNunsnocunconsmapidentityLText LByteStringBase$!