Questions tagged [rio]

A modern and safe standard library for Haskell, aimed at industrial use.

The goal of the rio library is to make it easier to adopt Haskell for writing production software. It is intended as a cross between:

  • Collection of well designed, trusted libraries
  • Useful Prelude replacement
  • A set of best practices for writing production quality Haskell code

GitHub link

18 questions
3
votes
2 answers

How to define a simple RIO LogFunc without bracketing execution

I'm trying to set up logging in a RIO application; yet, I don't seem to understand the logging interface. RIO documentation encourages to define a logger and run the application as follows: withLogFunc logOptions $ \lf -> do let env = Env --…
Ulrich Schuster
  • 1,670
  • 15
  • 24
3
votes
1 answer

Difficulty composing log messages for the RIO.Logger via UTF8Builder

I'm using the RIO monad and RIO libraries and want to add logging. The RIO log functions, like logInfo, take a Utf8Builder as parameter, which is a wrapper around a ByteString builder. I would like to efficiently insert log statements in my code.…
Ulrich Schuster
  • 1,670
  • 15
  • 24
3
votes
1 answer

Capture the output while terminating a process

I need to run a process, do something while it is running, and finally terminate it. The process in question writes things to standard output that I would like to retain. Unfortunately, it seems that the process dies before I can connect and extract…
Ignat Insarov
  • 4,660
  • 18
  • 37
2
votes
1 answer

Rasterio Driver Registration

I'm trying to explore/pre-process some of the USGS's landsat data. currently I have downloaded two scenes through python's pylandsat module. These scenes are: LE07_L1TP_205050_19991104_20170216_01_T1 LE07_L1TP_206050_19991111_20170216_01_T1 I…
jpate24
  • 21
  • 1
2
votes
1 answer

Deny Authentication in Servant.Auth with RIO

I'm trying to combine Servant authentication (servant-auth-server package) with RIO as my handler monad to avoid the ExceptT anti-pattern. However, I can't line up the types properly for handling denied authentications. My (simplified) API endpoint…
Ulrich Schuster
  • 1,670
  • 15
  • 24
2
votes
2 answers

Simplifying the invocation of functions stored inside an ReaderT environment

Let's assume I have an environment record like this: import Control.Monad.IO.Class import Control.Monad.Trans.Reader type RIO env a = ReaderT env IO a data Env = Env { foo :: Int -> String -> RIO Env (), bar :: Int -> RIO Env Int } env ::…
danidiaz
  • 26,936
  • 4
  • 45
  • 95
1
vote
0 answers

I can't install from Delphi 10.3.3 Android 32/64 on Android 11 device

I can't install a Delphi 10.3.3 Android 32/64-bit app on an Android 11 device. I'm getting this error: Performing Streamed Install. adb: failed to install H:\Mis…
Germán Balbi
  • 56
  • 1
  • 7
1
vote
1 answer

What does sequential read write in fio means?

Does sequential read write in fio (https://fio.readthedocs.io/en/latest/fio_doc.html#cmdoption-arg-readwrite) corresponds to the following rust code snippet below? let mut file = File::open("10G.img").unwrap(); let mut writer = OpenOptions::new() …
Sacchirro
  • 33
  • 1
  • 4
1
vote
1 answer

Serving a Servant NoContent response with RIO

In my attempt to write an authenticated Servant API where handlers use the RIO monad instead of Servant's own Handler monad, I am stuck on authenticated routes that return no content; i.e., Servant's NoContent type. When I try to hoist the RIO…
1
vote
0 answers

Haskell RIO monad inside persistent with pool

Similar question: Haskell / Persistent-Sqlite: "No instance for (Control.Monad.Trans.Resource.MonadResource IO)" I'm trying the use the selectSource from persistent to read the database in streaming mode and log the values in the console using…
kolam
  • 731
  • 4
  • 17
1
vote
1 answer

RIO.ByteString.split not working as documented

Trying an example from split docs: $ stack ghci ... Prelude> :set -XOverloadedStrings Prelude> import qualified RIO.ByteString as B Prelude B> B.split 'a' "aXaXaXa" :3:9: error: • Couldn't match expected type ‘GHC.Word.Word8’ …
levant pied
  • 3,886
  • 5
  • 37
  • 56
1
vote
0 answers

Two Rio instances on same network - java.rmi.ConnectException: Connection refused to host: 127.0.1.1;

I have seen the following error reported in a few places, but not in the context I am getting it. So if anyone can give some advise, I would appreciate it. java.rmi.ConnectException: Connection refused to host: 127.0.1.1; I have two Rio…
Richard
  • 8,193
  • 28
  • 107
  • 228
0
votes
0 answers

Please HELP Restore xlsx-file after accidental export in R

I accidentally exported a data frame in R and lost over 5,000 obs. because of that. I could reproduce the data set, but that would take me abot 24 hours of screen time. Is there any way I can restore the xlsx-file to the last version before I…
Joschi Nin
  • 37
  • 5
0
votes
0 answers

What's the best way to implement the dma_device included in rio_mport to reuse the dma device drivers already present in dma_engine?

I am developing a device driver suitable for the Linux RapidIO Subsystem (https://www.kernel.org/doc/html/v5.4/driver-api/rapidio/index.html) which must drive an FPGA in which are instantiated 3 DMA IPs (Intellectual Property) working together with…
Pax to You
  • 71
  • 7
0
votes
0 answers

I'm wanting to send an ACTION_RECOGNIZE_SPEECH Intent using Delphi 10.4

I can send intents and handle the actions etc but I have run nto a new problem regarding speech in Android. The intent looks like this: procedure TsendForm.Button8Click(Sender: TObject); var Intent: JIntent; begin Intent…
Winston
  • 38
  • 6
1
2