# OpalEye A [[Haskell]] library to interface with [[PostgreSQL]]. It seems to be the nicest [[Type systems|typesafe]] [[SQL]] library according to [Which type-safe database library should you use? | William Yao](https://www.williamyaoh.com/posts/2019-12-14-typesafe-db-libraries.html), which [[Shae Erisson|Shae]] linked me to. It apparently uses [[Profunctors]], but it's possible to use without understanding any of that. ## Links An interesting discussion that could provide a bit more context to the whole profunctor thing and OpalEye in general. - [What insight about product-profunctors am I missing? · Issue #225 · tomjaguarpaw/haskell-opaleye · GitHub](https://github.com/tomjaguarpaw/haskell-opaleye/issues/225) A comparison of various [[SQL]] libraries for [[Haskell]]: - [Which type-safe database library should you use? | William Yao](https://www.williamyaoh.com/posts/2019-12-14-typesafe-db-libraries.html) Some concrete examples of refactoring common columns using OpalEye. This is due to [[OpalEye]] being based on [[Profunctors]], even though the author of the article admits to not fully understanding the abstraction either. - [Abstracting out common columns in Opaleye | William Yao](https://www.williamyaoh.com/posts/2019-12-28-abstracting-out-common-columns-opaleye.html) See also [[Squeal]]