In Haskell, I use the Data.Map
module, and its principal type of the same name, Data.Map.Map
, like this:
import Data.Map (Map)
import qualified Data.Map as M
In F#, I want to do something similar with my Item
module, which contains a type of the same name:
module Item
type Item = { Description: string }
let empty = { Description = "" }
I can't find a way to use this module qualified and the type unqualified. Can I use this module and type like this, from another module?
let getItem (): Item = Item.empty
Edit:
Adding a type alias from a client module lets me use the Item
module with qualification and the Item
type without qualification, but is there a better way still?
type Item = Item.Item