Permalink
Browse files

Make compile

  • Loading branch information...
1 parent 01752f8 commit ad69c066b1249690cba8cb5e5cc1d2d11cf7d70a @reinerp committed Mar 9, 2012
Showing with 14 additions and 23 deletions.
  1. +1 −1 Control/Monad/Indexed/Cont.hs
  2. +4 −19 Control/Monad/Indexed/State.hs
  3. +9 −3 indexed-extras.cabal
@@ -18,7 +18,7 @@ module Control.Monad.Indexed.Cont
) where
import Control.Applicative
-import Control.Functor.Pointed
+import Data.Pointed
-- import Control.Monad.Trans
import Control.Monad.Identity
import Control.Monad.Indexed
@@ -1,11 +1,10 @@
-{-# OPTIONS_GHC -fallow-undecidable-instances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Indexed.State
-- Copyright : (C) 2008 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
--- Maintainer : Edward Kmett <ekmett@gmail.com>
+-- Maintainer : Reiner Pope <reiner.pope@gmail.com>
-- Stability : experimental
-- Portability : portable (although the MTL instances aren't!)
--
@@ -19,9 +18,7 @@ module Control.Monad.Indexed.State
) where
import Control.Applicative
-import Control.Category.Hask
--- import Control.Category.Cartesian
-import Control.Functor
+import Data.Bifunctor
import Control.Monad.Indexed
import Control.Monad.Indexed.Trans
import Control.Monad.Indexed.Fix
@@ -64,13 +61,7 @@ instance IxMonadState IxState where
iget = IxState (\x -> (x,x))
iput x = IxState (\_ -> ((),x))
-instance PFunctor (IxState i) Hask Hask where
- first = first'
-
-instance QFunctor (IxState i) Hask Hask where
- second = second'
-
-instance Bifunctor (IxState i) Hask Hask Hask where
+instance Bifunctor (IxState i) where
bimap f g m = IxState $ bimap g f . runIxState m
instance Monad (IxState i i) where
@@ -111,13 +102,7 @@ instance Monad m => IxApplicative (IxStateT m) where
instance Monad m => IxMonad (IxStateT m) where
ibind k m = IxStateT $ \s -> runIxStateT m s >>= \ ~(a, s') -> runIxStateT (k a) s'
-instance Monad m => PFunctor (IxStateT m i) Hask Hask where
- first = first'
-
-instance Monad m => QFunctor (IxStateT m i) Hask Hask where
- second = second'
-
-instance Monad m => Bifunctor (IxStateT m i) Hask Hask Hask where
+instance Monad m => Bifunctor (IxStateT m i) where
bimap f g m = IxStateT $ liftM (bimap g f) . runIxStateT m
instance Monad m => IxMonadState (IxStateT m) where
View
@@ -5,7 +5,7 @@ Description: Indexed functors, monads and comonads that require extensio
License: BSD3
License-file: LICENSE
Author: Edward A. Kmett
-Maintainer: Reiner Pope <reiner.pope@gmail.com
+Maintainer: Reiner Pope <reiner.pope@gmail.com>
Copyright:
Copyright (C) 2012 Reiner Pope,
Copyright (C) 2008 Edward A. Kmett,
@@ -21,10 +21,16 @@ Library
Control.Monad.Indexed.State
Build-depends:
base < 5,
- indexed < 0.2
+ indexed < 0.2,
+ mtl < 2.1,
+ pointed < 2.1,
+ bifunctors < 0.2
ghc-options:
-Wall
-Werror
Extensions:
UndecidableInstances,
- GeneralizedNewtypeDeriving
+ GeneralizedNewtypeDeriving,
+ FlexibleInstances,
+ MultiParamTypeClasses,
+ Rank2Types

0 comments on commit ad69c06

Please sign in to comment.