Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
enumBounded :: (Bounded a, Enum a, Show a) => Key -> TomlCodec atomland Toml.Codec.Combinator.Custom Codec for general nullary sum data types with a Bounded, Enum, and Show instance. This codec is similar to read but provides much better error messages than read for nullary sum types. E.g. for the same Format example from read function, but with the Toml.enumBounded "foo" codec the error for foo = "Jif" in the TOML file will look like this:
tomland decode error: Value is Jif but expected one of: Jpeg, Png, Gif
alphaNumChar :: (MonadParsec e s m, Token s ~ Char) => m (Token s)tomland Toml.Parser.Core Parse an alphabetic or numeric digit Unicode characters. Note that the numeric digits outside the ASCII range are parsed by this parser but not by digitChar. Such digits may be part of identifiers but are not used by the printer and reader to represent numbers.
-
trie-simple Data.Trie.Set List of all elements.
package
type-level-natural-number Simple type level natural numbers This is a simple implementation of type-level natural numbers that only requires DeriveDataTypeable. Operations requiring more language extensions have been split into a separate package. The difference between this package and the many others on Hackage implementing type-level naturals is its emphasis on simplicity. It only supports non-negative natural numbers, and only the successor and predicessor operations. It represents natural numbers using a type-level linked list, so it is not intended to be used for representing large numbers. Pre-defined aliases for natural numbers up to 15 are provided. The code for this package was largely taken from the excellent Vec package; I created this package with the intent of making this functionality more widely available. Difference from 1.0: Added instances for Typeable, and word synonyms for N0...N15. Difference from 1.1: Performance enhancements for naturalNumberAsInt. Simplified Show implementation. Difference from 1.1.1: Gave up on Haskell 2010 compatibility since as of GHC 7.8 manually deriving from Typeable is no longer allowed; now I use DeriveDataTypeable to construct the instances.
module TypeLevel.
NaturalNumber No documentation available.
-
type-level-natural-number TypeLevel.NaturalNumber No documentation available.
naturalNumberAsInt :: NaturalNumber n => n -> Inttype-level-natural-number TypeLevel.NaturalNumber No documentation available.
-
Type level numbers implemented using type families. This is type level numbers implemented using type families. Natural numbers use binary encoding. With default context stack numbers up to 2^18-1 could be represented. Signed integer numbers use balanced ternary encoding. Package is structured as folows:
- [TypeLevel.Number.Classes] contain generic type families such as Add
- [TypeLevel.Number.Nat] natural numbers implemented using binary encoding
- [TypeLevel.Number.Int] signed integers implemented using balanced ternary encoding
- [TypeLevel.Boolean] type level booleans
-
Type level numbers using existing Nat functionality Type level numbers using existing Nat functionality. Uses kind-polymorphic typeclasses and type families to facilitate more general code compatible with existing code using type-level Naturals.
-
This module provides a unified interface for natural numbers, signed integers, and rationals at the type level, in a way fully compatible with existing code using type-level naturals. Natural numbers are expressed as always, e.g. 5. Negative integers are written as Neg 3. Ratios are written as 3 :% 2. There are some naming conflicts between this module and GHC.TypeLits, notably the comparison and arithmetic operators. This module reexports Nat, KnownNat, natVal and natVal' so you may import just this module and not GHC.TypeLits. If you wish to use other functionality from GHC.TypeLits, this package also provides the module Data.TypeLits that includes (almost) full functionality from GHC.TypeLits, but with the conflicts resolving in this packages favour.