irken-compiler icon indicating copy to clipboard operation
irken-compiler copied to clipboard

report error on invalid INFINTE type constructions

Open jeske opened this issue 8 years ago • 0 comments

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 avatar May 09 '17 17:05 jeske