Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Confusing Show/print error (Galaxy Being) 2. Re: Confusing Show/print error (Francesco Ariis) 3. Re: Confusing Show/print error (Tobias Brandt) ---------------------------------------------------------------------- Message: 1 Date: Thu, 9 Sep 2021 16:25:58 -0500 From: Galaxy Being <borg...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: [Haskell-beginners] Confusing Show/print error Message-ID: <cafahfsvxqqo9surro9vqkq7_40get2q8wbyb8tssbdnaomy...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" 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 borg...@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210909/a4eae4fa/attachment-0001.html> ------------------------------ Message: 2 Date: Thu, 9 Sep 2021 23:51:38 +0200 From: Francesco Ariis <fa...@ariis.it> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Confusing Show/print error Message-ID: <YTqB6jg6vTcm8ofw@extensa> Content-Type: text/plain; charset=utf-8 Hello Lawrence, Il 09 settembre 2021 alle 16:25 Galaxy Being ha scritto: > import Data.Tuple > fswp :: (a, b) -> (b, a) > fswp = Data.Tuple.swap this typechecks without problem. maybe you invoked fswp without an argument? (i.e. `λ> fwsp` instead of `λ> fwsp (1,'a')`) ------------------------------ Message: 3 Date: Thu, 9 Sep 2021 23:56:58 +0200 From: Tobias Brandt <to...@uni-bremen.de> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Confusing Show/print error Message-ID: <4c9f37b6-c3d2-30f6-aa1a-2466cd01e...@uni-bremen.de> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi Lawrence, it seems that you are trying to print your defined function. Most likely you just forgot to apply an argument to fswp. So 'fswp (1,2)' should just work fine. Cheers, Tobias On 9/9/21 11:25 PM, Galaxy Being wrote: > 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 > borg...@gmail.com <mailto:borg...@gmail.com> > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210909/a00b99aa/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 158, Issue 1 *****************************************