I am trying to understand the use of literals like haskell. In particular, I thought I would write a function that shows me a type literal for a custom type
newtype Fixed (p :: Nat) a = Fixed a instance (KnownNat p) => Show (Fixed pa) where show _ = show $ natVal (Proxy::Proxy p)
However ghc (7.8) cannot output KnownNat n0, which means that I am not holding back things as I think it should be. Can anyone suggest what is wrong?
source share