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