compress :: Text -> IO Text
compress src = do
  result <- readAllFromProcess "java"
                               ["-jar"
                               ,"/home/chris/Projects/fpco/learning-site/tools/closure-compiler.jar"
                               ,"--compilation_level=ADVANCED_OPTIMIZATIONS"]
                               src
  case result of
    Left err -> error (T.unpack err)
    Right (_,out) -> return out

--------------------------------------------------------------------------------
-- Utilities that should be moved to other modules

-- | Read all stuff from a process.
compress :: Text -> IO Text
compress src = do
  result <- readAllFromProcess "java"
                               ["-jar"
                               ,"/home/chris/Projects/fpco/learning-site/tools/closure-compiler.jar"
                               ,"--compilation_level=ADVANCED_OPTIMIZATIONS"]
                               src
  case result of
    Left err -> error (T.unpack err)
    Right (_,out) -> return out

--------------------------------------------------------------------------------
-- Utilities that should be moved to other modules

-- | Read all stuff from a process.
compress src = do
  result <- readAllFromProcess "java"
                               ["-jar"
                               ,"/home/chris/Projects/fpco/learning-site/tools/closure-compiler.jar"
                               ,"--compilation_level=ADVANCED_OPTIMIZATIONS"]
                               src
  case result of
    Left err -> error (T.unpack err)
    Right (_,out) -> return out

--------------------------------------------------------------------------------
-- Utilities that should be moved to other modules

-- | Read all stuff from a process.