{-# LANGUAGE DeriveDataTypeable #-}
module Rattus.Plugin.Annotation (Rattus(..)) where

import Data.Data

-- | Use this type to mark a Haskell function definition as a Rattus
-- function:
--
-- > {-# ANN myFunction Rattus #-}
-- 
-- Or mark a whole module as consisting of Rattus functions only:
--
-- > {-# ANN module Rattus #-}
--
-- If you use the latter option, you can mark exceptions
-- (i.e. functions that should be treated as ordinary Haskell function
-- definitions) as follows:
--
-- > {-# ANN myFunction NotRattus #-}
--
-- By default all Rattus functions are checked for use of lazy data
-- types, since these may cause memory leaks. If any lazy data types
-- are used, a warning is issued. These warnings can be disabled by
-- annotating the module or the function with 'AllowLazyData'
--
-- > {-# ANN myFunction AllowLazyData #-}
-- >
-- > {-# ANN module AllowLazyData #-}

data Rattus = Rattus | NotRattus | AllowLazyData deriving (Typeable, Typeable Rattus
DataType
Constr
Typeable Rattus
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Rattus -> c Rattus)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Rattus)
-> (Rattus -> Constr)
-> (Rattus -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Rattus))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rattus))
-> ((forall b. Data b => b -> b) -> Rattus -> Rattus)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Rattus -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Rattus -> r)
-> (forall u. (forall d. Data d => d -> u) -> Rattus -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Rattus -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Rattus -> m Rattus)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rattus -> m Rattus)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rattus -> m Rattus)
-> Data Rattus
Rattus -> DataType
Rattus -> Constr
(forall b. Data b => b -> b) -> Rattus -> Rattus
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Rattus -> c Rattus
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Rattus
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) -> Rattus -> u
forall u. (forall d. Data d => d -> u) -> Rattus -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rattus -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rattus -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Rattus -> m Rattus
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Rattus -> m Rattus
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Rattus
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Rattus -> c Rattus
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Rattus)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rattus)
$cAllowLazyData :: Constr
$cNotRattus :: Constr
$cRattus :: Constr
$tRattus :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Rattus -> m Rattus
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Rattus -> m Rattus
gmapMp :: (forall d. Data d => d -> m d) -> Rattus -> m Rattus
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Rattus -> m Rattus
gmapM :: (forall d. Data d => d -> m d) -> Rattus -> m Rattus
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Rattus -> m Rattus
gmapQi :: Int -> (forall d. Data d => d -> u) -> Rattus -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Rattus -> u
gmapQ :: (forall d. Data d => d -> u) -> Rattus -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Rattus -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rattus -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rattus -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rattus -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rattus -> r
gmapT :: (forall b. Data b => b -> b) -> Rattus -> Rattus
$cgmapT :: (forall b. Data b => b -> b) -> Rattus -> Rattus
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rattus)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rattus)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Rattus)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Rattus)
dataTypeOf :: Rattus -> DataType
$cdataTypeOf :: Rattus -> DataType
toConstr :: Rattus -> Constr
$ctoConstr :: Rattus -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Rattus
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Rattus
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Rattus -> c Rattus
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Rattus -> c Rattus
$cp1Data :: Typeable Rattus
Data, Int -> Rattus -> ShowS
[Rattus] -> ShowS
Rattus -> String
(Int -> Rattus -> ShowS)
-> (Rattus -> String) -> ([Rattus] -> ShowS) -> Show Rattus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Rattus] -> ShowS
$cshowList :: [Rattus] -> ShowS
show :: Rattus -> String
$cshow :: Rattus -> String
showsPrec :: Int -> Rattus -> ShowS
$cshowsPrec :: Int -> Rattus -> ShowS
Show, Rattus -> Rattus -> Bool
(Rattus -> Rattus -> Bool)
-> (Rattus -> Rattus -> Bool) -> Eq Rattus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Rattus -> Rattus -> Bool
$c/= :: Rattus -> Rattus -> Bool
== :: Rattus -> Rattus -> Bool
$c== :: Rattus -> Rattus -> Bool
Eq)