Re: [Haskell-beginners] Monadic functions definitions for free monadic DSL

22 Oct
2016
22 Oct
'16
1:14 a.m.
I feel like if you can figure out what you actually want Accept to do, it will become clearer. Here's my attempt. Accept takes a chan, takes a procedure to loop on, a procedure to accept on, and then returns the server chan to continue the loop. I don't know if this is entirely right, but it type checks and hopefully it will give you some ideas.
As you've said Accept needs refinement. I tried writing a interpretUDP which doesn't have an accept loop but does have a bind + listen. I suspect that accept needs to move into the interpretTCP somehow and the DSL needs to be Bind or similar. Bind makes more sense as well if I wanted to write a pipes or a chan based interpreter. Thanks for the rewrite and the pointers. -Sumit
3266
Age (days ago)
3266
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sumit Raja