buildInfoD :: Maybe FilePath -> [ModuleName] -> Int -> [(Text,FieldDescription PackageDescriptionEd)]
buildInfoD fp modules i = [
    ((T.pack $ printf (__ "%s Build Info") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "Component is buildable here") $ emptyParams)
            (buildable . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{buildable = a})})
            boolEditor
    ,   mkField
            (paraName  <<<- ParaName
                (__ "Where to look for the source hierarchy")
                $ paraSynopsis <<<- ParaSynopsis
                    (__ "Root directories for the source hierarchy.")
                    $ paraShadow  <<<- ParaShadow ShadowIn
                        $ paraDirection  <<<- ParaDirection Vertical
                            $ paraMinSize <<<- ParaMinSize (-1,150)
                                $ emptyParams)
            (hsSourceDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{hsSourceDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select folder"))
    ,   mkField
            (paraName <<<- ParaName (__ "Non-exposed or non-main modules")
            $ paraSynopsis <<<- ParaSynopsis
                                       (__ "A list of modules used by the component but not exposed to users.")
                $ paraShadow <<<- ParaShadow ShadowIn
                    $ paraDirection <<<- ParaDirection Vertical
                        $ paraMinSize <<<- ParaMinSize (-1,300)
                            $ paraPack <<<- ParaPack PackGrow
                                $ emptyParams)
            (map (T.pack . display) . otherModules . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi ->
                bi{otherModules = (map (\i -> forceJust (simpleParse $ T.unpack i)
                "   PackageEditor >> buildInfoD: no parse for moduile name" ) a)})})
            (modulesEditor modules)
    ]),
    ((T.pack $ printf (__ "%s Compiler ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName  <<<- ParaName (__ "Options for haskell compilers")
            $ paraDirection <<<- ParaDirection Vertical
            $ paraShadow <<<- ParaShadow ShadowIn
            $ paraPack <<<- ParaPack PackGrow $ emptyParams)
            (options . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{options = a})})
            (multisetEditor
                (ColumnDescr True [( (__ "Compiler Flavor"),\(cv,_) -> [cellText := T.pack $ show cv])
                                   ,( (__ "Options"),\(_,op) -> [cellText := T.pack $ concatMap (\s -> ' ' : s) op])])
                ((pairEditor
                    (compilerFlavorEditor,emptyParams)
                    (optsEditor,emptyParams)),
                        (paraDirection <<<- ParaDirection Vertical
                            $ paraShadow  <<<- ParaShadow ShadowIn $ emptyParams))
                Nothing
                Nothing)
#if MIN_VERSION_Cabal(1,22,0)
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when built with profiling")
           $ emptyParams)
            (profOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{profOptions = a})})
            compilerOptsEditor
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when the package is built as shared library")
           $ emptyParams)
            (sharedOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{sharedOptions = a})})
            compilerOptsEditor
#else
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when built with profiling")
           $ emptyParams)
            (ghcProfOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ghcProfOptions = a})})
            optsEditor
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when the package is built as shared library")
           $ emptyParams)
            (ghcSharedOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ghcSharedOptions = a})})
            optsEditor
