11{-# LANGUAGE DeriveAnyClass, KindSignatures, MultiWayIf #-}
22
3- module Data.Project (
4- -- * Projects
5- ProjectF (.. )
6- , Project
3+ module Data.Project
4+ ( Project (.. )
75 , ProjectException (.. )
86 , projectExtensions
97 , projectName
@@ -24,26 +22,14 @@ import qualified Data.Text as T
2422import System.FilePath.Posix
2523import Semantic.IO
2624
27- -- | A 'ProjectF' contains all the information that semantic needs
28- -- to execute an analysis, diffing, or graphing pass. It is higher-kinded
29- -- in terms of the container type for paths and blobs, as well as the
30- -- path type (this is necessary because protobuf uses different vector
31- -- representations for @repeated string@ and @repeated Blob@.
32- -- You probably want to use the 'Project' or 'PB' type aliases.
33- data ProjectF (blobs :: * -> * ) (paths :: * -> * ) path = Project
34- { projectRootDir :: path
35- , projectBlobs :: blobs Blob
25+ -- | A 'Project' contains all the information that semantic needs
26+ -- to execute an analysis, diffing, or graphing pass.
27+ data Project = Project
28+ { projectRootDir :: FilePath
29+ , projectBlobs :: [Blob ]
3630 , projectLanguage :: Language
37- , projectExcludeDirs :: paths path
38- } deriving (Functor , Generic )
39-
40- deriving instance (Eq path , Eq (blobs Blob ), Eq (paths path )) => Eq (ProjectF blobs paths path )
41- deriving instance (Show path , Show (blobs Blob ), Show (paths path )) => Show (ProjectF blobs paths path )
42-
43- -- | This 'Project' type is the one used during semantic's normal
44- -- course of diffing, evaluation, and graphing. You probably want to
45- -- use this one.
46- type Project = ProjectF [] [] FilePath
31+ , projectExcludeDirs :: [FilePath ]
32+ } deriving (Eq , Show , Generic )
4733
4834projectName :: Project -> Text
4935projectName = T. pack . dropExtensions . takeFileName . projectRootDir
0 commit comments