Adds new Error type `IsolatedDirNotEmpty`

This commit is contained in:
Arjun Kathuria 2021-08-10 20:11:32 +05:30
parent d1735bc446
commit 80fa7965a4
1 changed files with 8 additions and 0 deletions

View File

@ -134,6 +134,14 @@ instance Pretty AlreadyInstalled where
pPrint (AlreadyInstalled tool ver') =
text [i|#{tool}-#{prettyShow ver'} is already installed|]
-- | The Directory for isolated install already exists and is not empty
-- | This is done to prevent any overwriting
data IsolatedDirNotEmpty = IsolatedDirNotEmpty {path :: FilePath}
instance Pretty IsolatedDirNotEmpty where
pPrint (IsolatedDirNotEmpty path) = do
text [i| The directory for isolated install already exists and is NOT EMPTY : #{path}|]
-- | The tool is not installed. Some operations rely on a tool
-- to be installed (such as setting the current GHC version).
data NotInstalled = NotInstalled Tool GHCTargetVersion