packages feed

mulang-3.5.2: src/Language/Mulang/Analyzer/ExpectationsAnalyzer.hs

module Language.Mulang.Analyzer.ExpectationsAnalyzer (
  analyseExpectations) where


import Language.Mulang
import Language.Mulang.Analyzer.Analysis (Expectation, ExpectationResult(..))
import Language.Mulang.Analyzer.ExpectationsCompiler (compileExpectation)

analyseExpectations :: Expression -> [Expectation]-> [ExpectationResult]
analyseExpectations content = map (analyseExpectation content)

analyseExpectation :: Expression -> Expectation -> ExpectationResult
analyseExpectation ast e = ExpectationResult e (compileAndEval e)
  where compileAndEval e = (compileExpectation e) ast