Skip to content

Commit

Permalink
Add Functor and Bifunctor instances for (:&)
Browse files Browse the repository at this point in the history
  • Loading branch information
isomorpheme committed May 14, 2024
1 parent 30a5e80 commit c2be86c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Database/Esqueleto/Internal/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,12 @@ data (:&) a b = a :& b
deriving (Eq, Show)
infixl 2 :&

instance Functor (:&) where
fmap = bimap id

instance Bifunctor (:&) where

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 8.6.5)

Not in scope: type constructor or class ‘Bifunctor’

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 8.8.4)

Not in scope: type constructor or class ‘Bifunctor’

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 8.10.4)

Not in scope: type constructor or class ‘Bifunctor’

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 9.0.2)

Not in scope: type constructor or class ‘Bifunctor’

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 9.2.2)

Not in scope: type constructor or class ‘Bifunctor’

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 9.6.2)

Not in scope: type constructor or class ‘Bifunctor’

Check failure on line 1448 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.10.2.1, 9.8.1)

Not in scope: type constructor or class ‘Bifunctor’
bimap f g (x :& y) = f x :& g y

-- | Different kinds of locking clauses supported by 'locking'.
--
-- Note that each RDBMS has different locking support. The
Expand Down

0 comments on commit c2be86c

Please sign in to comment.