f : {n} [n]
f | prime n => zero
| fin n => zero
| n == n => zero
$ cabal -v0 run exe:cryptol -- Bug.cry
┏━╸┏━┓╻ ╻┏━┓╺┳╸┏━┓╻
┃ ┣┳┛┗┳┛┣━┛ ┃ ┃ ┃┃
┗━╸╹┗╸ ╹ ╹ ╹ ┗━┛┗━╸
version 3.5.0.99 (6de5aa8, modified)
https://cryptol.net :? for help
Loading module Cryptol
Loading module Main
cryptol: You have encountered a bug in Cryptol's implementation.
*** Please create an issue at https://github.com/GaloisInc/cryptol/issues
%< ---------------------------------------------------
Revision: 6de5aa8cc28e4b5fed8438a41a3549ecbe857002
Branch: master (uncommited files present)
Location: pNegNumeric
Message: Unexpected numeric constraint:
prime n`901
CallStack (from HasCallStack):
panic, called at src/Cryptol/Utils/Panic.hs:21:9 in cryptol-3.5.0.99-inplace:Cryptol.Utils.Panic
panic, called at src/Cryptol/TypeCheck/Type.hs:1018:9 in cryptol-3.5.0.99-inplace:Cryptol.TypeCheck.Type
%< ---------------------------------------------------
The following program causes the
masterbranch of Cryptol (as of commit 6de5aa8) to panic: