google-research / dex-lang

Research language for array processing in the Haskell/ML family
BSD 3-Clause "New" or "Revised" License
1.58k stars 107 forks source link

Compiler bug in `rand_int` #1196

Closed emilyfertig closed 1 year ago

emilyfertig commented 1 year ago

Calling rand_int throws the following:

rand_int (new_key 0)
> Compiler bug!
> Please report this at github.com/google-research/dex-lang/issues
>
> Pattern match failure in do expression at src/lib/Imp.hs:464:5-13
> CallStack (from HasCallStack):
>   error, called at src/lib/Err.hs:222:12 in dex-0.1.0.0-56tlNzHvZd2Epf2TOu8iN7:Err
dougalm commented 1 year ago

Thanks for the bug report. We were incorrectly using internal_cast and we'd disabled the test for rand_int. Fixed by #1208.