TEPs icon indicating copy to clipboard operation
TEPs copied to clipboard

Incorrect TL-B scheme in TEP-64

Open pyAndr3w opened this issue 1 year ago • 31 comments

Compiling a TL-B scheme from TEP-64 using the standard tools (tlbc) results in an error:

test.tlb:1:23: error: variable `bn` used before being assigned to
  tail#_ {bn:#} b:(bits bn) = SnakeData ~0;
(spoiler) Current TL-B scheme from TEP-64
tail#_ {bn:#} b:(bits bn) = SnakeData ~0;
cons#_ {bn:#} {n:#} b:(bits bn) next:^(SnakeData ~n) = SnakeData ~(n + 1);

chunked_data#_ data:(HashMapE 32 ^(SnakeData ~0)) = ChunkedData;

text#_ {n:#} data:(SnakeData ~n) = Text;
snake#00 data:(SnakeData ~n) = ContentData;
chunks#01 data:ChunkedData = ContentData;
onchain#00 data:(HashMapE 256 ^ContentData) = FullContent;
offchain#01 uri:Text = FullContent;

pyAndr3w avatar Mar 24 '23 05:03 pyAndr3w