úÎ@ =R&      !"#$%#A newtype used entirely to provide & and ' instances for s.(c) Henry Bucklow 2010BSD3henry@elsie.org.uk provisionalportableSafe:A typeclass and an implementation for double-ended queues.(c) Henry Bucklow 2009-2010BSD3henry@elsie.org.uk provisionalportableSafe&„An implementation of Banker's Dequeues, as described in Chris Okasaki's Purely Functional Data Structures. The functions for the = instance have the following complexities (where n is the ( of the queue): (: O(1): O(1): O(1): O(n) : O(n) : O(1) amortised : O(1) amortised : O(1) amortised : O(1) amortised: O(n)$A typeclass for double-ended queues.Generates an empty queue.Returns ) if this queue is empty.+Returns the item on the front of the queue.)Returns the item on the end of the queue.\Returns the first n items from the front of the queue, in the order they would be popped. XReturns the last n items from the end of the queue, in the order they would be popped. +Pushes an item onto the front of the queue. )Pops an item from the front of the queue. *Pushes an item onto the back of the queue. (Pops an item from the back of the queue.Converts a list into a queue.Support to make generating ' instances for s easier. Use as follows: M instance Show a => Show (MyDequeue a) where show q = showDequeue q The resulting '# instance will be portable between Deqeue; instances, and will not expose the details of how your  instance is constructed.Support to make generating & instances for s easier. Use as follows: ^ instance Read a => Read (MyDequeue a) where readsPrec i = readDequeue $ readsPrec i The resulting &# instance will be portable between Deqeue; instances, and will not expose the details of how your  instance is constructed.XValidates that if you push, then pop, the front of the queue, you get the same queue.WValidates that if you push, then pop, the back of the queue, you get the same queue.Validates that  returns the last  pushFront' d element.Validates that  returns the last  pushBack' d element.Validates that the last n+ pushed elements are returned by takeFront.Validates that the last n* pushed elements are returned by takeBack.gValidates that the length of a queue is the same as the length of the list generated from the queue.1Validates that fromList . toList is the identity.*1The maximum number of times longer one half of a - is permitted to be relative to the other.+TChecks to see if the queue is too far out of balance. If it is, it rebalances it.5Validates that if you push, then pop, the front of a  BankersQueue, you get the same queue.4Validates that if you push, then pop, the back of a , you get the same queue.Validates that  returns the last  pushFront' d element.Validates that  returns the last  pushBack' d element.Validates that the last n+ pushed elements are returned by takeFront.Validates that the last n* pushed elements are returned by takeBack.Validates that the length of a C is the same as the length of the list generated from the queue. 7Validates that fromList . toList is the identity for a .!Validates that a : remains balanced despite repeated pushes to the front."Validates that a 9 remains balanced despite repeated pushes to the back.#Validates that a : remains balanced despite repeated pops from the front.$Validates that a 9 remains balanced despite repeated pops from the back.%Validates that a C has read and show instances that are the inverse of each other./, *+ -!"#$%./01234$  !"#$%$  !"#$%#,  *+ -!"#$%./012345      !"#$%&'()'*+',-./0123456789:;deque_Fff8cMKURMOJzkgxgFRosjData.Dequeue.Show Data.DequeueDequeueBankersDequeueemptynullfirstlast takeFronttakeBack pushFrontpopFrontpushBackpopBackfromList showDequeue readDequeueprop_pushpop_frontprop_pushpop_backprop_push_frontprop_push_backprop_takeFront prop_takeBackprop_length_toListprop_fromList_toListprop_pushpop_front_bqprop_pushpop_back_bqprop_push_front_bqprop_push_back_bqprop_takeFront_bqprop_takeBack_bqprop_length_toList_bqprop_fromList_toList_bqprop_push_front_bq_balanceprop_push_back_bq_balanceprop_pop_front_bq_balanceprop_pop_back_bq_balanceprop_read_show_bqbaseGHC.ReadReadGHC.ShowShow Data.Foldablelengthghc-prim GHC.TypesTrue bqBalancecheckbalanced$fReadBankersDequeue$fShowBankersDequeue$fEqBankersDequeue$fArbitraryBankersDequeue$fDequeueBankersDequeue$fFoldableBankersDequeue$fFunctorBankersDequeue