Skip to content

Commit 972b713

Browse files
committed
Correct exdown extraction to fix CI
1 parent a30cab7 commit 972b713

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

slides/Course03.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ lastv v1 v2 =
4949
(Beta, SemVer _ _ _) -> v2
5050
(SemVer x1 _ _, SemVer x2 _ _) | x1 < x2 -> v2
5151
(SemVer x1 y1 _, SemVer x2 y2 _) | x1 == x2 && y1 < y2 -> v2
52-
_ -> error "I'm too lazy"
52+
_ -> error "TODO"
5353

5454
data Sign = Negative | Zero | Positive
5555

@@ -89,14 +89,13 @@ instance Functor Tree where
8989
fmap f (Node x children) = Node (f x) (map (fmap f) children)
9090

9191

92-
-- | 'Word16' is a zero or positive number
93-
data Operation = Debit Word16 | Credit Word16
94-
92+
data Operation = Debit Int | Credit Int
93+
balance = undefined
9594

9695
wordCount :: [[String]] -> Int
9796
wordCount files = foldr (\words soFar -> (length words) + soFar) 0 files
9897

99-
balance' :: [Operation] -> Word16
98+
balance' :: [Operation] -> Int
10099
balance' = foldr (\op soFar -> toInt op + soFar) 0
101100
where
102101
toInt = \case Debit x -> -x; Credit x -> x

slides/course-03.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ instance Functor Tree where
287287
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
288288
```
289289

290-
<!-- exdown-skip 1 2 7 8 -->
290+
<!-- exdown-skip 1 2 5 6 -->
291291
```hs
292292
wordCount :: [[String]] -> Int
293293
wordCount files = undefined

slides/extract_hs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ do
1313
hs_module_name=${hs_module_name^} # Put first character uppercase
1414
f_hs="${hs_module_name}.hs"
1515
rm -Rf "$f_hs"
16+
echo "$EXDOWN -f hs $f > $f_hs"
1617
$EXDOWN -f hs $f > "$f_hs" || exit 1 # exdown is https://github.com/smelc/exdown
1718
echo "Written $f_hs"
1819
done

0 commit comments

Comments
 (0)