Skip to content

Commit 2506ee4

Browse files
committed
[add] cabal プロジェクト初期化
1 parent 5df279e commit 2506ee4

File tree

6 files changed

+62
-0
lines changed

6 files changed

+62
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist*/
2+
*.local
3+
*.tix

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Copager2(仮)

app/Main.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module Main where
2+
3+
import qualified MyLib (someFunc)
4+
5+
main :: IO ()
6+
main = do
7+
putStrLn "Hello, Haskell!"
8+
MyLib.someFunc

copager2.cabal

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
cabal-version: 3.0
2+
name: copager2
3+
version: 0.1.0.0
4+
author: NakagamiYuta
5+
maintainer: guguru0014@gmail.com
6+
build-type: Simple
7+
8+
common warnings
9+
ghc-options: -Wall
10+
11+
library
12+
import: warnings
13+
exposed-modules: MyLib
14+
-- other-modules:
15+
-- other-extensions:
16+
build-depends: base ^>=4.17.2.1
17+
hs-source-dirs: src
18+
default-language: GHC2021
19+
20+
executable copager2
21+
import: warnings
22+
main-is: Main.hs
23+
-- other-modules:
24+
-- other-extensions:
25+
build-depends:
26+
base ^>=4.17.2.1,
27+
copager2
28+
29+
hs-source-dirs: app
30+
default-language: GHC2021
31+
32+
test-suite copager2-test
33+
import: warnings
34+
default-language: GHC2021
35+
-- other-modules:
36+
-- other-extensions:
37+
type: exitcode-stdio-1.0
38+
hs-source-dirs: test
39+
main-is: Main.hs
40+
build-depends:
41+
base ^>=4.17.2.1,
42+
copager2

src/MyLib.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module MyLib (someFunc) where
2+
3+
someFunc :: IO ()
4+
someFunc = putStrLn "someFunc"

test/Main.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Main (main) where
2+
3+
main :: IO ()
4+
main = putStrLn "Test suite not yet implemented."

0 commit comments

Comments
 (0)