[erlang-questions] erl_parse vs erl_syntax difference

Karlo Kuna kuna.prime@REDACTED
Wed Sep 5 01:02:21 CEST 2018


for example if we parse form (i'm omitting scan pass here)
"-type a() :: tuple()."  we
get {ok,{attribute,1,type,{a,{type,1,tuple,any},[]}}}

interesting part here is:
      {type,1,tuple,any}
as far as i can see there no method how to construct valid tuple or map
type annotations using erl_syntax. Specifically  if one construct type
annotation for tuple and use erl_syntax:revert/1 one gets:
      {type,1,tuple,any_size}

any_size =/= any

is this a bug??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180905/c7ab525a/attachment.htm>


More information about the erlang-questions mailing list