!      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ NoneipThis is slower that just pattern matching on the Text data constructor. However, it will work with GHCJS. This should only be used in places where we know that it will only be evaluated once.ipkThis length is not the character length. It is the length of Word16s required by a UTF16 representation. NoneQV^Uip,A character in the basic multilingual plane.ip(Default, used when index is out of rangeipTexts to index intosee src/Data/LICENSE experimentalnon-portable (GHC Extensions)NoneD"ip12-bit unsigned integer typeip!narrowings represented as primop  in GHC.ipcount leading zerosipcount trailing zerosipthe number of set bitsNone&'QVipCharacters outside the basic multilingual plane are not handled correctly by this function. They will not cause a program to crash; instead, the character will have the upper bits masked out.  None&'QVip Taken from Data.ByteString.Internal". The same warnings apply here. None,-6>?FKTwS!ipThe length should be between 0 and 32. These bounds are inclusive. This expectation is not in any way enforced by this library because it does not cause errors. A mask length greater than 32 will be treated as if it were 32.ipFA 32-bit Internet Protocol version 4 address. To use this with the network! library, it is necessary to use Network.Socket.htonl to convert the underlying / from host byte order to network byte order.ip Create an  address from four octets. The first argument is the most significant octet. The last argument is the least significant. Since IP addresses are commonly written using dot-decimal notation, this is the recommended way to create an IP address. Additionally, it is used for the  and  instances of & to help keep things readable in GHCi.let addr = ipv4 192 168 1 1addripv4 192 168 1 1 getIPv4 addr 3232235777ipAn alias for the  smart constructor. ipAn uncurried variant of . ip Convert an  address into a quadruple of octets. The first element in the quadruple is the most significant octet. The last element is the least significant octet. ip&The IP address representing any host: 0.0.0.0 ipThe local loopback IP address:  127.0.0.1 ipThe broadcast IP address: 255.255.255.255ipChecks to see if the Y address belongs to a private network. The three private networks that are checked are  10.0.0.0/8,  172.16.0.0/12, and 192.168.0.0/16.ipChecks to see if the W address belongs to a reserved network. This includes the three private networks that S checks along with several other ranges that are not used on the public Internet.ipChecks to see if the  address is publicly routable.public x == not (reserved x)ip Encode an  address to  using dot-decimal notation:'T.putStrLn (encode (ipv4 192 168 2 47)) 192.168.2.47ip Decode an  address.ip Encode an  address to a text .ip Encode an  address to a UTF-8 encoded .ipThis is sort of a misnomer. It takes Word to make dotDecimalParser perform better. This is mostly for internal use. The arguments must all fit in a Word8.ip^This does not do an endOfInput check because it is reused in the range parser implementation.ipI think that this function can be improved. Right now, it always allocates enough space for a fifteen-character text rendering of an IP address. I think that it should be possible to do more of the math upfront and allocate less space.ipSmart constructor for I. Ensures the mask is appropriately sized and sets masked bits in the  to zero.ipDGiven an inclusive lower and upper ip address, create the smallest Y that contains the two. This is helpful in situations where input given as a range like 192.168.16.0-192.168.19.255b needs to be handled. This makes the range broader if it cannot be represented in CIDR notation.MprintRange $ fromBounds (fromOctets 192 168 16 0) (fromOctets 192 168 19 255)192.168.16.0/22DprintRange $ fromBounds (fromOctets 10 0 5 7) (fromOctets 10 0 5 14) 10.0.5.0/28ipChecks to see if an  address belongs in the .let ip = fromOctets 10 10 1 92/contains (IPv4Range (fromOctets 10 0 0 0) 8) ipTrue1contains (IPv4Range (fromOctets 10 11 0 0) 16) ipFalse/Typically, element-testing functions are written to take the element as the first argument and the set as the second argument. This is intentionally written the other way for better performance when iterating over a collection. For example, you might test elements in a list for membership like this:,let r = IPv4Range (fromOctets 10 10 10 6) 31LmapM_ (P.print . contains r) (take 5 $ iterate succ $ fromOctets 10 10 10 5)FalseTrueTrueFalseFalseThe implementation of  ensures that (with GHC), the bitmask creation and range normalization only occur once in the above example. They are reused as the list is iterated. ip5This is provided to mirror the interface provided by Data.Set. It behaves just like  but with flipped arguments.member ip r == contains r ip!ip The inclusive lower bound of an \. This is conventionally understood to be the broadcast address of a subnet. For example:FT.putStrLn $ encode $ lowerInclusive $ IPv4Range (ipv4 10 10 1 160) 25 10.10.1.128*Note that the lower bound of a normalized ( is simply the ip address of the range:/lowerInclusive r == ipv4RangeBase (normalize r)#ip Convert an  into a list of the  addresses that are in it. >>> let r = IPv4Range (fromOctets 192 168 1 8) 30 >>> mapM_ (T.putStrLn . encode) (toList r) 192.168.1.8 192.168.1.9 192.168.1.10 192.168.1.11%ip'The RFC1918 24-bit block. Subnet mask:  10.0.0.0/8&ip'The RFC1918 20-bit block. Subnet mask:  172.16.0.0/12'ip'The RFC1918 16-bit block. Subnet mask: 192.168.0.0/16(ip Normalize an (. The first result of this is that the  inside the H is changed so that the insignificant bits are zeroed out. For example:?printRange $ normalize $ IPv4Range (fromOctets 192 168 1 19) 24192.168.1.0/24@printRange $ normalize $ IPv4Range (fromOctets 192 168 1 163) 28192.168.1.160/28`The second effect of this is that the mask length is lowered to be 32 or smaller. Working with s that have not been normalized does not cause any issues for this library, although other applications may reject such ranges (especially those with a mask length above 32). Note that ( is idempotent, that is:(normalize r == (normalize . normalize) r-ip(This exists mostly for testing purposes./ipNote: we use network order (big endian) as opposed to host order (little endian) which differs from the underlying IPv4 type representation.9ip0Note: the size is determined by the range length:ipNotes:.bit operations use network order (big endian),do not operate on host bits,-return a normalized range dropping host bits,Rand "promote operands" by extending the length to the larger of two ranges..  !"#$%&'()*+,-. ( !"#$%&')*+,-None .6DV]Rip.A 128-bit Internet Protocol version 6 address.Xip Create an R address from the eight 16-bit fragments that make it up. This closely resembles the standard IPv6 notation, so is used for the T instance. Note that this lacks the formatting feature for suppress zeroes in an RB address, but it should be readable enough for hacking in GHCi.<let addr = ipv6 0x3124 0x0 0x0 0xDEAD 0xCAFE 0xFF 0xFE00 0x1addr<ipv6 0x3124 0x0000 0x0000 0xdead 0xcafe 0x00ff 0xfe00 0x0001T.putStrLn (encode addr)3124::dead:cafe:ff:fe00:1YipAn alias for the X smart constructor.Zip Convert an R to eight 16-bit words.[ipUncurried variant of Y.\ip Build an Re from four 32-bit words. The leftmost argument is the high word and the rightword is the low word.]ipUncurried variant of \.^ip Convert an R to four 32-bit words.aipfEncodes the IP, using zero-compression on the leftmost-longest string of zeroes in the address. Per  -https://tools.ietf.org/html/rfc5952#section-5RFC 5952 Section 5F, this uses mixed notation when encoding an IPv4-mapped IPv6 address:JT.putStrLn $ encode $ fromWord16s 0xDEAD 0xBEEF 0x0 0x0 0x0 0x0 0x0 0x1234dead:beef::1234JT.putStrLn $ encode $ fromWord16s 0x0 0x0 0x0 0x0 0x0 0xFFFF 0x6437 0xA5B4::ffff:100.55.165.180AT.putStrLn $ encode $ fromWord16s 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0::bipDecode an IPv6 address. This accepts both standard IPv6 notation (with zero compression) and mixed notation for IPv4-mapped IPv6 addresses.hipChecks to see if an R address belongs in the N.Elet ip = ipv6 0x2001 0x0db8 0x0db8 0x1094 0x2051 0x0000 0x0000 0x0001`let iprange mask = IPv6Range (ipv6 0x2001 0x0db8 0x0000 0x0000 0x0000 0x0000 0x0000 0x0001) maskcontains (iprange 8) ipTruecontains (iprange 48) ipFalse/Typically, element-testing functions are written to take the element as the first argument and the set as the second argument. This is intentionally written the other way for better performance when iterating over a collection. For example, you might test elements in a list for membership like this:Slet r = IPv6Range (ipv6 0x2001 0x0db8 0x0000 0x0000 0x0000 0x0000 0x0000 0x0001) 64hfmap (contains r) (take 5 $ iterate succ $ ipv6 0x2001 0x0db8 0x0000 0x0000 0xffff 0xffff 0xffff 0xfffe)[True,True,False,False,False]The implementation of h ensures that (with GHC), the bitmask creation and range normalization only occur once in the above example. They are reused as the list is iterated.iip5This is provided to mirror the interface provided by Data.Set. It behaves just like h but with flipped arguments.member ip r == contains r ipjip The inclusive lower bound of an N\. This is conventionally understood to be the broadcast address of a subnet. For example:rT.putStrLn $ encode $ lowerInclusive $ IPv6Range (ipv6 0x2001 0x0db8 0x0000 0x0000 0x0000 0x0000 0x0000 0x0001) 25 2001:d80::*Note that the lower bound of a normalized  IPv4Range( is simply the ip address of the range:/lowerInclusive r == ipv6RangeBase (normalize r)lip(This exists mostly for testing purposes.uipSince R has more inhabitants than , the implementation of # discards information. Currently,  and c emit an error, but this could be remedied if someone wants to provide an implementation of them.!NOPQRSTUVWXYZ[\]^_`abcdefghijklmn!XWY\[]Z^`_abcVmndhijkefglRSTUNOPQNone}ip A 32-bit  address or a 128-bit R8 address. Internally, this is just represented as an R' address. The functions provided in Net.IP help simulate constructing and pattern matching on values of this type. All functions and typeclass methods that convert }& values to text will display it as an  address if possible.ip Construct an }4 address from the four octets of an IPv4 address.ip Construct an }< address from the eight 16-bit chunks of an IPv6 address. }~ }~None.6>?DFKTVip3The format expected by the mac address parser. The  taken by some of these constructors is the ascii value of the character to be used as the separator. This is typically a colon, a hyphen, or a space character. All decoding functions are case insensitive.ipTwo-character groups, FA:2B:40:09:8C:11ipThree-character groups, 24B-F0A-025-829ipFour-character groups, A220.0745.CAC7ipNo separator,  24AF4B5B0780ipA 48-bit MAC address. Do not use the data constructor for this type. It is not considered part of the stable API, and it allows you to construct invalid MAC addresses.ip Construct a  address from a %. Only the lower 48 bits are used.ip Create a  address from six octets.ip Convert a A address to the six octets that make it up. This function and  are inverses:?m == (let (a,b,c,d,e,f) = toOctets m in fromOctets a b c d e f)ip Decode a  address from a 1. Each byte is interpreted as an octet of the  address. Consequently, 4s of length 6 successfully decode, and all other s fail to decode.4decodeBytes (B.pack [0x6B,0x47,0x18,0x90,0x55,0xC3])Just (mac 0x6b47189055c3) decodeBytes (B.replicate 6 0x3A)Just (mac 0x3a3a3a3a3a3a) decodeBytes (B.replicate 7 0x3A)Nothingip Encode a H address lowercase hex, separating every two characters with a colon:(T.putStrLn (encode (Mac 0xA47F247AB423))a4:7f:24:7a:b4:23ip Encode a B address, as lowercase hexadecimal digits separated by a colon:-BC.putStrLn (encodeUtf8 (mac 0x64255A0F2C47))64:25:5a:0f:2c:47ip]Lenient decoding of MAC address that accepts lowercase, uppercase, and any kind separator.decodeUtf8 "A2:DE:AD:BE:EF:67"Just (mac 0xa2deadbeef67)decodeUtf8 "13-a2-fe-a4-17-96"Just (mac 0x13a2fea41796)decodeUtf8 "0A42.47BA.67C2"Just (mac 0x0a4247ba67c2)ip!Make a bytestring builder from a + address using a colon as the separator.ipLenient parser for a [ address using any character as the separator and accepting any digit grouping (i.e. FA:43:B2:C0:0F:99 or A065.647B.87FA).ip Parser for a % address using the provided settings.ipYParse a single hexidecimal character. This will skip at most one character to do this.ipKind of a confusing type signature. The Word8 that stands alone represented an ascii-encoded value. The others actually describes the numbers that would be decoded from this value.ipUThis only preserves the lower 6 bytes of the 8-byte word that backs a mac address. It runs slower than it would if it used a full 8-byte word, but it consumes less space. When storing millions of mac addresses, this is a good trade to make. When storing a small number of mac address, it might be preferable to make a primitive array of M instead and use the mac address data constructor to coerce between the two. NoneNOPQRSTU}~RSTU}~NOPQ     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWWXYZZ[\%]^_`abc1235()*+6&'defghijklmnopqrrst]uv%wxyz{|}~ !"%  ip-1.4.0-Junhy5A5FRoFlPpNTJeTWQNet.IPv4Net.IPv6Net.IPNet.Mac!Data.Text.Builder.Common.InternalData.Text.Builder.VariableData.Word.Synthetic.Word12Data.Text.Builder.FixedData.ByteString.Builder.Fixed Net.Types IPv4Range ipv4RangeBaseipv4RangeLengthIPv4getIPv4ipv4 fromOctetsfromTupleOctetstoOctetsanyloopback broadcastprivatereservedpublicencodedecodebuilderreaderparser encodeUtf8 decodeUtf8 builderUtf8 parserUtf8 encodeString decodeStringprintrange fromBoundscontainsmemberlowerInclusiveupperInclusivetoList toGenerator private24 private20 private16 normalize encodeRange decodeRange builderRange parserRange printRange$fFiniteBitsIPv4 $fBitsIPv4$fFromJSONKeyIPv4$fToJSONKeyIPv4$fFromJSONIPv4 $fToJSONIPv4$fVectorVectorIPv4$fMVectorMVectorIPv4 $fUnboxIPv4 $fReadIPv4 $fShowIPv4$fFiniteBitsIPv4Range$fBitsIPv4Range$fVectorVectorIPv4Range$fMVectorMVectorIPv4Range$fUnboxIPv4Range$fFromJSONIPv4Range$fToJSONIPv4Range$fHashableIPv4Range$fEqIPv4 $fOrdIPv4 $fEnumIPv4 $fBoundedIPv4$fHashableIPv4 $fGenericIPv4 $fPrimIPv4$fStorableIPv4 $fEqIPv4Range$fOrdIPv4Range$fShowIPv4Range$fReadIPv4Range$fGenericIPv4Range IPv6Range ipv6RangeBaseipv6RangeLengthIPv6ipv6Aipv6Bipv6 fromWord16s toWord16sfromTupleWord16s fromWord32sfromTupleWord32s toWord32s$fFromJSONIPv6 $fToJSONIPv6 $fReadIPv6 $fPrimIPv6 $fShowIPv6 $fBoundedIPv6 $fEnumIPv6$fEqIPv6 $fOrdIPv6 $fEqIPv6Range$fOrdIPv6Range$fShowIPv6Range$fReadIPv6Range$fGenericIPv6RangeIPgetIPcase_fromIPv4fromIPv6 $fFromJSONIP $fToJSONIP$fReadIP$fShowIP$fEqIP$fOrdIP MacGroupingMacGroupingPairsMacGroupingTriplesMacGroupingQuadruplesMacGroupingNoSeparatorMacCodecmacCodecGroupingmacCodecUpperCaseMacmac decodeBytes encodeWith decodeWith parserWithdecodeWithUtf8parserWithUtf8encodeWithUtf8 $fFromJSONMac$fFromJSONKeyMac$fToJSONKeyMac $fToJSONMac $fHashableMac $fReadMac $fShowMac $fPrimMac$fEqMac$fOrdMac $fGenericMac$fEqMacGrouping$fOrdMacGrouping$fShowMacGrouping$fReadMacGrouping$fGenericMacGrouping $fEqMacCodec $fOrdMacCodec$fShowMacCodec$fReadMacCodec$fGenericMacCodecportableTextArrayportableTextLengthportableUntext writeString charUtf16SizehexValuesWord12UpperhexValuesWord12LowerhexValuesWord8UpperhexValuesWord8LowertwoDecimalDigitsthreeDecimalDigitscharBmp_vectorBuilderrun contramap staticCharBmpword8Word12 narrow12Word#ghc-primGHC.Primand#clz12#ctz12# popCnt12#W12#fromTextcontramapBuilderword8HexFixedUpperword8HexFixedLowerword12HexFixedUpperword12HexFixedLowerc2wfromByteStringchar8baseGHC.WordWord32GHC.ShowShowGHC.ReadRead text-1.2.3.0Data.Text.InternalTextData.Text.Internal.Builderbytestring-0.10.8.2Data.ByteString.Internal ByteString fromOctets'dotDecimalParsertoTextPreAllocated GHC.TypesIntGHC.EnumfromEnum enumFromThenenumFromThenToWord8Word64parseOneHexLenientUtf8tryParseWord8Hex