packages feed

cruncher-types 1.0.3 → 1.1.0

raw patch · 5 files changed

+22/−17 lines, 5 filesdep +lensdep −bytestringdep ~aesondep ~basedep ~containers

Dependencies added: lens

Dependencies removed: bytestring

Dependency ranges changed: aeson, base, containers, text

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2013, Ricky Elrod+Copyright (c) 2014, Ricky Elrod  All rights reserved. 
cruncher-types.cabal view
@@ -1,5 +1,5 @@ name:                cruncher-types-version:             1.0.3+version:             1.1.0 synopsis:            Request and Response types for Eval.so's API description:   You are not likely to find this useful unless you are building a library for@@ -9,7 +9,7 @@ license-file:        LICENSE author:              Ricky Elrod maintainer:          ricky@elrod.me-copyright:           2013 - Ricky Elrod+copyright:           2014 - Ricky Elrod category:            Eval.so build-type:          Simple cabal-version:       >=1.18@@ -25,11 +25,11 @@   default-language:    Haskell2010    build-depends:-      base ==4.6.*-    , bytestring ==0.10.*-    , containers ==0.5.*-    , text ==0.11.*-    , aeson ==0.6.*+      base > 4 && < 5+    , containers >= 0.5+    , text >= 0.11+    , aeson >= 0.6+    , lens >= 4 && < 5  test-suite hlint   hs-source-dirs: tests
src/Evalso/Cruncher/FinalResult.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings, Trustworthy #-}+{-# LANGUAGE OverloadedStrings, TemplateHaskell, Trustworthy #-} -- | -- Maintainer  : Ricky Elrod <ricky@elrod.me> -- Stability   : stable@@ -10,8 +10,7 @@  import Evalso.Cruncher.SandboxResult -import Control.Applicative-import Control.Monad (mzero)+import Control.Lens hiding ((.=)) import Data.Aeson  -- | The final result for a given request.@@ -26,6 +25,8 @@   | NoSuchLanguage   | SELinuxNotEnforcing   deriving (Eq, Show)++makeLenses ''FinalResult  instance ToJSON FinalResult where   toJSON (FinalResult compile' run') = object
src/Evalso/Cruncher/Request.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings, Trustworthy #-}+{-# LANGUAGE OverloadedStrings, TemplateHaskell, Trustworthy #-} -- | -- Maintainer  : Ricky Elrod <ricky@elrod.me> -- Stability   : stable@@ -9,9 +9,9 @@ module Evalso.Cruncher.Request (Request (..)) where  import Control.Applicative+import Control.Lens import Control.Monad (mzero) import Data.Aeson-import Data.ByteString (ByteString) import Data.Map (Map) import qualified Data.Text as T @@ -20,10 +20,12 @@ data Request = Request {     language    :: String   , code        :: T.Text-  , inputFiles  :: Maybe (Map String ByteString)+  , inputFiles  :: Maybe (Map String T.Text)   , compileOnly :: Bool   , stdin       :: Maybe T.Text } deriving (Eq, Show)++makeLenses ''Request  instance FromJSON Request where   parseJSON (Object v) = Request <$>
src/Evalso/Cruncher/SandboxResult.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings, Trustworthy #-}+{-# LANGUAGE OverloadedStrings, TemplateHaskell, Trustworthy #-} -- | -- Maintainer  : Ricky Elrod <ricky@elrod.me> -- Stability   : stable@@ -11,9 +11,9 @@ module Evalso.Cruncher.SandboxResult (SandboxResult (..)) where  import Control.Applicative+import Control.Lens hiding ((.=)) import Control.Monad (mzero) import Data.Aeson-import Data.ByteString (ByteString) import Data.Map (Map) import Data.Text (Text) @@ -24,8 +24,10 @@   , stderr      :: Text -- ^ Standard error stream   , wallTime    :: Int -- ^ How long the process took   , exitCode    :: Int -- ^ The exit code returned by the process-  , outputFiles :: Map String ByteString  -- ^ Base64-encoded output files+  , outputFiles :: Map String Text -- ^ Base64-encoded output files } deriving (Eq, Show)++makeLenses ''SandboxResult  instance ToJSON SandboxResult where   toJSON (SandboxResult stdout' stderr' wallTime' exitCode' outputFiles') = object