module Examples.Lang.ArithBlocks where import UVMHS lexer ∷ Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic lexer :: Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic lexer = 𝐿 𝕊 -> 𝐿 𝕊 -> 𝐿 𝕊 -> 𝐿 𝕊 -> 𝐿 𝕊 -> Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic lexerWSBasic ([𝕊] -> 𝐿 𝕊 forall a t. ToIter a t => t -> 𝐿 a list [𝕊 "(",𝕊 ")"]) 𝐿 𝕊 forall a. Null a => a null 𝐿 𝕊 forall a. Null a => a null ([𝕊] -> 𝐿 𝕊 forall a t. ToIter a t => t -> 𝐿 a list [𝕊 "==",𝕊 "+",𝕊 "*",𝕊 "-",𝕊 "^",𝕊 "!"]) ([𝕊] -> 𝐿 𝕊 forall a t. ToIter a t => t -> 𝐿 a list [𝕊 "local"]) testTokenizerSuccess ∷ IO () testTokenizerSuccess :: IO () testTokenizerSuccess = Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic -> 𝕊 -> (𝕍 (PreParserToken TokenWSBasic) -> 𝕍 (PreParserToken TokenWSBasic)) -> 𝕍 (ParserToken ℂ) -> IO () forall c t o u w w'. (Show u, Ord c, Ord t, Pretty t, Classified c t, Eq o, Eq u, Plus u, Pretty w') => Lexer c t o u w -> 𝕊 -> (𝕍 (PreParserToken w) -> 𝕍 (PreParserToken w')) -> 𝕍 (ParserToken t) -> IO () tokenizeFIOMain Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic lexer 𝕊 "" 𝕍 (PreParserToken TokenWSBasic) -> 𝕍 (PreParserToken TokenWSBasic) blockifyTokensWSBasic (𝕍 (ParserToken ℂ) -> IO ()) -> 𝕍 (ParserToken ℂ) -> IO () forall a b. (a -> b) -> a -> b $ 𝕊 -> 𝕍 (ParserToken ℂ) tokens (𝕊 -> 𝕍 (ParserToken ℂ)) -> 𝕊 -> 𝕍 (ParserToken ℂ) forall a b. (a -> b) -> a -> b $ 𝐼 𝕊 -> 𝕊 forall a t. (Monoid a, ToIter a t) => t -> a concat (𝐼 𝕊 -> 𝕊) -> 𝐼 𝕊 -> 𝕊 forall a b. (a -> b) -> a -> b $ 𝕊 -> [𝕊] -> 𝐼 𝕊 forall a t. ToIter a t => a -> t -> 𝐼 a inbetween 𝕊 "\n" [ 𝕊 "1 -- blah" , 𝕊 "2" , 𝕊 "3 4" , 𝕊 " 5" , 𝕊 "local 6" , 𝕊 "7" , 𝕊 "local 8" , 𝕊 " 9" , 𝕊 "local" , 𝕊 "10" , 𝕊 "local local " , 𝕊 " local" ] data Lit = IntegerL ℤ | DoubleL 𝔻 | StringL 𝕊 makePrettySum ''Lit data Atom = LitA Lit | NameA 𝕊 makePrettySum ''Atom type Exp = 𝐴 SrcCxt ExpPre data ExpPre = AtomE Atom | PlusE Exp Exp | TimesE Exp Exp | ExpoE Exp Exp | FactE Exp | NegateE Exp | EqualE Exp Exp | BlockE (𝐿 Exp) makePrisms ''ExpPre makePrettySum ''ExpPre cpLit ∷ CParser TokenWSBasic Lit cpLit :: CParser TokenWSBasic Lit cpLit = [CParser TokenWSBasic Lit] -> CParser TokenWSBasic Lit forall (m :: * -> *) a t. (Monad m, MonadFail m, ToIter (m a) t) => t -> m a tries [ ℤ -> Lit IntegerL (ℤ -> Lit) -> CParser TokenWSBasic ℤ -> CParser TokenWSBasic Lit forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ CParser TokenWSBasic ℤ cpIntegerWS , 𝔻 -> Lit DoubleL (𝔻 -> Lit) -> CParser TokenWSBasic 𝔻 -> CParser TokenWSBasic Lit forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ CParser TokenWSBasic 𝔻 cpDoubleWS , 𝕊 -> Lit StringL (𝕊 -> Lit) -> CParser TokenWSBasic 𝕊 -> CParser TokenWSBasic Lit forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ CParser TokenWSBasic 𝕊 cpStringWS ] cpAtom ∷ CParser TokenWSBasic Atom cpAtom :: CParser TokenWSBasic Atom cpAtom = 𝕊 -> CParser TokenWSBasic Atom -> CParser TokenWSBasic Atom forall t a. Ord t => 𝕊 -> CParser t a -> CParser t a cpNewContext 𝕊 "atom" (CParser TokenWSBasic Atom -> CParser TokenWSBasic Atom) -> CParser TokenWSBasic Atom -> CParser TokenWSBasic Atom forall a b. (a -> b) -> a -> b $ [CParser TokenWSBasic Atom] -> CParser TokenWSBasic Atom forall (m :: * -> *) a t. (Monad m, MonadFail m, ToIter (m a) t) => t -> m a tries [ Lit -> Atom LitA (Lit -> Atom) -> CParser TokenWSBasic Lit -> CParser TokenWSBasic Atom forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ CParser TokenWSBasic Lit cpLit , 𝕊 -> Atom NameA (𝕊 -> Atom) -> CParser TokenWSBasic 𝕊 -> CParser TokenWSBasic Atom forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ (TokenWSBasic -> 𝑂 𝕊) -> CParser TokenWSBasic 𝕊 forall t a. (t -> 𝑂 a) -> CParser t a cpShaped ((TokenWSBasic -> 𝑂 𝕊) -> CParser TokenWSBasic 𝕊) -> (TokenWSBasic -> 𝑂 𝕊) -> CParser TokenWSBasic 𝕊 forall a b. (a -> b) -> a -> b $ (TokenWSBasic ⌲ 𝕊) -> TokenWSBasic -> 𝑂 𝕊 forall a b. (a ⌲ b) -> a -> 𝑂 b view TokenWSBasic ⌲ 𝕊 nameTWSBasicL ] cpBlock ∷ CParser TokenWSBasic (𝐿 Exp) cpBlock :: CParser TokenWSBasic (𝐿 Exp) cpBlock = 𝕊 -> CParser TokenWSBasic (𝐿 Exp) -> CParser TokenWSBasic (𝐿 Exp) forall t a. Ord t => 𝕊 -> CParser t a -> CParser t a cpNewContext 𝕊 "block" (CParser TokenWSBasic (𝐿 Exp) -> CParser TokenWSBasic (𝐿 Exp)) -> CParser TokenWSBasic (𝐿 Exp) -> CParser TokenWSBasic (𝐿 Exp) forall a b. (a -> b) -> a -> b $ do CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic () forall (m :: * -> *) a. Functor m => m a -> m () void (CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic ()) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic () forall a b. (a -> b) -> a -> b $ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpBlockWS 𝕊 "local" CParser TokenWSBasic () -> CParser TokenWSBasic () forall (m :: * -> *) a. Functor m => m a -> m () void (CParser TokenWSBasic () -> CParser TokenWSBasic ()) -> CParser TokenWSBasic () -> CParser TokenWSBasic () forall a b. (a -> b) -> a -> b $ CParser TokenWSBasic () cpOpenWS 𝐿 Exp es ← CParser TokenWSBasic (𝐿 Exp) cpExpList CParser TokenWSBasic () -> CParser TokenWSBasic () forall (m :: * -> *) a. Functor m => m a -> m () void (CParser TokenWSBasic () -> CParser TokenWSBasic ()) -> CParser TokenWSBasic () -> CParser TokenWSBasic () forall a b. (a -> b) -> a -> b $ CParser TokenWSBasic () cpCloseWS 𝐿 Exp -> CParser TokenWSBasic (𝐿 Exp) forall a. a -> CParser TokenWSBasic a forall (m :: * -> *) a. Return m => a -> m a return 𝐿 Exp es cpExp ∷ CParser TokenWSBasic Exp cpExp :: CParser TokenWSBasic Exp cpExp = 𝕊 -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre -> CParser TokenWSBasic Exp forall t a. Ord t => 𝕊 -> MixfixF t (𝐴 SrcCxt) a -> CParser t (𝐴 SrcCxt a) fmixfixWithContext 𝕊 "exp" (MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre -> CParser TokenWSBasic Exp) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre -> CParser TokenWSBasic Exp forall a b. (a -> b) -> a -> b $ [MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre] -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a t. (Monoid a, ToIter a t) => t -> a concat [ CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t a (f :: * -> *). CParser t a -> MixfixF t f a fmixTerminal (CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ do CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic () forall (m :: * -> *) a. Functor m => m a -> m () void (CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic ()) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic () forall a b. (a -> b) -> a -> b $ TokenWSBasic -> CParser TokenWSBasic TokenWSBasic forall t. Ord t => t -> CParser t t cpToken (TokenWSBasic -> CParser TokenWSBasic TokenWSBasic) -> TokenWSBasic -> CParser TokenWSBasic TokenWSBasic forall a b. (a -> b) -> a -> b $ 𝕊 -> TokenWSBasic SyntaxTWSBasic 𝕊 "(" Exp e ← CParser TokenWSBasic Exp cpExp CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic () forall (m :: * -> *) a. Functor m => m a -> m () void (CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic ()) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic () forall a b. (a -> b) -> a -> b $ TokenWSBasic -> CParser TokenWSBasic TokenWSBasic forall t. Ord t => t -> CParser t t cpToken (TokenWSBasic -> CParser TokenWSBasic TokenWSBasic) -> TokenWSBasic -> CParser TokenWSBasic TokenWSBasic forall a b. (a -> b) -> a -> b $ 𝕊 -> TokenWSBasic SyntaxTWSBasic 𝕊 ")" ExpPre -> CParser TokenWSBasic ExpPre forall a. a -> CParser TokenWSBasic a forall (m :: * -> *) a. Return m => a -> m a return (ExpPre -> CParser TokenWSBasic ExpPre) -> ExpPre -> CParser TokenWSBasic ExpPre forall a b. (a -> b) -> a -> b $ Exp -> ExpPre forall a. 𝐴 SrcCxt a -> a forall (w :: * -> *) a. Extract w => w a -> a extract Exp e , CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t a (f :: * -> *). CParser t a -> MixfixF t f a fmixTerminal (CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ Atom -> ExpPre AtomE (Atom -> ExpPre) -> CParser TokenWSBasic Atom -> CParser TokenWSBasic ExpPre forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ CParser TokenWSBasic Atom cpAtom , ℕ64 -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t (f :: * -> *) a. ℕ64 -> CParser t (f a -> f a -> a) -> MixfixF t f a fmixInfix ℕ64 pCMP (CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ (Exp -> Exp -> ExpPre) -> TokenWSBasic -> Exp -> Exp -> ExpPre forall a b. a -> b -> a const Exp -> Exp -> ExpPre EqualE (TokenWSBasic -> Exp -> Exp -> ExpPre) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpSyntaxWS 𝕊 "==" , ℕ64 -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t (f :: * -> *) a. ℕ64 -> CParser t (f a -> f a -> a) -> MixfixF t f a fmixInfixR ℕ64 pPLUS (CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ (Exp -> Exp -> ExpPre) -> TokenWSBasic -> Exp -> Exp -> ExpPre forall a b. a -> b -> a const Exp -> Exp -> ExpPre PlusE (TokenWSBasic -> Exp -> Exp -> ExpPre) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpSyntaxWS 𝕊 "+" , ℕ64 -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t (f :: * -> *) a. ℕ64 -> CParser t (f a -> f a -> a) -> MixfixF t f a fmixInfixR ℕ64 pTIMES (CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ (Exp -> Exp -> ExpPre) -> TokenWSBasic -> Exp -> Exp -> ExpPre forall a b. a -> b -> a const Exp -> Exp -> ExpPre TimesE (TokenWSBasic -> Exp -> Exp -> ExpPre) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpSyntaxWS 𝕊 "*" , ℕ64 -> CParser TokenWSBasic (Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t (f :: * -> *) a. ℕ64 -> CParser t (f a -> a) -> MixfixF t f a fmixPrefix ℕ64 pNEG (CParser TokenWSBasic (Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic (Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ (Exp -> ExpPre) -> TokenWSBasic -> Exp -> ExpPre forall a b. a -> b -> a const Exp -> ExpPre NegateE (TokenWSBasic -> Exp -> ExpPre) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic (Exp -> ExpPre) forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpSyntaxWS 𝕊 "-" , ℕ64 -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t (f :: * -> *) a. ℕ64 -> CParser t (f a -> f a -> a) -> MixfixF t f a fmixInfixL ℕ64 pPOW (CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ (Exp -> Exp -> ExpPre) -> TokenWSBasic -> Exp -> Exp -> ExpPre forall a b. a -> b -> a const Exp -> Exp -> ExpPre ExpoE (TokenWSBasic -> Exp -> Exp -> ExpPre) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic (Exp -> Exp -> ExpPre) forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpSyntaxWS 𝕊 "^" , ℕ64 -> CParser TokenWSBasic (Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t (f :: * -> *) a. ℕ64 -> CParser t (f a -> a) -> MixfixF t f a fmixPostfix ℕ64 pFAC (CParser TokenWSBasic (Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic (Exp -> ExpPre) -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ (Exp -> ExpPre) -> TokenWSBasic -> Exp -> ExpPre forall a b. a -> b -> a const Exp -> ExpPre FactE (TokenWSBasic -> Exp -> ExpPre) -> CParser TokenWSBasic TokenWSBasic -> CParser TokenWSBasic (Exp -> ExpPre) forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ 𝕊 -> CParser TokenWSBasic TokenWSBasic cpSyntaxWS 𝕊 "!" , CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall t a (f :: * -> *). CParser t a -> MixfixF t f a fmixTerminal (CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre) -> CParser TokenWSBasic ExpPre -> MixfixF TokenWSBasic (𝐴 SrcCxt) ExpPre forall a b. (a -> b) -> a -> b $ 𝐿 Exp -> ExpPre BlockE (𝐿 Exp -> ExpPre) -> CParser TokenWSBasic (𝐿 Exp) -> CParser TokenWSBasic ExpPre forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b ^$ CParser TokenWSBasic (𝐿 Exp) cpBlock ] cpExpList ∷ CParser TokenWSBasic (𝐿 Exp) cpExpList :: CParser TokenWSBasic (𝐿 Exp) cpExpList = CParser TokenWSBasic () -> CParser TokenWSBasic Exp -> CParser TokenWSBasic (𝐿 Exp) forall t a. Ord t => CParser t () -> CParser t a -> CParser t (𝐿 a) cpManySepBy CParser TokenWSBasic () cpDelimWS CParser TokenWSBasic Exp cpExp testParserSuccess ∷ IO () testParserSuccess :: IO () testParserSuccess = do CParser TokenWSBasic (𝐿 Exp) -> 𝕊 -> 𝕍 (ParserToken TokenWSBasic) -> IO () forall a t ts. (Pretty a, ToIter (ParserToken t) ts, Ord t) => CParser t a -> 𝕊 -> ts -> IO () parseIOMain CParser TokenWSBasic (𝐿 Exp) cpExpList 𝕊 "" (𝕍 (ParserToken TokenWSBasic) -> IO ()) -> IO (𝕍 (ParserToken TokenWSBasic)) -> IO () forall (m :: * -> *) a b. Bind m => (a -> m b) -> m a -> m b *$ Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic -> 𝕊 -> (𝕍 (PreParserToken TokenWSBasic) -> 𝕍 (PreParserToken TokenWSBasic)) -> 𝕍 (ParserToken ℂ) -> IO (𝕍 (ParserToken TokenWSBasic)) forall c t o u w w'. (Show u, Ord c, Ord t, Pretty t, Classified c t, Eq o, Eq u, Plus u) => Lexer c t o u w -> 𝕊 -> (𝕍 (PreParserToken w) -> 𝕍 (PreParserToken w')) -> 𝕍 (ParserToken t) -> IO (𝕍 (ParserToken w')) tokenizeFIO Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic lexer 𝕊 "" 𝕍 (PreParserToken TokenWSBasic) -> 𝕍 (PreParserToken TokenWSBasic) blockifyTokensWSBasic (𝕍 (ParserToken ℂ) -> IO (𝕍 (ParserToken TokenWSBasic))) -> 𝕍 (ParserToken ℂ) -> IO (𝕍 (ParserToken TokenWSBasic)) forall a b. (a -> b) -> a -> b $ 𝕊 -> 𝕍 (ParserToken ℂ) tokens (𝕊 -> 𝕍 (ParserToken ℂ)) -> 𝕊 -> 𝕍 (ParserToken ℂ) forall a b. (a -> b) -> a -> b $ 𝐼 𝕊 -> 𝕊 forall a t. (Monoid a, ToIter a t) => t -> a concat (𝐼 𝕊 -> 𝕊) -> 𝐼 𝕊 -> 𝕊 forall a b. (a -> b) -> a -> b $ 𝕊 -> [𝕊] -> 𝐼 𝕊 forall a t. ToIter a t => a -> t -> 𝐼 a inbetween 𝕊 "\n" [ 𝕊 "(- 1) + 2" , 𝕊 "local 2 + 3" , 𝕊 " local - 2 + 3" , 𝕊 " * 4 ^ 5 ^ 6 !" ] testParserFailure ∷ IO () testParserFailure :: IO () testParserFailure = CParser TokenWSBasic (𝐿 Exp) -> 𝕊 -> 𝕍 (ParserToken TokenWSBasic) -> IO () forall a t ts. (Pretty a, ToIter (ParserToken t) ts, Ord t) => CParser t a -> 𝕊 -> ts -> IO () parseIOMain CParser TokenWSBasic (𝐿 Exp) cpExpList 𝕊 "" (𝕍 (ParserToken TokenWSBasic) -> IO ()) -> IO (𝕍 (ParserToken TokenWSBasic)) -> IO () forall (m :: * -> *) a b. Bind m => (a -> m b) -> m a -> m b *$ Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic -> 𝕊 -> (𝕍 (PreParserToken TokenWSBasic) -> 𝕍 (PreParserToken TokenWSBasic)) -> 𝕍 (ParserToken ℂ) -> IO (𝕍 (ParserToken TokenWSBasic)) forall c t o u w w'. (Show u, Ord c, Ord t, Pretty t, Classified c t, Eq o, Eq u, Plus u) => Lexer c t o u w -> 𝕊 -> (𝕍 (PreParserToken w) -> 𝕍 (PreParserToken w')) -> 𝕍 (ParserToken t) -> IO (𝕍 (ParserToken w')) tokenizeFIO Lexer CharClass ℂ TokenClassWSBasic ℕ64 TokenWSBasic lexer 𝕊 "" 𝕍 (PreParserToken TokenWSBasic) -> 𝕍 (PreParserToken TokenWSBasic) blockifyTokensWSBasic (𝕍 (ParserToken ℂ) -> IO (𝕍 (ParserToken TokenWSBasic))) -> 𝕍 (ParserToken ℂ) -> IO (𝕍 (ParserToken TokenWSBasic)) forall a b. (a -> b) -> a -> b $ 𝕊 -> 𝕍 (ParserToken ℂ) tokens (𝕊 -> 𝕍 (ParserToken ℂ)) -> 𝕊 -> 𝕍 (ParserToken ℂ) forall a b. (a -> b) -> a -> b $ 𝐼 𝕊 -> 𝕊 forall a t. (Monoid a, ToIter a t) => t -> a concat (𝐼 𝕊 -> 𝕊) -> 𝐼 𝕊 -> 𝕊 forall a b. (a -> b) -> a -> b $ 𝕊 -> [𝕊] -> 𝐼 𝕊 forall a t. ToIter a t => a -> t -> 𝐼 a inbetween 𝕊 "\n" [ 𝕊 "(- 1) + 2" , 𝕊 "local 2 + 3 + 4" , 𝕊 " local - 2 + 3" , 𝕊 " + 4 ^ 5 ^ 6 !" ]