Safe Haskell | None |
---|
The main import. Modules using these quasiquoters need the following language pragma:
{-# LANGUAGE QuasiQuotes, ViewPatterns #-}
- vec :: QuasiQuoter
- mat :: QuasiQuoter
Documentation
Quasiquoter for vectors. For example, use as an expression:
buildVec x = [vec| x, sin x |]
or use as a pattern:
swap [vec| x, y |] = [vec| y, x |]
Quasiquoter for matrices. For example, use as an expression:
buildMat x y = [mat| x, y; x + y, sin y |]
or use as a pattern:
adjugateMat2 [mat| a, b; c, d |] = [mat| d, -b; -c, a |]
If row sizes don't match, this will be caught at compile time.