Newest at the top
2025-02-12 22:28:04 +0100 | <merijn> | tomsmeding: https://github.com/haskell/cabal/issues/5300 |
2025-02-12 22:28:02 +0100 | <merijn> | tomsmeding: I'm ahead of you by 7 years :) |
2025-02-12 22:27:59 +0100 | <tomsmeding> | justsomeguy: write down the type of `fmap`; write down the types of the arguments it gets in your expression; match the two and see what the `f` in fmap's type should be |
2025-02-12 22:27:46 +0100 | <EvanR> | I reversed the arguments, nevermind me |
2025-02-12 22:27:26 +0100 | tanky | (sid630849@id-630849.tinside.irccloud.com) |
2025-02-12 22:26:50 +0100 | <EvanR> | (fmap (fmap sum) Just) [1,2,3] => (Just . fmap sum) [1,2,3] |
2025-02-12 22:26:48 +0100 | yegorc | (~yegorc@user/yegorc) (Leaving) |
2025-02-12 22:26:47 +0100 | <tomsmeding> | merijn: I do wonder if just dropping those flags is the right design though; sure, perhaps the user didn't intend to recompile the world, but perhaps they did! |
2025-02-12 22:26:45 +0100 | <monochrom> | More than that, you need a tool that tells you what "fmap" resolves to. |
2025-02-12 22:26:43 +0100 | biberu | (~biberu@user/biberu) biberu |
2025-02-12 22:26:38 +0100 | <merijn> | tomsmeding: Yes, because cabal-install just invokes the Setup.hs parser |
2025-02-12 22:26:32 +0100 | <justsomeguy> | Maybe a haskell debugger? |
2025-02-12 22:26:12 +0100 | <justsomeguy> | Is there some tool I can put this into and see the evaluation process step-by-step? |
2025-02-12 22:25:21 +0100 | <euouae> | I misreead it, so (->) on JUst |
2025-02-12 22:25:14 +0100 | tabaqui1 | (~root@87.200.129.102) (Ping timeout: 252 seconds) |
2025-02-12 22:25:09 +0100 | <EvanR> | f x y z = ((f x) y) z |
2025-02-12 22:25:00 +0100 | <euouae> | Okay |
2025-02-12 22:24:49 +0100 | <EvanR> | euouae, no |
2025-02-12 22:24:40 +0100 | <tomsmeding> | justsomeguy: but it's `fmap f Just`, not `fmap f (Just x)`. ;) |
2025-02-12 22:24:36 +0100 | <euouae> | Isn't it fmap (fmap sum) (Just [1,2,3])? |
2025-02-12 22:23:58 +0100 | <justsomeguy> | I thought the reduction process would go like this (fmap (fmap sum) Just) [1,2,3] ==> fmap (Just (fmap sum [1,2,3])) .... I got this from substituting in (fmap sum) to the definition fmap f (Just x) = Just (f x). |
2025-02-12 22:23:45 +0100 | <EvanR> | justsomeguy, does fmap sum (Just [1,2,3]) make sense |
2025-02-12 22:22:57 +0100 | <tomsmeding> | but `cabal build` doesn't accept it |
2025-02-12 22:22:38 +0100 | <tomsmeding> | merijn: --repl-options is also a thing on Setup.hs, I see |
2025-02-12 22:21:55 +0100 | <tomsmeding> | :3 |
2025-02-12 22:21:20 +0100 | <merijn> | welp, my session if figuring out where the arguments are processed has ended, due to cat blocking my laptop xD |
2025-02-12 22:21:19 +0100 | <EvanR> | inner fmap is the Maybe functor |
2025-02-12 22:20:51 +0100 | <EvanR> | er |
2025-02-12 22:20:36 +0100 | <EvanR> | two different instances |
2025-02-12 22:20:29 +0100 | <EvanR> | outer fmap is function functor |
2025-02-12 22:20:22 +0100 | <EvanR> | the inner fmap is using the list functor |
2025-02-12 22:20:05 +0100 | <merijn> | Because I manually audited a "known-safe to toss" subset of flags and anything not there is kept |
2025-02-12 22:20:03 +0100 | <justsomeguy> | tomsmeding: Why does the outer fmap get rewritten to (.) instead of the inner fmap? |
2025-02-12 22:19:22 +0100 | <merijn> | tomsmeding: yeah, GHC only |
2025-02-12 22:19:13 +0100 | <merijn> | tomsmeding: Maybe? I dunno :p |
2025-02-12 22:19:08 +0100 | <tomsmeding> | for "ghc" specifically, right? |
2025-02-12 22:19:04 +0100 | <merijn> | euouae: yeah .local is just a bunch of overrides merged into cabal.project |
2025-02-12 22:19:03 +0100 | <EvanR> | justsomeguy, what fmap does depends on the particular instance of Functor, it may not be obvious in isolation which one you're dealing with. In this case "function" Functor |
2025-02-12 22:19:02 +0100 | <tomsmeding> | merijn: and it should say that with --PROG-option(s)? |
2025-02-12 22:18:42 +0100 | <tomsmeding> | the same goes for cabal.project.freeze, actually |
2025-02-12 22:18:39 +0100 | <merijn> | tomsmeding: tbh it should probably just mentioned the tossed flags are the set of flags not affecting build artifacts, most notably warnings |
2025-02-12 22:18:29 +0100 | <euouae> | right okay |
2025-02-12 22:18:25 +0100 | <tomsmeding> | _conventionally_, it's your local configuration that you don't push |
2025-02-12 22:18:15 +0100 | <tomsmeding> | euouae: cabal.project.local is just the same thing as cabal.project, but with a different name |
2025-02-12 22:18:12 +0100 | <euouae> | It's not project versus dependencies -- it's programmer versus upstream |
2025-02-12 22:17:58 +0100 | <euouae> | tomsmeding: the .local is a different thing isn't it? I'm going by what I know from CMake |
2025-02-12 22:17:52 +0100 | <tomsmeding> | https://tomsmeding.com/vang/Qk3nO7/.psub.kWMobRelu5 |
2025-02-12 22:17:50 +0100 | <tomsmeding> | the only thing I changed is change "no longer" to "not", and change the "you should use" instruction to "--repl-options bypasses this tossing" :p |
2025-02-12 22:17:41 +0100 | <merijn> | xD |
2025-02-12 22:17:39 +0100 | <merijn> | tomsmeding: I think I closed that already |