64 lines
1.3 KiB
Haskell
64 lines
1.3 KiB
Haskell
module GHCup.Errors where
|
|
|
|
import GHCup.Types
|
|
|
|
import Control.Exception.Safe
|
|
import Data.ByteString ( ByteString )
|
|
import Data.Text ( Text )
|
|
import HPath
|
|
|
|
|
|
-- | A compatible platform could not be found.
|
|
data PlatformResultError = NoCompatiblePlatform String -- the platform we got
|
|
deriving Show
|
|
|
|
data NoDownload = NoDownload
|
|
deriving Show
|
|
|
|
data NoCompatibleArch = NoCompatibleArch String
|
|
deriving Show
|
|
|
|
data DistroNotFound = DistroNotFound
|
|
deriving Show
|
|
|
|
data ArchiveError = UnknownArchive ByteString
|
|
deriving Show
|
|
|
|
data URLException = UnsupportedURL
|
|
deriving Show
|
|
|
|
data FileError = CopyError String
|
|
deriving Show
|
|
|
|
data TagNotFound = TagNotFound Tag Tool
|
|
deriving Show
|
|
|
|
data AlreadyInstalled = AlreadyInstalled ToolRequest
|
|
deriving Show
|
|
|
|
data NotInstalled = NotInstalled ToolRequest
|
|
deriving Show
|
|
|
|
data NotSet = NotSet Tool
|
|
deriving Show
|
|
|
|
data JSONError = JSONDecodeError String
|
|
deriving Show
|
|
|
|
data ParseError = ParseError String
|
|
deriving Show
|
|
|
|
instance Exception ParseError
|
|
|
|
data FileDoesNotExistError = FileDoesNotExistError ByteString
|
|
deriving Show
|
|
|
|
data GHCNotFound = GHCNotFound
|
|
deriving Show
|
|
|
|
data BuildConfigNotFound = BuildConfigNotFound (Path Abs)
|
|
deriving Show
|
|
|
|
data DigestError = DigestError Text Text
|
|
deriving Show
|