blaze-markup icon indicating copy to clipboard operation
blaze-markup copied to clipboard

Make MarkupM and AttributeValue derive Eq

Open Larivact opened this issue 7 years ago • 0 comments

Prelude> import Text.Blaze.Html5
Prelude Text.Blaze.Html5> toHtml "foo" == toHtml "bar"

<interactive>:2:1: error:
    • No instance for (Eq Html) arising from a use of ‘==’
    • In the expression: toHtml "foo" == toHtml "bar"
      In an equation for ‘it’: it = toHtml "foo" == toHtml "bar"
Prelude Text.Blaze.Html5> toValue "foo" == toValue "bar"

<interactive>:3:1: error:
    • No instance for (Eq AttributeValue) arising from a use of ‘==’
    • In the expression: toValue "foo" == toValue "bar"
      In an equation for ‘it’: it = toValue "foo" == toValue "bar"

This would be useful for all kinds of scripts.

Larivact avatar Nov 01 '17 15:11 Larivact