packages feed

fadno-braids 0.1.1 → 0.1.2

raw patch · 2 files changed

+18/−16 lines, 2 filesdep ~basedep ~containersdep ~data-defaultPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, containers, data-default, diagrams, diagrams-lib, diagrams-rasterific, lens, random

API changes (from Hackage documentation)

- Fadno.Braids.Internal: instance (GHC.Classes.Eq (b a), GHC.Classes.Eq a) => GHC.Classes.Eq (Fadno.Braids.Internal.DimBraid b a)
- Fadno.Braids.Internal: instance (GHC.Show.Show (b a), GHC.Show.Show a) => GHC.Show.Show (Fadno.Braids.Internal.DimBraid b a)
+ Fadno.Braids.Internal: instance (GHC.Base.Semigroup (b a), GHC.Real.Integral a) => GHC.Base.Semigroup (Fadno.Braids.Internal.DimBraid b a)
+ Fadno.Braids.Internal: instance (GHC.Classes.Eq a, GHC.Classes.Eq (b a)) => GHC.Classes.Eq (Fadno.Braids.Internal.DimBraid b a)
+ Fadno.Braids.Internal: instance (GHC.Show.Show a, GHC.Show.Show (b a)) => GHC.Show.Show (Fadno.Braids.Internal.DimBraid b a)
+ Fadno.Braids.Internal: instance GHC.Base.Semigroup (Fadno.Braids.Internal.Artin a)
+ Fadno.Braids.Internal: instance GHC.Base.Semigroup (Fadno.Braids.Internal.Loop a)
+ Fadno.Braids.Internal: instance GHC.Base.Semigroup (Fadno.Braids.Internal.MultiGen a)
+ Fadno.Braids.Internal: instance GHC.Real.Integral a => GHC.Base.Semigroup (Fadno.Braids.Internal.Step a)
- Fadno.Braids: mergeAt' :: forall a. (Integral a) => Int -> a -> [[Gen a]] -> [[Gen a]] -> MultiGen a
+ Fadno.Braids: mergeAt' :: forall a. Integral a => Int -> a -> [[Gen a]] -> [[Gen a]] -> MultiGen a
- Fadno.Braids.Graphics: renderBraid :: (Braid b a) => DrawConf -> [BraidDrawF a] -> FilePath -> b a -> IO ()
+ Fadno.Braids.Graphics: renderBraid :: Braid b a => DrawConf -> [BraidDrawF a] -> FilePath -> b a -> IO ()
- Fadno.Braids.Internal: Move :: (b i) -> (b i) -> Move b i
+ Fadno.Braids.Internal: Move :: b i -> b i -> Move b i
- Fadno.Braids.Internal: aGens :: forall a_afMO a_agbj. Iso (Artin a_afMO) (Artin a_agbj) [Gen a_afMO] [Gen a_agbj]
+ Fadno.Braids.Internal: aGens :: forall a_agOh a_ahhi. Iso (Artin a_agOh) (Artin a_ahhi) [Gen a_agOh] [Gen a_ahhi]
- Fadno.Braids.Internal: dBraid :: forall b_amW0 a_amW1 b_an3I. Lens (DimBraid b_amW0 a_amW1) (DimBraid b_an3I a_amW1) (b_amW0 a_amW1) (b_an3I a_amW1)
+ Fadno.Braids.Internal: dBraid :: forall b_ao43 a_ao44 b_aocM. Lens (DimBraid b_ao43 a_ao44) (DimBraid b_aocM a_ao44) (b_ao43 a_ao44) (b_aocM a_ao44)
- Fadno.Braids.Internal: dSteps :: forall b_amW0 a_amW1. Lens' (DimBraid b_amW0 a_amW1) Int
+ Fadno.Braids.Internal: dSteps :: forall b_ao43 a_ao44. Lens' (DimBraid b_ao43 a_ao44) Int
- Fadno.Braids.Internal: dStrands :: forall b_amW0 a_amW1. Lens' (DimBraid b_amW0 a_amW1) a_amW1
+ Fadno.Braids.Internal: dStrands :: forall b_ao43 a_ao44. Lens' (DimBraid b_ao43 a_ao44) a_ao44
- Fadno.Braids.Internal: dim :: (Braid b a) => b a -> DimBraid b a
+ Fadno.Braids.Internal: dim :: Braid b a => b a -> DimBraid b a
- Fadno.Braids.Internal: gPol :: forall a_aayt. Lens' (Gen a_aayt) Polarity
+ Fadno.Braids.Internal: gPol :: forall a_abhL. Lens' (Gen a_abhL) Polarity
- Fadno.Braids.Internal: gPos :: forall a_aayt a_afx2. Lens (Gen a_aayt) (Gen a_afx2) a_aayt a_afx2
+ Fadno.Braids.Internal: gPos :: forall a_abhL a_agvM. Lens (Gen a_abhL) (Gen a_agvM) a_abhL a_agvM
- Fadno.Braids.Internal: gensToStep :: (Integral a) => [Gen a] -> Step a
+ Fadno.Braids.Internal: gensToStep :: Integral a => [Gen a] -> Step a
- Fadno.Braids.Internal: lStrands :: forall a_anzX a_anQI. Iso (Loop a_anzX) (Loop a_anQI) [Strand a_anzX] [Strand a_anQI]
+ Fadno.Braids.Internal: lStrands :: forall a_aoJz a_ap3l. Iso (Loop a_aoJz) (Loop a_ap3l) [Strand a_aoJz] [Strand a_ap3l]
- Fadno.Braids.Internal: lx :: forall a_anQV. Lens' (Loc a_anQV) Int
+ Fadno.Braids.Internal: lx :: forall a_ap3y. Lens' (Loc a_ap3y) Int
- Fadno.Braids.Internal: ly :: forall a_anQV a_aobt. Lens (Loc a_anQV) (Loc a_aobt) a_anQV a_aobt
+ Fadno.Braids.Internal: ly :: forall a_ap3y a_apoh. Lens (Loc a_ap3y) (Loc a_apoh) a_ap3y a_apoh
- Fadno.Braids.Internal: mSteps :: forall a_agp7 a_amVS. Iso (MultiGen a_agp7) (MultiGen a_amVS) [Step a_agp7] [Step a_amVS]
+ Fadno.Braids.Internal: mSteps :: forall a_ahru a_ao3V. Iso (MultiGen a_ahru) (MultiGen a_ao3V) [Step a_ahru] [Step a_ao3V]
- Fadno.Braids.Internal: sLast :: forall a_an4i. Lens' (Strand a_an4i) a_an4i
+ Fadno.Braids.Internal: sLast :: forall a_aodm. Lens' (Strand a_aodm) a_aodm
- Fadno.Braids.Internal: sWeaves :: forall a_an4i. Lens' (Strand a_an4i) [Weave a_an4i]
+ Fadno.Braids.Internal: sWeaves :: forall a_aodm. Lens' (Strand a_aodm) [Weave a_aodm]

