I was chatting with Sadek Drobi on twitter when be brought up that F# didn\'t seem to support Infinite Types. It turns out that in C# you can do something along these lines
Recursive record types should work as well.
type A = { A : A }
let rec a : A = { A = a }
I'd be interested in a practical application. Or even an impractical one :)
type d<'T> = delegate of 'T -> d<'T> //'
let del : d<int> = null
let anotherDel = del.Invoke(1).Invoke(2).Invoke(3)
I think you need a named type that is representable directly in CLI to break the recursion, so in F# this means you need an actual delegate type as well.
You can also do something like
type 'a RecType = RecType of ('a -> 'a RecType)
to create a named type through which to perform the recursion. Now this works:
let rec specialF = RecType (fun _ -> specialF)