packages feed

mueval 0.8.1 → 0.8.2

raw patch · 4 files changed

+34/−25 lines, 4 filesdep ~basedep ~hintdep ~mtl

Dependency ranges changed: base, hint, mtl

Files

HCAR.tex view
@@ -6,30 +6,32 @@ \status{active development} \makeheader -Mueval is a code evaluator for Haskell; it employs the GHC API as provided by the Hint library (\url{http://haskell.org/communities/11-2008/html/report.html#hint}). It uses a variety of techniques to evaluate arbitrary Haskell expressions safely \& securely. Since it was begun in June 2008, tremendous progress has been made; it is currently used in Lambdabot live in \#haskell). Mueval can also be called from the command-line.+See: \url{http://www.haskell.org/communities/05-2010/html/report.html#sect5.3.3}. -Mueval features:-\begin{itemize}-\item A comprehensive test-suite of expressions which should and should not work-\item Defeats all known attacks-\item Optional resource limits and module imports-\item The ability to load in definitions from a specified file-\item Parses Haskell expressions with haskell-src-exts and tests against black- and white-lists-\item A process-level watchdog, to work around past and future GHC issues with thread-level watchdogs-\item Cabalized-\end{itemize}+% Mueval is a code evaluator for Haskell; it employs the GHC API as provided by the Hint library (\url{http://haskell.org/communities/11-2008/html/report.html#hint}). It uses a variety of techniques to evaluate arbitrary Haskell expressions safely \& securely. Since it was begun in June 2008, tremendous progress has been made; it is currently used in Lambdabot live in \#haskell). Mueval can also be called from the command-line. -Since the November 2009 HCAR report, the internals have been cleaned up further, a number of minor bugs squashed, tests added, and mueval updated to avoid bitrot.+% Mueval features:+% \begin{itemize}+% \item A comprehensive test-suite of expressions which should and should not work+% \item Defeats all known attacks+% \item Optional resource limits and module imports+% \item The ability to load in definitions from a specified file+% \item Parses Haskell expressions with haskell-src-exts and tests against black- and white-lists+% \item A process-level watchdog, to work around past and future GHC issues with thread-level watchdogs+% \item Cabalized+% \end{itemize} -We are currently working on the following:-\begin{itemize}-\item Refactoring modules to render Mueval more useful as a library-\item Removing the POSIX-only requirement-\item Merging in Chris Done's \href{http://github.com/chrisdone/mueval-interactive}{mueval-interactive} fork, which powers \url{http://tryhaskell.org/}-\end{itemize}+% Since the November 2009 HCAR report, the internals have been cleaned up further, a number of minor bugs squashed, tests added, and mueval updated to avoid bitrot. -\FurtherReading-The source repository is available:- \texttt{darcs get}- \text{\url{http://code.haskell.org/mubot/}}+% We are currently working on the following:+% \begin{itemize}+% \item Refactoring modules to render Mueval more useful as a library+% \item Removing the POSIX-only requirement+% \item Merging in Chris Done's \href{http://github.com/chrisdone/mueval-interactive}{mueval-interactive} fork, which powers \url{http://tryhaskell.org/}+% \end{itemize}++% \FurtherReading+% The source repository is available:+%  \texttt{darcs get}+%  \text{\url{http://code.haskell.org/mubot/}} \end{hcarentry}
Mueval/Interpreter.hs view
@@ -120,7 +120,7 @@ exceptionMsg = "*Exception: "  -- | Renders the input String including its exceptions using @exceptionMsg@-render :: (Control.Monad.Trans.MonadIO m)+render :: (Control.Monad.Trans.MonadIO m, Functor m)           => Int -- ^ max number of characters to include           -> String -- ^ input           -> m (String, Bool) -- ^ ( output, @True@ if we found an exception )
mueval.cabal view
@@ -1,5 +1,5 @@ name:                mueval-version:             0.8.1+version:             0.8.2  license:             BSD3 license-file:        LICENSE@@ -31,7 +31,7 @@ library         exposed-modules:     Mueval.Parallel, Mueval.Context, Mueval.Interpreter,                              Mueval.ArgsParse, Mueval.Resources-        build-depends:       base>=4 && < 5, containers, directory, mtl<1.2, filepath, unix, process,+        build-depends:       base>=4 && < 5, containers, directory, mtl>2, filepath, unix, process,                              hint>=0.3.1, show>=0.3, utf8-string, Cabal, extensible-exceptions         ghc-options:         -Wall -static -O2 
tests.sh view
@@ -63,6 +63,13 @@ m 'let f = (id *** id) in f (3, 4)' ### Test Control.Applicative m "(foldr (liftA2 (||)) (const False) [isDigit, isAlpha]) '3'"+### Test SimpleReflect <http://twanvl.nl/blog/haskell/simple-reflection-of-expressions>+m "sum $ map (*x) [1..5]"+m "iterate (^2) x"+m "scanl f x [a,b,c]"+m "zipWith3 f [1,2..] [1,3..] [1,4..] :: [Expr]"+m "sum [1..5] :: Expr"+m "foldr f x [1..5]" ## Test defaulting of expressions m 'show []' -E m '(+1) <$> [1..3]'