Newest at the top
| 2026-02-25 18:15:19 +0100 | <ski> | (it's not clear whether by `f g' you mean an expression, or a pattern, btw ..) |
| 2026-02-25 18:11:47 +0100 | <ski> | (this is not about dynamic scope) |
| 2026-02-25 18:11:34 +0100 | <ski> | no |
| 2026-02-25 18:10:37 +0100 | <haskellbridge> | <ijouw> You want (f g) to implicitly use another function named g that is in scope at use site? |
| 2026-02-25 18:10:29 +0100 | <ski> | (for the `loop' & `map' case above, `loop' doesn't explicitly bind the `f' parameter (and so must already assume `f' already comes from somewhere), so `loop' would just be in scope in the body, and not be in scope elsewhere `map' is in scope (where `f' isn't). in the `fooWith' & `foo' case, both conjuncts does bind `cfg', so both `fooWith' and `foo' makes sense here to use in a scope where `cfg' is not bound) |
| 2026-02-25 18:09:09 +0100 | sondr3 | (sondr3@2a01:7e01::f03c:92ff:fe06:7664) |
| 2026-02-25 18:08:59 +0100 | sondr3 | (sondr3@2a01:7e01::f03c:92ff:fe06:7664) (Server closed connection) |
| 2026-02-25 18:06:39 +0100 | <ski> | (issue is how to (reasonably) get both `foo' and `bar' in scope in both bodies ..) |
| 2026-02-25 18:06:08 +0100 | <ski> | to express this .. |
| 2026-02-25 18:06:01 +0100 | <ski> | bar@(barf cfg) = ..cfg..foo..bar.. |
| 2026-02-25 18:05:52 +0100 | <ski> | foo@(frob cfg) = ..cfg..foo..bar.. |
| 2026-02-25 18:05:31 +0100 | <ski> | maybe there's be some version of |
| 2026-02-25 18:04:29 +0100 | <ski> | it would be nice to be able to say something like `(frob,barf) = (\ ?cfg -> foo,\ ?cfg -> bar) where foo :: (?cfg :: ...) => ...; foo = ..?cfg..foo..bar..; bar :: (?cfg :: ...) => ...; bar = ..?cfg..foo.bar..' (having a common "config" argument in scope, over mutual recursion, avoiding repeating it in the recursive calls) |
| 2026-02-25 18:03:53 +0100 | lortabac | (~lortabac@mx1.fracta.dev) lortabac |
| 2026-02-25 18:03:39 +0100 | lortabac | (~lortabac@mx1.fracta.dev) (Server closed connection) |
| 2026-02-25 18:01:39 +0100 | misterfish | (~misterfis@84.53.85.146) (Ping timeout: 246 seconds) |
| 2026-02-25 17:59:41 +0100 | fgarcia | (~lei@user/fgarcia) (Ping timeout: 268 seconds) |
| 2026-02-25 17:58:21 +0100 | <ski> | where `let cfg = defaultCfg in foo' is a pattern that matches the input to `foo', and additionally binds `cfg' to `defaultCfg' (so that regardless of whether we use the `fooWith' or the `foo' entry point to the code, `cfg' will be in scope in the body) |
| 2026-02-25 17:57:05 +0100 | <ski> | yes. the second `@' would be the generalization of and/conjunction-pattern |
| 2026-02-25 17:56:31 +0100 | <lambdabot> | <hint>:1:32: error: Expression syntax in pattern: ?x |
| 2026-02-25 17:56:29 +0100 | <ski> | > let f :: Integer -> Integer; f ?x = ?x + 1 in f (f 3) |
| 2026-02-25 17:55:24 +0100 | EvanR | (~EvanR@user/evanr) EvanR |
| 2026-02-25 17:54:59 +0100 | EvanR | (~EvanR@user/evanr) (Server closed connection) |
| 2026-02-25 17:54:35 +0100 | <Clint> | as-pattern |
| 2026-02-25 17:53:36 +0100 | uli-fem | (~uli-fem@118.210.1.123) (Ping timeout: 246 seconds) |
| 2026-02-25 17:53:27 +0100 | <EvanR> | what's this @ sign |
| 2026-02-25 17:52:43 +0100 | st_aldini | (~Thunderbi@136.48.46.187) (Quit: st_aldini) |
| 2026-02-25 17:51:16 +0100 | <ski> | (fooWith cfg)@(let cfg = defaultCfg in foo) ... = ... -- or this |
| 2026-02-25 17:49:55 +0100 | <ski> | loop@(map f) (x:xs) = f x : loop xs -- would be nice to be able to do this kind of thing |
| 2026-02-25 17:49:22 +0100 | uli-fem | (~uli-fem@118.210.1.123) |
| 2026-02-25 17:49:10 +0100 | messewix | (~jmc@user/messewix) messewix |
| 2026-02-25 17:48:54 +0100 | <lambdabot> | Can't happen |
| 2026-02-25 17:48:54 +0100 | <ski> | @ghc |
| 2026-02-25 17:43:02 +0100 | housemate | (~housemate@202.7.248.67) housemate |
| 2026-02-25 17:33:36 +0100 | uli-fem | (~uli-fem@118.210.1.123) (Ping timeout: 255 seconds) |
| 2026-02-25 17:31:28 +0100 | housemate | (~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/) |
| 2026-02-25 17:30:11 +0100 | <EvanR> | feel free to pile on other examples |
| 2026-02-25 17:29:44 +0100 | <EvanR> | if chromoblob goes to the oracle and comes back with a ghc which chooses the optimal implementation for String at each point in the program, and optimal conversion points. Then I want it to also work on cartesian vs polar complex numbers please |
| 2026-02-25 17:26:19 +0100 | uli-fem | (~uli-fem@118.210.1.123) |
| 2026-02-25 17:25:15 +0100 | Maxdamantus | (~Maxdamant@user/maxdamantus) Maxdamantus |
| 2026-02-25 17:24:59 +0100 | Maxdamantus | (~Maxdamant@user/maxdamantus) (Server closed connection) |
| 2026-02-25 17:16:37 +0100 | prdak | (~Thunderbi@user/prdak) prdak |
| 2026-02-25 17:16:17 +0100 | prdak | (~Thunderbi@user/prdak) (Remote host closed the connection) |
| 2026-02-25 17:13:24 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
| 2026-02-25 17:13:16 +0100 | prdak | (~Thunderbi@user/prdak) prdak |
| 2026-02-25 17:12:58 +0100 | prdak | (~Thunderbi@user/prdak) (Read error: Connection reset by peer) |
| 2026-02-25 17:11:57 +0100 | prdak | (~Thunderbi@user/prdak) prdak |
| 2026-02-25 17:07:28 +0100 | Psychotic1__ | (~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Remote host closed the connection) |
| 2026-02-25 17:05:39 +0100 | Psychotic1_ | (~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Ping timeout: 246 seconds) |
| 2026-02-25 17:04:15 +0100 | Psychotic1 | (~Psychotic@2600:1007:b0aa:7216:54da:2a86:8a54:a2c4) (Ping timeout: 246 seconds) |