[Haskell-beginners] Confusing Show/print error

Galaxy Being borgauf at gmail.com
Thu Sep 9 21:25:58 UTC 2021


I've got this

import Data.Tuple
fswp :: (a, b) -> (b, a)
fswp = Data.Tuple.swap

and get this

 • No instance for (Show ((a0, b0) -> (b0, a0)))
        arising from a use of ‘print’
        (maybe you haven't applied a function to enough arguments?)
    • In a stmt of an interactive GHCi command: print it

Not sure why or what to do to correct it.

⨽
Lawrence Bottorff
Grand Marais, MN, USA
borgauf at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210909/a4eae4fa/attachment.html>


More information about the Beginners mailing list