drasil-website-0.1.0.0: Using the Drasil generators to create Drasil's website
Safe HaskellNone
LanguageHaskell2010

Drasil.Website.CaseStudy

Description

Case Studies table for the different choices available when generating code from Drasil. To be used in the Drasil website.

Synopsis

Case Studies Section

caseStudySec :: Section Source #

Creates the Case Study Section.

caseStudiesTitle :: String Source #

Section title.

caseStudiesDesc :: String Source #

Section description.

legendIntro :: String Source #

Introduce the Case Study Table Legend as a list.

mkCaseTable :: RawContent Source #

Creates the Case Study Table

Manipulating info from Example -> CaseStudy

After taking the information about the examples from Example.hs, convert each example into its own case study.

data CaseStudy Source #

Holds individual case studies. System info may not be needed, but it is still nice to keep around for now.

Constructors

CS 

Fields

mkCaseStudy :: Example -> [CaseStudy] Source #

Converts a list of examples into a list of CaseStudies. Currently, projectile is the only one that has more than one set of choices, so we take the naming scheme from there.

Display CaseStudy Information as a Table

We first need the helper functions to convert Choices into a displayable format (as a Sentence). Those are defined in the section below to reduce clutter. Then we make the header row, table body, and helper for the table body functions.

headerRow :: [Sentence] Source #

Hardcoded header row for the Case studies table

tableBody :: [CaseStudy] -> [[Sentence]] Source #

Creates the case study table body.

displayCS :: CaseStudy -> [Sentence] Source #

Converts a case study into a table row for easy display.

Case Studies Table Legend

Next, we need the legend to explain the Case Studies Table. These functions are essentially hard-coded and also defined below.

data CSLegend Source #

Each entry for the case studies table legend. The title should be the same as the header.

Constructors

CSL 

Fields

caseStudyLegend :: RawContent Source #

Make the legend for the case study table as a list.

mkLegendListFunc :: CSLegend -> ItemType Source #

Helper to convert the Case Study legends into list items.

mkTandDSent :: (String, String) -> ItemType Source #

Should eventually take Sentences instead of Strings. Converts into the format of "symbol - definition".

caseStudyTitle :: String Source #

Case Study Table column headers.

modularityTitle :: String Source #

Case Study Table column headers.

implementTypeTitle :: String Source #

Case Study Table column headers.

loggingTitle :: String Source #

Case Study Table column headers.

inStructTitle :: String Source #

Case Study Table column headers.

conStructTitle :: String Source #

Case Study Table column headers.

conRepTitle :: String Source #

Case Study Table column headers.

realNumRepTitle :: String Source #

Case Study Table column headers.

legendEntries :: [CSLegend] Source #

Case study legend entries.

modularityLegend :: CSLegend Source #

Modularity or Separation of software.

implementationTypeLegend :: CSLegend Source #

Software implementation type.

loggingLegend :: CSLegend Source #

Compiler logging statements.

inputStrLegend :: CSLegend Source #

Input value structure.

conStrLegend :: CSLegend Source #

Constant value structure.

conRepLegend :: CSLegend Source #

Constant value representation.

realNumRepLegend :: CSLegend Source #

Real number representation.

Helper functions to create the case study table rows.

These functions act like a version of show for each different type of Choices, but tweaked to fit inside a table.