I'm not too sure about the behavior of these code snippets.  Is it a bug?

--this has expected behavior; prints True
import Html exposing (text)

type TestType = Equation (Int -> Int)
              | None

eq1 = None
eq2 = None

main = Html.text (toString (eq1 == eq2))


--expected behavior; prints False
import Html exposing (text)

type TestType = Equation (Int -> Int)
              | None

eq1 = Equation (\x -> x+2)
eq2 = None

main = Html.text (toString (eq1 == eq2))


--expected behavior; prints True
import Html exposing (text)

type TestType = Equation (Int -> Int)
              | None

eq1 = Equation (\x -> x+2)
eq2 = None

main = Html.text (toString (eq1 == eq1))

--but not this; it just goes blank and the console has an error
--"Equality error: general function equality is undecidable, and therefore, 
unsupported"
import Html exposing (text)

type TestType = Equation (Int -> Int)
              | None

eq1 = Equation (\x -> x+2)
eq2 = Equation (\x -> x+3)

main = Html.text (toString (eq1 == eq2))



Tanya

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to