kowainik / summoner

🔮 🔧 Tool for scaffolding batteries-included production-level Haskell projects
https://kowainik.github.io/projects/summoner
Mozilla Public License 2.0
694 stars 73 forks source link

Upgrade to brick-1.* - EventM API changes #564

Closed jtdaugherty closed 1 year ago

jtdaugherty commented 2 years ago

I'm working on an overhaul of brick's EventM API and I'd love to get your feedback on how it might impact this project. Please see the details and post comments on https://github.com/jtdaugherty/brick/issues/379. Thanks!

jtdaugherty commented 2 years ago

Hi, again - Brick 1.0 is out. Here are the details: https://github.com/jtdaugherty/brick/blob/master/CHANGELOG.md#10

felixonmars commented 1 year ago

Thanks for the ping. This project needs some adjustments with new brick:

[2 of 8] Compiling Summoner.Tui.Field

src/Summoner/Tui/Field.hs:103:46: error:
    • Expecting one more argument to ‘EventM n Bool’
      Expected a type, but ‘EventM n Bool’ has kind ‘* -> *’
    • In the type signature:
        handleEvent :: BrickEvent n e -> Bool -> EventM n Bool
      In an equation for ‘activeCheckboxField’:
          activeCheckboxField stLens isActive name label initialState
            = FormFieldState
                {formFieldState = initVal, formFields = [checkboxFormField],
                 formFieldLens = stLens, formFieldRenderHelper = id,
                 formFieldConcat = vBox}
            where
                initVal, isEnabled :: Bool
                initVal = initialState ^. stLens
                isEnabled = isActive initialState name
                handleEvent :: BrickEvent n e -> Bool -> EventM n Bool
                ....
    |
103 |     handleEvent :: BrickEvent n e -> Bool -> EventM n Bool
    |                                              ^^^^^^^^^^^^^
[3 of 8] Compiling Summoner.Tui.Kit
[4 of 8] Compiling Summoner.Tui.Widget

src/Summoner/Tui/Widget.hs:17:21: error:
    Module ‘Brick.Types’ does not export ‘Padding’
   |
17 | import Brick.Types (Padding (Pad), Widget)
   |                     ^^^^^^^^^^^^^