diff options
Diffstat (limited to 'dhall')
| -rw-r--r-- | dhall/stories.dhall | 47 | ||||
| -rw-r--r-- | dhall/types/Story.dhall | 5 | ||||
| -rw-r--r-- | dhall/types/StoryStep.dhall | 3 | ||||
| -rw-r--r-- | dhall/types/package.dhall | 2 |
4 files changed, 57 insertions, 0 deletions
diff --git a/dhall/stories.dhall b/dhall/stories.dhall new file mode 100644 index 0000000..8900269 --- /dev/null +++ b/dhall/stories.dhall @@ -0,0 +1,47 @@ +let xesite = ./types/package.dhall + +let Prelude = ./Prelude.dhall + +let Story = xesite.Story + +let Step = xesite.StoryStep + +let stories = + [ Story::{ + , name = "unwrapped-2022" + , steps = + [ Step::{ + , file = "title" + , title = "Xesite 2022" + , text = "The last year all wrapped up!" + } + , Step::{ + , file = "posts" + , title = "Blogposts" + , text = "Xe wrote \$NUMBER posts this year!" + } + , Step::{ + , file = "talks" + , title = "Talks" + , text = "Xe gave 4 talks this year! Which one was your favorite?" + } + , Step::{ + , file = "commits" + , title = "340 commits" + , text = "There were 340 commits to Xesite this year!" + } + ] + } + ] + +let storyToMapValue = + \(story : Story.Type) -> { mapKey = story.name, mapValue = story } + +let map = + Prelude.List.map + Story.Type + (Prelude.Map.Entry Text Story.Type) + storyToMapValue + stories + +in { stories, map } diff --git a/dhall/types/Story.dhall b/dhall/types/Story.dhall new file mode 100644 index 0000000..1f11a2e --- /dev/null +++ b/dhall/types/Story.dhall @@ -0,0 +1,5 @@ +let Step = ./StoryStep.dhall + +in { Type = { name : Text, steps : List Step.Type } + , default = { name = "", steps = [] : List Step.Type } + } diff --git a/dhall/types/StoryStep.dhall b/dhall/types/StoryStep.dhall new file mode 100644 index 0000000..3c7ac4f --- /dev/null +++ b/dhall/types/StoryStep.dhall @@ -0,0 +1,3 @@ +{ Type = { file : Text, title : Text, text : Text } +, default = { file = "", text = "", title = "" } +} diff --git a/dhall/types/package.dhall b/dhall/types/package.dhall index 4f4166e..75abd4a 100644 --- a/dhall/types/package.dhall +++ b/dhall/types/package.dhall @@ -10,5 +10,7 @@ , Salary = ./Salary.dhall , SeriesDescription = ./SeriesDescription.dhall , Stock = ./Stock.dhall +, Story = ./Story.dhall +, StoryStep = ./StoryStep.dhall , StockKind = ./StockKind.dhall } |
