Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struct like records / Compact Algebraic Data types #50

Open
Cypher1 opened this issue Mar 24, 2019 · 2 comments
Open

Struct like records / Compact Algebraic Data types #50

Cypher1 opened this issue Mar 24, 2019 · 2 comments
Labels
compiler Related to semantic checking and code generation enhancement New feature or request

Comments

@Cypher1
Copy link
Owner

Cypher1 commented Mar 24, 2019

Building on #48 there should be a simple way to build more complex data structures that support tagging (at compile time where possible).

Ideally these would be subtypable (i.e. Left a and Right b a subtypes of Either a b and do not need to be defined separately). This should make typing guarantees more useful without requiring common Haskell patterns such as data Value = IntV Int | BoolV Bool. Instead it should be possible to have a type Value = Int | Bool, only requiring clarification when those types overlap.

@Cypher1 Cypher1 added the compiler Related to semantic checking and code generation label May 12, 2019
@Cypher1
Copy link
Owner Author

Cypher1 commented Jun 1, 2019

Work on this has progressed substantially in #72 but the PrimOpTypes still need to be converted to use the new data types, as does the interpreter.

This should allow the start of work on code generation and exploration of unification of Tako's two type checkers (one for data and one for predicates).

@Cypher1 Cypher1 added this to In progress in Hello world - Code Generation Jun 2, 2019
@Cypher1
Copy link
Owner Author

Cypher1 commented Jun 5, 2019

A small subset of common operations on bit vectors are available and a bool/bit, uint 'shaped' bit vectors available. Basic maths operations and bit shifting a not yet available.

@Cypher1 Cypher1 added the enhancement New feature or request label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Related to semantic checking and code generation enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant