{-# LANGUAGE PolyKinds #-}
module Barbies.Internal.Trivial
  ( Void
  , Unit (..)
  )

where

import Barbies.Internal.ApplicativeB(ApplicativeB(..))
import Barbies.Internal.ConstraintsB(ConstraintsB(..))
import Barbies.Internal.FunctorB(FunctorB(..))
import Barbies.Internal.DistributiveB(DistributiveB(..))
import Barbies.Internal.TraversableB(TraversableB(..))

import Data.Data (Data(..))
import Data.Kind (Type)
import Data.Typeable (Typeable)
import GHC.Generics (Generic)

---------------------------------------------------
-- Trivial Barbies
---------------------------------------------------

-- | Uninhabited barbie type.
data Void (f :: k -> Type)
  deriving (forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall k (f :: k -> *) x. Rep (Void f) x -> Void f
forall k (f :: k -> *) x. Void f -> Rep (Void f) x
$cto :: forall k (f :: k -> *) x. Rep (Void f) x -> Void f
$cfrom :: forall k (f :: k -> *) x. Void f -> Rep (Void f) x
Generic, Typeable)

instance Eq   (Void f) where
  == :: Void f -> Void f -> Bool
(==) Void f
v = case Void f
v of

instance Ord  (Void f) where
  compare :: Void f -> Void f -> Ordering
compare Void f
v = case Void f
v of

instance Show (Void f) where
  showsPrec :: Int -> Void f -> ShowS
showsPrec Int
_ Void f
v = case Void f
v of

instance Semigroup (Void f) where
  <> :: Void f -> Void f -> Void f
(<>) Void f
v = case Void f
v of


instance FunctorB Void
instance TraversableB Void
instance ConstraintsB Void


-- | A barbie type without structure.
data Unit (f :: k -> Type)
  = Unit
  deriving
    ( Unit f -> DataType
Unit f -> Constr
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 {k} {f :: k -> *}.
(Typeable f, Typeable k) =>
Typeable (Unit f)
forall k (f :: k -> *).
(Typeable f, Typeable k) =>
Unit f -> DataType
forall k (f :: k -> *).
(Typeable f, Typeable k) =>
Unit f -> Constr
forall k (f :: k -> *).
(Typeable f, Typeable k) =>
(forall b. Data b => b -> b) -> Unit f -> Unit f
forall k (f :: k -> *) u.
(Typeable f, Typeable k) =>
Int -> (forall d. Data d => d -> u) -> Unit f -> u
forall k (f :: k -> *) u.
(Typeable f, Typeable k) =>
(forall d. Data d => d -> u) -> Unit f -> [u]
forall k (f :: k -> *) r r'.
(Typeable f, Typeable k) =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Unit f -> r
forall k (f :: k -> *) r r'.
(Typeable f, Typeable k) =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Unit f -> r
forall k (f :: k -> *) (m :: * -> *).
(Typeable f, Typeable k, Monad m) =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
forall k (f :: k -> *) (m :: * -> *).
(Typeable f, Typeable k, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
forall k (f :: k -> *) (c :: * -> *).
(Typeable f, Typeable k) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Unit f)
forall k (f :: k -> *) (c :: * -> *).
(Typeable f, Typeable k) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Unit f -> c (Unit f)
forall k (f :: k -> *) (t :: * -> *) (c :: * -> *).
(Typeable f, Typeable k, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Unit f))
forall k (f :: k -> *) (t :: * -> * -> *) (c :: * -> *).
(Typeable f, Typeable k, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Unit f))
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Unit f)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Unit f -> c (Unit f)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
$cgmapMo :: forall k (f :: k -> *) (m :: * -> *).
(Typeable f, Typeable k, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
$cgmapMp :: forall k (f :: k -> *) (m :: * -> *).
(Typeable f, Typeable k, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
$cgmapM :: forall k (f :: k -> *) (m :: * -> *).
(Typeable f, Typeable k, Monad m) =>
(forall d. Data d => d -> m d) -> Unit f -> m (Unit f)
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Unit f -> u
$cgmapQi :: forall k (f :: k -> *) u.
(Typeable f, Typeable k) =>
Int -> (forall d. Data d => d -> u) -> Unit f -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> Unit f -> [u]
$cgmapQ :: forall k (f :: k -> *) u.
(Typeable f, Typeable k) =>
(forall d. Data d => d -> u) -> Unit f -> [u]
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Unit f -> r
$cgmapQr :: forall k (f :: k -> *) r r'.
(Typeable f, Typeable k) =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Unit f -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Unit f -> r
$cgmapQl :: forall k (f :: k -> *) r r'.
(Typeable f, Typeable k) =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Unit f -> r
gmapT :: (forall b. Data b => b -> b) -> Unit f -> Unit f
$cgmapT :: forall k (f :: k -> *).
(Typeable f, Typeable k) =>
(forall b. Data b => b -> b) -> Unit f -> Unit f
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Unit f))
$cdataCast2 :: forall k (f :: k -> *) (t :: * -> * -> *) (c :: * -> *).
(Typeable f, Typeable k, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Unit f))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Unit f))
$cdataCast1 :: forall k (f :: k -> *) (t :: * -> *) (c :: * -> *).
(Typeable f, Typeable k, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Unit f))
dataTypeOf :: Unit f -> DataType
$cdataTypeOf :: forall k (f :: k -> *).
(Typeable f, Typeable k) =>
Unit f -> DataType
toConstr :: Unit f -> Constr
$ctoConstr :: forall k (f :: k -> *).
(Typeable f, Typeable k) =>
Unit f -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Unit f)
$cgunfold :: forall k (f :: k -> *) (c :: * -> *).
(Typeable f, Typeable k) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Unit f)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Unit f -> c (Unit f)
$cgfoldl :: forall k (f :: k -> *) (c :: * -> *).
(Typeable f, Typeable k) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Unit f -> c (Unit f)
Data, forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall k (f :: k -> *) x. Rep (Unit f) x -> Unit f
forall k (f :: k -> *) x. Unit f -> Rep (Unit f) x
$cto :: forall k (f :: k -> *) x. Rep (Unit f) x -> Unit f
$cfrom :: forall k (f :: k -> *) x. Unit f -> Rep (Unit f) x
Generic, Typeable
    , Unit f -> Unit f -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall k (f :: k -> *). Unit f -> Unit f -> Bool
