1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Define a Parse command.

This commit is contained in:
Rob Rix 2017-03-31 15:10:16 -04:00
parent d2650ab4f0
commit b136eeca50

View File

@ -1,4 +1,4 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds, GADTs #-}
module Command
( module C
) where
@ -6,24 +6,30 @@ module Command
import Command.Diff as C
import Command.Parse as C
import Control.Monad.Free.Freer
import Data.Record
import Data.String
import Debug.Trace (traceEventIO)
import Info
import qualified Git
import Git.Blob
import Git.Libgit2
import Git.Repository
import Git.Types
import GitmonClient
import Language
import Prologue
import Source
import Syntax
import Term
data CommandF f where
ReadFile :: FilePath -> CommandF SourceBlob
ReadFilesAtSHAs :: FilePath -> [FilePath] -> String -> String -> CommandF [(SourceBlob, SourceBlob)]
Parse :: SourceBlob -> Language -> CommandF (Term (Syntax Text) (Record '[Range, Category, SourceSpan]))
-- read a list of files from git
-- read the list of files changed between a pair of SHAs
-- parse source in some language
-- diff a pair of terms
-- render a term