21 | %hide Data.Vect.fromList
48 | ||| This is a concrete instance for Naperian containers
49 | ||| It applies also to `s=Fin n` which is covered by Vect
50 | ||| We therefore want this to only be applied if Vect isn't
51 | %defaulthint
75 | ||| For recursive types we need to extract out the conversion functions
115 | -- public export
116 | -- test : {n : Nat} -> IsConcrete (Vect n)
117 | -- test = MkIsConcrete
118 | -- (Vect n)
119 | -- (%search)
120 | -- (fromVect)
121 | -- (toVect)
240 | ||| Requires making a choice of traversal order
241 | ||| Is there a good reason to prefer a particular order?
254 | -- old
255 | -- ||| Indexing an element of `xs` and then applying `f` to it is the same as
256 | -- ||| mapping `f` over xs, and then indexing the result
257 | -- public export
258 | -- mapIndexPreserve : {0 f : a -> b} ->
259 | -- (xs : List a) ->
260 | -- (i : Fin (length (f <$> xs))) ->
261 | -- f (index' xs (rewrite sym (lengthMap {f=f} xs) in i))
262 | -- = index' (f <$> xs) i
263 | -- mapIndexPreserve (x :: xs) FZ = Refl
264 | -- mapIndexPreserve (x :: xs) (FS j) = mapIndexPreserve xs j