{-# LANGUAGE Safe #-}
{-# OPTIONS_GHC -Wno-missing-export-lists #-}
{-# OPTIONS_GHC -Wno-missing-exported-signatures #-}
{-# OPTIONS_GHC -Wno-missing-local-signatures #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK hide #-}

module Data.Tree.AVL.Unsafe.Examples where

import Data.Tree.AVL.Unsafe
  ( deleteAVL,
    emptyAVL,
    insertAVL,
    lookupAVL,
  )
import Prelude ()

-- | Test Balanced Binary Tree
avle :: AVL a
avle = AVL a
forall a. AVL a
emptyAVL

avlt1 :: AVL Char
avlt1 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
20 Char
'f' AVL Char
forall a. AVL a
avle

avlt2 :: AVL Char
avlt2 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
60 Char
'o' AVL Char
avlt1

avlt3 :: AVL Char
avlt3 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
30 Char
'l' AVL Char
avlt2

avlt4 :: AVL Char
avlt4 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
50 Char
'p' AVL Char
avlt3

avlt5 :: AVL Char
avlt5 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
0 Char
'f' AVL Char
avlt4

avlt6 :: AVL Char
avlt6 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
70 Char
'q' AVL Char
avlt5

avlt7 :: AVL Char
avlt7 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
70 Char
't' AVL Char
avlt6

avlt8 :: AVL Char
avlt8 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
75 Char
'a' AVL Char
avlt7

avlt9 :: AVL Char
avlt9 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
80 Char
'a' AVL Char
avlt8

avlt10 :: AVL Char
avlt10 = Int -> Char -> AVL Char -> AVL Char
forall a. Show a => Int -> a -> AVL a -> AVL a
insertAVL Int
90 Char
'a' AVL Char
avlt9

l1 :: Maybe Char
l1 = Int -> AVL Char -> Maybe Char
forall a. Int -> AVL a -> Maybe a
lookupAVL Int
30 AVL Char
avlt8

-- | Nothing: key 10 is not in the tree avlt8
n :: Maybe Char
n = Int -> AVL Char -> Maybe Char
forall a. Int -> AVL a -> Maybe a
lookupAVL Int
10 AVL Char
avlt8

avlt11 :: AVL Char
avlt11 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
20 AVL Char
avlt8

avlt12 :: AVL Char
avlt12 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
60 AVL Char
avlt8

avlt13 :: AVL Char
avlt13 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
30 AVL Char
avlt8

avlt14 :: AVL Char
avlt14 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
50 AVL Char
avlt8

avlt15 :: AVL Char
avlt15 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
0 AVL Char
avlt8

avlt16 :: AVL Char
avlt16 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
70 AVL Char
avlt8

avlt17 :: AVL Char
avlt17 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
70 AVL Char
avlt8

avlt18 :: AVL Char
avlt18 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
75 AVL Char
avlt8

avlt19 :: AVL Char
avlt19 = Int -> AVL Char -> AVL Char
forall a. Int -> AVL a -> AVL a
deleteAVL Int
21 AVL Char
avlt8

avlt20 :: AVL a
avlt20 = Int -> AVL a -> AVL a
forall a. Int -> AVL a -> AVL a
deleteAVL Int
21 AVL a
forall a. AVL a
avle