Commit 5d8b0446 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[STACK] upgrading servant and LTS.

parent feb9c078
......@@ -7,6 +7,7 @@ import Gargantext.Prelude
import Data.Foldable as F
import Data.Map.Strict (insertWith)
import Data.Map (Map)
import qualified Data.Map as M
......@@ -31,7 +32,7 @@ letters'' = DTL.foldr (\ch xs -> DTL.singleton ch : xs) []
-- number of punctuation
occurrences :: Ord a => [a] -> Map a Int
occurrences xs = foldl' (\x y -> M.insertWith' (+) y 1 x) M.empty xs
occurrences xs = foldl' (\x y -> insertWith (+) y 1 x) M.empty xs
-- for optimization :
--occurrences' :: Ord a => [a] -> Map a Integer
......
......@@ -34,6 +34,7 @@ import Protolude ( Bool(True, False), Int, Double, Integer
import qualified Data.List as L hiding (head, sum)
import qualified Control.Monad as M
import qualified Data.Map as Map
import Data.Map.Strict (insertWith)
import qualified Data.Vector as V
import Safe (headMay)
import Text.Show (Show(), show)
......@@ -149,7 +150,7 @@ count2map xs = Map.map (/ (fromIntegral (length xs))) (count2map' xs)
-- | insert in a dict
count2map' :: (Ord k, Foldable t) => t k -> Map.Map k Double
count2map' xs = L.foldl' (\x y -> Map.insertWith' (+) y 1 x) Map.empty xs
count2map' xs = L.foldl' (\x y -> insertWith (+) y 1 x) Map.empty xs
trunc :: (RealFrac a, Integral c, Integral b) => b -> a -> c
......
......@@ -2,21 +2,22 @@ flags: {}
extra-package-dbs: []
packages:
- .
allow-newer: true
extra-deps:
- aeson-1.0.2.1
- attoparsec-0.13.2.2
- aeson-0.11.3.0
- aeson-lens-0.5.0.0
- duckling-0.1.3.0
- http-media-0.7.1.2
- http-types-0.11
- mmorph-1.1.0
- extra-1.5.3
- haskell-src-exts-1.18.2
- http-types-0.12.1
- protolude-0.2
- servant-0.12.1
- servant-auth-0.3.0.1
- servant-client-0.12.0.1
- servant-client-core-0.12
- servant-docs-0.11.1
- servant-mock-0.8.3
- servant-multipart-0.11.1
- servant-server-0.12
- text-1.2.3.0
resolver: lts-9.2
- text-show-3.6.2
resolver: lts-10.6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment