ghcup-hs/lib/GHCup/Utils/Tar/Types.hs
Rune K. Svendsen 87ec8c756f Move ArchiveResult into GHCup.Utils.Tar.Types
So a module that wants to import ArchiveResult doesn't have to worry about CPP.
2024-01-09 10:19:58 +01:00

32 lines
715 B
Haskell

{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
module GHCup.Utils.Tar.Types
( ArchiveResult(..)
)
where
#if defined(TAR)
import Control.Exception ( Exception )
import Control.DeepSeq ( NFData )
import qualified GHC.Generics as GHC
data ArchiveResult = ArchiveFatal
| ArchiveFailed
| ArchiveWarn
| ArchiveRetry
| ArchiveOk
| ArchiveEOF
deriving (Eq, Show, GHC.Generic)
instance NFData ArchiveResult
instance Exception ArchiveResult
#else
import Codec.Archive ( ArchiveResult(..) )
#endif