Skip to content

Moved PackageData and package to new file#4750

Open
B-rando1 wants to merge 1 commit intomainfrom
separatePackageStuff
Open

Moved PackageData and package to new file#4750
B-rando1 wants to merge 1 commit intomainfrom
separatePackageStuff

Conversation

@B-rando1
Copy link
Collaborator

Closes #4708

I think I've convinced myself that this is the right change to make. The resulting PackageData file looks a bit odd to me, I think because putting the PackageData type in the same file as package illuminates how the abstract representation of PackageData is only ever concretized in a single way. But maybe it's good that it sticks out, it forces us to consider if this is the best way to express that data structure.

At any rate, this will help with #4653, since we can't separate the SoftwareDossier-related functionality while Package-related functionality is in the same files.

import Drasil.GOOL (ProgData, onCodeList)

-- | The underlying data type for packages in all renderers.
data PackageData a = PackD {packageProg :: a, packageAux :: [FileAndContents]}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we only just added the type parameter in #4643 (to remove an import of ProgData from Drasil.GOOL), but since we need ProgData anyway for package, it might make sense to take it out and have packageProg :: ProgData. I tried this locally; it was very easy and didn't affect the imports at all.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Copy link
Owner

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, but since you're going to need to do a merge anyways, might as well also make this change.

import Drasil.GOOL (ProgData, onCodeList)

-- | The underlying data type for packages in all renderers.
data PackageData a = PackD {packageProg :: a, packageAux :: [FileAndContents]}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract "Package"-related functionality into a common file

2 participants