Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- handleLoad :: Maybe FilePath -> Cli ()
- loadUnisonFile :: Text -> Text -> Cli ()
- data EvalMode
- evalUnisonFile :: EvalMode -> PrettyPrintEnv -> TypecheckedUnisonFile Symbol Ann -> [String] -> Cli (Either Error ([(Symbol, Term Symbol ())], Map Symbol (Ann, WatchKind, Id, Term Symbol (), Term Symbol (), Bool)))
Documentation
evalUnisonFile :: EvalMode -> PrettyPrintEnv -> TypecheckedUnisonFile Symbol Ann -> [String] -> Cli (Either Error ([(Symbol, Term Symbol ())], Map Symbol (Ann, WatchKind, Id, Term Symbol (), Term Symbol (), Bool))) Source #
Evaluate all watched expressions in a UnisonFile and return their results, keyed by the name of the watch variable. The tuple returned has the form: (hash, (ann, sourceTerm, evaluatedTerm, isCacheHit))
where
hash
is the hash of the original watch expression definition
ann
gives the location of the watch expression
sourceTerm
is a closed term (no free vars) for the watch expression
evaluatedTerm
is the result of evaluating that sourceTerm
isCacheHit
is True if the result was computed by just looking up
in a cache
It's expected that the user of this action might add the `(hash, evaluatedTerm)` mapping to a cache to make future evaluations of the same watches instantaneous.