supki / directory-layout

Making, fitting, printing directory layouts
http://supki.github.io/directory-layout
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Eq instance #3

Closed supki closed 11 years ago

supki commented 11 years ago

Current Eq (and Ord) instance is kinda crippled: two (morally) equivalent layouts will be treated as different. It would be very annoying to try to write proper Eq instance though; probably easier solution is to ensure that layout elements order is invariant by construction. That would require changes to Semigroup, Apply, and Bind instances as far as I can see.

supki commented 11 years ago

Apply instance can be written in terms of Bind + Applicative and Semigroup's (<>) is restricted (>>).

supki commented 11 years ago

Stuff's in feature-insanity branch. Requires some testing.