Skip to content

Instantly share code, notes, and snippets.

@Licenser
Created June 12, 2012 19:03
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 Licenser/2919452 to your computer and use it in GitHub Desktop.
Save Licenser/2919452 to your computer and use it in GitHub Desktop.
src/uuid.erl:none: error in parse transform 'lager_transform': {undef,
[{lager_transform,
parse_transform,
[[{attribute,1,file,
{"src/uuid.erl",1}},
{attribute,46,module,uuid},
{attribute,47,author,
'Per Andersson'},
{attribute,1,file,
{"src/uuid.hrl",1}},
{attribute,27,type,
{uuid,
{type,27,binary,[]},
[]}},
{attribute,28,type,
{uuid_string,
{type,28,string,[]},
[]}},
{attribute,29,type,
{urn,
{type,29,string,[]},
[]}},
{attribute,50,file,
{"src/uuid.erl",50}},
{attribute,51,export,
[{get_node,0},
{to_binary,1},
{to_string,1},
{to_string,2},
{to_uuid_urn,1},
{uuid1,0},
{uuid1,2},
{uuid3,2},
{uuid4,0},
{uuid5,2},
{variant,1},
{version,1},
{is_v1,1},
{is_v3,1},
{is_v4,1},
{is_v5,1},
{is_valid,1}]},
{attribute,70,spec,
{{uuid1,0},
[{type,70,'fun',
[{type,70,product,[]},
{type,70,uuid,[]}]}]}},
{function,71,uuid1,0,
[{clause,71,[],[],
[{call,72,
{atom,72,uuid1},
[{atom,72,null},
{atom,72,null}]}]}]},
{attribute,74,spec,
{{uuid1,2},
[{type,74,'fun',
[{type,74,product,
[{ann_type,74,
[{var,74,'NodeArg'},
{type,74,union,
[{type,74,binary,
[]},
{atom,74,null}]}]},
{ann_type,74,
[{var,74,
'ClockSeqArg'},
{type,74,union,
[{type,74,binary,
[]},
{atom,74,
null}]}]}]},
{type,74,uuid,[]}]}]}},
{function,75,uuid1,2,
[{clause,75,
[{var,75,'NodeArg'},
{var,75,'ClockSeqArg'}],
[],
[{match,78,
{var,78,'UtcTimestamp'},
{call,79,
{remote,79,
{atom,79,calendar},
{atom,79,
datetime_to_gregorian_seconds}},
[{call,79,
{remote,79,
{atom,79,calendar},
{atom,79,
universal_time}},
[]}]}},
{match,83,
{var,83,
'HundredNanosPerSecond'},
{call,83,
{atom,83,round},
[{float,83,1.0e9}]}},
{match,84,
{var,84,'Timestamp'},
{op,84,'*',
{var,84,'UtcTimestamp'},
{var,84,
'HundredNanosPerSecond'}}},
{match,86,
{bin,86,
[{bin_element,86,
{var,86,'TimeHi'},
{integer,86,12},
default},
{bin_element,86,
{var,86,'TimeMid'},
{integer,86,16},
default},
{bin_element,86,
{var,86,'TimeLow'},
{integer,86,32},
default}]},
{bin,86,
[{bin_element,86,
{var,86,'Timestamp'},
{integer,86,60},
default}]}},
{match,88,
{var,88,'ClockSequence'},
{'case',90,
{var,90,'ClockSeqArg'},
[{clause,91,
[{atom,91,null}],
[],
[{call,92,
{remote,92,
{atom,92,random},
{atom,92,seed}},
[{call,92,
{atom,92,now},
[]}]},
{match,93,
{var,93,'Rnd'},
{call,93,
{remote,93,
{atom,93,random},
{atom,93,
uniform}},
[{op,93,'-',
{op,93,'bsl',
{integer,93,2},
{integer,93,
14}},
{integer,93,
1}}]}},
{bin,94,
[{bin_element,94,
{var,94,'Rnd'},
{integer,94,14},
default}]}]},
{clause,95,
[{var,95,
'ClockSeqArg'}],
[],
[{match,96,
{bin,96,
[{bin_element,96,
{var,96,'_'},
{integer,96,14},
default}]},
{var,96,
'ClockSeqArg'}}]}]}},
{match,98,
{bin,98,
[{bin_element,98,
{var,98,'ClockSeqHi'},
{integer,98,6},
default},
{bin_element,98,
{var,98,
'ClockSeqLow'},
{integer,98,8},
default}]},
{var,98,
'ClockSequence'}},
{match,101,
{var,101,'Node'},
{'case',102,
{var,102,'NodeArg'},
[{clause,103,
[{atom,103,null}],
[],
[{call,103,
{atom,103,get_node},
[]}]},
{clause,104,
[{var,104,'_'}],
[],
[{var,104,
'NodeArg'}]}]}},
{bin,108,
[{bin_element,108,
{var,108,'TimeLow'},
{integer,108,32},
default},
{bin_element,108,
{var,108,'TimeMid'},
{integer,108,16},
default},
{bin_element,108,
{integer,108,1},
{integer,108,4},
default},
{bin_element,108,
{var,108,'TimeHi'},
{integer,108,12},
default},
{bin_element,109,
{integer,109,2},
{integer,109,2},
default},
{bin_element,109,
{var,109,
'ClockSeqLow'},
{integer,109,8},
default},
{bin_element,109,
{var,109,'ClockSeqHi'},
{integer,109,6},
default},
{bin_element,109,
{var,109,'Node'},
default,
[binary]}]}]}]},
{attribute,117,spec,
{{uuid3,2},
[{type,117,'fun',
[{type,117,product,
[{ann_type,117,
[{var,117,
'NamespaceOrUuid'},
{type,117,union,
[{type,117,atom,[]},
{type,117,
uuid_string,[]},
{type,117,uuid,
[]}]}]},
{ann_type,118,
[{var,118,'Name'},
{type,118,string,
[]}]}]},
{type,118,uuid,[]}]}]}},
{function,119,uuid3,2,
[{clause,119,
[{atom,119,dns},
{var,119,'Name'}],
[],
[{call,120,
{atom,120,
create_namebased_uuid},
[{atom,120,md5},
{call,121,
{atom,121,
list_to_binary},
[{cons,121,
{bin,121,
[{bin_element,121,
{integer,121,
143098242404177361603877621312831893704},
{integer,121,128},
default}]},
{cons,121,
{var,121,'Name'},
{nil,121}}}]}]}]},
{clause,122,
[{atom,122,url},
{var,122,'Name'}],
[],
[{call,123,
{atom,123,
create_namebased_uuid},
[{atom,123,md5},
{call,124,
{atom,124,
list_to_binary},
[{cons,124,
{bin,124,
[{bin_element,124,
{integer,124,
143098242483405524118141958906375844040},
{integer,124,128},
default}]},
{cons,124,
{var,124,'Name'},
{nil,124}}}]}]}]},
{clause,125,
[{atom,125,oid},
{var,125,'Name'}],
[],
[{call,126,
{atom,126,
create_namebased_uuid},
[{atom,126,md5},
{call,127,
{atom,127,
list_to_binary},
[{cons,127,
{bin,127,
[{bin_element,127,
{integer,127,
143098242562633686632406296499919794376},
{integer,127,128},
default}]},
{cons,127,
{var,127,'Name'},
{nil,127}}}]}]}]},
{clause,128,
[{atom,128,x500},
{var,128,'Name'}],
[],
[{call,129,
{atom,129,
create_namebased_uuid},
[{atom,129,md5},
{call,130,
{atom,130,
list_to_binary},
[{cons,130,
{bin,130,
[{bin_element,130,
{integer,130,
143098242721090011660934971687007695048},
{integer,130,128},
default}]},
{cons,130,
{var,130,'Name'},
{nil,130}}}]}]}]},
{clause,131,
[{atom,131,nil},
{var,131,'Name'}],
[],
[{call,132,
{atom,132,
create_namebased_uuid},
[{atom,132,md5},
{call,132,
{atom,132,
list_to_binary},
[{cons,132,
{bin,132,
[{bin_element,132,
{integer,132,0},
{integer,132,128},
default}]},
{cons,132,
{var,132,'Name'},
{nil,132}}}]}]}]},
{clause,133,
[{var,133,'UuidStr'},
{var,133,'Name'}],
[[{call,133,
{atom,133,is_list},
[{var,133,
'UuidStr'}]}]],
[{call,134,
{atom,134,
create_namebased_uuid},
[{atom,134,md5},
{call,134,
{atom,134,
list_to_binary},
[{cons,134,
{call,134,
{atom,134,
to_binary},
[{var,134,
'UuidStr'}]},
{cons,134,
{var,134,'Name'},
{nil,134}}}]}]}]},
{clause,135,
[{var,135,'UuidBin'},
{var,135,'Name'}],
[[{call,135,
{atom,135,is_binary},
[{var,135,
'UuidBin'}]}]],
[{call,136,
{atom,136,
create_namebased_uuid},
[{atom,136,md5},
{call,136,
{atom,136,
list_to_binary},
[{cons,136,
{var,136,'UuidBin'},
{cons,136,
{var,136,'Name'},
{nil,136}}}]}]}]},
{clause,137,
[{var,137,'_'},
{var,137,'_'}],
[],
[{call,138,
{remote,138,
{atom,138,erlang},
{atom,138,error}},
[{atom,138,badarg}]}]}]},
{attribute,146,spec,
{{uuid4,0},
[{type,146,'fun',
[{type,146,product,[]},
{type,146,uuid,[]}]}]}},
{function,147,uuid4,0,
[{clause,147,[],[],
[{call,148,
{remote,148,
{atom,148,random},
{atom,148,seed}},
[{call,148,
{atom,148,now},
[]}]},
{match,150,
{var,150,'U0'},
{call,150,
{remote,150,
{atom,150,random},
{atom,150,uniform}},
[{op,150,'-',
{op,150,'bsl',
{integer,150,2},
{integer,150,32}},
{integer,150,1}}]}},
{match,151,
{var,151,'U1'},
{call,151,
{remote,151,
{atom,151,random},
{atom,151,uniform}},
[{op,151,'-',
{op,151,'bsl',
{integer,151,2},
{integer,151,16}},
{integer,151,1}}]}},
{match,152,
{var,152,'U2'},
{call,152,
{remote,152,
{atom,152,random},
{atom,152,uniform}},
[{op,152,'-',
{op,152,'bsl',
{integer,152,2},
{integer,152,12}},
{integer,152,1}}]}},
{match,153,
{var,153,'U3'},
{call,153,
{remote,153,
{atom,153,random},
{atom,153,uniform}},
[{op,153,'-',
{op,153,'bsl',
{integer,153,2},
{integer,153,32}},
{integer,153,1}}]}},
{match,154,
{var,154,'U4'},
{call,154,
{remote,154,
{atom,154,random},
{atom,154,uniform}},
[{op,154,'-',
{op,154,'bsl',
{integer,154,2},
{integer,154,30}},
{integer,154,1}}]}},
{call,156,
{atom,156,uuid4},
[{var,156,'U0'},
{var,156,'U1'},
{var,156,'U2'},
{var,156,'U3'},
{var,156,'U4'}]}]}]},
{attribute,161,spec,
{{uuid4,5},
[{type,161,'fun',
[{type,161,product,
[{ann_type,161,
[{var,161,'U0'},
{type,161,integer,
[]}]},
{ann_type,161,
[{var,161,'U1'},
{type,161,integer,
[]}]},
{ann_type,161,
[{var,161,'U2'},
{type,161,integer,
[]}]},
{ann_type,161,
[{var,161,'U3'},
{type,161,integer,
[]}]},
{ann_type,162,
[{var,162,'U4'},
{type,162,integer,
[]}]}]},
{type,162,uuid,[]}]}]}},
{function,163,uuid4,5,
[{clause,163,
[{var,163,'U0'},
{var,163,'U1'},
{var,163,'U2'},
{var,163,'U3'},
{var,163,'U4'}],
[],
[{bin,174,
[{bin_element,174,
{var,174,'U0'},
{integer,174,32},
default},
{bin_element,174,
{var,174,'U1'},
{integer,174,16},
default},
{bin_element,174,
{integer,174,4},
{integer,174,4},
default},
{bin_element,174,
{var,174,'U2'},
{integer,174,12},
default},
{bin_element,174,
{integer,174,2},
{integer,174,2},
default},
{bin_element,174,
{var,174,'U3'},
{integer,174,32},
default},
{bin_element,174,
{var,174,'U4'},
{integer,174,30},
default}]}]}]},
{attribute,183,spec,
{{uuid5,2},
[{type,183,'fun',
[{type,183,product,
[{ann_type,183,
[{var,183,
'NamespaceOrUuid'},
{type,183,union,
[{type,183,atom,[]},
{type,183,
uuid_string,[]},
{type,183,uuid,
[]}]}]},
{ann_type,184,
[{var,184,'Name'},
{type,184,string,
[]}]}]},
{type,184,uuid,[]}]}]}},
{function,185,uuid5,2,
[{clause,185,
[{atom,185,dns},
{var,185,'Name'}],
[],
[{call,186,
{atom,186,
create_namebased_uuid},
[{atom,186,sha1},
{call,187,
{atom,187,
list_to_binary},
[{cons,187,
{bin,187,
[{bin_element,187,
{integer,187,
143098242404177361603877621312831893704},
{integer,187,128},
default}]},
{cons,187,
{var,187,'Name'},
{nil,187}}}]}]}]},
{clause,188,
[{atom,188,url},
{var,188,'Name'}],
[],
[{call,189,
{atom,189,
create_namebased_uuid},
[{atom,189,sha1},
{call,190,
{atom,190,
list_to_binary},
[{cons,190,
{bin,190,
[{bin_element,190,
{integer,190,
143098242483405524118141958906375844040},
{integer,190,128},
default}]},
{cons,190,
{var,190,'Name'},
{nil,190}}}]}]}]},
{clause,191,
[{atom,191,oid},
{var,191,'Name'}],
[],
[{call,192,
{atom,192,
create_namebased_uuid},
[{atom,192,sha1},
{call,193,
{atom,193,
list_to_binary},
[{cons,193,
{bin,193,
[{bin_element,193,
{integer,193,
143098242562633686632406296499919794376},
{integer,193,128},
default}]},
{cons,193,
{var,193,'Name'},
{nil,193}}}]}]}]},
{clause,194,
[{atom,194,x500},
{var,194,'Name'}],
[],
[{call,195,
{atom,195,
create_namebased_uuid},
[{atom,195,sha1},
{call,196,
{atom,196,
list_to_binary},
[{cons,196,
{bin,196,
[{bin_element,196,
{integer,196,
143098242721090011660934971687007695048},
{integer,196,128},
default}]},
{cons,196,
{var,196,'Name'},
{nil,196}}}]}]}]},
{clause,197,
[{atom,197,nil},
{var,197,'Name'}],
[],
[{call,198,
{atom,198,
create_namebased_uuid},
[{atom,198,sha1},
{call,198,
{atom,198,
list_to_binary},
[{cons,198,
{bin,198,
[{bin_element,198,
{integer,198,0},
{integer,198,128},
default}]},
{cons,198,
{var,198,'Name'},
{nil,198}}}]}]}]},
{clause,199,
[{var,199,'UuidStr'},
{var,199,'Name'}],
[[{call,199,
{atom,199,is_list},
[{var,199,
'UuidStr'}]}]],
[{call,200,
{atom,200,
create_namebased_uuid},
[{atom,200,sha1},
{call,200,
{atom,200,
list_to_binary},
[{cons,200,
{call,200,
{atom,200,
to_binary},
[{var,200,
'UuidStr'}]},
{cons,200,
{var,200,'Name'},
{nil,200}}}]}]}]},
{clause,201,
[{var,201,'UuidBin'},
{var,201,'Name'}],
[[{call,201,
{atom,201,is_binary},
[{var,201,
'UuidBin'}]}]],
[{call,202,
{atom,202,
create_namebased_uuid},
[{atom,202,sha1},
{call,202,
{atom,202,
list_to_binary},
[{cons,202,
{var,202,'UuidBin'},
{cons,202,
{var,202,'Name'},
{nil,202}}}]}]}]},
{clause,203,
[{var,203,'_'},
{var,203,'_'}],
[],
[{call,204,
{remote,204,
{atom,204,erlang},
{atom,204,error}},
[{atom,204,badarg}]}]}]},
{attribute,210,spec,
{{create_namebased_uuid,2},
[{type,210,'fun',
[{type,210,product,
[{ann_type,210,
[{var,210,
'HashFunction'},
{type,210,union,
[{atom,210,md5},
{atom,210,
sha1}]}]},
{ann_type,211,
[{var,211,'Data'},
{type,211,binary,
[]}]}]},
{type,211,uuid,[]}]}]}},
{function,212,
create_namebased_uuid,2,
[{clause,212,
[{atom,212,md5},
{var,212,'Data'}],
[],
[{match,213,
{var,213,'Md5'},
{call,213,
{remote,213,
{atom,213,crypto},
{atom,213,md5}},
[{var,213,'Data'}]}},
{call,214,
{atom,214,
compose_namebased_uuid},
[{integer,214,3},
{var,214,'Md5'}]}]},
{clause,215,
[{atom,215,sha1},
{var,215,'Data'}],
[],
[{match,216,
{bin,216,
[{bin_element,216,
{var,216,'Sha1'},
{integer,216,128},
default},
{bin_element,216,
{var,216,'_'},
{integer,216,32},
default}]},
{call,216,
{remote,216,
{atom,216,crypto},
{atom,216,sha}},
[{var,216,'Data'}]}},
{call,217,
{atom,217,
compose_namebased_uuid},
[{integer,217,5},
{bin,217,
[{bin_element,217,
{var,217,'Sha1'},
{integer,217,128},
default}]}]}]}]},
{attribute,221,spec,
{{compose_namebased_uuid,2},
[{type,221,'fun',
[{type,221,product,
[{ann_type,221,
[{var,221,'Version'},
{type,221,union,
[{integer,221,3},
{integer,221,
5}]}]},
{ann_type,221,
[{var,221,'Hash'},
{type,221,binary,
[]}]}]},
{type,221,uuid,[]}]}]}},
{function,222,
compose_namebased_uuid,2,
[{clause,222,
[{var,222,'Version'},
{var,222,'Hash'}],
[],
[{match,224,
{bin,223,
[{bin_element,223,
{var,223,'TimeLow'},
{integer,223,32},
default},
{bin_element,223,
{var,223,'TimeMid'},
{integer,223,16},
default},
{bin_element,223,
{var,223,
'_AndVersion'},
{integer,223,4},
default},
{bin_element,223,
{var,223,'TimeHi'},
{integer,223,12},
default},
{bin_element,224,
{var,224,
'_AndReserved'},
{integer,224,2},
default},
{bin_element,224,
{var,224,
'ClockSeqHi'},
{integer,224,6},
default},
{bin_element,224,
{var,224,
'ClockSeqLow'},
{integer,224,8},
default},
{bin_element,224,
{var,224,'Node'},
{integer,224,48},
default}]},
{var,224,'Hash'}},
{bin,226,
[{bin_element,226,
{var,226,'TimeLow'},
{integer,226,32},
default},
{bin_element,226,
{var,226,'TimeMid'},
{integer,226,16},
default},
{bin_element,226,
{var,226,'Version'},
{integer,226,4},
default},
{bin_element,226,
{var,226,'TimeHi'},
{integer,226,12},
default},
{bin_element,227,
{integer,227,2},
{integer,227,2},
default},
{bin_element,227,
{var,227,'ClockSeqHi'},
{integer,227,6},
default},
{bin_element,227,
{var,227,
'ClockSeqLow'},
{integer,227,8},
default},
{bin_element,227,
{var,227,'Node'},
{integer,227,48},
default}]}]}]},
{attribute,235,spec,
{{to_string,1},
[{type,235,'fun',
[{type,235,product,
[{ann_type,235,
[{var,235,'Uuid'},
{type,235,uuid,
[]}]}]},
{type,235,uuid_string,
[]}]}]}},
{function,236,to_string,1,
[{clause,236,
[{match,236,
{bin,236,
[{bin_element,236,
{var,236,'_'},
{integer,236,128},
default}]},
{var,236,'Uuid'}}],
[[{call,236,
{atom,236,is_binary},
[{var,236,'Uuid'}]}]],
[{call,237,
{atom,237,to_string},
[{atom,237,pretty},
{var,237,'Uuid'}]}]},
{clause,238,
[{var,238,'_'}],
[],
[{call,239,
{remote,239,
{atom,239,erlang},
{atom,239,error}},
[{atom,239,badarg}]}]}]},
{attribute,241,spec,
{{to_string,2},
[{type,241,'fun',
[{type,241,product,
[{type,241,union,
[{atom,241,simple},
{atom,241,pretty}]},
{ann_type,241,
[{var,241,'Uuid'},
{type,241,uuid,
[]}]}]},
{type,241,uuid_string,
[]}]}]}},
{function,242,to_string,2,
[{clause,242,
[{atom,242,pretty},
{bin,242,
[{bin_element,242,
{var,242,'U0'},
{integer,242,32},
default},
{bin_element,242,
{var,242,'U1'},
{integer,242,16},
default},
{bin_element,242,
{var,242,'U2'},
{integer,242,16},
default},
{bin_element,242,
{var,242,'U3'},
{integer,242,16},
default},
{bin_element,242,
{var,242,'U4'},
{integer,242,48},
default}]}],
[],
[{call,243,
{remote,243,
{atom,243,lists},
{atom,243,flatten}},
[{call,243,
{remote,243,
{atom,243,io_lib},
{atom,243,format}},
[{string,244,
"~8.16.0b-~4.16.0b-~4.16.0b-~4.16.0b-~12.16.0b"},
{cons,245,
{var,245,'U0'},
{cons,245,
{var,245,'U1'},
{cons,245,
{var,245,'U2'},
{cons,245,
{var,245,'U3'},
{cons,245,
{var,245,'U4'},
{nil,
245}}}}}}]}]}]},
{clause,246,
[{atom,246,simple},
{bin,246,
[{bin_element,246,
{var,246,'S'},
{integer,246,128},
default}]}],
[],
[{call,247,
{remote,247,
{atom,247,lists},
{atom,247,flatten}},
[{call,247,
{remote,247,
{atom,247,io_lib},
{atom,247,format}},
[{string,247,
"~32.16.0b"},
{cons,247,
{var,247,'S'},
{nil,247}}]}]}]},
{clause,248,
[{var,248,'_'},
{var,248,'_'}],
[],
[{call,249,
{remote,249,
{atom,249,erlang},
{atom,249,error}},
[{atom,249,badarg}]}]}]},
{attribute,253,spec,
{{to_uuid_urn,1},
[{type,253,'fun',
[{type,253,product,
[{ann_type,253,
[{var,253,
'UuidOrUrn'},
{type,253,union,
[{type,253,uuid,[]},
{type,253,
uuid_string,
[]}]}]}]},
{type,253,urn,[]}]}]}},
{function,254,to_uuid_urn,1,
[{clause,254,
[{match,254,
{cons,254,
{char,254,117},
{cons,254,
{char,254,114},
{cons,254,
{char,254,110},
{cons,254,
{char,254,58},
{cons,254,
{char,254,117},
{cons,254,
{char,254,117},
{cons,254,
{char,254,105},
{cons,254,
{char,254,100},
{cons,254,
{char,254,58},
{var,254,
'_'}}}}}}}}}},
{var,254,'Urn'}}],
[],
[{var,255,'Urn'}]},
{clause,256,
[{match,256,
{bin,256,
[{bin_element,256,
{var,256,'_'},
{integer,256,128},
default}]},
{var,256,'Uuid'}}],
[],
[{op,257,'++',
{string,257,"urn:uuid:"},
{call,257,
{remote,257,
{atom,257,uuid},
{atom,257,to_string}},
[{var,257,'Uuid'}]}}]},
{clause,258,
[{var,258,'Uuid'}],
[[{call,258,
{atom,258,is_list},
[{var,258,'Uuid'}]}]],
[{op,259,'++',
{string,259,"urn:uuid:"},
{var,259,'Uuid'}}]}]},
{attribute,263,spec,
{{to_binary,1},
[{type,263,'fun',
[{type,263,product,
[{ann_type,263,
[{var,263,'UuidStr'},
{type,263,
uuid_string,[]}]}]},
{type,263,uuid,[]}]}]}},
{function,264,to_binary,1,
[{clause,264,
[{var,264,'UuidStr'}],
[[{call,264,
{atom,264,is_list},
[{var,264,
'UuidStr'}]}]],
[{'case',265,
{call,265,
{atom,265,length},
[{var,265,'UuidStr'}]},
[{clause,266,
[{integer,266,36}],
[],
[{call,266,
{atom,266,to_binary},
[{atom,266,pretty},
{var,266,
'UuidStr'}]}]},
{clause,267,
[{integer,267,32}],
[],
[{call,267,
{atom,267,to_binary},
[{atom,267,simple},
{var,267,
'UuidStr'}]}]},
{clause,268,
[{var,268,'_'}],
[],
[{call,268,
{remote,268,
{atom,268,erlang},
{atom,268,error}},
[{atom,268,
badarg}]}]}]}]},
{clause,270,
[{var,270,'_'}],
[],
[{call,271,
{remote,271,
{atom,271,erlang},
{atom,271,error}},
[{atom,271,badarg}]}]}]},
{attribute,274,spec,
{{to_binary,2},
[{type,274,'fun',
[{type,274,product,
[{type,274,union,
[{atom,274,simple},
{atom,274,pretty}]},
{ann_type,274,
[{var,274,'UuidStr'},
{type,274,
uuid_string,[]}]}]},
{type,274,uuid,[]}]}]}},
{function,275,to_binary,2,
[{clause,275,
[{atom,275,simple},
{var,275,'UuidStr'}],
[],
[{match,276,
{var,276,'Num'},
{call,276,
{atom,276,hex_to_int},
[{var,276,'UuidStr'}]}},
{bin,277,
[{bin_element,277,
{var,277,'Num'},
{integer,277,128},
default}]}]},
{clause,278,
[{atom,278,pretty},
{var,278,'UuidStr'}],
[],
[{match,279,
{var,279,'Parts'},
{call,279,
{remote,279,
{atom,279,string},
{atom,279,tokens}},
[{var,279,'UuidStr'},
{string,279,"$-"}]}},
{match,280,
{cons,280,
{var,280,'I0'},
{cons,280,
{var,280,'I1'},
{cons,280,
{var,280,'I2'},
{cons,280,
{var,280,'I3'},
{cons,280,
{var,280,'I4'},
{nil,280}}}}}},
{lc,280,
{call,280,
{atom,280,hex_to_int},
[{var,280,'Part'}]},
[{generate,280,
{var,280,'Part'},
{var,280,'Parts'}}]}},
{bin,281,
[{bin_element,281,
{var,281,'I0'},
{integer,281,32},
default},
{bin_element,281,
{var,281,'I1'},
{integer,281,16},
default},
{bin_element,281,
{var,281,'I2'},
{integer,281,16},
default},
{bin_element,281,
{var,281,'I3'},
{integer,281,16},
default},
{bin_element,281,
{var,281,'I4'},
{integer,281,48},
default}]}]}]},
{attribute,291,spec,
{{hex_to_int,1},
[{type,291,'fun',
[{type,291,product,
[{ann_type,291,
[{var,291,'Hex'},
{type,291,string,
[]}]}]},
{type,291,integer,
[]}]}]}},
{function,292,hex_to_int,1,
[{clause,292,
[{var,292,'Hex'}],
[],
[{match,293,
{tuple,293,
[{atom,293,ok},
{cons,293,
{var,293,'D'},
{nil,293}},
{nil,293}]},
{call,293,
{remote,293,
{atom,293,io_lib},
{atom,293,fread}},
[{string,293,"~16u"},
{var,293,'Hex'}]}},
{var,294,'D'}]}]},
{attribute,299,spec,
{{filter_if,1},
[{type,299,'fun',
[{type,299,product,
[{type,299,tuple,
[{ann_type,299,
[{var,299,'IfName'},
{type,299,string,
[]}]},
{ann_type,299,
[{var,299,
'IfConfig'},
{type,299,list,
[{type,299,
tuple,
any}]}]}]}]},
{type,299,union,
[{atom,299,true},
{atom,299,
false}]}]}]}},
{function,300,filter_if,1,
[{clause,300,
[{tuple,300,
[{var,300,'IfName'},
{var,300,'IfConfig'}]}],
[],
[{match,301,
{cons,301,
{var,301,'HasHwAddr'},
{nil,301}},
{lc,302,
{atom,302,true},
[{generate,302,
{tuple,302,
[{var,302,
'IfConfigItem'},
{var,302,'_'}]},
{var,302,'IfConfig'}},
{op,302,'=:=',
{var,302,
'IfConfigItem'},
{atom,302,hwaddr}}]}},
{'case',304,
{tuple,304,
[{var,304,'IfName'},
{var,304,
'HasHwAddr'}]},
[{clause,306,
[{tuple,306,
[{string,306,"lo"},
{var,306,'_'}]}],
[],
[{atom,306,false}]},
{clause,308,
[{tuple,308,
[{var,308,'_'},
{atom,308,true}]}],
[],
[{atom,308,true}]},
{clause,310,
[{var,310,'_'}],
[],
[{atom,310,
false}]}]}]}]},
{attribute,316,spec,
{{get_node,0},
[{type,316,'fun',
[{type,316,product,[]},
{type,316,binary,
[]}]}]}},
{function,317,get_node,0,
[{clause,317,[],[],
[{match,319,
{tuple,319,
[{atom,319,ok},
{var,319,'Ifs0'}]},
{call,319,
{remote,319,
{atom,319,inet},
{atom,319,getifaddrs}},
[]}},
{match,322,
{var,322,'Ifs1'},
{call,322,
{remote,322,
{atom,322,lists},
{atom,322,filter}},
[{'fun',322,
{function,filter_if,
1}},
{var,322,'Ifs0'}]}},
{'case',324,
{call,324,
{atom,324,length},
[{var,324,'Ifs1'}]},
[{clause,326,
[{integer,326,0}],
[],
[{match,326,
{bin,326,
[{bin_element,326,
{var,326,'RndHi'},
{integer,326,7},
default},
{bin_element,326,
{var,326,'_'},
{integer,326,1},
default},
{bin_element,326,
{var,326,
'RndLow'},
{integer,326,40},
default}]},
{call,326,
{remote,326,
{atom,326,crypto},
{atom,326,
rand_bytes}},
[{integer,326,6}]}},
{bin,328,
[{bin_element,328,
{var,328,'RndHi'},
{integer,328,7},
default},
{bin_element,328,
{integer,328,1},
{integer,328,1},
default},
{bin_element,328,
{var,328,'RndLow'},
{integer,328,40},
default}]}]},
{clause,331,
[{var,331,'_'}],
[],
[{match,331,
{cons,331,
{tuple,331,
[{var,331,
'_IfName'},
{var,331,
'IfConfig'}]},
{var,331,'_'}},
{var,331,'Ifs1'}},
{match,332,
{cons,332,
{var,332,'HwAddr'},
{nil,332}},
{lc,332,
{var,332,'HwAddr'},
[{generate,332,
{tuple,332,
[{var,332,
'IfConfigItemName'},
{var,332,
'HwAddr'}]},
{var,332,
'IfConfig'}},
{op,333,'=:=',
{var,333,
'IfConfigItemName'},
{atom,333,
hwaddr}}]}},
{call,334,
{atom,334,
list_to_binary},
[{var,334,
'HwAddr'}]}]}]}]}]},
{attribute,339,spec,
{{version,1},
[{type,339,'fun',
[{type,339,product,
[{ann_type,339,
[{var,339,'Uuid'},
{type,339,union,
[{type,339,uuid,[]},
{type,339,
uuid_string,
[]}]}]}]},
{type,339,integer,
[]}]}]}},
{function,340,version,1,
[{clause,340,
[{match,340,
{bin,340,
[{bin_element,340,
{var,340,'_'},
{integer,340,128},
default}]},
{var,340,'Uuid'}}],
[],
[{match,341,
{bin,341,
[{bin_element,341,
{var,341,'_'},
{integer,341,48},
default},
{bin_element,341,
{var,341,'Version'},
{integer,341,4},
default},
{bin_element,341,
{var,341,'_'},
{integer,341,76},
default}]},
{var,341,'Uuid'}},
{var,342,'Version'}]},
{clause,343,
[{var,343,'UuidStr'}],
[[{call,343,
{atom,343,is_list},
[{var,343,
'UuidStr'}]}]],
[{call,344,
{atom,344,version},
[{call,344,
{remote,344,
{atom,344,uuid},
{atom,344,to_binary}},
[{var,344,
'UuidStr'}]}]}]},
{clause,345,
[{var,345,'_'}],
[],
[{call,346,
{remote,346,
{atom,346,erlang},
{atom,346,error}},
[{atom,346,badarg}]}]}]},
{attribute,350,spec,
{{variant,1},
[{type,350,'fun',
[{type,350,product,
[{ann_type,350,
[{var,350,'Uuid'},
{type,350,union,
[{type,350,uuid,[]},
{type,350,
uuid_string,
[]}]}]}]},
{type,350,union,
[{atom,350,
reserved_microsoft},
{atom,351,
reserved_ncs},
{atom,352,
resered_future},
{atom,353,
rfc4122}]}]}]}},
{function,354,variant,1,
[{clause,354,
[{match,354,
{bin,354,
[{bin_element,354,
{var,354,'_'},
{integer,354,128},
default}]},
{var,354,'Uuid'}}],
[],
[{match,355,
{bin,355,
[{bin_element,355,
{var,355,'_'},
{integer,355,64},
default},
{bin_element,355,
{var,355,'V2'},
{integer,355,1},
default},
{bin_element,355,
{var,355,'V1'},
{integer,355,1},
default},
{bin_element,355,
{var,355,'V0'},
{integer,355,1},
default},
{bin_element,355,
{var,355,'_'},
{integer,355,61},
default}]},
{var,355,'Uuid'}},
{'case',356,
{tuple,356,
[{var,356,'V2'},
{var,356,'V1'},
{var,356,'V0'}]},
[{clause,357,
[{tuple,357,
[{integer,357,0},
{var,357,'_'},
{var,357,'_'}]}],
[],
[{atom,357,
reserved_ncs}]},
{clause,358,
[{tuple,358,
[{integer,358,1},
{integer,358,0},
{var,358,'_'}]}],
[],
[{atom,358,rfc4122}]},
{clause,359,
[{tuple,359,
[{integer,359,1},
{integer,359,1},
{integer,359,0}]}],
[],
[{atom,359,
reserved_microsoft}]},
{clause,360,
[{tuple,360,
[{integer,360,1},
{integer,360,1},
{integer,360,1}]}],
[],
[{atom,360,
reserved_future}]}]}]},
{clause,362,
[{var,362,'UuidStr'}],
[[{call,362,
{atom,362,is_list},
[{var,362,
'UuidStr'}]}]],
[{call,363,
{atom,363,variant},
[{call,363,
{remote,363,
{atom,363,uuid},
{atom,363,to_binary}},
[{var,363,
'UuidStr'}]}]}]},
{clause,364,
[{var,364,'_'}],
[],
[{call,365,
{remote,365,
{atom,365,erlang},
{atom,365,error}},
[{atom,365,badarg}]}]}]},
{attribute,369,spec,
{{is_v1,1},
[{type,369,'fun',
[{type,369,product,
[{ann_type,369,
[{var,369,'Uuid'},
{type,369,union,
[{type,369,uuid,[]},
{type,369,
uuid_string,
[]}]}]}]},
{type,369,union,
[{atom,369,true},
{atom,369,
false}]}]}]}},
{function,370,is_v1,1,
[{clause,370,
[{var,370,'Uuid'}],
[],
[{op,370,'=:=',
{integer,370,1},
{call,370,
{atom,370,version},
[{var,370,
'Uuid'}]}}]}]},
{attribute,373,spec,
{{is_v3,1},
[{type,373,'fun',
[{type,373,product,
[{ann_type,373,
[{var,373,'Uuid'},
{type,373,union,
[{type,373,uuid,[]},
{type,373,
uuid_string,
[]}]}]}]},
{type,373,union,
[{atom,373,true},
{atom,373,
false}]}]}]}},
{function,374,is_v3,1,
[{clause,374,
[{var,374,'Uuid'}],
[],
[{op,374,'=:=',
{integer,374,3},
{call,374,
{atom,374,version},
[{var,374,
'Uuid'}]}}]}]},
{attribute,377,spec,
{{is_v4,1},
[{type,377,'fun',
[{type,377,product,
[{ann_type,377,
[{var,377,'Uuid'},
{type,377,union,
[{type,377,uuid,[]},
{type,377,
uuid_string,
[]}]}]}]},
{type,377,union,
[{atom,377,true},
{atom,377,
false}]}]}]}},
{function,378,is_v4,1,
[{clause,378,
[{var,378,'Uuid'}],
[],
[{op,378,'=:=',
{integer,378,4},
{call,378,
{atom,378,version},
[{var,378,
'Uuid'}]}}]}]},
{attribute,381,spec,
{{is_v5,1},
[{type,381,'fun',
[{type,381,product,
[{ann_type,381,
[{var,381,'Uuid'},
{type,381,union,
[{type,381,uuid,[]},
{type,381,
uuid_string,
[]}]}]}]},
{type,381,union,
[{atom,381,true},
{atom,381,
false}]}]}]}},
{function,382,is_v5,1,
[{clause,382,
[{var,382,'Uuid'}],
[],
[{op,382,'=:=',
{integer,382,5},
{call,382,
{atom,382,version},
[{var,382,
'Uuid'}]}}]}]},
{attribute,386,spec,
{{is_valid,1},
[{type,386,'fun',
[{type,386,product,
[{ann_type,386,
[{var,386,'Uuid'},
{type,386,union,
[{type,386,uuid,[]},
{type,386,
uuid_string,
[]}]}]}]},
{type,386,union,
[{atom,386,true},
{atom,386,
false}]}]}]}},
{function,388,is_valid,1,
[{clause,388,
[{bin,388,
[{bin_element,388,
{integer,388,0},
{integer,388,128},
default}]}],
[],
[{atom,388,true}]},
{clause,389,
[{match,389,
{var,389,'Uuid'},
{bin,389,
[{bin_element,389,
{var,389,'_'},
{integer,389,128},
default}]}}],
[],
[{call,390,
{atom,390,is_valid},
[{call,390,
{atom,390,variant},
[{var,390,'Uuid'}]},
{var,390,'Uuid'}]}]},
{clause,391,
[{var,391,'UuidStr'}],
[[{call,391,
{atom,391,is_list},
[{var,391,
'UuidStr'}]}]],
[{call,392,
{atom,392,is_valid},
[{call,392,
{atom,392,to_binary},
[{var,392,
'UuidStr'}]}]}]},
{clause,393,
[{var,393,'_'}],
[],
[{call,394,
{remote,394,
{atom,394,erlang},
{atom,394,error}},
[{atom,394,badarg}]}]}]},
{attribute,399,spec,
{{is_valid,2},
[{type,399,'fun',
[{type,399,product,
[{ann_type,399,
[{var,399,'Variant'},
{type,399,atom,[]}]},
{ann_type,399,
[{var,399,'Uuid'},
{type,399,uuid,
[]}]}]},
{type,399,union,
[{atom,399,true},
{atom,399,
false}]}]}]}},
{function,400,is_valid,2,
[{clause,400,
[{atom,400,rfc4122},
{var,400,'Uuid'}],
[],
[{match,401,
{var,401,'Version'},
{call,401,
{atom,401,version},
[{var,401,'Uuid'}]}},
{'case',402,
{var,402,'Version'},
[{clause,403,
[{integer,403,1}],
[],
[{atom,403,true}]},
{clause,404,
[{integer,404,3}],
[],
[{atom,404,true}]},
{clause,405,
[{integer,405,4}],
[],
[{atom,405,true}]},
{clause,406,
[{integer,406,5}],
[],
[{atom,406,true}]},
{clause,407,
[{var,407,'_'}],
[],
[{atom,407,
false}]}]}]},
{clause,409,
[{var,409,'_'},
{var,409,'_'}],
[],
[{atom,409,false}]}]},
{eof,410}],
[{outdir,"ebin"},
debug_info,
{i,"apps"},
{i,"deps"},
{i,"../../deps/alog/include"},
{parse_transform,
lager_transform},
debug_info,
{i,"include"},
report_errors,
report_warnings]],
[]},
{compile,
'-foldl_transform/2-anonymous-2-',
2,
[{file,"compile.erl"},
{line,843}]},
{compile,foldl_transform,2,
[{file,"compile.erl"},
{line,845}]},
{compile,
'-internal_comp/4-anonymous-1-',
2,
[{file,"compile.erl"},
{line,269}]},
{compile,fold_comp,3,
[{file,"compile.erl"},
{line,287}]},
{compile,internal_comp,4,
[{file,"compile.erl"},
{line,271}]},
{compile,internal,3,
[{file,"compile.erl"},
{line,246}]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment