From 5b27274a55ba172b662688c5c87ea2c75d5b069f Mon Sep 17 00:00:00 2001 From: rbasso Date: Tue, 8 Nov 2016 22:52:33 +0900 Subject: [PATCH] binary-search-tree: change stub to be able to run the tests --- exercises/binary-search-tree/HINTS.md | 5 +++-- exercises/binary-search-tree/src/BST.hs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/exercises/binary-search-tree/HINTS.md b/exercises/binary-search-tree/HINTS.md index c029760a0..b9a29b30b 100644 --- a/exercises/binary-search-tree/HINTS.md +++ b/exercises/binary-search-tree/HINTS.md @@ -12,5 +12,6 @@ with `Eq` and `Show` instances, and implement the functions: - `singleton` - `toList` -You will find the type signatures already in place, but it is up to you -to define the functions. +You will find a dummy data declaration and type signatures already in place, +but it is up to you to define the functions and create a meaningful data type, +newtype or type synonym. diff --git a/exercises/binary-search-tree/src/BST.hs b/exercises/binary-search-tree/src/BST.hs index c59ac0327..47c13b9d3 100644 --- a/exercises/binary-search-tree/src/BST.hs +++ b/exercises/binary-search-tree/src/BST.hs @@ -10,6 +10,8 @@ module BST , toList ) where +data BST a = Dummy deriving (Eq, Show) + bstLeft :: BST a -> Maybe (BST a) bstLeft = undefined