mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Move Term into Language.Python.
This commit is contained in:
parent
a0e723a22d
commit
f33e678c7a
@ -1,2 +1,12 @@
|
|||||||
module Language.Python
|
module Language.Python
|
||||||
() where
|
( Term(..)
|
||||||
|
) where
|
||||||
|
|
||||||
|
import qualified Language.Python.Tags as PyTags
|
||||||
|
import qualified Tags.Tagging.Precise as Tags
|
||||||
|
import qualified TreeSitter.Python.AST as Py
|
||||||
|
|
||||||
|
newtype Term a = Term { getTerm :: Py.Module a }
|
||||||
|
|
||||||
|
instance Tags.ToTags Term where
|
||||||
|
tags src = Tags.runTagging src . PyTags.tags . getTerm
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{-# LANGUAGE AllowAmbiguousTypes, DataKinds, DisambiguateRecordFields, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, NamedFieldPuns, ScopedTypeVariables, TypeApplications, TypeFamilies, TypeOperators, UndecidableInstances #-}
|
{-# LANGUAGE AllowAmbiguousTypes, DataKinds, DisambiguateRecordFields, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, NamedFieldPuns, ScopedTypeVariables, TypeApplications, TypeFamilies, TypeOperators, UndecidableInstances #-}
|
||||||
module Language.Python.Tags
|
module Language.Python.Tags
|
||||||
( Term(..)
|
( ToTags(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Effect.Reader
|
import Control.Effect.Reader
|
||||||
@ -18,12 +18,6 @@ import Tags.Tag
|
|||||||
import qualified Tags.Tagging.Precise as Tags
|
import qualified Tags.Tagging.Precise as Tags
|
||||||
import qualified TreeSitter.Python.AST as Py
|
import qualified TreeSitter.Python.AST as Py
|
||||||
|
|
||||||
newtype Term a = Term { getTerm :: Py.Module a }
|
|
||||||
|
|
||||||
instance Tags.ToTags Term where
|
|
||||||
tags src = Tags.runTagging src . tags . getTerm
|
|
||||||
|
|
||||||
|
|
||||||
class ToTags t where
|
class ToTags t where
|
||||||
tags
|
tags
|
||||||
:: ( Carrier sig m
|
:: ( Carrier sig m
|
||||||
|
Loading…
Reference in New Issue
Block a user