Skip to content

Commit

Permalink
Release/0.2.0.1 (#32)
Browse files Browse the repository at this point in the history
* Support reflex-vty 0.5

* Support reflex-vty 0.5
  • Loading branch information
ali-abrar authored Aug 2, 2023
1 parent 17614bd commit d336127
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for reflex-ghci

## 0.2.0.1

* Support reflex-vty 0.5

## 0.2.0.0

* Support ghc 9.6 and reflex-vty 0.4
Expand Down
6 changes: 3 additions & 3 deletions dep/reflex-process/github.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex-process",
"branch": "release/0.3.2.0",
"branch": "release/0.3.2.1",
"private": false,
"rev": "b1e0606ec895f3942b8d8aae7a011f69062cb1c5",
"sha256": "0i15z9nlkprxq84sh5w159lq67z51q1ml3g89icir8l6biasymx4"
"rev": "05710fb3cf02e3ada1174e6ba979c8ff0a5e3878",
"sha256": "0z094jrkwbphnydac0za2ddz6fwis9mshr8d5x96jwi3cjx542hj"
}
6 changes: 3 additions & 3 deletions dep/reflex/github.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"owner": "reflex-frp",
"repo": "reflex",
"branch": "aa/headless-instances",
"branch": "release/0.9.2.0",
"private": false,
"rev": "bda4f8d1a245a9e4d1ebcd81c3be9445460e6251",
"sha256": "1a4fcp2v779dlp81fj1fxz7dagix4y1z254ia3013irzkak57pf0"
"rev": "b7d933a33a72949a700414bda7a23aa90105431a",
"sha256": "03h5n2jzxmic779d334ini7bgy4xmy59j9iyd5pdprkpqqa930nh"
}
4 changes: 2 additions & 2 deletions reflex-ghci.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: reflex-ghci
version: 0.2.0.0
version: 0.2.0.1
synopsis: A GHCi widget library for use in reflex applications
description:
Run GHCi from within a Reflex FRP (<https://reflex-frp.org>) application and interact with it using a functional reactive interface.
Expand Down Expand Up @@ -37,7 +37,7 @@ library
, reflex-fsnotify >= 0.3 && < 0.4
, reflex-process >= 0.3.2 && < 0.4
, regex-tdfa >= 1.2.3 && < 1.4
, reflex-vty >= 0.3 && < 0.5
, reflex-vty >= 0.3 && < 0.6
, semialign > 1 && < 2
, text >= 1.2 && < 2.1
, these > 1 && < 2
Expand Down
6 changes: 3 additions & 3 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ let
} {};
reflex = self.callCabal2nix "reflex" (rp.hackGet ./dep/reflex) {};
reflex-process = self.callCabal2nix "reflex-process" (rp.hackGet ./dep/reflex-process) {};
reflex-vty = self.callHackageDirect {
reflex-vty = self.callHackageDirect {
pkg = "reflex-vty";
ver = "0.4.1.1";
sha256 = "1dzkfhfwifl47fvvzd40yqvyckpc3q6d9g18az9mqlbxfhszfb45";
ver = "0.5.1.0";
sha256 = "0h6fh2aiy5m9l5v1fnrdi3pwx15p37vqv1yhp6556yzcb3bnbmyp";
} {};
reflex-fsnotify = self.callHackageDirect {
pkg = "reflex-fsnotify";
Expand Down
8 changes: 6 additions & 2 deletions src/Reflex/Vty/GHCi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ run cmd expr = mainWidget $ initManager_ $ do
(ix, Just c) -> cmdbtn ix c

let showOutput (Cmd _ out err) = do
_ <- tile flex $ boxStatic def $ scrollableText never $ pure $ T.decodeUtf8 . unLines $ out
_ <- tile flex $ boxStatic def $ scrollableText never $ pure $ T.decodeUtf8 . unLines $ err
let scrollCfg = def
{ _scrollableConfig_startingPosition = ScrollPos_Bottom
, _scrollableConfig_scrollToBottom = pure (Just ScrollToBottom_Maintain)
}
_ <- tile flex $ boxStatic def $ scrollableText scrollCfg $ pure $ T.decodeUtf8 . unLines $ out
_ <- tile flex $ boxStatic def $ scrollableText scrollCfg $ pure $ T.decodeUtf8 . unLines $ err
pure ()

void $ networkHold (void $ networkView $ maybe blank (showOutput . snd) <$> command) $ leftmost
Expand Down

0 comments on commit d336127

Please sign in to comment.