Skip to content

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

@chshersh

Description

@chshersh

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 ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    docREADME, Haddock documentation, tutorialsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions