{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE StrictData #-}

module Data.Tuple.Strict.T1
  ( T1 (..),
  )
where

import Control.DeepSeq (NFData)
import Data.Hashable (Hashable)
import GHC.Generics (Generic)

newtype T1 a
  = T1 a
  deriving stock (T1 a
forall a. a -> a -> Bounded a
forall a. Bounded a => T1 a
maxBound :: T1 a
$cmaxBound :: forall a. Bounded a => T1 a
minBound :: T1 a
$cminBound :: forall a. Bounded a => T1 a
Bounded, T1 a -> T1 a -> Bool
forall a. Eq a => T1 a -> T1 a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: T1 a -> T1 a -> Bool
$c/= :: forall a. Eq a => T1 a -> T1 a -> Bool
== :: T1 a -> T1 a -> Bool
$c== :: forall a. Eq a => T1 a -> T1 a -> Bool
Eq, forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (T1 a) x -> T1 a
forall a x. T1 a -> Rep (T1 a) x
$cto :: forall a x. Rep (T1 a) x -> T1 a
$cfrom :: forall a x. T1 a -> Rep (T1 a) x
Generic, T1 a -> T1 a -> Bool
T1 a -> T1 a -> 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 {a}. Ord a => Eq (T1 a)
forall a. Ord a => T1 a -> T1 a -> Bool
forall a. Ord a => T1 a -> T1 a -> Ordering
forall a. Ord a => T1 a -> T1 a -> T1 a
min :: T1 a -> T1 a -> T1 a
$cmin :: forall a. Ord a => T1 a -> T1 a -> T1 a
max :: T1 a -> T1 a -> T1 a
$cmax :: forall a. Ord a => T1 a -> T1 a -> T1 a
>= :: T1 a -> T1 a -> Bool
$c>= :: forall a. Ord a => T1 a -> T1 a -> Bool
> :: T1 a -> T1 a -> Bool
$c> :: forall a. Ord a => T1 a -> T1 a -> Bool
<= :: T1 a -> T1 a -> Bool
$c<= :: forall a. Ord a => T1 a -> T1 a -> Bool
< :: T1 a -> T1 a -> Bool
$c< :: forall a. Ord a => T1 a -> T1 a -> Bool
compare :: T1 a -> T1 a -> Ordering
$ccompare :: forall a. Ord a => T1 a -> T1 a -> Ordering
Ord, ReadPrec [T1 a]
ReadPrec (T1 a)
ReadS [T1 a]
forall a. Read a => ReadPrec [T1 a]
forall a. Read a => ReadPrec (T1 a)
forall a. Read a => Int -> ReadS (T1 a)
forall a. Read a => ReadS [T1 a]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [T1 a]
$creadListPrec :: forall a. Read a => ReadPrec [T1 a]
readPrec :: ReadPrec (T1 a)
$creadPrec :: forall a. Read a => ReadPrec (T1 a)
readList :: ReadS [T1 a]
$creadList :: forall a. Read a => ReadS [T1 a]
readsPrec :: Int -> ReadS (T1 a)
$creadsPrec :: forall a. Read a => Int -> ReadS (T1 a)
Read, Int -> T1 a -> ShowS
forall a. Show a => Int -> T1 a -> ShowS
forall a. Show a => [T1 a] -> ShowS
forall a. Show a => T1 a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [T1 a] -> ShowS
$cshowList :: forall a. Show a => [T1 a] -> ShowS
show :: T1 a -> String
$cshow :: forall a. Show a => T1 a -> String
showsPrec :: Int -> T1 a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> T1 a -> ShowS
Show)
  deriving newtype (Int -> T1 a -> Int
T1 a -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
forall {a}. Hashable a => Eq (T1 a)
forall a. Hashable a => Int -> T1 a -> Int
forall a. Hashable a => T1 a -> Int
hash :: T1 a -> Int
$chash :: forall a. Hashable a => T1 a -> Int
hashWithSalt :: Int -> T1 a -> Int
$chashWithSalt :: forall a. Hashable a => Int -> T1 a -> Int
Hashable, T1 a
[T1 a] -> T1 a
T1 a -> T1 a -> T1 a
forall a.
Semigroup a -> a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
forall {a}. Monoid a => Semigroup (T1 a)
forall a. Monoid a => T1 a
forall a. Monoid a => [T1 a] -> T1 a
forall a. Monoid a => T1 a -> T1 a -> T1 a
mconcat :: [T1 a] -> T1 a
$cmconcat :: forall a. Monoid a => [T1 a] -> T1 a
mappend :: T1 a -> T1 a -> T1 a
$cmappend :: forall a. Monoid a => T1 a -> T1 a -> T1 a
mempty :: T1 a
$cmempty :: forall a. Monoid a => T1 a
Monoid, T1 a -> ()
forall a. NFData a => T1 a -> ()
forall a. (a -> ()) -> NFData a
rnf :: T1 a -> ()
$crnf :: forall a. NFData a => T1 a -> ()
NFData, NonEmpty (T1 a) -> T1 a
T1 a -> T1 a -> T1 a
forall b. Integral b => b -> T1 a -> T1 a
forall a. Semigroup a => NonEmpty (T1 a) -> T1 a
forall a. Semigroup a => T1 a -> T1 a -> T1 a
forall a b. (Semigroup a, Integral b) => b -> T1 a -> T1 a
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
stimes :: forall b. Integral b => b -> T1 a -> T1 a
$cstimes :: forall a b. (Semigroup a, Integral b) => b -> T1 a -> T1 a
sconcat :: NonEmpty (T1 a) -> T1 a
$csconcat :: forall a. Semigroup a => NonEmpty (T1 a) -> T1 a
<> :: T1 a -> T1 a -> T1 a
$c<> :: forall a. Semigroup a => T1 a -> T1 a -> T1 a
Semigroup)

-- | @since 0.1.3
deriving stock instance Foldable T1

-- | @since 0.1.3
deriving stock instance Functor T1

-- | @since 0.1.3
deriving stock instance Traversable T1

-- | @since 0.1.3
instance Applicative T1 where
  pure :: forall a. a -> T1 a
pure = forall a. a -> T1 a
T1
  T1 a -> b
f <*> :: forall a b. T1 (a -> b) -> T1 a -> T1 b
<*> T1 a
a = forall a. a -> T1 a
T1 (a -> b
f a
a)

-- | @since 0.1.3
instance Monad T1 where
  return :: forall a. a -> T1 a
return = forall (f :: * -> *) a. Applicative f => a -> f a
pure
  T1 a
a >>= :: forall a b. T1 a -> (a -> T1 b) -> T1 b
>>= a -> T1 b
f = a -> T1 b
f a
a