nitta-0.0.0.1: Tool for Hard Real-Time CGRA Processors
Copyright(c) Aleksandr Penskoi 2021
LicenseBSD3
Maintaineraleksandr.penskoi@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

NITTA.UIBackend.ViewHelper

Description

We can not autogenerate ToJSON implementation for some types, so we add helper types for doing that automatically. Why do we need to generate ToJSON automatically? We don't want to achieve consistency between client and server manually.

Synopsis

Documentation

data FView Source #

Helper for JSON serialization

Constructors

FView 

Fields

Instances

Instances details
ToJSON FView Source # 
Instance details

Defined in NITTA.Intermediate.Types

Methods

toJSON :: FView -> Value #

toEncoding :: FView -> Encoding #

toJSONList :: [FView] -> Value #

toEncodingList :: [FView] -> Encoding #

Generic FView Source # 
Instance details

Defined in NITTA.Intermediate.Types

Associated Types

type Rep FView :: Type -> Type #

Methods

from :: FView -> Rep FView x #

to :: Rep FView x -> FView #

Show FView Source # 
Instance details

Defined in NITTA.Intermediate.Types

Methods

showsPrec :: Int -> FView -> ShowS #

show :: FView -> String #

showList :: [FView] -> ShowS #

Viewable (F v x) FView Source # 
Instance details

Defined in NITTA.Intermediate.Types

Methods

view :: F v x -> FView Source #

type Rep FView Source # 
Instance details

Defined in NITTA.Intermediate.Types

