packages feed

type-machine 0.1.0.0 → 0.1.0.1

raw patch · 5 files changed

+103/−103 lines, 5 filesdep ~containersdep ~mtldep ~sybPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: containers, mtl, syb, template-haskell

API changes (from Hackage documentation)

- TypeMachine: (<.>) :: (a -> b) -> a -> b
- TypeMachine.Infix: (<#&:>) :: Type -> Name -> TM Type
- TypeMachine.Infix: (<#&>) :: Type -> Type -> TM Type
- TypeMachine.Infix: (<#|:>) :: Type -> Name -> TM Type
- TypeMachine.Infix: (<#|>) :: Type -> Type -> TM Type
- TypeMachine.Infix: (<&#:>) :: Type -> Name -> TM Type
- TypeMachine.Infix: (<&#>) :: Type -> Type -> TM Type
- TypeMachine.Infix: (<:#&>) :: Name -> Type -> TM Type
- TypeMachine.Infix: (<:#|>) :: Name -> Type -> TM Type
- TypeMachine.Infix: (<:&#>) :: Name -> Type -> TM Type
- TypeMachine.Infix: (<:|#>) :: Name -> Type -> TM Type
- TypeMachine.Infix: (<|#:>) :: Type -> Name -> TM Type
- TypeMachine.Infix: (<|#>) :: Type -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<#&:>) :: Type -> Name -> TM Type
+ TypeMachine.Functions.Infix: (<#&>) :: Type -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<#|:>) :: Type -> Name -> TM Type
+ TypeMachine.Functions.Infix: (<#|>) :: Type -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<&#:>) :: Type -> Name -> TM Type
+ TypeMachine.Functions.Infix: (<&#>) :: Type -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<:#&>) :: Name -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<:#|>) :: Name -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<:&#>) :: Name -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<:|#>) :: Name -> Type -> TM Type
+ TypeMachine.Functions.Infix: (<|#:>) :: Type -> Name -> TM Type
+ TypeMachine.Functions.Infix: (<|#>) :: Type -> Type -> TM Type
+ TypeMachine.TM.Liftable: applyTM :: (LiftableTMFunction f, f ~ (a -> b)) => (a -> b) -> TM a -> b
+ TypeMachine.TM.Liftable: class LiftableTMFunction f
+ TypeMachine.TM.Liftable: instance TypeMachine.TM.Liftable.LiftableTMFunction (a -> TypeMachine.TM.TM b)
+ TypeMachine.TM.Liftable: instance TypeMachine.TM.Liftable.LiftableTMFunction (a -> b -> TypeMachine.TM.TM c)
+ TypeMachine.TM.Liftable: instance TypeMachine.TM.Liftable.LiftableTMFunction (a -> b -> c -> TypeMachine.TM.TM d)
+ TypeMachine.TM.Liftable: instance TypeMachine.TM.Liftable.LiftableTMFunction (a -> b -> c -> d -> TypeMachine.TM.TM e)

Files

CHANGELOG.md view
@@ -1,11 +1,11 @@ # Changelog for `type-machine` -All notable changes to this project will be documented in this file.+## 0.1.0.1 - 2025-08-11 -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),-and this project adheres to the-[Haskell Package Versioning Policy](https://pvp.haskell.org/).+- Expose 'Liftable' module+- Rename 'Infix' module to 'Functions.Infix'+- Set boundaries on dependencies -## Unreleased+## 0.1.0.0 - 2025-08-08 -## 0.1.0.0 - YYYY-MM-DD+- First release
src/TypeMachine.hs view
@@ -12,7 +12,6 @@     -- * Infixes     (<:>),     (<::>),-    (<.>),      -- * Internal types     Type,
+ src/TypeMachine/Functions/Infix.hs view
@@ -0,0 +1,78 @@+module TypeMachine.Functions.Infix (+    -- * Intersection+    (<#|>),+    (<:#|>),+    (<#|:>),++    -- ** Flipped Intersection+    (<|#>),+    (<:|#>),+    (<|#:>),++    -- * Union+    (<#&>),+    (<:#&>),+    (<#&:>),++    -- ** Flipped Union+    (<&#>),+    (<:&#>),+    (<&#:>),+) where++import Language.Haskell.TH (Name)+import TypeMachine.Functions+import TypeMachine.TM+import TypeMachine.Type++-- | Alias to 'intersection'+(<#|>) :: Type -> Type -> TM Type+(<#|>) = intersection+{-# INLINE (<#|>) #-}++-- | Like '<#|>', but the first parameter is a name+(<:#|>) :: Name -> Type -> TM Type+a <:#|> b = toType a >>= \a' -> a' <#|> b++-- | Like '<#|>', but the second parameter is a name+(<#|:>) :: Type -> Name -> TM Type+a <#|:> b = toType b >>= \b' -> a <#|> b'++-- | Alias to 'intersection''+(<|#>) :: Type -> Type -> TM Type+(<|#>) = intersection'+{-# INLINE (<|#>) #-}++-- | Like '<|#>', but the first parameter is a name+(<:|#>) :: Name -> Type -> TM Type+a <:|#> b = toType a >>= \a' -> a' <|#> b++-- | Like '<|#>', but the second parameter is a name+(<|#:>) :: Type -> Name -> TM Type+a <|#:> b = toType b >>= \b' -> a <|#> b'++-- | Alias to 'union'+(<#&>) :: Type -> Type -> TM Type+(<#&>) = union+{-# INLINE (<#&>) #-}++-- | Like '<#&>', but the first parameter is a name+(<:#&>) :: Name -> Type -> TM Type+a <:#&> b = toType a >>= \a' -> a' <#&> b++-- | Like '<#&>', but the second parameter is a name+(<#&:>) :: Type -> Name -> TM Type+a <#&:> b = toType b >>= \b' -> a <#&> b'++-- | Alias to 'union''+(<&#>) :: Type -> Type -> TM Type+(<&#>) = union'+{-# INLINE (<&#>) #-}++-- | Like '<&#>', but the first parameter is a name+(<:&#>) :: Name -> Type -> TM Type+a <:&#> b = toType a >>= \a' -> a' <&#> b++-- | Like '<&#>', but the second parameter is a name+(<&#:>) :: Type -> Name -> TM Type+a <&#:> b = toType b >>= \b' -> a <&#> b'
− src/TypeMachine/Infix.hs
@@ -1,78 +0,0 @@-module TypeMachine.Infix (-    -- * Intersection-    (<#|>),-    (<:#|>),-    (<#|:>),--    -- ** Flipped Intersection-    (<|#>),-    (<:|#>),-    (<|#:>),--    -- * Union-    (<#&>),-    (<:#&>),-    (<#&:>),--    -- ** Flipped Union-    (<&#>),-    (<:&#>),-    (<&#:>),-) where--import Language.Haskell.TH (Name)-import TypeMachine.Functions-import TypeMachine.TM-import TypeMachine.Type---- | Alias to 'intersection'-(<#|>) :: Type -> Type -> TM Type-(<#|>) = intersection-{-# INLINE (<#|>) #-}---- | Like '<#|>', but the first parameter is a name-(<:#|>) :: Name -> Type -> TM Type-a <:#|> b = toType a >>= \a' -> a' <#|> b---- | Like '<#|>', but the second parameter is a name-(<#|:>) :: Type -> Name -> TM Type-a <#|:> b = toType b >>= \b' -> a <#|> b'---- | Alias to 'intersection''-(<|#>) :: Type -> Type -> TM Type-(<|#>) = intersection'-{-# INLINE (<|#>) #-}---- | Like '<|#>', but the first parameter is a name-(<:|#>) :: Name -> Type -> TM Type-a <:|#> b = toType a >>= \a' -> a' <|#> b---- | Like '<|#>', but the second parameter is a name-(<|#:>) :: Type -> Name -> TM Type-a <|#:> b = toType b >>= \b' -> a <|#> b'---- | Alias to 'union'-(<#&>) :: Type -> Type -> TM Type-(<#&>) = union-{-# INLINE (<#&>) #-}---- | Like '<#&>', but the first parameter is a name-(<:#&>) :: Name -> Type -> TM Type-a <:#&> b = toType a >>= \a' -> a' <#&> b---- | Like '<#&>', but the second parameter is a name-(<#&:>) :: Type -> Name -> TM Type-a <#&:> b = toType b >>= \b' -> a <#&> b'---- | Alias to 'union''-(<&#>) :: Type -> Type -> TM Type-(<&#>) = union'-{-# INLINE (<&#>) #-}---- | Like '<&#>', but the first parameter is a name-(<:&#>) :: Name -> Type -> TM Type-a <:&#> b = toType a >>= \a' -> a' <&#> b---- | Like '<&#>', but the second parameter is a name-(<&#:>) :: Type -> Name -> TM Type-a <&#:> b = toType b >>= \b' -> a <&#> b'
type-machine.cabal view
@@ -5,9 +5,8 @@ -- see: https://github.com/sol/hpack  name:           type-machine-version:        0.1.0.0-synopsis:       Template Haskell-based Type functions on record types in Haskell-description:    Please see the README on GitHub at <https://github.com/Arthi-chaud/type-machine#readme>+version:        0.1.0.1+synopsis:       Type-level functions for record types category:       Types homepage:       https://github.com/Arthi-chaud/type-machine#readme bug-reports:    https://github.com/Arthi-chaud/type-machine/issues@@ -29,17 +28,17 @@   exposed-modules:       TypeMachine       TypeMachine.Functions-      TypeMachine.Infix+      TypeMachine.Functions.Infix       TypeMachine.TM       TypeMachine.Type       TypeMachine.TM.Syntax+      TypeMachine.TM.Liftable       TypeMachine.Log       TypeMachine.TH       TypeMachine.TH.Is   other-modules:       TypeMachine.Internal.Utils       TypeMachine.TH.Internal.Utils-      TypeMachine.TM.Liftable       Paths_type_machine   autogen-modules:       Paths_type_machine@@ -53,10 +52,10 @@   ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints   build-depends:       base >=4.7 && <5-    , containers-    , mtl-    , syb-    , template-haskell+    , containers >=0.7 && <0.9+    , mtl >=2.3.1 && <2.4+    , syb ==0.7.2.*+    , template-haskell >=2.22 && <2.24   default-language: Haskell2010  executable vector-example@@ -73,9 +72,10 @@   ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints   build-depends:       base >=4.7 && <5-    , containers-    , syb-    , template-haskell+    , containers >=0.7 && <0.9+    , mtl >=2.3.1 && <2.4+    , syb ==0.7.2.*+    , template-haskell >=2.22 && <2.24     , type-machine   default-language: Haskell2010 @@ -98,10 +98,11 @@   ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N -Wno-unused-top-binds   build-depends:       base >=4.7 && <5-    , containers+    , containers >=0.7 && <0.9     , hspec-    , syb-    , template-haskell+    , mtl >=2.3.1 && <2.4+    , syb ==0.7.2.*+    , template-haskell >=2.22 && <2.24     , type-machine   default-language: Haskell2010 @@ -124,13 +125,13 @@   ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-T -Wno-unused-top-binds -Wno-orphans -Wno-redundant-constraints   build-depends:       base >=4.7 && <5-    , containers+    , containers >=0.7 && <0.9     , criterion     , extensible     , lens     , mtl     , superrecord-    , syb-    , template-haskell+    , syb ==0.7.2.*+    , template-haskell >=2.22 && <2.24     , type-machine   default-language: Haskell2010