- | Change String to SDoc.
-- Each newline is $$ed with nest equal to spaces before.
-- \t is 4.
stringToPpr :: String -> SDoc
stringToPpr str = do
    -- Whether to take a letter
    let taker   ' ' = True
        taker  '\t' = True
        taker  _    = False
    -- Whether to 
        to_num  ' ' = 1
        to_num '\t' = 4
        to_num _    = 0
    -- Function doing the nesting
    let nest_text str = do
            let whites = takeWhile taker str
                rest   = dropWhile taker str
                num    = sum $ map to_num whites
            nest num $ text rest
    vcat $ map nest_text $ lines str

stringToPpr :: String -> SDoc
stringToPpr str = do
    -- Whether to take a letter
    let taker   ' ' = True
        taker  '\t' = True
        taker  _    = False
    -- Whether to 
        to_num  ' ' = 1
        to_num '\t' = 4
        to_num _    = 0
    -- Function doing the nesting
    let nest_text str = do
            let whites = takeWhile taker str
                rest   = dropWhile taker str
                num    = sum $ map to_num whites
            nest num $ text rest
    vcat $ map nest_text $ lines str
stringToPpr str = do
    -- Whether to take a letter
    let taker   ' ' = True
        taker  '\t' = True
        taker  _    = False
    -- Whether to 
        to_num  ' ' = 1
        to_num '\t' = 4
        to_num _    = 0
    -- Function doing the nesting
    let nest_text str = do
            let whites = takeWhile taker str
                rest   = dropWhile taker str
                num    = sum $ map to_num whites
            nest num $ text rest
    vcat $ map nest_text $ lines str