Newest at the top
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? |
2024-05-14 20:40:32 +0200 | <yin> | cheater: apt is a popular package manager used on debian distros. that command installs fzf from the official repositories. you should of course use the appropriate command for your system |
2024-05-14 20:40:15 +0200 | <ph88> | I don't want to hardcode my schema as haskell types, please don't suggest it |
2024-05-14 20:39:52 +0200 | <ph88> | i have a typeclass for database entities, the functions are enough to save each entity separately. But i need a function to get the relations (dependencies) from one entity to another. |
2024-05-14 20:39:46 +0200 | <mauke> | it would have to be (c :: Type -> Constraint) or something |
2024-05-14 20:39:37 +0200 | <mauke> | ah, no |
2024-05-14 20:39:32 +0200 | <cheater> | yin: what is 'apt i fzf'? |
2024-05-14 20:39:13 +0200 | <mauke> | data Box (c :: Constraint) = forall a. (c a) => MkBox a -- is that legal? |
2024-05-14 20:38:52 +0200 | <cheater> | ph88: the question is why you want that |
2024-05-14 20:38:46 +0200 | <mauke> | hmm, actually ... |
2024-05-14 20:38:39 +0200 | <cheater> | ph88: yes, that is something that is done |
2024-05-14 20:38:25 +0200 | demon-cat | (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) |
2024-05-14 20:38:17 +0200 | <ph88> | cheater, `getSomething :: forall b. Something b => a -> Maybe b` |
2024-05-14 20:38:15 +0200 | <yin> | cheater: if you're using vim and think 'apt i fzf' is adding too much complexity to your life, the :find and :vim commands are your friends |
2024-05-14 20:38:14 +0200 | <mauke> | data Box = forall a. (Animal a) => MkBox a |
2024-05-14 20:37:58 +0200 | <cheater> | this type signature tells you that the return type, a, will implement MyClass |
2024-05-14 20:37:42 +0200 | <cheater> | but what you're really trying to say is something like myfunction :: (MyClass a) => a -> SomeOtherType -> a |
2024-05-14 20:37:40 +0200 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) |
2024-05-14 20:37:16 +0200 | <ncf> | what |
2024-05-14 20:37:03 +0200 | <cheater> | ph88: you don't want those here |
2024-05-14 20:36:53 +0200 | <cheater> | ph88: you're talking about uh, factories |
2024-05-14 20:36:35 +0200 | <ncf> | sounds like existentials |
2024-05-14 20:36:24 +0200 | <cheater> | blinded by greed, i am unable to :) |
2024-05-14 20:36:22 +0200 | <ph88> | mauke, ncf rust has something similar https://doc.rust-lang.org/rust-by-example/trait/dyn.html how to explain ?? in OO languages you return a type that implements an interface |
2024-05-14 20:35:47 +0200 | <yin> | i'm sure you can see that |
2024-05-14 20:35:41 +0200 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) (Ping timeout: 240 seconds) |
2024-05-14 20:35:39 +0200 | <yin> | cheater: i think that would introduce a lot of problems to other unsuspecting users |
2024-05-14 20:35:29 +0200 | <mauke> | this feels like an XY problem |
2024-05-14 20:35:17 +0200 | <mauke> | what does that even mean |
2024-05-14 20:34:40 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2024-05-14 20:34:32 +0200 | <ph88> | mauke, 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 |
2024-05-14 20:33:42 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2024-05-14 20:32:46 +0200 | <cheater> | one line in the cabal file saves a million lines typed over the lifespan of a programmer |
2024-05-14 20:32:26 +0200 | <cheater> | yin: in the cabal file, under "test-suite test", have "hs-source-dir-prefix: MyCompany/MyProduct/MyProject/Test" |
2024-05-14 20:32:00 +0200 | <mauke> | I'm as confused as the compiler |
2024-05-14 20:31:52 +0200 | <mauke> | ph88: I can't tell what you're trying to do |
2024-05-14 20:31:49 +0200 | <ncf> | ph88: i can't guess what you're trying to do from just this |
2024-05-14 20:31:04 +0200 | target_i | (~target_i@user/target-i/x-6023099) |
2024-05-14 20:30:55 +0200 | <mauke> | https://howfuckedismydatabase.com/nosql/ |
2024-05-14 20:30:38 +0200 | <ph88> | is there another way to write code for what i'm trying to do? https://play.haskell.org/saved/d94XX4WG |