| Copyright | (C) 2016-2025 David M. Johnson (@dmjio) |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.FFI.QQ
Description
A QuasiQuoter for `inline-js` functionality.
{-# LANGUAGE QuasiQuotes #-}
import Miso.FFI.QQ (js)
fac :: Int -> IO Int
fac n = [js|
let x = 1;
for (i = 1; i <= ${n}; i++) {
x *= i;
}
return x;
|]
Synopsis
- js :: QuasiQuoter
Documentation
js :: QuasiQuoter Source #
QuasiQuoter for specifying inline JavaScript.