Newest at the top
2024-10-26 12:25:23 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
2024-10-26 12:22:00 +0200 | mantraofpie | (~mantraofp@user/mantraofpie) mantraofpie |
2024-10-26 12:21:39 +0200 | mantraofpie | (~mantraofp@user/mantraofpie) (Remote host closed the connection) |
2024-10-26 12:21:03 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 12:15:56 +0200 | sawilagar | (~sawilagar@user/sawilagar) sawilagar |
2024-10-26 12:13:02 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2024-10-26 12:09:09 +0200 | sawilagar | (~sawilagar@user/sawilagar) (Ping timeout: 246 seconds) |
2024-10-26 12:06:10 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 12:02:02 +0200 | <haskellbridge> | <tux314159> alright then I will hold my temptation :p |
2024-10-26 11:55:29 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
2024-10-26 11:54:41 +0200 | acidjnk_new | (~acidjnk@p200300d6e72cfb93b5372362da7684c9.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2024-10-26 11:50:48 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 11:40:24 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
2024-10-26 11:36:09 +0200 | <Leary> | But it's better not to tangle with overlapping instances without a good reason. |
2024-10-26 11:35:30 +0200 | <Leary> | Well, I guess you could get away with that. |
2024-10-26 11:35:25 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 11:35:08 +0200 | <Leary> | Oh, wait, no. |
2024-10-26 11:34:41 +0200 | <Leary> | More specific than what? I thought the issue was that there /was/ no `instance MonadFail (ExceptT _ _)`. You should only have gotten an orphan instance warning. |
2024-10-26 11:30:52 +0200 | Square | (~Square@user/square) (Ping timeout: 252 seconds) |
2024-10-26 11:30:42 +0200 | <haskellbridge> | <tux314159> hooray it works :D question though, would overlappinginstances have been acceptable in that case? since ExceptT String m a is more specific that ExceptT e m a |
2024-10-26 11:27:54 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2024-10-26 11:27:08 +0200 | ash3en1 | ash3en |
2024-10-26 11:25:40 +0200 | <Leary> | Not really. Just pull through whatever ExceptT has that you need. |
2024-10-26 11:24:42 +0200 | ash3en1 | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2024-10-26 11:24:34 +0200 | ash3en | (~Thunderbi@146.70.124.222) (Ping timeout: 248 seconds) |
2024-10-26 11:24:33 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
2024-10-26 11:24:31 +0200 | <haskellbridge> | <tux314159> okay, thanks. but then this kind of runs into the dreaded n^2 instances issue with mtl doesn't it, I have to add every constraint I want to into the deriving |
2024-10-26 11:21:44 +0200 | tomsmeding | is afk for a while |
2024-10-26 11:20:58 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-10-26 11:20:44 +0200 | <tomsmeding> | so yes, the same after peeling off newtype constructors |
2024-10-26 11:20:34 +0200 | <tomsmeding> | it works when your newtype is _coercible_ (as in `Data.Coerce`) to the thing you put after `via` |
2024-10-26 11:20:09 +0200 | <haskellbridge> | <tux314159> I see, this thing works when the instances are equivalent when you peel back the newtype cosntructor? |
2024-10-26 11:20:09 +0200 | <Leary> | via ExceptT e m |
2024-10-26 11:20:04 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-26 11:19:36 +0200 | <tomsmeding> | deriving (Functor, Applicative, Monad) via (ExceptT e m a) |
2024-10-26 11:19:12 +0200 | <tomsmeding> | hm, right |
2024-10-26 11:18:54 +0200 | <tomsmeding> | (in yours, it is not because it's inside an application to 'm') |
2024-10-26 11:18:53 +0200 | <Leary> | Or refer to the transformers with DerivingVia. Which gives you better type roles too. |
2024-10-26 11:18:44 +0200 | <tomsmeding> | the 'a' that is the last type variable of 'App' must also be the last type variable in the type of the field |
2024-10-26 11:18:29 +0200 | <tomsmeding> | write your full stack, then put _that_ inside the newtype |
2024-10-26 11:18:17 +0200 | <tomsmeding> | `newtype App e a = App (ExceptT e IO a)` or something |
2024-10-26 11:18:00 +0200 | <tomsmeding> | ah, the idea is that you put the existing transformers _inside_ your newtype |
2024-10-26 11:17:41 +0200 | <haskellbridge> | <tux314159> oh I was trying `newtype ExceptT' e m a = ExceptT' { runExceptT' :: m (Either e a) } deriving (Functor, Applicative, Monad)` but I guess that's not the correct form? |
2024-10-26 11:16:55 +0200 | <tomsmeding> | https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/newtype_deriving.html#generalising-… , for reference |
2024-10-26 11:15:46 +0200 | <tomsmeding> | it indeed needs to be in the appropriate form |
2024-10-26 11:15:34 +0200 | <tomsmeding> | what is your newtype precisely? |
2024-10-26 11:15:25 +0200 | <haskellbridge> | <tux314159> "couldn't eta reduce enough" or something |
2024-10-26 11:15:12 +0200 | <tomsmeding> | deriving (Functor, Applicative, Monad) |
2024-10-26 11:15:06 +0200 | <tomsmeding> | that's what you have -XGeneralizedNewtypeDeriving for |
2024-10-26 11:14:55 +0200 | <tomsmeding> | separate implementation from interface |