/= :: Unit f -> Unit f -> Bool
$c/= :: forall k (f :: k -> *). Unit f -> Unit f -> Bool
== :: Unit f -> Unit f -> Bool
$c== :: forall k (f :: k -> *). Unit f -> Unit f -> Bool
Eq, Unit f -> Unit f -> Bool
Unit f -> Unit f -> Ordering
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
forall k (f :: k -> *). Eq (Unit f)
forall k (f :: k -> *). Unit f -> Unit f -> Bool
forall k (f :: k -> *). Unit f -> Unit f -> Ordering
forall k (f :: k -> *). Unit f -> Unit f -> Unit f
min :: Unit f -> Unit f -> Unit f
$cmin :: forall k (f :: k -> *). Unit f -> Unit f -> Unit f
max :: Unit f -> Unit f -> Unit f
$cmax :: forall k (f :: k -> *). Unit f -> Unit f -> Unit f
>= :: Unit f -> Unit f -> Bool
$c>= :: forall k (f :: k -> *). Unit f -> Unit f -> Bool
> :: Unit f -> Unit f -> Bool
$c> :: forall k (f :: k -> *). Unit f -> Unit f -> Bool
<= :: Unit f -> Unit f -> Bool
$c<= :: forall k (f :: k -> *). Unit f -> Unit f -> Bool
< :: Unit f -> Unit f -> Bool
$c< :: forall k (f :: k -> *). Unit f -> Unit f -> Bool
compare :: Unit f -> Unit f -> Ordering
$ccompare :: forall k (f :: k -> *). Unit f -> Unit f -> Ordering
Ord, ReadPrec [Unit f]
ReadPrec (Unit f)
ReadS [Unit f]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
forall k (f :: k -> *). ReadPrec [Unit f]
forall k (f :: k -> *). ReadPrec (Unit f)
forall k (f :: k -> *). Int -> ReadS (Unit f)
forall k (f :: k -> *). ReadS [Unit f]
readListPrec :: ReadPrec [Unit f]
$creadListPrec :: forall k (f :: k -> *). ReadPrec [Unit f]
readPrec :: ReadPrec (Unit f)
$creadPrec :: forall k (f :: k -> *). ReadPrec (Unit f)
readList :: ReadS [Unit f]
$creadList :: forall k (f :: k -> *). ReadS [Unit f]
readsPrec :: Int -> ReadS (Unit f)
$creadsPrec :: forall k (f :: k -> *). Int -> ReadS (Unit f)
Read, Int -> Unit f -> ShowS
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall k (f :: k -> *). Int -> Unit f -> ShowS
forall k (f :: k -> *). [Unit f] -> ShowS
forall k (f :: k -> *). Unit f -> String
showList :: [Unit f] -> ShowS
$cshowList :: forall k (f :: k -> *). [Unit f] -> ShowS
show :: Unit f -> String
$cshow :: forall k (f :: k -> *). Unit f -> String
showsPrec :: Int -> Unit f -> ShowS
$cshowsPrec :: forall k (f :: k -> *). Int -> Unit f -> ShowS
Show
    )

instance Semigroup (Unit f) where
  Unit f
Unit <> :: Unit f -> Unit f -> Unit f
<> Unit f
Unit = forall k (f :: k -> *). Unit f
Unit

instance Monoid (Unit f) where
  mempty :: Unit f
mempty  = forall k (f :: k -> *). Unit f
Unit
  mappend :: Unit f -> Unit f -> Unit f
mappend = forall a. Semigroup a => a -> a -> a
(<>)

instance FunctorB Unit
instance DistributiveB Unit
instance TraversableB Unit
instance ApplicativeB Unit
instance ConstraintsB Unit