idris-lang / Idris-dev

A Dependently Typed Functional Programming Language
http://idris-lang.org
Other
3.44k stars 644 forks source link

No Monoid for Ordering #1378

Open puffnfresh opened 10 years ago

puffnfresh commented 10 years ago

I can't figure out where this should go, since Ordering is defined in Classes.idr but Monoid is in Algebra.idr:

instance Semigroup Ordering where
  (<+>) EQ b = b
  (<+>) a  _ = a

instance Monoid Ordering where
  neutral = EQ
jfdm commented 8 years ago

Old issues are old...it might be best to place this in a module Ordering.Monoid in base that is sufficiently isolated from Classes and Algebra. Thus to use it, one has to import Ordering.Monod.