Add patched version of Tensor for GHC HEAD