Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't match expected type 'BrickEvent n e0' #69

Open
tgrosinger opened this issue Jul 26, 2022 · 6 comments
Open

Couldn't match expected type 'BrickEvent n e0' #69

tgrosinger opened this issue Jul 26, 2022 · 6 comments

Comments

@tgrosinger
Copy link

I am working on am arm64 build of hledger-iadd for my hledger-multiarch project. I'm so close to having it compile successfully. It failed at the very end with this error. Please let me know if you have any suggestions.

The command I ran was stack install --allow-different-user hledger-iadd.

brick                            > Registering library for brick-0.73..
hledger-iadd                     > configure
hledger-iadd                     > Configuring hledger-iadd-1.3.17...
hledger-iadd                     > build
hledger-iadd                     > Preprocessing library for hledger-iadd-1.3.17..
hledger-iadd                     > Building library for hledger-iadd-1.3.17..
hledger-iadd                     > [ 1 of 13] Compiling AmountParser
hledger-iadd                     > [ 2 of 13] Compiling Brick.Widgets.BetterDialog
hledger-iadd                     > [ 3 of 13] Compiling Brick.Widgets.Border.Utils
hledger-iadd                     > [ 4 of 13] Compiling Brick.Widgets.Edit.EmacsBindings
hledger-iadd                     >
hledger-iadd                     > /tmp/stack-c805d8744a93ec26/hledger-iadd-1.3.17/src/Brick/Widgets/Edit/EmacsBindings.hs:86:36: error:
hledger-iadd                     >     • Couldn't match expected type ‘BrickEvent n e0’
hledger-iadd                     >                   with actual type ‘Event’
hledger-iadd                     >     • In the first argument of ‘E.handleEditorEvent’, namely ‘event’
hledger-iadd                     >       In a stmt of a 'do' block:
hledger-iadd                     >         newOrig <- E.handleEditorEvent event (edit ^. origEditor)
hledger-iadd                     >       In the expression:
hledger-iadd                     >         do newOrig <- E.handleEditorEvent event (edit ^. origEditor)
hledger-iadd                     >            return $ edit & origEditor .~ newOrig
hledger-iadd                     >     • Relevant bindings include
hledger-iadd                     >         edit :: Editor n
hledger-iadd                     >           (bound at src/Brick/Widgets/Edit/EmacsBindings.hs:71:25)
hledger-iadd                     >         handleEditorEvent :: Event -> Editor n -> EventM n (Editor n)
hledger-iadd                     >           (bound at src/Brick/Widgets/Edit/EmacsBindings.hs:71:1)
hledger-iadd                     >    |
hledger-iadd                     > 86 |     newOrig <- E.handleEditorEvent event (edit^.origEditor)
hledger-iadd                     >    |                                    ^^^^^
@tgrosinger tgrosinger changed the title Couldn't match expected type ‘BrickEvent n e0 Couldn't match expected type 'BrickEvent n e0' Jul 26, 2022
@tgrosinger
Copy link
Author

Relates to #43

@tgrosinger
Copy link
Author

If I build with --resolver=lts it fails right at the beginning with a different error:

<no location info>: error:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt

I've tried installing a few versions of llvm with no luck. I'm building from Ubuntu.

@hpdeifel
Copy link
Owner

The first error seems unrelated to the architecture, the second one could be related (although it's hard to judge from a distance).

Could you maybe try with ghcup and cabal?

@tgrosinger
Copy link
Author

Unfortunately I am seeing the same LLVM errors when installing with cabal. I installed llvm-12 with apt and tried again, but got the same results.

@pmcginn
Copy link

pmcginn commented Aug 11, 2022

I'm not trying to do exactly the same as you (I was just trying to run the hledger install script), but I got the same error when trying to compile hledger-iadd on my Raspberry Pi 400. I fixed it by:

  • curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
  • sudo apt install libnuma-dev
  • nano ~/.stack/config.yaml
  • add "allow-newer: true" after the first commented block
  • stack install --resolver=lts hledger-iadd-1.3.17

@hpdeifel
Copy link
Owner

hpdeifel commented Sep 2, 2022

The error in the OP is #71, btw. I will fix that in due time, but it's definitely unrelated to the architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants