base -is:module

Core data structures and operations Haskell's base library provides, among other things, core types (e.g. Bool and Int), data structures (e.g. List, Tuple and Maybe), the Exception mechanism, and the IO & Concurrency operations. The Prelude module, which is imported by default, exposes a curated set of types and functions from other modules. Other data structures like Map, Set are available in the containers library. To work with textual data, use the text library.
A prism that shows and reads integers in base-2 through base-36 Note: This is an improper prism, since leading 0s are stripped when reading.
>>> "100" ^? base 16
Just 256
>>> 1767707668033969 ^. re (base 36)
"helloworld"
Combinator for the <base /> element. Example:
base
Result:
<base />
The base from which calculations are made
Render an integral at base n.
The default kind. Does not extend any type.
only for Number types
base to use rather than file name
Used to define kind. Base types do not extend any type.
The different bases that can be used. See RFC4648 for details. In particular, Base64 can be standard or URL-safe. URL-safe encoding is often used in other specifications without padding characters. RFC 2045 defines a separate Base64 encoding, which is not supported. This format requires a newline at least every 76 encoded characters, which works around limitations of older email programs that could not handle long lines. Be aware that other languages, such as Ruby, encode the RFC 2045 version by default. To decode their output, remove all newlines before decoding.

Examples

A quick example to show the differences:
>>> let input = "Is 3 > 2?" :: ByteString

>>> let convertedTo base = convertToBase base input :: ByteString

>>> convertedTo Base16
"49732033203e20323f"

>>> convertedTo Base32
"JFZSAMZAHYQDEPY="

>>> convertedTo Base64
"SXMgMyA+IDI/"

>>> convertedTo Base64URLUnpadded
"SXMgMyA-IDI_"

>>> convertedTo Base64OpenBSD
"QVKeKw.8GBG9"
Obtain the base functor for a recursive datatype. The core idea of this library is that instead of writing recursive functions on a recursive datatype, we prefer to write non-recursive functions on a related, non-recursive datatype we call the "base functor". For example, [a] is a recursive type, and its corresponding base functor is ListF a:
data ListF a b = Nil | Cons a b
type instance Base [a] = ListF a
The relationship between those two types is that if we replace b with ListF a, we obtain a type which is isomorphic to [a].