moving API code

This commit is contained in:
2024-11-09 21:28:31 +00:00
parent b6926e0998
commit a9400d9079
2 changed files with 16 additions and 9 deletions

View File

@@ -1,15 +1,15 @@
{-# LANGUAGE OverloadedStrings #-}
module P2Prc ( runP2Prc )
where
module P2Prc ( runP2Prc ) where
import System.Process ( ProcessHandle, terminateProcess )
import System.Process
( ProcessHandle
, terminateProcess
)
import Control.Concurrent ( threadDelay )
import Data.Aeson
import Data.Aeson ( FromJSON )
import Environment ( cleanEnvironment )
@@ -23,6 +23,14 @@ import JSON
)
import CLI
( StdInput(..)
, CLIOpt(..)
, eitherErrDecode
, getP2PrcCmd
, eitherExecProcess
, eitherExecProcessParser
, spawnProcP2Prc
)
-- URGENT TASKS
@@ -47,9 +55,6 @@ import CLI
-- TODO: add use case examples (extra-source_files)
-- Module: API
runP2Prc :: IO ()
runP2Prc = do
@@ -135,6 +140,7 @@ runP2Prc = do
(Left err) -> print err
-- Module: API
data P2prAPI = MkP2prAPI
{ startServer :: IOEitherError ProcessHandle