Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines singleton types for integers and concrete units.
- data SUnit u where
- forgetSUnit :: SUnit u -> UnitSyntax String
- class KnownUnit u where
- unitVal :: forall proxy u. KnownUnit u => proxy u -> UnitSyntax String
- data SList xs where
- class KnownList xs where
Singletons for units
Singleton type for concrete units of measure represented as lists of base units
forgetSUnit :: SUnit u -> UnitSyntax String Source
Extract the runtime syntactic representation from a singleton unit
class KnownUnit u where Source
A constraint
means that KnownUnit
uu
must be a concrete
unit that is statically known but passed at runtime
unitVal :: forall proxy u. KnownUnit u => proxy u -> UnitSyntax String Source
Extract the runtime syntactic representation of a KnownUnit
Singletons for lists
Singleton type for lists of base units