It is once again Advent of Code season. Because of this I thought I'd get my own personal library dusted off and in working condition. I attempted to compile all the libraries I'm depending on, advent-of-code-ocr included, with GHC 9. This package failed to compile. After talking to c_wraith on the #haskell channel on the Libera Chat IRC server, I'm 90% sure that the changes to the Typed Template Haskell system are to blame here.
Building library for advent-of-code-ocr-0.1.2.0..
[1 of 3] Compiling Advent.OCR.LetterMap ( src/Advent/OCR/LetterMap.hs, dist/build/Advent/OCR/LetterMap.o, dist/build/Advent/OCR/LetterMap.dyn_o )
src/Advent/OCR/LetterMap.hs:68:17: error:
• Couldn't match type: TExp a1
with: V2 a
Expected: V2 a -> Code m (V2 a)
Actual: V2 a -> Code m (TExp a1)
• In the expression: fmap TExp . lift
In an equation for ‘liftTyped’: liftTyped = fmap TExp . lift
In the instance declaration for ‘Lift (V2 a)’
• Relevant bindings include
liftTyped :: V2 a -> Code m (V2 a)
(bound at src/Advent/OCR/LetterMap.hs:68:5)
|
68 | liftTyped = fmap TExp . lift
| ^^^^^^^^^^^^^^^^
src/Advent/OCR/LetterMap.hs:150:17: error:
• Couldn't match type ‘TExp a0’ with ‘LetterMap’
Expected: LetterMap -> Code m LetterMap
Actual: LetterMap -> Code m (TExp a0)
• In the expression: fmap TExp . lift
In an equation for ‘liftTyped’: liftTyped = fmap TExp . lift
In the instance declaration for ‘Lift LetterMap’
|
150 | liftTyped = fmap TExp . lift
| ^^^^^^^^^^^^^^^^
It is once again Advent of Code season. Because of this I thought I'd get my own personal library dusted off and in working condition. I attempted to compile all the libraries I'm depending on, advent-of-code-ocr included, with GHC 9. This package failed to compile. After talking to c_wraith on the #haskell channel on the Libera Chat IRC server, I'm 90% sure that the changes to the Typed Template Haskell system are to blame here.