Safe Haskell | None |
---|---|
Language | Haskell2010 |
Expose newtypes of Text
to make program tokens
In this module, We represent the very easy operational semantics on the documents with ↓
small = a..z
large = A..Z
num = 0..9
alpha = small | large
alphaNum = alpha | num
symbol = ! | " | # | $ | % | & | | ( | ) | * | + | | | ' | - | . | / | : | ; | = | | ? | @ | [ | | ] | ^ | _ | ` | { | | | } | ~
- newtype PascalName = PascalName {
- unPascalName :: Text
- newtype CamelName = CamelName {
- unCamelName :: Text
- newtype SignName = SignName {
- unSignName :: Text
- newtype VisibleChar = VisibleChar {}
- visibleChars :: [VisibleChar]
- newtype UpperChar = UpperChar {
- unUpperChar :: Char
- upperChars :: [UpperChar]
- newtype LowerChar = LowerChar {
- unLowerChar :: Char
- lowerChars :: [LowerChar]
- newtype AlphaNumChar = AlphaNumChar {}
- alphaNumChars :: [AlphaNumChar]
- pattern AlphaNums :: [Char] -> List' AlphaNumChar
- unAlphaNums :: List' AlphaNumChar -> [Char]
- newtype SymbolChar = SymbolChar {
- unSymbolChar :: Char
- symbolChars :: [SymbolChar]
- pattern Symbols :: [Char] -> List' SymbolChar
- unSymbols :: List' SymbolChar -> [Char]
- newtype List' a = List' {
- unList' :: [a]
- newtype Text' = Text' {}
Documentation
newtype PascalName Source #
Like Konoko, Sugar, and Foo22OGA11RRR at the Random
and Arbitrary
instance
this = large :
{alphaNum}
newtype VisibleChar Source #
visibleChars :: [VisibleChar] Source #
All of VisibleChar
(the table)
A..Z at the Random
and Arbitrary
instance
(a subset of VisibleChar
)
upperChars :: [UpperChar] Source #
A subset of visibleChars
lowerChars :: [LowerChar] Source #
A subset of visibleChars
newtype AlphaNumChar Source #
alphaNumChars :: [AlphaNumChar] Source #
A subset of visibleChars
pattern AlphaNums :: [Char] -> List' AlphaNumChar Source #
>>>
xs = AlphaNums ['A', 'b', '3']
>>>
:t xs
List' AlphaNumChar
>>>
AlphaNums xs' = xs
>>>
:t xs'
[Char]
unAlphaNums :: List' AlphaNumChar -> [Char] Source #
newtype SymbolChar Source #
symbolChars :: [SymbolChar] Source #
A subset of visibleChars
A workaround for the Random
orphan instance