From 4a78f15ea96b6e78fd0cd5370b93f24b90fc954e Mon Sep 17 00:00:00 2001 From: Tony Morris Date: Thu, 24 Oct 2013 11:37:44 +1000 Subject: [PATCH] Fix imports for issue #19 --- .ghci | 1 + course.cabal | 1 + src/Algorithm/Cheque.hs | 2 ++ src/Algorithm/FastAnagrams.hs | 2 ++ src/IO/Interactive.hs | 1 + src/Monad/State.hs | 3 +++ src/Monad/StateT.hs | 2 ++ src/Parser/JsonParser.hs | 3 +++ src/Parser/MoreParser.hs | 3 +++ src/Parser/Parser.hs | 1 + src/Structure/BKTree.hs | 1 + 11 files changed, 20 insertions(+) diff --git a/.ghci b/.ghci index 57d4776..08306ed 100644 --- a/.ghci +++ b/.ghci @@ -4,5 +4,6 @@ :set -Wall :set -fno-warn-unused-binds :set -fno-warn-unused-do-bind +:set -fno-warn-unused-imports :set -fno-warn-type-defaults diff --git a/course.cabal b/course.cabal index 36a1c2b..5f85939 100644 --- a/course.cabal +++ b/course.cabal @@ -35,6 +35,7 @@ library ghc-options: -Wall -fno-warn-unused-binds -fno-warn-unused-do-bind + -fno-warn-unused-imports -fno-warn-type-defaults hs-source-dirs: src diff --git a/src/Algorithm/Cheque.hs b/src/Algorithm/Cheque.hs index ac331f6..37c32c5 100644 --- a/src/Algorithm/Cheque.hs +++ b/src/Algorithm/Cheque.hs @@ -15,6 +15,8 @@ data structures that may assist you in deriving the result. It is not compulsory module Algorithm.Cheque where +import Data.Maybe +import Data.Char import Data.List import Control.Applicative diff --git a/src/Algorithm/FastAnagrams.hs b/src/Algorithm/FastAnagrams.hs index 51442f1..dd414a6 100644 --- a/src/Algorithm/FastAnagrams.hs +++ b/src/Algorithm/FastAnagrams.hs @@ -2,6 +2,8 @@ module Algorithm.FastAnagrams where import Data.Char import Data.Function +import qualified Data.Set as S +import Data.List -- Return all anagrams of the given string -- that appear in the given dictionary file. diff --git a/src/IO/Interactive.hs b/src/IO/Interactive.hs index 1f908af..25531d4 100644 --- a/src/IO/Interactive.hs +++ b/src/IO/Interactive.hs @@ -5,6 +5,7 @@ module IO.Interactive where import Core import Monad.Functor import Monad.Monad +import Data.Char import Structure.List import Intro.Optional diff --git a/src/Monad/State.hs b/src/Monad/State.hs index a7b0151..04f6185 100644 --- a/src/Monad/State.hs +++ b/src/Monad/State.hs @@ -4,11 +4,14 @@ module Monad.State where import Core +import qualified Prelude as P +import Data.Char import Intro.Optional import Structure.List import Monad.Functor import Monad.Monad import qualified Data.Foldable as F +import qualified Data.Set as S -- $setup -- >>> import Test.QuickCheck.Function diff --git a/src/Monad/StateT.hs b/src/Monad/StateT.hs index 09b4b14..8365f6e 100644 --- a/src/Monad/StateT.hs +++ b/src/Monad/StateT.hs @@ -8,6 +8,8 @@ import Intro.Optional import Structure.List import Monad.Functor import Monad.Monad +import Monad.State +import qualified Data.Set as S -- | A `StateT` is a function from a state value `s` to a functor f of (a produced value `a`, and a resulting state `s`). newtype StateT s f a = diff --git a/src/Parser/JsonParser.hs b/src/Parser/JsonParser.hs index 7b38780..b0f6f88 100644 --- a/src/Parser/JsonParser.hs +++ b/src/Parser/JsonParser.hs @@ -1,7 +1,10 @@ module Parser.JsonParser where import Parser.Parser +import Parser.MoreParser +import Numeric import Parser.JsonValue +import Control.Applicative -- Exercise 1 -- | Parse a JSON string. Handle double-quotes, control characters, hexadecimal characters. diff --git a/src/Parser/MoreParser.hs b/src/Parser/MoreParser.hs index 9b764b5..48abb59 100644 --- a/src/Parser/MoreParser.hs +++ b/src/Parser/MoreParser.hs @@ -1,6 +1,9 @@ module Parser.MoreParser where import Parser.Parser +import Data.Char +import Numeric +import Control.Monad -- $setup -- >>> import Parser.Parser(isErrorResult, character, lower, is) diff --git a/src/Parser/Parser.hs b/src/Parser/Parser.hs index ae103bc..4b1c794 100644 --- a/src/Parser/Parser.hs +++ b/src/Parser/Parser.hs @@ -1,5 +1,6 @@ module Parser.Parser where +import Data.Char import Control.Applicative import Parser.Person diff --git a/src/Structure/BKTree.hs b/src/Structure/BKTree.hs index 96fa139..a346b83 100644 --- a/src/Structure/BKTree.hs +++ b/src/Structure/BKTree.hs @@ -17,6 +17,7 @@ import Structure.MetricSpace import Data.Map(Map) import qualified Data.Map as M import Data.Foldable +import qualified Data.Foldable as F import Data.Monoid data BKTree a =