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

customMain errors #6

Closed
juhp opened this issue Jul 22, 2019 · 4 comments
Closed

customMain errors #6

juhp opened this issue Jul 22, 2019 · 4 comments

Comments

@juhp
Copy link
Contributor

juhp commented Jul 22, 2019

I just tried to cabal install tart:

programs/Main.hs:112:13: error:
    • Couldn't match type ‘s0 -> IO s0’ with ‘IO a0’
      Expected type: App s0 e0 n0 -> IO a0
        Actual type: App s0 e0 n0 -> s0 -> IO s0
    • Probable cause: ‘customMain’ is applied to too few arguments
      In the second argument of ‘(.)’, namely
        ‘customMain mkVty (Just chan) application’
      In the first argument of ‘(=<<)’, namely
        ‘(void . customMain mkVty (Just chan) application)’
      In a stmt of a 'do' block:
        (void . customMain mkVty (Just chan) application)
          =<< mkInitialState chan c
    |
112 |     (void . customMain mkVty (Just chan) application) =<< mkInitialState chan c
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

programs/Main.hs:112:24: error:
    • Couldn't match expected type ‘V.Vty’ with actual type ‘IO V.Vty’
    • In the first argument of ‘customMain’, namely ‘mkVty’
      In the second argument of ‘(.)’, namely
        ‘customMain mkVty (Just chan) application’
      In the first argument of ‘(=<<)’, namely
        ‘(void . customMain mkVty (Just chan) application)’
    |
112 |     (void . customMain mkVty (Just chan) application) =<< mkInitialState chan c
    |                        ^^^^^

programs/Main.hs:112:31: error:
    • Couldn't match expected type ‘IO V.Vty’
                  with actual type ‘Maybe (Brick.BChan.BChan Types.AppEvent)’
    • In the second argument of ‘customMain’, namely ‘(Just chan)’
      In the second argument of ‘(.)’, namely
        ‘customMain mkVty (Just chan) application’
      In the first argument of ‘(=<<)’, namely
        ‘(void . customMain mkVty (Just chan) application)’
    |
112 |     (void . customMain mkVty (Just chan) application) =<< mkInitialState chan c
    |                               ^^^^^^^^^

programs/Main.hs:112:42: error:
    • Couldn't match expected type ‘Maybe (Brick.BChan.BChan e0)’
                  with actual type ‘App Types.AppState Types.AppEvent Types.Name’
    • In the third argument of ‘customMain’, namely ‘application’
      In the second argument of ‘(.)’, namely
        ‘customMain mkVty (Just chan) application’
      In the first argument of ‘(=<<)’, namely
        ‘(void . customMain mkVty (Just chan) application)’
    |
112 |     (void . customMain mkVty (Just chan) application) =<< mkInitialState chan c
    |                                          ^^^^^^^^^^^

programs/Main.hs:112:59: error:
    • Couldn't match type ‘Types.AppState’ with ‘App s0 e0 n0’
      Expected type: IO (App s0 e0 n0)
        Actual type: IO Types.AppState
    • In the second argument of ‘(=<<)’, namely ‘mkInitialState chan c’
      In a stmt of a 'do' block:
        (void . customMain mkVty (Just chan) application)
          =<< mkInitialState chan c
      In the expression:
        do checkForMouseSupport
           args <- getArgs
           let (os, rest, errs) = getOpt Permute opts args
           when (not $ null errs) $ showHelp >> exitFailure
           ....
    |
112 |     (void . customMain mkVty (Just chan) application) =<< mkInitialState chan c
    |                                                           ^^^^^^^^^^^^^^^^^^^^^
@jtdaugherty
Copy link
Owner

I've published a metadata revision for Tart 0.1.2 on Hackage that should fix this. Sorry about that! Please cabal update and try again and update here when you have the result.

@jtdaugherty
Copy link
Owner

And for what it's worth, the version in Git doesn't have this problem so you could also build from source.

@juhp
Copy link
Contributor Author

juhp commented Jul 24, 2019

Thanks a lot - tart is so cool!

@jtdaugherty
Copy link
Owner

Thanks, I'm glad you like it!

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

2 participants