Skip to content

Commit

Permalink
Flattened directory structure. Required type families
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Jun 17, 2010
1 parent 9116b67 commit 6347b17
Show file tree
Hide file tree
Showing 119 changed files with 16 additions and 98 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.45.0
------
* Removed workarounds for GHC 6.8

0.44.5
------

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 0 additions & 11 deletions src/Control/Category/Object.hs → Control/Category/Object.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS -fglasgow-exts #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Category.Object
Expand All @@ -25,23 +24,13 @@ import Control.Category

-- | The @Category k@ has a terminal object @Terminal k@ such that for all objects @a@ in @k@,
-- there exists a unique morphism from @a@ to @Terminal k@.
#ifdef USE_TYPE_FAMILIES
class Category k => HasTerminalObject k where
type Terminal k :: *
terminate :: k a (Terminal k)
#else
class Category k => HasTerminalObject k t | k -> t where
terminate :: k a t
#endif

-- | The @Category k@ has an initial (coterminal) object @Initial k@ such that for all objects
-- @a@ in @k@, there exists a unique morphism from @Initial k @ to @a@.

#ifdef USE_TYPE_FAMILIES
class Category k => HasInitialObject k where
type Initial k :: *
initiate :: k (Initial k) a
#else
class Category k => HasInitialObject k i | k -> i where
initiate :: k i a
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Adjunction
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ import Control.Monad.Writer as LW
import Control.Monad.State as LS

import Control.Monad.RWS as LRWS
#if __GLASGOW_HASKELL__ >= 608
import Control.Monad.Writer.Strict as SW
import Control.Monad.State.Strict as SS
import Control.Monad.RWS.Strict as SRWS
#endif

class (Category r, Category s) => CFunctor f r s | f r -> s, f s -> r where
cmap :: r a b -> s (f a) (f b)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -cpp -fglasgow-exts -fallow-undecidable-instances #-}
{-# LANGUAGE UndecidableInstances #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Combinators.Lift
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Internal.Adjunction
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Strong
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/Control/Functor/Zap.hs → Control/Functor/Zap.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Zap
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/Control/Monad/Either.hs → Control/Monad/Either.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Either
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# OPTIONS_GHC -fallow-undecidable-instances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Indexed.State
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2008 Edward Kmett
Copyright 2008-2010 Edward Kmett
Copyright 2007 Iavor Diatchki
Copyright 2004-2008 Dave Menendez

Expand Down
31 changes: 0 additions & 31 deletions Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions Setup.lhs

This file was deleted.

32 changes: 9 additions & 23 deletions category-extras.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,11 @@ description: A vastly expanded collection of modules implementing various
/Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire/.
build-type: Simple

flag ArrowSubclassesCategory
description: Indicates Control.Category is available and that the standard library has
its arrows subclass Control.Category.Category
default: True

flag TypeFamilies
description: Support for Type Families is available to us

flag Optimize
description: Enable optimizations
default: False

library
build-depends: mtl >= 1.1
extensions:
CPP,
EmptyDataDecls,
Expand All @@ -40,11 +31,19 @@ library
FunctionalDependencies,
MultiParamTypeClasses,
TypeOperators,
TypeSynonymInstances
TypeSynonymInstances,
TypeFamilies,
UndecidableInstances,
ExistentialQuantification,
GeneralizedNewtypeDeriving,
Rank2Types


build-depends:
base > 4,
array >= 0.3 && < 0.4,
mtl >= 1.1

other-modules:
Control.Functor.Internal.Adjunction,
Control.Functor.Internal.Ideal
Expand Down Expand Up @@ -148,20 +147,7 @@ library
Control.Morphism.Zygo,
Data.Void

hs-source-dirs: src
ghc-options: -Wall

if flag(ArrowSubclassesCategory)
build-depends: ghc >= 6.9, base > 3, array
cpp-options: -D__ARROW_SUBCLASSES_CATEGORY__=1
else
build-depends: ghc < 6.9, base, array
hs-source-dirs: pre-6.9
exposed-modules: Control.Category

if flag(TypeFamilies)
extensions: TypeFamilies
cpp-options: -D__TYPE_FAMILIES__=1

if flag(Optimize)
ghc-options: -funbox-strict-fields -O2
20 changes: 0 additions & 20 deletions pre-6.9/Control/Category.hs

This file was deleted.

0 comments on commit 6347b17

Please sign in to comment.