Skip to content

Commit 4a91a03

Browse files
authored
Merge pull request #465 from petertseng/grade-school-stub
grade-school: Add signatures to stub so it runs tests
2 parents d3c8a49 + c561a31 commit 4a91a03

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

exercises/grade-school/.meta/DONT-TEST-STUB

Lines changed: 0 additions & 2 deletions
This file was deleted.

exercises/grade-school/HINTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ and implement the following functions:
88
- `grade`
99
- `sorted`
1010

11-
You will find a dummy data declaration already in place, but it is up to you to
12-
define the functions and create a meaningful data type, newtype or type
13-
synonym.
11+
You will find a dummy data declaration and type signatures already in
12+
place, but it is up to you to define the functions and create a meaningful
13+
data type, newtype or type synonym.

exercises/grade-school/src/School.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ module School (School, add, empty, grade, sorted) where
22

33
data School = Dummy
44

5-
add = undefined
5+
add :: Int -> String -> School -> School
6+
add gradeNum student school = undefined
67

8+
empty :: School
79
empty = undefined
810

9-
grade = undefined
11+
grade :: Int -> School -> [String]
12+
grade gradeNum school = undefined
1013

11-
sorted = undefined
14+
sorted :: School -> [(Int, [String])]
15+
sorted school = undefined

0 commit comments

Comments
 (0)