Skip to content

Commit 7ee9f65

Browse files
committed
committed haskell exercise templates 1-8
1 parent d62bec5 commit 7ee9f65

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+3889
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.stack-work

HaskellExercises01/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.stack-work/
2+
*~

HaskellExercises01/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog for HaskellExercises01
2+
3+
## Unreleased changes
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
cabal-version: 1.12
2+
3+
-- This file has been generated from package.yaml by hpack version 0.34.4.
4+
--
5+
-- see: https://github.com/sol/hpack
6+
7+
name: HaskellExercises01
8+
version: 0.1.0.0
9+
description: Please see the README on GitHub at <https://github.com/dalvescb/HaskellExercises01#readme>
10+
homepage: https://github.com/dalvescb/HaskellExercises01#readme
11+
bug-reports: https://github.com/dalvescb/HaskellExercises01/issues
12+
author: Curtis D'Alves
13+
maintainer: [email protected]
14+
copyright: (c) Curtis D'Alves 2020
15+
license: BSD3
16+
license-file: LICENSE
17+
build-type: Simple
18+
extra-source-files:
19+
README.md
20+
ChangeLog.md
21+
22+
source-repository head
23+
type: git
24+
location: https://github.com/dalvescb/HaskellExercises01
25+
26+
library
27+
exposed-modules:
28+
Exercises01
29+
other-modules:
30+
Paths_HaskellExercises01
31+
hs-source-dirs:
32+
src
33+
build-depends:
34+
QuickCheck
35+
, base >=4.7 && <5
36+
, hspec
37+
default-language: Haskell2010
38+
39+
executable HaskellExercises01-exe
40+
main-is: Main.hs
41+
other-modules:
42+
Paths_HaskellExercises01
43+
hs-source-dirs:
44+
app
45+
ghc-options: -threaded -rtsopts -with-rtsopts=-N
46+
build-depends:
47+
HaskellExercises01
48+
, QuickCheck
49+
, base >=4.7 && <5
50+
, hspec
51+
default-language: Haskell2010
52+
53+
test-suite HaskellExercises01-test
54+
type: exitcode-stdio-1.0
55+
main-is: Spec.hs
56+
other-modules:
57+
Paths_HaskellExercises01
58+
hs-source-dirs:
59+
test
60+
ghc-options: -threaded -rtsopts -with-rtsopts=-N
61+
build-depends:
62+
HaskellExercises01
63+
, QuickCheck
64+
, base >=4.7 && <5
65+
, hspec
66+
default-language: Haskell2010

HaskellExercises01/LICENSE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright Author name here (c) 2021
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
* Neither the name of Author name here nor the names of other
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

HaskellExercises01/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# HaskellExercises01

HaskellExercises01/Setup.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

HaskellExercises01/app/Main.hs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{-# LANGUAGE ExistentialQuantification #-}
2+
{-|
3+
Module : HaskellExercises01.Main
4+
Copyright : (c) Curtis D'Alves 2020
5+
License : GPL (see the LICENSE file)
6+
Maintainer : none
7+
Stability : experimental
8+
Portability : portable
9+
10+
Description:
11+
Default main program
12+
-}
13+
module Main where
14+
15+
import Prelude hiding (last,init,(!!))
16+
17+
import qualified Exercises01 as E1
18+
19+
-- | Main Program
20+
main :: IO ()
21+
main = putStrLn "HaskellExercises01 compiled successfully"

HaskellExercises01/hie.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cradle:
2+
stack:
3+
- path: "./src"
4+
component: "HaskellExercises01:lib"
5+
6+
- path: "./app/Main.hs"
7+
component: "HaskellExercises01:exe:HaskellExercises01-exe"
8+
9+
- path: "./app/Paths_HaskellExercises01.hs"
10+
component: "HaskellExercises01:exe:HaskellExercises01-exe"
11+
12+
- path: "./test"
13+
component: "HaskellExercises01:test:HaskellExercises01-test"

HaskellExercises01/package.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: HaskellExercises01
2+
version: 0.1.0.0
3+
github: "dalvescb/HaskellExercises01"
4+
license: BSD3
5+
author: "Curtis D'Alves"
6+
maintainer: "[email protected]"
7+
copyright: "(c) Curtis D'Alves 2020"
8+
9+
extra-source-files:
10+
- README.md
11+
- ChangeLog.md
12+
13+
# Metadata used when publishing your package
14+
# synopsis: Short description of your package
15+
# category: Web
16+
17+
# To avoid duplicated efforts in documentation and dealing with the
18+
# complications of embedding Haddock markup inside cabal files, it is
19+
# common to point users to the README.md file.
20+
description: Please see the README on GitHub at <https://github.com/dalvescb/HaskellExercises01#readme>
21+
22+
dependencies:
23+
- base >= 4.7 && < 5
24+
- QuickCheck
25+
- hspec
26+
27+
library:
28+
source-dirs: src
29+
30+
executables:
31+
HaskellExercises01-exe:
32+
main: Main.hs
33+
source-dirs: app
34+
ghc-options:
35+
- -threaded
36+
- -rtsopts
37+
- -with-rtsopts=-N
38+
dependencies:
39+
- HaskellExercises01
40+
41+
tests:
42+
HaskellExercises01-test:
43+
main: Spec.hs
44+
source-dirs: test
45+
ghc-options:
46+
- -threaded
47+
- -rtsopts
48+
- -with-rtsopts=-N
49+
dependencies:
50+
- HaskellExercises01

0 commit comments

Comments
 (0)