PasteRack.org
Paste # 70766
2017-10-06 14:10:26

Fork as a new paste.

Paste viewed 288 times.


Embed:

  1. #lang racket/base
  2.  
  3. (module t typed/racket/base
  4.   (provide f)
  5.  
  6.   (define-type T
  7.     (HashTable (Vectorof Integer) Symbol))
  8.  
  9.   (: f (-> Symbol T))
  10.   (define (f x)
  11.     (hash '#(1) x)))
  12.  
  13. (require 't)
  14.  
  15. f

=>

eval:2:0: Type Checker: could not convert type to a

contract;

 required a flat contract but generated a chaperone contract

  identifier: f

  type: (-> Symbol T)

  in: f