@@ -245,19 +245,21 @@ data ForeignLibrarySection = ForeignLibrarySection {
245
245
foreignLibrarySectionType :: Last String
246
246
, foreignLibrarySectionLibVersionInfo :: Last String
247
247
, foreignLibrarySectionOptions :: Maybe (List String )
248
+ , foreignLibrarySectionModDefFile :: Last String
248
249
, foreignLibrarySectionOtherModules :: Maybe (List Module )
249
250
, foreignLibrarySectionGeneratedOtherModules :: Maybe (List Module )
250
251
} deriving (Eq , Show , Generic , FromValue )
251
252
252
253
instance Monoid ForeignLibrarySection where
253
- mempty = ForeignLibrarySection mempty mempty Nothing Nothing Nothing
254
+ mempty = ForeignLibrarySection mempty mempty Nothing mempty Nothing Nothing
254
255
mappend = (<>)
255
256
256
257
instance Semigroup ForeignLibrarySection where
257
258
a <> b = ForeignLibrarySection {
258
259
foreignLibrarySectionType = foreignLibrarySectionType a <> foreignLibrarySectionType b
259
260
, foreignLibrarySectionLibVersionInfo = foreignLibrarySectionLibVersionInfo a <> foreignLibrarySectionLibVersionInfo b
260
261
, foreignLibrarySectionOptions = foreignLibrarySectionOptions a <> foreignLibrarySectionOptions b
262
+ , foreignLibrarySectionModDefFile = foreignLibrarySectionModDefFile a <> foreignLibrarySectionModDefFile b
261
263
, foreignLibrarySectionOtherModules = foreignLibrarySectionOtherModules a <> foreignLibrarySectionOtherModules b
262
264
, foreignLibrarySectionGeneratedOtherModules = foreignLibrarySectionGeneratedOtherModules a <> foreignLibrarySectionGeneratedOtherModules b
263
265
}
@@ -1115,6 +1117,7 @@ data ForeignLibrary = ForeignLibrary {
1115
1117
foreignLibraryType :: Maybe String
1116
1118
, foreignLibraryLibVersionInfo :: Maybe String
1117
1119
, foreignLibraryOptions :: Maybe [String ]
1120
+ , foreignLibraryModDefFile :: Maybe String
1118
1121
, foreignLibraryOtherModules :: [Module ]
1119
1122
, foreignLibraryGeneratedModules :: [Module ]
1120
1123
} deriving (Eq , Show )
@@ -1600,7 +1603,7 @@ fromLibrarySectionPlain LibrarySection{..} = Library {
1600
1603
}
1601
1604
1602
1605
getMentionedForeignLibraryModules :: ForeignLibrarySection -> [Module ]
1603
- getMentionedForeignLibraryModules (ForeignLibrarySection _ _ _ otherModules generatedModules)=
1606
+ getMentionedForeignLibraryModules (ForeignLibrarySection _ _ _ _ otherModules generatedModules)=
1604
1607
fromMaybeList (otherModules <> generatedModules)
1605
1608
1606
1609
toForeignLibrary :: (MonadIO m , State m ) => FilePath -> String -> Section ForeignLibrarySection -> m (Section ForeignLibrary )
@@ -1613,6 +1616,7 @@ toForeignLibrary dir packageName_ =
1613
1616
(getLast foreignLibrarySectionType)
1614
1617
(getLast foreignLibrarySectionLibVersionInfo)
1615
1618
(fromList <$> foreignLibrarySectionOptions)
1619
+ (getLast foreignLibrarySectionModDefFile)
1616
1620
(otherModules ++ generatedModules)
1617
1621
generatedModules
1618
1622
)
0 commit comments