What is the meaning of the # sign before the type in the signature (F #)?

I saw the following # sign in some libraries and don’t know what its meaning is:

let Compile (e: #Expr)

Expr refers to FSharp.Quotations.Expr in this case - not sure if this is relevant.

+4
source share
1 answer

#Expris a shortcut for 'T when 'T :> Exprwhich can be read as

some type, which we will call now T, which is compatible with the typeExpr

MSDN has additional documentation on Flexible Types .

See also. What is the purpose of flexible type annotation in F #? here in a stack overflow.

+8
source

All Articles