hindent :: Settings -> HaskellSource -> Either String HaskellSource
hindent (Settings config extensions) (HaskellSource filepath source) =
  HaskellSource filepath . unpackBuilder <$>
  reformat config extensions Nothing sourceText
  where
    sourceText = Encoding.encodeUtf8 . Text.pack $ source
    unpackBuilder =
      Text.unpack . Encoding.decodeUtf8 . L.toStrict . toLazyByteString
hindent :: Settings -> HaskellSource -> Either String HaskellSource
hindent (Settings config extensions) (HaskellSource filepath source) =
  HaskellSource filepath . unpackBuilder <$>
  reformat config extensions Nothing sourceText
  where
    sourceText = Encoding.encodeUtf8 . Text.pack $ source
    unpackBuilder =
      Text.unpack . Encoding.decodeUtf8 . L.toStrict . toLazyByteString
hindent (Settings config extensions) (HaskellSource filepath source) =
  HaskellSource filepath . unpackBuilder <$>
  reformat config extensions Nothing sourceText
  where
    sourceText = Encoding.encodeUtf8 . Text.pack $ source
    unpackBuilder =
      Text.unpack . Encoding.decodeUtf8 . L.toStrict . toLazyByteString