Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve message of type-level error for `elem` functions #140

Closed
chshersh opened this issue Feb 16, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@chshersh
Copy link
Member

commented Feb 16, 2019

Tell specific replacement instead of TODO:

type family ElemErrorMessage (t :: k) :: ErrorMessage where
ElemErrorMessage t =
Text "Do not use 'elem' and 'notElem' methods from 'Foldable' on " :<>: ShowType t
:$$: Text "Suggestions:"
:$$: Text " Instead of"
:$$: Text " elem :: (Foldable t, Eq a) => a -> t a -> Bool"
:$$: Text " use"
:$$: Text " member :: ??? -- TODO"
:$$: Text ""
:$$: Text " Instead of"
:$$: Text " notElem :: (Foldable t, Eq a) => a -> t a -> Bool"
:$$: Text " use"
:$$: Text " notMember :: ??? -- TODO"
:$$: Text ""

@chshersh chshersh added this to the v0.5.0: Improvements milestone Feb 16, 2019

chshersh added a commit that referenced this issue Feb 28, 2019

@chshersh chshersh referenced this issue Feb 28, 2019

Merged

[#140] Improve compile-time error messages #147

4 of 10 tasks complete

@vrom911 vrom911 closed this in #147 Feb 28, 2019

vrom911 added a commit that referenced this issue Feb 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.