15

I would like to use a text-based UI in my Haskell program. I found some bindings for the ncurses library (see also hscurses or ncurses, which one to use?). The hscurses and nanocurses packages are just simple wrappers around the C library, while vty isn't very well documented and a bit ugly (for example mixing snake_case and CamelCase).

The ncurses library on Hackage looks much more pretty and provides API which nicely fits Haskell. The problem is that it doesn't seem to implement some crucial features, like resizing or refreshing the windows.

So my question is:

  • is there any other Haskell text UI library, either ncurses-based or not, which I missed?
  • 誰もいない場合、ncurses少なくともウィンドウの更新とサイズ変更をサポートするように Haskell ライブラリを拡張することは可能ですか? (これはおそらくプロジェクト オーナーに相談する必要がありますが、早急に解決策が必要です)

編集:

私は最終的nscursesにウィンドウ(およびパネル)なしで使用して、それらを更新する際のトラブルを回避しました。ウィンドウの右下隅への出力に問題がありました (非常によく似た問題がPython の ncurses bindingで報告されました)。そこに書かないことで解決しました:)。

4

3 に答える 3

9

vty-uiを見たことがありますか?たくさんの例が書かれたとても素敵なユーザーマニュアルがあります。私はそれが本質的にvtyのラッパーだと信じています。

于 2013-03-04T10:17:05.903 に答える
3

私はnanoncursesとhscursesをうまく使用しましたが、私のhmp3アプリにはnanocursesの基礎となったバインディングがあります。

おそらく何が必要な場合でも、優れた高レベルAPIが必要になります。hscursesには、少なくともボックスの抽象化があります。

あなたはhscursesでうまくいくでしょう。

于 2013-03-02T16:33:11.447 に答える