I'm trying to use frege.java.Util
module to construct a Properties
instance. Here's the code:
module frege_test.Application where
import frege.java.Util (Properties)
main :: [String] -> IO Int
main _ = do
properties <- Properties.new ()
return 0
That don't compile, here's the compiler error:
E T:\Temp\frege-test\src\main\frege\Application.fr:7: overloaded new is ambiguos at type ()→IO t17332
It could mean one of
Properties.newα :: ∀ s.() → STMutable s Properties
Properties.newβ :: ∀ s.Mutable s Properties → STMutable s Properties
Util.Hashtable.newα :: ∀ s k v.() → STMutable s (Util.Hashtable k v)
Util.Hashtable.newβ :: ∀ s k v.Int → STMutable s (Util.Hashtable k v)
Util.Hashtable.newγ :: ∀ s k v.Int → Float → STMutable s (Util.Hashtable k v)
Util.Hashtable.newδ :: ∀ s k v.Mutable s (Util.Map k v) → STMutable s (Util.Hashtable k v)
frege_test.Application: build failed because of compilation errors.
What's up? I haven't even imported Util.Hashtable
. How could I resolve this ambiguity?