import           Data.UUID.V4          (nextRandom)
import           Data.Either           (either)
import           GHC.Generics          (Generic)

import qualified Language as L
import Expression.Expr

expressionScenario :: String -> L.Flow (Maybe Val)
expressionScenario fileName = do
  jsonRequest <- L.runIO $ readFile fileName
  let eRes = do
        precExpr <- eitherDecode $ BCL.pack jsonRequest
        eval precExpr
  case eRes of