In GHCi, why can't I show `pure 1` in REPL?
问题 I tried to assign a lifted value to a . λ> :m Control.Applicative λ> let a = pure 1 When I evaluated a in REPL, it prints 1 . λ> a 1 Therefore, I thought there may be an implementation of show for a , and tried this: λ> show a But the GHCi throws an error: <interactive>:70:1-4: No instance for (Show (f0 a0)) arising from a use of ‘show’ The type variables ‘f0’, ‘a0’ are ambiguous Note: there are several potential instances: instance (Integral a, Show a) => Show (GHC.Real.Ratio a) -- Defined