Make compatible with GHC2025

This commit is contained in:
2025-01-14 20:00:11 +01:00
parent 0999156508
commit 9cafd8d97d
3 changed files with 8 additions and 5 deletions

View File

@ -96,6 +96,7 @@ import qualified Text.Megaparsec as Megaparsec
import Graphics.Fountainhead.Parser
( ParseErrorBundle
, ParseState
, Parser
, parseTable
, cmapTableP
, headTableP
@ -831,6 +832,7 @@ parseRequired processedState fontDirectory = do
, locaTable = requiredLoca
}
where
findRequired :: String -> Parser a -> Either DumpError a
findRequired tableName parser =
let missingError = Left $ DumpRequiredTableMissingError tableName
parseFound tableEntry = parseTable tableEntry parser processedState

View File

@ -133,7 +133,8 @@ collectMetrics fontFile ttfContents =
(_processedState, Left initialResult) -> Left
$ MetricsParseError initialResult
(processedState, Right initialResult) -> do
let parseForMetrics' = parseForMetrics processedState initialResult
let parseForMetrics' :: String -> Parser a -> Either MetricsError a
parseForMetrics' = parseForMetrics processedState initialResult
NameTable{ nameRecord, variable } <- parseForMetrics' "name" nameTableP
psNameIndex <- maybeMetricsError (MetricsNameRecordNotFound 6)