default   Racket Bugs
Main PageQuick QueryStandard QueryAdvanced QueryHelp
Log in

View Problem Report: 12920

send email to interested parties or send email followup to audit-trail
Reporter's email: ray dot racine at gmail dot com
Number: 12920
Category: typed-scheme
Synopsis: Particular use of a define-type alais in a poly structure fails to type check
Class: sw-bug
Responsible: samth
Notify-List:
Severity: non-critical
Priority: medium
State: closed
Confidential: no
Arrival-Date: Fri Jul 20 13:32:01 -0400 2012
Closed-Date: Tue Aug 14 14:50:37 -0400 2012
Last-Modified: Tue Aug 14 14:50:37 -0400 2012
Originator: Ray Racine
Organization: plt
Submitter-Id: unknown
Release: 5.3.0.16--2012-07-18(a28d0064/d/list)
Environment: unix "Linux rpr 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux" (x86_64-linux/3m) (get-display-depth) = 32
Human Language: english
(current-memory-use) 542166040
Links: (links) = (); (links #:user? #f) = (); (links #:root? #t) = (#<path:/code/racketlib/>); (links #:user? #f #:root? #t) = ()


Collections:
("/home/ray/.racket/5.3.0.16/collects"
(non-existent-path))
("/usr/local/racket/collects"
("string-constants" "mred" "mrlib" "macro-debugger" "mzcom" "raco" "defaults" "plai" "slatex" "setup" "scribble" "srfi" "lang" "config" "mysterx" "future-visualizer" ".gitignore" "json" "icons" "readline" "preprocessor" "typed-racket" "web-server" "picturing-programs" "stepper" "texpict" "xrepl" "compiler" "framework" "wxme" "mzscheme" "plot" "honu" "algol60" "scheme" "trace" "handin-server" "scriblib" "slideshow" "swindle" "games" "typed" "2htdp" "graphics" "sgl" "hierlist" "reader" "deinprogramm" "drscheme" "profile" "at-exp" "xml" "data" "sirmail" "errortrace" "info-domain" "redex" "handin-client" "typed-scheme" "dynext" "html" "planet" "gui-debugger" "version" "rackunit" "r6rs" "eopl" "htdp" "racket" "browser" "frtime" "unstable" "help" "net" "test-engine" "lazy" "r5rs" "syntax" "mzlib" "meta" "drracket" "syntax-color" "s-exp" "racklog" "repo-time-stamp" "make" "scribblings" "parser-tools" "embedded-gui" "tests" "launcher" "teachpack" "db" "rnrs" "schemeunit" "images" "!
file" "ffi" "openssl" "datalog"))

Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t debug) (default) #() "#lang racket\n" #t #t ((main) (test))))
Description: When using a define'd-type in a poly structure type checking fails.  However replacing the type-define with its expansion works.
See below example code.
File Attachments:
How-To-Repeat: #lang typed/racket/base

(require racket/match)

;; Input stream of datum D
(define-type (Stream D) (U (Datum D) 'Nothing 'EOS))

(struct: (D) Datum
  ([iota : D]))

;; Iteratee
(define-type (Iteratee D A) (U (Done D A) (Continuation D A)))

(struct: (D A) Done ([stream : (Stream D)]
                     [accum : A]))

(struct: (D A) Continuation
  ([resume : ((Stream D) -> (Iteratee D A)])) ;; <- type-define fails

;; Explict expansion of the define-type alias works
;;(struct: (D A) Continuation
;;  ([resume : ((Stream D) -> (U (Done D A) (Continuation D A)))])) ;; ... -> (Iteratee D A)
Fix:
Release-Note:
Unformatted:

send email to interested parties or send email followup to audit-trail

Audit Trail:

State changed from "open" to "closed" by samth at racket-lang.org at Tue, 14 Aug 2012 14:50:37 -0400
Reason>>> A commit by samth at racket-lang.org has resolved this report
  http://git.racket-lang.org/plt/commit/2e3965e777