powerdns-0.3.0: PowerDNS API bindings for api/v1
Safe HaskellSafe-Inferred
LanguageHaskell2010

PowerDNS.Internal.Utils

Description

 
Synopsis

Documentation

strip :: Eq a => [a] -> [a] -> [a] Source #

A variant of stripPrefix that defaults to id if the prefix is not found.

map1 :: (a -> a) -> [a] -> [a] Source #

Version of map that applies the function to the first element only

class Empty a where Source #

Typeclass of things we can generate empty values of. This is used to quickly build values from parameters to PowerDNS, because you often only need a few fields. empty { someField = Just 1 , otherField = Just "foo" }

Minimal complete definition

Nothing

Methods

empty :: a Source #

Produce an empty value

default empty :: (Generic a, GEmpty (Rep a)) => a Source #

Instances

Instances details
Empty Comment Source # 
Instance details

Defined in PowerDNS.API.Zones

Methods

empty :: Comment Source #

Empty Zone Source # 
Instance details

Defined in PowerDNS.API.Zones

Methods

empty :: Zone Source #

Empty Server Source # 
Instance details

Defined in PowerDNS.API.Servers

Methods

empty :: Server Source #

Empty Cryptokey Source # 
Instance details

Defined in PowerDNS.API.Cryptokeys

Empty (Maybe a) Source # 
Instance details

Defined in PowerDNS.Internal.Utils

Methods

empty :: Maybe a Source #

class GEmpty f where Source #

Methods

gempty :: f p Source #

Instances

Instances details
GEmpty (U1 :: Type -> Type) Source # 
Instance details

Defined in PowerDNS.Internal.Utils

Methods

gempty :: U1 p Source #

Empty a => GEmpty (K1 i a :: Type -> Type) Source # 
Instance details

Defined in PowerDNS.Internal.Utils

Methods

gempty :: K1 i a p Source #

(GEmpty f, GEmpty g) => GEmpty (f :*: g) Source # 
Instance details

Defined in PowerDNS.Internal.Utils

Methods

gempty :: (f :*: g) p Source #

GEmpty f => GEmpty (M1 i t f) Source # 
Instance details

Defined in PowerDNS.Internal.Utils

Methods

gempty :: M1 i t f p Source #