Here is a code snippet which I have written:
let Foo (a : (int * int) seq) = ();;
val Foo : seq<int * int> -> unit
let inline Bar (a : (a' * int) seq) = ();;
let Bar (a : (a' * int) seq) =
--------------^^
stdin(8,15): error FS0039: The type 'a'' is not defined
>
My intention was that Bar should be a function to which I can pass tuples with different types like (string * int) or (float * int). Why can’t I define my function this way?
The tick (‘) comes before the type variable, not after it (that is, you want to use
'a, nota').Also, you are unlikely to need to use
inlinein your declaration.