Copyright | (c) Colin Woodbury 2012 - 2020 |
---|---|

License | GPL3 |

Maintainer | Colin Woodbury <colin@fosskers.ca> |

Safe Haskell | None |

Language | Haskell2010 |

Utility functions specific to Aura.

## Synopsis

- data Pattern = Pattern {}
- searchLines :: Text -> [Text] -> [Text]
- urlContents :: Manager -> String -> IO (Maybe ByteString)
- foldMap1 :: Semigroup m => (a -> m) -> NonEmpty a -> m
- fold1 :: Semigroup m => NonEmpty m -> m
- hush :: Either a b -> Maybe b
- note :: a -> Maybe b -> Either a b
- fmapEither :: (a -> Either b c) -> [a] -> ([b], [c])
- traverseEither :: Applicative f => (a -> f (Either b c)) -> [a] -> f ([b], [c])
- data These a b
- these :: (a -> t) -> (b -> t) -> (a -> b -> t) -> These a b -> t
- edit :: FilePath -> FilePath -> IO ()
- type Traversal' s a = forall f. Applicative f => (a -> f a) -> s -> f s
- maybe' :: b -> Maybe a -> (a -> b) -> b
- groupsOf :: Int -> [a] -> [[a]]
- nes :: Set a -> Maybe (NonEmpty a)
- partNonEmpty :: (a -> These b c) -> NonEmpty a -> These (NonEmpty b) (NonEmpty c)

# Strings

For regex-like find-and-replace in some `Text`

.

# Network

urlContents :: Manager -> String -> IO (Maybe ByteString) Source #

Assumes the given URL is correctly formatted.

# Semigroupoids

# Errors

# Compactable

fmapEither :: (a -> Either b c) -> [a] -> ([b], [c]) Source #

Borrowed from Compactable.

traverseEither :: Applicative f => (a -> f (Either b c)) -> [a] -> f ([b], [c]) Source #

Borrowed from Compactable.

# These

# Directory

edit :: FilePath -> FilePath -> IO () Source #

Edit some file in-place with the user's specified editor.

# Lens

type Traversal' s a = forall f. Applicative f => (a -> f a) -> s -> f s Source #

Simple Traversals compatible with both lens and microlens.