mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Define decorateTermWithLabel inline.
This commit is contained in:
parent
3dc0a4f071
commit
32e084971a
@ -112,8 +112,7 @@ featureVectorDecorator :: (Prologue.Foldable f, Functor f) => (forall b. CofreeF
|
|||||||
featureVectorDecorator getLabel p q d (a :< s) = Vector.replicate d 0
|
featureVectorDecorator getLabel p q d (a :< s) = Vector.replicate d 0
|
||||||
|
|
||||||
decorateTermWithLabel :: (Typeable label, Functor f) => (forall b. CofreeF f (Record fields) b -> label) -> Cofree f (Record fields) -> Cofree f (Record (label ': fields))
|
decorateTermWithLabel :: (Typeable label, Functor f) => (forall b. CofreeF f (Record fields) b -> label) -> Cofree f (Record fields) -> Cofree f (Record (label ': fields))
|
||||||
decorateTermWithLabel getLabel = cata $ \ c@(h :< t) ->
|
decorateTermWithLabel getLabel = cata $ \ c -> cofree ((getLabel c .: headF c) :< tailF c)
|
||||||
cofree ((getLabel c .: h) :< t)
|
|
||||||
|
|
||||||
decorateTermWithPQGram :: (Typeable label, Functor f) => (forall b. CofreeF f (Record (label ': fields)) b -> label) -> Int -> Int -> Cofree f (Record (label ': fields)) -> Cofree f (Record (Gram label ': fields))
|
decorateTermWithPQGram :: (Typeable label, Functor f) => (forall b. CofreeF f (Record (label ': fields)) b -> label) -> Int -> Int -> Cofree f (Record (label ': fields)) -> Cofree f (Record (Gram label ': fields))
|
||||||
decorateTermWithPQGram getLabel p q = futu coalgebra . (,) []
|
decorateTermWithPQGram getLabel p q = futu coalgebra . (,) []
|
||||||
|
Loading…
Reference in New Issue
Block a user