mirror of
https://github.com/github/semantic.git
synced 2024-12-19 21:01:35 +03:00
Define an AnalyzeTerm instance.
This commit is contained in:
parent
2b000639b3
commit
c32bcc884f
@ -55,11 +55,12 @@ import Data.Abstract.Value.Type as Type
|
|||||||
import Data.Abstract.AccessControls.Instances ()
|
import Data.Abstract.AccessControls.Instances ()
|
||||||
import Data.Blob
|
import Data.Blob
|
||||||
import Data.Graph
|
import Data.Graph
|
||||||
import Data.Graph.ControlFlowVertex (VertexDeclaration)
|
import Data.Graph.ControlFlowVertex (VertexDeclaration, VertexDeclaration1)
|
||||||
import Data.Language as Language
|
import Data.Language as Language
|
||||||
import Data.List (isPrefixOf, isSuffixOf)
|
import Data.List (isPrefixOf, isSuffixOf)
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import Data.Project
|
import Data.Project
|
||||||
|
import Data.Term
|
||||||
import Data.Text (pack, unpack)
|
import Data.Text (pack, unpack)
|
||||||
import Language.Haskell.HsColour
|
import Language.Haskell.HsColour
|
||||||
import Language.Haskell.HsColour.Colourise
|
import Language.Haskell.HsColour.Colourise
|
||||||
@ -110,6 +111,17 @@ class
|
|||||||
, HasSpan (term Loc)
|
, HasSpan (term Loc)
|
||||||
) => AnalyzeTerm (term :: * -> *)
|
) => AnalyzeTerm (term :: * -> *)
|
||||||
|
|
||||||
|
instance
|
||||||
|
( VertexDeclaration1 syntax
|
||||||
|
, Declarations1 syntax
|
||||||
|
, Evaluatable syntax
|
||||||
|
, FreeVariables1 syntax
|
||||||
|
, AccessControls1 syntax
|
||||||
|
, Functor syntax
|
||||||
|
, Ord1 syntax
|
||||||
|
, Show1 syntax
|
||||||
|
) => AnalyzeTerm (Term syntax)
|
||||||
|
|
||||||
analysisParsers :: Map Language (SomeParser AnalyzeTerm Loc)
|
analysisParsers :: Map Language (SomeParser AnalyzeTerm Loc)
|
||||||
analysisParsers = Map.fromList
|
analysisParsers = Map.fromList
|
||||||
[ goParser'
|
[ goParser'
|
||||||
|
Loading…
Reference in New Issue
Block a user