Skip to content

Internal error when typechecking malformed forall clause #91

Description

@patrickt

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?!>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions