Skip to content

clock: Move hints to HINTS.md #330

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 21, 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
16 changes: 16 additions & 0 deletions exercises/clock/HINTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Hints

To complete this exercise you need to define the data type `Clock`,
with `Eq`, `Show` and `Num` instances, and implement the functions:

- clockHour
- clockMin
- fromHourMin
- toString

The function `fromInteger`, from `Num`, must convert minutes
to 24 hour clock time. It is not necessary to have a sensible
implementation of `abs` or `signum`.

Your can use the provided signatures if you are unsure about the types, but
don't let them restrict your creativity.
6 changes: 0 additions & 6 deletions exercises/clock/src/Clock.hs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
module Clock (clockHour, clockMin, fromHourMin, toString) where

-- The task is to create the data type `Clock`, with `Eq`,
-- `Show` and `Num` instances, and implement the functions below.
-- The function `fromInteger`, from `Num`, must converts minutes
-- to 24 hour clock time. It is not necessary to have a sensible
-- implementation of `abs` or `signum`.

clockHour :: Clock -> Int
clockHour = undefined

Expand Down
5 changes: 0 additions & 5 deletions exercises/clock/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ import Clock (fromHourMin, toString)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs

-- Clock should define a data type that is an instance of Eq and
-- Num such that the `fromInteger` converts minutes
-- to 24 hour clock time. It is not necessary to have
-- a sensible implementation of `abs` or `signum`.

specs :: Spec
specs = describe "clock" $ do

Expand Down