type Rep FView = D1 ('MetaData "FView" "NITTA.Intermediate.Types" "nitta-0.0.0.1-Bv1VcjPxpSzB9i0NGusGVn" 'False) (C1 ('MetaCons "FView" 'PrefixI 'True) (S1 ('MetaSel ('Just "fvFun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "fvHistory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])))

class Viewable t v | t -> v where Source #

Type class of helpers required for autogeneration of ToJSON and typescript types.

Methods

view :: t -> v Source #

Instances

Instances details
Time t => Viewable (Interval t) IntervalView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

UnitTag tag => Viewable (Allocation tag) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Viewable (F v x) FView Source # 
Instance details

Defined in NITTA.Intermediate.Types

Methods

view :: F v x -> FView Source #

(Var v, Val x) => Viewable (BreakLoop v x) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Viewable (ConstantFolding v x) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Viewable (OptimizeAccum v x) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Viewable (OptimizeLogicalUnit v x) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Var v => Viewable (ResolveDeadlock v x) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

(Var v, Time t) => Viewable (Process t (StepInfo v x t)) (Process t StepInfoView) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

view :: Process t (StepInfo v x t) -> Process t StepInfoView Source #

UnitTag tag => Viewable (Bind tag v x) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Methods

view :: Bind tag v x -> DecisionView Source #

(UnitTag tag, Var v, Time t) => Viewable (DataflowSt tag v (Interval t)) DecisionView Source # 
Instance details

Defined in NITTA.Model.Problems.ViewHelper

Methods

view :: DataflowSt tag v (Interval t) -> DecisionView Source #

(Var v, Time t) => Viewable (StepInfo v x t) StepInfoView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

view :: StepInfo v x t -> StepInfoView Source #

(UnitTag tag, VarValTimeJSON v x t) => Viewable (DefTree tag v x t) (NodeView tag v x t) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

view :: DefTree tag v x t -> NodeView tag v x t Source #

viewNodeTree :: (Enum b, Num b, NextTick u b) => Tree (TargetSystem u tag v x t) tag v x t -> IO (TreeView ShortNodeView) Source #

data TreeView a Source #

Instances

Instances details
ToJSON a => ToJSON (TreeView a) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

toJSON :: TreeView a -> Value #

toEncoding :: TreeView a -> Encoding #

toJSONList :: [TreeView a] -> Value #

toEncodingList :: [TreeView a] -> Encoding #

Generic (TreeView a) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Associated Types

type Rep (TreeView a) :: Type -> Type #

Methods

from :: TreeView a -> Rep (TreeView a) x #

to :: Rep (TreeView a) x -> TreeView a #

Show a => Show (TreeView a) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

showsPrec :: Int -> TreeView a -> ShowS #

show :: TreeView a -> String #

showList :: [TreeView a] -> ShowS #

ToSample (TreeView ShortNodeView) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

type Rep (TreeView a) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

type Rep (TreeView a) = D1 ('MetaData "TreeView" "NITTA.UIBackend.ViewHelper" "nitta-0.0.0.1-Bv1VcjPxpSzB9i0NGusGVn" 'False) (C1 ('MetaCons "TreeNodeView" 'PrefixI 'True) (S1 ('MetaSel ('Just "rootLabel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "subForest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TreeView a])))

data ShortNodeView Source #

Instances

Instances details
ToJSON ShortNodeView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

toJSON :: ShortNodeView -> Value #

toEncoding :: ShortNodeView -> Encoding #

toJSONList :: [ShortNodeView] -> Value #

toEncodingList :: [ShortNodeView] -> Encoding #

Generic ShortNodeView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Associated Types

type Rep ShortNodeView :: Type -> Type #

Show ShortNodeView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

ToSample (TreeView ShortNodeView) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

type Rep ShortNodeView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

data NodeView tag v x t Source #

Instances

Instances details
(VarValTimeJSON v x t, ToJSON tag) => ToJSON (NodeView tag v x t) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

toJSON :: NodeView tag v x t -> Value #

toEncoding :: NodeView tag v x t -> Encoding #

toJSONList :: [NodeView tag v x t] -> Value #

toEncodingList :: [NodeView tag v x t] -> Encoding #

Generic (NodeView tag v x t) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Associated Types

type Rep (NodeView tag v x t) :: Type -> Type #

Methods

from :: NodeView tag v x t -> Rep (NodeView tag v x t) x0 #

to :: Rep (NodeView tag v x t) x0 -> NodeView tag v x t #

ToSample (NodeView tag v x t) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

toSamples :: Proxy (NodeView tag v x t) -> [(Text, NodeView tag v x t)] #

(UnitTag tag, VarValTimeJSON v x t) => Viewable (DefTree tag v x t) (NodeView tag v x t) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

view :: DefTree tag v x t -> NodeView tag v x t Source #

type Rep (NodeView tag v x t) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

newtype StepInfoView Source #

Constructors

StepInfoView Text 

Instances

Instances details
ToJSON StepInfoView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

toJSON :: StepInfoView -> Value #

toEncoding :: StepInfoView -> Encoding #

toJSONList :: [StepInfoView] -> Value #

toEncodingList :: [StepInfoView] -> Encoding #

Generic StepInfoView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Associated Types

type Rep StepInfoView :: Type -> Type #

Time t => ToSample (Process t StepInfoView) Source # 
Instance details

Defined in NITTA.UIBackend.REST

(Var v, Time t) => Viewable (Process t (StepInfo v x t)) (Process t StepInfoView) Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

view :: Process t (StepInfo v x t) -> Process t StepInfoView Source #

(Var v, Time t) => Viewable (StepInfo v x t) StepInfoView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

Methods

view :: StepInfo v x t -> StepInfoView Source #

type Rep StepInfoView Source # 
Instance details

Defined in NITTA.UIBackend.ViewHelper

type Rep StepInfoView = D1 ('MetaData "StepInfoView" "NITTA.UIBackend.ViewHelper" "nitta-0.0.0.1-Bv1VcjPxpSzB9i0NGusGVn" 'True) (C1 ('MetaCons "StepInfoView" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

type VarValTimeJSON v x t = (VarValTime v x t, ToJSONKey v, ToJSON v, ToJSON x, ToJSON t) Source #

Orphan instances

ToJSON TreeInfo Source # 
Instance details

Methods

toJSON :: TreeInfo -> Value #

toEncoding :: TreeInfo -> Encoding #

toJSONList :: [TreeInfo] -> Value #

toEncodingList :: [TreeInfo] -> Encoding #

ToSample TreeInfo Source # 
Instance details

ToSample Integer Source # 
Instance details

Methods

toSamples :: Proxy Integer -> [(Text, Integer)] #

(ToJSONKey v, ToJSON v, ToJSON x) => ToJSON (TestbenchReport v x) Source # 
Instance details

Methods

toJSON :: TestbenchReport v x -> Value #

toEncoding :: TestbenchReport v x -> Encoding #

toJSONList :: [TestbenchReport v x] -> Value #

toEncodingList :: [TestbenchReport v x] -> Encoding #

ToSample (TestbenchReport String Int) Source # 
Instance details

(Var v, Time t) => Viewable (Process t (StepInfo v x t)) (Process t StepInfoView) Source # 
Instance details

Methods

view :: Process t (StepInfo v x t) -> Process t StepInfoView Source #

(Var v, Time t) => Viewable (StepInfo v x t) StepInfoView Source # 
Instance details

Methods

view :: StepInfo v x t -> StepInfoView Source #

(UnitTag tag, VarValTimeJSON v x t) => Viewable (DefTree tag v x t) (NodeView tag v x t) Source # 
Instance details

Methods

view :: DefTree tag v x t -> NodeView tag v x t Source #