Newest at the top
2024-10-26 00:22:10 +0200 | <Zer000> | I had a function that was defined in point-free-style and when I made everything there explicit (and extra bangs just in case) it seemed to work. |
2024-10-26 00:19:34 +0200 | <monochrom> | I'll finish when I finish. :) |
2024-10-26 00:19:07 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 00:18:43 +0200 | <geekosaur> | ("force `x` to WHNF when `x` is forced to WHNF") |
2024-10-26 00:18:15 +0200 | <geekosaur> | whereas ``x `seq` x`` is a non-sequitur |
2024-10-26 00:18:02 +0200 | vglfr | (~vglfr@c-73-250-25-113.hsd1.md.comcast.net) vglfr |
2024-10-26 00:17:58 +0200 | <geekosaur> | it should work even if x and y are the same thing (in my example) |
2024-10-26 00:15:24 +0200 | <Zer000> | thanks! |
2024-10-26 00:15:09 +0200 | <Zer000> | I see, so you just use it on a separate line in an IO context to see if everything is ok |
2024-10-26 00:14:00 +0200 | <lambdabot> | "*Exception: an exception has occurred |
2024-10-26 00:13:59 +0200 | <mauke> | > rnf [1, 2, 3, error "an exception has occurred", 5] `seq` "all good" |
2024-10-26 00:13:57 +0200 | <lambdabot> | Defined. |
2024-10-26 00:13:56 +0200 | <mauke> | @let import Control.DeepSeq |
2024-10-26 00:13:45 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds) |
2024-10-26 00:13:36 +0200 | <mauke> | :-( |
2024-10-26 00:13:32 +0200 | <lambdabot> | error: Variable not in scope: rnf :: [a1] -> a0 |
2024-10-26 00:13:31 +0200 | <mauke> | > rnf [1, 2, 3, error "an exception has occurred", 5] `seq` "all good" |
2024-10-26 00:13:26 +0200 | <lambdabot> | "all good" |
2024-10-26 00:13:25 +0200 | <mauke> | > [1, 2, 3, error "an exception has occurred", 5] `seq` "all good" |
2024-10-26 00:11:29 +0200 | <geekosaur> | or ``rnf x `seq` y`` |
2024-10-26 00:11:14 +0200 | <monochrom> | it results in exception if there is an exception. |
2024-10-26 00:09:59 +0200 | <mauke> | evaluate (rnf x) |
2024-10-26 00:09:40 +0200 | <Zer000> | oh cool |
2024-10-26 00:09:29 +0200 | <mauke> | which is mostly unrelated, but can be used instead of show |
2024-10-26 00:09:25 +0200 | <Zer000> | how do you even use rnf geekosaur? It results in () always |
2024-10-26 00:08:33 +0200 | <mauke> | btw, there is displayException |
2024-10-26 00:08:15 +0200 | <mauke> | oh, sorry. I confused myself |
2024-10-26 00:08:11 +0200 | <Zer000> | I only posted that snippet to say that tryAny from safe-exceptions can catch that negative index exception |
2024-10-26 00:07:34 +0200 | <Zer000> | and the list is built using other pure functions |
2024-10-26 00:07:28 +0200 | <Zer000> | mauke, no but that example code DOES work, my actual code does not |
2024-10-26 00:06:52 +0200 | <mauke> | the list is [1, 2, 3] |
2024-10-26 00:06:47 +0200 | <mauke> | did you look at the code? |
2024-10-26 00:06:41 +0200 | <geekosaur> | just make sure it doesn't have any bottoms or cycles |
2024-10-26 00:06:17 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
2024-10-26 00:06:10 +0200 | <geekosaur> | (that's the right module I think?) |
2024-10-26 00:05:57 +0200 | <geekosaur> | Control.Deepseq.rnf in extreme cases |
2024-10-26 00:05:44 +0200 | <Zer000> | OK |
2024-10-26 00:05:41 +0200 | <Zer000> | So I gotta go deeper? |
2024-10-26 00:05:36 +0200 | <tomsmeding> | make sure you really evaluate all you need to evaluate |
2024-10-26 00:05:24 +0200 | <tomsmeding> | Zer000: evaluating e.g. a pair to WHNF does not evaluate the components of the pair to WHNF |
2024-10-26 00:04:58 +0200 | vglfr | (~vglfr@2607:fb90:ea85:c41e:ad3:f757:9a54:48e7) (Read error: Connection reset by peer) |
2024-10-26 00:04:35 +0200 | <geekosaur> | it's a list, there's a thunk at every index 🙂 |
2024-10-26 00:01:34 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 00:01:31 +0200 | JuanDaugherty | (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
2024-10-26 00:00:33 +0200 | <Zer000> | Yeah it still crashes instead of catching my exception. I really don't know what I'm doing when it comes to this laziness stuff but I'll try to think where there could be a thunk |
2024-10-25 23:59:13 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2024-10-25 23:56:16 +0200 | Zer000 | sorry I thought I didn't post my message |
2024-10-25 23:55:52 +0200 | <Zer000> | tomsmeding, I did try to make an example to see if tryAny and evaluate would work, and this works perfectly: https://paste.tomsmeding.com/fFfjcVrg |
2024-10-25 23:55:45 +0200 | <lambdabot> | Unknown command, try @list |
2024-10-25 23:55:45 +0200 | <Zer000> | @tomsmeding, I did try to make an example to see if tryAny and evaluate would work, and this works perfectly: https://paste.tomsmeding.com/fFfjcVrg |