From: Roberto Ostinelli <robe...@widetag.com>
Date: Mon, 24 Sep 2012 21:00:00 -0700
Subject: [erlang-questions] prettypr and spec
I have this code:
%%%%%%%%%%%%%%%%%%%%%%%%
-spec hello() -> string().
-spec goodbye() -> string().
-spec greetings(Text::string()) -> string().
-ifdef(TEST).
simple_test() ->
greetings_test_() ->
-endif.
when i convert it using this:
%%%%%%%%%%%%%%%%%%%%%%%%
I get:
%%%%%%%%%%%%%%%%%%%%%%%%
-export([hello/0, goodbye/0, greetings/1]).
-spec({{hello, 0},
hello() -> greetings("hello").
-spec({{goodbye, 0},
goodbye() -> greetings("goodbye").
-spec({{greetings, 1},
greetings(Text) ->
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
simple_test() ->
greetings_test_() ->
-endif.
What happens to spec? What is the best way to use an erlang auto-formatter?
Any input welcome.
r.
_______________________________________________
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||