
#15622: Generalize `E{0,1,2,3,6,9,12}` from `Data.Fixed` -------------------------------------+------------------------------------- Reporter: rockbmb | Owner: rockbmb Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Core Libraries | Version: 8.4.3 Resolution: | Keywords: base, | Data.Fixed Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rockbmb): Replying to [comment:19 Bodigrim]:
Actually, we can generalise the current approach to any base: {{{#!hs data E (n :: Nat)
instance KnownNat n => HasResolution (E n) where resolution = natVal . Compose
type Milli = E 1000 }}}
How would the `Compose` help with numeric bases here? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15622#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler