The FunctionalDependencies version of Newtype type-class.
Since Cabal-3.0 class arguments are in a different order than in newtype package.
This change is to allow usage with DeriveAnyClass (and DerivingStrategies, in GHC-8.2).
Unfortunately one has to repeat inner type.
newtype New = New Old
deriving anyclass (Newtype Old)
Another approach would be to use TypeFamilies (and possibly
compute inner type using GHC.Generics), but we think FunctionalDependencies
version gives cleaner type signatures.
Instances20Newtype, …
Newtype CabalSpecVersion SpecVersionDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype String FilePathNTDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype String TokenDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype String Token'Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype String CompatFilePathDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.FieldGrammarNewtype String CompatPackageKeyDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarNewtype a (MQuoted a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype a (Identity a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NewtypeNewtype a (Product a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NewtypeNewtype a (Sum a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.NewtypeNewtype [ExposedModule] ExposedModulesDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarNewtype [SymbolicPath PackageDir LicenseFile] CompatLicenseFileDefined in Cabal-syntax-3.12.1.0 · Distribution.PackageDescription.FieldGrammarNewtype [(ModuleName, OpenModule)] InstWithDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarNewtype (Set a) (Set' sep wrapper a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype (NonEmpty a) (NonEmpty' sep wrapper a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype [a] (List sep wrapper a)Defined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype (CompilerFlavor, VersionRange) TestedWithDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype (Either License License) SpecLicenseDefined in Cabal-syntax-3.12.1.0 · Distribution.FieldGrammar.NewtypesNewtype (Either License License) SpecLicenseLenientDefined in Cabal-syntax-3.12.1.0 · Distribution.Types.InstalledPackageInfo.FieldGrammarNewtype (a -> a) (Endo a)Defined in Cabal-syntax-3.12.1.0 · Distribution.Compat.Newtype