From 5463f8ccdecbdd23ae47c2a956e906eb6b83a724 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Mon, 11 Feb 2019 17:01:13 +0100 Subject: Add demoteSProjType --- lib/Distribution/Helper.hs | 1 + src/CabalHelper/Compiletime/Types.hs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index cabd97d..964d722 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -66,6 +66,7 @@ module Distribution.Helper ( , DistDir(..) , ProjType(..) , SProjType(..) + , demoteSProjType , ProjLoc(..) , Programs(..) diff --git a/src/CabalHelper/Compiletime/Types.hs b/src/CabalHelper/Compiletime/Types.hs index ac4577f..0d1ca54 100644 --- a/src/CabalHelper/Compiletime/Types.hs +++ b/src/CabalHelper/Compiletime/Types.hs @@ -53,6 +53,11 @@ data SProjType pt where SV2 :: SProjType 'V2 SStack :: SProjType 'Stack +demoteSProjType :: SProjType pt -> ProjType +demoteSProjType SV1 = V1 +demoteSProjType SV2 = V2 +demoteSProjType SStack = Stack + -- | Location of project sources. The project type of a given directory can be -- determined by trying to access a set of marker files. See below. data ProjLoc (pt :: ProjType) where -- cgit v1.2.3