Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Defines a quasi-quoting parser for unit expressions. Writing, say,
[si| m/s^2 |]
produces (Meter :/ (Second :^ sTwo))
. A larger
example is
ke :: Energy ke = 5 % [si| N km |] -- 5 Newton-kilometers
See Parser
for more information about the syntax
of these unit expressions.
Documentation
si :: QuasiQuoter Source #