QO%      !"#$ 2016 Mark Karpov BSD 3 clause(Mark Karpov <markkarpov@openmailbox.org> experimentalportableNone +,9:;DQRT Consume bytes from strict %* and apply them to a function that takes & until it produces a .AIdenticons that can be rendered as an image implement this class.The k type function calculates type that layer-producing function should have to consume given number of bytes n.The Q type function returns type of the code which can implement the given identicon.The K type function calculates how many bytes is consumed in a given identicon.The Y type function calculates how many bytes available for consumption in a given identicon.m is the basic building block of an identicon. It's a function that takes the following arguments (in order):Width of identiconHeight of identiconPosition on X axisPosition on Y axis &and returns a 'R value. In this library, an identicon is generated as superposition  of several Layers. The  ! type operator is used to attach  s to , thus adding layers to it and exhausting bytes that are available for identicon generation. An example of identicon that can be generated from 16 byte hash is shown below: Btype Icon = Identicon 16 :+ Consumer 5 :+ Consumer 5 :+ Consumer 6%The identicon above has three layers.   is a type that represents an entity that consumes bytes that are available for identicon generation. It's parametrized over the phantom type n| which is a natural number on type level that represents the number of bytes that this entity consumes. At this moment, a   always adds one X to identicon when attached to it. The number of bytes, specified as type parameter of i type must be completely consumed by a collection of consumers attached to it. To attach a consumer to , you use the   type operator, see below.s is a type that represents an identicon consisting of zero layers. The type is parametrized over the phantom type n which is a natural number on type level that represents the number of bytes that should be provided to generate this type of identicon. Bytes typically come from some sort of hash that has fixed size.()Combine results of two rending functions.)YAn implementation of saturated addition for bytes. This is a reasonably efficient thing.*Render an identicon. The function returns * if given %7 is too short or when width or height is lesser than 1. ()Type that defines an identicon$Implementation that generates layersWidth in pixelsHeight in pixels1Collection of bytes to use, should be long enoughRendered identicon, or * if there is not enough bytes     () 8 8 2016 Mark Karpov BSD 3 clause(Mark Karpov <markkarpov@openmailbox.org> experimentalportableNoneBlack is a special color, it means absence of light. We give this pixel a name because it's used very frequently in layer coding. Layer filled with a given color.%Gradient changing from left to right.%Gradient changing from top to bottom.>Gradient changing from top left corner to bottom right corner.>Gradient changing from top right corner to bottom left corner.=Gradient with one color everywhere and another in the center.+A gradient helper function.A built-in gradient transforming function. It maps continuous floating value changing from 0 to 1 to value changing from 0 to 1 (in the middle) and back to 0.#This sharpens gradient transitions.onGrid w h n l, given grid that has w6 horizontal discrete positions (of equal length) and h* vertical positions, it makes given layer l occupy cell at index nG. This approach allows you control position and size at the same time. The index nJ can be greater than maximal index, in this case reminder of division of n by w * h is used.'Limit given layer so it forms a circle. #Add horizontal symmetry to a layer.!!Add vertical symmetry to a layer."tAdd horizontal and vertical symmetry to layer. Result is a layer with four mirrored repetitions of the same figure.# Just like "u, but every repetition is rotated by 90. Only works with square layers because for speed it just swaps coordinates.$3Select one of provided alternatives given a number.Gradient transforming function Left color Right colorGradient transforming function Top color Bottom colorGradient transforming functionTop left colorBottom right colorGradient transforming functionTop right colorBottom left colorGradient transforming function Edge  colorColor in the center+Gradient transforming functionActual value of coordinateMaximum value of coordinate#Color at the beginning of the rangeColor at the end of the rangeResulting colorNumber of horizontal positionsNumber of vertical positionsIndex of this cellLayer to insertResulting layer !"#$ !"#$ !"#$+ !"#$,        !"#$%&'()*+,-./(0123&identicon-0.2.0-CKguwdQehogFFaDubplJ6TGraphics.IdenticonGraphics.Identicon.Primitive ApplyBytes applyBytes RenderablerenderToLayerImplementation BytesConsumedBytesAvailableLayerunLayer:+Consumer IdenticonrenderIdenticon$fApplyBytes(->)$fApplyBytesLayer$fRenderable:+$fRenderableIdenticonblackcolor gradientLR gradientTB gradientTLBR gradientTRBL gradientXYmidedgeonGridcirclehsymvsymhvsymrsymoneofbytestring-0.10.8.1Data.ByteString.Internal ByteStringbaseGHC.WordWord8(JuicyPixels-3.2.8-4tynTqp2SQ4AmfUQfX5QqoCodec.Picture.Types PixelRGB8 mixPixelssaturatedAdditionGHC.BaseNothingξ