Skip to content

Add missing Eq instances #67

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

Merged
merged 1 commit into from
Dec 6, 2020
Merged
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
8 changes: 8 additions & 0 deletions src/Graphics/Canvas.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -281,6 +283,8 @@ data Composite
| Color
| Luminosity

derive instance eqComposite :: Eq Composite

instance showComposite :: Show Composite where
show SourceOver = "SourceOver"
show SourceIn = "SourceIn"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down