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
Original bug ID: 1014 Reporter: administrator Status: closed (set by @xavierleroy on 2006-06-17T09:27:41Z) Resolution: fixed Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Pierre Letouzey
Version: 3.04
OS: linux
Submission from: pc8-119.lri.fr (129.175.8.119)
I am looking for a convenient way of using the list constructor
as any other constructors, i.e. in a prefix way.
By analogy with the infix functions like (+) 3 5, I first though of
the syntax (::) (3,[]) but it seems not to be allowed.
If I define an alias like "let cons (a,l) = a::l", then I can't use it in a
pattern matching.
I acknowledge that the infix :: syntax is almost always ok, but in my
particular
it could be useful to have also a prefix one. I do automatic generation of
ocaml
code from Coq terms, and this particular case is a bit annoying.
If (::) or a primitive Cons alias could be done, then thank you. If not, never
mind...
Pierre Letouzey
The text was updated successfully, but these errors were encountered:
Original bug ID: 1014
Reporter: administrator
Status: closed (set by @xavierleroy on 2006-06-17T09:27:41Z)
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Pierre Letouzey
Version: 3.04
OS: linux
Submission from: pc8-119.lri.fr (129.175.8.119)
I am looking for a convenient way of using the list constructor
as any other constructors, i.e. in a prefix way.
By analogy with the infix functions like (+) 3 5, I first though of
the syntax (::) (3,[]) but it seems not to be allowed.
If I define an alias like "let cons (a,l) = a::l", then I can't use it in a
pattern matching.
I acknowledge that the infix :: syntax is almost always ok, but in my
particular
it could be useful to have also a prefix one. I do automatic generation of
ocaml
code from Coq terms, and this particular case is a bit annoying.
If (::) or a primitive Cons alias could be done, then thank you. If not, never
mind...
Pierre Letouzey
The text was updated successfully, but these errors were encountered: