HORIZON HASKELLDocslts/ghc-9.14.x6d5fdfd2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 6d5fdfd · 2026-10-12

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.