[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
ngramsElementToRepo :: NgramsElement -> NgramsRepoElement
ngramsElementToRepo
(NgramsElement { _ne_size = s
, _ne_list = l
, _ne_root = r
, _ne_parent = p
, _ne_children = c
}) =
NgramsRepoElement
{ _nre_size = s
, _nre_list = l
, _nre_parent = p
, _nre_root = r
, _nre_children = c
}
ngramsElementToRepo NgramsElement { .. } =
NgramsRepoElement { _nre_size = _ne_size
, _nre_list = _ne_list
, _nre_parent = _ne_parent
, _nre_root = _ne_root
, _nre_children = _ne_children }
ngramsElementFromRepo :: NgramsTerm -> NgramsRepoElement -> NgramsElement
ngramsElementFromRepo
ngrams
(NgramsRepoElement
{ _nre_size = s
, _nre_list = l
, _nre_parent = p
, _nre_root = r
, _nre_children = c
}) =
NgramsElement { _ne_size = s
, _ne_list = l
, _ne_root = r
, _ne_parent = p
, _ne_children = c
ngramsElementFromRepo ngrams (NgramsRepoElement { .. }) =
NgramsElement { _ne_size = _nre_size
, _ne_list = _nre_list
, _ne_root = _nre_root
, _ne_parent = _nre_parent
, _ne_children = _nre_children
, _ne_ngrams = ngrams
, _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