F# Type declaration possible ala Haskell?

Viewed 4226

I've looked a number of sources: it seems not possible to declare a type definition in F# ala Haskell:

' haskell type def:
myFunc :: int -> int

I'd like to use this type-def style in F#--FSI is happy to echo back to me:

fsi> let myType x = x +1;;

val myType : int -> int

I'd like to be explicit about the type def signature in F# as in Haskell. Is there a way to do this? I'd like to write in F#:

//invalid F#
myFunc : int -> int
myFunc x = x*2
6 Answers
Related