HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulesemirings-0.7Haskell98

Data.Field

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

Contents
  1. Field typeclass
Synopsis
  • Packagesemirings-0.7
  • Exports5
  • LanguageHaskell98
  • LicenceBSD-3-Clause
  • SourceField.hs

Field typeclass

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.