-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | MATLAB-like syntax for hmatrix vectors and matrices -- -- This package uses QuasiQuotes to provide a nice syntax for hmatrix -- vectors and matrices. To get started, see Data.Packed.Syntax. @package hmatrix-syntax @version 0.1.1 -- | Internal parsers. Most users should not need to use this module. module Data.Packed.Syntax.Internal -- | Parser for list expressions listExp :: String -> Either String [Exp] -- | Parser for list patterns listPat :: String -> Either String [Pat] -- | Parser for matrix expressions. Returns (outer length, inner length, -- matrix) matListExp :: String -> Either String (Int, Int, [[Exp]]) -- | Parser for matrix patterns. Returns (outer length, inner length, -- matrix) matListPat :: String -> Either String (Int, Int, [[Pat]]) -- | The main import. Modules using these quasiquoters need the following -- language pragma: -- --
--   {-# LANGUAGE QuasiQuotes, ViewPatterns #-}
--   
module Data.Packed.Syntax -- | 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 |]
--   
vec :: QuasiQuoter -- | 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. mat :: QuasiQuoter