writeAsJson :: (Json.ToJSON a) => FilePath -> Maybe a -> IO ()
writeAsJson file maybeValue =
      case maybeValue of
        Nothing ->
          do  hPutStrLn stderr "Problem reading JSON"
              exitFailure

        Just value ->
          Docs.prettyJson value
            |> Text.decodeUtf8
            |> Text.replace "\\u003e" ">"
            |> Text.writeFile file
writeAsJson :: (Json.ToJSON a) => FilePath -> Maybe a -> IO ()
writeAsJson file maybeValue =
      case maybeValue of
        Nothing ->
          do  hPutStrLn stderr "Problem reading JSON"
              exitFailure

        Just value ->
          Docs.prettyJson value
            |> Text.decodeUtf8
            |> Text.replace "\\u003e" ">"
            |> Text.writeFile file
writeAsJson file maybeValue =
      case maybeValue of
        Nothing ->
          do  hPutStrLn stderr "Problem reading JSON"
              exitFailure

        Just value ->
          Docs.prettyJson value
            |> Text.decodeUtf8
            |> Text.replace "\\u003e" ">"
            |> Text.writeFile file