HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulesemirings-0.7Haskell98

Data.Field

A Field is a Ring in which all nonzero elements have a multiplicative inverse.

  • 1 class
  • 4 values
  • Packagesemirings-0.7
  • Exports5
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceField.hs

Field typeclass

5 declarations
classclass (Euclidean a, Ring a) => Field a
#

Field represents a field, a ring with a multiplicative inverse for any non-zero element.

Instances9Field, …
valuefromRational :: Field a => Rational -> a
#

Convert from rational to field.

When {-# LANGUAGE RebindableSyntax #-} is enabled, this function is used for desugaring rational literals (like, 2.37). This may be used to facilitate transition from Fractional to Field, because less casts are now required.

value(/) :: Field a => a -> a -> a
#

Infix shorthand for divide.