[erlang-questions] type syntax question

Anthony Shipman <>
Thu Oct 30 08:41:09 CET 2008

I want to write something like

-type (deviceOpHandler() :: fun( (integer(), cstate()) -> cstate() )).

-spec (okHandler/2 :: deviceOpHandler()).

okHandler(_DeviceID, CState) ->
    sendResponse(200, "OK", CState).

but I can't find the right combination of parentheses to please the compiler.
Is this kind of specification possible?

Will there be documentation on the type and spec syntax coming soon?

Anthony Shipman                    Mamas don't let your babies 
                   grow up to be outsourced.

More information about the erlang-questions mailing list