Logs: freenode/#haskell
| 2020-11-16 20:28:44 | × | ggole quits (~ggole@2001:8003:8119:7200:a813:5a33:e96f:8fc6) (Quit: Leaving) |
| 2020-11-16 20:28:55 | <dminuoso> | But.. I just stumbled over a very convincing example of dfeuer that suggests catchPure is really bad |
| 2020-11-16 20:28:58 | × | quarters quits (~quarters@104-0-129-162.lightspeed.irvnca.sbcglobal.net) (Changing host) |
| 2020-11-16 20:28:58 | → | quarters joins (~quarters@unaffiliated/quarters) |
| 2020-11-16 20:29:16 | <dminuoso> | (let a = a in a) `seq` error "hallo!" |
| 2020-11-16 20:29:32 | <monochrom> | Oh that one is even more sinister. |
| 2020-11-16 20:29:35 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 2020-11-16 20:29:51 | <dminuoso> | And he says that in the presence of catchPure this could *sometimes* be defined, othertimes not.. |
| 2020-11-16 20:29:58 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 2020-11-16 20:30:15 | <dolio> | Yeah, because GHC also assumes that 'pure exceptions' are equal to non-termination. |
| 2020-11-16 20:30:16 | <dminuoso> | (obviously, because seq makes no assumption about the ordering) |
| 2020-11-16 20:30:46 | <monochrom> | "div 1 0" is the kind that we all agree is an exception, the only contention is on language design: should this be bottom or not. |
| 2020-11-16 20:30:51 | <dminuoso> | dolio: I think its not even that, Id say it's just because `seq` does not guarantee the left side to be evaluated first. |
| 2020-11-16 20:31:05 | <dminuoso> | So its up to whatever the implementation does in the situation |
| 2020-11-16 20:31:21 | <dminuoso> | (Which could vary from place to place if the optimizer was up for it) |
| 2020-11-16 20:31:48 | <monochrom> | "a = a" is a non-termination that is clearly bottom but some compiler optimization can make it detectable, so now you're looking at fragile code optimization getting turned on or off. |
| 2020-11-16 20:32:00 | × | fendor quits (~fendor@178.115.131.226.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2020-11-16 20:32:04 | <dminuoso> | oh, or that |
| 2020-11-16 20:33:05 | → | fendor joins (~fendor@178.115.131.226.wireless.dyn.drei.com) |
| 2020-11-16 20:35:19 | <dolio> | Anyhow, if you're just using it to paper over a poorly designed API, then that's one thing. |
| 2020-11-16 20:35:52 | <dolio> | That can't really be justified as treating pure exceptions as actual control flow pervasively. |
| 2020-11-16 20:36:36 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 2020-11-16 20:36:41 | <dminuoso> | Right. It's just that edward made that comment a while ago, and it kept lingering in my head because I couldn't quite argue to myself why he was right. |
| 2020-11-16 20:36:52 | <_deepfire> | Is there a way to pass 'ghci' flags, when it's invoked via cabal repl? |
| 2020-11-16 20:37:17 | <merijn> | --repl-options |
| 2020-11-16 20:37:28 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 2020-11-16 20:37:42 | × | xff0x quits (~fox@2001:1a81:529e:a500:b7fe:796e:1fbb:7036) (Ping timeout: 260 seconds) |
| 2020-11-16 20:37:56 | → | boxscape joins (86ab2c1f@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.31) |
| 2020-11-16 20:38:16 | <dminuoso> | But this last example is motivating enough to me. An example of how/why `catchPure` could have a bad impact on my quality of life |
| 2020-11-16 20:38:21 | → | xff0x joins (~fox@2001:1a81:529e:a500:7f56:5167:60df:e24a) |
| 2020-11-16 20:38:40 | <dolio> | Yeah, just `let a = a in a` can get you unpredictable results. |
| 2020-11-16 20:38:48 | <dminuoso> | Right |
| 2020-11-16 20:39:12 | <dminuoso> | Having fallen prey to not respecting the unsafeness of unsafePerformIO once makes me appreciate being careful to do things in pure code you're not supposed to. |
| 2020-11-16 20:40:06 | <_deepfire> | merijn: I'm using cabal 3.0, but cabal repl TARGET -O0 --repl-options=-ghci-script=.ghci.local -- doesn't have effect |
| 2020-11-16 20:40:09 | × | thc202 quits (~thc202@unaffiliated/thc202) (Quit: thc202) |
| 2020-11-16 20:40:43 | <dminuoso> | monochrom, dolio, edwardk: Thank you all for your insights and arguments. |
| 2020-11-16 20:40:57 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2020-11-16 20:41:12 | <merijn> | _deepfire: Maybe "cabal repl" does something else that renders -ghci-script in effective |
| 2020-11-16 20:42:00 | <_deepfire> | merijn: thank you, nevertheless -- I've missed that option in the long list of cabal's options.. : -) |
| 2020-11-16 20:42:26 | × | luke quits (~luke@bitnomial/staff/luke) (Quit: sleep) |
| 2020-11-16 20:42:27 | <merijn> | _deepfire: I know that because the original way was using --ghc-options and I broke that :p |
| 2020-11-16 20:43:01 | <_deepfire> | merijn: Oh, yes, I've tried --ghc-options and --ghci-options (which is logical, but doesn't parse..) |
| 2020-11-16 20:43:47 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2020-11-16 20:47:41 | <monochrom> | Hey --repl-option=-fdefer-type-errors solves my problem, it doesn't [re-]build every hackaage dependency. Thanks merijn |
| 2020-11-16 20:50:03 | <monochrom> | To be fair, manually entering ":set -fdefer-type-error" isn't that bad. |
| 2020-11-16 20:50:39 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-11-16 20:50:43 | × | knupfer quits (~Thunderbi@i5E86B4E0.versanet.de) (Ping timeout: 256 seconds) |
| 2020-11-16 20:50:53 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2020-11-16 20:51:25 | × | Iceland_jack quits (~user@31.124.48.169) (Ping timeout: 240 seconds) |
| 2020-11-16 20:55:20 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-16 20:55:26 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 2020-11-16 20:57:17 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz) |
| 2020-11-16 20:57:33 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 2020-11-16 20:57:42 | <tomjaguarpaw> | c |
| 2020-11-16 20:58:09 | <koz_> | I'm in 'StateT s (Either e) a', and have a function 'f :: s -> Either e s'. Is there something similar to 'modify' that would let me pass 'f', to produce a result of type 'StateT s (Either e) ()'? |
| 2020-11-16 20:58:16 | <merijn> | monochrom: That's why I added --repl-options :p |
| 2020-11-16 20:58:42 | <monochrom> | Oh you. Many thanks and <3 <3 <3 |
| 2020-11-16 20:58:46 | <merijn> | monochrom: I added flag filtering for ghc-options so the world wouldn't be rebuild, then that broke ghci's use of ghc-options, so I added --repl-options to fix it |
| 2020-11-16 20:59:06 | <merijn> | repl-options never hit the configuration/hash and thus won't affect dependencies |
| 2020-11-16 20:59:19 | <monochrom> | Yeah, I notice that cabal build --ghc-option=-ferror-span does not affect the hash. |
| 2020-11-16 20:59:26 | × | wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 2020-11-16 20:59:30 | <merijn> | monochrom: It's a bit hacky and ad hoc atm |
| 2020-11-16 20:59:30 | → | wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-11-16 20:59:57 | <merijn> | It makes for an impressive "power of monoids" showcase, though ;) |
| 2020-11-16 21:00:01 | × | Frost quits (~Frost@185.163.110.116) () |
| 2020-11-16 21:00:09 | <monochrom> | That one I understand. I am thankful for the dirty but necessary work. |
| 2020-11-16 21:01:00 | <merijn> | monochrom: If you notice something rebuilding that you think shouldn't you should make a Cabal issue and tag me in it |
| 2020-11-16 21:01:08 | → | ystael joins (~ystael@160.sub-174-242-87.myvzw.com) |
| 2020-11-16 21:01:08 | <merijn> | monochrom: https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Simple/Program/GHC.hs#L49-L304 ;) |
| 2020-11-16 21:01:41 | <monochrom> | Oh, the only current one that affects me is https://github.com/haskell/cabal/issues/6906 |
| 2020-11-16 21:02:07 | <merijn> | I'm particularly proud of the 'from' and 'to' version checks and how they combine monoidally |
| 2020-11-16 21:02:08 | <monochrom> | because I would love so much to have ~/.cabal/config contain "ghc-options: -haddock" |
| 2020-11-16 21:02:37 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 256 seconds) |
| 2020-11-16 21:02:42 | <merijn> | And I still think we need "Monoid m => Bool -> m -> m" in base, but it's hard to find a good name for it |
| 2020-11-16 21:03:01 | <merijn> | I've been using various versions of mif, mwhen, etc. in my own code, but a good name is hard |
| 2020-11-16 21:03:30 | <int-e> | :t StateT . (((,) () <$>) .) |
| 2020-11-16 21:03:31 | <lambdabot> | Functor m => (s -> m s) -> StateT s m () |
| 2020-11-16 21:04:14 | <koz_> | int-e: Lol, that's impressively APLy. Thanks! |
| 2020-11-16 21:04:56 | <koz_> | We should add that to transformers as 'modifyInner'. |
| 2020-11-16 21:05:02 | <koz_> | Or modifyM or something. |
| 2020-11-16 21:05:18 | × | wroathe_ quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 2020-11-16 21:06:23 | × | coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 2020-11-16 21:06:29 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-11-16 21:07:08 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 2020-11-16 21:07:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-11-16 21:08:57 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-11-16 21:11:09 | <int-e> | :t \f -> traverse lift (Identity f) >>= put . runIdentity -- hmm |
| 2020-11-16 21:11:10 | <lambdabot> | (MonadTrans t, Monad m, MonadState s (t m)) => m s -> t m () |
| 2020-11-16 21:11:47 | <koz_> | That's the mtl version. :P |
| 2020-11-16 21:12:00 | hackage | phonetic-languages-examples 0.6.0.0 - A generalization of the uniqueness-periods-vector-examples functionality. https://hackage.haskell.org/package/phonetic-languages-examples-0.6.0.0 (OleksandrZhabenko) |
| 2020-11-16 21:12:50 | × | wpcarro quits (sid397589@gateway/web/irccloud.com/x-yrrbrsudnjmjbakp) (Read error: Connection reset by peer) |
| 2020-11-16 21:13:06 | → | wpcarro joins (sid397589@gateway/web/irccloud.com/x-jyvrhcovkjnuufaq) |
| 2020-11-16 21:13:10 | × | ryjm quits (sid383513@gateway/web/irccloud.com/x-aavthkgvqaggakcc) (Ping timeout: 256 seconds) |
| 2020-11-16 21:13:16 | × | natim87 quits (sid286962@gateway/web/irccloud.com/x-uifctbbgftadercs) (Read error: Connection reset by peer) |
| 2020-11-16 21:13:16 | × | ReinH__ quits (sid179972@gateway/web/irccloud.com/x-sdlypohklafvyaji) (Read error: Connection reset by peer) |
| 2020-11-16 21:13:24 | × | aristid quits (sid1599@gateway/web/irccloud.com/x-ckvrkhwfnpsjpxkc) (Read error: Connection reset by peer) |
| 2020-11-16 21:13:24 | × | bradparker quits (sid262931@gateway/web/irccloud.com/x-hcrjjmdklhbtocmc) (Read error: Connection reset by peer) |
| 2020-11-16 21:13:27 | → | natim87 joins (sid286962@gateway/web/irccloud.com/x-mexmpkxgonbwfktv) |
| 2020-11-16 21:13:33 | × | Cir0X quits (sid221743@gateway/web/irccloud.com/x-ouxxoxkrtirtgzgf) (Read error: Connection reset by peer) |
| 2020-11-16 21:13:35 | → | aristid joins (sid1599@gateway/web/irccloud.com/x-ieumvqzkylmookgw) |
All times are in UTC.