mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
toDeclaration is an R-algebra.
This commit is contained in:
parent
67b4da98c9
commit
20564b5a11
@ -93,7 +93,7 @@ data Declaration
|
||||
|
||||
|
||||
class HasDeclaration f where
|
||||
toDeclaration :: Blob -> f a -> Maybe Declaration
|
||||
toDeclaration :: Blob -> RAlgebra f t (Maybe Declaration)
|
||||
|
||||
instance (DeclarationStrategy f ~ strategy, HasDeclarationWithStrategy strategy f) => HasDeclaration f where
|
||||
toDeclaration = toDeclarationWithStrategy (undefined :: proxy strategy)
|
||||
@ -102,7 +102,7 @@ instance (DeclarationStrategy f ~ strategy, HasDeclarationWithStrategy strategy
|
||||
data Strategy = Default | Custom
|
||||
|
||||
class HasDeclarationWithStrategy (strategy :: Strategy) f where
|
||||
toDeclarationWithStrategy :: proxy strategy -> Blob -> f a -> Maybe Declaration
|
||||
toDeclarationWithStrategy :: proxy strategy -> Blob -> RAlgebra f t (Maybe Declaration)
|
||||
|
||||
|
||||
type family DeclarationStrategy f where
|
||||
|
Loading…
Reference in New Issue
Block a user