#endif
    ]),
    ((T.pack $ printf (__ "%s Extensions ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName  <<<- ParaName (__ "Extensions")
                $ paraSynopsis  <<<- ParaSynopsis
                    (__ "A list of Haskell extensions used by every module.")
                         $ paraMinSize <<<- ParaMinSize (-1,400)
                            $ paraPack <<<- ParaPack PackGrow
                                $ emptyParams)
            (oldExtensions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{oldExtensions = a})})
            extensionsEditor
    ]),
    ((T.pack $ printf (__ "%s Build Tools ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "Tools needed for a build")
                $ paraDirection <<<- ParaDirection Vertical
                    $ paraMinSize <<<- ParaMinSize (-1,120)
                        $ emptyParams)
            (buildTools . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{buildTools = a})})
            (dependenciesEditor [])
    ]),
    ((T.pack $ printf (__ "%s Pkg Config ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "A list of pkg-config packages, needed to build this package")
                $ paraDirection <<<- ParaDirection Vertical
                    $ paraMinSize <<<- ParaMinSize (-1,120)
                        $ emptyParams)
            (pkgconfigDepends . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{pkgconfigDepends = a})})
            (dependenciesEditor [])
    ]),
    ((T.pack $ printf (__ "%s Opts C -1-") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "Options for C compiler")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (ccOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ccOptions = a})})
            optsEditor
    ,    mkField
            (paraName <<<- ParaName (__ "Options for linker")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (ldOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ldOptions = a})})
            optsEditor
    ,    mkField
            (paraName <<<- ParaName (__ "A list of header files to use when compiling")
                $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . includes . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{includes = map T.unpack a})})
            (textsEditor (const True) True)
     ,   mkField
            (paraName <<<- ParaName (__ "A list of header files to install")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (installIncludes . (\a -> a !! i) . bis)
             (\ a b -> b{bis = update (bis b) i (\bi -> bi{installIncludes = a})})
           (filesEditor fp FileChooserActionOpen (__ "Select File"))
    ]),
    ((T.pack $ printf (__ "%s Opts C -2-") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "A list of directories to search for header files")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (includeDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{includeDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select Folder"))
     ,   mkField
            (paraName <<<- ParaName
                (__ "A list of C source files to be compiled,linked with the Haskell files.")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (cSources . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{cSources = a})})
            (filesEditor fp FileChooserActionOpen (__ "Select file"))
    ]),
    ((T.pack $ printf (__ "%s Opts Libs ") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "A list of extra libraries to link with")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . extraLibs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{extraLibs = map T.unpack a})})
            (textsEditor (const True) True)
     ,   mkField
            (paraName <<<- ParaName (__ "A list of directories to search for libraries.")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (extraLibDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{extraLibDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select Folder"))
   ]),
    ((T.pack $ printf (__ "%s Other") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "Options for C preprocessor")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (cppOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{cppOptions = a})})
            optsEditor
    ,   mkField
            (paraName <<<- ParaName (__ "Support frameworks for Mac OS X")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . frameworks . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{frameworks = map T.unpack a})})
            (textsEditor (const True) True)
    ,   mkField
            (paraName <<<- ParaName (__ "Custom fields build info")
                $ paraShadow <<<- ParaShadow ShadowIn
                    $ paraMinSize <<<- ParaMinSize (-1,150)
                        $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
             (customFieldsBI . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{customFieldsBI = a})})
            (multisetEditor
                (ColumnDescr True [((__ "Name"),\(n,_) -> [cellText := T.pack n])
                                   ,((__ "Value"),\(_,v) -> [cellText := T.pack v])])
                ((pairEditor
                    (stringxEditor (const True),emptyParams)
                    (stringEditor (const True) True,emptyParams)),emptyParams)
            Nothing
            Nothing)
            ])]
buildInfoD :: Maybe FilePath -> [ModuleName] -> Int -> [(Text,FieldDescription PackageDescriptionEd)]
buildInfoD fp modules i = [
    ((T.pack $ printf (__ "%s Build Info") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "Component is buildable here") $ emptyParams)
            (buildable . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{buildable = a})})
            boolEditor
    ,   mkField
            (paraName  <<<- ParaName
                (__ "Where to look for the source hierarchy")
                $ paraSynopsis <<<- ParaSynopsis
                    (__ "Root directories for the source hierarchy.")
                    $ paraShadow  <<<- ParaShadow ShadowIn
                        $ paraDirection  <<<- ParaDirection Vertical
                            $ paraMinSize <<<- ParaMinSize (-1,150)
                                $ emptyParams)
            (hsSourceDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{hsSourceDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select folder"))
    ,   mkField
            (paraName <<<- ParaName (__ "Non-exposed or non-main modules")
            $ paraSynopsis <<<- ParaSynopsis
                                       (__ "A list of modules used by the component but not exposed to users.")
                $ paraShadow <<<- ParaShadow ShadowIn
                    $ paraDirection <<<- ParaDirection Vertical
                        $ paraMinSize <<<- ParaMinSize (-1,300)
                            $ paraPack <<<- ParaPack PackGrow
                                $ emptyParams)
            (map (T.pack . display) . otherModules . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi ->
                bi{otherModules = (map (\i -> forceJust (simpleParse $ T.unpack i)
                "   PackageEditor >> buildInfoD: no parse for moduile name" ) a)})})
            (modulesEditor modules)
    ]),
    ((T.pack $ printf (__ "%s Compiler ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName  <<<- ParaName (__ "Options for haskell compilers")
            $ paraDirection <<<- ParaDirection Vertical
            $ paraShadow <<<- ParaShadow ShadowIn
            $ paraPack <<<- ParaPack PackGrow $ emptyParams)
            (options . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{options = a})})
            (multisetEditor
                (ColumnDescr True [( (__ "Compiler Flavor"),\(cv,_) -> [cellText := T.pack $ show cv])
                                   ,( (__ "Options"),\(_,op) -> [cellText := T.pack $ concatMap (\s -> ' ' : s) op])])
                ((pairEditor
                    (compilerFlavorEditor,emptyParams)
                    (optsEditor,emptyParams)),
                        (paraDirection <<<- ParaDirection Vertical
                            $ paraShadow  <<<- ParaShadow ShadowIn $ emptyParams))
                Nothing
                Nothing)
#if MIN_VERSION_Cabal(1,22,0)
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when built with profiling")
           $ emptyParams)
            (profOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{profOptions = a})})
            compilerOptsEditor
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when the package is built as shared library")
           $ emptyParams)
            (sharedOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{sharedOptions = a})})
            compilerOptsEditor
#else
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when built with profiling")
           $ emptyParams)
            (ghcProfOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ghcProfOptions = a})})
            optsEditor
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when the package is built as shared library")
           $ emptyParams)
            (ghcSharedOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ghcSharedOptions = a})})
            optsEditor
#endif
    ]),
    ((T.pack $ printf (__ "%s Extensions ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName  <<<- ParaName (__ "Extensions")
                $ paraSynopsis  <<<- ParaSynopsis
                    (__ "A list of Haskell extensions used by every module.")
                         $ paraMinSize <<<- ParaMinSize (-1,400)
                            $ paraPack <<<- ParaPack PackGrow
                                $ emptyParams)
            (oldExtensions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{oldExtensions = a})})
            extensionsEditor
    ]),
    ((T.pack $ printf (__ "%s Build Tools ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "Tools needed for a build")
                $ paraDirection <<<- ParaDirection Vertical
                    $ paraMinSize <<<- ParaMinSize (-1,120)
                        $ emptyParams)
            (buildTools . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{buildTools = a})})
            (dependenciesEditor [])
    ]),
    ((T.pack $ printf (__ "%s Pkg Config ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "A list of pkg-config packages, needed to build this package")
                $ paraDirection <<<- ParaDirection Vertical
                    $ paraMinSize <<<- ParaMinSize (-1,120)
                        $ emptyParams)
            (pkgconfigDepends . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{pkgconfigDepends = a})})
            (dependenciesEditor [])
    ]),
    ((T.pack $ printf (__ "%s Opts C -1-") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "Options for C compiler")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (ccOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ccOptions = a})})
            optsEditor
    ,    mkField
            (paraName <<<- ParaName (__ "Options for linker")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (ldOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ldOptions = a})})
            optsEditor
    ,    mkField
            (paraName <<<- ParaName (__ "A list of header files to use when compiling")
                $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . includes . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{includes = map T.unpack a})})
            (textsEditor (const True) True)
     ,   mkField
            (paraName <<<- ParaName (__ "A list of header files to install")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (installIncludes . (\a -> a !! i) . bis)
             (\ a b -> b{bis = update (bis b) i (\bi -> bi{installIncludes = a})})
           (filesEditor fp FileChooserActionOpen (__ "Select File"))
    ]),
    ((T.pack $ printf (__ "%s Opts C -2-") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "A list of directories to search for header files")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (includeDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{includeDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select Folder"))
     ,   mkField
            (paraName <<<- ParaName
                (__ "A list of C source files to be compiled,linked with the Haskell files.")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (cSources . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{cSources = a})})
            (filesEditor fp FileChooserActionOpen (__ "Select file"))
    ]),
    ((T.pack $ printf (__ "%s Opts Libs ") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "A list of extra libraries to link with")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . extraLibs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{extraLibs = map T.unpack a})})
            (textsEditor (const True) True)
     ,   mkField
            (paraName <<<- ParaName (__ "A list of directories to search for libraries.")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (extraLibDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{extraLibDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select Folder"))
   ]),
    ((T.pack $ printf (__ "%s Other") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "Options for C preprocessor")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (cppOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{cppOptions = a})})
            optsEditor
    ,   mkField
            (paraName <<<- ParaName (__ "Support frameworks for Mac OS X")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . frameworks . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{frameworks = map T.unpack a})})
            (textsEditor (const True) True)
    ,   mkField
            (paraName <<<- ParaName (__ "Custom fields build info")
                $ paraShadow <<<- ParaShadow ShadowIn
                    $ paraMinSize <<<- ParaMinSize (-1,150)
                        $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
             (customFieldsBI . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{customFieldsBI = a})})
            (multisetEditor
                (ColumnDescr True [((__ "Name"),\(n,_) -> [cellText := T.pack n])
                                   ,((__ "Value"),\(_,v) -> [cellText := T.pack v])])
                ((pairEditor
                    (stringxEditor (const True),emptyParams)
                    (stringEditor (const True) True,emptyParams)),emptyParams)
            Nothing
            Nothing)
            ])]
