{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE TypeApplications #-}
module Data.TypedEncoding.Common.Class.Encode where
import           Data.TypedEncoding.Common.Types.Enc
class Encode f nm alg conf str where
    encoding :: Encoding f nm alg conf str
class EncodeAll f nms algs conf str where
    encodings :: Encodings f nms algs conf str
instance EncodeAll f '[] '[] conf str where
    encodings = ZeroE
instance (EncodeAll f nms algs conf str, Encode f nm alg conf str) => EncodeAll f (nm ': nms) (alg ': algs) conf str where
    encodings = ConsE encoding encodings