Commit 0cfef5e2 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Add synopsis field to the installed package info

The description is already included. The one-line synopsis should be
there too. Note that this is an API change that will affect compilers.
parent 66d58fde
......@@ -98,6 +98,7 @@ data InstalledPackageInfo_ m
stability :: String,
homepage :: String,
pkgUrl :: String,
synopsis :: String,
description :: String,
category :: String,
-- these parts are required by an installed package only:
......@@ -139,6 +140,7 @@ emptyInstalledPackageInfo
stability = "",
homepage = "",
pkgUrl = "",
synopsis = "",
description = "",
category = "",
exposed = False,
......@@ -214,6 +216,9 @@ basicFieldDescrs =
, simpleField "package-url"
showFreeText parseFreeText
pkgUrl (\val pkg -> pkg{pkgUrl=val})
, simpleField "synopsis"
showFreeText parseFreeText
synopsis (\val pkg -> pkg{synopsis=val})
, simpleField "description"
showFreeText parseFreeText
description (\val pkg -> pkg{description=val})
......
......@@ -104,6 +104,7 @@ toCurrent ipi@InstalledPackageInfo{} = Current.InstalledPackageInfo {
Current.stability = stability ipi,
Current.homepage = homepage ipi,
Current.pkgUrl = pkgUrl ipi,
Current.synopsis = "",
Current.description = description ipi,
Current.category = category ipi,
Current.exposed = exposed ipi,
......
......@@ -139,6 +139,7 @@ toCurrent ipi@InstalledPackageInfo{} = Current.InstalledPackageInfo {
Current.stability = stability ipi,
Current.homepage = homepage ipi,
Current.pkgUrl = pkgUrl ipi,
Current.synopsis = "",
Current.description = description ipi,
Current.category = category ipi,
Current.exposed = exposed ipi,
......
......@@ -269,6 +269,7 @@ generalInstalledPackageInfo adjustRelIncDirs pkg lib clbi installDirs =
IPI.stability = stability pkg,
IPI.homepage = homepage pkg,
IPI.pkgUrl = pkgUrl pkg,
IPI.synopsis = synopsis pkg,
IPI.description = description pkg,
IPI.category = category pkg,
IPI.exposed = libExposed lib,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment