HaTeX 3.17.1.0 → 3.17.2.0
raw patch · 4 files changed
+27/−11 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Text.LaTeX.Base.Syntax: instance Data.Data.Data Text.LaTeX.Base.Syntax.LaTeX
+ Text.LaTeX.Base.Syntax: instance Data.Data.Data Text.LaTeX.Base.Syntax.MathType
+ Text.LaTeX.Base.Syntax: instance Data.Data.Data Text.LaTeX.Base.Syntax.Measure
+ Text.LaTeX.Base.Syntax: instance Data.Data.Data Text.LaTeX.Base.Syntax.TeXArg
+ Text.LaTeX.Base.Syntax: instance Data.Semigroup.Semigroup Text.LaTeX.Base.Syntax.LaTeX
+ Text.LaTeX.Base.Syntax: instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.LaTeX
+ Text.LaTeX.Base.Syntax: instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.MathType
+ Text.LaTeX.Base.Syntax: instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.Measure
+ Text.LaTeX.Base.Syntax: instance GHC.Generics.Generic Text.LaTeX.Base.Syntax.TeXArg
Files
- CHANGELOG.md +6/−0
- HaTeX.cabal +1/−1
- Text/LaTeX/Base/Syntax.hs +15/−5
- Text/LaTeX/Base/Writer.hs +5/−5
CHANGELOG.md view
@@ -9,6 +9,12 @@ # Changelog by versions +## From 3.17.1.0 to 3.17.2.0++* Semigroup instance for LaTeX.+* Data, Generic, and Typeable instances for LaTeX+* and related types.+ ## From 3.17.0.0 to 3.17.1.0 * New math space commands (romildo).
HaTeX.cabal view
@@ -1,5 +1,5 @@ Name: HaTeX -Version: 3.17.1.0 +Version: 3.17.2.0 Author: Daniel Díaz Category: LaTeX Build-type: Simple
Text/LaTeX/Base/Syntax.hs view
@@ -1,5 +1,5 @@ -{-# LANGUAGE CPP, DeriveDataTypeable #-}+{-# LANGUAGE CPP, DeriveDataTypeable, DeriveGeneric #-} -- | LaTeX syntax description in the definition of the 'LaTeX' datatype. -- If you want to add new commands or environments not defined in@@ -29,11 +29,16 @@ import Data.Text (Text,pack) import qualified Data.Text import Data.Monoid+#if MIN_VERSION_base(4,9,0)+import qualified Data.Semigroup as Semigroup+#endif import Data.String import Control.Applicative import Control.Monad (replicateM) import Data.Functor.Identity (runIdentity)+import Data.Data (Data) import Data.Typeable+import GHC.Generics (Generic) import Test.QuickCheck -- | Measure units defined in LaTeX. Use 'CustomMeasure' to use commands like 'textwidth'.@@ -51,11 +56,11 @@ | Ex Double -- ^ The height of an \"x\" in the current font. | Em Double -- ^ The width of an \"M\" in the current font. | CustomMeasure LaTeX -- ^ You can introduce a 'LaTeX' expression as a measure.- deriving (Eq, Show)+ deriving (Data, Eq, Generic, Show, Typeable) -- | Different types of syntax for mathematical expressions. data MathType = Parentheses | Square | Dollar- deriving (Eq,Show)+ deriving (Data, Eq, Generic, Show, Typeable) -- | Type of @LaTeX@ blocks. data LaTeX =@@ -78,7 +83,7 @@ -- Use '<>' preferably. | TeXEmpty -- ^ An empty block. -- /Neutral element/ of '<>'.- deriving (Eq,Show,Typeable)+ deriving (Data, Eq, Generic, Show, Typeable) -- | An argument for a 'LaTeX' command or environment. data TeXArg =@@ -89,7 +94,7 @@ | MSymArg [LaTeX] -- ^ Version of 'SymArg' with multiple options. | ParArg LaTeX -- ^ An argument enclosed between @(@ and @)@. | MParArg [LaTeX] -- ^ Version of 'ParArg' with multiple options.- deriving (Eq,Show)+ deriving (Data, Eq, Generic, Show, Typeable) -- Monoid instance for 'LaTeX'. @@ -109,6 +114,11 @@ -- | Alias for 'mappend'. (<>) :: Monoid a => a -> a -> a (<>) = mappend+#endif++#if MIN_VERSION_base(4,9,0)+instance Semigroup.Semigroup LaTeX where+ (<>) = mappend #endif -- | Method 'fromString' escapes LaTeX reserved characters using 'protectString'.
Text/LaTeX/Base/Writer.hs view
@@ -192,11 +192,11 @@ return p -- | A helper function for building monad transformers, e.g.--- @@--- instance MonadReader r m => MonadReader r (LaTeXT m) where--- ask = lift ask--- local = mapLaTeXT . local--- @@+--+-- > instance MonadReader r m => MonadReader r (LaTeXT m) where+-- > ask = lift ask+-- > local = mapLaTeXT . local+-- -- This declaration could be included here, but it would add a -- dependency on mtl. mapLaTeXT :: (m (a, LaTeX) -> m (a, LaTeX)) -> LaTeXT m a -> LaTeXT m a