2024/12/25

Newest at the top

2024-12-25 18:57:29 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-25 18:44:14 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
2024-12-25 18:39:37 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-25 18:37:54 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-12-25 18:34:58 +0100 <enikar> ok, thanks
2024-12-25 18:33:11 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-25 18:33:08 +0100 <monochrom> Probably simple omission.
2024-12-25 18:32:23 +0100 <enikar> about State, I wonder why the version in monads-tf doesn't have the state function <https://hackage.haskell.org/package/monads-tf-0.3.0.1/docs/Control-Monad-State-Lazy.html>
2024-12-25 18:32:18 +0100 <Abhisek> ghci> pop = State $ \(x:xs) -> (x,xs)
2024-12-25 18:32:17 +0100 <Abhisek>   -- Defined in ‘containers-0.6.7:Utils.Containers.Internal.State’
2024-12-25 18:32:17 +0100 <Abhisek> instance [safe] Monad (State s)
2024-12-25 18:32:16 +0100 <Abhisek>   -- Defined in ‘containers-0.6.7:Utils.Containers.Internal.State’
2024-12-25 18:32:16 +0100 <Abhisek> instance [safe] Functor (State s)
2024-12-25 18:32:15 +0100 <Abhisek>   -- Defined in ‘containers-0.6.7:Utils.Containers.Internal.State’
2024-12-25 18:32:15 +0100 <Abhisek> instance [safe] Applicative (State s)
2024-12-25 18:32:15 +0100 <Abhisek>         -- Defined in ‘containers-0.6.7:Utils.Containers.Internal.State’
2024-12-25 18:32:14 +0100 <Abhisek> newtype State s a = State {runState :: s -> (s, a)}
2024-12-25 18:32:14 +0100 <Abhisek> ype State :: * -> * -> *
2024-12-25 18:32:13 +0100 <Abhisek> if I do :i State,
2024-12-25 18:31:39 +0100 <Abhisek> but it is not working
2024-12-25 18:31:29 +0100 <Abhisek> so if I do import Data.Sequence.Internal, should I be able to run LYAH state monad ?
2024-12-25 18:30:51 +0100 <Abhisek> ok
2024-12-25 18:28:50 +0100 <monochrom> LYAH was using this: https://hackage.haskell.org/package/mtl-1.1.1.1/docs/Control-Monad-State.html
2024-12-25 18:27:27 +0100 <monochrom> You are using this: https://hackage.haskell.org/package/mtl-2.3.1/docs/Control-Monad-State.html
2024-12-25 18:27:20 +0100 <Abhisek> Oh sorry, that is for Data.Sequence.Internal
2024-12-25 18:26:13 +0100 <Abhisek> Isn't https://hackage.haskell.org/package/containers-0.7/docs/src/Utils.Containers.Internal.State.html#S… the latest version ? It has "newtype State s a = State ..."
2024-12-25 18:24:33 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2024-12-25 18:24:13 +0100 <monochrom> The old versions had "newtype State s a = State ...". The new versions have "type State s = StateT s Identity". The data constructor is gone.
2024-12-25 18:23:25 +0100prasad(~Thunderbi@c-73-75-25-251.hsd1.in.comcast.net)
2024-12-25 18:22:38 +0100 <monochrom> There was a refactoring.
2024-12-25 18:22:05 +0100 <Abhisek> Why does not the State from Control.Monad.State work? It has the same signature as in the https://learnyouahaskell.github.io/for-a-few-monads-more.html. It is defined in https://hackage.haskell.org/package/containers-0.7/docs/src/Utils.Containers.Internal.State.html#S…
2024-12-25 18:19:19 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-12-25 18:12:45 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-25 18:12:12 +0100JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2024-12-25 18:10:10 +0100 <monochrom> Example: pop = state (\(x:xs) -> (x,xs))
2024-12-25 18:09:11 +0100 <Abhisek>     push a = State $ \xs -> ((),a:xs)
2024-12-25 18:09:10 +0100 <Abhisek>     push :: Int -> State Stack ()
2024-12-25 18:09:10 +0100 <Abhisek>     pop = State $ \(x:xs) -> (x,xs)
2024-12-25 18:09:09 +0100 <Abhisek>     pop :: State Stack Int
2024-12-25 18:09:09 +0100 <Abhisek>     import Control.Monad.State
2024-12-25 18:09:08 +0100 <Abhisek> I am going through https://learnyouahaskell.github.io/for-a-few-monads-more.html. The State monad is changed in the newer version of haskell, or  it seems. Can you tell me how to work out
2024-12-25 18:06:36 +0100Abhisek(~Abhisek@106.221.206.15)
2024-12-25 17:59:45 +0100notzmv(~umar@user/notzmv) notzmv
2024-12-25 17:59:45 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
2024-12-25 17:55:29 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-25 17:53:34 +0100CrunchyFlakes(~CrunchyFl@31.19.233.78)
2024-12-25 17:51:14 +0100CrunchyFlakes(~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-12-25 17:43:02 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-12-25 17:38:31 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-25 17:33:18 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)