mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Link to AdvancedOverlap.
This commit is contained in:
parent
c474b15ee2
commit
5e163648da
@ -109,6 +109,8 @@ declarationAlgebra blob (In ann syntax) = toDeclaration blob ann syntax
|
||||
|
||||
|
||||
-- | Types for which we can produce a 'Declaration' in 'Maybe'. There is exactly one instance of this typeclass; adding customized 'Declaration's for a new type is done by defining an instance of 'CustomHasDeclaration' instead.
|
||||
--
|
||||
-- This typeclass employs the Advanced Overlap techniques designed by Oleg Kiselyov & Simon Peyton Jones: https://wiki.haskell.org/GHC/AdvancedOverlap.
|
||||
class HasDeclaration syntax where
|
||||
-- | Compute a 'Declaration' for a syntax type using its 'CustomHasDeclaration' instance, if any, or else falling back to the default definition (which simply returns 'Nothing').
|
||||
toDeclaration :: (Foldable whole, HasField fields Range, HasField fields Span) => Blob -> Record fields -> RAlgebra syntax (Term whole (Record fields)) (Maybe Declaration)
|
||||
|
Loading…
Reference in New Issue
Block a user