Copyright | (c) Eric Mertens 2022 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
>>>
autoTokenize [("A", [("A",40,["B"])])] :: [(Int, [(Int, Integer, [Int])])]
[(0,[(0,40,[1])])]
>>>
autoTokenize ("A","A","B","B") :: (Int, Int, String, Int)
(0,0,"B",1)
Documentation
runTokenize :: Tokenize a -> a Source #
autoTokenize :: AutoToken a b => a -> b Source #
class AutoToken a b where Source #
Nothing
Instances
AutoToken String Int Source # | |
AutoToken a a Source # | |
Defined in Advent.Tokenize | |
AutoToken (Set String) IntSet Source # | |
(Ord b, AutoToken a b) => AutoToken (Set a) (Set b) Source # | |
AutoToken a b => AutoToken (Maybe a) (Maybe b) Source # | |
AutoToken a b => AutoToken [a] [b] Source # | |
Defined in Advent.Tokenize | |
AutoToken a b => AutoToken (Map String a) (IntMap b) Source # | |
(AutoToken a1 b1, AutoToken a2 b2) => AutoToken (a1, a2) (b1, b2) Source # | |
Defined in Advent.Tokenize | |
(AutoToken a1 b1, AutoToken a2 b2, AutoToken a3 b3) => AutoToken (a1, a2, a3) (b1, b2, b3) Source # | |
Defined in Advent.Tokenize | |
(AutoToken a1 b1, AutoToken a2 b2, AutoToken a3 b3, AutoToken a4 b4) => AutoToken (a1, a2, a3, a4) (b1, b2, b3, b4) Source # | |
Defined in Advent.Tokenize |
class GAutoToken (f :: Type -> Type) (g :: Type -> Type) where Source #
gautoToken :: f x -> Tokenize (g x) Source #
Instances
GAutoToken (U1 :: Type -> Type) (U1 :: Type -> Type) Source # | |
Defined in Advent.Tokenize | |
GAutoToken (V1 :: Type -> Type) (V1 :: Type -> Type) Source # | |
Defined in Advent.Tokenize | |
(GAutoToken f1 f2, GAutoToken g1 g2) => GAutoToken (f1 :*: g1) (f2 :*: g2) Source # | |
Defined in Advent.Tokenize | |
(GAutoToken f1 f2, GAutoToken g1 g2) => GAutoToken (f1 :+: g1) (f2 :+: g2) Source # | |
Defined in Advent.Tokenize | |
AutoToken a b => GAutoToken (K1 i a :: Type -> Type) (K1 i b :: Type -> Type) Source # | |
Defined in Advent.Tokenize | |
GAutoToken f g => GAutoToken (M1 i c f) (M1 j d g) Source # | |
Defined in Advent.Tokenize |
genericAutoToken :: (Generic a, Generic b, GAutoToken (Rep a) (Rep b)) => a -> Tokenize b Source #