module Data.Empty where
import qualified Data.NonEmpty.Class as C
import qualified Data.Traversable as Trav
import qualified Data.Foldable as Fold
import qualified Data.Ix as Ix
import Control.Applicative (pure, )
import Control.DeepSeq (NFData, rnf, )
import qualified Test.QuickCheck as QC
data T a = Cons
deriving (T a -> T a -> Bool
forall a. T a -> T a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: T a -> T a -> Bool
$c/= :: forall a. T a -> T a -> Bool
== :: T a -> T a -> Bool
$c== :: forall a. T a -> T a -> Bool
Eq, T a -> T a -> Bool
T a -> T a -> Ordering
forall a. Eq (T a)
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. T a -> T a -> Bool
forall a. T a -> T a -> Ordering
forall a. T a -> T a -> T a
min :: T a -> T a -> T a
$cmin :: forall a. T a -> T a -> T a
max :: T a -> T a -> T a
$cmax :: forall a. T a -> T a -> T a
>= :: T a -> T a -> Bool
$c>= :: forall a. T a -> T a -> Bool
> :: T a -> T a -> Bool
$c> :: forall a. T a -> T a -> Bool
<= :: T a -> T a -> Bool
$c<= :: forall a. T a -> T a -> Bool
< :: T a -> T a -> Bool
$c< :: forall a. T a -> T a -> Bool
compare :: T a -> T a -> Ordering
$ccompare :: forall a. T a -> T a -> Ordering
Ord)
instance Show (T a) where
show :: T a -> String
show T a
Cons = String
"Empty.Cons"
instance C.Show T where
showsPrec :: forall a. Show a => Int -> T a -> ShowS
showsPrec Int
_p T a
Cons = String -> ShowS
showString String
"Empty.Cons"
instance Functor T where
fmap :: forall a b. (a -> b) -> T a -> T b
fmap a -> b
_ T a
Cons = forall a. T a
Cons
instance Fold.Foldable T where
foldr :: forall a b. (a -> b -> b) -> b -> T a -> b
foldr a -> b -> b
_ b
y T a
Cons = b
y
instance Trav.Traversable T where
sequenceA :: forall (f :: * -> *) a. Applicative f => T (f a) -> f (T a)
sequenceA T (f a)
Cons = forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. T a
Cons
instance C.ViewL T where
viewL :: forall a. T a -> Maybe (a, T a)
viewL T a
_ = forall a. Maybe a
Nothing
instance C.ViewR T where
viewR :: forall a. T a -> Maybe (T a, a)
viewR T a
_ = forall a. Maybe a
Nothing
instance C.View T where
instance QC.Arbitrary (T a) where
arbitrary :: Gen (T a)
arbitrary = forall (m :: * -> *) a. Monad m => a -> m a
return forall a. T a
Cons
shrink :: T a -> [T a]
shrink T a
_ = []
instance C.Arbitrary T where
arbitrary :: forall a. Arbitrary a => Gen (T a)
arbitrary = forall (m :: * -> *) a. Monad m => a -> m a
return forall a. T a
Cons
shrink :: forall a. Arbitrary a => T a -> [T a]
shrink T a
_ = []
instance C.Gen T where
genOf :: forall a. Gen a -> Gen (T a)
genOf Gen a
_gen = forall (m :: * -> *) a. Monad m => a -> m a
return forall a. T a
Cons
instance C.Empty T where
empty :: forall a. T a
empty = forall a. T a
Cons
instance C.Zip T where
zipWith :: forall a b c. (a -> b -> c) -> T a -> T b -> T c
zipWith a -> b -> c
_f T a
Cons T b
Cons = forall a. T a
Cons
instance C.Reverse T where reverse :: forall a. T a -> T a
reverse = forall a. a -> a
id
instance C.Sort T where
sort :: forall a. Ord a => T a -> T a
sort T a
Cons = forall a. T a
Cons
instance C.SortBy T where
sortBy :: forall a. (a -> a -> Ordering) -> T a -> T a
sortBy a -> a -> Ordering
_ T a
Cons = forall a. T a
Cons
instance C.Repeat T where
repeat :: forall a. a -> T a
repeat a
_ = forall a. T a
Cons
instance C.Iterate T where
iterate :: forall a. (a -> a) -> a -> T a
iterate a -> a
_ a
_ = forall a. T a
Cons
instance C.NFData T where
rnf :: forall a. NFData a => T a -> ()
rnf T a
Cons = ()
instance NFData (T a) where
rnf :: T a -> ()
rnf T a
Cons = ()
instance C.Ix T where
range :: forall i. Ix i => (T i, T i) -> [T i]
range (T i
Cons, T i
Cons) = [forall a. T a
Cons]
index :: forall i. Ix i => (T i, T i) -> T i -> Int
index (T i
Cons, T i
Cons) T i
Cons = Int
0
inRange :: forall i. Ix i => (T i, T i) -> T i -> Bool
inRange (T i
Cons, T i
Cons) T i
Cons = Bool
True
rangeSize :: forall i. Ix i => (T i, T i) -> Int
rangeSize (T i
Cons, T i
Cons) = Int
1
instance (Ix.Ix i) => Ix.Ix (T i) where
range :: (T i, T i) -> [T i]
range = forall (f :: * -> *) i. (Ix f, Ix i) => (f i, f i) -> [f i]
C.range
index :: (T i, T i) -> T i -> Int
index = forall (f :: * -> *) i. (Ix f, Ix i) => (f i, f i) -> f i -> Int
C.index
inRange :: (T i, T i) -> T i -> Bool
inRange = forall (f :: * -> *) i. (Ix f, Ix i) => (f i, f i) -> f i -> Bool
C.inRange
rangeSize :: (T i, T i) -> Int
rangeSize = forall (f :: * -> *) i. (Ix f, Ix i) => (f i, f i) -> Int
C.rangeSize
switch :: b -> T a -> b
switch :: forall b a. b -> T a -> b
switch b
b T a
Cons = b
b