tomjaguarpaw / haskell-opaleye

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No Default ToFields Int16?

uliSchuster opened this issue · comments

I am trying to write an application atop an existing PostgreSQL database that hast smallint values. To my understanding, they should be mapped onto Haskell's Int16 type. However, I get a typeclass error No instance for (OE.DefaultFromField OE.SqlInt2 Int16). A look into Opaleye.ToFields shows that there indeed is no instance for Int16. Is this intentional for some reason, or could I simply add an instance to make it work?

It's not intentional, it's just missing. You can add it and it should work fine.