named-sop 0.2.0.0 → 0.3.0.0
raw patch · 3 files changed
+15/−12 lines, 3 filesdep ~basedep ~singletons
Dependency ranges changed: base, singletons
Files
- CHANGELOG.md +3/−0
- named-sop.cabal +4/−4
- src/Data/NamedSOP/Type.hs +8/−8
CHANGELOG.md view
@@ -1,3 +1,6 @@+# 0.3.0.0+- Update to GHC 8.8.2 and singletons-2.6.+ # 0.2.0.0 - Made NMap and NSum polymorphic over the kind of the key. (Perhaps
named-sop.cabal view
@@ -1,5 +1,5 @@ name: named-sop-version: 0.2.0.0+version: 0.3.0.0 category: Data homepage: https://github.com/sjsch/named-sop@@ -28,7 +28,7 @@ build-type: Simple cabal-version: 2.0-tested-with: GHC ==8.6.4+tested-with: GHC ==8.8.1 extra-source-files: CHANGELOG.md, README.md @@ -41,8 +41,8 @@ , Data.NamedSOP.Map , Data.NamedSOP.Sum , Data.NamedSOP.Generic- build-depends: base ^>= 4.12.0.0- , singletons ^>= 2.5.1+ build-depends: base ^>= 4.13.0.0+ , singletons ^>= 2.6 , text ^>= 1.2.3.1 hs-source-dirs: src default-language: Haskell2010
src/Data/NamedSOP/Type.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-}@@ -26,7 +27,7 @@ module Data.NamedSOP.Type ( -- * Symbol-value mappings Mapping(..)- , SMapping+ , SMapping(..) -- * List operation singletons -- | Unlike the usual definition, this 'union' does /not/ remove -- duplicates, since that would make it impossible to define a@@ -44,12 +45,11 @@ , sort -- * Convenience re-exports , SingI- , Sing(SNil, SCons, SMapping)+ , Sing+ , SList(..) ) where -import Data.Kind-import Data.Singletons-import Data.Singletons.Prelude.List (Sing (SCons, SNil))+import Data.Singletons.Prelude.List (SList (..)) import Data.Singletons.TH singletons [d|@@ -87,10 +87,10 @@ instance Ord a => Ord (Mapping a b) where compare (x :-> _) (y :-> _) = compare x y -type SMapping = (Sing :: Mapping k v -> Type)+data SMapping (a :: Mapping k v) where+ SMapping :: Sing k -> SMapping (k ':-> v) -data instance Sing (a :: Mapping k v) where- SMapping :: Sing k -> Sing (k ':-> v)+type instance Sing = SMapping instance SingI k => SingI (k ':-> v) where sing = SMapping sing