import Data.IP
import Network.DNS hiding (lookup)
import Database.Persist
import Database.Persist.Sqlite (SqliteConf)
import Database.Persist.Zookeeper (ZookeeperConf)

instance PersistField IP where
  toPersistValue (IPv4 ip) = toPersistValue $ fromIPv4 ip
  toPersistValue (IPv6 ip) = toPersistValue $ fromIPv6 ip
  fromPersistValue value = do
    v <- fromPersistValue value