forked from commercialhaskell/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectConfig.hs
More file actions
26 lines (22 loc) · 868 Bytes
/
ProjectConfig.hs
File metadata and controls
26 lines (22 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{-# LANGUAGE NoImplicitPrelude #-}
module Stack.Types.ProjectConfig
( ProjectConfig (..)
, isPCGlobalProject
) where
import Stack.Prelude
-- | Project configuration information. Not every run of Stack has a
-- true local project; see constructors below.
data ProjectConfig a
= PCProject a
-- ^ Normal run: we want a project, and have one. This comes from
-- either 'SYLDefault' or 'SYLOverride'.
| PCGlobalProject
-- ^ No project was found when using 'SYLDefault'. Instead, use
-- the implicit global.
| PCNoProject ![PackageIdentifierRevision]
-- ^ Use a no project run. This comes from 'SYLNoProject'.
-- | Yields 'True' only if the project configuration information is for the
-- implicit global project.
isPCGlobalProject :: ProjectConfig a -> Bool
isPCGlobalProject PCGlobalProject = True
isPCGlobalProject _ = False