[racket-dev] Is this a type error?
The following program is generating a type error in 5.3.1, but I don't
understand it yet.
;;;;;;;;;;;;;;;;;;;;;;;;;;;
#lang typed/racket/base
;; We may have more information about the lambda's name. This will show it.
(define-struct: LamPositionalName ([name : Symbol]
[path : String] ;; the source of the name
[line : Natural]
[column : Natural]
[offset : Natural]
[span : Natural]) #:transparent)
(: current-defined-name (Parameterof (U Symbol LamPositionalName)))
(define current-defined-name (make-parameter 'unknown))
;;;;;;;;;;;;;;;;;;;;;;;;;;;
I see the following error message:
. Type Checker: Expected (Parameterof (U Symbol
LamPositionalName)), but got (Parameterof (U Symbol LamPositionalName
'unknown)) in: (make-parameter (quote unknown))
which I didn't expect because 'unknown should be a symbol.