Search plugin
Manual
haskell.org
set:haskell-platform
set:included-with-ghc
package:array
package:async
package:attoparsec
package:base
package:binary
package:bytestring
package:Cabal
package:case-insensitive
package:cgi
package:containers
package:deepseq
package:directory
package:exceptions
package:fgl
package:filepath
package:ghc
package:ghc-prim
package:GLURaw
package:GLUT
package:half
package:hashable
package:haskeline
package:haskell-src
package:hoopl
package:hpc
package:html
package:HTTP
package:HUnit
package:integer-gmp
package:mtl
package:multipart
package:network
package:network-uri
package:ObjectName
package:old-locale
package:old-time
package:OpenGL
package:OpenGLRaw
package:parallel
package:parsec
package:pretty
package:primitive
package:process
package:QuickCheck
package:random
package:regex-base
package:regex-compat
package:regex-posix
package:scientific
package:split
package:StateVar
package:stm
package:syb
package:template-haskell
package:terminfo
package:text
package:tf-random
package:time
package:transformers
package:transformers-compat
package:unordered-containers
package:vector
package:xhtml
package:zlib
category:Algebra
category:Codec
category:Compatibility
category:Compilers/Interpreters
category:Concurrency
category:Control
category:Data
category:Data-Structures
category:Development
category:Distribution
category:Exceptions
category:Generics
category:GHC
category:Graphics
category:Graphs
category:Language
category:List
category:Monad
category:Network
category:Numeric
category:Parallelism
category:Parsing
category:Prelude
category:Pretty-Printer
category:Random
category:System
category:Template-Haskell
category:Testing
category:Text
category:Time
category:User-Interfaces
category:Web
category:XML
license:BSD-2-Clause
license:BSD-3-Clause
license:BSD2
license:BSD3
author:Aleksey-Khudyakov
author:Alexey-Kuleshevich
author:Andreas-Abel
author:Andrew-Lelechenko
author:Andy-Gill
author:Antoine-Latter
author:Ashley-Yakeley
author:Bas-van-Dijk
author:Ben-Gamari
author:Bjorn-Bringert
author:Brent-Yorgey
author:Bryan-O'Sullivan
author:Cabal-Development-Team
author:chessai
author:Chris-Dornan
author:Christopher-Kuklewicz
author:Core-Libraries-Committee
author:Daan-Leijen
author:David-Terei
author:Dean-Herington
author:Don-Stewart
author:Duncan-Coutts
author:Edward-Kmett
author:Emily-Pillmore
author:Ganesh-Sittampalam
author:Haskell-Bytestring-Team
author:Haskell-Libraries-Team
author:Haskell-Text-Team
author:Herbert-Valerio-Riedel
author:https://github.com/haskell/old-time
author:Ivan-Lazar-Miljenovic
author:Jason-Dagit
author:Joao-Dias
author:Johan-Tibell
author:John-Chee
author:José-Pedro-Magalhães
author:Judah-Jacobson
author:Julian-Ospald
author:Kazu-Yamamoto
author:Koen-Claessen
author:Koz-Ross
author:Lennart-Kolmodin
author:Martin-Erwig
author:Michal-Terepeta
author:MichaÅ-PaÅka
author:Milan-Straka
author:Neil-Mitchell
author:Nick-Smallbone
author:Ning-Wang
author:Noel-Winstanley
author:Norman-Ramsey
author:Oleg-Grenrus
author:Paolo-Martini
author:Peter-Simons
author:Ralf-Lammel
author:Roman-Leshchinskiy
author:Ross-Paterson
author:Sergey-Vinokurov
author:Silk
author:Simon-Hengel
author:Simon-Marlow
author:Simon-Peyton-Jones
author:Sven-Panne
author:Tamar-Christina
author:The-GHC-Team
author:Troels-Henriksen
author:Warrick-Gray
divMod package:base
divMod
:: Integral a => a -> a -> (a, a)
base
Prelude
GHC.Real
simultaneous
div
and
mod
. WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in
base
.
divMod
'
:: (Real a, Integral b) => a -> a -> (b, a)
base
Data.Fixed
Generalisation of
divMod
to any instance of
Real
divMod
Int
:: Int -> Int -> (Int, Int)
base
GHC.Base
Used to implement
divMod
for the
Integral
typeclass. This gives a tuple equivalent to
(div x y, mod x y)
Example
>>> divModInt 10 2 (5,0)
>>> divMod 10 2 (5,0)
divMod
Int#
:: Int# -> Int# -> (# Int#, Int# #)
base
GHC.Base
divMod
Int16#
:: Int16# -> Int16# -> (# Int16#, Int16# #)
base
GHC.Base
divMod
Int32#
:: Int32# -> Int32# -> (# Int32#, Int32# #)
base
GHC.Base
divMod
Int8#
:: Int8# -> Int8# -> (# Int8#, Int8# #)
base
GHC.Base
divMod
Integer
:: Integer -> Integer -> (# Integer, Integer #)
base
GHC.Integer
Used to implement
divMod
for the
Integral
typeclass. This gives a tuple equivalent to
(div x y, mod x y)
Example
>>> divModInteger 10 2 (5,0)
>>> divMod 10 2 (5,0)
integer
DivMod
:: Integer -> Integer -> (Integer, Integer)
base
GHC.Num
integer
DivMod
#
:: Integer -> Integer -> (# Integer, Integer #)
base
GHC.Num