@@ -11,16 +11,18 @@
1111{-# LANGUAGE TypeOperators #-}
1212{-# LANGUAGE UndecidableInstances #-}
1313
14+-----------------------------------------------------------------------------
15+-- |
16+-- Module : Data.Generics.Internal.HList
17+-- Copyright : (C) 2017 Csongor Kiss
18+-- License : BSD3
19+-- Maintainer : Csongor Kiss <kiss.csongor.kiss@gmail.com>
20+-- Stability : experimental
21+-- Portability : non-portable
22+--
23+-----------------------------------------------------------------------------
1424module Data.Generics.Internal.HList
15− ( HList (..)
16−
17− , head'
18− , tail'
19−
20− , append
21− , (++)
22−
23− , Splittable (..)
25+ ( (++)
2426
2527 , ListTuple (..)
2628
@@ -47,9 +49,6 @@ append (x :> xs) ys = x :> append xs ys
4749head' :: HList (a ': as) -> a
4850head' (x :> _) = x
4951
50−tail' :: HList (a ': as) -> HList as
51−tail' (_ :> xs) = xs
52−
5352--------------------------------------------------------------------------------
5453-- * Split HList
5554
@@ -142,6 +141,7 @@ instance ListTuple (a, b, c, d, e, f, g, h, j, k, l) '[a, b, c, d, e, f, g, h, j
142141 = (a, b, c, d, e, f, g, h, j, k, l)
143142
144143--------------------------------------------------------------------------------
144+
145145class GCollectible (f :: Type -> Type) (as :: [Type]) | f -> as where
146146 gtoCollection :: f x -> HList as
147147 gfromCollection :: HList as -> f x