{"comments":null,"declarations":[{"children":[{"comments":null,"info":{"declType":"typeClassMember","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":[["Prim"],"Int"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"sourceSpan":{"end":[68,21],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[68,3]},"title":"degree"},{"comments":null,"info":{"declType":"typeClassMember","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"}},"sourceSpan":{"end":[69,21],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[69,3]},"title":"div"},{"comments":null,"info":{"declType":"typeClassMember","type":{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"}},"sourceSpan":{"end":[70,21],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[70,3]},"title":"mod"},{"comments":null,"info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"contents":[{"annotation":[],"contents":[["Data","EuclideanRing"],"EuclideanRing"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"Int"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"sourceSpan":{"end":[77,15],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[74,1]},"title":"euclideanRingInt"},{"comments":null,"info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"contents":[{"annotation":[],"contents":[["Data","EuclideanRing"],"EuclideanRing"],"tag":"TypeConstructor"},{"annotation":[],"contents":[["Prim"],"Number"],"tag":"TypeConstructor"}],"tag":"TypeApp"}},"sourceSpan":{"end":[82,16],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[79,1]},"title":"euclideanRingNumber"}],"comments":"The `EuclideanRing` class is for commutative rings that support division.\nThe mathematical structure this class is based on is sometimes also called\na *Euclidean domain*.\n\nInstances must satisfy the following laws in addition to the `Ring`\nlaws:\n\n- Integral domain: `one /= zero`, and if `a` and `b` are both nonzero then\n  so is their product `a * b`\n- Euclidean function `degree`:\n  - Nonnegativity: For all nonzero `a`, `degree a >= 0`\n  - Quotient/remainder: For all `a` and `b`, where `b` is nonzero,\n    let `q = a / b` and ``r = a `mod` b``; then `a = q*b + r`, and also\n    either `r = zero` or `degree r < degree b`\n- Submultiplicative euclidean function:\n  - For all nonzero `a` and `b`, `degree a <= degree (a * b)`\n\nThe behaviour of division by `zero` is unconstrained by these laws,\nmeaning that individual instances are free to choose how to behave in this\ncase. Similarly, there are no restrictions on what the result of\n`degree zero` is; it doesn't make sense to ask for `degree zero` in the\nsame way that it doesn't make sense to divide by `zero`, so again,\nindividual instances may choose how to handle this case.\n\nFor any `EuclideanRing` which is also a `Field`, one valid choice\nfor `degree` is simply `const 1`. In fact, unless there's a specific\nreason not to, `Field` types should normally use this definition of\n`degree`.\n\nThe `EuclideanRing Int` instance is one of the most commonly used\n`EuclideanRing` instances and deserves a little more discussion. In\nparticular, there are a few different sensible law-abiding implementations\nto choose from, with slightly different behaviour in the presence of\nnegative dividends or divisors. The most common definitions are \"truncating\"\ndivision, where the result of `a / b` is rounded towards 0, and \"Knuthian\"\nor \"flooring\" division, where the result of `a / b` is rounded towards\nnegative infinity. A slightly less common, but arguably more useful, option\nis \"Euclidean\" division, which is defined so as to ensure that ``a `mod` b``\nis always nonnegative. With Euclidean division, `a / b` rounds towards\nnegative infinity if the divisor is positive, and towards positive infinity\nif the divisor is negative. Note that all three definitions are identical if\nwe restrict our attention to nonnegative dividends and divisors.\n\nIn versions 1.x, 2.x, and 3.x of the Prelude, the `EuclideanRing Int`\ninstance used truncating division. As of 4.x, the `EuclideanRing Int`\ninstance uses Euclidean division. Additional functions `quot` and `rem` are\nsupplied if truncating division is desired.\n","info":{"arguments":[["a",null]],"declType":"typeClass","fundeps":[],"superclasses":[{"constraintAnn":[],"constraintArgs":[{"annotation":[],"contents":"a","tag":"TypeVar"}],"constraintClass":[["Data","CommutativeRing"],"CommutativeRing"],"constraintData":null,"constraintKindArgs":[]}]},"kind":null,"sourceSpan":{"end":[70,21],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[67,1]},"title":"EuclideanRing"},{"children":[],"comments":null,"info":{"alias":[["Data","EuclideanRing"],{"Right":{"Left":{"Ident":"div"}}}],"declType":"alias","fixity":{"associativity":"infixl","precedence":7}},"kind":null,"sourceSpan":{"end":[72,18],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[72,1]},"title":"(/)"},{"children":[],"comments":"The *greatest common divisor* of two values.\n","info":{"declType":"value","type":{"annotation":[],"contents":{"identifier":"a","kind":null,"skolem":null,"type":{"annotation":[],"contents":[{"constraintAnn":[],"constraintArgs":[{"annotation":[],"contents":"a","tag":"TypeVar"}],"constraintClass":[["Data","Eq"],"Eq"],"constraintData":null,"constraintKindArgs":[]},{"annotation":[],"contents":[{"constraintAnn":[],"constraintArgs":[{"annotation":[],"contents":"a","tag":"TypeVar"}],"constraintClass":[["Data","EuclideanRing"],"EuclideanRing"],"constraintData":null,"constraintKindArgs":[]},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"}],"tag":"ConstrainedType"}],"tag":"ConstrainedType"},"visibility":"TypeVarInvisible"},"tag":"ForAll"}},"kind":null,"sourceSpan":{"end":[91,56],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[91,1]},"title":"gcd"},{"children":[],"comments":"The *least common multiple* of two values.\n","info":{"declType":"value","type":{"annotation":[],"contents":{"identifier":"a","kind":null,"skolem":null,"type":{"annotation":[],"contents":[{"constraintAnn":[],"constraintArgs":[{"annotation":[],"contents":"a","tag":"TypeVar"}],"constraintClass":[["Data","Eq"],"Eq"],"constraintData":null,"constraintKindArgs":[]},{"annotation":[],"contents":[{"constraintAnn":[],"constraintArgs":[{"annotation":[],"contents":"a","tag":"TypeVar"}],"constraintClass":[["Data","EuclideanRing"],"EuclideanRing"],"constraintData":null,"constraintKindArgs":[]},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":[{"annotation":[],"contents":[{"annotation":[],"contents":[["Prim"],"Function"],"tag":"TypeConstructor"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"},{"annotation":[],"contents":"a","tag":"TypeVar"}],"tag":"TypeApp"}],"tag":"TypeApp"}],"tag":"ConstrainedType"}],"tag":"ConstrainedType"},"visibility":"TypeVarInvisible"},"tag":"ForAll"}},"kind":null,"sourceSpan":{"end":[97,56],"name":"../../../support/bower_components/purescript-prelude/src/Data/EuclideanRing.purs","start":[97,1]},"title":"lcm"}],"name":"Data.EuclideanRing","reExports":[]}