adding dummy library for haskell package
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
module Main where
|
||||
|
||||
|
||||
import P2Prc
|
||||
|
||||
import System.Exit
|
||||
( ExitCode(ExitFailure)
|
||||
)
|
||||
@@ -42,7 +45,7 @@ import Data.Aeson
|
||||
-- TODO: setup the project as a haskell library
|
||||
-- TODO: splitting code on different files and directories
|
||||
-- TODO: lock cabal index
|
||||
-- TODO: setup nix flake package
|
||||
-- TODO: add Haddock documentation
|
||||
--
|
||||
-- TODO: P2PRC setup
|
||||
-- p2prc runtime packaging
|
||||
@@ -54,11 +57,11 @@ import Data.Aeson
|
||||
-- check if p2prc command is available in environment first
|
||||
-- otherwise check folder above
|
||||
--
|
||||
-- TODO: add Haddock documentation
|
||||
--
|
||||
-- TODO: add quickcheck testing (quickchecking-dynamic)
|
||||
--
|
||||
-- TODO: publish haskell library
|
||||
--
|
||||
-- TODO: add use case examples (extra-source_files)
|
||||
|
||||
|
||||
|
||||
|
||||
main :: IO ()
|
||||
@@ -74,6 +77,9 @@ main = do
|
||||
-- TODO: parse IO arguments;
|
||||
-- TODO: create DSL from the standard input
|
||||
--
|
||||
-- TODO: setup nix flake package
|
||||
-- TODO: add quickcheck testing (quickchecking-dynamic)
|
||||
|
||||
|
||||
|
||||
eitherP2prcAPI <- getP2prcAPI
|
||||
@@ -132,6 +138,8 @@ main = do
|
||||
|
||||
terminateProcess startProcessHandle
|
||||
|
||||
print siuu
|
||||
|
||||
(Left err) -> print err
|
||||
|
||||
(Left err) -> print err
|
||||
|
||||
6
haskell/lib/P2Prc.hs
Normal file
6
haskell/lib/P2Prc.hs
Normal file
@@ -0,0 +1,6 @@
|
||||
module P2Prc where
|
||||
|
||||
|
||||
siuu :: String
|
||||
siuu = "SIUUU"
|
||||
|
||||
@@ -7,12 +7,12 @@ cabal-version: 3.0
|
||||
-- Starting from the specification version 2.2, the cabal-version field must be
|
||||
-- the first thing in the cabal file.
|
||||
|
||||
-- Initial package description 'p2prc-haskell' generated by
|
||||
-- Initial package description 'p2prc' generated by
|
||||
-- 'cabal init'. For further documentation, see:
|
||||
-- http://haskell.org/cabal/users-guide/
|
||||
--
|
||||
-- The name of the package.
|
||||
name: p2prc-haskell
|
||||
name: p2prc
|
||||
|
||||
-- The package version.
|
||||
-- See the Haskell package versioning policy (PVP) for standards
|
||||
@@ -55,7 +55,7 @@ extra-doc-files: CHANGELOG.md
|
||||
common warnings
|
||||
ghc-options: -Wall
|
||||
|
||||
executable p2prc-haskell
|
||||
executable p2prc
|
||||
-- Import common warning flags.
|
||||
import: warnings
|
||||
|
||||
@@ -63,21 +63,41 @@ executable p2prc-haskell
|
||||
main-is: Main.hs
|
||||
|
||||
-- Modules included in this executable, other than Main.
|
||||
-- other-modules:
|
||||
-- other-modules: Example
|
||||
|
||||
-- LANGUAGE extensions used by modules in this package.
|
||||
other-extensions: OverloadedStrings
|
||||
|
||||
-- Other library packages from which modules are imported.
|
||||
build-depends: base
|
||||
build-depends: base
|
||||
, text
|
||||
, aeson
|
||||
, process
|
||||
, bytestring
|
||||
, directory
|
||||
, p2prc
|
||||
|
||||
-- Directories containing source files.
|
||||
hs-source-dirs: app
|
||||
|
||||
-- Base language which the package is written in.
|
||||
default-language: GHC2021
|
||||
|
||||
library
|
||||
|
||||
import: warnings
|
||||
|
||||
build-depends: base
|
||||
, text
|
||||
, aeson
|
||||
, process
|
||||
, bytestring
|
||||
, directory
|
||||
|
||||
hs-source-dirs: lib
|
||||
|
||||
exposed-modules: P2Prc
|
||||
|
||||
other-extensions: OverloadedStrings
|
||||
|
||||
default-language: GHC2021
|
||||
Reference in New Issue
Block a user