buildInfoD fp modules i = [
    ((T.pack $ printf (__ "%s Build Info") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "Component is buildable here") $ emptyParams)
            (buildable . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{buildable = a})})
            boolEditor
    ,   mkField
            (paraName  <<<- ParaName
                (__ "Where to look for the source hierarchy")
                $ paraSynopsis <<<- ParaSynopsis
                    (__ "Root directories for the source hierarchy.")
                    $ paraShadow  <<<- ParaShadow ShadowIn
                        $ paraDirection  <<<- ParaDirection Vertical
                            $ paraMinSize <<<- ParaMinSize (-1,150)
                                $ emptyParams)
            (hsSourceDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{hsSourceDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select folder"))
    ,   mkField
            (paraName <<<- ParaName (__ "Non-exposed or non-main modules")
            $ paraSynopsis <<<- ParaSynopsis
                                       (__ "A list of modules used by the component but not exposed to users.")
                $ paraShadow <<<- ParaShadow ShadowIn
                    $ paraDirection <<<- ParaDirection Vertical
                        $ paraMinSize <<<- ParaMinSize (-1,300)
                            $ paraPack <<<- ParaPack PackGrow
                                $ emptyParams)
            (map (T.pack . display) . otherModules . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi ->
                bi{otherModules = (map (\i -> forceJust (simpleParse $ T.unpack i)
                "   PackageEditor >> buildInfoD: no parse for moduile name" ) a)})})
            (modulesEditor modules)
    ]),
    ((T.pack $ printf (__ "%s Compiler ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName  <<<- ParaName (__ "Options for haskell compilers")
            $ paraDirection <<<- ParaDirection Vertical
            $ paraShadow <<<- ParaShadow ShadowIn
            $ paraPack <<<- ParaPack PackGrow $ emptyParams)
            (options . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{options = a})})
            (multisetEditor
                (ColumnDescr True [( (__ "Compiler Flavor"),\(cv,_) -> [cellText := T.pack $ show cv])
                                   ,( (__ "Options"),\(_,op) -> [cellText := T.pack $ concatMap (\s -> ' ' : s) op])])
                ((pairEditor
                    (compilerFlavorEditor,emptyParams)
                    (optsEditor,emptyParams)),
                        (paraDirection <<<- ParaDirection Vertical
                            $ paraShadow  <<<- ParaShadow ShadowIn $ emptyParams))
                Nothing
                Nothing)
#if MIN_VERSION_Cabal(1,22,0)
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when built with profiling")
           $ emptyParams)
            (profOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{profOptions = a})})
            compilerOptsEditor
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when the package is built as shared library")
           $ emptyParams)
            (sharedOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{sharedOptions = a})})
            compilerOptsEditor
#else
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when built with profiling")
           $ emptyParams)
            (ghcProfOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ghcProfOptions = a})})
            optsEditor
     ,  mkField
            (paraName <<<- ParaName (__ "Additional options for GHC when the package is built as shared library")
           $ emptyParams)
            (ghcSharedOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ghcSharedOptions = a})})
            optsEditor
