[erlang-questions] Re: What atom name to represent a null value

David Mercer <>
Mon Mar 1 16:08:19 CET 2010

On Saturday, February 27, 2010, Masklinn wrote:

> Actually, it corresponds to the very simple Haskell type
> (Integer -> Maybe Integer). There's nothing crazy about it if it's what
> is needed by the application

I have translated the Haskell "Maybe" to Erlang as:

	-type maybe(T) :: {just, T} | nothing.

Just FYI.  I'm not disagreeing with anyone here.  Just providing color.

Monads and the monadic "do" were also implemented, with the help of a
well-placed parse transform.  I posted my code to this list, I think.  If I
didn't and in case someone wants it, I'll dig it up if you like.  Not sure
how useful it would be though, unless you're doing direct translation of
Haskell to Erlang...  Didn't get much use after I wrote it.



More information about the erlang-questions mailing list