| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Showing booleans |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Bool.Show where |
| 10 |
|
| 11 |
open import Data.Bool.Base using (Bool; false; true) |
| 12 |
open import Data.Char.Base using (Char) |
| 13 |
open import Data.String.Base using (String) |
| 14 |
|
| 15 |
show : Bool → String |
| 16 |
show true = "true" |
| 17 |
show false = "false" |
| 18 |
|
| 19 |
showBit : Bool → Char |
| 20 |
showBit true = '1' |
| 21 |
showBit false = '0' |