mod

Integer modulus, satisfying
(x `div` y)*y + (x `mod` y) == x
WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
integer modulus, satisfying
(x `div` y)*y + (x `mod` y) == x
WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
integer modulus, satisfying
(x `div` y)*y + (x `mod` y) == x
Integer modulus, satisfying: (x div y) * y + (x mod y) == x
Modulus.
mod x1 x2 returns x1 - x2 * (x1 div [x2])@. The terms are expected to have type Int.
Fast type-safe modular arithmetic Modular arithmetic, promoting moduli to the type level, with an emphasis on performance. Originally part of the arithmoi package.
Apply the mod operation to two streams, point-wise.
integer modulus, satisfying
(x `div` y)*y + (x `mod` y) == x
Modulus of natural numbers. Mod x 0 is undefined (i.e., it cannot be reduced).
An option modifier. Option modifiers are values that represent a modification of the properties of an option. The type parameter a is the return type of the option, while f is a record containing its properties (e.g. OptionFields for regular options, FlagFields for flags, etc...). An option modifier consists of 3 elements:
  • A field modifier, of the form f a -> f a. These are essentially (compositions of) setters for some of the properties supported by f.
  • An optional default value and function to display it.
  • A property modifier, of the form OptProperties -> OptProperties. This is just like the field modifier, but for properties applicable to any option.
Modifiers are instances of Monoid, and can be composed as such. One rarely needs to deal with modifiers directly, as most of the times it is sufficient to pass them to builders (such as strOption or flag) to create options (see Builder).
pattern synonym for remainder %
pattern synonym for remainder %
Wrapper with a phantom integer for statically checked modular arithmetic.
This module contains code from: https://hackage.haskell.org/package/mod and has the following license: Copyright (c) 2019 Andrew Lelechenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This represents a modification of the properties of a particular Parser. Combine them using the Monoid instance.
This represents a modification of the properties of a particular Parser. Combine them using the Monoid instance.