You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following function definition (from Sail) typechecks and produces useful output for Isabelle/HOL and HOL4, but not OCaml or Coq:
val foreach : forall 'a 'vars.
(list 'a) -> 'vars -> ('a -> 'vars -> 'vars) -> 'vars
let rec foreach [] vars _ = vars
and foreach (x :: xs) vars body = foreach xs (body x vars) body
The resulting code for OCaml and Coq has the same structure, which they don't allow (the clauses have to define different functions), whereas the HOLs get the obvious equations. I'm not sure if we ought to reject this in typechecking or translate it into a supported pattern match.
The text was updated successfully, but these errors were encountered:
The following function definition (from Sail) typechecks and produces useful output for Isabelle/HOL and HOL4, but not OCaml or Coq:
The resulting code for OCaml and Coq has the same structure, which they don't allow (the clauses have to define different functions), whereas the HOLs get the obvious equations. I'm not sure if we ought to reject this in typechecking or translate it into a supported pattern match.
The text was updated successfully, but these errors were encountered: