separate library (lib/Tensor.hs) from main.hs