git.iko.soy/semi-iso-optics
on master help sign in
Added stack (#2)

* Added stack * Moved to hpack

commitd57c98798d53b0df53602bb7b3227067f4ac4f96 authoriko <ilyakooo0@gmail.com> dateSat 21 Sep 2019, 17:39 (7 years ago) parent3344a29
12 files changed+168−111
.gitignore+14−39 LICENSE+1 package.yaml+45 semi-iso.cabal+39−72 Control/Category/Reader.hs → src/Control/Category/Reader.hs Control/Category/Structures.hs → src/Control/Category/Structures.hs Control/Lens/Internal/SemiIso.hs → src/Control/Lens/Internal/SemiIso.hs Control/Lens/SemiIso.hs → src/Control/Lens/SemiIso.hs Control/SIArrow.hs → src/Control/SIArrow.hs Control/Tuple/Morph.hs → src/Control/Tuple/Morph.hs Data/Profunctor/Exposed.hs → src/Data/Profunctor/Exposed.hs stack.yaml+69
.gitignore+14−39
@@ -1,48 +1,23 @@
1−# Created by https://www.gitignore.io
2−
3−### Haskell ###
41dist
2+dist-*
53cabal-dev
64*.o
75*.hi
6+*.hie
87*.chi
98*.chs.h
10−.virtualenv
9+*.dyn_o
10+*.dyn_hi
11+.hpc
1112.hsenv
1213.cabal-sandbox/
1314cabal.sandbox.config
14−cabal.config
15−
16−
17−### Emacs ###
18−# -*- mode: gitignore; -*-
19−*~
20−\#*\#
21−/.emacs.desktop
22−/.emacs.desktop.lock
23−*.elc
24−auto-save-list
25−tramp
26−.\#*
27−
28−# Org-mode
29−.org-id-locations
30−*_archive
31−
32−# flymake-mode
33−*_flymake.*
34−
35−# eshell files
36−/eshell/history
37−/eshell/lastdir
38−
39−# elpa packages
40−/elpa/
41−
42−# reftex files
43−*.rel
44−
45−# AUCTeX auto folder
46−/auto/
47−
48−.stack-work
15+*.prof
16+*.aux
17+*.hp
18+*.eventlog
19+.stack-work/
20+cabal.project.local
21+cabal.project.local~
22+.HTF/
23+.ghc.environment.*
LICENSE+1
@@ -1,4 +1,5 @@
11Copyright (c) 2014 Paweł Nowak
2+Copyright (c) 2019 Ilya Kostyuchenko
23
34Permission is hereby granted, free of charge, to any person obtaining
45a copy of this software and associated documentation files (the
package.yamlnew file+45
@@ -0,0 +1,45 @@
1+name: semi-iso
2+version: 0.1.0.0
3+github: "ilyakooo0/semi-iso-optics"
4+license: MIT
5+author: "Ilya Kostyuchenko"
6+maintainer: "ilyakooo0@gmail.com"
7+copyright: "2019 Ilya Kostyuchenko, 2014 Paweł Nowak"
8+
9+extra-source-files: []
10+
11+# Metadata used when publishing your package
12+# synopsis: Short description of your package
13+# category: Web
14+
15+# To avoid duplicated efforts in documentation and dealing with the
16+# complications of embedding Haddock markup inside cabal files, it is
17+# common to point users to the README.md file.
18+description: Please see the README on GitHub at <https://github.com/ilyakooo0/semi-iso-optics#readme>
19+
20+dependencies:
21+- base >= 4.7 && < 5
22+- profunctors
23+- transformers
24+- lens
25+- semigroupoids
26+
27+library:
28+ source-dirs: src
29+ exposed-modules:
30+ - Control.Lens.SemiIso
31+ - Control.Lens.Internal.SemiIso
32+ - Control.SIArrow
33+ - Control.Category.Reader
34+ - Control.Category.Structures
35+ - Data.Profunctor.Exposed
36+ ghc-options:
37+ - -Wall
38+ - -Wincomplete-uni-patterns
39+ - -Wincomplete-record-updates
40+ - -Wpartial-fields
41+ - -Werror=missing-home-modules
42+ - -Wmissing-home-modules
43+ - -Widentities
44+ - -Wredundant-constraints
45+ - -Wmissing-export-lists
semi-iso.cabal+39−72
@@ -1,77 +1,44 @@
1−name: semi-iso
2−version: 1.0.0.0
3−synopsis: Weakened partial isomorphisms, reversible computations.
4−description:
5− Semi-isomorphisms are partial isomorphisms with weakened iso laws. They are a basic
6− building block of reversible computations. And they work with Iso and Prism from @lens@!
7− .
8− The module "Control.Lens.SemiIso" defines semi-isomorphisms and provides some
9− basic semi-isos and combinators. A @SemiIso' a b@ can be applied in both directions
10− to get a @a -> Either String b@ and @b -> Either String a@. SemiIsos can be composed
11− with Isos and Prisms (to get another SemiIso). Isos and Prisms can be directly
12− used as SemiIsos.
13− .
14− Semi-isomorphisms obey weaker laws then isomorphisms. We require only
15− .
16− > apply f >=> unapply f >=> apply f = apply f
17− > unapply f >=> apply f >=> unapply f = unapply f
18− .
19− instead of
20− .
21− > apply f >=> unapply f = f
22− > unapply f >=> apply f = f
23− .
24− Modules "Control.SIArrow" and "Control.Category.Structures" define an @Arrow@-like class
25− hierarchy. Unfortunately "Control.Arrow" cannot be used, as it is too restrictive (the
26− dreaded @arr@).
1+cabal-version: 1.12
272
28− SIArrow abstracts categories of reversible computations (with reversible side effects). In
29− the case of parsing and pretty-printing using the "syntax" library if we have an arrow
30− @SIArrow cat => cat a b@ then we can:
31− .
32− * Evaluate it from left to right, turning a value of type @a@ into a value of type @b@,
33− with the side effect of consuming a sequence. (Parsing)
34− .
35− * Evaluate it from right to left, turning a value of type @b@ into a value of type @a@,
36− with the side effect of generating a sequence. (Pretty-printing)
37− .
38− In the particular case of parsing/pretty-printing the type @a@ will be usually @()@, e.g.
39− we just produce a value during parsing and just consume a value during pretty-printing.
40− To support this style we define a functor and applicative structure on @cat () b@, for example
41− '/*/' (equivalent of '<*>') has type @(\/*\/) :: SIArrow cat => cat () a -> cat () b -> cat () (a, b)@.
42− .
43− When more power then applicative is needed - for example when the syntax depends on the
44− parsed value - we turn back to arrow composition.
45− .
46− Module "Control.Category.Reader" defines a Reader category transformer. It is like a monad
47− transformer, but for categories. The next version will include some more transformers and
48− mtl-style classes.
49−license: MIT
50−license-file: LICENSE
51−author: Paweł Nowak
52−maintainer: Paweł Nowak <pawel834@gmail.com>
53−copyright: Paweł Nowak 2014
54−category: Control, Data
55−build-type: Simple
56−cabal-version: >=1.11
57−Tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.3, GHC==8.6.1
3+-- This file has been generated from package.yaml by hpack version 0.31.2.
4+--
5+-- see: https://github.com/sol/hpack
6+--
7+-- hash: 9fe627e0673c25d1622d6bbc274fa58649b56cc4796f5b740e346f1496b40f1a
8+
9+name: semi-iso
10+version: 0.1.0.0
11+description: Please see the README on GitHub at <https://github.com/ilyakooo0/semi-iso-optics#readme>
12+homepage: https://github.com/ilyakooo0/semi-iso-optics#readme
13+bug-reports: https://github.com/ilyakooo0/semi-iso-optics/issues
14+author: Ilya Kostyuchenko
15+maintainer: ilyakooo0@gmail.com
16+copyright: 2019 Ilya Kostyuchenko, 2014 Paweł Nowak
17+license: MIT
18+license-file: LICENSE
19+build-type: Simple
5820
5921source-repository head
60− type: git
61− location: git@github.com:Pawel834/semi-iso.git
22+ type: git
23+ location: https://github.com/ilyakooo0/semi-iso-optics
6224
6325library
64− exposed-modules: Control.Lens.SemiIso
65− Control.Lens.Internal.SemiIso
66− Control.SIArrow
67− Control.Category.Reader
68− Control.Category.Structures
69− Data.Profunctor.Exposed
70− Control.Tuple.Morph
71− build-depends: base >= 4.9 && <4.13
72− , profunctors == 5.*
73− , transformers
74− , lens == 4.*
75− , semigroupoids
76− default-language: Haskell2010
77− ghc-options: -Wall
26+ exposed-modules:
27+ Control.Lens.SemiIso
28+ Control.Lens.Internal.SemiIso
29+ Control.SIArrow
30+ Control.Category.Reader
31+ Control.Category.Structures
32+ Data.Profunctor.Exposed
33+ other-modules:
34+ Paths_semi_iso
35+ hs-source-dirs:
36+ src
37+ ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wpartial-fields -Werror=missing-home-modules -Wmissing-home-modules -Widentities -Wredundant-constraints -Wmissing-export-lists
38+ build-depends:
39+ base >=4.7 && <5
40+ , lens
41+ , profunctors
42+ , semigroupoids
43+ , transformers
44+ default-language: Haskell2010
Control/Category/Reader.hs → src/Control/Category/Reader.hsrenamed

The content is the same.

Control/Category/Structures.hs → src/Control/Category/Structures.hsrenamed

The content is the same.

Control/Lens/Internal/SemiIso.hs → src/Control/Lens/Internal/SemiIso.hsrenamed

The content is the same.

Control/Lens/SemiIso.hs → src/Control/Lens/SemiIso.hsrenamed

The content is the same.

Control/SIArrow.hs → src/Control/SIArrow.hsrenamed

The content is the same.

Control/Tuple/Morph.hs → src/Control/Tuple/Morph.hsrenamed

The content is the same.

Data/Profunctor/Exposed.hs → src/Data/Profunctor/Exposed.hsrenamed

The content is the same.

stack.yamlnew file+69
@@ -0,0 +1,69 @@
1+# This file was automatically generated by 'stack init'
2+#
3+# Some commonly used options have been documented as comments in this file.
4+# For advanced use and comprehensive documentation of the format, please see:
5+# https://docs.haskellstack.org/en/stable/yaml_configuration/
6+
7+# Resolver to choose a 'specific' stackage snapshot or a compiler version.
8+# A snapshot resolver dictates the compiler version and the set of packages
9+# to be used for project dependencies. For example:
10+#
11+# resolver: lts-3.5
12+# resolver: nightly-2015-09-21
13+# resolver: ghc-7.10.2
14+#
15+# The location of a snapshot can be provided as a file or url. Stack assumes
16+# a snapshot provided as a file might change, whereas a url resource does not.
17+#
18+# resolver: ./custom-snapshot.yaml
19+# resolver: https://example.com/snapshots/2018-01-01.yaml
20+resolver: lts-14.6
21+
22+# User packages to be built.
23+# Various formats can be used as shown in the example below.
24+#
25+# packages:
26+# - some-directory
27+# - https://example.com/foo/bar/baz-0.0.2.tar.gz
28+# subdirs:
29+# - auto-update
30+# - wai
31+packages:
32+- .
33+# Dependency packages to be pulled from upstream that are not in the resolver.
34+# These entries can reference officially published versions as well as
35+# forks / in-progress versions pinned to a git hash. For example:
36+#
37+# extra-deps:
38+# - acme-missiles-0.3
39+# - git: https://github.com/commercialhaskell/stack.git
40+# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
41+#
42+# extra-deps: []
43+
44+# Override default flag values for local packages and extra-deps
45+# flags: {}
46+
47+# Extra package databases containing global packages
48+# extra-package-dbs: []
49+
50+# Control whether we use the GHC we find on the path
51+# system-ghc: true
52+#
53+# Require a specific version of stack, using version ranges
54+# require-stack-version: -any # Default
55+# require-stack-version: ">=2.1"
56+#
57+# Override the architecture used by stack, especially useful on Windows
58+# arch: i386
59+# arch: x86_64
60+#
61+# Extra directories used by stack for building
62+# extra-include-dirs: [/path/to/dir]
63+# extra-lib-dirs: [/path/to/dir]
64+#
65+# Allow a newer minor version of GHC than the snapshot specifies
66+# compiler-check: newer-minor
67+
68+ghc-options:
69+ "$locals": -ddump-to-file -ddump-hi -fwarn-unused-binds -fwarn-unused-imports