mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-29 21:46:11 +03:00
3081e7367d
This experimental change makes it possible to: * Avoid runtime errors due to name typos * Achieve compile-time guarantees about name matching and usage * Force widget functions to be name-agnostic by being polymorphic in their name type * Clean up focus handling by making it possible to pattern-match on cursor location names The change also made many types more heavyweight and in some cases this is unpleasant when we don't want to have to care about names. But in those cases we can just use 'n' or '()' depending on how concrete we need to be. I'm not yet sure how this is going to play out in practice.
10 lines
110 B
Haskell
10 lines
110 B
Haskell
module Main where
|
|
|
|
import Brick
|
|
|
|
ui :: Widget ()
|
|
ui = str "Hello, world!"
|
|
|
|
main :: IO ()
|
|
main = simpleMain ui
|