minitypeset-opengl 0.2.0.0 → 0.2.0.1
raw patch · 2 files changed
+29/−4 lines, 2 files
Files
minitypeset-opengl.cabal view
@@ -1,5 +1,5 @@ Name: minitypeset-opengl-Version: 0.2.0.0+Version: 0.2.0.1 Synopsis: Layout and render text with TrueType fonts using OpenGL Description: This is a library to render text with OpenGL. TrueType (and OpenType) fonts are supported; glyph rendering@@ -13,7 +13,7 @@ Maintainer: bkomuves (plus) hackage (at) gmail (dot) com Homepage: http://moire.be/haskell/ Stability: Experimental-Category: Math+Category: Graphics Tested-With: GHC == 8.0.2 Cabal-Version: 1.24 Build-Type: Simple
src/Graphics/Rendering/MiniTypeset/Box.hs view
@@ -26,7 +26,13 @@ -------------------------------------------------------------------------------- -import Data.Monoid+-- Semigroup became a superclass of Monoid at base 4.11+-- there are also conflicts between Monoid and Semigroup :(+#if MIN_VERSION_base(4,11,0) +import Data.Semigroup+#else+import Data.Monoid +#endif import Graphics.Rendering.MiniTypeset.Common @@ -78,10 +84,29 @@ ofsLUB :: (Pos,Quad) -> (Pos,Quad) -> Quad ofsLUB (ofs1,quad1) (ofs2,quad2) = quadLUB (translate ofs1 quad1) (translate ofs2 quad2) --- It probably should be a semigroup, but I don't care too much :)+--------------------------------------------------------------------------------+-- monoid/semigroup instance++-- Semigroup became a superclass of Monoid+#if MIN_VERSION_base(4,11,0) ++instance Semigroup Quad where+ (<>) = quadLUB+ instance Monoid Quad where+ mempty = zeroQuad++#else++-- It probably should be a semigroup only, but I don't care too much +-- (also backward compatibility is problematic)+instance Monoid Quad where mempty = zeroQuad mappend = quadLUB++#endif++-------------------------------------------------------------------------------- -- | Extend a quad with margins marginQuad :: Margin -> Quad -> Quad