| Copyright | (c) Leon Vatthauer 2026 |
|---|---|
| License | GPL-3 |
| Maintainer | Leon Vatthauer <leon.vatthauer@fau.de> |
| Stability | experimental |
| Portability | non-portable (ghc-wasm-meta) |
| Safe Haskell | None |
| Language | GHC2024 |
App.Update
Contents
Description
The update loop of the application, basically all of its logic.
Synopsis
- updateModel :: Action -> Effect ROOT Model Action
- updateProof :: Effect ROOT Model Action
- updateTitle :: Effect ROOT Model Action
- checkProof :: MonadState Model m => m ()
- clearDrag :: Effect ROOT Model Action
- readURI :: URI -> Effect ROOT Model Action
- pushProofURI :: Effect ROOT Model Action
- replaceInitialURI :: Effect ROOT Model Action
- proofReparse :: Effect ROOT Model Action
- naReparseLine :: NodeAddr -> Effect ROOT Model Action
- dropBeforeLine :: NodeAddr -> Effect ROOT Model Action
- setFocus :: Either NodeAddr NodeAddr -> Effect ROOT Model Action
- showTooltip :: MisoString -> Effect ROOT Model Action
- hideTooltip :: Effect ROOT Model Action
- toggleSidebar :: Effect ROOT Model Action
- class FromText a where
- tryParse :: FromText a => Model -> Int -> Text -> Wrapper a
- reparse :: FromText a => Model -> Int -> Wrapper a -> Wrapper a
- reparseProof :: Model -> Proof -> Proof
Update loop
Effects
updateTitle :: Effect ROOT Model Action Source #
Updates the document.title to show how many errors there are and
what the conclusion of the Proof is.
checkProof :: MonadState Model m => m () Source #
Runs the Proof verification algorithm, i.e.
- Checks that symbols only occur with the same arity
- Checks freshness
Assumptions - Verifies all
RuleApplications.
clearDrag :: Effect ROOT Model Action Source #
To be called after dragging ends, resets all drag parameters.
readURI :: URI -> Effect ROOT Model Action Source #
Takes a URI and reads in a proof if it contains one.
naReparseLine :: NodeAddr -> Effect ROOT Model Action Source #
Re-parses a single Derivation or Assumption.
dropBeforeLine :: NodeAddr -> Effect ROOT Model Action Source #
Move or create a Assumption, Derivation or Proof before a given NodeAddr.
setFocus :: Either NodeAddr NodeAddr -> Effect ROOT Model Action Source #
Set focus to a input field specified by a NodeAddr
(either the Formula or the RuleApplication).
showTooltip :: MisoString -> Effect ROOT Model Action Source #
Show the popover with the given id.
toggleSidebar :: Effect ROOT Model Action Source #
Flip the sidebar state and save it in sessionStorage
Parsing
class FromText a where Source #
Class for parsing Text
Methods
Instances
| FromText RawAssumption Source # | |
Defined in App.Update | |
| FromText RawFormula Source # | |
Defined in App.Update | |
| FromText RuleApplication Source # | |
Defined in App.Update | |