|
| 1 | +----------------------------------------------------------------------------- |
| 2 | +{-# LANGUAGE CPP #-} |
| 3 | +{-# LANGUAGE QuasiQuotes #-} |
| 4 | +{-# LANGUAGE NamedFieldPuns #-} |
| 5 | +{-# LANGUAGE RecordWildCards #-} |
| 6 | +{-# LANGUAGE TemplateHaskell #-} |
| 7 | +----------------------------------------------------------------------------- |
| 8 | +{-# OPTIONS_GHC -Wno-duplicate-exports #-} |
| 9 | +----------------------------------------------------------------------------- |
| 10 | +-- | |
| 11 | +-- Module : Miso.String.QQ |
| 12 | +-- Copyright : (C) 2016-2025 David M. Johnson (@dmjio) |
| 13 | +-- License : BSD3-style (see the file LICENSE) |
| 14 | +-- Maintainer : David M. Johnson <[email protected]> |
| 15 | +-- Stability : experimental |
| 16 | +-- Portability : non-portable |
| 17 | +---------------------------------------------------------------------------- |
| 18 | +module Miso.String.QQ |
| 19 | + ( misoString |
| 20 | + ) where |
| 21 | +---------------------------------------------------------------------------- |
| 22 | +import Language.Haskell.TH.Quote |
| 23 | +---------------------------------------------------------------------------- |
| 24 | +import Miso.String (toMisoString) |
| 25 | +---------------------------------------------------------------------------- |
| 26 | +misoString :: QuasiQuoter |
| 27 | +misoString = QuasiQuoter |
| 28 | + { quoteExp = \string -> [| toMisoString string |] |
| 29 | + , quotePat = \_ -> fail "quotePat: not implemented" |
| 30 | + , quoteType = \_ -> fail "quoteType: not implemented" |
| 31 | + , quoteDec = \_ -> fail "quoteDec: not implemented" |
| 32 | + } |
| 33 | +---------------------------------------------------------------------------- |
0 commit comments