[Haskell-beginners] ODP: howto Pipe

Marcin Mrotek marcin.jan.mrotek at gmail.com
Sun Feb 21 09:25:31 UTC 2016

First of all, (StateT Diffractometer (Pipe Engine Geometry IO) ())
isn't the same as (Pipe Engine Geometry (StateT Diffractometer IO)
()), although I'm not sure what exactly the difference will be, as
I've never used it the former way. This might be again a question for
the Pipes mailing list.

> but now if I remove the get and put lines, I get the segfault.
Okay, I have no idea. As I see it, this shouldn't happen, as you're
getting and putting the same pointer all the time. What if you remove
the StateT altogether and just use the `dif` from the function
argument, are you still getting segfaults? Also what about writting
the function without using pipes, and using Pipes.mapM to make it a
pipe like I mentioned? (if the only Pipes operation you're doing are
an `await` in the beginning and a `yield` at the end, Pipes.mapM
covers it)

Best regards,
Marcin Mrotek

More information about the Beginners mailing list