Skip to content

Instantly share code, notes, and snippets.

@jlouis
Created February 9, 2014 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlouis/8904365 to your computer and use it in GitHub Desktop.
Save jlouis/8904365 to your computer and use it in GitHub Desktop.
-module(trecord_test).
-compile({parse_transform, trecord}).
-export([x/0]).
-record(bar,
{baz = 3, quux}
).
-trecord({foo,
[{a, #{ default => 1, json => "a_tag" }},
{b, #{ json => "b_tag" }}
]}).
x() ->
Foo = #foo{},
Bar = #bar{},
io:format("~p~n", [[{foo, Foo}, {bar, Bar}]]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment