named 0.3.0.1 → 0.3.0.2
raw patch · 3 files changed
+16/−28 lines, 3 filesdep ~base
Dependency ranges changed: base
Files
- ChangeLog.md +4/−0
- named.cabal +8/−8
- src/Named/Internal.hs +4/−20
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.3.0.2++* Support GHCs 9.4 to 9.10, fix warnings.+ ## 0.3.0.1 * Bumped upper bounds for GHC 8.8.
named.cabal view
@@ -1,5 +1,6 @@+cabal-version: 2.4 name: named-version: 0.3.0.1+version: 0.3.0.2 synopsis: Named parameters (keyword arguments) for Haskell description: `named` is a lightweight library for named function parameters (keyword@@ -28,7 +29,7 @@ > ! #to "/target/path" -license: BSD3+license: BSD-3-Clause license-file: LICENSE author: Vladislav Zavialov maintainer: Monadfix <hi@monadfix.com>@@ -37,8 +38,7 @@ category: Control build-type: Simple extra-source-files: ChangeLog.md-tested-with: GHC ==8.0.2, GHC ==8.2.2, GHC ==8.4.4, GHC ==8.6.5, GHC ==8.8.1-cabal-version: >=1.10+tested-with: GHC ==9.4.8, GHC ==9.6.6, GHC ==9.10.1 source-repository head type: git@@ -46,9 +46,9 @@ library exposed-modules: Named, Named.Internal- build-depends: base >=4.9 && <4.14+ build-depends: base >=4.16 && <4.21 hs-source-dirs: src- default-language: Haskell2010+ default-language: GHC2021 ghc-options: -Wall -fno-warn-unticked-promoted-constructors @@ -56,9 +56,9 @@ type: exitcode-stdio-1.0 main-is: Test.hs other-modules: TestImport- build-depends: base >=4.9 && <4.14,+ build-depends: base >=4.16 && <4.21, named hs-source-dirs: test- default-language: Haskell2010+ default-language: GHC2021 ghc-options: -Wall -fno-warn-missing-signatures
src/Named/Internal.hs view
@@ -1,8 +1,6 @@-{-# LANGUAGE KindSignatures, DataKinds, FlexibleInstances, FlexibleContexts,- FunctionalDependencies, TypeFamilies, TypeOperators,- PatternSynonyms, UndecidableInstances, ConstraintKinds,- TypeApplications, ScopedTypeVariables, CPP,- AllowAmbiguousTypes #-}+{-# LANGUAGE AllowAmbiguousTypes, DataKinds, ExplicitNamespaces,+ FunctionalDependencies, PatternSynonyms, TypeFamilies,+ UndecidableInstances #-} module Named.Internal where @@ -12,6 +10,7 @@ import Data.Kind (Type) import GHC.TypeLits (Symbol, TypeError, ErrorMessage(..)) import GHC.OverloadedLabels (IsLabel(..))+import Data.Type.Equality (type (~)) {- | @@ -29,10 +28,7 @@ -- | Match on an argument without specifying its name. See also: 'arg'. pattern Arg :: a -> name :! a pattern Arg a = ArgF (Identity a)--#if MIN_VERSION_base(4,10,0) {-# COMPLETE Arg #-}-#endif -- | Infix notation for the type of a named parameter. type name :! a = NamedF Identity a name@@ -50,21 +46,13 @@ injValue = Just instance (name ~ name', a ~ a', InjValue f) => IsLabel name (a -> NamedF f a' name') where-#if MIN_VERSION_base(4,10,0) fromLabel a = ArgF (injValue a)-#else- fromLabel _ a = ArgF (injValue a)-#endif {-# INLINE fromLabel #-} newtype Param p = Param p instance (p ~ NamedF f a name, InjValue f) => IsLabel name (a -> Param p) where-#if MIN_VERSION_base(4,10,0) fromLabel a = Param (fromLabel @name a)-#else- fromLabel pName a = Param (fromLabel pName a)-#endif {-# INLINE fromLabel #-} {- | Explicitly build a function parameter:@@ -181,11 +169,7 @@ data Name (name :: Symbol) = Name instance name ~ name' => IsLabel name' (Name name) where-#if MIN_VERSION_base(4,10,0) fromLabel = Name-#else- fromLabel _ = Name-#endif {-# INLINE fromLabel #-} {- |