Closed tahina-pro closed 5 years ago
Trying to fix this. A minimal repro fstar --codegen OCaml Bug1694.fst
module Bug1694
type t = #a:Type -> a -> Tot a
let f : t = fun #a x -> x
let h : t = f
FYI, this is high on my priority list since we are working around it by explicitly erasing preorder arguments in LowParse, which is making other code in miTLS clumsy to work with.
Consider the following example:
When trying to extract with
fstar.exe --extract_module Te --codegen Kremlin Te.fst
, I get the following error message:If I remove the definition of
h
, then extraction goes through, but actually,f
is not extracted at all, presumably because F* thinks thatf
is polymorphic.I was expecting F* to actually erase the
#rrel #rel
arguments off
instead of considering them as a source of polymorphism.