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