Permalink
Browse files

Switch to strict maps.

* Use Data.HashMap.Strict.
* Update README.
  • Loading branch information...
1 parent cb3cfec commit cfc159231b9b6398383d5a56d7879f3390e16f38 Itai Zukerman committed May 7, 2012
Showing with 14 additions and 4 deletions.
  1. +1 −1 compiler/cpp/src/generate/t_hs_generator.cc
  2. +12 −2 lib/hs/README
  3. +1 −1 lib/hs/src/Thrift/Types.hs
@@ -248,7 +248,7 @@ string t_hs_generator::hs_imports() {
"import Data.Text.Lazy ( Text )\n"
"import qualified Data.Text.Lazy as TL\n"
"import Data.Typeable ( Typeable )\n"
- "import qualified Data.HashMap.Lazy as Map\n"
+ "import qualified Data.HashMap.Strict as Map\n"
"import qualified Data.HashSet as Set\n"
"import qualified Data.Vector as Vector\n"
"\n"
View
@@ -52,6 +52,17 @@ Enums
Become Haskell 'data' types. Use fromEnum to get out the int value.
+Lists
+=====
+
+Become Data.Vector.Vector from the vector package.
+
+Maps and Sets
+=============
+
+Become Data.HashMap.Strict.Map and Data.HashSet.Set from the
+unordered-containers package.
+
Structs
=======
@@ -61,7 +72,7 @@ fields are Maybe types.
Exceptions
==========
-Identical to structs. Throw them with throwDyn. Catch them with catchDyn.
+Identical to structs. Use them with throw and catch from Control.Exception.
Client
======
@@ -86,4 +97,3 @@ Processor
Just a function that takes a handler label, protocols. It calls the
superclasses process if there is a superclass.
-
@@ -20,7 +20,7 @@ module Thrift.Types where
import Data.Foldable (foldl')
import Data.Hashable ( Hashable, hashWithSalt )
-import qualified Data.HashMap.Lazy as Map
+import qualified Data.HashMap.Strict as Map
import qualified Data.HashSet as Set
import qualified Data.Vector as Vector

0 comments on commit cfc1592

Please sign in to comment.