Commit 09d3152e authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Drop redundant HasText costrants from ExtractNgrams

The `ExtractNgrams` typeclass _definition_ imposed a redundant
`HasText` constraint, forcing all the _instances_ to have `HasText`
defined even though the instance didn't make any use of that.

That is overly-rigid, and it has been fixed by this commit.
parent da4f2596
...@@ -116,7 +116,7 @@ data ExtractedNgrams = SimpleNgrams { unSimpleNgrams :: Ngrams } ...@@ -116,7 +116,7 @@ data ExtractedNgrams = SimpleNgrams { unSimpleNgrams :: Ngrams }
instance Hashable ExtractedNgrams instance Hashable ExtractedNgrams
-- | A typeclass that represents extracting ngrams from an entity. -- | A typeclass that represents extracting ngrams from an entity.
class HasText h => ExtractNgrams h where class ExtractNgrams h where
extractNgrams :: NLPServerConfig extractNgrams :: NLPServerConfig
-> TermType Lang -> TermType Lang
-> h -> h
......
...@@ -43,7 +43,7 @@ instance NFData HyperdataContact where ...@@ -43,7 +43,7 @@ instance NFData HyperdataContact where
instance HasText HyperdataContact instance HasText HyperdataContact
where where
hasText = undefined hasText = mempty
defaultHyperdataContact :: HyperdataContact defaultHyperdataContact :: HyperdataContact
defaultHyperdataContact = defaultHyperdataContact =
......
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