Safe Haskell | None |
---|---|

Language | Haskell98 |

# Field typeclass

class (Euclidean a, Ring a) => Field a Source #

#### Instances

Field Double Source # | |

Defined in Data.Euclidean | |

Field Float Source # | |

Defined in Data.Euclidean | |

Field () Source # | |

Defined in Data.Euclidean | |

Field CFloat Source # | |

Defined in Data.Euclidean | |

Field CDouble Source # | |

Defined in Data.Euclidean | |

Field Mod2 Source # | |

Defined in Data.Euclidean | |

Integral a => Field (Ratio a) Source # | |

Defined in Data.Euclidean | |

Field a => Field (Complex a) Source # | |

Defined in Data.Euclidean | |

Fractional a => Field (WrappedFractional a) Source # | |

Defined in Data.Euclidean |

fromRational :: Field a => Rational -> a Source #

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.