-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Monoid instances for ForeignLib & Executable
The Semigroup and Monoid instances for ForeignLib were completely broken: for the `foreignLibVersionInfo` and `foreignLibVersionInfo`, we essentially had the following: mempty :: Maybe XYZ mempty = Nothing (<>) :: Maybe XYZ -> Maybe XYZ -> Maybe XYZ _ <> b = b which is obviously not a valid Monoid, as `Just x <> Nothing = Nothing`, violating the identity law. The Semigroup instance for Executable was also deeply suspicious, as it combined the module paths, which makes no sense. Now we instead error if the two module paths are different (and both nonempty).
- Loading branch information
1 parent
6389954
commit 78d89a9
Showing
3 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters