Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
ghc-lens-simple
ghc-lens-simple.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ghc-lens-simple.spec of Package ghc-lens-simple
# # spec file for package ghc-lens-simple # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %global pkg_name lens-simple Name: ghc-%{pkg_name} Version: 0.1.0.9 Release: 0 Summary: Simplified import of elementary lens-family combinators License: BSD-3-Clause Group: Development/Libraries/Haskell URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel BuildRequires: ghc-lens-family-core-devel BuildRequires: ghc-lens-family-devel BuildRequires: ghc-lens-family-th-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-transformers-devel %description This module, <http://hackage.haskell.org/package/lens-simple/docs/Lens-Simple.html Lens.Simple>, just re-exports the main modules from Russell O'Connor's <http://hackage.haskell.org/package/lens-family lens-family> package, the original van Laarhoven-O'Connor lens library. 'lens-family' is particularly remarkable for its minute number of dependencies: (apart from <http://hackage.haskell.org/package/mtl mtl> they are all ghc 'boot' libraries); but more importantly for its extreme conceptual simplicity and theoretical soundness. Much of the material it contains is well-explained, from a tutorial point of view, by <http://hackage.haskell.org/package/lens-tutorial lens-tutorial> It is independent, self-standing and readily intelligible apart from any darker more general system of combinators that might attempt to extend it. Much of it ought to be in the Prelude. Convenient import of the elementary combinators from 'lens-family', however, a little complicated. The idea of this trivial module, then, is just to make a sort of low-powered, minimal-dependency, 'lens-family' equivalent of the 800 lb gorilla of lens library imports: > import Control.Lens namely, the light-weight and elegant: > import Lens.Simple Check it out, it's even one character shorter! The material in <http://hackage.haskell.org/package/lens-tutorial lens-tutorial> will work fine if you make this substitution in the underlying <http://hackage.haskell.org/package/lens-tutorial-1.0.0/docs/src/Control-Lens-Tutorial.html source> and follow along as prompted. As another illustration of the simplicity of the fundamental van Laarhoven-O'Connor lens combinators - and their homogeneity with 'Control.Lens' - note that the gloss <https://github.com/michaelt/lens-family-simple/blob/master/examples/Pong.hs pong example> from the 'lens' library examples directory - which continues to be among the best introductory lens tutorials precisely by saying nothing - requires only this abbreviating change of imports. If you make that program more complicated, you might of course end up needing the more sophisticated material in 'Control.Lens' and its immense mass of dependencies. On the other hand, you might just need some of the additional material present in the similarly demystifying <http://hackage.haskell.org/package/microlens microlens> or <http://hackage.haskell.org/package/microlens-th microlens-th> and the associated modules. This module was originally intended to simplify the use of packages that follow the original promise of the van Laarhoven-O'Connor lenses. /Correct practice is to export lenses without depending on a lens-library, where possible./ In basic cases these just use familiar 'Prelude' types, after all. Examples of best practices in this respect are e.g. <http://hackage.haskell.org/package/lens-family-th lens-family-th> which doesn't depend on 'lens-family' despite its name and pipes-related packages like <http://hackage.haskell.org/package/pipes-bytestring pipes-bytestring> and <http://hackage.haskell.org/package/pipes-group pipes-group>. 'Lens.Simple' also re-exports convenient TH incantations like 'makeLenses' from Dan Burton's associated <http://hackage.haskell.org/package/lens-family-th lens-family-th>. . %package devel Summary: Haskell %{pkg_name} library development files Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} %description devel This package provides the Haskell %{pkg_name} library development files. %prep %setup -q -n %{pkg_name}-%{version} %build %ghc_lib_build %install %ghc_lib_install %post devel %ghc_pkg_recache %postun devel %ghc_pkg_recache %files -f %{name}.files %doc LICENSE %files devel -f %{name}-devel.files %doc README.md changelog %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor