Newest at the top
2024-05-03 22:36:40 +0200 | <tomsmeding> | EvanR: I mean, they were running against TypeRep not being inspectable so they were looking into alternatives |
2024-05-03 22:36:38 +0200 | <raehik> | hmm not too sure I can go via Generic any more. don't know how to inspect type args e.g. l and r in `data And l r` |
2024-05-03 22:36:35 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:36:01 +0200 | <EvanR> | you mean, don't go through Typeable at all |
2024-05-03 22:35:42 +0200 | <tomsmeding> | raehik: ^ |
2024-05-03 22:35:37 +0200 | <tomsmeding> | a simple type class with instances for the shapes you want to support should be enough |
2024-05-03 22:35:27 +0200 | <tomsmeding> | though I feel that you don't need generics for this |
2024-05-03 22:35:22 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:34:57 +0200 | <monochrom> | Oh, that. :( |
2024-05-03 22:34:43 +0200 | <tomsmeding> | you can do the same with generics if you specify the subset of types that you want to support |
2024-05-03 22:34:41 +0200 | <monochrom> | Although, I have been thinking of how to write a unification algorithm that works for everyone's algebraic data types, and currently I am thinking of generics. |
2024-05-03 22:34:28 +0200 | <tomsmeding> | monochrom: examining a TypeRep gives you a value-level witness for a type |
2024-05-03 22:34:28 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:33:45 +0200 | <monochrom> | But generics examines terms not types... |
2024-05-03 22:30:17 +0200 | <tomsmeding> | in that case, go right out :) |
2024-05-03 22:30:14 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:30:06 +0200 | <raehik> | I've love my generics :)) been spamming /r/haskell with them lately |
2024-05-03 22:29:30 +0200 | <tomsmeding> | good luck with generics though, it's possible to get through it but if you haven't touched GHC.Generics before, it can be a bit daunting |
2024-05-03 22:29:29 +0200 | <raehik> | hahaha I've always avoided it in my own code, had a similar feeling |
2024-05-03 22:28:56 +0200 | <tomsmeding> | typeable always feels like an "I give up" solution to me |
2024-05-03 22:28:24 +0200 | <raehik> | maybe I can do this with generics instead and avoid all this |
2024-05-03 22:26:38 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:26:10 +0200 | tri | (~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 268 seconds) |
2024-05-03 22:26:01 +0200 | <tomsmeding> | still doesn't seem like the whole set yet |
2024-05-03 22:25:24 +0200 | <tomsmeding> | raehik: if I look here https://hackage.haskell.org/package/base-4.19.0.0/docs/Type-Reflection.html#g:4 I see a bunch of pattern synonyms |
2024-05-03 22:25:06 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:22:55 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) |
2024-05-03 22:21:52 +0200 | <raehik> | thanks tomsmeding , that consumes one of the constructors I was curious about |
2024-05-03 22:21:27 +0200 | tri | (~tri@ool-18bc2e74.dyn.optonline.net) |
2024-05-03 22:21:24 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:19:58 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:19:34 +0200 | <tomsmeding> | raehik: https://hackage.haskell.org/package/base-4.19.0.0/docs/Data-Typeable.html#v:splitTyConApp gets you very far |
2024-05-03 22:17:44 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:16:52 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
2024-05-03 22:14:50 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:12:11 +0200 | causal | (~eric@50.35.88.207) |
2024-05-03 22:11:32 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:11:26 +0200 | <raehik> | I want to inspect a TypeRep for pretty printing (without going thru String). But the definition in Data.Typeable.Internal isn't exported. What do I do? Show TypeRep uses it. |
2024-05-03 22:09:42 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:06:27 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:04:34 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 22:02:12 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 22:00:22 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 21:58:36 +0200 | kupi | (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2024-05-03 21:57:02 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 21:54:46 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
2024-05-03 21:51:32 +0200 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2024-05-03 21:51:20 +0200 | target_i | (~target_i@user/target-i/x-6023099) (Quit: leaving) |
2024-05-03 21:51:17 +0200 | tri | (~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 256 seconds) |
2024-05-03 21:50:26 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |