anoop901 / graphical-functional-programming

A browser-based graphical interface for creating and running programs using the functional paradigm.
https://anoopnaravaram.com/graphical-functional-programming
0 stars 0 forks source link

type checking #97

Open anoop901 opened 1 year ago

anoop901 commented 1 year ago

The app should keep track of what types of values are accepted by each block input, and what types of values are produced by each block output. This may require additional configuration fields for some block types. (e.g. The array literal block will need configuration for the type of element it contains.) The app should constantly check for each connection (both nested and line connections) whether the type of value produced on one end matches the type of value accepted on the other end. If it doesn't match, it should highlight the connection in red, and give information to the user about the type mismatch. The program evaluation should be temporarily paused while any type errors are present.

anoop901 commented 1 year ago

After this is implemented, further features could facilitate configuring the types of the blocks automatically, based on some common-sense heuristics. For example, connecting an integer literal to an array literal could set the array's type to integer.