Skip to content

Commit

Permalink
Merge branch 'master' into ghc-710
Browse files Browse the repository at this point in the history
  • Loading branch information
bergey committed Mar 5, 2015
2 parents 68a40b3 + a2bab53 commit a5c1de6
Show file tree
Hide file tree
Showing 6 changed files with 242 additions and 181 deletions.
13 changes: 7 additions & 6 deletions src/Diagrams/Core.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Core
-- Copyright : (c) 2011 diagrams-core team (see LICENSE)
-- Copyright : (c) 2011-2015 diagrams-core team (see LICENSE)
-- License : BSD-style (see LICENSE)
-- Maintainer : diagrams-discuss@googlegroups.com
--
Expand All @@ -22,7 +22,7 @@
-- The diagrams library relies heavily on custom types and classes. Many
-- of the relevant definitions are in the "Diagrams.Core.Types" module.
-- Indeed the definition of the diagram type @QDiagram@ is contained in:
-- 'Diagrams.Core.Types.QDiagram'.
-- 'Diagrams.Core.Types.QDiagram'.
--
-- The best place to start when learning
-- about diagrams\' types is the user manual:
Expand All @@ -32,11 +32,11 @@
--
-- * "Diagrams.Core.Types"
--
-- * @Annotation@,
-- * @Annotation@,
-- * @UpAnnots b v m@, @DownAnnots v@,
-- * @QDiaLeaf b v m@, @Measure v@,
-- * @Subdiagram b v m@, @SubMap b v m@,
-- * @Prim b v@, @Backend b v@,
-- * @Prim b v@, @Backend b v@,
-- * @DNode b v a@, @DTree b v a@,
-- * @RNode b v a@, @RTree b v a@,
-- * @NullBackend@, @Renderable t b@,
Expand Down Expand Up @@ -149,10 +149,11 @@ module Diagrams.Core
-- * Attributes and styles

, AttributeClass
, Attribute, mkAttr, mkTAttr, unwrapAttr
, Attribute (..)

, Style, HasStyle(..)
, getAttr, combineAttr
, getAttr
, atAttr, atMAttr, atTAttr
, applyAttr, applyMAttr, applyTAttr

-- * Envelopes
Expand Down
5 changes: 3 additions & 2 deletions src/Diagrams/Core/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Core.Compile
-- Copyright : (c) 2013 diagrams-core team (see LICENSE)
-- Copyright : (c) 2013-2015 diagrams-core team (see LICENSE)
-- License : BSD-style (see LICENSE)
-- Maintainer : diagrams-discuss@googlegroups.com
--
Expand Down Expand Up @@ -63,7 +63,8 @@ uncurry3 :: (a -> b -> c -> r) -> (a, b, c) -> r
uncurry3 f (x, y, z) = f x y z

-- | Convert a @QDiagram@ into a raw tree.
toDTree :: (HasLinearMap v, Floating n, Typeable n) => n -> n -> QDiagram b v n m -> Maybe (DTree b v n Annotation)
toDTree :: (HasLinearMap v, Floating n, Typeable n)
=> n -> n -> QDiagram b v n m -> Maybe (DTree b v n Annotation)
toDTree g n (QD qd)
= foldDUAL

Expand Down
9 changes: 4 additions & 5 deletions src/Diagrams/Core/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Core.Query
-- Copyright : (c) 2011 diagrams-core team (see LICENSE)
-- Copyright : (c) 2011-2015 diagrams-core team (see LICENSE)
-- License : BSD-style (see LICENSE)
-- Maintainer : diagrams-discuss@googlegroups.com
--
Expand All @@ -16,9 +16,8 @@
-----------------------------------------------------------------------------

module Diagrams.Core.Query
( Query (Query)
, runQuery
) where
( Query (..)
) where

import Control.Applicative
import Control.Lens (Rewrapped, Wrapped (..), iso)
Expand All @@ -45,7 +44,7 @@ newtype Query v n m = Query { runQuery :: Point v n -> m }
deriving (Functor, Applicative, Semigroup, Monoid)

instance Wrapped (Query v n m) where
type Unwrapped (Query v n m) = (Point v n -> m)
type Unwrapped (Query v n m) = Point v n -> m
_Wrapped' = iso runQuery Query

instance Rewrapped (Query v a m) (Query v' a' m')
Expand Down
Loading

0 comments on commit a5c1de6

Please sign in to comment.