newtype-zoo (empty) → 1.0.0.0
raw patch · 44 files changed
+3245/−0 lines, 44 filesdep +QuickCheckdep +basedep +data-defaultsetup-changed
Dependencies added: QuickCheck, base, data-default, deepseq, pointed, profunctors, random
Files
- CHANGELOG.md +5/−0
- LICENSE +30/−0
- Setup.hs +2/−0
- newtype-zoo.cabal +128/−0
- src/NewtypeZoo/Active.hs +77/−0
- src/NewtypeZoo/Allocated.hs +77/−0
- src/NewtypeZoo/Broken.hs +77/−0
- src/NewtypeZoo/Cached.hs +77/−0
- src/NewtypeZoo/Complete.hs +77/−0
- src/NewtypeZoo/Completed.hs +77/−0
- src/NewtypeZoo/Consistent.hs +77/−0
- src/NewtypeZoo/Current.hs +77/−0
- src/NewtypeZoo/Disabled.hs +77/−0
- src/NewtypeZoo/Enabled.hs +77/−0
- src/NewtypeZoo/Established.hs +77/−0
- src/NewtypeZoo/Existing.hs +77/−0
- src/NewtypeZoo/Failed.hs +77/−0
- src/NewtypeZoo/Inconsistent.hs +77/−0
- src/NewtypeZoo/Invalid.hs +77/−0
- src/NewtypeZoo/Marked.hs +77/−0
- src/NewtypeZoo/Missing.hs +77/−0
- src/NewtypeZoo/Multiple.hs +77/−0
- src/NewtypeZoo/Needed.hs +77/−0
- src/NewtypeZoo/New.hs +77/−0
- src/NewtypeZoo/Next.hs +77/−0
- src/NewtypeZoo/Obsolete.hs +77/−0
- src/NewtypeZoo/Offered.hs +77/−0
- src/NewtypeZoo/Old.hs +77/−0
- src/NewtypeZoo/Partial.hs +77/−0
- src/NewtypeZoo/Pending.hs +77/−0
- src/NewtypeZoo/Previous.hs +77/−0
- src/NewtypeZoo/Proposed.hs +77/−0
- src/NewtypeZoo/Rejected.hs +77/−0
- src/NewtypeZoo/Remaining.hs +77/−0
- src/NewtypeZoo/Replied.hs +77/−0
- src/NewtypeZoo/Requested.hs +77/−0
- src/NewtypeZoo/Required.hs +77/−0
- src/NewtypeZoo/Responded.hs +77/−0
- src/NewtypeZoo/Single.hs +77/−0
- src/NewtypeZoo/Unchecked.hs +77/−0
- src/NewtypeZoo/Unwanted.hs +77/−0
- src/NewtypeZoo/Updated.hs +77/−0
- src/NewtypeZoo/Valid.hs +77/−0
- src/NewtypeZoo/Wanted.hs +77/−0
+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for newtype-zoo++## 1.0.0.0 -- 2019-09-19++* First version. Released on an unsuspecting world.
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2019, Sven Heyll++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Sven Heyll nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ newtype-zoo.cabal view
@@ -0,0 +1,128 @@+cabal-version: 2.4++-- Initial package description 'newtype-zoo.cabal' generated by 'cabal+-- init'. For further documentation, see+-- http://haskell.org/cabal/users-guide/++-- The name of the package.+name: newtype-zoo++-- The package version. See the Haskell package versioning policy (PVP)+-- for standards guiding when and how versions should be incremented.+-- https://pvp.haskell.org+-- PVP summary: +-+------- breaking API changes+-- | | +----- non-breaking API additions+-- | | | +--- code changes with no API change+version: 1.0.0.0++-- A short (one-line) description of the package.+synopsis: Newtype Wrapper Zoo++-- A longer description of the package.+-- description:++-- URL for the project homepage or repository.+homepage: https://github.com/sheyll/newtype-zoo++-- A URL where users can report bugs.+-- bug-reports:++-- The license under which the package is released.+license: BSD-3-Clause++-- The file containing the license text.+license-file: LICENSE++-- The package author(s).+author: Sven Heyll++-- An email address to which users can send suggestions, bug reports, and+-- patches.+maintainer: sven.heyll@gmail.com++-- A copyright notice.+-- copyright:++category: Data++-- Extra files to be distributed with the package, such as examples or a+-- README.+extra-source-files: CHANGELOG.md+++library+ -- Modules exported by the library.+ exposed-modules:+ NewtypeZoo.Active+ , NewtypeZoo.Allocated+ , NewtypeZoo.Broken+ , NewtypeZoo.Cached+ , NewtypeZoo.Complete+ , NewtypeZoo.Completed+ , NewtypeZoo.Consistent+ , NewtypeZoo.Current+ , NewtypeZoo.Disabled+ , NewtypeZoo.Enabled+ , NewtypeZoo.Established+ , NewtypeZoo.Existing+ , NewtypeZoo.Failed+ , NewtypeZoo.Inconsistent+ , NewtypeZoo.Invalid+ , NewtypeZoo.Marked+ , NewtypeZoo.Missing+ , NewtypeZoo.Multiple+ , NewtypeZoo.Needed+ , NewtypeZoo.New+ , NewtypeZoo.Next+ , NewtypeZoo.Obsolete+ , NewtypeZoo.Offered+ , NewtypeZoo.Old+ , NewtypeZoo.Partial+ , NewtypeZoo.Pending+ , NewtypeZoo.Previous+ , NewtypeZoo.Proposed+ , NewtypeZoo.Rejected+ , NewtypeZoo.Remaining+ , NewtypeZoo.Replied+ , NewtypeZoo.Required+ , NewtypeZoo.Requested+ , NewtypeZoo.Responded+ , NewtypeZoo.Single+ , NewtypeZoo.Unchecked+ , NewtypeZoo.Unwanted+ , NewtypeZoo.Updated+ , NewtypeZoo.Valid+ , NewtypeZoo.Wanted+++ default-extensions: BangPatterns+ , DeriveFoldable+ , DeriveTraversable+ , DerivingStrategies+ , DerivingVia+ , DeriveGeneric+ , GeneralizedNewtypeDeriving+ , ScopedTypeVariables+++ -- Modules included in this library but not exported.+ -- other-modules:++ -- LANGUAGE extensions used by modules in this package.+ -- other-extensions:++ -- Other library packages from which modules are imported.+ build-depends:+ base ^>=4.12.0.0+ , data-default+ , deepseq+ , pointed+ , random+ , QuickCheck+ , profunctors++ -- Directories containing source files.+ hs-source-dirs: src++ -- Base language which the package is written in.+ default-language: Haskell2010
+ src/NewtypeZoo/Active.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Active`.+module NewtypeZoo.Active+ ( Active(Active)+ , _theActive+ , theActive+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Active a = Active a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theActive :: Active x -> x+_theActive (Active !x) = x+{-# INLINE _theActive #-}++theActive :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Active a) (f (Active b))+theActive = dimap _theActive (fmap Active)+{-# INLINE theActive #-}
+ src/NewtypeZoo/Allocated.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Allocated`.+module NewtypeZoo.Allocated+ ( Allocated(Allocated)+ , _theAllocated+ , theAllocated+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Allocated a = Allocated a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theAllocated :: Allocated x -> x+_theAllocated (Allocated !x) = x+{-# INLINE _theAllocated #-}++theAllocated :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Allocated a) (f (Allocated b))+theAllocated = dimap _theAllocated (fmap Allocated)+{-# INLINE theAllocated #-}
+ src/NewtypeZoo/Broken.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Broken`.+module NewtypeZoo.Broken+ ( Broken(Broken)+ , _theBroken+ , theBroken+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Broken a = Broken a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theBroken :: Broken x -> x+_theBroken (Broken !x) = x+{-# INLINE _theBroken #-}++theBroken :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Broken a) (f (Broken b))+theBroken = dimap _theBroken (fmap Broken)+{-# INLINE theBroken #-}
+ src/NewtypeZoo/Cached.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Cached`.+module NewtypeZoo.Cached+ ( Cached(Cached)+ , _theCached+ , theCached+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Cached a = Cached a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theCached :: Cached x -> x+_theCached (Cached !x) = x+{-# INLINE _theCached #-}++theCached :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Cached a) (f (Cached b))+theCached = dimap _theCached (fmap Cached)+{-# INLINE theCached #-}
+ src/NewtypeZoo/Complete.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Complete`.+module NewtypeZoo.Complete+ ( Complete(Complete)+ , _theComplete+ , theComplete+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Complete a = Complete a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theComplete :: Complete x -> x+_theComplete (Complete !x) = x+{-# INLINE _theComplete #-}++theComplete :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Complete a) (f (Complete b))+theComplete = dimap _theComplete (fmap Complete)+{-# INLINE theComplete #-}
+ src/NewtypeZoo/Completed.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Completed`.+module NewtypeZoo.Completed+ ( Completed(Completed)+ , _theCompleted+ , theCompleted+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Completed a = Completed a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theCompleted :: Completed x -> x+_theCompleted (Completed !x) = x+{-# INLINE _theCompleted #-}++theCompleted :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Completed a) (f (Completed b))+theCompleted = dimap _theCompleted (fmap Completed)+{-# INLINE theCompleted #-}
+ src/NewtypeZoo/Consistent.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Consistent`.+module NewtypeZoo.Consistent+ ( Consistent(Consistent)+ , _theConsistent+ , theConsistent+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Consistent a = Consistent a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theConsistent :: Consistent x -> x+_theConsistent (Consistent !x) = x+{-# INLINE _theConsistent #-}++theConsistent :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Consistent a) (f (Consistent b))+theConsistent = dimap _theConsistent (fmap Consistent)+{-# INLINE theConsistent #-}
+ src/NewtypeZoo/Current.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Current`.+module NewtypeZoo.Current+ ( Current(Current)+ , _theCurrent+ , theCurrent+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Current a = Current a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theCurrent :: Current x -> x+_theCurrent (Current !x) = x+{-# INLINE _theCurrent #-}++theCurrent :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Current a) (f (Current b))+theCurrent = dimap _theCurrent (fmap Current)+{-# INLINE theCurrent #-}
+ src/NewtypeZoo/Disabled.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Disabled`.+module NewtypeZoo.Disabled+ ( Disabled(Disabled)+ , _theDisabled+ , theDisabled+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Disabled a = Disabled a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theDisabled :: Disabled x -> x+_theDisabled (Disabled !x) = x+{-# INLINE _theDisabled #-}++theDisabled :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Disabled a) (f (Disabled b))+theDisabled = dimap _theDisabled (fmap Disabled)+{-# INLINE theDisabled #-}
+ src/NewtypeZoo/Enabled.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Enabled`.+module NewtypeZoo.Enabled+ ( Enabled(Enabled)+ , _theEnabled+ , theEnabled+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Enabled a = Enabled a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theEnabled :: Enabled x -> x+_theEnabled (Enabled !x) = x+{-# INLINE _theEnabled #-}++theEnabled :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Enabled a) (f (Enabled b))+theEnabled = dimap _theEnabled (fmap Enabled)+{-# INLINE theEnabled #-}
+ src/NewtypeZoo/Established.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Established`.+module NewtypeZoo.Established+ ( Established(Established)+ , _theEstablished+ , theEstablished+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Established a = Established a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theEstablished :: Established x -> x+_theEstablished (Established !x) = x+{-# INLINE _theEstablished #-}++theEstablished :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Established a) (f (Established b))+theEstablished = dimap _theEstablished (fmap Established)+{-# INLINE theEstablished #-}
+ src/NewtypeZoo/Existing.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Existing`.+module NewtypeZoo.Existing+ ( Existing(Existing)+ , _theExisting+ , theExisting+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Existing a = Existing a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theExisting :: Existing x -> x+_theExisting (Existing !x) = x+{-# INLINE _theExisting #-}++theExisting :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Existing a) (f (Existing b))+theExisting = dimap _theExisting (fmap Existing)+{-# INLINE theExisting #-}
+ src/NewtypeZoo/Failed.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Failed`.+module NewtypeZoo.Failed+ ( Failed(Failed)+ , _theFailed+ , theFailed+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Failed a = Failed a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theFailed :: Failed x -> x+_theFailed (Failed !x) = x+{-# INLINE _theFailed #-}++theFailed :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Failed a) (f (Failed b))+theFailed = dimap _theFailed (fmap Failed)+{-# INLINE theFailed #-}
+ src/NewtypeZoo/Inconsistent.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Inconsistent`.+module NewtypeZoo.Inconsistent+ ( Inconsistent(Inconsistent)+ , _theInconsistent+ , theInconsistent+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Inconsistent a = Inconsistent a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theInconsistent :: Inconsistent x -> x+_theInconsistent (Inconsistent !x) = x+{-# INLINE _theInconsistent #-}++theInconsistent :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Inconsistent a) (f (Inconsistent b))+theInconsistent = dimap _theInconsistent (fmap Inconsistent)+{-# INLINE theInconsistent #-}
+ src/NewtypeZoo/Invalid.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Invalid`.+module NewtypeZoo.Invalid+ ( Invalid(Invalid)+ , _theInvalid+ , theInvalid+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Invalid a = Invalid a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theInvalid :: Invalid x -> x+_theInvalid (Invalid !x) = x+{-# INLINE _theInvalid #-}++theInvalid :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Invalid a) (f (Invalid b))+theInvalid = dimap _theInvalid (fmap Invalid)+{-# INLINE theInvalid #-}
+ src/NewtypeZoo/Marked.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Marked`.+module NewtypeZoo.Marked+ ( Marked(Marked)+ , _theMarked+ , theMarked+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Marked a = Marked a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theMarked :: Marked x -> x+_theMarked (Marked !x) = x+{-# INLINE _theMarked #-}++theMarked :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Marked a) (f (Marked b))+theMarked = dimap _theMarked (fmap Marked)+{-# INLINE theMarked #-}
+ src/NewtypeZoo/Missing.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Missing`.+module NewtypeZoo.Missing+ ( Missing(Missing)+ , _theMissing+ , theMissing+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Missing a = Missing a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theMissing :: Missing x -> x+_theMissing (Missing !x) = x+{-# INLINE _theMissing #-}++theMissing :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Missing a) (f (Missing b))+theMissing = dimap _theMissing (fmap Missing)+{-# INLINE theMissing #-}
+ src/NewtypeZoo/Multiple.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something represents `Multiple` instances of some value.+module NewtypeZoo.Multiple+ ( Multiple(Multiple)+ , _theMultiple+ , theMultiple+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Multiple a = Multiple a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theMultiple :: Multiple x -> x+_theMultiple (Multiple !x) = x+{-# INLINE _theMultiple #-}++theMultiple :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Multiple a) (f (Multiple b))+theMultiple = dimap _theMultiple (fmap Multiple)+{-# INLINE theMultiple #-}
+ src/NewtypeZoo/Needed.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Needed`.+module NewtypeZoo.Needed+ ( Needed(Needed)+ , _theNeeded+ , theNeeded+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Needed a = Needed a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theNeeded :: Needed x -> x+_theNeeded (Needed !x) = x+{-# INLINE _theNeeded #-}++theNeeded :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Needed a) (f (Needed b))+theNeeded = dimap _theNeeded (fmap Needed)+{-# INLINE theNeeded #-}
+ src/NewtypeZoo/New.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `New`.+module NewtypeZoo.New+ ( New(New)+ , _theNew+ , theNew+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype New a = New a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theNew :: New x -> x+_theNew (New !x) = x+{-# INLINE _theNew #-}++theNew :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (New a) (f (New b))+theNew = dimap _theNew (fmap New)+{-# INLINE theNew #-}
+ src/NewtypeZoo/Next.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Next`.+module NewtypeZoo.Next+ ( Next(Next)+ , _theNext+ , theNext+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Next a = Next a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theNext :: Next x -> x+_theNext (Next !x) = x+{-# INLINE _theNext #-}++theNext :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Next a) (f (Next b))+theNext = dimap _theNext (fmap Next)+{-# INLINE theNext #-}
+ src/NewtypeZoo/Obsolete.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Obsolete`.+module NewtypeZoo.Obsolete+ ( Obsolete(Obsolete)+ , _theObsolete+ , theObsolete+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Obsolete a = Obsolete a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theObsolete :: Obsolete x -> x+_theObsolete (Obsolete !x) = x+{-# INLINE _theObsolete #-}++theObsolete :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Obsolete a) (f (Obsolete b))+theObsolete = dimap _theObsolete (fmap Obsolete)+{-# INLINE theObsolete #-}
+ src/NewtypeZoo/Offered.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Offered`.+module NewtypeZoo.Offered+ ( Offered(Offered)+ , _theOffered+ , theOffered+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Offered a = Offered a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theOffered :: Offered x -> x+_theOffered (Offered !x) = x+{-# INLINE _theOffered #-}++theOffered :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Offered a) (f (Offered b))+theOffered = dimap _theOffered (fmap Offered)+{-# INLINE theOffered #-}
+ src/NewtypeZoo/Old.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Old`.+module NewtypeZoo.Old+ ( Old(Old)+ , _theOld+ , theOld+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Old a = Old a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theOld :: Old x -> x+_theOld (Old !x) = x+{-# INLINE _theOld #-}++theOld :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Old a) (f (Old b))+theOld = dimap _theOld (fmap Old)+{-# INLINE theOld #-}
+ src/NewtypeZoo/Partial.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Partial`.+module NewtypeZoo.Partial+ ( Partial(Partial)+ , _thePartial+ , thePartial+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Partial a = Partial a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_thePartial :: Partial x -> x+_thePartial (Partial !x) = x+{-# INLINE _thePartial #-}++thePartial :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Partial a) (f (Partial b))+thePartial = dimap _thePartial (fmap Partial)+{-# INLINE thePartial #-}
+ src/NewtypeZoo/Pending.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Pending`.+module NewtypeZoo.Pending+ ( Pending(Pending)+ , _thePending+ , thePending+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Pending a = Pending a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_thePending :: Pending x -> x+_thePending (Pending !x) = x+{-# INLINE _thePending #-}++thePending :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Pending a) (f (Pending b))+thePending = dimap _thePending (fmap Pending)+{-# INLINE thePending #-}
+ src/NewtypeZoo/Previous.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is the `Previous` one.+module NewtypeZoo.Previous+ ( Previous(Previous)+ , _thePrevious+ , thePrevious+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Previous a = Previous a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_thePrevious :: Previous x -> x+_thePrevious (Previous !x) = x+{-# INLINE _thePrevious #-}++thePrevious :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Previous a) (f (Previous b))+thePrevious = dimap _thePrevious (fmap Previous)+{-# INLINE thePrevious #-}
+ src/NewtypeZoo/Proposed.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is a `Proposed` value.+module NewtypeZoo.Proposed+ ( Proposed(Proposed)+ , _theProposed+ , theProposed+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Proposed a = Proposed a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theProposed :: Proposed x -> x+_theProposed (Proposed !x) = x+{-# INLINE _theProposed #-}++theProposed :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Proposed a) (f (Proposed b))+theProposed = dimap _theProposed (fmap Proposed)+{-# INLINE theProposed #-}
+ src/NewtypeZoo/Rejected.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Rejected`.+module NewtypeZoo.Rejected+ ( Rejected(Rejected)+ , _theRejected+ , theRejected+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Rejected a = Rejected a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theRejected :: Rejected x -> x+_theRejected (Rejected !x) = x+{-# INLINE _theRejected #-}++theRejected :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Rejected a) (f (Rejected b))+theRejected = dimap _theRejected (fmap Rejected)+{-# INLINE theRejected #-}
+ src/NewtypeZoo/Remaining.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is the `Remaining` part of something.+module NewtypeZoo.Remaining+ ( Remaining(Remaining)+ , _theRemaining+ , theRemaining+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Remaining a = Remaining a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theRemaining :: Remaining x -> x+_theRemaining (Remaining !x) = x+{-# INLINE _theRemaining #-}++theRemaining :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Remaining a) (f (Remaining b))+theRemaining = dimap _theRemaining (fmap Remaining)+{-# INLINE theRemaining #-}
+ src/NewtypeZoo/Replied.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something was `Replied`.+module NewtypeZoo.Replied+ ( Replied(Replied)+ , _theReplied+ , theReplied+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Replied a = Replied a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theReplied :: Replied x -> x+_theReplied (Replied !x) = x+{-# INLINE _theReplied #-}++theReplied :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Replied a) (f (Replied b))+theReplied = dimap _theReplied (fmap Replied)+{-# INLINE theReplied #-}
+ src/NewtypeZoo/Requested.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Requested`.+module NewtypeZoo.Requested+ ( Requested(Requested)+ , _theRequested+ , theRequested+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Requested a = Requested a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theRequested :: Requested x -> x+_theRequested (Requested !x) = x+{-# INLINE _theRequested #-}++theRequested :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Requested a) (f (Requested b))+theRequested = dimap _theRequested (fmap Requested)+{-# INLINE theRequested #-}
+ src/NewtypeZoo/Required.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Required`.+module NewtypeZoo.Required+ ( Required(Required)+ , _theRequired+ , theRequired+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Required a = Required a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theRequired :: Required x -> x+_theRequired (Required !x) = x+{-# INLINE _theRequired #-}++theRequired :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Required a) (f (Required b))+theRequired = dimap _theRequired (fmap Required)+{-# INLINE theRequired #-}
+ src/NewtypeZoo/Responded.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something was `Responded`.+module NewtypeZoo.Responded+ ( Responded(Responded)+ , _theResponded+ , theResponded+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Responded a = Responded a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theResponded :: Responded x -> x+_theResponded (Responded !x) = x+{-# INLINE _theResponded #-}++theResponded :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Responded a) (f (Responded b))+theResponded = dimap _theResponded (fmap Responded)+{-# INLINE theResponded #-}
+ src/NewtypeZoo/Single.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something contains only a `Single` part of something.+module NewtypeZoo.Single+ ( Single(Single)+ , _theSingle+ , theSingle+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Single a = Single a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theSingle :: Single x -> x+_theSingle (Single !x) = x+{-# INLINE _theSingle #-}++theSingle :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Single a) (f (Single b))+theSingle = dimap _theSingle (fmap Single)+{-# INLINE theSingle #-}
+ src/NewtypeZoo/Unchecked.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Unchecked`.+module NewtypeZoo.Unchecked+ ( Unchecked(Unchecked)+ , _theUnchecked+ , theUnchecked+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Unchecked a = Unchecked a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theUnchecked :: Unchecked x -> x+_theUnchecked (Unchecked !x) = x+{-# INLINE _theUnchecked #-}++theUnchecked :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Unchecked a) (f (Unchecked b))+theUnchecked = dimap _theUnchecked (fmap Unchecked)+{-# INLINE theUnchecked #-}
+ src/NewtypeZoo/Unwanted.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Unwanted`.+module NewtypeZoo.Unwanted+ ( Unwanted(Unwanted)+ , _theUnwanted+ , theUnwanted+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Unwanted a = Unwanted a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theUnwanted :: Unwanted x -> x+_theUnwanted (Unwanted !x) = x+{-# INLINE _theUnwanted #-}++theUnwanted :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Unwanted a) (f (Unwanted b))+theUnwanted = dimap _theUnwanted (fmap Unwanted)+{-# INLINE theUnwanted #-}
+ src/NewtypeZoo/Updated.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Updated`.+module NewtypeZoo.Updated+ ( Updated(Updated)+ , _theUpdated+ , theUpdated+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Updated a = Updated a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theUpdated :: Updated x -> x+_theUpdated (Updated !x) = x+{-# INLINE _theUpdated #-}++theUpdated :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Updated a) (f (Updated b))+theUpdated = dimap _theUpdated (fmap Updated)+{-# INLINE theUpdated #-}
+ src/NewtypeZoo/Valid.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Valid`.+module NewtypeZoo.Valid+ ( Valid(Valid)+ , _theValid+ , theValid+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Valid a = Valid a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theValid :: Valid x -> x+_theValid (Valid !x) = x+{-# INLINE _theValid #-}++theValid :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Valid a) (f (Valid b))+theValid = dimap _theValid (fmap Valid)+{-# INLINE theValid #-}
+ src/NewtypeZoo/Wanted.hs view
@@ -0,0 +1,77 @@+-- | Indicate that something is `Wanted`.+module NewtypeZoo.Wanted+ ( Wanted(Wanted)+ , _theWanted+ , theWanted+ ) where++import Control.DeepSeq (NFData)+import Control.Monad.Fix (MonadFix)+import Control.Monad.Zip (MonadZip)+import Data.Bits (Bits,FiniteBits)+import Data.Copointed (Copointed)+import Data.Default (Default)+import Data.Functor.Classes (Eq1, Ord1, Read1, Show1)+import Data.Functor.Identity+import Data.Ix (Ix)+import Data.Profunctor (Profunctor, dimap)+import Data.Pointed (Pointed)+import Data.String (IsString)+import Data.Typeable (Typeable)+import Foreign.Storable (Storable)+import GHC.Generics (Generic, Generic1)+import System.Random (Random)+import Test.QuickCheck (Arbitrary)++newtype Wanted a = Wanted a+ deriving ( Eq+ , Ord+ , Read+ , Show+ , NFData+ , Foldable+ , Traversable+ , Functor+ , Default+ , Monoid+ , Semigroup+ , Typeable+ , Generic+ , Generic1+ , Random+ , Arbitrary+ , Bounded+ , Enum+ , Floating+ , Fractional+ , Integral+ , Num+ , Real+ , RealFloat+ , RealFrac+ , Ix+ , IsString+ , Bits+ , FiniteBits+ )+ deriving ( Eq1+ , Ord1+ , Read1+ , Show1+ , Pointed+ , Copointed+ , Applicative+ , MonadFix+ , Monad+ , MonadZip++ )+ via Identity++_theWanted :: Wanted x -> x+_theWanted (Wanted !x) = x+{-# INLINE _theWanted #-}++theWanted :: forall a b p f. (Profunctor p, Functor f) => p a (f b) -> p (Wanted a) (f (Wanted b))+theWanted = dimap _theWanted (fmap Wanted)+{-# INLINE theWanted #-}