Skip to content

bank-account: Move hints to HINTS.md #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions exercises/bank-account/HINTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Hints

To complete this exercise you need to implement the following functions:

- `openAccount` - Called at the start of each test. Returns a BankAccount.
- `closeAccount` - Called at the end of each test.
- `getBalance` - Get the balance of the bank account.
- `updateBalance` - Increment the balance of the bank account by the given amount.

The amount may be negative for a withdrawal.

The initial balance of the bank account should be 0.

Your can use the provided signatures if you are unsure about the types, but
don't let them restrict your creativity.
3 changes: 0 additions & 3 deletions exercises/bank-account/src/BankAccount.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ module BankAccount
, openAccount
) where

-- The task is to create the data type `BankAccount` and
-- and implement the functions below.

closeAccount :: BankAccount -> IO ()
closeAccount = undefined

Expand Down
19 changes: 0 additions & 19 deletions exercises/bank-account/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ import BankAccount
, openAccount
)

{-
The BankAccount module should support four calls:

openAccount
Called at the start of each test. Returns a BankAccount.

closeAccount account
Called at the end of each test.

getBalance account
Get the balance of the bank account.

updateBalance account amount
Increment the balance of the bank account by the given amount.
The amount may be negative for a withdrawal.

The initial balance of the bank account should be 0.
-}

main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs

Expand Down