FStarLang / FStar

A Proof-oriented Programming Language
https://fstar-lang.org
Apache License 2.0
2.68k stars 231 forks source link

Cannot match implicit arg using constructor #3448

Open mtzguido opened 3 weeks ago

mtzguido commented 3 weeks ago

The second match fails with 'syntax error', but the fact that the argument is implicit should not make a difference.

noeq
type t2 = | Mk2 : _:int -> t2

let test2 (x:t2) : int =
  match x with
  | Mk2 0 -> 0
  | _ -> 1

noeq
type t1 = | Mk1 : #_:int -> t1

let test1 (x:t1) : int =
  match x with
  | Mk1 #0 -> x
  | _ -> 1