hw-ip-2.0.1.0: Library for manipulating IP addresses and CIDR blocks

Safe HaskellSafe
LanguageHaskell2010

HaskellWorks.Data.Network.Ip.Range

Synopsis

Documentation

data Range a Source #

Constructors

Range 

Fields

Instances
Eq a => Eq (Range a) Source # 
Instance details

Defined in HaskellWorks.Data.Network.Ip.Range

Methods

(==) :: Range a -> Range a -> Bool #

(/=) :: Range a -> Range a -> Bool #

Ord a => Ord (Range a) Source # 
Instance details

Defined in HaskellWorks.Data.Network.Ip.Range

Methods

compare :: Range a -> Range a -> Ordering #

(<) :: Range a -> Range a -> Bool #

(<=) :: Range a -> Range a -> Bool #

(>) :: Range a -> Range a -> Bool #

(>=) :: Range a -> Range a -> Bool #

max :: Range a -> Range a -> Range a #

min :: Range a -> Range a -> Range a #

Show a => Show (Range a) Source # 
Instance details

Defined in HaskellWorks.Data.Network.Ip.Range

Methods

showsPrec :: Int -> Range a -> ShowS #

show :: Range a -> String #

showList :: [Range a] -> ShowS #

Generic (Range a) Source # 
Instance details

Defined in HaskellWorks.Data.Network.Ip.Range

Associated Types

type Rep (Range a) :: Type -> Type #

Methods

from :: Range a -> Rep (Range a) x #

to :: Rep (Range a) x -> Range a #

type Rep (Range a) Source # 
Instance details

Defined in HaskellWorks.Data.Network.Ip.Range

type Rep (Range a) = D1 (MetaData "Range" "HaskellWorks.Data.Network.Ip.Range" "hw-ip-2.0.1.0-J3qzHjky5Nt1puGs3okvEB" False) (C1 (MetaCons "Range" PrefixI True) (S1 (MetaSel (Just "first") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a) :*: S1 (MetaSel (Just "last") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

mergeRanges :: (SafeEnum a, Ord a) => [Range a] -> [Range a] Source #

Merge adjacent ranges if they overlap or are adjacent