@jhrcek This is not ready for merge but I figured it would be better to get your feedback as soon as I have working spike. Please feel free to comment. This PR resolves my single biggest frustration of working with elm-street.
@arbus I think you might also give input to this proposal
Splitting
ElmPrim
into:ElmPrim
- language level constructsElmBuiltins
- types defined by libraries (not generated by elm-street) likeelm/core
orelm/time
etc.ElmPrim
keeps its original closed design using variants in sum type.ElmBuiltins
is using record/product to make implementation open. This gives elm-street several new features:Elm
instances for types provided by libraryElm
instance for parametrized type at least in manual fashion.Full vocabulary of
ElmDefinition
:DefPrim
- primitive types defined by elm (language itself - not just by core or other lib)DefBuiltin
- ADTs not generated by elm-street (provided by libraries like core or time).DefRecord
- record typesDefType
- ADTs generated by elm-streetExample definitions
Future work to be done
Elm.Generate
module should be extended to make it simpler to include custom imports into generated files. (future PR)Possibly further extensions:
ElmType
giving it support for parametrized types.Related issues:
related closed issues:
@jhrcek This is not ready for merge but I figured it would be better to get your feedback as soon as I have working spike. Please feel free to comment. This PR resolves my single biggest frustration of working with elm-street.
@arbus I think you might also give input to this proposal