globaljoins restricted System.IO.Unsafe import
simplified defineJoin by hiding Join type