Created
September 30, 2022 17:54
-
-
Save ramirez7/dd0e1768625f7a894419a267d9ca22aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| newtype Aligned f a = Aligned { unAligned :: f a } | |
| instance (Semigroup a, Semialign f) => Semigroup (Aligned f a) where | |
| Aligned x1 <> Aligned x2 = Aligned $ Data.Align.salign x1 x2 | |
| instance (Semigroup a, Align f) => Monoid (Aligned f a) where | |
| mempty = Aligned Data.Align.nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment