on a82837c help sign in
digit.cabal+32−37
since splitsnapshots
unifiedsplit
@@ -1,41 +1,36 @@
1−cabal-version: 2.4
1+cabal-version: 2.4
2−name: digit
2+name: digit
3−version: 0.1.0.0
3+version: 0.1.0.0
4−synopsis: Decimal digit
4+synopsis: Decimal digit
5−license-file: LICENSE
5+license-file: LICENSE
6−build-type: Simple
6+build-type: Simple
7
7
8library
8library
9− hs-source-dirs: src
9+ hs-source-dirs: src
10− ghc-options: -Wall
10+ ghc-options: -Wall
11− exposed-modules: Data.Digit
11+ exposed-modules: Data.Digit
12− build-depends:
12+ build-depends: base
13− , base >=4.9
14− , lens
15− , QuickCheck
13+ , QuickCheck
14+ , lens
15+ , missing-lens
16− , regex-applicative >=0.3.2
16+ , regex-applicative
17− , text
17+ , text
18−
19− default-language: Haskell2010
18+ default-language: Haskell2010
20− default-extensions:
19+ default-extensions: DeriveGeneric
21− DeriveGeneric
22− LambdaCase
20+ , LambdaCase
23
21
24test-suite spec
22test-suite spec
25− type: exitcode-stdio-1.0
23+ type: exitcode-stdio-1.0
26− hs-source-dirs: spec
24+ hs-source-dirs: spec
27− main-is: Spec.hs
25+ main-is: Spec.hs
28− default-language: Haskell2010
26+ default-language: Haskell2010
29− build-depends:
27+ build-depends: base
30− , base
31− , digit
32− , hspec
33− , lens
34− , QuickCheck
28+ , QuickCheck
35− , quickcheck-instances
29+ , quickcheck-instances
36−
30+ , digit
31+ , lens
32+ , hspec
37− build-tool-depends: hspec-discover:hspec-discover
33+ build-tool-depends: hspec-discover:hspec-discover
38− other-modules: DigitSpec
34+ other-modules: DigitSpec
39− default-extensions:
35+ default-extensions: RankNTypes
40− RankNTypes
41− TypeApplications
36+ , TypeApplications
src/Data/Digit.hs+1−1
@@ -23,6 +23,7 @@ module Data.Digit
23 ) where
23 ) where
24
24
25import Control.Lens
25import Control.Lens
26+import Control.Lens.Missing
26import Data.Foldable as F
27import Data.Foldable as F
27import Data.List as L
28import Data.List as L
28import Data.List.NonEmpty as NE
29import Data.List.NonEmpty as NE
@@ -116,7 +117,6 @@ _Digits = below _Digit
116
117
117_DigitsText :: Prism' Text (NE.NonEmpty Digit)
118_DigitsText :: Prism' Text (NE.NonEmpty Digit)
118_DigitsText = from packed . _Digits . _NonEmptyList
119_DigitsText = from packed . _Digits . _NonEmptyList
119− where _NonEmptyList = prism' NE.toList NE.nonEmpty
120
120
121_DigitsInt :: Integral n => Prism' n NormalDigits
121_DigitsInt :: Integral n => Prism' n NormalDigits
122_DigitsInt = prism' (digitsToNum . unDigits) positiveIntToDigits
122_DigitsInt = prism' (digitsToNum . unDigits) positiveIntToDigits
stack.yaml+5−1
@@ -1,4 +1,8 @@
1−resolver: lts-20.3
1+resolver: lts-19.0
2
2
3packages:
3packages:
4- .
4- .
5+
6+extra-deps:
7+- git: https://github.com/typeable/missing-lens.git
8+ commit: 328659fdda8fd7ec509abfab6298775062fc2926