Skip to content

Commit 6a17b38

Browse files
authored
Add missing Eq instances (#67)
1 parent bbdc023 commit 6a17b38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Graphics/Canvas.purs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ setLineCap context Butt = setLineCapImpl context "butt"
241241
-- | Enumerates the different types of line join
242242
data LineJoin = BevelJoin | RoundJoin | MiterJoin
243243

244+
derive instance eqLineJoin :: Eq LineJoin
245+
244246
foreign import setLineJoinImpl :: Context2D -> String -> Effect Unit
245247

246248
-- | Set the current line join type.
@@ -281,6 +283,8 @@ data Composite
281283
| Color
282284
| Luminosity
283285

286+
derive instance eqComposite :: Eq Composite
287+
284288
instance showComposite :: Show Composite where
285289
show SourceOver = "SourceOver"
286290
show SourceIn = "SourceIn"
@@ -486,6 +490,8 @@ foreign import setTransform :: Context2D -> Transform -> Effect Unit
486490
data TextAlign
487491
= AlignLeft | AlignRight | AlignCenter | AlignStart | AlignEnd
488492

493+
derive instance eqTextAlign :: Eq TextAlign
494+
489495
instance showTextAlign :: Show TextAlign where
490496
show AlignLeft = "AlignLeft"
491497
show AlignRight = "AlignRight"
@@ -596,6 +602,8 @@ foreign import drawImageFull :: Context2D -> CanvasImageSource -> Number -> Numb
596602
-- | Enumerates the different types of pattern repetitions.
597603
data PatternRepeat = Repeat | RepeatX | RepeatY | NoRepeat
598604

605+
derive instance eqPatternRepeat :: Eq PatternRepeat
606+
599607
instance showPatternRepeat :: Show PatternRepeat where
600608
show Repeat = "Repeat"
601609
show RepeatX = "RepeatX"

0 commit comments

Comments
 (0)