Logs: freenode/#haskell
| 2020-11-26 17:20:15 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 2020-11-26 17:20:57 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 2020-11-26 17:24:01 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 2020-11-26 17:24:49 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-26 17:25:20 | <boxscape> | zfnmxt try `left @_ @(S Z)`? probably won't fix it but might give you a better error message |
| 2020-11-26 17:26:52 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 2020-11-26 17:28:10 | <zfnmxt> | boxscape: That doesn't type, does it? |
| 2020-11-26 17:28:27 | <boxscape> | zfnmxt hm, it's possible I confused something |
| 2020-11-26 17:28:49 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 2020-11-26 17:29:09 | <boxscape> | oh, yeah, I think I did |
| 2020-11-26 17:29:25 | <zfnmxt> | left only takes `a :: Type` and `b :: Type` |
| 2020-11-26 17:29:47 | <boxscape> | right, hm |
| 2020-11-26 17:29:55 | <zfnmxt> | (Maybe I should've said it doesn't kind :P) |
| 2020-11-26 17:30:10 | <boxscape> | same thing since ghc 8.0 :) |
| 2020-11-26 17:31:25 | <zfnmxt> | There's no way to have GHC print out the constraints it has generated so far during type inference or something, right? |
| 2020-11-26 17:31:39 | <zfnmxt> | I just want to see what's going on; it's all so opaque :( |
| 2020-11-26 17:31:39 | <ski> | i think you need to match on `xs' |
| 2020-11-26 17:32:18 | <boxscape> | zfnmxt if you use typed holes (i.e. replace left with _) it will show you the constraints it has in context at that point |
| 2020-11-26 17:32:48 | <boxscape> | not sure if that's quite what you're asking for but it might be |
| 2020-11-26 17:32:51 | <ski> | `Sing n' allows you to match on `n'. i think you also need something to match on `xs' |
| 2020-11-26 17:33:24 | × | matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 272 seconds) |
| 2020-11-26 17:33:28 | <zfnmxt> | ski: That worked! |
| 2020-11-26 17:34:18 | <zfnmxt> | boxscape: That's a nice trick too. |
| 2020-11-26 17:35:02 | <ski> | what worked ? |
| 2020-11-26 17:35:09 | × | knupfer quits (~Thunderbi@200116b82c0c5800c8e579458ff3eb4f.dip.versatel-1u1.de) (Read error: Connection reset by peer) |
| 2020-11-26 17:35:18 | → | knupfer joins (~Thunderbi@200116b82c0c580000cffb05d629f3fd.dip.versatel-1u1.de) |
| 2020-11-26 17:35:24 | <zfnmxt> | ski: Matching on xs. At least for the `(SS SZ)` case. |
| 2020-11-26 17:35:37 | <ski> | how did you match on it ? |
| 2020-11-26 17:35:41 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 2020-11-26 17:35:57 | → | gioyik joins (~gioyik@186.118.238.251) |
| 2020-11-26 17:36:16 | → | matta joins (~user@24-113-169-116.wavecable.com) |
| 2020-11-26 17:36:48 | <zfnmxt> | https://www.pastery.net/gfxvnp+sjqkje+xwaqdc+rzupwz+hwbecb/#hwbecb |
| 2020-11-26 17:36:52 | <ezzieyguywuf> | can I use something like runExceptT here to simplify this code, and/or avoid the nested case statements? https://dpaste.com/4WBWJH8WA |
| 2020-11-26 17:36:54 | <ski> | (also, where's `Sing' (and `fromSing') from / how's it defined ?) |
| 2020-11-26 17:37:07 | <avdb> | https://dpaste.com/9D4WFUTP5 |
| 2020-11-26 17:37:10 | <avdb> | Help please? |
| 2020-11-26 17:37:31 | <avdb> | Can't install these programs with cabal. |
| 2020-11-26 17:37:33 | <zfnmxt> | ski: Data.Singletons; that's a whole bag of worms there though. |
| 2020-11-26 17:38:01 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 2020-11-26 17:39:16 | × | knupfer quits (~Thunderbi@200116b82c0c580000cffb05d629f3fd.dip.versatel-1u1.de) (Client Quit) |
| 2020-11-26 17:39:17 | → | knupfer1 joins (~Thunderbi@i59F7FFCD.versanet.de) |
| 2020-11-26 17:41:03 | <merijn> | ezzieyguywuf: "yes" |
| 2020-11-26 17:41:07 | × | borne quits (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-11-26 17:41:09 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving) |
| 2020-11-26 17:41:29 | <merijn> | avdb: hdevtools has been dead since 2016 |
| 2020-11-26 17:41:37 | <merijn> | Actually, longer |
| 2020-11-26 17:41:40 | knupfer1 | is now known as knupfer |
| 2020-11-26 17:41:44 | → | borne joins (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) |
| 2020-11-26 17:41:48 | <merijn> | But 2016 is about the last time my personal fork of it worked |
| 2020-11-26 17:41:50 | <zfnmxt> | ski: And again that only worked for the `(SS SZ)` case :'( |
| 2020-11-26 17:42:32 | <ezzieyguywuf> | merijn: even though the two "Left"s have different types? |
| 2020-11-26 17:42:42 | <merijn> | ezzieyguywuf: oh, I hadn't seen that |
| 2020-11-26 17:42:53 | <ezzieyguywuf> | merijn: so I guess in that case no? |
| 2020-11-26 17:43:05 | <merijn> | ezzieyguywuf: Easily solved by mapping them to the same type first ;) |
| 2020-11-26 17:43:43 | × | coot quits (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 2020-11-26 17:43:51 | <ezzieyguywuf> | merijn: lol, fair enough. |
| 2020-11-26 17:44:00 | → | coot joins (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) |
| 2020-11-26 17:44:04 | <merijn> | :t Data.Bifunctor.first |
| 2020-11-26 17:44:05 | <lambdabot> | Bifunctor p => (a -> b) -> p a c -> p b c |
| 2020-11-26 17:44:34 | <ezzieyguywuf> | ?_? |
| 2020-11-26 17:44:44 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-11-26 17:44:57 | <merijn> | Either is a Bifunctor :p |
| 2020-11-26 17:45:12 | <merijn> | > :t first isDigit |
| 2020-11-26 17:45:16 | <lambdabot> | <hint>:1:1: error: <hint>:1:1: error: parse error on input ‘:’ |
| 2020-11-26 17:45:21 | <merijn> | :t first isDigit |
| 2020-11-26 17:45:23 | <lambdabot> | (Char, d) -> (Bool, d) |
| 2020-11-26 17:45:30 | <merijn> | oh, wrong first |
| 2020-11-26 17:45:38 | <merijn> | :t Data.Bifunctor.first isDigit |
| 2020-11-26 17:45:39 | <lambdabot> | Bifunctor p => p Char c -> p Bool c |
| 2020-11-26 17:45:49 | <merijn> | :t Data.Bifunctor.first isDigit (Right True) |
| 2020-11-26 17:45:51 | <lambdabot> | Either Bool Bool |
| 2020-11-26 17:46:53 | × | boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: boxscape) |
| 2020-11-26 17:48:08 | <avdb> | merijn: Another outdated package |
| 2020-11-26 17:48:51 | <geekosaur> | stuff dependent on ghc internals goes stale quickly |
| 2020-11-26 17:49:11 | × | borne quits (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) (Quit: WeeChat 2.9) |
| 2020-11-26 17:49:49 | <merijn> | Like I said, the only editor tooling that's still relevant is ghcide and haskell-language-server |
| 2020-11-26 17:49:56 | <merijn> | You can assume everything else is dead |
| 2020-11-26 17:50:40 | <ski> | ezzieyguywuf : you'll likely need to unify the exception types. something like |
| 2020-11-26 17:51:11 | <ski> | runProgram (FileName fname) = (either TextIO.putStrLn return =<<) . runExcept $ do |
| 2020-11-26 17:51:37 | <ski> | csvLines <- ExceptT (either pack id <$> parseCSVFromFile (unpack fname)) |
| 2020-11-26 17:52:30 | <ski> | csvData <- ExceptT (processRawCSV ((fmap . fmap) pack csvLines)) |
| 2020-11-26 17:52:44 | <ski> | lift (processCSV csvData) |
| 2020-11-26 17:54:04 | <ezzieyguywuf> | ski: merijn: thanks to you both, this has been helpful |
| 2020-11-26 17:54:13 | <gehmehgeh> | I've read the docs and I've been googling a bit, so please bear with me if this question has been asked before: how do you pass ghc options to *just* your own code (not the installed libs) with cabal? I'd like to do some profiling, but when I pass those options with "--ghc-options" it affects _every_ package |
| 2020-11-26 17:54:39 | <merijn> | gehmehgeh: You can specify them in the cabal file? |
| 2020-11-26 17:54:45 | <gehmehgeh> | how? where? |
| 2020-11-26 17:54:52 | <merijn> | gehmehgeh: ghc-options field? ;) |
| 2020-11-26 17:54:53 | <gehmehgeh> | "ghc-options" it says isn't a recognized option |
| 2020-11-26 17:54:56 | <gehmehgeh> | no |
| 2020-11-26 17:55:28 | <merijn> | gehmehgeh: https://github.com/merijn/paramtree/blob/master/paramtree.cabal#L33 |
| 2020-11-26 17:55:29 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 2020-11-26 17:55:49 | <merijn> | (capitalisation there shouldn't matter, that's just a personal quirk) |
| 2020-11-26 17:56:09 | <monochrom> | gHc-optionS: |
| 2020-11-26 17:57:01 | <gehmehgeh> | cabal is still claiming "Build profile: -w ghc-8.10.2 -O1" |
| 2020-11-26 17:57:08 | <gehmehgeh> | when I put a "ghc-options" line there |
| 2020-11-26 17:57:09 | <monochrom> | When I was learning this back then, I spent an afternoon reading the relevant chapter in the cabal user's guide from top to bottom. |
| 2020-11-26 17:57:28 | <merijn> | gehmehgeh: So? |
| 2020-11-26 17:57:38 | <gehmehgeh> | Shouldn't it reflect my changes? |
| 2020-11-26 17:57:40 | <merijn> | gehmehgeh: build-profile isn't a specification of options |
| 2020-11-26 17:57:45 | <gehmehgeh> | Saying "-O2" instead of.. |
All times are in UTC.