Open
Description
Here’s a function with more than one constraint, that typechecks fine:
(defn show-equal : (forall [s] (Show s) (Eq s) => {s -> s -> Bool})
[[a b] { {a == b} && {(show a) == (show b)}}])
I originally messed up the syntax, and thought that forall
’s second parameter was a list:
(forall [s] ((Show s) (Eq s)) => {s -> s -> Bool})
When the typechecker tries to inspect this, I get an internal error:
../../../../Applications/Racket v7.0/collects/racket/private/map.rkt:180:2: andmap: all lists must have same size
first list length: 1
other list length: 2
procedure: #<procedure:types-match?!>