Skip to content

Print types of missing typeclass members - #3398

Merged
kritzcreek merged 2 commits into
purescript:masterfrom
fehrenbach:master
Aug 11, 2018
Merged

Print types of missing typeclass members#3398
kritzcreek merged 2 commits into
purescript:masterfrom
fehrenbach:master

Conversation

@fehrenbach

Copy link
Copy Markdown
Contributor

This fixes the first part of #3390. It does not come with a promise to do the second.

module Main where

class A a where
  a :: a -> String
  b :: a -> Number

instance aString :: A String where
  a s = s

errors with this:

  Type class member b has not been implemented. It is expected to have the following type:
                         
    b :: String -> Number

instead of

Type class member b has not been implemented.

@fehrenbach

Copy link
Copy Markdown
Contributor Author

Thinking about this some more: is there a reason not to print all of the missing members?

@garyb

garyb commented Jul 10, 2018

Copy link
Copy Markdown
Member

No, that'd be good too 🙂

@fehrenbach fehrenbach changed the title Print type of (first) missing typeclass member Print types of missing typeclass members Jul 11, 2018
@kritzcreek
kritzcreek merged commit 5bb72bf into purescript:master Aug 11, 2018
@kritzcreek

Copy link
Copy Markdown
Member

Thanks!

justinwoo pushed a commit to justinwoo/purescript that referenced this pull request Aug 12, 2018
* Print type of missing typeclass member

* Print all missing type class members
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants