adding dummy library for haskell package

This commit is contained in:
2024-11-09 18:51:10 +00:00
parent 36a00f99b0
commit 780da3bb6d
3 changed files with 44 additions and 10 deletions

View File

@@ -2,6 +2,9 @@
module Main where module Main where
import P2Prc
import System.Exit import System.Exit
( ExitCode(ExitFailure) ( ExitCode(ExitFailure)
) )
@@ -42,7 +45,7 @@ import Data.Aeson
-- TODO: setup the project as a haskell library -- TODO: setup the project as a haskell library
-- TODO: splitting code on different files and directories -- TODO: splitting code on different files and directories
-- TODO: lock cabal index -- TODO: lock cabal index
-- TODO: setup nix flake package -- TODO: add Haddock documentation
-- --
-- TODO: P2PRC setup -- TODO: P2PRC setup
-- p2prc runtime packaging -- p2prc runtime packaging
@@ -54,11 +57,11 @@ import Data.Aeson
-- check if p2prc command is available in environment first -- check if p2prc command is available in environment first
-- otherwise check folder above -- otherwise check folder above
-- --
-- TODO: add Haddock documentation
--
-- TODO: add quickcheck testing (quickchecking-dynamic)
--
-- TODO: publish haskell library -- TODO: publish haskell library
--
-- TODO: add use case examples (extra-source_files)
main :: IO () main :: IO ()
@@ -74,6 +77,9 @@ main = do
-- TODO: parse IO arguments; -- TODO: parse IO arguments;
-- TODO: create DSL from the standard input -- TODO: create DSL from the standard input
-- --
-- TODO: setup nix flake package
-- TODO: add quickcheck testing (quickchecking-dynamic)
eitherP2prcAPI <- getP2prcAPI eitherP2prcAPI <- getP2prcAPI
@@ -132,6 +138,8 @@ main = do
terminateProcess startProcessHandle terminateProcess startProcessHandle
print siuu
(Left err) -> print err (Left err) -> print err
(Left err) -> print err (Left err) -> print err

6
haskell/lib/P2Prc.hs Normal file
View File

@@ -0,0 +1,6 @@
module P2Prc where
siuu :: String
siuu = "SIUUU"

View File

@@ -7,12 +7,12 @@ cabal-version: 3.0
-- Starting from the specification version 2.2, the cabal-version field must be -- Starting from the specification version 2.2, the cabal-version field must be
-- the first thing in the cabal file. -- 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: -- 'cabal init'. For further documentation, see:
-- http://haskell.org/cabal/users-guide/ -- http://haskell.org/cabal/users-guide/
-- --
-- The name of the package. -- The name of the package.
name: p2prc-haskell name: p2prc
-- The package version. -- The package version.
-- See the Haskell package versioning policy (PVP) for standards -- See the Haskell package versioning policy (PVP) for standards
@@ -55,7 +55,7 @@ extra-doc-files: CHANGELOG.md
common warnings common warnings
ghc-options: -Wall ghc-options: -Wall
executable p2prc-haskell executable p2prc
-- Import common warning flags. -- Import common warning flags.
import: warnings import: warnings
@@ -63,21 +63,41 @@ executable p2prc-haskell
main-is: Main.hs main-is: Main.hs
-- Modules included in this executable, other than Main. -- Modules included in this executable, other than Main.
-- other-modules: -- other-modules: Example
-- LANGUAGE extensions used by modules in this package. -- LANGUAGE extensions used by modules in this package.
other-extensions: OverloadedStrings other-extensions: OverloadedStrings
-- Other library packages from which modules are imported. -- Other library packages from which modules are imported.
build-depends: base build-depends: base
, text , text
, aeson , aeson
, process , process
, bytestring , bytestring
, directory , directory
, p2prc
-- Directories containing source files. -- Directories containing source files.
hs-source-dirs: app hs-source-dirs: app
-- Base language which the package is written in. -- Base language which the package is written in.
default-language: GHC2021 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