Haskell Jones-Faithful notation (also called coordinate triplet) Library
repl> :m Data.Matrix.AsXYZ
repl> fromXYZ "x,y,z"
┌ ┐
│ 1 % 1 0 % 1 0 % 1 0 % 1 │
│ 0 % 1 1 % 1 0 % 1 0 % 1 │
│ 0 % 1 0 % 1 1 % 1 0 % 1 │
│ 0 % 1 0 % 1 0 % 1 1 % 1 │
└ ┘
repl> :m Data.Matrix Data.Matrix.AsXYZ
repl> prettyXYZ . identity $ 4
"x,y,z"
If you wanna use newest version, edit stack.yaml like below.
extra-deps:
- location: https://github.com/narumij/matrix-as-xyz/archive/0.1.2.1.tar.gz
See the LICENSE file in the repository.