From 21579c6a8e9b963a248a75301c3ccacd51da12dc Mon Sep 17 00:00:00 2001 From: Tomasz Rybarczyk Date: Mon, 25 Nov 2019 16:18:44 +0100 Subject: [PATCH] Add missing Eq instances --- src/Graphics/Canvas.purs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Graphics/Canvas.purs b/src/Graphics/Canvas.purs index b24f13d..f8c3f9a 100644 --- a/src/Graphics/Canvas.purs +++ b/src/Graphics/Canvas.purs @@ -241,6 +241,8 @@ setLineCap context Butt = setLineCapImpl context "butt" -- | Enumerates the different types of line join data LineJoin = BevelJoin | RoundJoin | MiterJoin +derive instance eqLineJoin :: Eq LineJoin + foreign import setLineJoinImpl :: Context2D -> String -> Effect Unit -- | Set the current line join type. @@ -281,6 +283,8 @@ data Composite | Color | Luminosity +derive instance eqComposite :: Eq Composite + instance showComposite :: Show Composite where show SourceOver = "SourceOver" show SourceIn = "SourceIn" @@ -486,6 +490,8 @@ foreign import setTransform :: Context2D -> Transform -> Effect Unit data TextAlign = AlignLeft | AlignRight | AlignCenter | AlignStart | AlignEnd +derive instance eqTextAlign :: Eq TextAlign + instance showTextAlign :: Show TextAlign where show AlignLeft = "AlignLeft" show AlignRight = "AlignRight" @@ -596,6 +602,8 @@ foreign import drawImageFull :: Context2D -> CanvasImageSource -> Number -> Numb -- | Enumerates the different types of pattern repetitions. data PatternRepeat = Repeat | RepeatX | RepeatY | NoRepeat +derive instance eqPatternRepeat :: Eq PatternRepeat + instance showPatternRepeat :: Show PatternRepeat where show Repeat = "Repeat" show RepeatX = "RepeatX"