typeparams-0.0.3.0: Lens-like interface for type level parameters; allows unboxed unboxed vectors and supercompilation

Safe HaskellNone
LanguageHaskell98

Data.Params.Frac

Description

Provides type level fractions based on type nats

Synopsis

Documentation

data Frac Source

(Kind) This is the kind of type-level fractions. It is not built in to GHC, but instead defined in terms of Nat

Constructors

/ Nat Nat 

class KnownFrac n where Source

This class gives the Rational associated with a type-level fraction.

Methods

fracSing :: SFrac n Source

Instances

(KnownNat a, KnownNat b) => KnownFrac (/ a b) 

fracVal :: forall f n proxy. (KnownFrac n, Fractional f) => proxy n -> f Source

get the value from a type frac fracVal :: forall n proxy. (KnownFrac n) => proxy n -> Rational