#endif
    ]),
    ((T.pack $ printf (__ "%s Extensions ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName  <<<- ParaName (__ "Extensions")
                $ paraSynopsis  <<<- ParaSynopsis
                    (__ "A list of Haskell extensions used by every module.")
                         $ paraMinSize <<<- ParaMinSize (-1,400)
                            $ paraPack <<<- ParaPack PackGrow
                                $ emptyParams)
            (oldExtensions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{oldExtensions = a})})
            extensionsEditor
    ]),
    ((T.pack $ printf (__ "%s Build Tools ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "Tools needed for a build")
                $ paraDirection <<<- ParaDirection Vertical
                    $ paraMinSize <<<- ParaMinSize (-1,120)
                        $ emptyParams)
            (buildTools . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{buildTools = a})})
            (dependenciesEditor [])
    ]),
    ((T.pack $ printf (__ "%s Pkg Config ") (show (i + 1))), VFD emptyParams [
        mkField
            (paraName <<<- ParaName (__ "A list of pkg-config packages, needed to build this package")
                $ paraDirection <<<- ParaDirection Vertical
                    $ paraMinSize <<<- ParaMinSize (-1,120)
                        $ emptyParams)
            (pkgconfigDepends . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{pkgconfigDepends = a})})
            (dependenciesEditor [])
    ]),
    ((T.pack $ printf (__ "%s Opts C -1-") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "Options for C compiler")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (ccOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ccOptions = a})})
            optsEditor
    ,    mkField
            (paraName <<<- ParaName (__ "Options for linker")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (ldOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{ldOptions = a})})
            optsEditor
    ,    mkField
            (paraName <<<- ParaName (__ "A list of header files to use when compiling")
                $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . includes . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{includes = map T.unpack a})})
            (textsEditor (const True) True)
     ,   mkField
            (paraName <<<- ParaName (__ "A list of header files to install")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (installIncludes . (\a -> a !! i) . bis)
             (\ a b -> b{bis = update (bis b) i (\bi -> bi{installIncludes = a})})
           (filesEditor fp FileChooserActionOpen (__ "Select File"))
    ]),
    ((T.pack $ printf (__ "%s Opts C -2-") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "A list of directories to search for header files")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (includeDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{includeDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select Folder"))
     ,   mkField
            (paraName <<<- ParaName
                (__ "A list of C source files to be compiled,linked with the Haskell files.")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (cSources . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{cSources = a})})
            (filesEditor fp FileChooserActionOpen (__ "Select file"))
    ]),
    ((T.pack $ printf (__ "%s Opts Libs ") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "A list of extra libraries to link with")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . extraLibs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{extraLibs = map T.unpack a})})
            (textsEditor (const True) True)
     ,   mkField
            (paraName <<<- ParaName (__ "A list of directories to search for libraries.")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (extraLibDirs . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{extraLibDirs = a})})
            (filesEditor fp FileChooserActionSelectFolder (__ "Select Folder"))
   ]),
    ((T.pack $ printf (__ "%s Other") (show (i + 1))), VFD emptyParams [
         mkField
            (paraName <<<- ParaName (__ "Options for C preprocessor")
                $ paraDirection <<<- ParaDirection Vertical
                    $ emptyParams)
            (cppOptions . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{cppOptions = a})})
            optsEditor
    ,   mkField
            (paraName <<<- ParaName (__ "Support frameworks for Mac OS X")
                $ paraMinSize <<<- ParaMinSize (-1,150)
                    $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
            (map T.pack . frameworks . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{frameworks = map T.unpack a})})
            (textsEditor (const True) True)
    ,   mkField
            (paraName <<<- ParaName (__ "Custom fields build info")
                $ paraShadow <<<- ParaShadow ShadowIn
                    $ paraMinSize <<<- ParaMinSize (-1,150)
                        $ paraDirection <<<- ParaDirection Vertical $ emptyParams)
             (customFieldsBI . (\a -> a !! i) . bis)
            (\ a b -> b{bis = update (bis b) i (\bi -> bi{customFieldsBI = a})})
            (multisetEditor
                (ColumnDescr True [((__ "Name"),\(n,_) -> [cellText := T.pack n])
                                   ,((__ "Value"),\(_,v) -> [cellText := T.pack v])])
                ((pairEditor
                    (stringxEditor (const True),emptyParams)
                    (stringEditor (const True) True,emptyParams)),emptyParams)
            Nothing
            Nothing)
            ])]