on master help sign in
Added cache and matrix (#9)

* Added cache and matrix * moved extensions to package.yaml * removed lts-12.26 * Added TemplateHaskell pragmas * Added overloadedStrings * Fixed type inference in tests * Fixed warnings

commita0931060c5dd682caa702692378d0e39ab88b7c0 authoriko <ilyakooo0@gmail.com> dateThu 23 Jan 2020, 21:02 (7 years ago) parent49556aa
25 files changed+38−193
.github/workflows/haskell.yml+12−2 package.yaml+23 src/Control/Arrow/Extra/ArrowChoice.hs−4 src/Control/Arrow/Extra/ArrowPlus.hs−4 src/Control/Arrow/Extra/ArrowZero.hs−4 src/Control/Arrow/Extra/BaseArrow.hs−3 src/Control/Arrow/Extra/Orphans.hs−5 src/Control/Arrow/Extra/PolyArrow.hs−4 src/Control/Tuple/Morph.hs−25 src/Data/Isoparsec.hs−11 src/Data/Isoparsec/ByteString.hs−10 src/Data/Isoparsec/Char.hs−7 src/Data/Isoparsec/Chunks.hs−7 src/Data/Isoparsec/Cokleisli.hs−6 src/Data/Isoparsec/Internal.hs−12 src/Data/Isoparsec/Megaparsec.hs−10 src/Data/Isoparsec/Printer.hs−6 src/Data/Isoparsec/ToIsoparsec.hs−11 src/Data/Isoparsec/Tokenable.hs−4 test/Spec/Helper.hs−6 test/Spec/JSON.hs−11 test/Spec/Megaparsec/BasicNums.hs+2−7 test/Spec/Orphans.hs−9 test/Spec/Ssh.hs−14 test/Spec/TwoDigits.hs+1−11
.github/workflows/haskell.yml+12−2
@@ -7,16 +7,26 @@ jobs:
77
88 runs-on: ubuntu-latest
99
10+ strategy:
11+ matrix:
12+ resolver: [lts-13.11, lts-13.19, lts-14]
13+
1014 steps:
1115 - uses: actions/checkout@v1
1216
17+ - name: Cache
18+ uses: actions/cache@v1
19+ with:
20+ path: ~/.stack
21+ key: ${{ runner.os }}-stack-${{ matrix.resolver }}
22+
1323 - name: Build
1424 run: |
15− stack build --fast --pedantic --ghc-options '-j' --test --no-run-tests --bench --no-run-benchmarks
25+ stack build --fast --pedantic --ghc-options '-j' --test --no-run-tests --bench --no-run-benchmarks --resolver=${{ matrix.resolver }}
1626
1727 - name: Test
1828 run: |
19− stack test --fast --pedantic --ghc-options '-j'
29+ stack test --fast --pedantic --ghc-options '-j' --resolver=${{ matrix.resolver }}
2030
2131 - name: Weeder
2232 run: |
package.yaml+23
@@ -33,6 +33,29 @@ library:
3333 # - text
3434 - mtl
3535
36+default-extensions:
37+- AllowAmbiguousTypes
38+- ConstraintKinds
39+- DataKinds
40+- DefaultSignatures
41+- DeriveGeneric
42+- FlexibleContexts
43+- FlexibleInstances
44+- FunctionalDependencies
45+- GADTs
46+- GeneralizedNewtypeDeriving
47+- LambdaCase
48+- MultiParamTypeClasses
49+- OverloadedStrings
50+- PatternSynonyms
51+- PolyKinds
52+- ScopedTypeVariables
53+- StandaloneDeriving
54+- TupleSections
55+- TypeApplications
56+- TypeFamilies
57+- TypeOperators
58+- UndecidableInstances
3659
3760executables:
3861 isoparsec-exe:
src/Control/Arrow/Extra/ArrowChoice.hs−4
@@ -1,7 +1,4 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE MonoLocalBinds #-}
31{-# LANGUAGE NoImplicitPrelude #-}
4−{-# LANGUAGE UndecidableInstances #-}
52
63module Control.Arrow.Extra.ArrowChoice
74 ( ArrowChoice (..),
@@ -17,7 +14,6 @@ infixl 2 +++
1714infixl 2 |||
1815
1916class BaseArrow a => ArrowChoice a where
20−
2117 left :: a b c -> a (Either b d) (Either c d)
2218 left = (+++ id)
2319
src/Control/Arrow/Extra/ArrowPlus.hs−4
@@ -1,7 +1,3 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE MonoLocalBinds #-}
3−{-# LANGUAGE UndecidableInstances #-}
4−
51module Control.Arrow.Extra.ArrowPlus
62 ( ArrowPlus (..),
73 )
src/Control/Arrow/Extra/ArrowZero.hs−4
@@ -1,7 +1,3 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE MonoLocalBinds #-}
3−{-# LANGUAGE UndecidableInstances #-}
4−
51module Control.Arrow.Extra.ArrowZero
62 ( ArrowZero (..),
73 )
src/Control/Arrow/Extra/BaseArrow.hs−3
@@ -1,6 +1,4 @@
1−{-# LANGUAGE FlexibleInstances #-}
21{-# LANGUAGE NoImplicitPrelude #-}
3−{-# LANGUAGE UndecidableInstances #-}
42
53module Control.Arrow.Extra.BaseArrow
64 ( BaseArrow (..),
@@ -14,7 +12,6 @@ infixl 3 ***
1412infixl 3 &&&
1513
1614class Category a => BaseArrow a where
17−
1815 {-# MINIMAL (***), (&&&) #-}
1916
2017 first :: a b c -> a (b, d) (c, d)
src/Control/Arrow/Extra/Orphans.hs−5
@@ -1,6 +1,3 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE MultiParamTypeClasses #-}
3−{-# LANGUAGE UndecidableInstances #-}
41{-# OPTIONS_GHC -Wno-orphans #-}
52
63module Control.Arrow.Extra.Orphans
@@ -15,7 +12,6 @@ instance {-# OVERLAPPABLE #-} A.ArrowZero a => ArrowZero a where
1512 zeroArrow = A.zeroArrow
1613
1714instance {-# OVERLAPPABLE #-} A.ArrowChoice a => ArrowChoice a where
18−
1915 left = A.left
2016
2117 right = A.right
@@ -25,7 +21,6 @@ instance {-# OVERLAPPABLE #-} A.ArrowChoice a => ArrowChoice a where
2521 (|||) = (A.|||)
2622
2723instance {-# OVERLAPPABLE #-} (Category a, A.Arrow a) => BaseArrow a where
28−
2924 first = A.first
3025
3126 second = A.second
src/Control/Arrow/Extra/PolyArrow.hs−4
@@ -1,7 +1,3 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE MonoLocalBinds #-}
3−{-# LANGUAGE MultiParamTypeClasses #-}
4−
51module Control.Arrow.Extra.PolyArrow
62 ( PolyArrow (..),
73 (^>>),
src/Control/Tuple/Morph.hs−25
@@ -1,18 +1,3 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE ConstraintKinds #-}
3−{-# LANGUAGE DataKinds #-}
4−{-# LANGUAGE FlexibleContexts #-}
5−{-# LANGUAGE FlexibleInstances #-}
6−{-# LANGUAGE FunctionalDependencies #-}
7−{-# LANGUAGE GADTs #-}
8−{-# LANGUAGE PatternSynonyms #-}
9−{-# LANGUAGE PolyKinds #-}
10−{-# LANGUAGE RankNTypes #-}
11−{-# LANGUAGE ScopedTypeVariables #-}
12−{-# LANGUAGE TypeApplications #-}
13−{-# LANGUAGE TypeFamilies #-}
14−{-# LANGUAGE TypeOperators #-}
15−{-# LANGUAGE UndecidableInstances #-}
161{-# OPTIONS_GHC -Wno-incomplete-patterns -Wno-redundant-constraints #-}
172
183module Control.Tuple.Morph
@@ -189,13 +174,11 @@ type family Length (aa :: [k]) :: Nat where
189174-- # Morphing
190175
191176class TupleMorphable t th | t -> th where
192−
193177 unmorph :: t -> HList th
194178
195179 morph :: HList th -> t
196180
197181instance (IsMophableTuple t ~ flag, TupleMorphable' t th flag) => TupleMorphable t th where
198−
199182 unmorph = unmorph' (Proxy @flag)
200183
201184 morph = morph' (Proxy @flag)
@@ -203,19 +186,16 @@ instance (IsMophableTuple t ~ flag, TupleMorphable' t th flag) => TupleMorphable
203186-- ## Implementation
204187
205188class TupleMorphable' t th (flag :: Bool) | t flag -> th where
206−
207189 unmorph' :: Proxy flag -> t -> HList th
208190
209191 morph' :: Proxy flag -> HList th -> t
210192
211193instance TupleMorphable' t '[t] 'False where
212−
213194 unmorph' _ t = t :+ HNil
214195
215196 morph' _ (t :+ HNil) = t
216197
217198instance (GenericTupleMorphable (Rep t) th, Generic t) => TupleMorphable' t th 'True where
218−
219199 unmorph' _ = genericUnmorph . from
220200
221201 morph' _ = to . genericMorph
@@ -223,25 +203,21 @@ instance (GenericTupleMorphable (Rep t) th, Generic t) => TupleMorphable' t th '
223203-- ### Generics
224204
225205class GenericTupleMorphable f th | f -> th where
226−
227206 genericUnmorph :: f p -> HList th
228207
229208 genericMorph :: HList th -> f p
230209
231210instance (GenericTupleMorphable f t) => GenericTupleMorphable (M1 i c f) t where
232−
233211 genericUnmorph = genericUnmorph . unM1
234212
235213 genericMorph = M1 . genericMorph
236214
237215instance (TupleMorphable c t) => GenericTupleMorphable (K1 i c) t where
238−
239216 genericUnmorph = unmorph . unK1
240217
241218 genericMorph = K1 . morph
242219
243220instance GenericTupleMorphable U1 '[] where
244−
245221 genericUnmorph _ = HNil
246222
247223 genericMorph _ = U1
@@ -260,7 +236,6 @@ instance
260236 ) =>
261237 GenericTupleMorphable (f :*: g) c
262238 where
263−
264239 genericUnmorph (a :*: b) = genericUnmorph a ++: genericUnmorph b
265240
266241 genericMorph cc = genericMorph aa :*: genericMorph bb
src/Data/Isoparsec.hs−11
@@ -1,14 +1,3 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE DataKinds #-}
3−{-# LANGUAGE ExistentialQuantification #-}
4−{-# LANGUAGE FlexibleContexts #-}
5−{-# LANGUAGE FlexibleInstances #-}
6−{-# LANGUAGE FunctionalDependencies #-}
7−{-# LANGUAGE PolyKinds #-}
8−{-# LANGUAGE ScopedTypeVariables #-}
9−{-# LANGUAGE TypeApplications #-}
10−{-# LANGUAGE TypeFamilies #-}
11−{-# LANGUAGE TypeOperators #-}
121{-# OPTIONS_GHC -Wno-redundant-constraints #-}
132
143module Data.Isoparsec
src/Data/Isoparsec/ByteString.hs−10
@@ -1,14 +1,4 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE FlexibleInstances #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5−{-# LANGUAGE MultiParamTypeClasses #-}
6−{-# LANGUAGE ScopedTypeVariables #-}
7−{-# LANGUAGE TupleSections #-}
8−{-# LANGUAGE TypeApplications #-}
9−{-# LANGUAGE TypeFamilies #-}
101{-# OPTIONS_GHC -Wno-orphans #-}
11−
122module Data.Isoparsec.ByteString
133 ( utf8,
144 ftu8,
src/Data/Isoparsec/Char.hs−7
@@ -1,10 +1,3 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE DataKinds #-}
3−{-# LANGUAGE FlexibleContexts #-}
4−{-# LANGUAGE RankNTypes #-}
5−{-# LANGUAGE TypeApplications #-}
6−{-# LANGUAGE TypeFamilies #-}
7−
81module Data.Isoparsec.Char
92 ( unsafeWhiteSpace,
103 unsafeWhiteSpace1,
src/Data/Isoparsec/Chunks.hs−7
@@ -1,10 +1,3 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE FlexibleInstances #-}
3−{-# LANGUAGE MultiParamTypeClasses #-}
4−{-# LANGUAGE ScopedTypeVariables #-}
5−{-# LANGUAGE TypeApplications #-}
6−{-# LANGUAGE TypeFamilies #-}
7−
81module Data.Isoparsec.Chunks
92 ( Chunk (..),
103 )
src/Data/Isoparsec/Cokleisli.hs−6
@@ -1,6 +1,3 @@
1−{-# LANGUAGE LambdaCase #-}
2−{-# LANGUAGE MultiParamTypeClasses #-}
3−
41module Data.Isoparsec.Cokleisli
52 ( Cokleisli (..),
63 )
@@ -16,13 +13,11 @@ import Prelude hiding ((.))
1613newtype Cokleisli m a b = Cokleisli {unCokleisli :: b -> m a}
1714
1815instance Monad m => Category (Cokleisli m) where
19−
2016 id = Cokleisli return
2117
2218 (Cokleisli cb) . (Cokleisli ba) = Cokleisli $ cb >=> ba
2319
2420instance (Alternative m, Monad m) => BaseArrow (Cokleisli m) where
25−
2621 (Cokleisli cb) *** (Cokleisli c'b') = Cokleisli $
2722 \(c, c') -> do
2823 b' <- c'b' c'
@@ -44,7 +39,6 @@ instance MonadPlus m => ArrowPlus (Cokleisli m) where
4439 (Cokleisli lhs) <+> (Cokleisli rhs) = Cokleisli $ \x -> lhs x `mplus` rhs x
4540
4641instance (Alternative m, Monad m) => ArrowChoice (Cokleisli m) where
47−
4842 left (Cokleisli cb) = Cokleisli $ \case
4943 Left c -> Left <$> cb c
5044 Right d -> return $ Right d
src/Data/Isoparsec/Internal.hs−12
@@ -1,15 +1,3 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE DataKinds #-}
3−{-# LANGUAGE DefaultSignatures #-}
4−{-# LANGUAGE FlexibleContexts #-}
5−{-# LANGUAGE FlexibleInstances #-}
6−{-# LANGUAGE FunctionalDependencies #-}
7−{-# LANGUAGE LambdaCase #-}
8−{-# LANGUAGE LiberalTypeSynonyms #-}
9−{-# LANGUAGE TypeFamilies #-}
10−{-# LANGUAGE TypeOperators #-}
11−{-# LANGUAGE UndecidableInstances #-}
12−
131module Data.Isoparsec.Internal
142 ( SemiIso' (..),
153 SemiIso,
src/Data/Isoparsec/Megaparsec.hs−10
@@ -1,12 +1,3 @@
1−{-# LANGUAGE FlexibleInstances #-}
2−{-# LANGUAGE LambdaCase #-}
3−{-# LANGUAGE MultiParamTypeClasses #-}
4−{-# LANGUAGE QuantifiedConstraints #-}
5−{-# LANGUAGE RankNTypes #-}
6−{-# LANGUAGE ScopedTypeVariables #-}
7−{-# LANGUAGE TypeApplications #-}
8−{-# LANGUAGE TypeFamilies #-}
9−{-# LANGUAGE UndecidableInstances #-}
101{-# OPTIONS_GHC -Wno-orphans #-}
112
123module Data.Isoparsec.Megaparsec
@@ -45,7 +36,6 @@ instance
4536 (MonadParsec e s m, M.Token s ~ Token s, s ~ M.Tokens s, Tokenable s) =>
4637 Isoparsec (Kleisli m) s
4738 where
48−
4939 anyToken = Kleisli $ const anySingle
5040
5141 token t = Kleisli . const $ M.single t $> ()
src/Data/Isoparsec/Printer.hs−6
@@ -1,8 +1,3 @@
1−{-# LANGUAGE FlexibleContexts #-}
2−{-# LANGUAGE FlexibleInstances #-}
3−{-# LANGUAGE MultiParamTypeClasses #-}
4−{-# LANGUAGE RankNTypes #-}
5−{-# LANGUAGE UndecidableInstances #-}
61{-# OPTIONS_GHC -Wno-orphans #-}
72
83module Data.Isoparsec.Printer
@@ -42,7 +37,6 @@ instance
4237 (MonadPlus m, Monoid s, Eq (Token s), Tokenable s, Show s) =>
4338 Isoparsec (Cokleisli (WriterT (Dual s) m)) s
4439 where
45−
4640 token t = Cokleisli $ const $ tell . Dual . liftToken $ t
4741
4842 anyToken = Cokleisli $ tell . Dual . liftToken
src/Data/Isoparsec/ToIsoparsec.hs−11
@@ -1,12 +1,3 @@
1−{-# LANGUAGE DefaultSignatures #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE FlexibleInstances #-}
4−{-# LANGUAGE MultiParamTypeClasses #-}
5−{-# LANGUAGE ScopedTypeVariables #-}
6−{-# LANGUAGE TypeFamilies #-}
7−{-# LANGUAGE TypeOperators #-}
8−{-# LANGUAGE UndecidableInstances #-}
9−
101module Data.Isoparsec.ToIsoparsec
112 ( ToIsoparsec (..),
123 )
@@ -22,9 +13,7 @@ instance {-# OVERLAPPABLE #-} t ~ Token s => ToIsoparsec t s where
2213 toIsoparsec = anyToken
2314
2415class ToIsoparsec a s where
25−
2616 toIsoparsec :: Isoparsec m s => m () a
27−
2817 default toIsoparsec :: (Isoparsec m s, Generic a, GToIsoparsec (Rep a) s) => m () a
2918 toIsoparsec = gToIsoparsec >>^ si' (Just . to) (Just . from)
3019
src/Data/Isoparsec/Tokenable.hs−4
@@ -1,12 +1,9 @@
1−{-# LANGUAGE TypeFamilies #-}
2−
31module Data.Isoparsec.Tokenable
42 ( Tokenable (..),
53 )
64where
75
86class Monoid s => Tokenable s where
9−
107 type Token s
118
129 {-# MINIMAL (liftTokens | liftToken), lowerTokens #-}
@@ -20,7 +17,6 @@ class Monoid s => Tokenable s where
2017 lowerTokens :: s -> [Token s]
2118
2219instance Tokenable [t] where
23−
2420 type Token [t] = t
2521
2622 liftTokens = id
test/Spec/Helper.hs−6
@@ -1,9 +1,3 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE ScopedTypeVariables #-}
4−{-# LANGUAGE TypeApplications #-}
5−{-# LANGUAGE TypeFamilies #-}
6−
71module Spec.Helper
82 ( shouldParseBS,
93 roundtrip,
test/Spec/JSON.hs−11
@@ -1,14 +1,4 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE DataKinds #-}
3−{-# LANGUAGE ExistentialQuantification #-}
4−{-# LANGUAGE FlexibleContexts #-}
5−{-# LANGUAGE FlexibleInstances #-}
6−{-# LANGUAGE FunctionalDependencies #-}
7−{-# LANGUAGE PolyKinds #-}
81{-# LANGUAGE TemplateHaskell #-}
9−{-# LANGUAGE TypeApplications #-}
10−{-# LANGUAGE TypeFamilies #-}
11−{-# LANGUAGE TypeOperators #-}
122
133module Spec.JSON
144 ( quickSpec,
@@ -36,7 +26,6 @@ data JSON
3626 deriving (Show, Eq)
3727
3828instance Arbitrary JSON where
39−
4029 arbitrary =
4130 oneof
4231 [ Object <$> listOf ((,) <$> listOf (elements ['.' .. 'z']) <*> scale (`div` 2) arbitrary),
test/Spec/Megaparsec/BasicNums.hs+2−7
@@ -1,9 +1,4 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE FlexibleContexts #-}
3−{-# LANGUAGE RankNTypes #-}
41{-# LANGUAGE TemplateHaskell #-}
5−{-# LANGUAGE TypeApplications #-}
6−{-# LANGUAGE TypeFamilies #-}
72
83module Spec.Megaparsec.BasicNums
94 ( spec,
@@ -33,8 +28,8 @@ instance Arbitrary Foo where
3328
3429makePrisms ''Foo
3530
36−parser :: (Isoparsec m s, Token s ~ Char, IsoparsecLabel m String) => m () Foo
37−parser = _Foo <.> (number &&& unsafeWhiteSpace1 &&& number <?> "oh no")
31+parser :: (Isoparsec m String, IsoparsecLabel m String) => m () Foo
32+parser = _Foo <.> (number &&& unsafeWhiteSpace1 &&& number <?> ("oh no" :: String))
3833
3934spec :: Spec
4035spec =
test/Spec/Orphans.hs−9
@@ -1,12 +1,3 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE ExistentialQuantification #-}
3−{-# LANGUAGE FlexibleContexts #-}
4−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5−{-# LANGUAGE ScopedTypeVariables #-}
6−{-# LANGUAGE StandaloneDeriving #-}
7−{-# LANGUAGE TypeApplications #-}
8−{-# LANGUAGE TypeFamilies #-}
9−{-# LANGUAGE UndecidableInstances #-}
101{-# OPTIONS_GHC -Wno-orphans #-}
112
123module Spec.Orphans
test/Spec/Ssh.hs−14
@@ -1,18 +1,4 @@
1−{-# LANGUAGE BinaryLiterals #-}
2−{-# LANGUAGE ConstraintKinds #-}
3−{-# LANGUAGE DataKinds #-}
4−{-# LANGUAGE DeriveGeneric #-}
5−{-# LANGUAGE DerivingStrategies #-}
6−{-# LANGUAGE FlexibleContexts #-}
7−{-# LANGUAGE FlexibleInstances #-}
8−{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9−{-# LANGUAGE MultiParamTypeClasses #-}
10−{-# LANGUAGE OverloadedStrings #-}
11−{-# LANGUAGE ScopedTypeVariables #-}
12−{-# LANGUAGE StandaloneDeriving #-}
131{-# LANGUAGE TemplateHaskell #-}
14−{-# LANGUAGE TypeApplications #-}
15−{-# LANGUAGE TypeFamilies #-}
162
173module Spec.Ssh
184 ( spec,
test/Spec/TwoDigits.hs+1−11
@@ -1,13 +1,3 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DeriveGeneric #-}
3−{-# LANGUAGE DerivingVia #-}
4−{-# LANGUAGE FlexibleContexts #-}
5−{-# LANGUAGE FlexibleInstances #-}
6−{-# LANGUAGE MultiParamTypeClasses #-}
7−{-# LANGUAGE ScopedTypeVariables #-}
8−{-# LANGUAGE TypeApplications #-}
9−{-# LANGUAGE TypeFamilies #-}
10−
111module Spec.TwoDigits
122 ( spec,
133 quickSpec,
@@ -60,7 +50,7 @@ instance ToIsoparsec Digits String
6050
6151spec :: Spec
6252spec = do
63− let parser = toIsoparsec
53+ let parser = toIsoparsec @_ @String
6454 it "deserializes" $ do
6555 runMegaparsec @() parser "12" `shouldBe` Right (TwoDigits (SingleDigit "1") (SingleDigit "2"))
6656 runMegaparsec @() parser "125" `shouldBe` Right (ThreeDigits (SingleDigit "1") (SingleDigit "2") (SingleDigit "5"))