Skip to content

Commit

Permalink
Merge pull request #269 from turion/dev_text
Browse files Browse the repository at this point in the history
Change Stdin clock to text
  • Loading branch information
turion authored Jan 5, 2024
2 parents 1193573 + a9f089b commit d3422e5
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 299 deletions.
4 changes: 2 additions & 2 deletions rhine-terminal/rhine-terminal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ executable rhine-terminal-simple
, rhine == 1.1
, rhine-terminal
, terminal >= 0.2.0.0
, text >= 1.2.5.0
, text >= 1.2
, time >= 1.9.3

default-language: Haskell2010
Expand All @@ -72,7 +72,7 @@ test-suite rhine-terminal-tests
, exceptions >= 0.10.4
, transformers >= 0.5
, terminal >= 0.2.0.0
, text >= 1.2.5.0
, text >= 1.2
, time >= 1.9.3
, stm >= 2.5.0
, hspec
Expand Down
6 changes: 3 additions & 3 deletions rhine/rhine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ extra-source-files: ChangeLog.md
extra-doc-files: README.md

tested-with:
GHC == 8.10.7
GHC == 9.0.2
GHC == 9.2.5
GHC == 9.4.4
GHC == 9.2.8
GHC == 9.4.7

source-repository head
type: git
Expand Down Expand Up @@ -134,6 +133,7 @@ library
, time >= 1.8
, free >= 5.1
, containers >= 0.5
, text >= 1.2 && < 2.1
, deepseq >= 1.4
, random >= 1.1
, MonadRandom >= 0.5
Expand Down
8 changes: 6 additions & 2 deletions rhine/src/FRP/Rhine/Clock/Realtime/Stdin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import Data.Time.Clock
-- transformers
import Control.Monad.IO.Class

-- text
import qualified Data.Text as Text
import qualified Data.Text.IO as Text

-- rhine
import FRP.Rhine.Clock
import FRP.Rhine.Clock.Proxy
Expand All @@ -27,13 +31,13 @@ data StdinClock = StdinClock

instance (MonadIO m) => Clock m StdinClock where
type Time StdinClock = UTCTime
type Tag StdinClock = String
type Tag StdinClock = Text.Text

