{-# LANGUAGE NoImplicitPrelude #-}
module Data.Digit.Class.D8(
D8(..)
, parse8
) where
import Control.Category (id)
import Control.Lens (Prism', (#))
import Data.Functor ((<$))
import Text.Parser.Char(CharParsing, char)
import Text.Parser.Combinators((<?>))
class D8 d where
d8 ::
Prism'
d
()
x8 ::
d
x8 =
Tagged () (Identity ()) -> Tagged d (Identity d)
forall d. D8 d => Prism' d ()
d8 (Tagged () (Identity ()) -> Tagged d (Identity d)) -> () -> d
forall t b. AReview t b -> b -> t
# ()
instance D8 () where
d8 :: p () (f ()) -> p () (f ())
d8 =
p () (f ()) -> p () (f ())
forall k (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id
parse8 ::
(D8 d, CharParsing p) =>
p d
parse8 :: p d
parse8 =
d
forall d. D8 d => d
x8 d -> p Char -> p d
forall (f :: * -> *) a b. Functor f => a -> f b -> f a
<$ Char -> p Char
forall (m :: * -> *). CharParsing m => Char -> m Char
char Char
'8' p d -> String -> p d
forall (m :: * -> *) a. Parsing m => m a -> String -> m a
<?> String
"8"