Newest at the top
2025-01-30 20:14:02 +0100 | <[exa]> | (so they need the variable there) |
2025-01-30 20:13:53 +0100 | <[exa]> | that's the data constructor, that's ok. You need a type-level parameter though, because `fmap` and other functions are supposed to mess with that type |
2025-01-30 20:13:31 +0100 | <euouae> | Ah, so you need it to be a * -> * |
2025-01-30 20:13:23 +0100 | <euouae> | Doesn't its constructor have two arguments |
2025-01-30 20:13:08 +0100 | <[exa]> | euouae: but MyMonad has no arguments? |
2025-01-30 20:13:04 +0100 | <euouae> | something like `instance Functor (MyMonad Int) where` to begin with doesn't seem to work |
2025-01-30 20:12:42 +0100 | <euouae> | Now if I have a `data MyMonad = C Int Int`, how can I make it monadic in the second argument? How can I make it monadic in the first argument? |
2025-01-30 20:11:42 +0100 | Pozyomka | (~pyon@user/pyon) (Ping timeout: 276 seconds) |
2025-01-30 20:10:54 +0100 | Pozyomka_ | (~pyon@user/pyon) pyon |
2025-01-30 20:09:54 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-30 20:09:08 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 245 seconds) |
2025-01-30 20:05:10 +0100 | zlqrvx | (~zlqrvx@user/zlqrvx) zlqrvx |
2025-01-30 20:04:58 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-01-30 20:04:10 +0100 | <lambdabot> | Num a => a |
2025-01-30 20:04:09 +0100 | <mauke> | :t 1 + 2 * 3 |
2025-01-30 20:02:54 +0100 | <euouae> | expr + type yeah |
2025-01-30 20:02:45 +0100 | <geekosaur> | prob ably defaults to showing the type if it can't show the value |
2025-01-30 20:02:29 +0100 | <euouae> | For w/e reason my repl shows it like it does |
2025-01-30 20:02:18 +0100 | <euouae> | I see, ok. It's just a style thing, it's not related to evaluation |
2025-01-30 20:01:56 +0100 | <geekosaur> | which I would expect |
2025-01-30 20:01:51 +0100 | <geekosaur> | fwiw I tried that here and I got a "No instance for `Show (MyMonad Int)` |
2025-01-30 20:00:42 +0100 | zlqrvx | (~zlqrvx@user/zlqrvx) (Ping timeout: 252 seconds) |
2025-01-30 19:59:52 +0100 | <euouae> | mauke: Interactive-Haskell in Emacs |
2025-01-30 19:59:31 +0100 | <euouae> | ncf, oh yeah I get what you mean, thank you |
2025-01-30 19:59:24 +0100 | <mauke> | euouae: what repl? |
2025-01-30 19:59:06 +0100 | <ncf> | <euouae> Hello functions of the type Functor f => f a -> f b, what are they called? |
2025-01-30 19:58:54 +0100 | <euouae> | It's what happens when I hit enter in the repl geekosaur -- ncf not sure what you're talking about |
2025-01-30 19:58:45 +0100 | <ncf> | (assuming f, a, b are universally quantified) |
2025-01-30 19:58:33 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
2025-01-30 19:58:32 +0100 | <ncf> | euouae: they're not called anything particular since there aren't any. |
2025-01-30 19:56:33 +0100 | <geekosaur> | that doesn't look like the result of evaluation, only of typechecking? |
2025-01-30 19:51:51 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-01-30 19:50:29 +0100 | <euouae> | But why is it not C1 2? I've found that deriving Show will make it say C1 2. I've also found that deriving Eq will make it == C1 2. But is it just stylistic or is there something deeper here with regards to evaluation? |
2025-01-30 19:49:47 +0100 | <euouae> | Hello, I have this small code to define my own monad with <https://paste.tomsmeding.com/KAANvlR5>. When I try `C1 (1 :: Int) >>= (\x -> C1 $ x + 1)` I get that the result of the evaluation is `C1 (1 :: Int) >>= (\x -> C1 $ x + 1) :: MyMonad Int`. |
2025-01-30 19:49:41 +0100 | SlackCoder | (~SlackCode@remote.nationalgallery.org.ky) (Client Quit) |
2025-01-30 19:48:41 +0100 | euouae | (~euouae@user/euouae) euouae |
2025-01-30 19:48:00 +0100 | SlackCoder | (~SlackCode@remote.nationalgallery.org.ky) SlackCoder |
2025-01-30 19:44:59 +0100 | jespada | (~jespada@2800:a4:220c:6700:19eb:694f:b602:3bcb) jespada |
2025-01-30 19:43:47 +0100 | jespada | (~jespada@2800:a4:220c:6700:19eb:694f:b602:3bcb) (Quit: My Mac has gone to sleep. ZZZzzz…) |
2025-01-30 19:43:39 +0100 | Googulator | (~Googulato@2a01-036d-0106-1666-e945-fd21-b920-9aa7.pool6.digikabel.hu) |
2025-01-30 19:43:25 +0100 | Googulator | (~Googulato@2a01-036d-0106-1666-e945-fd21-b920-9aa7.pool6.digikabel.hu) (Quit: Client closed) |
2025-01-30 19:40:38 +0100 | alp | (~alp@2001:861:8ca0:4940:465c:30a2:2211:b30f) |
2025-01-30 19:35:54 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 260 seconds) |
2025-01-30 19:31:24 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 264 seconds) |
2025-01-30 19:29:29 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
2025-01-30 19:28:50 +0100 | acidjnk_new3 | (~acidjnk@p200300d6e7283f4644f622875d25c5df.dip0.t-ipconnect.de) acidjnk |
2025-01-30 19:25:54 +0100 | euleritian | (~euleritia@77.23.250.232) (Read error: Connection reset by peer) |
2025-01-30 19:23:42 +0100 | Lord_of_Life_ | Lord_of_Life |
2025-01-30 19:20:44 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) Lord_of_Life |
2025-01-30 19:20:37 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 248 seconds) |