1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Note that you don’t want new instances of HasDeclarationWithStrategy.

This commit is contained in:
Rob Rix 2017-10-06 11:29:10 -04:00
parent 88477db7fa
commit c474b15ee2

View File

@ -169,6 +169,8 @@ instance Apply HasDeclaration fs => CustomHasDeclaration (Union fs) where
data Strategy = Default | Custom
-- | Produce a 'Declaration' for a syntax node using either the 'Default' or 'Custom' strategy.
--
-- You should probably be using 'CustomHasDeclaration' instead of this class; and you should not define new instances of this class.
class HasDeclarationWithStrategy (strategy :: Strategy) syntax where
toDeclarationWithStrategy :: (Foldable whole, HasField fields Range, HasField fields Span) => proxy strategy -> Blob -> Record fields -> RAlgebra syntax (Term whole (Record fields)) (Maybe Declaration)