bitemyapp / esqueleto

New home of Esqueleto, please file issues so we can get things caught up!
BSD 3-Clause "New" or "Revised" License
370 stars 107 forks source link

Passthrough instances for literals #360

Open parsonsmatt opened 1 year ago

parsonsmatt commented 1 year ago

May be nice to have:

instance Num a => Num (SqlExpr (Value a)) where
    fromInteger = val .fromInteger
    (+) = (+.) 
    (*) = (*.)
    -- etc...

instance IsString a => IsString (SqlExpr (Value a)) where
    fromString = val . fromString