Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 509 510 511 512 513 514 515 516 517 518 519 .. 5022
502,152 events total
2020-10-08 13:34:57 Amras joins (~Amras@unaffiliated/amras0000)
2020-10-08 13:35:15 fendor_ is now known as fendor
2020-10-08 13:35:40 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
2020-10-08 13:37:11 × knupfer quits (~Thunderbi@200116b82ce4df0089eeab40cb981b9d.dip.versatel-1u1.de) (Client Quit)
2020-10-08 13:37:14 knupfer1 joins (~Thunderbi@200116b82ce4df00707cd182bbf7282c.dip.versatel-1u1.de)
2020-10-08 13:37:19 × ralejs quits (~ralejs@2620:10d:c093:400::5:a494) (Read error: Connection reset by peer)
2020-10-08 13:37:39 chaosmasttter joins (~chaosmast@p200300c4a70b40010854fe5f0255a133.dip0.t-ipconnect.de)
2020-10-08 13:37:48 ralejs joins (~ralejs@2620:10d:c093:400::5:a494)
2020-10-08 13:38:06 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
2020-10-08 13:38:43 <cohn> can anyone recommend any books on learning parallel and concurrent Haskell? The book by Simon Marlow seems to be a good bit out of date at this point.
2020-10-08 13:38:53 <dminuoso> cohn: Simon Marlows book.
2020-10-08 13:39:14 <dminuoso> There are no other good resources Im aware of.
2020-10-08 13:39:32 × knupfer1 quits (~Thunderbi@200116b82ce4df00707cd182bbf7282c.dip.versatel-1u1.de) (Client Quit)
2020-10-08 13:39:40 knupfer joins (~Thunderbi@200116b82ce4df00c08e8b8123e096f3.dip.versatel-1u1.de)
2020-10-08 13:39:57 thir joins (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de)
2020-10-08 13:41:10 knupfer1 joins (~Thunderbi@200116b82ce4df00fc254dbd4df5ac33.dip.versatel-1u1.de)
2020-10-08 13:41:11 × knupfer quits (~Thunderbi@200116b82ce4df00c08e8b8123e096f3.dip.versatel-1u1.de) (Read error: Connection reset by peer)
2020-10-08 13:41:11 knupfer1 is now known as knupfer
2020-10-08 13:41:31 <cohn> dminuoso: ok. I ask because I've worked through a few examples and it seems like some of the syntax used in the book is no longer valid
2020-10-08 13:41:45 <dminuoso> Can you give some examples?
2020-10-08 13:43:13 <cohn> GHC complains about this line for one: https://github.com/simonmar/parconc-examples/blob/master/Sudoku.hs#L77
2020-10-08 13:43:31 <dminuoso> Can you share the diagnostic it gives?
2020-10-08 13:43:34 <cohn> even tried setting it up in an isolated Stack environment and no good
2020-10-08 13:43:38 <cohn> sure, one sec
2020-10-08 13:44:17 × thir quits (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-08 13:44:33 × lep-delete quits (~lep@94.31.82.44) (Read error: Connection reset by peer)
2020-10-08 13:44:54 lep-delete joins (~lep@94.31.82.44)
2020-10-08 13:45:12 lep-delete is now known as test
2020-10-08 13:45:16 test is now known as Guest40023
2020-10-08 13:45:47 <cohn> https://pastebin.com/LLndiZyi
2020-10-08 13:45:59 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-10-08 13:46:00 <cohn> that's actually from the HLS, but you get the idea
2020-10-08 13:46:01 <cohn> :D
2020-10-08 13:46:52 <dminuoso> cohn: Do you have overloaded strings turned on?
2020-10-08 13:47:14 <cohn> yes
2020-10-08 13:47:26 <dminuoso> Try giving the string an explicit annotation then.
2020-10-08 13:47:26 × jneira_ quits (~jneira@118.red-176-83-71.dynamicip.rima-tde.net) (Read error: Connection reset by peer)
2020-10-08 13:47:40 <cohn> like "foo" :: String?
2020-10-08 13:47:42 jneira_ joins (~jneira@80.30.101.206)
2020-10-08 13:47:48 × roconnor quits (~roconnor@host-45-78-225-249.dyn.295.ca) (Read error: Connection reset by peer)
2020-10-08 13:47:49 <dminuoso> Yeah
2020-10-08 13:47:53 <dminuoso> Or actually, do you have OverloadedLists as well?
2020-10-08 13:48:10 <cohn> no
2020-10-08 13:48:13 <cohn> try it?
2020-10-08 13:48:22 <dminuoso> No.
2020-10-08 13:48:32 <dminuoso> % :set -XOverloadedStrings
2020-10-08 13:48:32 <yahb> dminuoso:
2020-10-08 13:48:35 × polyrain_ quits (~polyrain@203.51.166.163) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-08 13:49:10 <dminuoso> % regularGrid g = if all (`elem` "0.-123456789") g then Just g else Nothing
2020-10-08 13:49:10 <yahb> dminuoso: ; <interactive>:83:21: error:; Ambiguous occurrence `all'; It could refer to; either `Text.all', imported from `Data.Text'; or `Prelude.all', imported from `Prelude' (and originally defined in `Data.Foldable')
2020-10-08 13:49:14 <dminuoso> % :set -XNoOverloadedStrings
2020-10-08 13:49:15 <yahb> dminuoso:
2020-10-08 13:49:16 <dminuoso> % regularGrid g = if all (`elem` "0.-123456789") g then Just g else Nothing
2020-10-08 13:49:16 <yahb> dminuoso: ; <interactive>:85:21: error:; Ambiguous occurrence `all'; It could refer to; either `Text.all', imported from `Data.Text'; or `Prelude.all', imported from `Prelude' (and originally defined in `Data.Foldable')
2020-10-08 13:49:22 <dminuoso> % regularGrid g = if Prelude.all (`elem` "0.-123456789") g then Just g else Nothing
2020-10-08 13:49:22 <yahb> dminuoso:
2020-10-08 13:49:35 <dminuoso> cohn: Ah I mispasted. But anyway, OverloadedStrings is the cause here.
2020-10-08 13:49:40 <dminuoso> Consider:
2020-10-08 13:50:09 <dminuoso> "0.-123456789" is a polymorphic type, but so is `elem`
2020-10-08 13:50:15 <cohn> I ran `stack ghci`, got the error, then entered `:set -XOverloadedStrings` into ghci followed by `:r`. Same error. :
2020-10-08 13:50:23 <dminuoso> So it cant infer that "0.-123..." is even a list
2020-10-08 13:50:36 <dminuoso> cohn: No, you need to set -XNoOverloadedStrings
2020-10-08 13:50:40 <cohn> oh!
2020-10-08 13:50:42 <dminuoso> Just to verify locally
2020-10-08 13:50:44 <cohn> lemme try that
2020-10-08 13:50:44 <dminuoso> But anyway
2020-10-08 13:50:46 <dminuoso> 15:47:40 cohn | like "foo" :: String?
2020-10-08 13:50:51 <dminuoso> That is a drop-in workaround.
2020-10-08 13:51:05 <dminuoso> Or you annotate `elem`
2020-10-08 13:51:25 <cohn> ok, it works when using `:set -XNoOverloadedStrings`
2020-10-08 13:51:28 <cohn> interdesting
2020-10-08 13:51:40 <dminuoso> cohn: Consider this trivial example:
2020-10-08 13:51:42 <dminuoso> % :t elem
2020-10-08 13:51:42 <yahb> dminuoso: (Foldable t, Eq a) => a -> t a -> Bool
2020-10-08 13:51:52 <dminuoso> % :t null
2020-10-08 13:51:52 <yahb> dminuoso: ; <interactive>:1:1: error:; Ambiguous occurrence `null'; It could refer to; either `Text.null', imported from `Data.Text'; or `Prelude.null', imported from `Prelude' (and originally defined in `Data.Foldable')
2020-10-08 13:51:55 <dminuoso> % :t Prelude.null
2020-10-08 13:51:55 <yahb> dminuoso: Foldable t => t a -> Bool
2020-10-08 13:52:04 <dminuoso> % :t fromString "foo"
2020-10-08 13:52:04 <yahb> dminuoso: IsString a => a
2020-10-08 13:52:14 <dminuoso> Prelude.null (fromString "foo")
2020-10-08 13:52:23 <dminuoso> What should that give you? What Foldable instance should be selected?
2020-10-08 13:52:58 <dminuoso> So it's your mistake at the end for using OverloadedStrings. :)
2020-10-08 13:53:04 <cohn> hah
2020-10-08 13:53:06 <cohn> good point
2020-10-08 13:53:30 <cohn> yea, I can see why GHC would get confused
2020-10-08 13:53:43 <cohn> dminuoso: thanks so much!
2020-10-08 13:53:51 <dminuoso> You're welcome.
2020-10-08 13:53:58 × jneira_ quits (~jneira@80.30.101.206) (Ping timeout: 272 seconds)
2020-10-08 13:54:04 <cohn> :D
2020-10-08 13:56:02 jneira_ joins (~jneira@118.red-176-83-71.dynamicip.rima-tde.net)
2020-10-08 13:57:22 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
2020-10-08 13:57:28 × shatriff quits (~vitaliish@88.155.187.71) (Remote host closed the connection)
2020-10-08 13:57:54 <cohn> dminuoso: I can't build the package the author published for the book: https://hackage.haskell.org/package/parconc-examples
2020-10-08 13:58:09 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
2020-10-08 13:58:19 <cohn> though it seems like a problem with a 3rd party package and not the parconc-examples package
2020-10-08 13:58:55 <dminuoso> Do you get some particular error message?
2020-10-08 13:58:57 hackage boilerplate 0.0.2 - Generate Haskell boilerplate. https://hackage.haskell.org/package/boilerplate-0.0.2 (tseenshe)
2020-10-08 13:59:04 <cohn> I get this: https://pastebin.com/gZpSC8kv
2020-10-08 14:00:36 <cohn> using cabal to build seems to pinpoint the problem: https://pastebin.com/vBuc4FrW

All times are in UTC.