| 1 |
{-# LANGUAGE NoImplicitPrelude #-} |
| 2 |
{-# LANGUAGE CPP #-} |
| 3 |
#if __GLASGOW_HASKELL__ >= 800 |
| 4 |
{-# LANGUAGE TemplateHaskellQuotes #-} |
| 5 |
#else |
| 6 |
{-# LANGUAGE QuasiQuotes #-} |
| 7 |
{-# LANGUAGE TemplateHaskell #-} |
| 8 |
#endif |
| 9 |
|
| 10 |
module Text.RE.ZeInternals.SearchReplace.TDFA |
| 11 |
( ed |
| 12 |
, edMS |
| 13 |
, edMI |
| 14 |
, edBS |
| 15 |
, edBI |
| 16 |
, edMultilineSensitive |
| 17 |
, edMultilineInsensitive |
| 18 |
, edBlockSensitive |
| 19 |
, edBlockInsensitive |
| 20 |
, ed_ |
| 21 |
) where |
| 22 |
|
| 23 |
import Language.Haskell.TH |
| 24 |
import Language.Haskell.TH.Quote |
| 25 |
import Prelude.Compat |
| 26 |
import Text.RE.REOptions |
| 27 |
import Text.RE.ZeInternals.SearchReplace.TDFAEdPrime |
| 28 |
|
| 29 |
|
| 30 |
-- | the @[ed| ... /// ... |]@ quasi quoters |
| 31 |
ed |
| 32 |
, edMS |
| 33 |
, edMI |
| 34 |
, edBS |
| 35 |
, edBI |
| 36 |
, edMultilineSensitive |
| 37 |
, edMultilineInsensitive |
| 38 |
, edBlockSensitive |
| 39 |
, edBlockInsensitive |
| 40 |
, ed_ :: QuasiQuoter |
| 41 |
|
| 42 |
ed = ed' cast $ Just minBound |
| 43 |
edMS = edMultilineSensitive |
| 44 |
edMI = edMultilineInsensitive |
| 45 |
edBS = edBlockSensitive |
| 46 |
edBI = edBlockInsensitive |
| 47 |
edMultilineSensitive = ed' cast $ Just MultilineSensitive |
| 48 |
edMultilineInsensitive = ed' cast $ Just MultilineInsensitive |
| 49 |
edBlockSensitive = ed' cast $ Just BlockSensitive |
| 50 |
edBlockInsensitive = ed' cast $ Just BlockInsensitive |
| 51 |
ed_ = ed' cast Nothing |
| 52 |
|
| 53 |
cast :: Q Exp |
| 54 |
cast = [|id|] |