Commit b3e16c15 authored by Nicolas Pouillard's avatar Nicolas Pouillard

Strict Repo

parent adfa9d24
Pipeline #1135 failed with stage
...@@ -148,12 +148,11 @@ deriveJSON (unPrefix "_rp_") ''RootParent ...@@ -148,12 +148,11 @@ deriveJSON (unPrefix "_rp_") ''RootParent
makeLenses ''RootParent makeLenses ''RootParent
data NgramsRepoElement = NgramsRepoElement data NgramsRepoElement = NgramsRepoElement
{ _nre_size :: Int { _nre_size :: !Int
, _nre_list :: ListType , _nre_list :: !ListType
--, _nre_root_parent :: Maybe RootParent , _nre_root :: !(Maybe NgramsTerm)
, _nre_root :: Maybe NgramsTerm , _nre_parent :: !(Maybe NgramsTerm)
, _nre_parent :: Maybe NgramsTerm , _nre_children :: !(MSet NgramsTerm)
, _nre_children :: MSet NgramsTerm
} }
deriving (Ord, Eq, Show, Generic) deriving (Ord, Eq, Show, Generic)
...@@ -408,11 +407,11 @@ instance ToSchema a => ToSchema (Replace a) where ...@@ -408,11 +407,11 @@ instance ToSchema a => ToSchema (Replace a) where
& required .~ [ "old", "new" ] & required .~ [ "old", "new" ]
data NgramsPatch data NgramsPatch
= NgramsPatch { _patch_children :: PatchMSet NgramsTerm = NgramsPatch { _patch_children :: !(PatchMSet NgramsTerm)
, _patch_list :: Replace ListType -- TODO Map UserId ListType , _patch_list :: !(Replace ListType) -- TODO Map UserId ListType
} }
| NgramsReplace { _patch_old :: Maybe NgramsRepoElement | NgramsReplace { _patch_old :: !(Maybe NgramsRepoElement)
, _patch_new :: Maybe NgramsRepoElement , _patch_new :: !(Maybe NgramsRepoElement)
} }
deriving (Eq, Show, Generic) deriving (Eq, Show, Generic)
...@@ -639,9 +638,9 @@ instance Arbitrary a => Arbitrary (Versioned a) where ...@@ -639,9 +638,9 @@ instance Arbitrary a => Arbitrary (Versioned a) where
------------------------------------------------------------------------ ------------------------------------------------------------------------
data Repo s p = Repo data Repo s p = Repo
{ _r_version :: Version { _r_version :: !Version
, _r_state :: s , _r_state :: !s
, _r_history :: [p] , _r_history :: ![p]
-- first patch in the list is the most recent -- first patch in the list is the most recent
} }
deriving (Generic) deriving (Generic)
......
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