Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,263
    • Issues 5,263
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 565
    • Merge requests 565
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #15078
Closed
Open
Issue created Apr 23, 2018 by Simon Jakobi@sjakobiDeveloper

base: Customary type class laws (e.g. for Eq) and non-abiding instances (e.g. Float) should be documented

As beginning Haskellers regularly ask about these laws and instances I think it would be good to have them documented where they are defined.

Documented so far:

(in 793902e6)

Classes

  • Eq
  • Floating
  • Fractional
  • Integral
  • Num
  • Ord

Non-abiding instances

  • CDouble (shares Double's deficiencies)
  • CFloat (shares Float's deficiencies)
  • Complex a (inherits deficiencies)
  • Double: Eq, Ord, Fractional, Num
  • Float: Eq, Ord, Fractional, Num
  • Ratio a (inherits deficiencies)
  • Natural: Num

TODO

(This is not an exhaustive list, please add more)

  • Document non-abiding instances for the types from Data.Word and Data.Int.
Edited Mar 10, 2019 by Azel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking