lens-typelevel 0.1.0.1 → 0.1.1.0
raw patch · 4 files changed
+61/−8 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Type.Lens: (%%~) :: Sing l -> Sing f -> Sing x -> Sing (x & (l %~ f))
+ Data.Type.Lens: (%.~) :: Sing l -> Sing y -> Sing x -> Sing (x & (l .~ y))
+ Data.Type.Lens: (%^.) :: Sing x -> Sing l -> Sing (x ^. l)
+ Data.Type.Lens: (%^..) :: Sing x -> Sing l -> Sing (x ^.. l)
+ Data.Type.Lens: (%^?!) :: Sing x -> Sing l -> Sing (x ^?! l)
+ Data.Type.Lens: (%^?) :: Sing x -> Sing l -> Sing (x ^? l)
Files
- CHANGELOG.md +9/−0
- README.md +5/−0
- lens-typelevel.cabal +2/−2
- src/Data/Type/Lens.hs +45/−6
CHANGELOG.md view
@@ -1,6 +1,15 @@ Changelog ========= +Version 0.1.1.0+---------------++*October 29, 2018*++<https://github.com/mstksg/lens-typelevel/releases/tag/v0.1.1.0>++* Infix singletons mirror aliases of infix type aliases (`%^.`, etc.)+ Version 0.1.0.1 ---------------
README.md view
@@ -3,6 +3,11 @@ [](https://hackage.haskell.org/package/lens-typelevel) [](https://travis-ci.org/mstksg/lens-typelevel) ++([Rendered off-hackage documentation][docs])++[docs]: https://mstksg.github.io/lens-typelevel/+ van Laarhoven lenses at the type level using *[singletons][]* defunctionalization. [lens-typelevel]: http://hackage.haskell.org/package/lens-typelevel
lens-typelevel.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: dfd21a7ef669689f415cd15d00ef83ac7337dda223309f4d30ee56efddc44c71+-- hash: 875137e2a285b820c5042f9f94407bd7da145524927b288e7ce4bb219876e6c5 name: lens-typelevel-version: 0.1.0.1+version: 0.1.1.0 synopsis: Type-level lenses using singletons description: Type-level lenses using singletons and its defunctionalization system, implemented using the same van Laarhoven encoding as the /lens/ package.
src/Data/Type/Lens.hs view
@@ -7,6 +7,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-}@@ -99,8 +100,8 @@ , ASetter -- ** Using -- | Ways of consuming a setter.- , Over, type (%~), sOver- , Set, type (.~), sSet+ , Over, type (%~), sOver, (%%~)+ , Set, type (.~), sSet, (%.~) -- ** Making -- | Ways of creating a setter-only. , Sets_, Sets, sSets@@ -108,7 +109,7 @@ , Getting -- ** Using -- | Ways of consuming a getter- , View, type (^.), sView+ , View, type (^.), sView, (%^.) -- ** Making -- | Ways of creating a getter-only. , To_, To, sTo@@ -123,9 +124,9 @@ , ATraversal -- ** Using -- | Ways of consuming traversals and folds- , Preview, type (^?), sPreview- , ToListOf, type (^..), sToListOf- , UnsafePreview, type (^?!), sUnsafePreview+ , Preview, type (^?), sPreview, (%^?)+ , ToListOf, type (^..), sToListOf, (%^..)+ , UnsafePreview, type (^?!), sUnsafePreview, (%^?!) -- ** Making -- | Ways of creating traversals and folds , Folding_, Folding, sFolding@@ -348,6 +349,44 @@ infixl 8 ^?! infixl 8 ^.. infixr 9 .@++-- | Singleton mirror of 'Over' and '%~'.+--+-- Note that this conflicts in naming from '%%~' in /lens/, which is 'id'.+--+-- @since 0.1.1.0+(%%~) :: Sing l -> Sing f -> Sing x -> Sing (x & l %~ f)+(%%~) = sOver++-- | Singleton mirror of 'Set' and '.~'.+--+-- @since 0.1.1.0+(%.~) :: Sing l -> Sing y -> Sing x -> Sing (x & l .~ y)+(%.~) = sSet++-- | Singleton mirror of 'View' and '%^.'.+--+-- @since 0.1.1.0+(%^.) :: Sing x -> Sing l -> Sing (x ^. l)+(%^.) = flip sView++-- | Singleton mirror of 'Preview' and '%^?'.+--+-- @since 0.1.1.0+(%^?) :: Sing x -> Sing l -> Sing (x ^? l)+(%^?) = flip sPreview++-- | Singleton mirror of 'UnsafePreview' and '%^?!'.+--+-- @since 0.1.1.0+(%^?!) :: Sing x -> Sing l -> Sing (x ^?! l)+(%^?!) = flip sUnsafePreview++-- | Singleton mirror of 'ToListOf' and '%^..'.+--+-- @since 0.1.1.0+(%^..) :: Sing x -> Sing l -> Sing (x ^.. l)+(%^..) = flip sToListOf -- | Create a Getter from a getting function. --