| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Unison.Codebase.Transcript
Description
The data model for Unison transcripts.
Synopsis
- type ExpectingError = Bool
- type HasBug = Bool
- type ScratchFileName = Text
- data Hidden
- = Shown
- | HideOutput
- | HideAll
- data UcmLine
- data UcmContext
- data APIRequest
- pattern CMarkCodeBlock :: Maybe PosInfo -> Text -> Text -> Node
- type Stanza = Either Node ProcessedBlock
- data InfoTags a = InfoTags {
- hidden :: Maybe Hidden
- expectingError :: ExpectingError
- hasBug :: HasBug
- generated :: Bool
- additionalTags :: a
- getCommonInfoTags :: ProcessedBlock -> InfoTags ()
- data Transcript = Transcript {
- frontmatter :: Value
- stanzas :: [Stanza]
- settings :: Transcript -> Settings
- data TranscriptType
- data Behaviors f = Behaviors {
- autoupdate :: f Bool
- getHidden :: f (ProcessedBlock -> Hidden)
- extractBehaviors :: Settings -> Behaviors Identity
- data Settings = Settings {}
- defaultInfoTags :: a -> InfoTags a
- data ProcessedBlock
- data Node
Documentation
type ExpectingError = Bool Source #
type ScratchFileName = Text Source #
Constructors
| Shown | |
| HideOutput | |
| HideAll |
Constructors
| UcmCommand UcmContext Text | |
| UcmComment Text | Text does not include the '--' prefix. |
| UcmOutputLine Text |
data UcmContext Source #
Where a command is run: a project branch (myproject/mybranch>).
Constructors
| UcmContextEmpty | Use the current project & branch |
| UcmContextProject (ProjectAndBranch ProjectName ProjectBranchName) | Explicit project & branch |
Instances
| Show UcmContext Source # | |
Defined in Unison.Codebase.Transcript Methods showsPrec :: Int -> UcmContext -> ShowS # show :: UcmContext -> String # showList :: [UcmContext] -> ShowS # | |
| Eq UcmContext Source # | |
Defined in Unison.Codebase.Transcript | |
data APIRequest Source #
Constructors
| GetRequest Text | |
| PostRequest Text Text | URL, Body |
| APIComment Text | |
| APIResponse Text |
Instances
| Show APIRequest Source # | |
Defined in Unison.Codebase.Transcript Methods showsPrec :: Int -> APIRequest -> ShowS # show :: APIRequest -> String # showList :: [APIRequest] -> ShowS # | |
| Eq APIRequest Source # | |
Defined in Unison.Codebase.Transcript | |
Constructors
| InfoTags | |
Fields
| |
Instances
| Foldable InfoTags Source # | |
Defined in Unison.Codebase.Transcript Methods fold :: Monoid m => InfoTags m -> m # foldMap :: Monoid m => (a -> m) -> InfoTags a -> m # foldMap' :: Monoid m => (a -> m) -> InfoTags a -> m # foldr :: (a -> b -> b) -> b -> InfoTags a -> b # foldr' :: (a -> b -> b) -> b -> InfoTags a -> b # foldl :: (b -> a -> b) -> b -> InfoTags a -> b # foldl' :: (b -> a -> b) -> b -> InfoTags a -> b # foldr1 :: (a -> a -> a) -> InfoTags a -> a # foldl1 :: (a -> a -> a) -> InfoTags a -> a # elem :: Eq a => a -> InfoTags a -> Bool # maximum :: Ord a => InfoTags a -> a # minimum :: Ord a => InfoTags a -> a # | |
| Traversable InfoTags Source # | |
Defined in Unison.Codebase.Transcript | |
| Functor InfoTags Source # | |
| Read a => Read (InfoTags a) Source # | |
| Show a => Show (InfoTags a) Source # | |
| Eq a => Eq (InfoTags a) Source # | |
| Ord a => Ord (InfoTags a) Source # | |
Defined in Unison.Codebase.Transcript | |
getCommonInfoTags :: ProcessedBlock -> InfoTags () Source #
data Transcript Source #
A transcript is executable Markdown, akin to a Jupyter Notebook.
NB: This is effectively the AST. It needs to preserve anything we want to be able to serialize into transcript output.
Constructors
| Transcript | |
Fields
| |
Instances
| Show Transcript Source # | |
Defined in Unison.Codebase.Transcript Methods showsPrec :: Int -> Transcript -> ShowS # show :: Transcript -> String # showList :: [Transcript] -> ShowS # | |
settings :: Transcript -> Settings Source #
data TranscriptType Source #
Different types make various settingal changes.
Constructors
| Standard | The default type, nothing changed from the default setting. |
| Tutorial | Enables auto-update and changes the default hidden value for |
Instances
The atomic behaviors that can be controlled by settings. They may be set individually, or implied by some aggregate setting.
Constructors
| Behaviors | |
Fields
| |
A set of customizable settings for a transcript.
Constructors
| Settings | |
Fields | |
defaultInfoTags :: a -> InfoTags a Source #
data ProcessedBlock Source #
Constructors
| Ucm (InfoTags ()) [UcmLine] | |
| Unison (InfoTags (Maybe ScratchFileName)) Text | |
| API (InfoTags ()) [APIRequest] |
Instances
| Show ProcessedBlock Source # | |
Defined in Unison.Codebase.Transcript Methods showsPrec :: Int -> ProcessedBlock -> ShowS # show :: ProcessedBlock -> String # showList :: [ProcessedBlock] -> ShowS # | |
| Eq ProcessedBlock Source # | |
Defined in Unison.Codebase.Transcript Methods (==) :: ProcessedBlock -> ProcessedBlock -> Bool # (/=) :: ProcessedBlock -> ProcessedBlock -> Bool # | |
Instances
| Data Node | |
Defined in CMark Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Node -> c Node # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Node # dataTypeOf :: Node -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Node) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Node) # gmapT :: (forall b. Data b => b -> b) -> Node -> Node # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Node -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Node -> r # gmapQ :: (forall d. Data d => d -> u) -> Node -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Node -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Node -> m Node # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Node -> m Node # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Node -> m Node # | |
| Generic Node | |
| Read Node | |
| Show Node | |
| Eq Node | |
| Ord Node | |
| type Rep Node | |
Defined in CMark type Rep Node = D1 ('MetaData "Node" "CMark" "cmark-0.6.1-Ll0dX5qpF6PEeRr1RSJhdm" 'False) (C1 ('MetaCons "Node" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PosInfo)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Node])))) | |