Inconsistent usage of `==` and `=` equality in docs
- Dominant language
- Haskell
- Stars
- 355
- Forks
- 194
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 4
Description
While reading the docs for [Data.Set](http://hackage.haskell.org/package/containers-0.6.3.1/docs/Data-Set.html#v:powerSet), I noticed that in some places `==` is used and in some `=` is used. For example, the docs for `powerSet`:
> Calculate the power set of a set: the set of all its subsets.
>
> ```t `member` powerSet s == t `isSubsetOf` s```
>
> Example:
>
> ```
> powerSet (fromList [1,2,3]) =
> fromList $ map fromList [[],[1],[1,2],[1,2,3],[1,3],[2],[2,3],[3]]
> ```
I guess that `=` should be used only if we can prove it from the definitions, and only if both sides are "internally" equal. For instance, we can disprove the above example easily:
```
Prelude Data.Set> putTree = putStrLn . showTree
Prelude Data.Set> putTree $ powerSet (fromList [1,2,3])
fromList [1,3]
+--fromList [1,2]
| +--fromList [1]
| | +--fromList []
| | +--|
| +--fromList [1,2,3]
+--fromList [2,3]
+--fromList [2]
+--fromList [3]
Prelude Data.Set> putTree $ fromList $ Prelude.map fromList [[],[1],[1,2],[1,2,3],[1,3],[2],[2,3],[3]]
fromList [1,2,3]
+--fromList [1]
| +--fromList []
| +--fromList [1,2]
+--fromList [2]
+--fromList [1,3]
+--fromList [2,3]
+--|
+--fromList [3]
```
The examples for `cartesianProduct` and `disjointUnion` can be disproved similarly. From looking around, other modules like IntSet and Map modules also have this issue.
I suppose every nontrivial example/law equation with containers on both sides should use `==` instead of `=`.
Contributor guide
Assessment
This issue has not been assessed yet.