Reputation: 12137
let's say I have this:
module A =
let a () =
printfn "%A" DateTime.UtcNow
is there a way to do something like
type B = A
B.a()
or, any other mechanism that would allow to set up an alias?
Upvotes: 7
Views: 400
Reputation: 243096
You can alias modules in F#, but the syntax is module <NewName> = <OldName>
:
module A =
let a () =
printfn "%A" DateTime.UtcNow
module B = A
B.a()
Upvotes: 9