aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Types.hs
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2015-03-28 01:23:52 +0100
committerDaniel Gröber <dxld@darkboxed.org>2015-03-28 01:35:48 +0100
commit871334f10f2d4d8033d2aca73e8df8dc6f83c02f (patch)
tree931d7bb2048e0dc17655bf1a6e5579701b1dc7ec /CabalHelper/Types.hs
parent3db768d6bd5e720c9e1186415dbc36d8cd8caade (diff)
Handle inplace library deps and do a rename pass
Diffstat (limited to 'CabalHelper/Types.hs')
-rw-r--r--CabalHelper/Types.hs28
1 files changed, 18 insertions, 10 deletions
diff --git a/CabalHelper/Types.hs b/CabalHelper/Types.hs
index 85cf2d2..add6dc1 100644
--- a/CabalHelper/Types.hs
+++ b/CabalHelper/Types.hs
@@ -14,27 +14,35 @@
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+{-# LANGUAGE DeriveGeneric, DefaultSignatures #-}
module CabalHelper.Types where
+import GHC.Generics
+
newtype ChModuleName = ChModuleName String
- deriving (Eq, Ord, Read, Show)
+ deriving (Eq, Ord, Read, Show, Generic)
data ChComponentName = ChSetupHsName
| ChLibName
| ChExeName String
| ChTestName String
| ChBenchName String
- deriving (Eq, Ord, Read, Show)
+ deriving (Eq, Ord, Read, Show, Generic)
-data Response
- = ResponseStrings [(ChComponentName, [String])]
- | ResponseEntrypoints [(ChComponentName, ChEntrypoint)]
- | ResponseLbi String
- deriving (Eq, Ord, Read, Show)
+data ChResponse
+ = ChResponseStrings [(ChComponentName, [String])]
+ | ChResponseEntrypoints [(ChComponentName, ChEntrypoint)]
+ | ChResponseLbi String
+ deriving (Eq, Ord, Read, Show, Generic)
-data ChEntrypoint = ChExeEntrypoint { chMainIs :: FilePath
+data ChEntrypoint = ChSetupEntrypoint -- ^ Almost like 'ChExeEntrypoint' but
+ -- @main-is@ could either be @"Setup.hs"@
+ -- or @"Setup.lhs"@. Since we don't know
+ -- where the source directory is you have
+ -- to find these files.
+ | ChLibEntrypoint { chExposedModules :: [ChModuleName]
, chOtherModules :: [ChModuleName]
}
- | ChLibentrypoint { chExposedModules :: [ChModuleName]
+ | ChExeEntrypoint { chMainIs :: FilePath
, chOtherModules :: [ChModuleName]
- } deriving (Eq, Ord, Read, Show)
+ } deriving (Eq, Ord, Read, Show, Generic)