Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraction list of bytes produce incorrect F# code #3520

Open
kant2002 opened this issue Oct 4, 2024 · 0 comments
Open

Extraction list of bytes produce incorrect F# code #3520

kant2002 opened this issue Oct 4, 2024 · 0 comments

Comments

@kant2002
Copy link
Contributor

kant2002 commented Oct 4, 2024

Take following list of bytes

module Qalqan
open Prims

type byte = UInt8.t

//[@@extract_as (`(fun (x: nat) -> "not a number"))]
let sb : list byte = [
  //UInt8.uint_to_t 1
  (* ded: OK, dif: 4, dip: 7, lin: 32, pow: 7, cor: 0, dst: 112, sac: 116..140, cyc: 256 *)
      0xd1uy; 0xb5uy; 0xa6uy; 0x74uy; 0x2fuy; 0xb2uy; 0x03uy; 0x77uy; 0xaeuy; 0xb3uy; 0x60uy; 0x95uy; 0xfduy; 0xf8uy; 0xc7uy; 0xf0uy;
      0x2buy; 0xceuy; 0xa5uy; 0x91uy; 0x4cuy; 0x6fuy; 0xf3uy; 0x4fuy; 0x82uy; 0x01uy; 0x45uy; 0x76uy; 0x9fuy; 0xeduy; 0x41uy; 0xfbuy;
      0xacuy; 0x4euy; 0x5euy; 0x04uy; 0xebuy; 0xf9uy; 0xf1uy; 0x3auy; 0x1fuy; 0xe2uy; 0x8euy; 0xe7uy; 0x85uy; 0x35uy; 0xdbuy; 0x52uy;
      0x78uy; 0xa1uy; 0xfcuy; 0xa2uy; 0xdeuy; 0x68uy; 0x02uy; 0x4duy; 0xf6uy; 0xdduy; 0xcfuy; 0xa3uy; 0xdcuy; 0x6buy; 0x81uy; 0x44uy;
      0x2auy; 0x5duy; 0x1euy; 0xe0uy; 0x53uy; 0x71uy; 0x3buy; 0xc1uy; 0xccuy; 0x9duy; 0x80uy; 0xd5uy; 0x84uy; 0x00uy; 0x24uy; 0x4buy;
      0xb6uy; 0x83uy; 0x0duy; 0x87uy; 0x7euy; 0x86uy; 0xcauy; 0x96uy; 0xbeuy; 0x5auy; 0xe6uy; 0xd0uy; 0xd4uy; 0xd8uy; 0x55uy; 0xc0uy;
      0x05uy; 0xe5uy; 0xe9uy; 0x5buy; 0x47uy; 0xe4uy; 0x2duy; 0x34uy; 0x13uy; 0x88uy; 0x48uy; 0x32uy; 0x38uy; 0xb9uy; 0xdauy; 0xc9uy;
      0x42uy; 0x29uy; 0xd7uy; 0xf2uy; 0x9buy; 0x6duy; 0xe8uy; 0x8duy; 0x12uy; 0x7cuy; 0x8cuy; 0x3fuy; 0xbcuy; 0x3cuy; 0x1buy; 0xc5uy;
      0x69uy; 0x22uy; 0x97uy; 0xaauy; 0x73uy; 0x0auy; 0x0cuy; 0x8auy; 0x90uy; 0x31uy; 0xc4uy; 0x33uy; 0xe1uy; 0x8buy; 0x9cuy; 0x63uy;
      0x5fuy; 0xf5uy; 0xf7uy; 0xffuy; 0x79uy; 0x49uy; 0xd3uy; 0xc6uy; 0x7buy; 0x1auy; 0x39uy; 0xc8uy; 0x6euy; 0x72uy; 0xd9uy; 0xc3uy;
      0x62uy; 0x28uy; 0xbduy; 0xbbuy; 0xfauy; 0x2euy; 0xbfuy; 0x43uy; 0x06uy; 0x0buy; 0x7auy; 0x64uy; 0x5cuy; 0x92uy; 0x37uy; 0x3duy;
      0x66uy; 0x26uy; 0x51uy; 0xefuy; 0x0fuy; 0xa9uy; 0x14uy; 0x70uy; 0x16uy; 0x17uy; 0x10uy; 0x19uy; 0x93uy; 0x09uy; 0x59uy; 0x15uy;
      0xfeuy; 0x4auy; 0xcbuy; 0x2cuy; 0xcduy; 0xb8uy; 0x94uy; 0xabuy; 0xdfuy; 0xa7uy; 0x0euy; 0x30uy; 0xafuy; 0x56uy; 0x23uy; 0xb1uy;
      0xb0uy; 0x58uy; 0x7duy; 0xc2uy; 0x1duy; 0x50uy; 0x20uy; 0x61uy; 0x25uy; 0x89uy; 0xa0uy; 0x6cuy; 0x11uy; 0x54uy; 0x98uy; 0xb7uy;
      0x18uy; 0x21uy; 0xaduy; 0x3euy; 0xd2uy; 0xeauy; 0x40uy; 0xd6uy; 0xf4uy; 0xa4uy; 0x8fuy; 0xa8uy; 0x08uy; 0x57uy; 0xbauy; 0xeeuy;
      0x75uy; 0x6auy; 0x07uy; 0x99uy; 0x7fuy; 0x1cuy; 0xe3uy; 0x46uy; 0x67uy; 0xecuy; 0x27uy; 0x36uy; 0xb4uy; 0x65uy; 0x9euy; 0x9auy
]

let x = 0

Results in the following code

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant