0 | module Evince.Async.Hoist
6 | hoistTree : ({0 x : Type} -> f x -> g x) -> SpecTree f a -> SpecTree g a
7 | hoistTree nt (Describe label children) = Describe label (hoistTrees nt children)
8 | hoistTree nt (It label loc test) = It label loc (\res => nt (test res))
9 | hoistTree nt (Pending label reason) = Pending label reason
10 | hoistTree nt (Focused t) = Focused (hoistTree nt t)
11 | hoistTree nt (WithCleanup cleanup children) = WithCleanup (nt cleanup) (hoistTrees nt children)
13 | hoistTrees : ({0 x : Type} -> f x -> g x) -> List (SpecTree f a) -> List (SpecTree g a)
14 | hoistTrees nt [] = []
15 | hoistTrees nt (t :: ts) = hoistTree nt t :: hoistTrees nt ts
21 | hoistSpec : ({0 x : Type} -> f x -> g x) -> Spec f a b -> Spec g a b
22 | hoistSpec nt (MkSpec trees x) = MkSpec (map (hoistTree nt) trees) x