▁GC 1 . Free ; ▁▁ ▁GC 2 . Free ; ▁end . ▁ ▁Function al ▁languages ▁ ▁Gener icity ▁in ▁H askell ▁The ▁type ▁class ▁mechanism ▁of ▁H askell ▁supports ▁generic ▁programming . ▁Six ▁of ▁the ▁pre defined ▁type ▁classes ▁in ▁H askell ▁( including ▁Eq , ▁the ▁types ▁that ▁can ▁be ▁compared ▁for ▁equality , ▁and ▁Show , ▁the ▁types ▁whose ▁values ▁can ▁be ▁rendered ▁as ▁strings ) ▁have ▁the ▁special ▁property ▁of ▁supporting ▁derived ▁instances . ▁This ▁means ▁that ▁a ▁programmer ▁defining ▁a ▁new ▁type ▁can ▁state ▁that ▁this ▁type ▁is ▁to ▁be ▁an ▁instance ▁of ▁one ▁of ▁these ▁special ▁type ▁classes , ▁without ▁providing ▁implementations ▁of ▁the ▁class ▁methods ▁as ▁is ▁usually ▁necessary ▁when ▁declaring ▁class ▁instances . ▁All ▁the ▁necessary ▁methods ▁will ▁be ▁" der ived " ▁– ▁that ▁is , ▁constructed ▁automatically ▁– ▁based ▁on ▁the ▁structure ▁of ▁the ▁type . ▁For ▁instance , ▁the ▁following ▁declaration ▁of ▁a ▁type ▁of ▁binary ▁trees ▁states ▁that ▁it ▁is ▁to ▁be ▁an ▁instance ▁of ▁the ▁classes ▁Eq ▁and ▁Show : ▁ ▁data ▁Bin Tree ▁a ▁= ▁Le af ▁a ▁| ▁Node ▁( B in Tree ▁a ) ▁a ▁( B in Tree ▁a ) ▁▁▁▁▁▁ ▁der iving ▁( Eq , ▁Show ) ▁ ▁This ▁results ▁in ▁an ▁equality ▁function ▁( == ) ▁and ▁a ▁string ▁representation ▁function ▁( show ) ▁being ▁automatically ▁defined ▁for ▁any ▁type ▁of ▁the ▁form ▁Bin Tree ▁T ▁provided ▁that ▁T ▁itself ▁supports ▁those ▁operations . ▁ ▁The ▁support ▁for ▁derived ▁instances ▁of ▁Eq ▁and