PolyKind for Fixed and HasResolution from Data.Fixed

6 Mar
2016
6 Mar
'16
12:29 p.m.
Hi all! If we define HasResolution and Fixed like that: class HasResolution (a :: k) where resolution :: p a -> Integer newtype Fixed (a :: k) = Fixed Integer We can do something like that: instance KnownNat a => HasResolution a where resolution = natVal 2.3 :: Fixed 1 -- Timofeev N.D.
3366
Age (days ago)
3366
Last active (days ago)
0 comments
1 participants
participants (1)
-
Никита Тимофеев