module Language.Haskell.Syntax.ImpExp.IsBoot ( IsBootInterface(..) ) where

import Prelude (Eq, Ord, Show)
import Data.Data (Data)
import Control.DeepSeq (NFData(..), rwhnf)

-- | Indicates whether a module name is referring to a boot interface (hs-boot
-- file) or regular module (hs file). We need to treat boot modules specially
-- when building compilation graphs, since they break cycles. Regular source
-- files and signature files are treated equivalently.
data IsBootInterface = NotBoot | IsBoot
    deriving (IsBootInterface -> IsBootInterface -> Bool
(IsBootInterface -> IsBootInterface -> Bool)
-> (IsBootInterface -> IsBootInterface -> Bool)
-> Eq IsBootInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IsBootInterface -> IsBootInterface -> Bool
== :: IsBootInterface -> IsBootInterface -> Bool
$c/= :: IsBootInterface -> IsBootInterface -> Bool
/= :: IsBootInterface -> IsBootInterface -> Bool
Eq, Eq IsBootInterface
Eq IsBootInterface =>
(IsBootInterface -> IsBootInterface -> Ordering)
-> (IsBootInterface -> IsBootInterface -> Bool)
-> (IsBootInterface -> IsBootInterface -> Bool)
-> (IsBootInterface -> IsBootInterface -> Bool)
-> (IsBootInterface -> IsBootInterface -> Bool)
-> (IsBootInterface -> IsBootInterface -> IsBootInterface)
-> (IsBootInterface -> IsBootInterface -> IsBootInterface)
-> Ord IsBootInterface
IsBootInterface -> IsBootInterface -> Bool
IsBootInterface -> IsBootInterface -> Ordering
IsBootInterface -> IsBootInterface -> IsBootInterface
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: IsBootInterface -> IsBootInterface -> Ordering
compare :: IsBootInterface -> IsBootInterface -> Ordering
$c< :: IsBootInterface -> IsBootInterface -> Bool
< :: IsBootInterface -> IsBootInterface -> Bool
$c<= :: IsBootInterface -> IsBootInterface -> Bool
<= :: IsBootInterface -> IsBootInterface -> Bool
$c> :: IsBootInterface -> IsBootInterface -> Bool
> :: IsBootInterface -> IsBootInterface -> Bool
$c>= :: IsBootInterface -> IsBootInterface -> Bool
>= :: IsBootInterface -> IsBootInterface -> Bool
$cmax :: IsBootInterface -> IsBootInterface -> IsBootInterface
max :: IsBootInterface -> IsBootInterface -> IsBootInterface
$cmin :: IsBootInterface -> IsBootInterface -> IsBootInterface
min :: IsBootInterface -> IsBootInterface -> IsBootInterface
Ord, Int -> IsBootInterface -> ShowS
[IsBootInterface] -> ShowS
IsBootInterface -> String
(Int -> IsBootInterface -> ShowS)
-> (IsBootInterface -> String)
-> ([IsBootInterface] -> ShowS)
-> Show IsBootInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IsBootInterface -> ShowS
showsPrec :: Int -> IsBootInterface -> ShowS
$cshow :: IsBootInterface -> String
show :: IsBootInterface -> String
$cshowList :: [IsBootInterface] -> ShowS
showList :: [IsBootInterface] -> ShowS
Show, Typeable IsBootInterface
Typeable IsBootInterface =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> IsBootInterface -> c IsBootInterface)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c IsBootInterface)
-> (IsBootInterface -> Constr)
-> (IsBootInterface -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c IsBootInterface))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c IsBootInterface))
-> ((forall b. Data b => b -> b)
    -> IsBootInterface -> IsBootInterface)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> IsBootInterface -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> IsBootInterface -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> IsBootInterface -> m IsBootInterface)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> IsBootInterface -> m IsBootInterface)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> IsBootInterface -> m IsBootInterface)
-> Data IsBootInterface
IsBootInterface -> Constr
IsBootInterface -> DataType
(forall b. Data b => b -> b) -> IsBootInterface -> IsBootInterface
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> IsBootInterface -> u
forall u. (forall d. Data d => d -> u) -> IsBootInterface -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IsBootInterface
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IsBootInterface -> c IsBootInterface
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IsBootInterface)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IsBootInterface)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IsBootInterface -> c IsBootInterface
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> IsBootInterface -> c IsBootInterface
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IsBootInterface
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c IsBootInterface
$ctoConstr :: IsBootInterface -> Constr
toConstr :: IsBootInterface -> Constr
$cdataTypeOf :: IsBootInterface -> DataType
dataTypeOf :: IsBootInterface -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IsBootInterface)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c IsBootInterface)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IsBootInterface)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c IsBootInterface)
$cgmapT :: (forall b. Data b => b -> b) -> IsBootInterface -> IsBootInterface
gmapT :: (forall b. Data b => b -> b) -> IsBootInterface -> IsBootInterface
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> IsBootInterface -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> IsBootInterface -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> IsBootInterface -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IsBootInterface -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> IsBootInterface -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> IsBootInterface -> m IsBootInterface
Data)

instance NFData IsBootInterface where
  rnf :: IsBootInterface -> ()
rnf = IsBootInterface -> ()
forall a. a -> ()
rwhnf