h& ?#      !"Create C structs from Haskell(c) Simon Plakolb, 2020MITs.plakolb@gmail.combeta Safe-Inferredq C-structsDue to alignment constraints the size of C structs is dependent on the order of fields and their respectible sizes. The function 6 can calculate the resulting size given a list of all  alignments and sizes. C-structs1Jumps to the next pointer location in the struct. C-structs Alias for  foldr max 0.Create C structs from Haskell(c) Simon Plakolb, 2020MITs.plakolb@gmail.combeta Safe-Inferred| C-structsAll StructN types and their instances of # are declared using . It can theoretically create C structs with an infinite number of fields. The parameter of  is the number of fields the struct type should have. Its constructor and type will both be named StructN% where N is equal to the argument to . C-structs Access function for fields of a StructN where N is the number of fields in the struct. N is the first argument passed to , while the second is the field number. The first field has number 1, the second 2 and so on.  s = Struct4 1 2 3 4 $(acs 4 3) sCreate C structs from Haskell(c) Simon Plakolb, 2020MITs.plakolb@gmail.combeta Safe-Inferred \ C-structsA  can hold two records of any # types a and b. It is itself an instance of # and can be used inside a $. The 8 constructor takes two arguments. The record functions  and % provide access to the fields values.  C-structsA   can hold three records of any # types a, b and c. It is itself an instance of # and can be used inside a $. The  : constructor takes three arguments. The record functions  ,   and  % provide access to the fields values. C-structsA  can hold four records of any # types a, b, c and d. It is itself an instance of # and can be used inside a $. The 9 constructor takes four arguments. The record functions , ,  and % provide access to the fields values. C-structsA  can hold five records of any # types a, b, c, d and e. It is itself an instance of # and can be used inside a $. The 9 constructor takes five arguments. The record functions , , ,  and % provide access to the fields values. C-structsA  can hold six records of any # types a, b, c, d, e and f. It is itself an instance of # and can be used inside a $. The 8 constructor takes six arguments. The record functions , , ,  , ! and "% provide access to the fields values.  !"Create C structs from Haskell(c) Simon Plakolb, 2020MITs.plakolb@gmail.combeta Safe-Inferred #  !"#  !"%        !"#$%#&'((C-structs-0.2.0.3-ANaecWbywh4BDkPdejbKx2Foreign.C.StructsForeign.C.Structs.UtilsForeign.C.Structs.TemplatesForeign.C.Structs.TypessizeofnextfmaxstructTacsStruct2s21sts22ndStruct3s31sts32nds33rdStruct4s41sts42nds43rds44thStruct5s51sts52nds53rds54ths55thStruct6s61sts62nds63rds64ths65ths66thbaseForeign.StorableStorableGHC.PtrPtr