diff --git a/exercises/accumulate/package.yaml b/exercises/accumulate/package.yaml new file mode 100644 index 000000000..3162ffcbd --- /dev/null +++ b/exercises/accumulate/package.yaml @@ -0,0 +1,19 @@ +name: accumulate + +dependencies: + - base + +library: + exposed-modules: Accumulate + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - accumulate + - HUnit diff --git a/exercises/accumulate/src/Accumulate.hs b/exercises/accumulate/src/Accumulate.hs new file mode 100644 index 000000000..3ae7824ef --- /dev/null +++ b/exercises/accumulate/src/Accumulate.hs @@ -0,0 +1,4 @@ +module Accumulate (accumulate) where + +accumulate :: (a -> b) -> [a] -> [b] +accumulate = undefined diff --git a/exercises/accumulate/example.hs b/exercises/accumulate/src/Example.hs similarity index 100% rename from exercises/accumulate/example.hs rename to exercises/accumulate/src/Example.hs diff --git a/exercises/accumulate/stack.yaml b/exercises/accumulate/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/accumulate/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/accumulate/accumulate_test.hs b/exercises/accumulate/test/Tests.hs similarity index 100% rename from exercises/accumulate/accumulate_test.hs rename to exercises/accumulate/test/Tests.hs diff --git a/exercises/all-your-base/package.yaml b/exercises/all-your-base/package.yaml index 6382a3ba2..e8f8e1e31 100644 --- a/exercises/all-your-base/package.yaml +++ b/exercises/all-your-base/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Base source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/allergies/package.yaml b/exercises/allergies/package.yaml index 3a90984e2..35075e330 100644 --- a/exercises/allergies/package.yaml +++ b/exercises/allergies/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Allergies source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/anagram/package.yaml b/exercises/anagram/package.yaml new file mode 100644 index 000000000..77a595b03 --- /dev/null +++ b/exercises/anagram/package.yaml @@ -0,0 +1,19 @@ +name: anagram + +dependencies: + - base + +library: + exposed-modules: Anagram + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - anagram + - HUnit diff --git a/exercises/anagram/src/Anagram.hs b/exercises/anagram/src/Anagram.hs new file mode 100644 index 000000000..16e24fcfe --- /dev/null +++ b/exercises/anagram/src/Anagram.hs @@ -0,0 +1,4 @@ +module Anagram (anagramsFor) where + +anagramsFor :: String -> [String] -> [String] +anagramsFor = undefined diff --git a/exercises/anagram/example.hs b/exercises/anagram/src/Example.hs similarity index 100% rename from exercises/anagram/example.hs rename to exercises/anagram/src/Example.hs diff --git a/exercises/anagram/stack.yaml b/exercises/anagram/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/anagram/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/anagram/anagram_test.hs b/exercises/anagram/test/Tests.hs similarity index 100% rename from exercises/anagram/anagram_test.hs rename to exercises/anagram/test/Tests.hs diff --git a/exercises/atbash-cipher/package.yaml b/exercises/atbash-cipher/package.yaml index 232b086b7..711de978d 100644 --- a/exercises/atbash-cipher/package.yaml +++ b/exercises/atbash-cipher/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Atbash source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - split - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/bank-account/package.yaml b/exercises/bank-account/package.yaml index ad8b2377c..7e8027cac 100644 --- a/exercises/bank-account/package.yaml +++ b/exercises/bank-account/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: BankAccount source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - stm - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/beer-song/package.yaml b/exercises/beer-song/package.yaml new file mode 100644 index 000000000..8e8331805 --- /dev/null +++ b/exercises/beer-song/package.yaml @@ -0,0 +1,19 @@ +name: beer-song + +dependencies: + - base + +library: + exposed-modules: Beer + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - beer-song + - HUnit diff --git a/exercises/beer-song/src/Beer.hs b/exercises/beer-song/src/Beer.hs new file mode 100644 index 000000000..db0cc9740 --- /dev/null +++ b/exercises/beer-song/src/Beer.hs @@ -0,0 +1,5 @@ +module Beer (verse, sing) where + +verse = undefined + +sing = undefined diff --git a/exercises/beer-song/example.hs b/exercises/beer-song/src/Example.hs similarity index 100% rename from exercises/beer-song/example.hs rename to exercises/beer-song/src/Example.hs diff --git a/exercises/beer-song/stack.yaml b/exercises/beer-song/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/beer-song/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/beer-song/beer-song_test.hs b/exercises/beer-song/test/Tests.hs similarity index 100% rename from exercises/beer-song/beer-song_test.hs rename to exercises/beer-song/test/Tests.hs diff --git a/exercises/binary-search-tree/package.yaml b/exercises/binary-search-tree/package.yaml index 93abab38b..0b090a4bc 100644 --- a/exercises/binary-search-tree/package.yaml +++ b/exercises/binary-search-tree/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: BST source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/binary/package.yaml b/exercises/binary/package.yaml index b2fc009e9..65c4ea2c7 100644 --- a/exercises/binary/package.yaml +++ b/exercises/binary/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Binary source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/bob/package.yaml b/exercises/bob/package.yaml new file mode 100644 index 000000000..f71621566 --- /dev/null +++ b/exercises/bob/package.yaml @@ -0,0 +1,19 @@ +name: bob + +dependencies: + - base + +library: + exposed-modules: Bob + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - bob + - HUnit diff --git a/exercises/bob/src/Bob.hs b/exercises/bob/src/Bob.hs new file mode 100644 index 000000000..78927d492 --- /dev/null +++ b/exercises/bob/src/Bob.hs @@ -0,0 +1,4 @@ +module Bob (responseFor) where + +responseFor :: String -> String +responseFor = undefined diff --git a/exercises/bob/example.hs b/exercises/bob/src/Example.hs similarity index 100% rename from exercises/bob/example.hs rename to exercises/bob/src/Example.hs diff --git a/exercises/bob/stack.yaml b/exercises/bob/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/bob/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/bob/bob_test.hs b/exercises/bob/test/Tests.hs similarity index 100% rename from exercises/bob/bob_test.hs rename to exercises/bob/test/Tests.hs diff --git a/exercises/clock/package.yaml b/exercises/clock/package.yaml index 06f6d8e4a..49569eec4 100644 --- a/exercises/clock/package.yaml +++ b/exercises/clock/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Clock source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/connect/package.yaml b/exercises/connect/package.yaml index c275ba267..7d7afed77 100644 --- a/exercises/connect/package.yaml +++ b/exercises/connect/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Connect source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - array - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/crypto-square/package.yaml b/exercises/crypto-square/package.yaml index 43e9493ba..3edca34b3 100644 --- a/exercises/crypto-square/package.yaml +++ b/exercises/crypto-square/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: CryptoSquare source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - split - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/custom-set/package.yaml b/exercises/custom-set/package.yaml index 5bb09fb59..c54ace21c 100644 --- a/exercises/custom-set/package.yaml +++ b/exercises/custom-set/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: CustomSet source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/difference-of-squares/package.yaml b/exercises/difference-of-squares/package.yaml index 2d4948d5c..0ffc5f1f1 100644 --- a/exercises/difference-of-squares/package.yaml +++ b/exercises/difference-of-squares/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Squares source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/etl/package.yaml b/exercises/etl/package.yaml new file mode 100644 index 000000000..629d38fbc --- /dev/null +++ b/exercises/etl/package.yaml @@ -0,0 +1,20 @@ +name: etl + +dependencies: + - base + - containers + +library: + exposed-modules: ETL + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - etl + - HUnit diff --git a/exercises/etl/ETL.hs b/exercises/etl/src/ETL.hs similarity index 100% rename from exercises/etl/ETL.hs rename to exercises/etl/src/ETL.hs diff --git a/exercises/etl/example.hs b/exercises/etl/src/Example.hs similarity index 100% rename from exercises/etl/example.hs rename to exercises/etl/src/Example.hs diff --git a/exercises/etl/stack.yaml b/exercises/etl/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/etl/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/etl/etl_test.hs b/exercises/etl/test/Tests.hs similarity index 100% rename from exercises/etl/etl_test.hs rename to exercises/etl/test/Tests.hs diff --git a/exercises/food-chain/package.yaml b/exercises/food-chain/package.yaml index 2f08e8714..7dbfaa2d8 100644 --- a/exercises/food-chain/package.yaml +++ b/exercises/food-chain/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: FoodChain source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - array - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/forth/package.yaml b/exercises/forth/package.yaml index f0ecf67a8..b4be9f6dd 100644 --- a/exercises/forth/package.yaml +++ b/exercises/forth/package.yaml @@ -8,9 +8,9 @@ library: exposed-modules: Forth source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - containers - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/gigasecond/package.yaml b/exercises/gigasecond/package.yaml new file mode 100644 index 000000000..3bf9503e6 --- /dev/null +++ b/exercises/gigasecond/package.yaml @@ -0,0 +1,21 @@ +name: gigasecond + +dependencies: + - base + - time + +library: + exposed-modules: Gigasecond + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - gigasecond + - HUnit + - old-locale diff --git a/exercises/gigasecond/example.hs b/exercises/gigasecond/src/Example.hs similarity index 100% rename from exercises/gigasecond/example.hs rename to exercises/gigasecond/src/Example.hs diff --git a/exercises/gigasecond/src/Gigasecond.hs b/exercises/gigasecond/src/Gigasecond.hs new file mode 100644 index 000000000..c11d17f99 --- /dev/null +++ b/exercises/gigasecond/src/Gigasecond.hs @@ -0,0 +1,6 @@ +module Gigasecond (fromDay) where + +import Data.Time.Clock (UTCTime) + +fromDay :: UTCTime -> UTCTime +fromDay = undefined diff --git a/exercises/gigasecond/stack.yaml b/exercises/gigasecond/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/gigasecond/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/gigasecond/gigasecond_test.hs b/exercises/gigasecond/test/Tests.hs similarity index 100% rename from exercises/gigasecond/gigasecond_test.hs rename to exercises/gigasecond/test/Tests.hs diff --git a/exercises/go-counting/package.yaml b/exercises/go-counting/package.yaml index 2ef0555ba..95c182f2a 100644 --- a/exercises/go-counting/package.yaml +++ b/exercises/go-counting/package.yaml @@ -8,9 +8,9 @@ library: exposed-modules: Counting source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - array - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/grade-school/package.yaml b/exercises/grade-school/package.yaml new file mode 100644 index 000000000..555a36386 --- /dev/null +++ b/exercises/grade-school/package.yaml @@ -0,0 +1,20 @@ +name: grade-school + +dependencies: + - base + +library: + exposed-modules: School + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + - containers + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - grade-school + - HUnit diff --git a/exercises/grade-school/example.hs b/exercises/grade-school/src/Example.hs similarity index 100% rename from exercises/grade-school/example.hs rename to exercises/grade-school/src/Example.hs diff --git a/exercises/grade-school/src/School.hs b/exercises/grade-school/src/School.hs new file mode 100644 index 000000000..9c3f2bbbb --- /dev/null +++ b/exercises/grade-school/src/School.hs @@ -0,0 +1,12 @@ +module School (School, add, empty, grade, sorted) where + +-- The task is to create the data type `School` and +-- implement the functions below. + +add = undefined + +empty = undefined + +grade = undefined + +sorted = undefined diff --git a/exercises/grade-school/stack.yaml b/exercises/grade-school/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/grade-school/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/grade-school/grade-school_test.hs b/exercises/grade-school/test/Tests.hs similarity index 100% rename from exercises/grade-school/grade-school_test.hs rename to exercises/grade-school/test/Tests.hs diff --git a/exercises/grains/package.yaml b/exercises/grains/package.yaml new file mode 100644 index 000000000..064d9340a --- /dev/null +++ b/exercises/grains/package.yaml @@ -0,0 +1,19 @@ +name: grains + +dependencies: + - base + +library: + exposed-modules: Grains + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - grains + - HUnit diff --git a/exercises/grains/example.hs b/exercises/grains/src/Example.hs similarity index 100% rename from exercises/grains/example.hs rename to exercises/grains/src/Example.hs diff --git a/exercises/grains/Grains.hs b/exercises/grains/src/Grains.hs similarity index 100% rename from exercises/grains/Grains.hs rename to exercises/grains/src/Grains.hs diff --git a/exercises/grains/stack.yaml b/exercises/grains/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/grains/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/grains/grains_test.hs b/exercises/grains/test/Tests.hs similarity index 100% rename from exercises/grains/grains_test.hs rename to exercises/grains/test/Tests.hs diff --git a/exercises/hamming/package.yaml b/exercises/hamming/package.yaml new file mode 100644 index 000000000..629bfc642 --- /dev/null +++ b/exercises/hamming/package.yaml @@ -0,0 +1,19 @@ +name: hamming + +dependencies: + - base + +library: + exposed-modules: Hamming + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - hamming + - HUnit diff --git a/exercises/hamming/example.hs b/exercises/hamming/src/Example.hs similarity index 100% rename from exercises/hamming/example.hs rename to exercises/hamming/src/Example.hs diff --git a/exercises/hamming/Hamming.hs b/exercises/hamming/src/Hamming.hs similarity index 100% rename from exercises/hamming/Hamming.hs rename to exercises/hamming/src/Hamming.hs diff --git a/exercises/hamming/stack.yaml b/exercises/hamming/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/hamming/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/hamming/hamming_test.hs b/exercises/hamming/test/Tests.hs similarity index 100% rename from exercises/hamming/hamming_test.hs rename to exercises/hamming/test/Tests.hs diff --git a/exercises/hexadecimal/package.yaml b/exercises/hexadecimal/package.yaml index c75012ae9..1006a60fe 100644 --- a/exercises/hexadecimal/package.yaml +++ b/exercises/hexadecimal/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Hexadecimal source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/house/package.yaml b/exercises/house/package.yaml index 54bd9b0da..b2e95e7e1 100644 --- a/exercises/house/package.yaml +++ b/exercises/house/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: House source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/kindergarten-garden/package.yaml b/exercises/kindergarten-garden/package.yaml index a46bd820f..c211355d2 100644 --- a/exercises/kindergarten-garden/package.yaml +++ b/exercises/kindergarten-garden/package.yaml @@ -7,10 +7,10 @@ library: exposed-modules: Garden source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - containers - split - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/largest-series-product/package.yaml b/exercises/largest-series-product/package.yaml index 148e6cf37..3ebf53340 100644 --- a/exercises/largest-series-product/package.yaml +++ b/exercises/largest-series-product/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Series source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/leap/package.yaml b/exercises/leap/package.yaml new file mode 100644 index 000000000..c8ff09b76 --- /dev/null +++ b/exercises/leap/package.yaml @@ -0,0 +1,19 @@ +name: leap + +dependencies: + - base + +library: + exposed-modules: LeapYear + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - leap + - HUnit diff --git a/exercises/leap/example.hs b/exercises/leap/src/Example.hs similarity index 100% rename from exercises/leap/example.hs rename to exercises/leap/src/Example.hs diff --git a/exercises/leap/src/LeapYear.hs b/exercises/leap/src/LeapYear.hs new file mode 100644 index 000000000..f9675bc09 --- /dev/null +++ b/exercises/leap/src/LeapYear.hs @@ -0,0 +1,3 @@ +module LeapYear (isLeapYear) where + +isLeapYear = undefined diff --git a/exercises/leap/stack.yaml b/exercises/leap/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/leap/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/leap/leap_test.hs b/exercises/leap/test/Tests.hs similarity index 100% rename from exercises/leap/leap_test.hs rename to exercises/leap/test/Tests.hs diff --git a/exercises/lens-person/package.yaml b/exercises/lens-person/package.yaml index c7e8f7aed..362c3e1fb 100644 --- a/exercises/lens-person/package.yaml +++ b/exercises/lens-person/package.yaml @@ -8,9 +8,9 @@ library: exposed-modules: Person source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - lens - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/linked-list/package.yaml b/exercises/linked-list/package.yaml index 0660c6f2f..4214531f8 100644 --- a/exercises/linked-list/package.yaml +++ b/exercises/linked-list/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Deque source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - stm - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/list-ops/package.yaml b/exercises/list-ops/package.yaml new file mode 100644 index 000000000..a0b6c3ea2 --- /dev/null +++ b/exercises/list-ops/package.yaml @@ -0,0 +1,19 @@ +name: list-ops + +dependencies: + - base + +library: + exposed-modules: ListOps + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - list-ops + - HUnit diff --git a/exercises/list-ops/example.hs b/exercises/list-ops/src/Example.hs similarity index 100% rename from exercises/list-ops/example.hs rename to exercises/list-ops/src/Example.hs diff --git a/exercises/list-ops/ListOps.hs b/exercises/list-ops/src/ListOps.hs similarity index 100% rename from exercises/list-ops/ListOps.hs rename to exercises/list-ops/src/ListOps.hs diff --git a/exercises/list-ops/stack.yaml b/exercises/list-ops/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/list-ops/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/list-ops/list-ops_test.hs b/exercises/list-ops/test/Tests.hs similarity index 100% rename from exercises/list-ops/list-ops_test.hs rename to exercises/list-ops/test/Tests.hs diff --git a/exercises/luhn/package.yaml b/exercises/luhn/package.yaml index 154161c88..a1941c540 100644 --- a/exercises/luhn/package.yaml +++ b/exercises/luhn/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Luhn source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/matrix/package.yaml b/exercises/matrix/package.yaml index d616c27a2..3127b7e15 100644 --- a/exercises/matrix/package.yaml +++ b/exercises/matrix/package.yaml @@ -8,8 +8,8 @@ library: exposed-modules: Matrix source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/meetup/package.yaml b/exercises/meetup/package.yaml new file mode 100644 index 000000000..c6b264077 --- /dev/null +++ b/exercises/meetup/package.yaml @@ -0,0 +1,20 @@ +name: meetup + +dependencies: + - base + - time + +library: + exposed-modules: Meetup + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - meetup + - HUnit diff --git a/exercises/meetup/example.hs b/exercises/meetup/src/Example.hs similarity index 100% rename from exercises/meetup/example.hs rename to exercises/meetup/src/Example.hs diff --git a/exercises/meetup/src/Meetup.hs b/exercises/meetup/src/Meetup.hs new file mode 100644 index 000000000..3f9d94210 --- /dev/null +++ b/exercises/meetup/src/Meetup.hs @@ -0,0 +1,9 @@ +module Meetup (Weekday(..), Schedule(..), meetupDay) where + +import Data.Time.Calendar (Day) + +-- The task is to create the data types `Weekday` and +-- `Schedule`, and implement the function `meetupDay`. + +meetupDay :: Schedule -> Weekday -> Integer -> Int -> Day +meetupDay schedule weekday year month = undefined diff --git a/exercises/meetup/stack.yaml b/exercises/meetup/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/meetup/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/meetup/meetup_test.hs b/exercises/meetup/test/Tests.hs similarity index 100% rename from exercises/meetup/meetup_test.hs rename to exercises/meetup/test/Tests.hs diff --git a/exercises/minesweeper/package.yaml b/exercises/minesweeper/package.yaml index e55471500..2c7bf548e 100644 --- a/exercises/minesweeper/package.yaml +++ b/exercises/minesweeper/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Minesweeper source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - array - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/nth-prime/package.yaml b/exercises/nth-prime/package.yaml index 318daa50f..0fe15abc3 100644 --- a/exercises/nth-prime/package.yaml +++ b/exercises/nth-prime/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Prime source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/nucleotide-count/package.yaml b/exercises/nucleotide-count/package.yaml new file mode 100644 index 000000000..18f3d7bbe --- /dev/null +++ b/exercises/nucleotide-count/package.yaml @@ -0,0 +1,20 @@ +name: nucleotide-count + +dependencies: + - base + - containers + +library: + exposed-modules: DNA + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - nucleotide-count + - HUnit diff --git a/exercises/nucleotide-count/src/DNA.hs b/exercises/nucleotide-count/src/DNA.hs new file mode 100644 index 000000000..d931ff26c --- /dev/null +++ b/exercises/nucleotide-count/src/DNA.hs @@ -0,0 +1,9 @@ +module DNA (count, nucleotideCounts) where + +import Data.Map (Map) + +count :: Char -> String -> Either String Int +count = undefined + +nucleotideCounts :: String -> Either String (Map Char Int) +nucleotideCounts = undefined diff --git a/exercises/nucleotide-count/example.hs b/exercises/nucleotide-count/src/Example.hs similarity index 100% rename from exercises/nucleotide-count/example.hs rename to exercises/nucleotide-count/src/Example.hs diff --git a/exercises/nucleotide-count/stack.yaml b/exercises/nucleotide-count/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/nucleotide-count/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/nucleotide-count/nucleotide-count_test.hs b/exercises/nucleotide-count/test/Tests.hs similarity index 100% rename from exercises/nucleotide-count/nucleotide-count_test.hs rename to exercises/nucleotide-count/test/Tests.hs diff --git a/exercises/ocr-numbers/package.yaml b/exercises/ocr-numbers/package.yaml index 8cf48e9f4..b0bf55d99 100644 --- a/exercises/ocr-numbers/package.yaml +++ b/exercises/ocr-numbers/package.yaml @@ -7,10 +7,10 @@ library: exposed-modules: OCR source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - containers - split - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/octal/package.yaml b/exercises/octal/package.yaml index 94cb42773..0d60e2283 100644 --- a/exercises/octal/package.yaml +++ b/exercises/octal/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Octal source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/palindrome-products/package.yaml b/exercises/palindrome-products/package.yaml index 17f6850bc..64ad1ef26 100644 --- a/exercises/palindrome-products/package.yaml +++ b/exercises/palindrome-products/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Palindromes source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/parallel-letter-frequency/package.yaml b/exercises/parallel-letter-frequency/package.yaml index 66cea24a4..31794ddec 100644 --- a/exercises/parallel-letter-frequency/package.yaml +++ b/exercises/parallel-letter-frequency/package.yaml @@ -9,9 +9,9 @@ library: exposed-modules: Frequency source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - parallel - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/pascals-triangle/package.yaml b/exercises/pascals-triangle/package.yaml index 448bdc6f0..86508d2a6 100644 --- a/exercises/pascals-triangle/package.yaml +++ b/exercises/pascals-triangle/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Triangle source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/phone-number/package.yaml b/exercises/phone-number/package.yaml new file mode 100644 index 000000000..5508f508d --- /dev/null +++ b/exercises/phone-number/package.yaml @@ -0,0 +1,19 @@ +name: phone-number + +dependencies: + - base + +library: + exposed-modules: Phone + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - phone-number + - HUnit diff --git a/exercises/phone-number/example.hs b/exercises/phone-number/src/Example.hs similarity index 100% rename from exercises/phone-number/example.hs rename to exercises/phone-number/src/Example.hs diff --git a/exercises/phone-number/src/Phone.hs b/exercises/phone-number/src/Phone.hs new file mode 100644 index 000000000..c330d754b --- /dev/null +++ b/exercises/phone-number/src/Phone.hs @@ -0,0 +1,10 @@ +module Phone (areaCode, number, prettyPrint) where + +areaCode :: String -> Maybe String +areaCode = undefined + +number :: String -> Maybe String +number = undefined + +prettyPrint :: String -> Maybe String +prettyPrint = undefined diff --git a/exercises/phone-number/stack.yaml b/exercises/phone-number/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/phone-number/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/phone-number/phone-number_test.hs b/exercises/phone-number/test/Tests.hs similarity index 100% rename from exercises/phone-number/phone-number_test.hs rename to exercises/phone-number/test/Tests.hs diff --git a/exercises/pig-latin/package.yaml b/exercises/pig-latin/package.yaml index 9dd18d9b6..04f733e6e 100644 --- a/exercises/pig-latin/package.yaml +++ b/exercises/pig-latin/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: PigLatin source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/pov/package.yaml b/exercises/pov/package.yaml index 560fc623f..9fef92e8f 100644 --- a/exercises/pov/package.yaml +++ b/exercises/pov/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: POV source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/prime-factors/package.yaml b/exercises/prime-factors/package.yaml index 348c11783..b05614426 100644 --- a/exercises/prime-factors/package.yaml +++ b/exercises/prime-factors/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: PrimeFactors source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/pythagorean-triplet/package.yaml b/exercises/pythagorean-triplet/package.yaml index 1f5b64aa7..7994ae71e 100644 --- a/exercises/pythagorean-triplet/package.yaml +++ b/exercises/pythagorean-triplet/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Triplet source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/queen-attack/package.yaml b/exercises/queen-attack/package.yaml index 9ffd699cb..a4a3eb183 100644 --- a/exercises/queen-attack/package.yaml +++ b/exercises/queen-attack/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Queens source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/raindrops/package.yaml b/exercises/raindrops/package.yaml index f48d1fbb1..c09364177 100644 --- a/exercises/raindrops/package.yaml +++ b/exercises/raindrops/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Raindrops source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/rna-transcription/package.yaml b/exercises/rna-transcription/package.yaml new file mode 100644 index 000000000..603d7cdf1 --- /dev/null +++ b/exercises/rna-transcription/package.yaml @@ -0,0 +1,20 @@ +name: rna-transcription + +dependencies: + - base + +library: + exposed-modules: DNA + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + - containers + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - rna-transcription + - HUnit diff --git a/exercises/rna-transcription/DNA.hs b/exercises/rna-transcription/src/DNA.hs similarity index 100% rename from exercises/rna-transcription/DNA.hs rename to exercises/rna-transcription/src/DNA.hs diff --git a/exercises/rna-transcription/example.hs b/exercises/rna-transcription/src/Example.hs similarity index 100% rename from exercises/rna-transcription/example.hs rename to exercises/rna-transcription/src/Example.hs diff --git a/exercises/rna-transcription/stack.yaml b/exercises/rna-transcription/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/rna-transcription/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/rna-transcription/rna-transcription_test.hs b/exercises/rna-transcription/test/Tests.hs similarity index 100% rename from exercises/rna-transcription/rna-transcription_test.hs rename to exercises/rna-transcription/test/Tests.hs diff --git a/exercises/robot-name/package.yaml b/exercises/robot-name/package.yaml new file mode 100644 index 000000000..e677ca2fe --- /dev/null +++ b/exercises/robot-name/package.yaml @@ -0,0 +1,20 @@ +name: robot-name + +dependencies: + - base + +library: + exposed-modules: Robot + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + - random + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - robot-name + - HUnit diff --git a/exercises/robot-name/example.hs b/exercises/robot-name/src/Example.hs similarity index 100% rename from exercises/robot-name/example.hs rename to exercises/robot-name/src/Example.hs diff --git a/exercises/robot-name/src/Robot.hs b/exercises/robot-name/src/Robot.hs new file mode 100644 index 000000000..f6100905f --- /dev/null +++ b/exercises/robot-name/src/Robot.hs @@ -0,0 +1,13 @@ +module Robot (Robot, mkRobot, resetName, robotName) where + +-- The task is to create the data type `Robot`, as a +-- mutable variable, and implement the functions below. + +mkRobot :: IO Robot +mkRobot = undefined + +resetName :: Robot -> IO () +resetName = undefined + +robotName :: Robot -> IO String +robotName = undefined diff --git a/exercises/robot-name/stack.yaml b/exercises/robot-name/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/robot-name/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/robot-name/robot-name_test.hs b/exercises/robot-name/test/Tests.hs similarity index 100% rename from exercises/robot-name/robot-name_test.hs rename to exercises/robot-name/test/Tests.hs diff --git a/exercises/robot-simulator/package.yaml b/exercises/robot-simulator/package.yaml index 2ac59be1a..9d82cd73b 100644 --- a/exercises/robot-simulator/package.yaml +++ b/exercises/robot-simulator/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Robot source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/roman-numerals/package.yaml b/exercises/roman-numerals/package.yaml index 5e00f1ebc..3b129db29 100644 --- a/exercises/roman-numerals/package.yaml +++ b/exercises/roman-numerals/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Roman source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/saddle-points/package.yaml b/exercises/saddle-points/package.yaml index 65f3b42a9..93c13ef68 100644 --- a/exercises/saddle-points/package.yaml +++ b/exercises/saddle-points/package.yaml @@ -8,9 +8,9 @@ library: exposed-modules: Matrix source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - containers - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/say/package.yaml b/exercises/say/package.yaml index 6318e7062..92a3bdb12 100644 --- a/exercises/say/package.yaml +++ b/exercises/say/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Say source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - array - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/scrabble-score/package.yaml b/exercises/scrabble-score/package.yaml index 59c7cde7a..68e3d49b6 100644 --- a/exercises/scrabble-score/package.yaml +++ b/exercises/scrabble-score/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Scrabble source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - containers - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/secret-handshake/package.yaml b/exercises/secret-handshake/package.yaml index 6da5dde5f..a5f849340 100644 --- a/exercises/secret-handshake/package.yaml +++ b/exercises/secret-handshake/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: SecretHandshake source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/series/package.yaml b/exercises/series/package.yaml index 0b77dfb03..060a02777 100644 --- a/exercises/series/package.yaml +++ b/exercises/series/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Series source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/sgf-parsing/package.yaml b/exercises/sgf-parsing/package.yaml index 0e448ae83..dd638862e 100644 --- a/exercises/sgf-parsing/package.yaml +++ b/exercises/sgf-parsing/package.yaml @@ -9,9 +9,9 @@ library: exposed-modules: Sgf source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - attoparsec - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/sieve/package.yaml b/exercises/sieve/package.yaml index 6b0691494..b57136f40 100644 --- a/exercises/sieve/package.yaml +++ b/exercises/sieve/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Sieve source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - vector - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/simple-cipher/package.yaml b/exercises/simple-cipher/package.yaml index 21151072e..d4accb4be 100644 --- a/exercises/simple-cipher/package.yaml +++ b/exercises/simple-cipher/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Cipher source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - random - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. tests: test: diff --git a/exercises/simple-linked-list/package.yaml b/exercises/simple-linked-list/package.yaml new file mode 100644 index 000000000..795f9c6ad --- /dev/null +++ b/exercises/simple-linked-list/package.yaml @@ -0,0 +1,19 @@ +name: simple-linked-list + +dependencies: + - base + +library: + exposed-modules: LinkedList + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - simple-linked-list + - HUnit diff --git a/exercises/simple-linked-list/example.hs b/exercises/simple-linked-list/src/Example.hs similarity index 100% rename from exercises/simple-linked-list/example.hs rename to exercises/simple-linked-list/src/Example.hs diff --git a/exercises/simple-linked-list/src/LinkedList.hs b/exercises/simple-linked-list/src/LinkedList.hs new file mode 100644 index 000000000..9072e50b1 --- /dev/null +++ b/exercises/simple-linked-list/src/LinkedList.hs @@ -0,0 +1,38 @@ +module LinkedList + ( LinkedList + , datum + , fromList + , isNil + , new + , next + , nil + , reverseLinkedList + , toList + ) where + +-- The task is to create the data type `LinkedList` +-- and implement the functions below. + +datum :: LinkedList a -> a +datum = undefined + +fromList :: [a] -> LinkedList a +fromList = undefined + +isNil :: LinkedList a -> Bool +isNil = undefined + +new :: a -> LinkedList a -> LinkedList a +new = undefined + +next :: LinkedList a -> LinkedList a +next = undefined + +nil :: LinkedList a +nil = undefined + +reverseLinkedList :: LinkedList a -> LinkedList a +reverseLinkedList = undefined + +toList :: LinkedList a -> [a] +toList = undefined diff --git a/exercises/simple-linked-list/stack.yaml b/exercises/simple-linked-list/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/simple-linked-list/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/simple-linked-list/simple-linked-list_test.hs b/exercises/simple-linked-list/test/Tests.hs similarity index 100% rename from exercises/simple-linked-list/simple-linked-list_test.hs rename to exercises/simple-linked-list/test/Tests.hs diff --git a/exercises/space-age/package.yaml b/exercises/space-age/package.yaml new file mode 100644 index 000000000..54dd15474 --- /dev/null +++ b/exercises/space-age/package.yaml @@ -0,0 +1,19 @@ +name: space-age + +dependencies: + - base + +library: + exposed-modules: SpaceAge + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - space-age + - HUnit diff --git a/exercises/space-age/example.hs b/exercises/space-age/src/Example.hs similarity index 100% rename from exercises/space-age/example.hs rename to exercises/space-age/src/Example.hs diff --git a/exercises/space-age/src/SpaceAge.hs b/exercises/space-age/src/SpaceAge.hs new file mode 100644 index 000000000..0d552c84b --- /dev/null +++ b/exercises/space-age/src/SpaceAge.hs @@ -0,0 +1,6 @@ +module SpaceAge (Planet(..), ageOn) where + +-- The task is to create the data type `Planet` +-- and implement the function `ageOn`. + +ageOn = undefined diff --git a/exercises/space-age/stack.yaml b/exercises/space-age/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/space-age/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/space-age/space-age_test.hs b/exercises/space-age/test/Tests.hs similarity index 100% rename from exercises/space-age/space-age_test.hs rename to exercises/space-age/test/Tests.hs diff --git a/exercises/strain/package.yaml b/exercises/strain/package.yaml new file mode 100644 index 000000000..b28c10525 --- /dev/null +++ b/exercises/strain/package.yaml @@ -0,0 +1,19 @@ +name: strain + +dependencies: + - base + +library: + exposed-modules: Strain + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - strain + - HUnit diff --git a/exercises/strain/example.hs b/exercises/strain/src/Example.hs similarity index 100% rename from exercises/strain/example.hs rename to exercises/strain/src/Example.hs diff --git a/exercises/strain/src/Strain.hs b/exercises/strain/src/Strain.hs new file mode 100644 index 000000000..ad242f45a --- /dev/null +++ b/exercises/strain/src/Strain.hs @@ -0,0 +1,7 @@ +module Strain (keep, discard) where + +discard :: (a -> Bool) -> [a] -> [a] +discard = undefined + +keep :: (a -> Bool) -> [a] -> [a] +keep = undefined diff --git a/exercises/strain/stack.yaml b/exercises/strain/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/strain/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/strain/strain_test.hs b/exercises/strain/test/Tests.hs similarity index 100% rename from exercises/strain/strain_test.hs rename to exercises/strain/test/Tests.hs diff --git a/exercises/sublist/package.yaml b/exercises/sublist/package.yaml new file mode 100644 index 000000000..48cc6096a --- /dev/null +++ b/exercises/sublist/package.yaml @@ -0,0 +1,19 @@ +name: sublist + +dependencies: + - base + +library: + exposed-modules: Sublist + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - sublist + - HUnit diff --git a/exercises/sublist/example.hs b/exercises/sublist/src/Example.hs similarity index 100% rename from exercises/sublist/example.hs rename to exercises/sublist/src/Example.hs diff --git a/exercises/sublist/src/Sublist.hs b/exercises/sublist/src/Sublist.hs new file mode 100644 index 000000000..d904e7b59 --- /dev/null +++ b/exercises/sublist/src/Sublist.hs @@ -0,0 +1,6 @@ +module Sublist (Sublist(..), sublist) where + +-- The task is to create the data type `Sublist`, with `Eq` and +-- `Show` instances, and implement the function `sublist`. + +sublist = undefined diff --git a/exercises/sublist/stack.yaml b/exercises/sublist/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/sublist/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/sublist/sublist_test.hs b/exercises/sublist/test/Tests.hs similarity index 100% rename from exercises/sublist/sublist_test.hs rename to exercises/sublist/test/Tests.hs diff --git a/exercises/sum-of-multiples/package.yaml b/exercises/sum-of-multiples/package.yaml new file mode 100644 index 000000000..906091ccc --- /dev/null +++ b/exercises/sum-of-multiples/package.yaml @@ -0,0 +1,19 @@ +name: sum-of-multiples + +dependencies: + - base + +library: + exposed-modules: SumOfMultiples + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - sum-of-multiples + - HUnit diff --git a/exercises/sum-of-multiples/example.hs b/exercises/sum-of-multiples/src/Example.hs similarity index 100% rename from exercises/sum-of-multiples/example.hs rename to exercises/sum-of-multiples/src/Example.hs diff --git a/exercises/sum-of-multiples/src/SumOfMultiples.hs b/exercises/sum-of-multiples/src/SumOfMultiples.hs new file mode 100644 index 000000000..f96edc516 --- /dev/null +++ b/exercises/sum-of-multiples/src/SumOfMultiples.hs @@ -0,0 +1,3 @@ +module SumOfMultiples (sumOfMultiples) where + +sumOfMultiples = undefined diff --git a/exercises/sum-of-multiples/stack.yaml b/exercises/sum-of-multiples/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/sum-of-multiples/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/sum-of-multiples/sum-of-multiples_test.hs b/exercises/sum-of-multiples/test/Tests.hs similarity index 100% rename from exercises/sum-of-multiples/sum-of-multiples_test.hs rename to exercises/sum-of-multiples/test/Tests.hs diff --git a/exercises/triangle/package.yaml b/exercises/triangle/package.yaml index f1eebf924..7f673edc8 100644 --- a/exercises/triangle/package.yaml +++ b/exercises/triangle/package.yaml @@ -7,9 +7,9 @@ library: exposed-modules: Triangle source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - containers - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/trinary/package.yaml b/exercises/trinary/package.yaml index 223c3c695..82e07ce11 100644 --- a/exercises/trinary/package.yaml +++ b/exercises/trinary/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Trinary source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: diff --git a/exercises/word-count/package.yaml b/exercises/word-count/package.yaml new file mode 100644 index 000000000..3fd3343be --- /dev/null +++ b/exercises/word-count/package.yaml @@ -0,0 +1,21 @@ +name: word-count + +dependencies: + - base + - containers + +library: + exposed-modules: WordCount + source-dirs: src + dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. + - split + +tests: + test: + main: Tests.hs + source-dirs: test + dependencies: + - word-count + - HUnit diff --git a/exercises/word-count/example.hs b/exercises/word-count/src/Example.hs similarity index 100% rename from exercises/word-count/example.hs rename to exercises/word-count/src/Example.hs diff --git a/exercises/word-count/src/WordCount.hs b/exercises/word-count/src/WordCount.hs new file mode 100644 index 000000000..af6109af7 --- /dev/null +++ b/exercises/word-count/src/WordCount.hs @@ -0,0 +1,3 @@ +module WordCount (wordCount) where + +wordCount = undefined diff --git a/exercises/word-count/stack.yaml b/exercises/word-count/stack.yaml new file mode 100644 index 000000000..bae17f091 --- /dev/null +++ b/exercises/word-count/stack.yaml @@ -0,0 +1 @@ +resolver: lts-6.3 diff --git a/exercises/word-count/word-count_test.hs b/exercises/word-count/test/Tests.hs similarity index 100% rename from exercises/word-count/word-count_test.hs rename to exercises/word-count/test/Tests.hs diff --git a/exercises/wordy/package.yaml b/exercises/wordy/package.yaml index 2f5de543a..282b02217 100644 --- a/exercises/wordy/package.yaml +++ b/exercises/wordy/package.yaml @@ -7,10 +7,10 @@ library: exposed-modules: WordProblem source-dirs: src dependencies: + # - foo # List here the packages you + # - bar # want to use in your solution. - attoparsec - text - # - foo # Here you must list additional packages - # - bar # you want to use in you solution. tests: test: diff --git a/exercises/zipper/package.yaml b/exercises/zipper/package.yaml index 18d1a76e2..545f963c0 100644 --- a/exercises/zipper/package.yaml +++ b/exercises/zipper/package.yaml @@ -7,8 +7,8 @@ library: exposed-modules: Zipper source-dirs: src dependencies: - # - foo # Here you must list additional packages - # - bar # you want to use in your solution. + # - foo # List here the packages you + # - bar # want to use in your solution. tests: test: