Newest at the top
| 2026-04-07 12:41:40 +0000 | AlexNoo__ | (~AlexNoo@85.174.183.185) |
| 2026-04-07 12:40:56 +0000 | AlexNoo_ | (~AlexNoo@85.174.183.185) |
| 2026-04-07 12:40:11 +0000 | AlexNoo | (~AlexNoo@85.174.183.185) |
| 2026-04-07 12:37:35 +0000 | <lambdabot> | (,) n . lines |
| 2026-04-07 12:37:35 +0000 | <ski> | @pl \xs -> (n,lines xs) |
| 2026-04-07 12:27:53 +0000 | Guest64 | (~Guest64@p200300d91f49802b2096670a08c81fa7.dip0.t-ipconnect.de) |
| 2026-04-07 12:24:14 +0000 | ncf- | (~n@monade.li) (Quit: Fairfarren.) |
| 2026-04-07 12:22:17 +0000 | Igloo | (~ian@81.2.99.210) |
| 2026-04-07 12:22:04 +0000 | <lambdabot> | f = (. lines) . (,) |
| 2026-04-07 12:22:04 +0000 | <gentauro> | @pl f n xs = (n, lines xs) |
| 2026-04-07 12:15:08 +0000 | qqq | (~qqq@185.54.23.237) |
| 2026-04-07 12:05:47 +0000 | CiaoSen | (~Jura@p549cb690.dip0.t-ipconnect.de) CiaoSen |
| 2026-04-07 12:03:59 +0000 | kilolympus | (~kilolympu@vmi1102682.contaboserver.net) kilolympus |
| 2026-04-07 11:55:53 +0000 | haritz | (~hrtz@user/haritz) haritz |
| 2026-04-07 11:55:53 +0000 | haritz | (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host) |
| 2026-04-07 11:55:53 +0000 | haritz | (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) |
| 2026-04-07 11:53:13 +0000 | kilolympus | (~kilolympu@vmi1102682.contaboserver.net) (Ping timeout: 248 seconds) |
| 2026-04-07 11:50:57 +0000 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) (Quit: Leaving...) |
| 2026-04-07 11:50:29 +0000 | somemathguy | (~somemathg@user/somemathguy) somemathguy |
| 2026-04-07 11:48:40 +0000 | nschoe | (~nschoe@2a01:e0a:8e:a190:8b07:b321:e715:9a8a) nschoe |
| 2026-04-07 11:48:23 +0000 | nschoe | (~nschoe@2a01:e0a:8e:a190:9236:54cb:b8fc:d068) (Quit: ZNC 1.8.2 - https://znc.in) |
| 2026-04-07 11:37:13 +0000 | tromp | (~textual@2001:1c00:340e:2700:8cf8:7bb7:a0e:7cfa) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-04-07 11:22:10 +0000 | arandombit | (~arandombi@user/arandombit) (Remote host closed the connection) |
| 2026-04-07 11:16:45 +0000 | xff0x | (~xff0x@ai112096.d.east.v6connect.net) |
| 2026-04-07 11:16:12 +0000 | danz29182 | (~danza@user/danza) (Remote host closed the connection) |
| 2026-04-07 11:15:31 +0000 | merijn | (~merijn@77.242.116.146) merijn |
| 2026-04-07 11:15:10 +0000 | <gentauro> | hmmmm |
| 2026-04-07 11:12:02 +0000 | <ski> | i think there's some tool to look for potential problems with partial operations (of which `undefined' is a blatant case), but i forgot the name, gentauro |
| 2026-04-07 11:11:20 +0000 | <ski> | another example. you can e.g. make a type `Expr var', for representing some kind of expressions, where `var' is a type of free variable identifiers. in that case, `Expr Void' means an expression with no (free) variables |
| 2026-04-07 11:10:54 +0000 | <gentauro> | ski: is there a way to "enforce" non-usage of `undefined` in a code base? |
| 2026-04-07 11:09:53 +0000 | <ski> | so, i changed to `endThread :: M Void' and `forkThread :: M Void -> M ()', which allowed me to confidently then remove the `undefined's |
| 2026-04-07 11:09:44 +0000 | somemathguy | (~somemathg@user/somemathguy) (Ping timeout: 244 seconds) |
| 2026-04-07 11:09:12 +0000 | <ski> | .. i did a cooperative concurrency monad thing, where i could fork off a (user-level) thread. i wanted the spawned thread to always end by invoking an operation `endThread'. at first (iirc) i used `endThread :: M a' and `forkThread :: M a -> M ()', but i had some `undefined's sprinkled through the implementation of the operations, which i wanted to remove |
| 2026-04-07 11:06:07 +0000 | <ski> | but, then you'd need to use `void' above (called `absurd' in `Data.Void'), to be able to invoke it in any context, e.g. in a branch that should abort, while another branch returns some value of some particular type (distinct from `Void') |
| 2026-04-07 11:04:53 +0000 | <lambdabot> | GHC.IO throwIO :: (HasCallStack, Exception e) => e -> IO a |
| 2026-04-07 11:04:53 +0000 | <lambdabot> | Control.Exception.Base throwIO :: (HasCallStack, Exception e) => e -> IO a |
| 2026-04-07 11:04:53 +0000 | <lambdabot> | Control.Exception throwIO :: (HasCallStack, Exception e) => e -> IO a |
| 2026-04-07 11:04:52 +0000 | <ski> | @hoogle throwIO |
| 2026-04-07 11:04:30 +0000 | <ski> | `exitWith' could have had type `ExitCode -> IO Void', would have served the same purpose, showing that it does not return (monadically) normally. the same would be the case for throwing an I/O exception |
| 2026-04-07 11:03:33 +0000 | <lambdabot> | Relude.Lifted.Exit exitWith :: MonadIO m => ExitCode -> m a |
| 2026-04-07 11:03:33 +0000 | <lambdabot> | Protolude exitWith :: ExitCode -> IO a |
| 2026-04-07 11:03:33 +0000 | <lambdabot> | System.Exit exitWith :: ExitCode -> IO a |
| 2026-04-07 11:03:32 +0000 | <ski> | @hoogle exitWith |
| 2026-04-07 11:03:24 +0000 | Googulator42 | (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu) |
| 2026-04-07 11:03:18 +0000 | Googulator83 | (~Googulato@2a01-036d-0106-496b-154a-c7fc-9f43-bd2d.pool6.digikabel.hu) (Quit: Client closed) |
| 2026-04-07 11:03:01 +0000 | <ski> | `Void' can be occasionally useful, in Haskell, if you have a parameterized type `F', and you're using it as `F Int', `F [String]' or whatever, but sometimes you don't want to allow any value of type `a' in a value of type `F a' (presumably there are values which have zero `a's), and then you can use `F Void' |
| 2026-04-07 11:01:37 +0000 | <ski> | since there's no possible values, you need to give zero branches in the `case'-`of' |
| 2026-04-07 11:01:13 +0000 | <ski> | void v = case v of {} |
| 2026-04-07 11:01:06 +0000 | <ski> | void :: Void -> a |
| 2026-04-07 11:01:05 +0000 | mniip | (mniip@libera/staff-emeritus/mniip) mniip |