Popularity
2.1
Growing
Activity
0.0
Stable
1
1
2
Monthly Downloads: 14
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags:
Control
Latest version: v0.2.1.0
shared-fields alternatives and similar packages
Based on the "Control" category.
Alternatively, view shared-fields alternatives based on common mentions on social networks and blogs.
-
transient
A full stack, reactive architecture for general purpose programming. Algebraic and monadically composable primitives for concurrency, parallelism, event handling, transactions, multithreading, Web, and distributed computing with complete de-inversion of control (No callbacks, no blocking, pure state) -
fused-effects
A fast, flexible, fused effect system for Haskell -
apecs
a fast, extensible, type driven Haskell ECS framework for games -
recursion-schemes
Generalized bananas, lenses and barbed wire -
distributed-closure
Serializable closures for distributed programming. -
selective
Selective Applicative Functors: Declare Your Effects Statically, Select Which to Execute Dynamically -
classy-prelude-yesod
Type classes for mapping, folding, and traversing monomorphic containers -
auto
Haskell DSL and platform providing denotational, compositional api for discrete-step, locally stateful, interactive programs, games & automations. http://hackage.haskell.org/package/auto -
hask
Category theory for Haskell with a lens flavor (you need GHC 7.8.3, not 7.8.2 to build this!) -
safe-exceptions
Safe, consistent, and easy exception handling -
extensible-effects
Extensible Effects: An Alternative to Monad Transformers -
classy-prelude
Type classes for mapping, folding, and traversing monomorphic containers -
ComonadSheet
A library for expressing "spreadsheet-like" computations with absolute and relative references, using fixed-points of n-dimensional comonads. -
transient-universe
A Cloud monad based on transient for the creation of Web and reactive distributed applications that are fully composable, where Web browsers are first class nodes in the cloud -
abstract-par
Type classes generalizing the functionality of the 'monad-par' library. -
these
An either-or-both data type, with corresponding hybrid error/writer monad transformer. -
distributed-fork
A distributed data processing framework in Haskell. -
cloud-haskell
This is an umbrella development repository for Cloud Haskell -
distributed-process-platform
DEPRECATED (Cloud Haskell Platform) in favor of distributed-process-extras, distributed-process-async, distributed-process-client-server, distributed-process-registry, distributed-process-supervisor, distributed-process-task and distributed-process-execution -
monad-validate
A Haskell monad transformer library for data validation -
monad-control
Lift control operations, like exception catching, through monad transformers -
monad-time
Type class for monads which carry the notion of the current time. -
operational
Implement monads by specifying instructions and their desired operational semantics. -
ixmonad
Provides 'graded monads' and 'parameterised monads' to Haskell, enabling fine-grained reasoning about effects. -
effect-monad
Provides 'graded monads' and 'parameterised monads' to Haskell, enabling fine-grained reasoning about effects. -
lens-tutorial
The missing tutorial module for the lens library -
freer-effects
An implementation of "Freer Monads, More Extensible Effects".
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of shared-fields or a related project?
README
shared-fields
A simple single-module library for creating lens field typeclasses in a way that allows them to be shared between modules.
By default, lens' makeFields
creates a new class if it can't find a matching one in scope. This means that if you try to makeFields
records in different modules without importing one module into the other, you'll get conflicting class definitions rather than a single lens which functions with both records.
module A where
data A = A { _aThing :: Bool }
deriving (Show, Read, Eq)
makeFields ''A
module B where
data B = B { _bThing :: String }
deriving (Show, Read, Eq)
makeFields ''B
module Main where
import A
import B
import Control.Lens
main = print $ A False ^. thing -- fails because there are two HasThing classes
If you use shared-fields
, though:
module SharedFields where
generateField "Thing"
-- alternatively:
-- generateFields ["Thing"]
module A where
import SharedFields
data A = A { _aThing :: Bool }
deriving (Show, Read, Eq)
makeFields ''A
module B where
import SharedFields
data B = B { _bThing :: String }
deriving (Show, Read, Eq)
makeFields ''B
module Main where
import A
import B
import Control.Lens
main = print $ A False ^. thing -- works now because there's one consistent HasThing class!