Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 627 628 629 630 631 632 633 634 635 636 637 .. 5022
502,152 events total
2020-10-14 07:36:51 <dminuoso> @undo [x^2 | x <- [1..], mod x 2 == 1]
2020-10-14 07:36:51 <lambdabot> concatMap (\ x -> if mod x 2 == 1 then [x ^ 2] else []) [1 ..]
2020-10-14 07:36:57 <dminuoso> take 10 (concatMap (\ x -> if mod x 2 == 1 then [x ^ 2] else []) [1 ..])
2020-10-14 07:37:00 Techcable joins (znc@irc.techcable.net)
2020-10-14 07:37:37 <dminuoso> At least semantically. You could try `-ddump-ds-preopt` to see how exactly GHC will desugar it, but the thing is GHC does not desugar into Haskell, but rather straight into core.
2020-10-14 07:37:50 <dminuoso> (Because -ddump-ds will run some preliminary simplifier passes)
2020-10-14 07:38:37 <joel135> I think @undo is the sort of thing I was looking for, if it were complete.
2020-10-14 07:38:38 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-10-14 07:39:14 <dminuoso> You could make an issue about it https://github.com/lambdabot/lambdabot
2020-10-14 07:39:52 <joel135> @undo do {a <- [1,2,3]; b <- [4,5,6]; return (a,b)}
2020-10-14 07:39:52 <lambdabot> [1, 2, 3] >>= \ a -> [4, 5, 6] >>= \ b -> return (a, b)
2020-10-14 07:39:53 <tomjaguarpaw> I'm so confused why cabal says the following when I do have both a packagename.cabal and cabal.project file
2020-10-14 07:39:56 <tomjaguarpaw> Warning: There are no packages or optional-packages in the project
2020-10-14 07:39:59 <tomjaguarpaw> cabal: There is no <pkgname>.cabal package file or cabal.project file.
2020-10-14 07:40:15 <dminuoso> tomjaguarpaw: What command did you invoke?
2020-10-14 07:40:19 <joel135> ok
2020-10-14 07:40:48 <dminuoso> joel135: the core translation should be fine too, it just takes a little bit of getting used to it.
2020-10-14 07:41:34 <dminuoso> joel135: https://gist.github.com/dminuoso/704f2aa9bd5d402ccb572b31e81da97e#file-gistfile1-txt-L60-L83
2020-10-14 07:41:38 <dminuoso> That's the desugared region
2020-10-14 07:42:28 <dminuoso> If you just take that snipped, and get rid of all the @ and $ stuff, it should look like regular haskell.
2020-10-14 07:43:48 <joel135> How did you highlight it?
2020-10-14 07:44:09 <dminuoso> joel135: You can click on the line numbers to the right, and then use shift to select a region.
2020-10-14 07:44:14 <tomjaguarpaw> dminuoso: cabal v2-build
2020-10-14 07:44:27 <joel135> oh, and then the url changes
2020-10-14 07:44:30 × tzh quits (~tzh@2601:448:c500:5300::d90) (Quit: zzz)
2020-10-14 07:45:15 <dminuoso> Right
2020-10-14 07:45:16 <tomjaguarpaw> cabal v2-configure also says "Warning: There are no packages or optional-packages in the project
2020-10-14 07:45:38 <dminuoso> joel135: If you reload, Ive made a comment to the gist where I just copied the selected region, and just removed all type applications (@ foo) and dictionary applications ($ bar)
2020-10-14 07:45:44 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
2020-10-14 07:45:59 <dminuoso> You can then take that, remove all the qualifiers, and then it should look like regular haskell
2020-10-14 07:46:24 <tomjaguarpaw> Oh, I know why it is. It's because cabal.project exists but doesn't have a packages: section
2020-10-14 07:46:37 <dminuoso> Core is very readable, just dont get confused by all the TyApps and dict passing. :)
2020-10-14 07:47:27 hackage effet 0.3.0.1 - An Effect System based on Type Classes https://hackage.haskell.org/package/effet-0.3.0.1 (MichaelSzvetits)
2020-10-14 07:49:38 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-14 07:49:56 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-14 07:49:57 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-14 07:49:57 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-14 07:50:30 × mirrorbird quits (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Quit: Leaving)
2020-10-14 07:53:59 chele joins (~chele@5.53.222.202)
2020-10-14 07:54:27 <joel135> thanks for writing it out
2020-10-14 07:57:17 cpressey joins (~cpressey@88.144.93.125)
2020-10-14 08:01:03 kritzefitz joins (~kritzefit@fw-front.credativ.com)
2020-10-14 08:01:51 <[exa]> is there any concept in libraries such as "succ with wrapped overflow", say derived from Enum and Bounded? basically `succ' a = if a==maxBound then minBound else succ a`
2020-10-14 08:03:28 Ariakenom joins (~Ariakenom@193.254.193.1)
2020-10-14 08:03:46 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-aprzkzvsxxeylcyp) (Quit: Connection closed for inactivity)
2020-10-14 08:04:26 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
2020-10-14 08:06:30 thc202 joins (~thc202@unaffiliated/thc202)
2020-10-14 08:06:35 × bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 265 seconds)
2020-10-14 08:08:12 mirrorbird joins (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
2020-10-14 08:09:42 bahamas joins (~lucian@unaffiliated/bahamas)
2020-10-14 08:09:45 × petersen quits (~petersen@redhat/juhp) (Remote host closed the connection)
2020-10-14 08:10:11 <joel135> I don't seem to have Control.Monad.Group. Should it be imported with "import Control.Monad.Group"?
2020-10-14 08:10:26 petersen joins (~petersen@redhat/juhp)
2020-10-14 08:12:07 <dminuoso> heh
2020-10-14 08:12:29 <dminuoso> It was removed in base-4.5.0.0 it seems
2020-10-14 08:12:39 <dminuoso> Does grouping with MonadComprehensions still desugar to mgroupWith?
2020-10-14 08:13:01 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Remote host closed the connection)
2020-10-14 08:13:34 × Volt_ quits (~Volt_@c-73-145-164-70.hsd1.mi.comcast.net) (Quit: )
2020-10-14 08:14:05 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
2020-10-14 08:14:30 <joel135> I get parse error on input ‘]’
2020-10-14 08:15:17 <joel135> [ x | x <- [1,1,2,2,3], then group by x ]
2020-10-14 08:15:17 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
2020-10-14 08:15:34 <dminuoso> % :set -XMonadComprehensions
2020-10-14 08:15:35 <yahb> dminuoso:
2020-10-14 08:15:38 <dminuoso> % [(x :: [Int]) | x <- [1,2,1,2], then group by x ] :: [[Int]]
2020-10-14 08:15:39 <yahb> dminuoso: ; <interactive>:8:49: error: parse error on input `]'
2020-10-14 08:15:43 <dminuoso> Huh indeed.
2020-10-14 08:16:21 × zacts quits (~zacts@dragora/developer/zacts) (Quit: leaving)
2020-10-14 08:16:40 × lucid_0x80 quits (~lucid_0x8@188.253.234.40) (Ping timeout: 258 seconds)
2020-10-14 08:16:50 × sujeet quits (sujeet@unaffiliated/freeboson) (Read error: Connection reset by peer)
2020-10-14 08:17:25 sujeet joins (sujeet@unaffiliated/freeboson)
2020-10-14 08:17:46 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2020-10-14 08:18:22 × MarcelineVQ quits (~anja@198.254.202.72) (Read error: Connection reset by peer)
2020-10-14 08:19:03 MarcelineVQ joins (~anja@198.254.202.72)
2020-10-14 08:20:34 <dminuoso> joel135: The wiki page is wrong
2020-10-14 08:20:37 <dminuoso> https://db.inf.uni-tuebingen.de/staticfiles/publications/haskell2011.pdf
2020-10-14 08:20:49 <dminuoso> Or..
2020-10-14 08:20:51 <dminuoso> No its not!
2020-10-14 08:20:59 <dminuoso> It seems someone broke the parser. File a bug report.
2020-10-14 08:22:03 × bliminse quits (~bliminse@host217-42-95-37.range217-42.btcentralplus.com) (Ping timeout: 256 seconds)
2020-10-14 08:22:33 bliminse joins (~bliminse@host217-42-95-37.range217-42.btcentralplus.com)
2020-10-14 08:22:52 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-14 08:24:08 <joel135> ok
2020-10-14 08:24:30 mav1 joins (~mav@ipservice-092-217-043-250.092.217.pools.vodafone-ip.de)
2020-10-14 08:24:48 × xyggos quits (uid216035@gateway/web/irccloud.com/x-xzyfcimlxufybwap) (Quit: Connection closed for inactivity)
2020-10-14 08:25:05 LKoen joins (~LKoen@81.255.219.130)
2020-10-14 08:25:27 × taurux quits (~taurux@net-93-146-46-96.cust.vodafonedsl.it) (Ping timeout: 256 seconds)
2020-10-14 08:26:14 <joel135> But is it just the parser, if mgroupWith doesn't exist?
2020-10-14 08:26:34 taurux joins (~taurux@net-188-152-78-91.cust.dsl.teletu.it)
2020-10-14 08:27:25 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-10-14 08:30:20 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
2020-10-14 08:30:42 oisdk joins (~oisdk@2001:bb6:3329:d100:a9e4:32d1:231e:16a5)
2020-10-14 08:31:14 × taurux quits (~taurux@net-188-152-78-91.cust.dsl.teletu.it) (Ping timeout: 258 seconds)
2020-10-14 08:32:00 × Benzi-Junior quits (~BenziJuni@dsl-149-67-198.hive.is) (Read error: Connection reset by peer)
2020-10-14 08:32:23 taurux joins (~taurux@net-188-152-69-142.cust.dsl.teletu.it)
2020-10-14 08:33:28 <dminuoso> joel135: It could also be the wiki page is out of date though
2020-10-14 08:33:36 <dminuoso> The GHC manual does not mention `group by f`
2020-10-14 08:33:38 <dminuoso> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-MonadComprehensions
2020-10-14 08:33:55 <joel135> Maybe I shouldn't file a bug report?
2020-10-14 08:34:12 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)

All times are in UTC.