Closed mattjbray closed 8 years ago
Before these changes, we had:
*> toElmType (Proxy :: Proxy Timing) ElmDatatype "Timing" (MultipleConstructors [ NamedConstructor "Start" (ElmPrimitiveRef EUnit) , MultipleConstructors [ NamedConstructor "Continue" (ElmField "" (ElmPrimitiveRef EFloat)) , NamedConstructor "Stop" (ElmPrimitiveRef EUnit) ]]) *> toElmTypeSource (Proxy :: Proxy Timing) "type Timing\n = Start ()\n | Continue : Float\n | Stop ()"
After this change:
*> toElmType (Proxy :: Proxy Timing) ElmDatatype "Timing" (MultipleConstructors [ NamedEmptyConstructor "Start" , MultipleConstructors [ NamedConstructor "Continue" (ElmPrimitiveRef EFloat) , NamedEmptyConstructor "Stop" ]]) *> toElmTypeSource (Proxy :: Proxy Timing) "type Timing\n = Start\n | Continue Float\n | Stop"
Any pointers for how to achieve this without overlapping instances would be much appreciated :)
I see you've now fixed this in a different way.
Before these changes, we had:
After this change:
Any pointers for how to achieve this without overlapping instances would be much appreciated :)