How to work around issue with ambiguity when monomorphic restriction turned *on*?
问题 So, learning Haskell, I came across the dreaded monomorphic restriction, soon enough, with the following (in ghci): Prelude> let f = print.show Prelude> f 5 <interactive>:3:3: No instance for (Num ()) arising from the literal `5' Possible fix: add an instance declaration for (Num ()) In the first argument of `f', namely `5' In the expression: f 5 In an equation for `it': it = f 5 So there's a bunch of material about this, e.g. here, and it is not so hard to workaround. I can either add an