I think it might be possible to define an [`IsList`](https://hackage.haskell.org/package/base-4.14.0.0/docs/GHC-Exts.html#t:IsList) instance for matrices.