hactors-0.0.3.1: Practical actors for Haskell.

Control.Concurrent.Actor.Examples

Contents

Synopsis

Spawning new processes

spawn_1 :: IO ()Source

Using spawn.

data Child Source

Make an initial argument type.

Constructors

Child String Process 

actor_1 :: IO ()Source

Using actor.

Communicate

dolphin :: String -> IO ()Source

There is some Erlang code from the "Learn You Some Erlang" book:

 dolphin() ->
   receive
     do_a_flip ->
       io:format("How about no?~n");
     fish ->
       io:format("So long and thanks for all the fish!~n");
     _ ->
       io:format("Heh, we're smarter than you humans.~n")
   end