Skip to content

Fix generation of newtypes and update makefile structure

Fredrik Wieczerkowski requested to merge fix-newtype-generation into version3-new

This branch introduces changes to the analysis, by storing whether constructors are newtypes in the TypeMap, and removes the generation of Choice/Failure/... branches in case expressions matching on newtype constructors.

Todo:

  • Omit Choice/Failure/... branches in generated case expressions over newtype constructors
  • Generate instances for newtypes (see TransTypes.genTypeDeclarations)
    • Show
    • Read
    • NonDet
    • Generable
    • NormalForm
    • Unifiable
    • Curry

Additionally, it replaces the current recursive makefile structure with a non-recursive one that is based on includes and almost exclusively uses file targets (rather than phony targets). This not only makes the build more declarative and easier to reason about, incremental builds become a lot faster since make can now track the complete graph of file dependencies.

Edited by Fredrik Wieczerkowski

Merge request reports