See "Operator Names"

[link:research.microsoft.com]

(especially the bit about prepending a twiddle (~) for prefix ops) and "Symbolic Operators"

[link:research.microsoft.com]

for some details, though I am not sure if the spec is sufficiently complete to answer all these questions.

By on 1/12/2009 8:01 PM ()

Unfortunately I got same error with tilda sign:
> let (~<?>) a = -a;;
val ( ~<?> ) : int -> int
> <?>1;;
<?>1;; ^^^^
stdin(23,1): error FS0010: Unexpected infix operator in definition
And symbolic names can be '?' and '|':

regexp first-op-char =

!$%&*+-./<=>?@^|~

regexp op-char = first-op-char | :

token symbolic-op =

| first-op-char op-char*

Or I don't understand the documetation. :(Anyway, thanks for your answer.

By on 1/12/2009 8:17 PM ()

> let (~<?>) a = -a;;
val ( ~<?> ) : int -> int
> <?>1;;
<?>1;; ^^^^Interesting. This code works fine:

> ~<?>1;;val it : int = -1>

By on 1/12/2009 9:55 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper