The Data.HashMap.Strict
module exposes the data type HashMap
, but doesn't export its data constructors. It exports the empty
and singleton
functions instead:
empty :: HashMap k v
singleton :: (Hashable k) => k -> v -> HashMap k v
The latter can be used in your case:
unify [Var x,Var x1] [Obj a,Obj a1] NoBindings
| x==x1 = Bindings (H.singleton x a)
| otherwise = error $show x1