Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/Data/Union/ST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--
-- Authors: Bertram Felgenhauer

{-# LANGUAGE RankNTypes, FlexibleContexts, CPP #-}
{-# LANGUAGE RankNTypes, FlexibleContexts #-}
-- |
-- Low-level interface for managing a disjoint set data structure, based on
-- 'Control.Monad.ST'. For a higher level convenience interface, look at
Expand Down Expand Up @@ -31,6 +31,7 @@ import Control.Applicative
import Data.Array.Base hiding (unsafeFreeze)
import Data.Array.ST hiding (unsafeFreeze)
import qualified Data.Array.Base as A (unsafeFreeze)
import Data.Orphans ()

-- | A disjoint set forest, with nodes numbered from 0, which can carry labels.
data UnionST s l = UnionST {
Expand All @@ -41,12 +42,6 @@ data UnionST s l = UnionST {
def :: l
}

#if __GLASGOW_HASKELL__ < 702
instance Applicative (ST s) where
(<*>) = ap
pure = return
#endif

-- Use http://www.haskell.org/pipermail/libraries/2008-March/009465.html ?

-- | Analogous to 'Data.Array.ST.runSTArray'.
Expand Down
3 changes: 2 additions & 1 deletion union-find-array.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ library
build-depends:
array >= 0.3 && < 0.6,
mtl >= 1.1 && < 2.3,
base >= 4 && < 5
base >= 4 && < 5,
base-orphans >= 0.1 && < 0.4
extensions:
GeneralizedNewtypeDeriving
RankNTypes
Expand Down