{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ < 710
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Copyright   :  (C) 2012-2015 Edward Kmett
-- License     :  BSD-style (see the file LICENSE)
-- Maintainer  :  Edward Kmett <ekmett@gmail.com>
-- Stability   :  provisional
-- Portability :  portable
--
-- Orphans
-----------------------------------------------------------------------------
module Linear.Instances () where

import Control.Applicative
import Control.Monad.Fix
import Control.Monad.Zip
import Data.Complex
import Data.Orphans ()

instance MonadZip Complex where
  mzipWith :: (a -> b -> c) -> Complex a -> Complex b -> Complex c
mzipWith = (a -> b -> c) -> Complex a -> Complex b -> Complex c
forall (f :: * -> *) a b c.
Applicative f =>
(a -> b -> c) -> f a -> f b -> f c
liftA2

instance MonadFix Complex where
  mfix :: (a -> Complex a) -> Complex a
mfix f :: a -> Complex a
f = (let a :: a
a :+ _ = a -> Complex a
f a
a in a
a) a -> a -> Complex a
forall a. a -> a -> Complex a
:+ (let _ :+ a :: a
a = a -> Complex a
f a
a in a
a)