Created
April 21, 2020 23:30
-
-
Save MarcelineVQ/a0c1dc1093f404aef2b158b8bf595270 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
| module Main | |
| Semigroup b => Semigroup (a -> b) where | |
| f <+> g = \x => f x <+> g x | |
| Monoid b => Monoid (a -> b) where | |
| neutral = const neutral | |
| [all] Semigroup Bool where | |
| x <+> y = x && y | |
| via : Semigroup b -> Semigroup (a -> b) | |
| via r = let _ = r in %search | |
| alphaNum : Char -> Bool | |
| -- alphaNum = (isDigit <+> isAlpha) @{let _ = all in %search} | |
| alphaNum = (isDigit <+> isAlpha) @{via all} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment