Newest at the top
2024-05-14 21:28:07 +0200 | <ski> | a value of type `Cxt *> T' is a value that bundles evidence for a constraint `Cxt' together with a value `T', allowing the user/caller/consumer to both use the evidence, as well as the value |
2024-05-14 21:27:01 +0200 | <ski> | a value of type `Cxt => T' is a value such that, if the user/caller/consumer provides evidence of the constraint `Cxt' to it, it will give you back a value of type `T' |
2024-05-14 21:26:04 +0200 | <ph88> | i'm interested in those details :p |
2024-05-14 21:25:46 +0200 | <ski> | (before getting into the details of how to actually effect the desired semantics with current-day Haskell) |
2024-05-14 21:25:16 +0200 | <ski> | it's (imho) a useful way to talk about these matters |
2024-05-14 21:25:00 +0200 | <EvanR> | it's skiskell |
2024-05-14 21:24:59 +0200 | <ski> | it's not in the manual, it's pseudo-Haskell |
2024-05-14 21:24:47 +0200 | <ph88> | can't find it in the manual |
2024-05-14 21:24:42 +0200 | <ski> | ("provide", as opposed to "expect") |
2024-05-14 21:24:13 +0200 | <ski> | "provide this constraint along with a value of this other type" |
2024-05-14 21:23:53 +0200 | <ph88> | ski, what does *> mean in a type ? |
2024-05-14 21:22:05 +0200 | <ski> | ph88 : "i'm trying to have a function that given a data which implements a typeclass can return another data that implements the same type class" -- sounds like you want `getSomething :: a -> Maybe (exists b. Something b *> b)', not `getSomething :: forall b. Something b => a -> Maybe b', then |
2024-05-14 21:18:24 +0200 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2024-05-14 21:17:02 +0200 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 260 seconds) |
2024-05-14 21:16:53 +0200 | greenflower | (~greenflow@103.191.25.63) |
2024-05-14 21:07:46 +0200 | <mauke> | blame the original rust code :-) |
2024-05-14 21:07:32 +0200 | <yin> | have you considered 0.37 ? |
2024-05-14 21:06:34 +0200 | <yin> | mauke: 0.234 doesn't seem random at all |
2024-05-14 21:01:34 +0200 | <raehik> | understandable |
2024-05-14 21:01:24 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
2024-05-14 21:01:23 +0200 | <raehik> | > :k! TypeError (Text "test") |
2024-05-14 21:00:46 +0200 | <raehik> | do type families trip up TypeError printing for `:k!`...? |
2024-05-14 20:55:31 +0200 | <mauke> | if you want to go mad with power, there is also https://hackage.haskell.org/package/base-4.19.1.0/docs/Data-Dynamic.html |
2024-05-14 20:53:55 +0200 | <ph88> | mauke, Thanks ! i will try this |
2024-05-14 20:51:43 +0200 | <cheater> | yes, i agree on that |
2024-05-14 20:51:31 +0200 | <yin> | i don't think i can help you |
2024-05-14 20:50:58 +0200 | <cheater> | not at all |
2024-05-14 20:50:50 +0200 | <yin> | cheater: i feel like you're being purposefuly obtuse. this might be a good place to end the conversation |
2024-05-14 20:50:47 +0200 | <cheater> | vim |
2024-05-14 20:50:19 +0200 | <yin> | cheater: are you using vim or neovim? |
2024-05-14 20:50:02 +0200 | <cheater> | cabal files already have lots of such advanced flags. there's no reason to turn our language into the Fischer Price version of itself just because of some conceived notion of "this might be difficult to explain to a newbie" |
2024-05-14 20:49:44 +0200 | <mauke> | ph88: https://play.haskell.org/saved/9CUzFQLl |
2024-05-14 20:49:20 +0200 | <yin> | anyways, it's one of many possible solutions for your problem. i don't think an ecosystem's consistency should suffer by trying to solve problems beyond its scope |
2024-05-14 20:49:19 +0200 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) |
2024-05-14 20:48:14 +0200 | <ph88> | ncf, i think i need existential types. I only used them once before, still not entirely sure how they work |
2024-05-14 20:47:59 +0200 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) (Ping timeout: 264 seconds) |
2024-05-14 20:47:33 +0200 | <ncf> | ph88: that describes an existential type, but i can't tell if it's what you actually need |
2024-05-14 20:47:12 +0200 | <yin> | cheater: now see it from my side, the side of a person who is trying to help another person solve a problem: you can add a field to a cabal file that will cause inumerous headaches for everyone when normal paths don't work until you find that there's some obscure line hidden in the middle of a project's cabal OR type fzf instead of cd (i actually have it aliased to just 'z') |
2024-05-14 20:46:55 +0200 | <ph88> | ncf, similar to this https://stackoverflow.com/questions/5699427/what-does-it-mean-for-a-function-to-return-an-interface i don't know how to explain it better. It's an opaque piece of data other than you know what interface methods you can call on it. In haskell it's an opaque piece of data other than you know which typeclass methods you can call on it |
2024-05-14 20:44:41 +0200 | <raehik> | How can I get GHCi to pretty print my TypeErrors on :k! invocations ? It just prints `= (TypeError ...)` :( |
2024-05-14 20:43:34 +0200 | <ncf> | ph88: i still have no idea what you're trying to do |
2024-05-14 20:43:03 +0200 | <cheater> | yin: what i'm trying to do here is to contrast for you, on one side, typing one line into a cabal file and that's it, and on the other side, having to invoke an extra tool every single of the thousands of thousands of times you want to do something related to file paths |
2024-05-14 20:42:54 +0200 | <ph88> | data Box (c :: Type -> Constraint) = forall a. (c a) => MkBox a like this ? |
2024-05-14 20:41:54 +0200 | <yin> | no, but GADTs imply existential types i'm pretty sure |
2024-05-14 20:41:49 +0200 | <cheater> | yin: that is not the only line one has to type to use fzf for opening every single file. |
2024-05-14 20:41:48 +0200 | <ncf> | no |
2024-05-14 20:41:32 +0200 | <mauke> | I don't think so |
2024-05-14 20:41:24 +0200 | <ph88> | do i need GADT for existential types ? |
2024-05-14 20:41:01 +0200 | <mauke> | yes |
2024-05-14 20:40:58 +0200 | <ph88> | mauke, what's that, existential types? |