diff --git a/examples/group-transparency.hs b/examples/group-transparency.hs index 1c68647..a8abc4e 100644 --- a/examples/group-transparency.hs +++ b/examples/group-transparency.hs @@ -6,7 +6,7 @@ import Diagrams.Backend.PGF.CmdLine -- Example of group opacity. -type D2 = Diagram PGF V2 Double +type D2 = Diagram PGF main = defaultMain (frame 10 xs) diff --git a/examples/hbox.hs b/examples/hbox.hs index ecd2bad..b639eac 100644 --- a/examples/hbox.hs +++ b/examples/hbox.hs @@ -4,7 +4,7 @@ import Diagrams.TwoD.Vector (perp) import Diagrams.Size -type D2 = Diagram PGF V2 Double +type D2 = Diagram PGF -- The simplest way to construct a hbox with an envelope is to use -- diff --git a/examples/sums.hs b/examples/sums.hs index a5e5fda..2359ef4 100644 --- a/examples/sums.hs +++ b/examples/sums.hs @@ -3,7 +3,7 @@ import Control.Lens ((<&>)) import Diagrams.Prelude import Diagrams.Backend.PGF.CmdLine -type D2 = Diagram PGF V2 Float +type D2 = Diagram PGF maxSum = 6 :: Int @@ -13,7 +13,7 @@ sumTo n = show $ (n * (n + 1)) `div` 2 mkSum :: Int -> OnlineTeX D2 mkSum n = onlineHbox (displayStyle tex) <&> centerXY - <&> named n + <&> named n where tex | n == maxSum = sumTo maxSum | otherwise = sumTo n ++ " + \\sum_{i=" ++ show (n+1) ++ "}^{" ++ show maxSum ++ "} i" diff --git a/examples/triangle.hs b/examples/triangle.hs index 28c7390..505655e 100755 --- a/examples/triangle.hs +++ b/examples/triangle.hs @@ -2,10 +2,10 @@ import Diagrams.Prelude import Diagrams.Backend.PGF.CmdLine import Diagrams.TwoD.Vector (perp) --- Example using TeX primatives to make a text box with given width. Also +-- Example using TeX primatives to make a text box with given width. Also -- includes roundedRect background and labeling. -type D2 = Diagram PGF V2 Double +type D2 = Diagram PGF main = onlineMain example