Files

fadno-braids.cabal view
@@ -1,6 +1,6 @@ name:                fadno-braids category:            Data, Math, Algebra-version:             0.1.1+version:             0.1.2 synopsis:            Braid representations in Haskell description:  Braids represented as Haskell types with support for generation and transformations. homepage:            http://github.com/slpopejoy/@@ -22,13 +22,13 @@                   Fadno.Braids.Graphics   -- other-modules:   -- other-extensions:-  build-depends:       base >= 4.9 && < 4.11-                     , containers >= 0.5 && < 0.6-                     , data-default >= 0.7 && < 0.8-                     , diagrams >= 1.4 && < 1.5-                     , diagrams-lib >= 1.4 && < 1.5-                     , diagrams-rasterific >= 1.4 && < 1.5-                     , lens >= 4.15 && < 4.17-                     , random >= 1.1 && < 1.2+  build-depends:       base >= 4.9 && < 4.13+                     , containers >= 0.5+                     , data-default >= 0.7+                     , diagrams >= 1.4+                     , diagrams-lib >= 1.4+                     , diagrams-rasterific >= 1.4+                     , lens >= 4.15+                     , random >= 1.1   hs-source-dirs: src   default-language:    Haskell2010
src/Fadno/Braids/Internal.hs view
@@ -61,7 +61,7 @@  -- | Braid as "Artin generators" (one-at-a-time). newtype Artin a = Artin { _aGens :: [Gen a] }-    deriving (Eq,Show,Monoid,Functor)+    deriving (Eq,Show,Semigroup,Monoid,Functor) instance Foldable Artin where     foldMap f = foldMap f . map _gPos . _aGens makeLenses ''Artin@@ -159,18 +159,19 @@      Just v  -> f v <&> \v' -> insertS (Gen k v') m      Nothing -> pure m   {-# INLINE ix #-}+instance Integral a => Semigroup (Step a) where+    a <> b = foldl ins a (stepToGens b)+        where ins s g = insertWithS (flip const) g s  instance Integral a => Monoid (Step a) where     mempty = Empty-    a `mappend` b = foldl ins a (stepToGens b)-        where ins s g = insertWithS (flip const) g s     -- | Steps of many-at-a-time generators. newtype MultiGen a = MultiGen { _mSteps :: [Step a] }-    deriving (Eq,Monoid)+    deriving (Eq,Semigroup,Monoid) instance (Show a) => Show (MultiGen a) where show (MultiGen s) = "MultiGen " ++ show s makeLenses ''MultiGen @@ -179,10 +180,11 @@ data DimBraid b a =     DimBraid { _dBraid :: b a, _dSteps :: Int, _dStrands :: a }     deriving (Eq,Show)+instance (Semigroup (b a), Integral a) => Semigroup (DimBraid b a) where+  (DimBraid b1 x1 y1) <> (DimBraid b2 x2 y2) =+        DimBraid (b1 <> b2) (max x1 x2) (y1 + y2) instance (Monoid (b a), Integral a) => Monoid (DimBraid b a) where     mempty = DimBraid mempty 0 0-    (DimBraid b1 x1 y1) `mappend` (DimBraid b2 x2 y2) =-        DimBraid (b1 `mappend` b2) (max x1 x2) (y1 + y2) makeLenses ''DimBraid  -- | Make 'DimBraid' using braid's dimensions.@@ -304,7 +306,7 @@ -- is the first value of the next. -- Foldable instance ignores "last" values of strands (since they will equal the next head). newtype Loop a = Loop { _lStrands :: [Strand a] }-            deriving (Eq,Show,Monoid,Functor)+            deriving (Eq,Show,Semigroup,Monoid,Functor) makeLenses ''Loop  instance Foldable Loop where