summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-01-14 20:00:11 +0100
committerEugen Wissner <belka@caraus.de>2025-01-14 20:00:11 +0100
commit9cafd8d97ddd7a366585efd29a203d993470c588 (patch)
tree968b86550d2bbef71850ecb06620a291b9b5cb80 /lib
parent099915650815850f56f517a0d918ebb5191bcc55 (diff)
downloadfountainhead-9cafd8d97ddd7a366585efd29a203d993470c588.tar.gz
Make compatible with GHC2025
Diffstat (limited to 'lib')
-rw-r--r--lib/Graphics/Fountainhead/Dumper.hs2
-rw-r--r--lib/Graphics/Fountainhead/Metrics.hs3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/Graphics/Fountainhead/Dumper.hs b/lib/Graphics/Fountainhead/Dumper.hs
index 1e1491c..dc7a60d 100644
--- a/lib/Graphics/Fountainhead/Dumper.hs
+++ b/lib/Graphics/Fountainhead/Dumper.hs
@@ -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
diff --git a/lib/Graphics/Fountainhead/Metrics.hs b/lib/Graphics/Fountainhead/Metrics.hs
index d298775..d67b090 100644
--- a/lib/Graphics/Fountainhead/Metrics.hs
+++ b/lib/Graphics/Fountainhead/Metrics.hs
@@ -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)