[erlang-questions] json to map

Roelof Wobben r.wobben@REDACTED
Fri Aug 28 12:59:55 CEST 2015


Op 28-8-2015 om 10:31 schreef Bengt Kleberg:
> Greetings,
>
> Dialyzer is not my forte, but on line 5 you have a type (token) 
> without () after it. All other types have () as suffix.
> Could this be a problem?
>
>
> bengt
>

I do noy think so.

When I changed it to this :

-module(time_parser).

-export([]).

-type tint()   :: integer().
-type tword()  :: binary().
-type tSlash() :: binary().
-type tDash()  :: binary().
-type tComma() :: binary().


-type token() :: tInt()
              | tWord()
              | tSlash()
              | tDash()
              | tComma().


I see these error messagaes;

time_parser.erl:12: type tInt() undefined time_parser.erl:13: type 
tWord() undefined
time_parser.erl:5: Warning: type tint() is unused
time_parser.erl:6: Warning: type tword() is unused
time_parser.erl:12: Warning: type token() is unused error

Roelof




More information about the erlang-questions mailing list