Newest at the top
2024-12-24 00:12:41 +0100 | <hellwolf> | still feel herculean, but now that I wrote couple of big TH code, it feels rather mechanical |
2024-12-24 00:11:40 +0100 | <hellwolf> | and thanks for your hint using case of, the TH code is actually quite easy, I have it done: https://play.haskell.org/saved/Hdf3hnIp |
2024-12-24 00:11:40 +0100 | <hellwolf> | ski, show instance is actually "correct", I am sticking a weird domain where U256 means 256 bits. |
2024-12-24 00:10:49 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2024-12-24 00:09:20 +0100 | esph | (~weechat@user/esph) (Ping timeout: 252 seconds) |
2024-12-24 00:06:37 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-24 00:06:25 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) ChaiTRex |
2024-12-24 00:06:18 +0100 | califax | (~califax@user/califx) califx |
2024-12-24 00:06:11 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) chexum |
2024-12-24 00:06:01 +0100 | califax | (~califax@user/califx) (Read error: Connection reset by peer) |
2024-12-24 00:05:56 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2024-12-24 00:05:55 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2024-12-24 00:05:25 +0100 | son0p | (~ff@186.121.98.118) (Ping timeout: 252 seconds) |
2024-12-23 23:59:50 +0100 | Sgeo | (~Sgeo@user/sgeo) Sgeo |
2024-12-23 23:58:00 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2024-12-23 23:57:45 +0100 | comonad | (~comonad@p200300d0270bcb00d2bd35ff80c069c9.dip0.t-ipconnect.de) |
2024-12-23 23:56:38 +0100 | rekahsoft | (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca) rekahsoft |
2024-12-23 23:56:14 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-12-23 23:54:26 +0100 | rekahsoft | (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca) (Read error: Connection reset by peer) |
2024-12-23 23:54:24 +0100 | gmg | (~user@user/gehmehgeh) gehmehgeh |
2024-12-23 23:52:32 +0100 | cyanteeth | (~cyanteeth@user/cyanteeth) (Quit: cyanteeth) |
2024-12-23 23:52:24 +0100 | gmg | (~user@user/gehmehgeh) (Ping timeout: 264 seconds) |
2024-12-23 23:51:14 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 23:50:15 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 260 seconds) |
2024-12-23 23:49:08 +0100 | Sgeo | (~Sgeo@user/sgeo) Sgeo |
2024-12-23 23:48:49 +0100 | <hellwolf> | (or easier to think about, code wise is probably similar) |
2024-12-23 23:48:26 +0100 | <hellwolf> | An array of TH.match is definite easier to write :p |
2024-12-23 23:47:44 +0100 | <hellwolf> | LamE [VarP n_0] (CaseE (VarE n_0) [Match (LitP (IntegerL 1)) (NormalB (AppE (ConE GHC.Internal.Maybe.Just) (AppTypeE (VarE Ghci4.f) (LitT (NumTyLit 1))))) [],Match (LitP (IntegerL 2)) (NormalB (AppE (ConE GHC.Internal.Maybe.Just) (AppTypeE (VarE Ghci4.f) (LitT (NumTyLit 2))))) [],Match WildP (NormalB (ConE GHC.Internal.Maybe.Nothing)) []]) |
2024-12-23 23:47:44 +0100 | <hellwolf> | λ [e| \n -> case n of 1 -> Just (f @1); 2 -> Just (f @2); _ -> Nothing; |] |
2024-12-23 23:46:36 +0100 | <hellwolf> | at this point, I am just practicing TH. |
2024-12-23 23:46:19 +0100 | <hellwolf> | right, I could use case, write 32 of them... I was looking into how to write if else chain in TH, but probably the cases are easier to write |
2024-12-23 23:45:28 +0100 | xff0x | (~xff0x@p3704193-ipxg12201sapodori.hokkaido.ocn.ne.jp) |
2024-12-23 23:40:56 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 264 seconds) |
2024-12-23 23:40:46 +0100 | sqourge | (~sqourge47@user/sqourge) (Leaving) |
2024-12-23 23:40:38 +0100 | sqourge | (~sqourge47@user/sqourge) sqourge |
2024-12-23 23:39:41 +0100 | red-snail | (~red-snail@static.151.210.203.116.clients.your-server.de) red-snail |
2024-12-23 23:36:15 +0100 | red-snail | (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
2024-12-23 23:35:52 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 23:35:07 +0100 | <ski> | hellwolf : also, `Show' instance looks incorrect (at least unless you make pattern synonyms for `UINT8',`UINT16',`UINT24',`UINT32') |
2024-12-23 23:33:39 +0100 | <ski> | hellwolf : you could `case' on `n', rather than doing an `if' chain with `=='s |
2024-12-23 23:31:46 +0100 | weary-traveler | (~user@user/user363627) (Remote host closed the connection) |
2024-12-23 23:30:06 +0100 | ft | (~ft@i59F4F0F5.versanet.de) ft |
2024-12-23 23:24:50 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2024-12-23 23:24:11 +0100 | <hellwolf> | those are good for type level stuff, but not when you need to deal with term level stuff. |
2024-12-23 23:24:11 +0100 | target_i | (~target_i@user/target-i/x-6023099) (Quit: leaving) |
2024-12-23 23:23:52 +0100 | <hellwolf> | no "smarter" way using constraints and unsafe coerce Dict, etc. |
2024-12-23 23:23:03 +0100 | <hellwolf> | okay, this works https://play.haskell.org/saved/leUbXR0P but it looks like I really just need to enumerate all 32 cases, could be with TH, to bind the correct typeclass instance. |
2024-12-23 23:20:18 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-23 23:17:59 +0100 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 252 seconds) |
2024-12-23 23:14:40 +0100 | zmt00 | (~zmt00@user/zmt00) zmt00 |