{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Data.ByteArray.HexString.TH where
import Data.ByteArray.HexString.Internal (HexString)
import Data.String (fromString)
import Language.Haskell.TH.Quote (QuasiQuoter (..), quoteFile)
hexFrom :: QuasiQuoter
hexFrom :: QuasiQuoter
hexFrom = QuasiQuoter -> QuasiQuoter
quoteFile QuasiQuoter
hex
hex :: QuasiQuoter
hex :: QuasiQuoter
hex = QuasiQuoter :: (String -> Q Exp)
-> (String -> Q Pat)
-> (String -> Q Type)
-> (String -> Q [Dec])
-> QuasiQuoter
QuasiQuoter
{ quoteExp :: String -> Q Exp
quoteExp = \String
s -> [|fromString s :: HexString|]
, quotePat :: String -> Q Pat
quotePat = String -> Q Pat
forall a. HasCallStack => a
undefined
, quoteType :: String -> Q Type
quoteType = String -> Q Type
forall a. HasCallStack => a
undefined
, quoteDec :: String -> Q [Dec]
quoteDec = String -> Q [Dec]
forall a. HasCallStack => a
undefined
}