mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
📝 the HasDeclarationWithStrategy instances.
This commit is contained in:
parent
f7cec59848
commit
88477db7fa
@ -187,9 +187,11 @@ type family DeclarationStrategy syntax where
|
||||
DeclarationStrategy a = 'Default
|
||||
|
||||
|
||||
-- | The 'Default' strategy produces 'Nothing'.
|
||||
instance HasDeclarationWithStrategy 'Default syntax where
|
||||
toDeclarationWithStrategy _ _ _ _ = Nothing
|
||||
|
||||
-- | The 'Custom' strategy delegates the selection of the strategy to the 'CustomHasDeclaration' instance for the type.
|
||||
instance CustomHasDeclaration syntax => HasDeclarationWithStrategy 'Custom syntax where
|
||||
toDeclarationWithStrategy _ = customToDeclaration
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user