| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Costrings |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --guardedness #-} |
| 8 |
|
| 9 |
module Codata.Musical.Costring where |
| 10 |
|
| 11 |
open import Codata.Musical.Colist.Base as Colist using (Colist) |
| 12 |
open import Data.Char.Base using (Char) |
| 13 |
open import Data.String.Base as String using (String) |
| 14 |
open import Function.Base using (_∘_) |
| 15 |
|
| 16 |
-- Possibly infinite strings. |
| 17 |
|
| 18 |
Costring : Set |
| 19 |
Costring = Colist Char |
| 20 |
|
| 21 |
-- Methods |
| 22 |
|
| 23 |
toCostring : String → Costring |
| 24 |
toCostring = Colist.fromList ∘ String.toList |