Skip to content

Commit 3975639

Browse files
committed
Remove FST.induction in favor of sized types
1 parent 26029d7 commit 3975639

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

src/Lang/FST.agda

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ FST i = Rose i
5959

6060
fst-leaf = rose-leaf
6161

62-
induction : {A : 𝔸} {B : Set} (atoms A List B B) FST ∞ A B
63-
induction {A} {B} f n = go n [] where
64-
go : FST ∞ A List B B
65-
go (a -< [] >-) bs = f a (reverse bs)
66-
go (a -< c ∷ cs >-) bs = go (a -< cs >-) (go c [] ∷ bs)
67-
6862
{-|
6963
Equality relation that determines when to FST nodes
7064
should be composed: Exactly if their atoms are equal.
@@ -821,12 +815,12 @@ module Impose (AtomSet : 𝔸) where
821815

822816
module Show (show-F : F String) (show-A : A String) where
823817
mutual
824-
show-FST : FSTA Lines
825-
show-FST = induction λ a children do
818+
show-FST : {i : Size} FSTA i Lines
819+
show-FST (a -< cs >-) = do
826820
> show-A a
827-
indent 2 (lines children)
821+
indent 2 (lines (map show-FST cs))
828822

829-
show-FSF : List (FSTA ) Lines
823+
show-FSF : {i : Size} List (FSTA i) Lines
830824
show-FSF roots = lines (map show-FST roots)
831825

832826
show-Feature : Feature Lines

0 commit comments

Comments
 (0)