Nice job!  You're getting the hang of this! :)

On 7/2/14, 1:52 AM, Kyle Van Berendonck wrote:
Got it.

    runServerState :: Monad m => Producer ByteString m () ->
    ServerState m a -> m (Either ServerPipelineException a)
    runServerState p f = evalStateT (runErrorT f) p


On Wednesday, July 2, 2014 6:11:56 PM UTC+10, Kyle Van Berendonck wrote:

    Please completely ignore. I just realised I forgot to delete an f.

    This is a perfect example of where putting too much confidence in
    "Just Works" when you don't really know what you're doing can go
    wrong.

    On Wednesday, July 2, 2014 6:02:54 PM UTC+10, Kyle Van Berendonck
    wrote:

        Thanks,

        This works beautifully. I pulled what used to be Parser into
        Parser' (so I didn't having to use several hiding's) and now
        things compose quite nicely.

        I'm still trying to figure out how to run it. I've created the
        following:

            type Parser' a m = StateT (Producer a m ()) m
            type ServerState m = ErrorT ServerPipelineException
            (Parser' ByteString m)

            runServerState f = runStateT f (decodeGet
            getInPacketHandshake) . runErrorT


        This typechecks, but unfortunately the type for runServerState
        that ghci spits out really sucks so I can't tell if it's right.

        Thanks for all the help!

        Regards

--
You received this message because you are subscribed to the Google Groups "Haskell Pipes" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.

--
You received this message because you are subscribed to the Google Groups "Haskell 
Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to