{-# LANGUAGE CPP                   #-}
{-# LANGUAGE DataKinds             #-}
{-# LANGUAGE FlexibleInstances     #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes            #-}
{-# LANGUAGE ScopedTypeVariables   #-}
{-# LANGUAGE TypeFamilies          #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.Vec.DataFamily.SpineStrict.Optics (
    -- * Indexing
    ix,
    _Cons,
    _head,
    _tail,
    -- * Conversions
    _Pull,
    _Vec,
    ) where

import Control.Applicative ((<$>))
import Data.Fin            (Fin (..))
import Data.Nat            (Nat (..))
import Prelude             (Functor (..), ($), (.))

import qualified Data.Fin      as F
import qualified Data.Type.Nat as N
import qualified Data.Vec.Pull as P
import qualified Optics.Core   as L

import Data.Vec.DataFamily.SpineStrict

-- $setup
-- >>> :set -XScopedTypeVariables
-- >>> import Prelude (Maybe (..), Char, Bool (..))
-- >>> import Optics.Core (over, view, set, (%), review, preview)
-- >>> import Data.Fin (Fin (..))
-- >>> import qualified Data.Type.Nat as N
-- >>> import Data.Vec.DataFamily.SpineStrict

type LensLikeVL f s t a b = (a -> f b) -> s -> f t
type LensLikeVL' f s a = LensLikeVL f s s a a

-------------------------------------------------------------------------------
-- Indexing
-------------------------------------------------------------------------------

-- | Match on non-empty 'Vec'.
--
-- /Note:/ @lens@ 'L._Cons' is a 'L.Prism'.
-- In fact, @'Vec' n a@ cannot have an instance of 'L.Cons' as types don't match.
--
_Cons :: L.Iso (Vec ('S n) a) (Vec ('S n) b) (a, Vec n a) (b, Vec n b)
_Cons :: Iso (Vec ('S n) a) (Vec ('S n) b) (a, Vec n a) (b, Vec n b)
_Cons = (Vec ('S n) a -> (a, Vec n a))
-> ((b, Vec n b) -> Vec ('S n) b)
-> Iso (Vec ('S n) a) (Vec ('S n) b) (a, Vec n a) (b, Vec n b)
forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
L.iso (\(x ::: xs) -> (a
x, Vec n a
xs)) (\(b
x, Vec n b
xs) -> b
x b -> Vec n b -> Vec ('S n) b
forall (n :: Nat) a. a -> Vec n a -> Vec ('S n) a
::: Vec n b
xs)

-- | Head lens. /Note:/ @lens@ 'L._head' is a 'L.Traversal''.
--
-- >>> view _head ('a' ::: 'b' ::: 'c' ::: VNil)
-- 'a'
--
-- >>> set _head 'x' ('a' ::: 'b' ::: 'c' ::: VNil)
-- 'x' ::: 'b' ::: 'c' ::: VNil
--
_head :: L.Lens' (Vec ('S n) a) a
_head :: Lens' (Vec ('S n) a) a
_head = LensVL (Vec ('S n) a) (Vec ('S n) a) a a -> Lens' (Vec ('S n) a) a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL LensVL (Vec ('S n) a) (Vec ('S n) a) a a
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL
{-# INLINE _head #-}

headVL :: Functor f => LensLikeVL' f (Vec ('S n) a) a
headVL :: LensLikeVL' f (Vec ('S n) a) a
headVL a -> f a
f (x ::: xs) = (a -> Vec n a -> Vec ('S n) a
forall (n :: Nat) a. a -> Vec n a -> Vec ('S n) a
::: Vec n a
xs) (a -> Vec ('S n) a) -> f a -> f (Vec ('S n) a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f a
f a
x
{-# INLINE headVL #-}

-- | Tail lens.
_tail :: L.Lens' (Vec ('S n) a) (Vec n a)
_tail :: Lens' (Vec ('S n) a) (Vec n a)
_tail = LensVL (Vec ('S n) a) (Vec ('S n) a) (Vec n a) (Vec n a)
-> Lens' (Vec ('S n) a) (Vec n a)
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL LensVL (Vec ('S n) a) (Vec ('S n) a) (Vec n a) (Vec n a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL
{-# INLINE _tail #-}

tailVL :: Functor f => LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL :: LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL Vec n a -> f (Vec n a)
f (x ::: xs) = (a
x a -> Vec n a -> Vec ('S n) a
forall (n :: Nat) a. a -> Vec n a -> Vec ('S n) a
:::) (Vec n a -> Vec ('S n) a) -> f (Vec n a) -> f (Vec ('S n) a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Vec n a -> f (Vec n a)
f Vec n a
xs
{-# INLINE tailVL #-}

-- | An 'I.Iso' from 'toPull' and 'fromPull'.
_Pull :: N.SNatI n => L.Iso (Vec n a) (Vec n b) (P.Vec n a) (P.Vec n b)
_Pull :: Iso (Vec n a) (Vec n b) (Vec n a) (Vec n b)
_Pull = (Vec n a -> Vec n a)
-> (Vec n b -> Vec n b)
-> Iso (Vec n a) (Vec n b) (Vec n a) (Vec n b)
forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
L.iso Vec n a -> Vec n a
forall (n :: Nat) a. SNatI n => Vec n a -> Vec n a
toPull Vec n b -> Vec n b
forall (n :: Nat) a. SNatI n => Vec n a -> Vec n a
fromPull

-- | Prism from list.
--
-- >>> preview _Vec "foo" :: Maybe (Vec N.Nat3 Char)
-- Just ('f' ::: 'o' ::: 'o' ::: VNil)
--
-- >>> preview _Vec "foo" :: Maybe (Vec N.Nat2 Char)
-- Nothing
--
-- >>> review _Vec (True ::: False ::: VNil)
-- [True,False]
--
_Vec :: N.SNatI n => L.Prism' [a] (Vec n a)
_Vec :: Prism' [a] (Vec n a)
_Vec = (Vec n a -> [a])
-> ([a] -> Maybe (Vec n a)) -> Prism' [a] (Vec n a)
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
L.prism' Vec n a -> [a]
forall (n :: Nat) a. SNatI n => Vec n a -> [a]
toList [a] -> Maybe (Vec n a)
forall (n :: Nat) a. SNatI n => [a] -> Maybe (Vec n a)
fromList

-- | Index lens.
--
-- >>> view (ix (FS FZ)) ('a' ::: 'b' ::: 'c' ::: VNil)
-- 'b'
--
-- >>> set (ix (FS FZ)) 'x' ('a' ::: 'b' ::: 'c' ::: VNil)
-- 'a' ::: 'x' ::: 'c' ::: VNil
--
ix :: forall n a. N.SNatI n => Fin n -> L.Lens' (Vec n a) a
ix :: Fin n -> Lens' (Vec n a) a
ix Fin n
i = LensVL (Vec n a) (Vec n a) a a -> Lens' (Vec n a) a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (Fin n -> LensLikeVL' f (Vec n a) a
forall (n :: Nat) (f :: * -> *) a.
(SNatI n, Functor f) =>
Fin n -> LensLikeVL' f (Vec n a) a
ixVL Fin n
i)
{-# INLINE ix #-}

ixVL :: forall n f a. (N.SNatI n, Functor f) => Fin n -> LensLikeVL' f (Vec n a) a
ixVL :: Fin n -> LensLikeVL' f (Vec n a) a
ixVL = IxLens f n a -> Fin n -> LensLikeVL' f (Vec n a) a
forall (f :: * -> *) (n :: Nat) a.
IxLens f n a -> Fin n -> LensLikeVL' f (Vec n a) a
getIxLens (IxLens f n a -> Fin n -> LensLikeVL' f (Vec n a) a)
-> IxLens f n a -> Fin n -> LensLikeVL' f (Vec n a) a
forall a b. (a -> b) -> a -> b
$ IxLens f 'Z a
-> (forall (m :: Nat).
    SNatI m =>
    IxLens f m a -> IxLens f ('S m) a)
-> IxLens f n a
forall (n :: Nat) (f :: Nat -> * -> *) a.
SNatI n =>
f 'Z a
-> (forall (m :: Nat). SNatI m => f m a -> f ('S m) a) -> f n a
N.induction1 IxLens f 'Z a
start forall (m :: Nat). SNatI m => IxLens f m a -> IxLens f ('S m) a
forall (m :: Nat). IxLens f m a -> IxLens f ('S m) a
step where
    start :: IxLens f 'Z a
    start :: IxLens f 'Z a
start = (Fin 'Z -> LensLikeVL' f (Vec 'Z a) a) -> IxLens f 'Z a
forall (f :: * -> *) (n :: Nat) a.
(Fin n -> LensLikeVL' f (Vec n a) a) -> IxLens f n a
IxLens Fin 'Z -> LensLikeVL' f (Vec 'Z a) a
forall b. Fin 'Z -> b
F.absurd

    step :: IxLens f m a -> IxLens f ('S m) a
    step :: IxLens f m a -> IxLens f ('S m) a
step (IxLens Fin m -> LensLikeVL' f (Vec m a) a
l) = (Fin ('S m) -> LensLikeVL' f (Vec ('S m) a) a) -> IxLens f ('S m) a
forall (f :: * -> *) (n :: Nat) a.
(Fin n -> LensLikeVL' f (Vec n a) a) -> IxLens f n a
IxLens ((Fin ('S m) -> LensLikeVL' f (Vec ('S m) a) a)
 -> IxLens f ('S m) a)
-> (Fin ('S m) -> LensLikeVL' f (Vec ('S m) a) a)
-> IxLens f ('S m) a
forall a b. (a -> b) -> a -> b
$ \Fin ('S m)
i -> case Fin ('S m)
i of
        Fin ('S m)
FZ   -> LensLikeVL' f (Vec ('S m) a) a
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL
        FS Fin n1
j -> LensLikeVL' f (Vec ('S m) a) (Vec m a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S m) a) (Vec m a)
-> LensLikeVL' f (Vec m a) a -> LensLikeVL' f (Vec ('S m) a) a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Fin m -> LensLikeVL' f (Vec m a) a
l Fin m
Fin n1
j
{-# INLINE ixVL #-}

newtype IxLens f n a = IxLens { IxLens f n a -> Fin n -> LensLikeVL' f (Vec n a) a
getIxLens :: Fin n -> LensLikeVL' f (Vec n a) a }

-------------------------------------------------------------------------------
-- Instances
-------------------------------------------------------------------------------

#if !MIN_VERSION_optics_core(0,4,0)
instance N.SNatI n => L.FunctorWithIndex (Fin n) (Vec n) where
    imap = imap

instance N.SNatI n => L.FoldableWithIndex (Fin n) (Vec n) where
    ifoldMap = ifoldMap
    ifoldr   = ifoldr

instance N.SNatI n => L.TraversableWithIndex (Fin n) (Vec n) where
    itraverse = itraverse
#endif

instance N.SNatI n => L.Each (Fin n) (Vec n a) (Vec n b) a b where

type instance L.Index (Vec n a)   = Fin n
type instance L.IxValue (Vec n a) = a

-- | 'Vec' doesn't have 'L.At' instance, as we __cannot__ remove value from 'Vec'.
-- See 'ix' in "Data.Vec.DataFamily.SpineStrict" module for an 'L.Lens' (not 'L.Traversal').
instance N.SNatI n => L.Ixed (Vec n a) where
    type IxKind (Vec n a) = L.A_Lens
    ix :: Index (Vec n a)
-> Optic' (IxKind (Vec n a)) NoIx (Vec n a) (IxValue (Vec n a))
ix = Index (Vec n a)
-> Optic' (IxKind (Vec n a)) NoIx (Vec n a) (IxValue (Vec n a))
forall (n :: Nat) a. SNatI n => Fin n -> Lens' (Vec n a) a
ix

instance L.Field1 (Vec ('S n) a) (Vec ('S n) a) a a where
    _1 :: Lens (Vec ('S n) a) (Vec ('S n) a) a a
_1 = Lens (Vec ('S n) a) (Vec ('S n) a) a a
forall (n :: Nat) a. Lens (Vec ('S n) a) (Vec ('S n) a) a a
_head

instance L.Field2 (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a where
    _2 :: Lens (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a
_2 = LensVL (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a
-> Lens (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a
 -> Lens (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a)
-> LensVL (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a
-> Lens (Vec ('S ('S n)) a) (Vec ('S ('S n)) a) a a
forall a b. (a -> b) -> a -> b
$ LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field3 (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a where
    _3 :: Lens (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a
_3 = LensVL (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a
-> Lens (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a
 -> Lens (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a)
-> LensVL (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a
-> Lens (Vec ('S ('S ('S n))) a) (Vec ('S ('S ('S n))) a) a a
forall a b. (a -> b) -> a -> b
$ LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field4 (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a where
    _4 :: Lens
  (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a
_4 = LensVL
  (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a
-> Lens
     (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL
   (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a
 -> Lens
      (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a)
-> LensVL
     (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a
-> Lens
     (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S ('S n)))) a) a a
forall a b. (a -> b) -> a -> b
$ LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S n))) a -> f (Vec ('S ('S ('S n))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S n)))) a
-> f (Vec ('S ('S ('S ('S n)))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field5 (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S ('S n))))) a) a a where
    _5 :: Lens
  (Vec ('S ('S ('S ('S ('S n))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
  a
  a
_5 = LensVL
  (Vec ('S ('S ('S ('S ('S n))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
  a
  a
-> Lens
     (Vec ('S ('S ('S ('S ('S n))))) a)
     (Vec ('S ('S ('S ('S ('S n))))) a)
     a
     a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL
   (Vec ('S ('S ('S ('S ('S n))))) a)
   (Vec ('S ('S ('S ('S ('S n))))) a)
   a
   a
 -> Lens
      (Vec ('S ('S ('S ('S ('S n))))) a)
      (Vec ('S ('S ('S ('S ('S n))))) a)
      a
      a)
-> LensVL
     (Vec ('S ('S ('S ('S ('S n))))) a)
     (Vec ('S ('S ('S ('S ('S n))))) a)
     a
     a
-> Lens
     (Vec ('S ('S ('S ('S ('S n))))) a)
     (Vec ('S ('S ('S ('S ('S n))))) a)
     a
     a
forall a b. (a -> b) -> a -> b
$ LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S n)))) a -> f (Vec ('S ('S ('S ('S n)))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S n))))) a
-> f (Vec ('S ('S ('S ('S ('S n))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S n))) a -> f (Vec ('S ('S ('S n))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S n)))) a
-> f (Vec ('S ('S ('S ('S n)))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field6 (Vec ('S ('S ('S ('S ('S ('S n)))))) a) (Vec ('S ('S ('S ('S ('S ('S n)))))) a) a a where
    _6 :: Lens
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  a
  a
_6 = LensVL
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  a
  a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
     (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
     a
     a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL
   (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
   (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
   a
   a
 -> Lens
      (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
      (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
      a
      a)
-> LensVL
     (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
     (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
     a
     a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
     (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
     a
     a
forall a b. (a -> b) -> a -> b
$ LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S n))))) a
    -> f (Vec ('S ('S ('S ('S ('S n))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S n)))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S n)))) a -> f (Vec ('S ('S ('S ('S n)))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S n))))) a
-> f (Vec ('S ('S ('S ('S ('S n))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S n))) a -> f (Vec ('S ('S ('S n))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S n)))) a
-> f (Vec ('S ('S ('S ('S n)))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field7 (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a) (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a) a a where
    _7 :: Lens
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  a
  a
_7 = LensVL
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  a
  a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
     a
     a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL
   (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
   (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
   a
   a
 -> Lens
      (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
      (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
      a
      a)
-> LensVL
     (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
     a
     a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
     a
     a
forall a b. (a -> b) -> a -> b
$ LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S ('S n)))))) a
    -> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S n))))) a
    -> f (Vec ('S ('S ('S ('S ('S n))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S n)))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S n)))) a -> f (Vec ('S ('S ('S ('S n)))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S n))))) a
-> f (Vec ('S ('S ('S ('S ('S n))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S n))) a -> f (Vec ('S ('S ('S n))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S n)))) a
-> f (Vec ('S ('S ('S ('S n)))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field8 (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a) (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a) a a where
    _8 :: Lens
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  a
  a
_8 = LensVL
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  a
  a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
     a
     a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL
   (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
   (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
   a
   a
 -> Lens
      (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
      (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
      a
      a)
-> LensVL
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
     a
     a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
     a
     a
forall a b. (a -> b) -> a -> b
$ LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a
    -> f (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S ('S n)))))) a
    -> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S n))))) a
    -> f (Vec ('S ('S ('S ('S ('S n))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S n)))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S n)))) a -> f (Vec ('S ('S ('S ('S n)))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S n))))) a
-> f (Vec ('S ('S ('S ('S ('S n))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S n))) a -> f (Vec ('S ('S ('S n))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S n)))) a
-> f (Vec ('S ('S ('S ('S n)))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL

instance L.Field9 (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a) (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a) a a where
    _9 :: Lens
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
  a
  a
_9 = LensVL
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
  a
  a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
     a
     a
forall s t a b. LensVL s t a b -> Lens s t a b
L.lensVL (LensVL
   (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
   (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
   a
   a
 -> Lens
      (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
      (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
      a
      a)
-> LensVL
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
     a
     a
-> Lens
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
     (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
     a
     a
forall a b. (a -> b) -> a -> b
$ LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a
    -> f (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S ('S ('S ('S n))))))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a
    -> f (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S ('S ('S n)))))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S ('S n)))))) a
    -> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S ('S n))))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f
  (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
  (Vec ('S ('S ('S ('S ('S n))))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S ('S n))))) a
    -> f (Vec ('S ('S ('S ('S ('S n))))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S ('S n)))))) a
-> f (Vec ('S ('S ('S ('S ('S ('S n)))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S ('S n))))) a) (Vec ('S ('S ('S ('S n)))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S ('S n)))) a -> f (Vec ('S ('S ('S ('S n)))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S ('S n))))) a
-> f (Vec ('S ('S ('S ('S ('S n))))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL'
  f (Vec ('S ('S ('S ('S n)))) a) (Vec ('S ('S ('S n))) a)
-> ((a -> f a)
    -> Vec ('S ('S ('S n))) a -> f (Vec ('S ('S ('S n))) a))
-> (a -> f a)
-> Vec ('S ('S ('S ('S n)))) a
-> f (Vec ('S ('S ('S ('S n)))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S ('S n))) a) (Vec ('S ('S n)) a)
-> ((a -> f a) -> Vec ('S ('S n)) a -> f (Vec ('S ('S n)) a))
-> (a -> f a)
-> Vec ('S ('S ('S n))) a
-> f (Vec ('S ('S ('S n))) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) (Vec n a)
tailVL LensLikeVL' f (Vec ('S ('S n)) a) (Vec ('S n) a)
-> ((a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a))
-> (a -> f a)
-> Vec ('S ('S n)) a
-> f (Vec ('S ('S n)) a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (a -> f a) -> Vec ('S n) a -> f (Vec ('S n) a)
forall (f :: * -> *) (n :: Nat) a.
Functor f =>
LensLikeVL' f (Vec ('S n) a) a
headVL