Skip to content

Bump dependencies #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions diagrams-miso.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Library
Graphics.Rendering.Miso
Hs-source-dirs: src
Build-depends: aeson
, base >= 4.9 && < 4.10
, mtl >= 1 && < 2.3
, base >= 4.11 && < 4.21
, mtl >= 1 && < 2.4
, colour >= 2.3.2 && < 2.4
, diagrams-core >= 1.4 && < 1.5
, diagrams-core >= 1.4 && < 1.6
, diagrams-lib >= 1.4 && < 1.5
, monoid-extras >= 0.3 && < 0.5
, monoid-extras >= 0.3 && < 0.7
, miso >= 0.8
, containers >= 0.3 && < 0.6
, lens >= 4.15 && < 4.16
, containers >= 0.3 && < 0.8
, lens >= 4.15 && < 5.4

Ghc-options: -Wall

Expand Down
5 changes: 3 additions & 2 deletions src/Diagrams/Backend/Miso.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import Diagrams.Core.Types (Annotation (..))
import Diagrams.Prelude hiding (Attribute, size, view, local, text, query)
import Diagrams.TwoD.Adjust (adjustDia2D)
import Diagrams.TwoD.Text (Text(..))
import Miso hiding (Options, view, Result, onMouseDown, onMouseUp)
import Miso hiding (Options, view, Result, onMouseDown, onMouseUp, Node)
import Miso.String (MisoString, ms)

import Graphics.Rendering.Miso (RenderM)
Expand All @@ -78,9 +78,10 @@ type B = MisoSvg
type instance V MisoSvg = V2
type instance N MisoSvg = Double

instance Semigroup (Render MisoSvg V2 Double) where
Render r1 <> Render r2_ = Render $ mappend r1 r2_
instance Monoid (Render MisoSvg V2 Double) where
mempty = Render mempty
Render r1 `mappend` Render r2_ = Render $ mappend r1 r2_

instance Backend MisoSvg V2 Double where
newtype Render MisoSvg V2 Double = Render RenderM
Expand Down
3 changes: 2 additions & 1 deletion src/Graphics/Rendering/Miso.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ data Element = Element

type RenderM = Reader (Style V2 Double) [Element]

instance Semigroup RenderM where
a <> b = mappend <$> a <*> b
instance Monoid RenderM where
mempty = return []
mappend a b = mappend <$> a <*> b

type AttributeValue = String

Expand Down