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

report error on invalid INFINTE type constructions #40

Open
jeske opened this issue May 9, 2017 · 0 comments
Open

report error on invalid INFINTE type constructions #40

jeske opened this issue May 9, 2017 · 0 comments

Comments

@jeske
Copy link
Collaborator

jeske commented May 9, 2017

Invalid infinite type constructions should be a compiler error.

In order for a recursive type construction to be finite, the recursion needs to be optional... that is, there needs to be a variant where there is no recursion.

(datatype container (:t 'a))

;; this is an invalid infinite type
(datatype foo (:t foo))

;; these are invalid infinite type constructions

(typealias bar { a=(container bar) } )

(define (f x) : ((container foo) -> int)
   1)

1 ;; this is the required begin block
@jeske jeske changed the title report invalid INFINTE type constructions report error on invalid INFINTE type constructions May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant