@@ -919,3 +919,156 @@ instance HasDocs sublayout => HasDocs (HttpVersion :> sublayout) where
919instance HasDocs sublayout => HasDocs (Vault :> sublayout) where
919instance HasDocs sublayout => HasDocs (Vault :> sublayout) where
920 docsFor Proxy ep =
920 docsFor Proxy ep =
921 docsFor (Proxy :: Proxy sublayout) ep
921 docsFor (Proxy :: Proxy sublayout) ep
924+-- polymorphic 'ToSample' instances
926+instance ( ToSample a a
928+ ) => ToSample (a, b) (a, b) where
930+ <$> toSample (Proxy :: Proxy a)
931+ <*> toSample (Proxy :: Proxy b)
932+ toSamples _ = render
933+ <$> toSamples (Proxy :: Proxy a)
934+ <*> toSamples (Proxy :: Proxy b)
935+ where render (ta, va) (tb, vb)
941+instance ( ToSample a a
944+ ) => ToSample (a, b, c) (a, b, c) where
946+ <$> toSample (Proxy :: Proxy a)
947+ <*> toSample (Proxy :: Proxy b)
948+ <*> toSample (Proxy :: Proxy c)
949+ toSamples _ = render
950+ <$> toSamples (Proxy :: Proxy a)
951+ <*> toSamples (Proxy :: Proxy b)
952+ <*> toSamples (Proxy :: Proxy c)
953+ where render (ta, va) (tb, vb) (tc, vc)
960+instance ( ToSample a a
964+ ) => ToSample (a, b, c, d) (a, b, c, d) where
966+ <$> toSample (Proxy :: Proxy a)
967+ <*> toSample (Proxy :: Proxy b)
968+ <*> toSample (Proxy :: Proxy c)
969+ <*> toSample (Proxy :: Proxy d)
970+ toSamples _ = render
971+ <$> toSamples (Proxy :: Proxy a)
972+ <*> toSamples (Proxy :: Proxy b)
973+ <*> toSamples (Proxy :: Proxy c)
974+ <*> toSamples (Proxy :: Proxy d)
975+ where render (ta, va) (tb, vb) (tc, vc) (td, vd)
983+instance ( ToSample a a
988+ ) => ToSample (a, b, c, d, e) (a, b, c, d, e) where
990+ <$> toSample (Proxy :: Proxy a)
991+ <*> toSample (Proxy :: Proxy b)
992+ <*> toSample (Proxy :: Proxy c)
993+ <*> toSample (Proxy :: Proxy d)
994+ <*> toSample (Proxy :: Proxy e)
995+ toSamples _ = render
996+ <$> toSamples (Proxy :: Proxy a)
997+ <*> toSamples (Proxy :: Proxy b)
998+ <*> toSamples (Proxy :: Proxy c)
999+ <*> toSamples (Proxy :: Proxy d)
1000+ <*> toSamples (Proxy :: Proxy e)
1001+ where render (ta, va) (tb, vb) (tc, vc) (td, vd) (te, ve)
1008+ , (va, vb, vc, vd, ve))
1010+instance ( ToSample a a
1016+ ) => ToSample (a, b, c, d, e, f) (a, b, c, d, e, f) where
1017+ toSample _ = (,,,,,)
1018+ <$> toSample (Proxy :: Proxy a)
1019+ <*> toSample (Proxy :: Proxy b)
1020+ <*> toSample (Proxy :: Proxy c)
1021+ <*> toSample (Proxy :: Proxy d)
1022+ <*> toSample (Proxy :: Proxy e)
1023+ <*> toSample (Proxy :: Proxy f)
1024+ toSamples _ = render
1025+ <$> toSamples (Proxy :: Proxy a)
1026+ <*> toSamples (Proxy :: Proxy b)
1027+ <*> toSamples (Proxy :: Proxy c)
1028+ <*> toSamples (Proxy :: Proxy d)
1029+ <*> toSamples (Proxy :: Proxy e)
1030+ <*> toSamples (Proxy :: Proxy f)
1031+ where render (ta, va) (tb, vb) (tc, vc) (td, vd) (te, ve) (tf, vf)
1039+ , (va, vb, vc, vd, ve, vf))
1041+instance ( ToSample a a
1048+ ) => ToSample (a, b, c, d, e, f, g) (a, b, c, d, e, f, g) where
1049+ toSample _ = (,,,,,,)
1050+ <$> toSample (Proxy :: Proxy a)
1051+ <*> toSample (Proxy :: Proxy b)
1052+ <*> toSample (Proxy :: Proxy c)
1053+ <*> toSample (Proxy :: Proxy d)
1054+ <*> toSample (Proxy :: Proxy e)
1055+ <*> toSample (Proxy :: Proxy f)
1056+ <*> toSample (Proxy :: Proxy g)
1057+ toSamples _ = render
1058+ <$> toSamples (Proxy :: Proxy a)
1059+ <*> toSamples (Proxy :: Proxy b)
1060+ <*> toSamples (Proxy :: Proxy c)
1061+ <*> toSamples (Proxy :: Proxy d)
1062+ <*> toSamples (Proxy :: Proxy e)
1063+ <*> toSamples (Proxy :: Proxy f)
1064+ <*> toSamples (Proxy :: Proxy g)
1065+ where render (ta, va) (tb, vb) (tc, vc) (td, vd) (te, ve) (tf, vf) (tg, vg)
1074+ , (va, vb, vc, vd, ve, vf, vg))