initClock _ = do
initialTime <- liftIO getCurrentTime
return
( constM $ liftIO $ do
line <- getLine
line <- Text.getLine
time <- getCurrentTime
return (time, line)
, initialTime
Expand Down
31 changes: 0 additions & 31 deletions stack.8.10.7.yaml

This file was deleted.

124 changes: 0 additions & 124 deletions stack.8.10.7.yaml.lock

This file was deleted.

12 changes: 11 additions & 1 deletion stack.9.0.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ packages:

extra-deps:
- terminal-0.2.0.0@sha256:de6770ecaae3197c66ac1f0db5a80cf5a5b1d3b64a66a05b50f442de5ad39570,2977
- monad-bayes-1.1.0@sha256:8929887b2883e553b928dcc9b1326171c87b6aa26f11800dc8c55b119a9e9649,6123
- brick-1.6@sha256:4a94b18be68d2d27da9e84eff7f8b4dc8bfa3a40d28d536fb737828d73a0e3eb,18899
- bimap-0.5.0@sha256:aba506d02a1c93fc2b50dcbe728d2a4d07cca89b7033945418061a0b08576ebd,1889
- text-zipper-0.12@sha256:e96110598fc25e57a99ffcd8e583351af8b325b813aa5e3bd0adc627e3e02b6b,1472
Expand All @@ -18,6 +17,17 @@ extra-deps:
- simple-affine-space-0.2.1@sha256:bc9b1f5ae236b2898cd6f20da2d4589fd662fac2e2057f29b01330f65c030434,2046
- monad-schedule-0.1.2.1@sha256:95d6b9c6fd36f585e4a52938ebd1762c2e2caa8bb3c11ce86985dd11a2caae1a,1776
- time-domain-0.1.0.2@sha256:33f0a6efe6eb03e729f3dc828cd673b0bb511a0e50ac0b621c5acebd82f6d329,1007
- monad-bayes-1.1.1
- criterion-1.6.3.0
- criterion-measurement-0.2.1.0@sha256:646d5b5c55499580747746396b731ef9d6e2cd59fa7b488354788e68eae8e9bc,2098
- hspec-2.11.7@sha256:2869580a2a29e7beb6268ea3dc561583f4ae229ed1f47fb1c92e8c09ce35acec,1763
- lens-5.2.3@sha256:637287c76adff383063b3206a4213640de1a74839ec16008cc71b5b407f7d05e,15237
- linear-1.22@sha256:6402f0140156d2792ca0cbef3f5af2ec3675660e381574ac968cd5884724b8ba,4132
- optparse-applicative-0.18.1.0@sha256:b4cf8d9018e5e67cb1f14edb5130b6d05ad8bc1b5f6bd4efaa6ec0b7f28f559d,5132
- pretty-simple-4.1.2.0@sha256:1c0a96e4205010d704c52883c53c98258c588ce7196763b408949d9db712ba14,4113
- hspec-core-2.11.7@sha256:90d8873356d7e15f843bc523360e206e8e356ff6b82a1fa4b3889dc31d073ea1,6814
- hspec-discover-2.11.7@sha256:6307eb16d308258a99a242025df50217d835ba0a3f205b1202a100a175877b38,2169
- hspec-expectations-0.8.4@sha256:4237f094a7931202ff57ac6475542b0b314b50a7024550e2b6eb87cfb0d4ff93,1702

nix:
packages:
Expand Down
48 changes: 31 additions & 17 deletions stack.9.0.2.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,13 @@
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: time-domain-0.1.0.0@sha256:48146872e85f46399e8b8d7ff7c3d3b7f530e2de167b6893ba3ce649ba2e2e75,800
pantry-tree:
sha256: afa0bf300d4ebf038bdea9d3990c0075743c9d20ffc9cb43db862a93342f7ba4
size: 223
original:
hackage: time-domain-0.1.0.0@sha256:48146872e85f46399e8b8d7ff7c3d3b7f530e2de167b6893ba3ce649ba2e2e75,800
- completed:
hackage: terminal-0.2.0.0@sha256:de6770ecaae3197c66ac1f0db5a80cf5a5b1d3b64a66a05b50f442de5ad39570,2977
pantry-tree:
sha256: 54160663bf0cbcd1d9fa52e136740faaf91a82d1ca1efeb08e8e58575a7446e7
size: 1775
original:
hackage: terminal-0.2.0.0@sha256:de6770ecaae3197c66ac1f0db5a80cf5a5b1d3b64a66a05b50f442de5ad39570,2977
- completed:
hackage: monad-bayes-1.1.0@sha256:8929887b2883e553b928dcc9b1326171c87b6aa26f11800dc8c55b119a9e9649,6123
pantry-tree:
sha256: bf7f9b1351226a957c7ebd0c42316505be713690cd9d44425bd9cfd494a94161
size: 3568
original:
hackage: monad-bayes-1.1.0@sha256:8929887b2883e553b928dcc9b1326171c87b6aa26f11800dc8c55b119a9e9649,6123
- completed:
hackage: brick-1.6@sha256:4a94b18be68d2d27da9e84eff7f8b4dc8bfa3a40d28d536fb737828d73a0e3eb,18899
pantry-tree:
Expand Down Expand Up @@ -54,12 +40,40 @@ packages:
original:
hackage: vty-5.38@sha256:c3b46c8072f92b61dad09dac45ede37f1a093836e14ac84ece6515a4d3222864,5628
- completed:
hackage: dunai-0.9.2@sha256:8f289fdaac0da709a6d9a0408f68da69f53b21707a9b5b1921ba75846399a40b,6384
hackage: dunai-0.11.0@sha256:fc82a2ac6e2f7efcc2cd7f01412544ebe10d25143febdb0c3ebfb090220f4660,6372
pantry-tree:
sha256: 3cbd9e5e28773dfeab994f9e03f36dd72711377f4366dbb1cd2a03b9e9d173a3
sha256: 5435c0e0ccd848461ead40b59dd4c8dd7f36a010ed3f10c6795e0c52f8e614b4
size: 2172
original:
hackage: dunai-0.9.2@sha256:8f289fdaac0da709a6d9a0408f68da69f53b21707a9b5b1921ba75846399a40b,6384
hackage: dunai-0.11.0@sha256:fc82a2ac6e2f7efcc2cd7f01412544ebe10d25143febdb0c3ebfb090220f4660,6372
- completed:
hackage: simple-affine-space-0.2.1@sha256:bc9b1f5ae236b2898cd6f20da2d4589fd662fac2e2057f29b01330f65c030434,2046
pantry-tree:
sha256: 13dd2303e75c96fe2ea318d2e724005840211f4af44ba78da1886a16a4b0ec82
size: 696
original:
hackage: simple-affine-space-0.2.1@sha256:bc9b1f5ae236b2898cd6f20da2d4589fd662fac2e2057f29b01330f65c030434,2046
- completed:
hackage: monad-schedule-0.1.2.1@sha256:95d6b9c6fd36f585e4a52938ebd1762c2e2caa8bb3c11ce86985dd11a2caae1a,1776
pantry-tree:
sha256: 5c2fed7fb93cdf87abdd56b0df7e5c03719110d6aa538bc903ed6a6357f21393
size: 792
original:
hackage: monad-schedule-0.1.2.1@sha256:95d6b9c6fd36f585e4a52938ebd1762c2e2caa8bb3c11ce86985dd11a2caae1a,1776
- completed:
hackage: time-domain-0.1.0.2@sha256:33f0a6efe6eb03e729f3dc828cd673b0bb511a0e50ac0b621c5acebd82f6d329,1007
pantry-tree:
sha256: 9d0363b9fb0440fad439480ea21a584e124a2d61265e5d61c622ef95da6fca6e
size: 224
original:
hackage: time-domain-0.1.0.2@sha256:33f0a6efe6eb03e729f3dc828cd673b0bb511a0e50ac0b621c5acebd82f6d329,1007
- completed:
hackage: monad-bayes-1.1.1@sha256:d76401f5b7bdcfe0b454f63f932c97049d633ef2623f19981bba02c63af3a16c,6292
pantry-tree:
sha256: bf2bdaaf51aaa9b24b3ec3757d83db0e9f5507435984a452788e71cc2bd3b9b7
size: 3567
original:
hackage: monad-bayes-1.1.1
snapshots:
- completed:
sha256: f1c4aca9b9b81afbb9db55571acb0690cdc01ac97a178234de281f9dc075e95e
Expand Down
21 changes: 0 additions & 21 deletions stack.9.2.5.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions stack.9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
resolver: lts-20.26

packages:
- rhine
- rhine-examples
- rhine-gloss
- rhine-terminal
- rhine-bayes

extra-deps:
- dunai-0.11.1@sha256:b527b801c8b3901a4ebec733ac0bb6ff9cdd2b6b04ec385e18922f49c39e4b51,6372
- simple-affine-space-0.2.1@sha256:bc9b1f5ae236b2898cd6f20da2d4589fd662fac2e2057f29b01330f65c030434,2046
- terminal-0.2.0.0@sha256:de6770ecaae3197c66ac1f0db5a80cf5a5b1d3b64a66a05b50f442de5ad39570,2977
- monad-bayes-1.1.1
- hspec-2.11.7@sha256:2869580a2a29e7beb6268ea3dc561583f4ae229ed1f47fb1c92e8c09ce35acec,1763
- lens-5.2.3@sha256:637287c76adff383063b3206a4213640de1a74839ec16008cc71b5b407f7d05e,15237
- linear-1.22@sha256:6402f0140156d2792ca0cbef3f5af2ec3675660e381574ac968cd5884724b8ba,4132
- vty-5.38@sha256:c3b46c8072f92b61dad09dac45ede37f1a093836e14ac84ece6515a4d3222864,5628
- hspec-core-2.11.7@sha256:90d8873356d7e15f843bc523360e206e8e356ff6b82a1fa4b3889dc31d073ea1,6814
- hspec-discover-2.11.7@sha256:6307eb16d308258a99a242025df50217d835ba0a3f205b1202a100a175877b38,2169
- hspec-expectations-0.8.4@sha256:4237f094a7931202ff57ac6475542b0b314b50a7024550e2b6eb87cfb0d4ff93,1702

nix:
packages:
- libGL
- libGLU
Loading

0 comments on commit d3422e5

Please sign in to comment.