akariParser :: Parser AkariInst
akariParser = do
    puz <- many $ do
        row <- many1 cellParser
        endOfLine
        pure row
    endOfLine
    pure puz
    where
    cellParser :: Parser (AkariType, Maybe Integer)
    cellParser =
        ((Wall,) . Just . subtract 48 . toInteger . ord <$> digit)
        <|> (char '#' *> pure (Wall, Nothing))
        <|> (char '.' *> pure (Space, Nothing))
akariParser :: Parser AkariInst
akariParser = do
    puz <- many $ do
        row <- many1 cellParser
        endOfLine
        pure row
    endOfLine
    pure puz
    where
    cellParser :: Parser (AkariType, Maybe Integer)
    cellParser =
        ((Wall,) . Just . subtract 48 . toInteger . ord <$> digit)
        <|> (char '#' *> pure (Wall, Nothing))
        <|> (char '.' *> pure (Space, Nothing))
akariParser = do
    puz <- many $ do
        row <- many1 cellParser
        endOfLine
        pure row
    endOfLine
    pure puz
    where
    cellParser :: Parser (AkariType, Maybe Integer)
    cellParser =
        ((Wall,) . Just . subtract 48 . toInteger . ord <$> digit)
        <|> (char '#' *> pure (Wall, Nothing))
        <|> (char '.' *> pure (Space, Nothing))