Switch from markdown comments to hidden fences

This commit is contained in:
Nathan McCarty 2025-01-27 04:55:07 -05:00
parent 32a8c6bd43
commit 24285db686
17 changed files with 94 additions and 94 deletions

View file

@ -6,11 +6,11 @@ module Util.Digits
import Data.Monoid.Exponentiation
```
<!-- idris
```idris hide
import System
%default total
-->
```
This module provides views and associated functionality for treating `Integers`
as if they were lists of numbers.
@ -22,10 +22,10 @@ teaching purposes, we'll do it here, but please consider a library like
[prim](https://github.com/stefan-hoeck/idris2-prim) if you find yourself needing
to prove properties about primitive types.
<!-- idris
```idris hide
-- This mutual block isn't strictly required, but is useful for literate purposes
mutual
-->
```
## Primitive functionality
@ -50,14 +50,14 @@ most significant digit.
For a clarifying example:
<!-- idris
```idris hide
-- @@test Ascending Digits Example
ascendingExample : IO Bool
ascendingExample = do
putStrLn "Expecting: \{show [5, 4, 3, 2, 1]}"
putStrLn "Got: \{show . ascList $ ascending 12345}"
pure $
-->
```
```idris
ascList (ascending 12345) == [5, 4, 3, 2, 1]
@ -121,14 +121,14 @@ least significant digit.
For a clarifying example:
<!-- idris
```idris hide
-- @@test Descending Digits Example
descendingExample : IO Bool
descendingExample = do
putStrLn "Expecting: \{show [1, 2, 3, 4, 5]}"
putStrLn "Got: \{show . decList $ descending 12345}"
pure $
-->
```
```idris
decList (descending 12345) == [1, 2, 3, 4, 5]

View file

@ -36,7 +36,7 @@ data Level : Type where
Other : (n : Nat) -> {auto _ : n `GT` 4} -> Level
```
<!-- idris
```idris hide
export
levelToNat : Level -> Nat
levelToNat Err = 0
@ -67,7 +67,7 @@ export infixl 8 >+
export
(>+) : Level -> Nat -> Level
(>+) x k = natToLevel (k + levelToNat x)
-->
```
Convert a `Level` into a colorized tag