2025/03/25

Newest at the top

2025-03-25 14:51:29 +0100kh0d(~kh0d@212.200.247.164) (Remote host closed the connection)
2025-03-25 14:51:24 +0100 <EvanR> monad instance
2025-03-25 14:51:19 +0100 <EvanR> implementing s -> [] (a, s)
2025-03-25 14:50:07 +0100 <EvanR> the more stuff the compiler accepts the less able it is to notice your nonsense
2025-03-25 14:49:35 +0100 <EvanR> gotta love it
2025-03-25 14:49:19 +0100 <EvanR> oh [] was a datakind I guess
2025-03-25 14:49:04 +0100ash3en(~Thunderbi@89.56.182.235) ash3en
2025-03-25 14:48:14 +0100ash3en(~Thunderbi@89.56.182.235) (Quit: ash3en)
2025-03-25 14:48:06 +0100 <tomsmeding> the "inner monad" is always the penultimate argument, to fit the kind of MonadTrans
2025-03-25 14:47:38 +0100 <lambdabot> s -> [] (a, s)
2025-03-25 14:47:38 +0100 <tomsmeding> @unmtl StateT s [] a
2025-03-25 14:45:57 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 268 seconds)
2025-03-25 14:45:56 +0100kh0d(~kh0d@212.200.247.164)
2025-03-25 14:44:59 +0100 <EvanR> [] is the wrong kind
2025-03-25 14:44:43 +0100 <EvanR> no
2025-03-25 14:44:25 +0100 <EvanR> [s -> (a, [])] ?
2025-03-25 14:44:15 +0100 <EvanR> squint
2025-03-25 14:43:55 +0100 <lambdabot> [] -> s (a, [])
2025-03-25 14:43:55 +0100 <EvanR> @unmtl StateT [] s a
2025-03-25 14:43:50 +0100 <lambdabot> err: `StateT [] a' is not applied to enough arguments, giving `/\A. [] -> a (A, [])'
2025-03-25 14:43:50 +0100 <EvanR> @unmtl StateT [] a
2025-03-25 14:43:23 +0100 <lambdabot> s -> ([] a, s)
2025-03-25 14:43:23 +0100 <EvanR> @unmtl ListT (State s) a
2025-03-25 14:43:10 +0100cheater(~Username@user/cheater) cheater
2025-03-25 14:43:03 +0100kh0d(~kh0d@212.200.247.164) (Ping timeout: 244 seconds)
2025-03-25 14:41:59 +0100 <tomsmeding> the run function of what?
2025-03-25 14:41:29 +0100 <EvanR> uncons :: ListT m a -> m (Maybe (a, ListT m a))
2025-03-25 14:41:19 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-03-25 14:40:52 +0100 <EvanR> what is the run function
2025-03-25 14:39:23 +0100 <tomsmeding> to understand what's going on there, note that `data KindOfAList a = KindOfAList (Maybe (a, KindOfAList a))` is essentially equivalent to [a]
2025-03-25 14:39:20 +0100 <kuribas> mixing backtracking with IO also is dangerous...
2025-03-25 14:38:51 +0100Shsl-Junko-POSER(~Shsl-Junk@50.235.208.178)
2025-03-25 14:38:49 +0100 <tomsmeding> https://hackage.haskell.org/package/list-t-1.0.5.7/docs/ListT.html
2025-03-25 14:38:38 +0100 <tomsmeding> you can write what you just did, but it doesn't work well
2025-03-25 14:38:22 +0100kh0d(~kh0d@212.200.247.164) kh0d
2025-03-25 14:38:21 +0100 <tomsmeding> actually, the proper monad transformer for [a] is rather tricky
2025-03-25 14:38:07 +0100 <EvanR> what did I just do
2025-03-25 14:37:50 +0100kh0d(~kh0d@212.200.247.164) (Remote host closed the connection)
2025-03-25 14:37:46 +0100 <EvanR> s -> [IO (a, s)]
2025-03-25 14:37:17 +0100 <EvanR> so you're saying you can combine this monad with others
2025-03-25 14:35:41 +0100kuribas(~user@ip-188-118-57-242.reverse.destiny.be) kuribas
2025-03-25 14:35:19 +0100kuribas`(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3))
2025-03-25 14:35:10 +0100 <EvanR> new NonDeterm a = NonDeterm { getPossibilities :: [a] }
2025-03-25 14:35:05 +0100bliminse(~bliminse@user/bliminse) bliminse
2025-03-25 14:34:51 +0100 <EvanR> gratuitous newtype
2025-03-25 14:34:29 +0100 <EvanR> lol
2025-03-25 14:34:11 +0100 <tomsmeding> just ignore the GHC warning
2025-03-25 14:34:08 +0100 <tomsmeding> EvanR: if you put the 'empty' pattern-matching case last, i.e. after the Cons case, then it does work
2025-03-25 14:32:32 +0100 <EvanR> probably for the best
2025-03-25 14:32:24 +0100 <tomsmeding> ah, no