mirror of
https://github.com/github/semantic.git
synced 2024-11-27 12:57:49 +03:00
last few fixes
This commit is contained in:
parent
51e153aec5
commit
bb6a4b0a8a
@ -117,7 +117,7 @@ taggedGraphToAdjList = accumToAdj . adjMapToAccum . adjacencyMap . toGraph . sim
|
||||
V.Module{} -> MODULE
|
||||
V.Variable{} -> VARIABLE
|
||||
|
||||
-- Annotate all vertices of a 'Graph' with a 'Tag', starting from 0.
|
||||
-- Annotate all vertices of a 'Graph' with a 'Tag', starting from 1.
|
||||
tagGraph :: Graph vertex -> Graph (vertex, Tag)
|
||||
tagGraph = run . runFresh 1 . go where
|
||||
go :: Graph vertex -> Eff '[Fresh] (Graph (vertex, Tag))
|
||||
|
@ -4,7 +4,7 @@ module Data.Project (
|
||||
-- * Projects
|
||||
ProjectF (..)
|
||||
, Project
|
||||
, PB
|
||||
, PBProject
|
||||
, ProjectException (..)
|
||||
, fromPB
|
||||
, projectExtensions
|
||||
@ -52,13 +52,13 @@ type Project = ProjectF [] [] FilePath
|
||||
|
||||
-- | This 'Project' type is protobuf-compatible, and corresponds with
|
||||
-- the @Project@ message declaration present in types.proto.
|
||||
type PB = ProjectF NestedVec UnpackedVec Text
|
||||
type PBProject = ProjectF NestedVec UnpackedVec Text
|
||||
|
||||
deriving instance Message PB
|
||||
instance Named PB where nameOf _ = "Project"
|
||||
deriving instance Message PBProject
|
||||
instance Named PBProject where nameOf _ = "Project"
|
||||
|
||||
-- | Convert from a packed protobuf representatio nto a more useful one.
|
||||
fromPB :: PB -> Project
|
||||
-- | Convert from a packed protobuf representation to a more useful one.
|
||||
fromPB :: PBProject -> Project
|
||||
fromPB Project {..} = Project
|
||||
{ projectRootDir = T.unpack projectRootDir
|
||||
, projectBlobs = toList projectBlobs
|
||||
|
Loading…
Reference in New Issue
Block a user