{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Data.SemanticVersion.IdentifierCharacters where
import Control.Lens hiding (cons)
import Data.List.NonEmpty
import Data.SemanticVersion.IdentifierCharacter
import Text.Parser.Char
newtype IdentifierCharacters =
IdentifierCharacters (NonEmpty IdentifierCharacter)
deriving (IdentifierCharacters -> IdentifierCharacters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentifierCharacters -> IdentifierCharacters -> Bool
$c/= :: IdentifierCharacters -> IdentifierCharacters -> Bool
== :: IdentifierCharacters -> IdentifierCharacters -> Bool
$c== :: IdentifierCharacters -> IdentifierCharacters -> Bool
Eq, Int -> IdentifierCharacters -> ShowS
[IdentifierCharacters] -> ShowS
IdentifierCharacters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentifierCharacters] -> ShowS
$cshowList :: [IdentifierCharacters] -> ShowS
show :: IdentifierCharacters -> String
$cshow :: IdentifierCharacters -> String
showsPrec :: Int -> IdentifierCharacters -> ShowS
$cshowsPrec :: Int -> IdentifierCharacters -> ShowS
Show)
class HasIdentifierCharacters a where
identifierCharacters ::
Lens' a IdentifierCharacters
instance HasIdentifierCharacters IdentifierCharacters where
identifierCharacters :: Lens' IdentifierCharacters IdentifierCharacters
identifierCharacters =
forall a. a -> a
id
class AsIdentifierCharacters a where
_IdentifierCharacters ::
Prism' a IdentifierCharacters
instance AsIdentifierCharacters IdentifierCharacters where
_IdentifierCharacters :: Prism' IdentifierCharacters IdentifierCharacters
_IdentifierCharacters =
forall a. a -> a
id
instance IdentifierCharacters ~ t => Rewrapped IdentifierCharacters t
instance Wrapped IdentifierCharacters where
type Unwrapped IdentifierCharacters = NonEmpty IdentifierCharacter
_Wrapped' :: Iso' IdentifierCharacters (Unwrapped IdentifierCharacters)
_Wrapped' =
forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso
(\(IdentifierCharacters NonEmpty IdentifierCharacter
x) -> NonEmpty IdentifierCharacter
x)
NonEmpty IdentifierCharacter -> IdentifierCharacters
IdentifierCharacters
parseIdentifierCharacters ::
CharParsing p =>
p IdentifierCharacters
parseIdentifierCharacters :: forall (p :: * -> *). CharParsing p => p IdentifierCharacters
parseIdentifierCharacters =
NonEmpty IdentifierCharacter -> IdentifierCharacters
IdentifierCharacters forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (f :: * -> *) a. Alternative f => f a -> f (NonEmpty a)
some1 forall (p :: * -> *). CharParsing p => p IdentifierCharacter
parseIdentifierCharacter