Newest at the top
2024-11-19 14:28:28 +0100 | <hellwolf> | Left elements are mempty, right elements are actually "foldable" |
2024-11-19 14:28:05 +0100 | <hellwolf> | it all hinges all the fact of the Foldable Either instance. |
2024-11-19 14:27:46 +0100 | <hellwolf> | that's very cute, indeed |
2024-11-19 14:19:34 +0100 | housemate | (~housemate@2a04:9dc0:0:162::5d91:d7ed) housemate |
2024-11-19 14:10:18 +0100 | housemate | (~housemate@2a04:9dc0:0:162::5d91:d7ed) (Ping timeout: 244 seconds) |
2024-11-19 14:07:17 +0100 | <Leary> | hellwolf: ^ |
2024-11-19 14:07:14 +0100 | <yahb2> | find \_ -> True :: Foldable t => t a -> Maybe a |
2024-11-19 14:07:14 +0100 | <Leary> | % :t find \_ -> True |
2024-11-19 14:07:08 +0100 | <Leary> | Oh, bit late, but I thought of something cute and silly! |
2024-11-19 14:05:37 +0100 | sand-witch | (~m-mzmz6l@vmi833741.contaboserver.net) |
2024-11-19 14:01:28 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Remote host closed the connection) |
2024-11-19 14:01:21 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2024-11-19 14:01:13 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) acidjnk |
2024-11-19 14:01:03 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
2024-11-19 14:00:27 +0100 | Digit | (~user@user/digit) Digit |
2024-11-19 13:56:49 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2024-11-19 13:56:10 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-11-19 13:56:06 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds) |
2024-11-19 13:52:13 +0100 | <hellwolf> | right. I also misread the original question, in the first place. |
2024-11-19 13:50:56 +0100 | carbolymer | (~carbolyme@dropacid.net) carbolymer |
2024-11-19 13:50:09 +0100 | <mauke> | that's just Proxy |
2024-11-19 13:49:49 +0100 | <hellwolf> | Const () a probably could work too |
2024-11-19 13:49:37 +0100 | <hellwolf> | interesting :) |
2024-11-19 13:47:11 +0100 | <bwe> | mauke: Excellent. Does my job. |
2024-11-19 13:44:39 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) alexherbo2 |
2024-11-19 13:41:48 +0100 | notzmv | (~daniel@user/notzmv) notzmv |
2024-11-19 13:40:23 +0100 | sawilagar | (~sawilagar@user/sawilagar) sawilagar |
2024-11-19 13:40:05 +0100 | sawilagar | (~sawilagar@user/sawilagar) (Remote host closed the connection) |
2024-11-19 13:36:30 +0100 | <mauke> | f :: Const Int a |
2024-11-19 13:34:55 +0100 | <Leary> | bwe: Proxies and TypeApplications are the usual options. If you're fine with being limited to GHC 9.10 or newer you can use RequiredTypeArguments instead. |
2024-11-19 13:34:47 +0100 | <haskellbridge> | or AmbiguousTypes |
2024-11-19 13:34:47 +0100 | <haskellbridge> | <hellwolf> Proxy |
2024-11-19 13:31:26 +0100 | <bwe> | I'd like to define some instances for a type class without the member of the class as argument, like `f :: Int` instead of `f :: a -> Int`. Reason: Before `a` gets constructed, I need some functions that are specific to the variant of `a`. Which approaches do you recommend? |
2024-11-19 13:31:18 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2024-11-19 13:23:29 +0100 | <mauke> | structural doctyping |
2024-11-19 13:21:34 +0100 | <dminuoso> | kuribas: Structural subtyping captures some, but not all commonly mentioned, ideas of duck typing. |
2024-11-19 13:20:41 +0100 | <dminuoso> | It mostly arises from the idea of smalltalk object orientation, where if some object behaves as if it was a duck, you can just call it a duck. |
2024-11-19 13:20:17 +0100 | <kuribas> | looks like structural subtyping to me: https://peps.python.org/pep-0544/ |
2024-11-19 13:20:04 +0100 | <dminuoso> | Well, the "if it doesn't" is not something that duck type proponents really worry about. |
2024-11-19 13:19:47 +0100 | <dminuoso> | Duck typing is nothing that you can sensibly annotate with formal names, because its a very loose abstract idea. |
2024-11-19 13:19:40 +0100 | <kuribas> | "if it works out". If it doesn't, you get an unpredictable error. |
2024-11-19 13:19:10 +0100 | <dminuoso> | In duck typing, rather than formally (via a type system) asserting that you have some sort of impedance match between componets (say the function signature with the passed arguments), if it works out at runtime, thats just as good. |
2024-11-19 13:19:06 +0100 | <kuribas> | For example anonymous records. |
2024-11-19 13:19:04 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac |
2024-11-19 13:18:44 +0100 | Digit | (~user@user/digit) (Ping timeout: 260 seconds) |
2024-11-19 13:18:42 +0100 | <kuribas> | Well, if duck typing is structural typing, then idris doesn't have it, but it's possible to emulate it with dependent types. |
2024-11-19 13:18:26 +0100 | stiell_ | (~stiell@gateway/tor-sasl/stiell) stiell |
2024-11-19 13:17:25 +0100 | <dminuoso> | Id say not really. |
2024-11-19 13:16:15 +0100 | <kuribas> | Isn't duck typing the equivalent of type classes? |
2024-11-19 13:15:48 +0100 | <dminuoso> | If it type checks like a duck, we shall make it a duck. |