{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hcompta.Lib.Consable where import Data.Monoid () import Data.Functor.Compose (Compose(..)) --import Control.Applicative (Const(..)) class Monoid (ts t) => Consable ts t where mcons :: t -> ts t -> ts t instance Monoid (f (g x)) => Monoid ((Compose f g) x) where mempty = Compose mempty mappend (Compose x) (Compose y) = Compose $ mappend x y