[ngrams] some small refactoring

parent 5401daf1
Pipeline #4100 passed with stages
in 61 minutes and 57 seconds
...@@ -587,36 +587,20 @@ instance Applicable NgramsTablePatch (Maybe NgramsTableMap) where ...@@ -587,36 +587,20 @@ instance Applicable NgramsTablePatch (Maybe NgramsTableMap) where
ngramsElementToRepo :: NgramsElement -> NgramsRepoElement ngramsElementToRepo :: NgramsElement -> NgramsRepoElement
ngramsElementToRepo ngramsElementToRepo NgramsElement { .. } =
(NgramsElement { _ne_size = s NgramsRepoElement { _nre_size = _ne_size
, _ne_list = l , _nre_list = _ne_list
, _ne_root = r , _nre_parent = _ne_parent
, _ne_parent = p , _nre_root = _ne_root
, _ne_children = c , _nre_children = _ne_children }
}) =
NgramsRepoElement
{ _nre_size = s
, _nre_list = l
, _nre_parent = p
, _nre_root = r
, _nre_children = c
}
ngramsElementFromRepo :: NgramsTerm -> NgramsRepoElement -> NgramsElement ngramsElementFromRepo :: NgramsTerm -> NgramsRepoElement -> NgramsElement
ngramsElementFromRepo ngramsElementFromRepo ngrams (NgramsRepoElement { .. }) =
ngrams NgramsElement { _ne_size = _nre_size
(NgramsRepoElement , _ne_list = _nre_list
{ _nre_size = s , _ne_root = _nre_root
, _nre_list = l , _ne_parent = _nre_parent
, _nre_parent = p , _ne_children = _nre_children
, _nre_root = r
, _nre_children = c
}) =
NgramsElement { _ne_size = s
, _ne_list = l
, _ne_root = r
, _ne_parent = p
, _ne_children = c
, _ne_ngrams = ngrams , _ne_ngrams = ngrams
, _ne_occurrences = mempty -- panic $ "API.Ngrams.Types._ne_occurrences" , _ne_occurrences = mempty -- panic $ "API.Ngrams.Types._ne_occurrences"
{- {-
......
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