rewrite-inspector-0.1.0.4: Inspection of rewriting steps

Copyright(C) 2019 QBayLogic
LicenseBSD2 (see the file LICENSE)
MaintainerOrestis Melkonian <melkon.or@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Types

Description

Basic datatypes.

Synopsis

Documentation

data Name Source #

Constructors

LeftViewport 
RightViewport

viewports

FormField String

form fields

Instances
Eq Name Source # 
Instance details

Defined in Types

Methods

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

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

Ord Name Source # 
Instance details

Defined in Types

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 #

Show Name Source # 
Instance details

Defined in Types

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

data Trans Source #

Constructors

Step Int

move to given step in the current binder

Name String

move to the next/previous transformation with the given name

Search String

move to the next/previous occurrence of the searched string

Instances
Eq Trans Source # 
Instance details

Defined in Types

Methods

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

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

Ord Trans Source # 
Instance details

Defined in Types

Methods

compare :: Trans -> Trans -> Ordering #

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

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

(>) :: Trans -> Trans -> Bool #

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

max :: Trans -> Trans -> Trans #

min :: Trans -> Trans -> Trans #

Show Trans Source # 
Instance details

Defined in Types

Methods

showsPrec :: Int -> Trans -> ShowS #

show :: Trans -> String #

showList :: [Trans] -> ShowS #

data OptionsUI term Source #

Constructors

OptionsUI 

Fields

trans :: forall term. Lens' (OptionsUI term) Trans Source #

opts :: forall term term. Lens (OptionsUI term) (OptionsUI term) (Options term) (Options term) Source #

data VizState term Source #

Bottom-level state of the UI (navigate steps of a top-level binder).

Constructors

VizState 

Fields

steps :: forall term. Lens' (VizState term) (History term (Ctx term)) Source #

prevState :: forall term. Lens' (VizState term) (Maybe (VizState term)) Source #

curStep :: forall term. Lens' (VizState term) Int Source #

curExpr :: forall term. Lens' (VizState term) term Source #

data VizStates term Source #

Top-level state of the UI (navigate top-level binders).

Constructors

VizStates 

Fields

width :: forall term. Lens' (VizStates term) Int Source #

states :: forall term. Lens' (VizStates term) (Map Binder (VizState term)) Source #

showBot :: forall term. Lens' (VizStates term) Bool Source #

scroll :: forall term. Lens' (VizStates term) Bool Source #

height :: forall term. Lens' (VizStates term) Int Source #

form :: forall term. Lens' (VizStates term) (Form (OptionsUI term) NoCustomEvent Name) Source #

curBinder :: forall term. Lens' (VizStates term) Binder Source #

binders :: forall term. Lens' (VizStates term) [Binder] Source #

mkForm :: forall term. Diff term => OptionsUI term -> Form (OptionsUI term) NoCustomEvent Name Source #

createVizStates :: forall term. Diff term => History term (Ctx term) -> VizStates term Source #

Group the rewrite history by the different top-level binders.

initialState :: Diff term => History term (Ctx term) -> VizState term Source #

formData :: forall term. Diff term => Lens' (VizStates term) (OptionsUI term) Source #

step :: Diff term => VizState term -> VizState term Source #

Proceed to the next state.

unstep :: Diff term => VizState term -> VizState term Source #

Go back to the previous state.

reset :: Diff term => VizState term -> VizState term Source #

Reset to the initial state.

moveTo :: Diff term => Int -> VizState term -> VizState term Source #

Move to a specified step of the transformations of the current binder.

nextTrans :: Diff term => (VizState term -> VizState term) -> String -> VizState term -> VizState term Source #

Move to the next/previous step with the given transformation name.