{-# LANGUAGE OverloadedStrings #-}
module Miso.Property
(
textProp
, stringProp
, boolProp
, intProp
, integerProp
, doubleProp
, prop
) where
import Data.Aeson (ToJSON(..))
import Miso.Types
import Miso.String (MisoString)
prop :: ToJSON a => MisoString -> a -> Attribute action
prop :: forall a action. ToJSON a => MisoString -> a -> Attribute action
prop MisoString
k a
v = MisoString -> Value -> Attribute action
forall action. MisoString -> Value -> Attribute action
Property MisoString
k (a -> Value
forall a. ToJSON a => a -> Value
toJSON a
v)
boolProp :: MisoString -> Bool -> Attribute action
boolProp :: forall action. MisoString -> Bool -> Attribute action
boolProp = MisoString -> Bool -> Attribute action
forall a action. ToJSON a => MisoString -> a -> Attribute action
prop
stringProp :: MisoString -> String -> Attribute action
stringProp :: forall action. MisoString -> String -> Attribute action
stringProp = MisoString -> String -> Attribute action
forall a action. ToJSON a => MisoString -> a -> Attribute action
prop
textProp :: MisoString -> MisoString -> Attribute action
textProp :: forall action. MisoString -> MisoString -> Attribute action
textProp = MisoString -> MisoString -> Attribute action
forall a action. ToJSON a => MisoString -> a -> Attribute action
prop
intProp :: MisoString -> Int -> Attribute action
intProp :: forall action. MisoString -> Int -> Attribute action
intProp = MisoString -> Int -> Attribute action
forall a action. ToJSON a => MisoString -> a -> Attribute action
prop
integerProp :: MisoString -> Integer -> Attribute action
integerProp :: forall action. MisoString -> Integer -> Attribute action
integerProp = MisoString -> Integer -> Attribute action
forall a action. ToJSON a => MisoString -> a -> Attribute action
prop
doubleProp :: MisoString -> Double -> Attribute action
doubleProp :: forall action. MisoString -> Double -> Attribute action
doubleProp = MisoString -> Double -> Attribute action
forall a action. ToJSON a => MisoString -> a -> Attribute action
prop