This parser accepts JsonLogic rules and executes them in Haskell
This is a Haskell porting of the excellent GitHub project by jwadhams for JavaScript: json-logic-js.
All credit goes to him, this is simply an implementation of the same logic in Haskell (small differences below).
The JsonLogic format is designed to allow you to share rules (logic) between front-end and back-end code (regardless of language difference), even to store logic along with a record in a database. JsonLogic is documented extensively at JsonLogic.com, including examples of every supported operation and a place to try out rules in your browser.
The same format can also be executed in PHP by the library json-logic-php
import JsonLogic
import Data.Aeson as A
import qualified Data.Aeson.QQ.Simple as AQ
test :: IO ()
test = do
let tests = [AQ.aesonQQ|{ "==": [1,1]}|]
let data_ = A.Null
print $ jsonLogic tests data_