Newest at the top
2025-09-28 21:13:43 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-09-28 21:12:53 +0200 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-09-28 21:12:36 +0200 | tromp | (~textual@2001:1c00:3487:1b00:259a:5516:59ca:4e5) |
2025-09-28 21:12:19 +0200 | trickard_ | (~trickard@cpe-50-98-47-163.wireline.com.au) |
2025-09-28 21:10:13 +0200 | trickard_ | (~trickard@cpe-50-98-47-163.wireline.com.au) (Ping timeout: 264 seconds) |
2025-09-28 21:08:33 +0200 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) humasect |
2025-09-28 21:08:17 +0200 | <dcpagan> | Like a type-promoted show? |
2025-09-28 21:08:01 +0200 | <dcpagan> | How do I convert a Natural to a Symbol for displaying in a custom type error message? |
2025-09-28 21:07:30 +0200 | <dcpagan> | The only thing I'm missing is specifying the input index in the custom type error message. |
2025-09-28 21:02:31 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
2025-09-28 21:02:19 +0200 | <dcpagan> | Would this render redundant the constraint (n <= SongLength)? |
2025-09-28 21:01:43 +0200 | <dcpagan> | https://github.com/DCPagan/Exercism-Haskell/blob/73c27000e602ea2fe1718f552b717ae62a490257/house/sr… |
2025-09-28 21:01:40 +0200 | <dcpagan> | I used Data.Type.Bool.If, and there were no reduction stack overflows. |
2025-09-28 21:00:47 +0200 | caconym74787 | (~caconym@user/caconym) caconym |
2025-09-28 21:00:12 +0200 | <[exa]> | EvanR: no one used cut yet! backtrack! |
2025-09-28 21:00:03 +0200 | caconym74787 | (~caconym@user/caconym) (Quit: bye) |
2025-09-28 20:57:57 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-09-28 20:52:26 +0200 | <EvanR> | it's too late |
2025-09-28 20:52:19 +0200 | <EvanR> | warning warning prolog detected. Abort |
2025-09-28 20:49:33 +0200 | <tomsmeding> | and retain sane compile times |
2025-09-28 20:49:12 +0200 | <tomsmeding> | why exactly this choice for greediness was made I don't know; perhaps to not accidentally build a prolog |
2025-09-28 20:47:56 +0200 | <tomsmeding> | this means that the result of the greedy algorithm is always compatible with what a full backtracking algorithm would have produced |
2025-09-28 20:47:38 +0200 | <tomsmeding> | the algorithm does, however, guard against ambiguity: an instance is chosen only if it can be determined, without looking at the constraints, that it's the only one that matches |
2025-09-28 20:47:12 +0200 | <tomsmeding> | instance selection is "greedy" in haskell, no backtracking is performed |
2025-09-28 20:46:49 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
2025-09-28 20:46:04 +0200 | <tomsmeding> | but I expect the If to work |
2025-09-28 20:46:02 +0200 | <dcpagan> | I want to guard against naturals beyond a certain value. |
2025-09-28 20:45:53 +0200 | <tomsmeding> | sure, you can do that here too |
2025-09-28 20:45:42 +0200 | <dcpagan> | It's why I refactored to recursion with Maybe Natural. |
2025-09-28 20:45:24 +0200 | <dcpagan> | Last time I tried Data.Type.Bool.If, I got reduction stack overflows. |
2025-09-28 20:45:15 +0200 | <tomsmeding> | but in this case, you don't want to pattern-match, you want to have a conditional on <= |
2025-09-28 20:45:03 +0200 | <tomsmeding> | dcpagan: what is `Song' Nothing = "" ; Song' (Just n) = ...` doing if not pattern matching? |
2025-09-28 20:44:41 +0200 | <tomsmeding> | use https://hackage.haskell.org/package/base-4.19.0.0/docs/GHC-TypeLits.html#t:-60--61--63- and https://hackage.haskell.org/package/base-4.19.0.0/docs/Data-Type-Bool.html#t:If |
2025-09-28 20:44:28 +0200 | bgg | (~bgg@2a01:e0a:819:1510:ce70:2793:3b21:6fbd) (Remote host closed the connection) |
2025-09-28 20:44:25 +0200 | <dcpagan> | Can I pattern match with type families? |
2025-09-28 20:43:43 +0200 | <tomsmeding> | I don't see why you cannot just compute these things with type families |
2025-09-28 20:43:33 +0200 | <tomsmeding> | you can use type families though :) |
2025-09-28 20:43:24 +0200 | <dcpagan> | That sucks. |
2025-09-28 20:43:19 +0200 | <tomsmeding> | with instances, you don't |
2025-09-28 20:43:08 +0200 | <dcpagan> | So how do I constrain the kind variables? |
2025-09-28 20:43:05 +0200 | <tomsmeding> | haskell typeclasses are not a logic programming language, unfortunately |
2025-09-28 20:42:53 +0200 | ystael | (~ystael@user/ystael) (Ping timeout: 250 seconds) |
2025-09-28 20:42:43 +0200 | <tomsmeding> | so both your `VerseIndex n` instances apply to all n |
2025-09-28 20:42:36 +0200 | <tomsmeding> | instances are chosen/disambiguated purely based on the part to the right of the => |
2025-09-28 20:42:29 +0200 | <dcpagan> | I want to encapsulate the constraints and type errors in a separate instance. |
2025-09-28 20:41:58 +0200 | <dcpagan> | https://github.com/DCPagan/Exercism-Haskell/blob/62845d21c972414c648e69a456990a00280c3faa/house/sr… |
2025-09-28 20:41:45 +0200 | <dcpagan> | I am getting conflicting conflicting type instances from the commented block of code: |
2025-09-28 20:41:09 +0200 | fp | (~Thunderbi@2001-14ba-6e24-3000--198.rev.dnainternet.fi) (Ping timeout: 252 seconds) |
2025-09-28 20:40:07 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) (Ping timeout: 240 seconds) |
2025-09-28 20:39:55 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |