Newest at the top
2024-11-19 23:35:05 +0100 | <hellwolf> | (say no more, let me try, learning something every day) |
2024-11-19 23:34:12 +0100 | <Leary> | Non-trivial TH does, so that the functions you invoke within are already compiled. |
2024-11-19 23:34:04 +0100 | evocatus | (~evocatus@2a02:a210:20c2:d600:1496:234e:dc9f:5868) (Ping timeout: 272 seconds) |
2024-11-19 23:33:51 +0100 | esph | (~weechat@user/esph) esph |
2024-11-19 23:32:24 +0100 | <hellwolf> | I never truly understood why TH has to be in a separate module. |
2024-11-19 23:32:03 +0100 | <hellwolf> | oh?! was that a dogma in that I believed? |
2024-11-19 23:31:09 +0100 | <Leary> | Oh dear. Well, in any case, TH doesn't necessarily require another module. Try `flip foldMap [1..32] \i -> [d| instance ValidINTn $(litT (numTyLit i)) |]`. |
2024-11-19 23:28:31 +0100 | michalz | (~michalz@185.246.207.193) (Remote host closed the connection) |
2024-11-19 23:24:42 +0100 | <hellwolf> | https://pastebin.com/DqJ6yay3 <-- an excerpt, as of now. I am content with this version of ValidINTn, It restricts what "n :: Nat" a valid program can use, which is what I strive for. |
2024-11-19 23:24:39 +0100 | <hellwolf> | Understood. I would still prefer per instance scope. I guess it's for the granularity of controls. |
2024-11-19 23:22:23 +0100 | <Leary> | UndecidableInstances won't bite |
2024-11-19 23:21:06 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2024-11-19 23:19:22 +0100 | <hellwolf> | oh? how so? |
2024-11-19 23:18:24 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 260 seconds) |
2024-11-19 23:16:42 +0100 | <Leary> | You should just do that anyway. |
2024-11-19 23:16:24 +0100 | <hellwolf> | at that point, I might as well use the UndecidableInstances in that small module. |
2024-11-19 23:16:02 +0100 | <hellwolf> | that'd require a separate module, right? |
2024-11-19 23:14:13 +0100 | <mauke> | TH? |
2024-11-19 23:12:52 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
2024-11-19 23:10:25 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
2024-11-19 23:09:49 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-11-19 23:08:19 +0100 | <hellwolf> | $ for i in `seq 1 32`;do echo -n "instance ValidINTn $i;";done |
2024-11-19 23:08:18 +0100 | <hellwolf> | For now I opt for a simpler one, since there are only 32 of them |
2024-11-19 23:05:46 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2024-11-19 23:05:33 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 252 seconds) |
2024-11-19 23:04:09 +0100 | <hellwolf> | https://gitlab.haskell.org/ghc/ghc/-/issues/14609 found it |
2024-11-19 22:58:59 +0100 | Alleria | (~Alleria@user/alleria) (Ping timeout: 260 seconds) |
2024-11-19 22:57:34 +0100 | ubert | (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
2024-11-19 22:57:19 +0100 | Alleria_ | (~Alleria@user/alleria) Alleria |
2024-11-19 22:53:58 +0100 | <hellwolf> | but I don't want to enable it in module-level... I wish there is a {-# UndicidableInstance #-} pragma. |
2024-11-19 22:53:36 +0100 | <hellwolf> | instance forall (n :: Nat) . (1 <= n, n <= 32) => ValidINTn n |
2024-11-19 22:53:36 +0100 | <hellwolf> | class ValidINTn (n :: Nat) |
2024-11-19 22:53:34 +0100 | <hellwolf> | I don't mind using UndicidableInstance for: |
2024-11-19 22:51:46 +0100 | <hellwolf> | The one that is invalid is "n <= 32) |
2024-11-19 22:49:25 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
2024-11-19 22:49:09 +0100 | euleritian | (~euleritia@dynamic-176-003-072-074.176.3.pool.telefonica.de) (Read error: Connection reset by peer) |
2024-11-19 22:48:50 +0100 | euleritian | (~euleritia@dynamic-176-003-072-074.176.3.pool.telefonica.de) |
2024-11-19 22:48:42 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2024-11-19 22:48:04 +0100 | cyphase | (~cyphase@user/cyphase) cyphase |
2024-11-19 22:46:11 +0100 | <dmj`> | equality constraint |
2024-11-19 22:45:43 +0100 | <dmj`> | hellwolf: you can capture the type family result with ~ in the instance context, INTx s n ~ result |
2024-11-19 22:44:59 +0100 | Everything | (~Everythin@46-133-188-81.mobile.vf-ua.net) Everything |
2024-11-19 22:44:19 +0100 | cyphase | (~cyphase@user/cyphase) (Quit: cyphase.com) |
2024-11-19 22:41:14 +0100 | <hellwolf> | this got "Illegal use of type family" error. I get that. But is there a good workaround when using Nat kind? |
2024-11-19 22:41:14 +0100 | <hellwolf> | instance (KnownBool s, KnownNat n, n <= 32) => ABIWordValue (INTx s n) where |
2024-11-19 22:36:59 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2024-11-19 22:23:15 +0100 | <evocatus> | I will have a look anyway :) |
2024-11-19 22:22:55 +0100 | <haskellbridge> | <sm> but maybe I mention them too soon |
2024-11-19 22:22:50 +0100 | stiell_ | (~stiell@gateway/tor-sasl/stiell) stiell |
2024-11-19 22:22:21 +0100 | <haskellbridge> | <sm> https://gotchamana.github.io/wiwinwlh/ and https://github.com/Gabriella439/post-rfc/blob/main/sotu.md#state-of-the-haskell-ecosystem are useful ecosystem overviews |