blockToRST (CodeBlock (_,classes,_) str) = do
  opts <- stOptions <$> get
  let tabstop = writerTabStop opts
  if "haskell" `elem` classes && "literate" `elem` classes &&
                  writerLiterateHaskell opts
     then return $ prefixed "> " (text str) $$ blankline
     else return $ "::" $+$ nest tabstop (text str) $$ blankline
blockToRST (CodeBlock (_,classes,_) str) = do
  opts <- stOptions <$> get
  let tabstop = writerTabStop opts
  if "haskell" `elem` classes && "literate" `elem` classes &&
                  writerLiterateHaskell opts
     then return $ prefixed "> " (text str) $$ blankline
     else return $ "::" $+$ nest tabstop (text str) $$ blankline
blockToRST (CodeBlock (_,classes,_) str) = do
  opts <- stOptions <$> get
  let tabstop = writerTabStop opts
  if "haskell" `elem` classes && "literate" `elem` classes &&
                  writerLiterateHaskell opts
     then return $ prefixed "> " (text str) $$ blankline
     else return $ "::" $+$ nest tabstop (text str) $$ blankline