<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi list,<div><br></div><div>I am pleased to announce the first release of hmatrix-syntax [1], which provides quasiquoters to provide a nice syntax for vectors and matrices in Alberto Ruiz's excellent matrix package[2].</div><div><br></div><div>Examples:</div><div><br></div><div>> {-# LANGUAGE QuasiQuotes, ViewPatterns #-}</div><div>></div><div>> import Data.Packed</div><div>> import Data.Packed.Syntax</div><div>> import Foreign.Storable</div><div>></div><div>> -- vectors can be constructed and deconstructed</div><div>> swap :: Storable a => Vector a -> Vector a</div><div>> swap [vec| x, y |] = [vec| y, x |]</div><div>></div><div>> -- matrices can be constructed and deconstructed</div><div>> adjugateMat2 :: (Storable a, Num a) => Matrix a -> Matrix a</div><div>> adjugateMat2 [mat| a, b; c, d |] = [mat| d, -b; -c, a |]</div><div><br></div><div>These constructions and deconstructions are expanded into direct array accesses.</div><div><br></div><div>Regards,</div><div>Reiner</div><div><br></div><div>[1]: <a href="http://hackage.haskell.org/package/hmatrix-syntax">http://hackage.haskell.org/package/hmatrix-syntax</a></div><div>[2]: <a href="http://hackage.haskell.org/package/hmatrix">http://hackage.haskell.org/package/hmatrix</a></div></body></html>