module Burrito
( Parse.parse,
Template.render,
Expand.expand,
Expand.expandWith,
Match.match,
TH.uriTemplate,
TH.expandTH,
Template.Template,
Value.Value,
stringValue,
listValue,
dictionaryValue,
)
where
import qualified Burrito.Internal.Expand as Expand
import qualified Burrito.Internal.Match as Match
import qualified Burrito.Internal.Parse as Parse
import qualified Burrito.Internal.TH as TH
import qualified Burrito.Internal.Type.Template as Template
import qualified Burrito.Internal.Type.Value as Value
import qualified Data.Bifunctor as Bifunctor
import qualified Data.Map as Map
import qualified Data.Text as Text
stringValue :: String -> Value.Value
stringValue :: String -> Value
stringValue = Text -> Value
Value.String forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack
listValue :: [String] -> Value.Value
listValue :: [String] -> Value
listValue = [Text] -> Value
Value.List forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> Text
Text.pack
dictionaryValue :: [(String, String)] -> Value.Value
dictionaryValue :: [(String, String)] -> Value
dictionaryValue =
Map Text Text -> Value
Value.Dictionary forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
Bifunctor.bimap String -> Text
Text.pack String -> Text
Text.pack)