From 1b6dc379fbd509f7886816568b65fee16a254629 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 8 Feb 2020 20:46:26 +0000 Subject: [PATCH] Switch from HashMap to Map --- package.yaml | 2 +- src/Forest/Api.hs | 4 ++-- src/Forest/Tree.hs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.yaml b/package.yaml index e4df401..3c5a7aa 100644 --- a/package.yaml +++ b/package.yaml @@ -16,8 +16,8 @@ dependencies: - base >= 4.7 && < 5 - aeson - async +- containers - text -- unordered-containers - websockets library: diff --git a/src/Forest/Api.hs b/src/Forest/Api.hs index 931d07f..1a919a6 100644 --- a/src/Forest/Api.hs +++ b/src/Forest/Api.hs @@ -21,7 +21,7 @@ import Control.Monad import Data.Aeson import Data.Aeson.Types import Data.Char -import qualified Data.HashMap.Strict as Map +import qualified Data.Map.Strict as Map import qualified Data.Text as T import GHC.Generics @@ -35,7 +35,7 @@ data Node = Node , nodeEdit :: !Bool , nodeDelete :: !Bool , nodeReply :: !Bool - , nodeChildren :: !(Map.HashMap NodeId Node) + , nodeChildren :: !(Map.Map NodeId Node) } deriving (Show, Generic) nodeOptions :: Options diff --git a/src/Forest/Tree.hs b/src/Forest/Tree.hs index 0491562..0eba61c 100644 --- a/src/Forest/Tree.hs +++ b/src/Forest/Tree.hs @@ -5,8 +5,8 @@ module Forest.Tree , initialNode ) where -import qualified Data.HashMap.Strict as Map -import qualified Data.Text as T +import qualified Data.Map.Strict as Map +import qualified Data.Text as T import Forest.Api