ghcup-0.1.50.2: ghc toolchain installer
Safe HaskellNone
LanguageHaskell2010

GHCup.Brick.Common

Synopsis

Documentation

keyToWidget :: KeyCombination -> Widget n Source #

Given a KeyComb, produces a string widget with and user friendly text

separator :: Widget n Source #

A section separator with max width. Looks like this: -------- o --------

frontwardLayer :: Text -> Widget n -> Widget n Source #

Used to create a layer on top of the main navigation widget (tutorial, info, menus...)

enableScreenReader :: n -> Widget n -> Widget n Source #

puts a cursor at the line beginning so It can be read by screen readers

zoom :: forall {m} {n} {s} {t} {k} {c} {is :: IxList}. (Zoom m n s t, Is k A_Lens, Functor (Zoomed m c)) => Optic k is t t s s -> m c -> n c Source #

Given a lens, zoom on it. It is needed because Brick uses microlens but GHCup uses optics.

lr :: Iso' BrickData [ListResult] Source #

data Name Source #

Name data type. Uniquely identifies each widget in the TUI. some constructors might end up unused, but still is a good practise to have all of them defined, just in case

Constructors

AllTools

The main list widget

Singular Tool

The particular list for each tool

ListItem Tool Int

An item in list

KeyInfoBox

The text box widget with action informacion

TutorialBox

The tutorial widget

ContextBox

The resource for Context Menu

CompileGHCBox

The resource for CompileGHC Menu

AdvanceInstallBox

The resource for AdvanceInstall Menu

MenuElement ResourceId

Each element in a Menu. Resources must not be share for visible Menus, but MenuA and MenuB can share resources if they both are invisible, or just one of them is visible.

Instances

Instances details
Show Name Source # 
Instance details

Defined in GHCup.Brick.Common

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Eq Name Source # 
Instance details

Defined in GHCup.Brick.Common

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Ord Name Source # 
Instance details

Defined in GHCup.Brick.Common

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

ListItemSectionNameIndex Name Source # 
Instance details

Defined in GHCup.Brick.Widgets.Navigation

data Mode Source #

Mode type. It helps to dispatch events to different handlers.

Instances

Instances details
Show Mode Source # 
Instance details

Defined in GHCup.Brick.Common

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

Eq Mode Source # 
Instance details

Defined in GHCup.Brick.Common

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Ord Mode Source # 
Instance details

Defined in GHCup.Brick.Common

Methods

compare :: Mode -> Mode -> Ordering #

(<) :: Mode -> Mode -> Bool #

(<=) :: Mode -> Mode -> Bool #

(>) :: Mode -> Mode -> Bool #

(>=) :: Mode -> Mode -> Bool #

max :: Mode -> Mode -> Mode #

min :: Mode -> Mode -> Mode #

data BrickData Source #

Constructors

BrickData 

Fields

  • _lr :: [ListResult]
     

Instances

Instances details
Show BrickData Source # 
Instance details

Defined in GHCup.Brick.Common

data ResourceId where Source #

A newtype for labeling resources in menus. It is bundled along with pattern synonyms