on master help sign in
Fix up .cabal file and build errors.
7da08cfWill Jones
generic-lens.cabal+60−127
@@ -1,144 +1,77 @@
1−name: generic-lens
1+name: generic-lens
2−
3−version: 0.3.0.0
2+version: 0.3.0.0
4−
5−synopsis: Generic data-structure operations exposed as lenses.
3+synopsis: Generic data-structure operations exposed as lenses.
6−
7−description: This package uses the GHC 8 Generic representation to derive various operations on data structures with a lens interface, including structural subtype relationship between records and positional indexing into arbitrary product types.
4+description: This package uses the GHC 8 Generic representation to derive various operations on data structures with a lens interface, including structural subtype relationship between records and positional indexing into arbitrary product types.
8−
5+
9−homepage: https://github.com/kcsongor/generic-lens
6+homepage: https://github.com/kcsongor/generic-lens
10−
11−license: BSD3
7+license: BSD3
12−
13−license-file: LICENSE
8+license-file: LICENSE
14−
15−author: Csongor Kiss
9+author: Csongor Kiss
16−
17−maintainer: kiss.csongor.kiss@gmail.com
10+maintainer: kiss.csongor.kiss@gmail.com
18−
19−category: Generics, Records, Lens
11+category: Generics, Records, Lens
20−
21−build-type: Simple
12+build-type: Simple
22−
13+cabal-version: >= 1.10
23−-- Extra files to be distributed with the package, such as examples or a
14+
24−-- README.
25−extra-source-files: ChangeLog.md
15+extra-source-files: ChangeLog.md
26− , examples/StarWars.hs
16+ , examples/StarWars.hs
27− , examples/Examples.hs
17+ , examples/Examples.hs
28− , README.md
18+ , README.md
29−
30−-- Constraint on the version of Cabal needed to build this package.
31−cabal-version: >= 1.10
32−
33
19
34library
20library
35− exposed-modules: Data.Generics.Product
21+ exposed-modules: Data.Generics.Product
36− , Data.Generics.Product.Any
22+ , Data.Generics.Product.Any
37− , Data.Generics.Product.Fields
23+ , Data.Generics.Product.Fields
38− , Data.Generics.Product.Positions
24+ , Data.Generics.Product.Positions
39− , Data.Generics.Product.Subtype
25+ , Data.Generics.Product.Subtype
40− , Data.Generics.Product.Typed
26+ , Data.Generics.Product.Typed
41− , Data.Generics.Sum.Any
27+ , Data.Generics.Sum.Any
42− , Data.Generics.Sum.Constructors
28+ , Data.Generics.Sum.Constructors
43− , Data.Generics.Sum.Typed
29+ , Data.Generics.Sum.Typed
44−
30+
45− , Data.Generics.Record
46− , Data.Generics.Record.Subtype
47− , Data.Generics.Internal.Lens
48−
49− , Data.Generics.Internal.Lens
31+ , Data.Generics.Internal.Lens
50−
32+
51− other-modules: Data.Generics.Internal.Families
33+ other-modules: Data.Generics.Internal.Families
52− , Data.Generics.Internal.Families.Bool
34+ , Data.Generics.Internal.Families.Bool
53− , Data.Generics.Internal.Families.Count
35+ , Data.Generics.Internal.Families.Count
54− , Data.Generics.Internal.Families.Has
36+ , Data.Generics.Internal.Families.Has
55− , Data.Generics.Internal.HList
37+ , Data.Generics.Internal.HList
56−
38+
57− other-extensions: AllowAmbiguousTypes
58− , DataKinds
59− , FlexibleInstances
60− , FunctionalDependencies
61− , PolyKinds
62− , Rank2Types
63− , ScopedTypeVariables
64− , TypeApplications
65− , TypeFamilies
66− , TypeOperators
67− , UndecidableInstances
68−
69− -- Other library packages from which modules are imported.
70− build-depends: base >= 4.9 && <= 5.0
39+ build-depends: base >= 4.9 && <= 5.0
71− , profunctors >= 5.0 && <= 6.0
40+ , profunctors >= 5.0 && <= 6.0
72−
41+
73− -- Directories containing source files.
74− hs-source-dirs: src
42+ hs-source-dirs: src
75−
76− -- Base language which the package is written in.
77− default-language: Haskell2010
43+ default-language: Haskell2010
78− ghc-options: -Wall
44+ ghc-options: -Wall
79
45
80source-repository head
46source-repository head
81− type: git
47+ type: git
82− location: https://github.com/kcsongor/generic-lens
48+ location: https://github.com/kcsongor/generic-lens
83
49
84test-suite generic-lens-test
50test-suite generic-lens-test
85− type:
86− exitcode-stdio-1.0
51+ type: exitcode-stdio-1.0
87− hs-source-dirs:
52+ hs-source-dirs: test
88− test
89− main-is:
53+ main-is: Spec.hs
90− Spec.hs
91
54
92− build-depends: base >= 4.9 && <= 5.0
55+ build-depends: base >= 4.9 && <= 5.0
93− , QuickCheck
56+ , QuickCheck
94− , hspec
57+ , hspec
95− , generic-lens
58+ , generic-lens
96
59
60+ default-language: Haskell2010
97− ghc-options:
61+ ghc-options: -Wall
98− -Wall
99− other-extensions: AllowAmbiguousTypes
100− , DataKinds
101− , FlexibleInstances
102− , FunctionalDependencies
103− , PolyKinds
104− , Rank2Types
105− , ScopedTypeVariables
106− , TypeApplications
107− , TypeFamilies
108− , TypeOperators
109− , UndecidableInstances
110− default-language:
111− Haskell2010
112
62
113benchmark generic-lens-bench
63benchmark generic-lens-bench
114− type:
115− exitcode-stdio-1.0
64+ type: exitcode-stdio-1.0
116− hs-source-dirs:
65+ hs-source-dirs: benchmarks
117− benchmarks
118− main-is:
119− Bench.hs
66+ main-is: Bench.hs
120
67
121− build-depends: generic-lens
68+ build-depends: generic-lens
122
69
70+ , base >= 4.9 && <= 5.0
123 , QuickCheck
71 , QuickCheck
124− , base
125 , criterion
72 , criterion
126 , deepseq
73 , deepseq
127 , lens
74 , lens
128
75
76+ default-language: Haskell2010
129− ghc-options:
77+ ghc-options: -Wall
130− -Wall
131− other-extensions: AllowAmbiguousTypes
132− , DataKinds
133− , FlexibleInstances
134− , FunctionalDependencies
135− , PolyKinds
136− , Rank2Types
137− , ScopedTypeVariables
138− , TypeApplications
139− , TypeFamilies
140− , TypeOperators
141− , UndecidableInstances
142−
143− default-language:
144− Haskell2010
src/Data/Generics/Product/Subtype.hs+5−6
@@ -53,12 +53,11 @@ module Data.Generics.Product.Subtype
53 ( Subtype (..)
53 ( Subtype (..)
54 ) where
54 ) where
55
55
56−import Data.Generics.Product.Fields
56+import Data.Generics.Internal.Families
57−import Data.Generics.Internal.Families.Has (HasFieldP)
58−
59import Data.Generics.Internal.Lens
57import Data.Generics.Internal.Lens
58+import Data.Generics.Product.Fields
60
59
61−import Data.Kind (Type)
60+import Data.Kind
62import GHC.Generics
61import GHC.Generics
63
62
64-- |Structural subtype relationship
63-- |Structural subtype relationship
@@ -139,10 +138,10 @@ instance (GSmash a sup, GSmash b sup) => GSmash (a :*: b) sup where
139
138
140instance
139instance
141 ( leaf ~ (S1 ('MetaSel ('Just field) p f b) t)
140 ( leaf ~ (S1 ('MetaSel ('Just field) p f b) t)
142− , GSmashLeaf leaf sup (HasFieldP field sup)
141+ , GSmashLeaf leaf sup (HasTotalFieldP field sup)
143 ) => GSmash (S1 ('MetaSel ('Just field) p f b) t) sup where
142 ) => GSmash (S1 ('MetaSel ('Just field) p f b) t) sup where
144
143
145− gsmash = gsmashLeaf @_ @_ @(HasFieldP field sup)
144+ gsmash = gsmashLeaf @_ @_ @(HasTotalFieldP field sup)
146
145
147instance GSmash sub sup => GSmash (C1 c sub) sup where
146instance GSmash sub sup => GSmash (C1 c sub) sup where
148 gsmash sup (M1 sub) = M1 (gsmash sup sub)
147 gsmash sup (M1 sub) = M1 (gsmash sup sub)