{-# LANGUAGE NoImplicitPrelude #-}
module JsonLogic.Pure.Operation
( defaultOperations,
arrayOperations, map, reduce, filter, all, none, some, merge, in',
booleanOperations, if', (==), (===), (!=), (!==), (!), (!!), and, or,
dataOperations, var, missing, missingSome, preserve,
miscOperations, trace,
numericOperations, (>), (>=), (<), (<=), max, min, sum, (+), (-), (*), (/), (%),
stringOperations, cat, substr,
evaluateDouble, evaluateInt, evaluateBool, evaluateArray, evaluateObject, evaluateString
)
where
import JsonLogic.Json
import qualified JsonLogic.Operation as O
import JsonLogic.Pure.Mapping
import JsonLogic.Pure.Type
import qualified Prelude as P
defaultOperations :: Operations
defaultOperations :: Operations
defaultOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.defaultOperations
arrayOperations, booleanOperations, dataOperations, miscOperations, numericOperations, stringOperations :: Operations
arrayOperations :: Operations
arrayOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.arrayOperations
booleanOperations :: Operations
booleanOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.booleanOperations
dataOperations :: Operations
dataOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.dataOperations
miscOperations :: Operations
miscOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.miscOperations
numericOperations :: Operations
numericOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.numericOperations
stringOperations :: Operations
stringOperations = Operations Identity -> Operations
toOperations Operations Identity
forall (m :: * -> *). Monad m => Operations m
O.stringOperations
map, reduce, filter, all, none, some, merge, in' :: Operation
map :: Operation
map = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.map
reduce :: Operation
reduce = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.reduce
filter :: Operation
filter = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.filter
all :: Operation
all = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.all
none :: Operation
none = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.none
some :: Operation
some = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.some
merge :: Operation
merge = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.merge
in' :: Operation
in' = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.in'
if', (==), (===), (!=), (!==), (!), (!!), and, or :: Operation
if' :: Operation
if' = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.if'
== :: Operation
(==) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.==)
=== :: Operation
(===) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.===)
!= :: Operation
(!=) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.!=)
!== :: Operation
(!==) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.!==)
(!) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.!)
!! :: Operation
(!!) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.!!)
and :: Operation
and = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.and
or :: Operation
or = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.or
var, missing, missingSome, preserve :: Operation
var :: Operation
var = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.var
missing :: Operation
missing = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.missing
missingSome :: Operation
missingSome = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.missingSome
preserve :: Operation
preserve = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.preserve
trace :: Operation
trace :: Operation
trace = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.trace
(>), (>=), (<), (<=), max, min, sum, (+), (-), (*), (/), (%) :: Operation
> :: Operation
(>) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.>)
>= :: Operation
(>=) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.>=)
< :: Operation
(<) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.<)
<= :: Operation
(<=) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.<=)
max :: Operation
max = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.max
min :: Operation
min = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.min
sum :: Operation
sum = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.sum
+ :: Operation
(+) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.+)
(-) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.-)
* :: Operation
(*) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.*)
/ :: Operation
(/) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O./)
% :: Operation
(%) = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
(O.%)
cat, substr :: Operation
cat :: Operation
cat = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.cat
substr :: Operation
substr = Operation Identity -> Operation
toOperation Operation Identity
forall (m :: * -> *). Monad m => Operation m
O.substr
evaluateDouble :: Function P.Double
evaluateDouble :: Function Double
evaluateDouble = Function Identity Double -> Function Double
forall r. Function Identity r -> Function r
toFunction Function Identity Double
forall (m :: * -> *). Monad m => Function m Double
O.evaluateDouble
evaluateInt :: Function P.Int
evaluateInt :: Function Int
evaluateInt = Function Identity Int -> Function Int
forall r. Function Identity r -> Function r
toFunction Function Identity Int
forall (m :: * -> *). Monad m => Function m Int
O.evaluateInt
evaluateBool :: Function P.Bool
evaluateBool :: Function Bool
evaluateBool = Function Identity Bool -> Function Bool
forall r. Function Identity r -> Function r
toFunction Function Identity Bool
forall (m :: * -> *). Monad m => Function m Bool
O.evaluateBool
evaluateArray :: Function [Json]
evaluateArray :: Function [Json]
evaluateArray = Function Identity [Json] -> Function [Json]
forall r. Function Identity r -> Function r
toFunction Function Identity [Json]
forall (m :: * -> *). Monad m => Function m [Json]
O.evaluateArray
evaluateObject :: Function JsonObject
evaluateObject :: Function JsonObject
evaluateObject = Function Identity JsonObject -> Function JsonObject
forall r. Function Identity r -> Function r
toFunction Function Identity JsonObject
forall (m :: * -> *). Monad m => Function m JsonObject
O.evaluateObject
evaluateString :: Function P.String
evaluateString :: Function String
evaluateString = Function Identity String -> Function String
forall r. Function Identity r -> Function r
toFunction Function Identity String
forall (m :: * -> *). Monad m => Function m String
O.evaluateString