From 2d0f8482e9e2dfed809d71d55808221cc9bf61eb Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Mon, 5 Apr 2021 21:18:49 -0400 Subject: [PATCH] Rename Http.getStr to Http.getUtf8 --- examples/cli/HttpGet.roc | 2 +- examples/cli/platform/Http.roc | 6 +++--- examples/cli/platform/Pkg-Config.roc | 2 +- examples/cli/platform/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/cli/HttpGet.roc b/examples/cli/HttpGet.roc index e3d45c0cec..85abc6fd86 100644 --- a/examples/cli/HttpGet.roc +++ b/examples/cli/HttpGet.roc @@ -11,4 +11,4 @@ main = {} <- await (Stdout.line "The contents of \(url) are:") - Http.getStr url + Http.getUtf8 url diff --git a/examples/cli/platform/Http.roc b/examples/cli/platform/Http.roc index 900e920cc6..36817d0239 100644 --- a/examples/cli/platform/Http.roc +++ b/examples/cli/platform/Http.roc @@ -1,6 +1,6 @@ interface Http - exposes [ getStr ] + exposes [ getUtf8 ] imports [ fx.Effect, Task ] # TODO FIXME Task.{ Task } -getStr : Str -> Task.Task {} * -getStr = \url -> Effect.map (Effect.httpGetStr url) (\_ -> Ok {}) +getUtf8 : Str -> Task.Task {} * +getUtf8 = \url -> Effect.map (Effect.httpGetUtf8 url) (\_ -> Ok {}) diff --git a/examples/cli/platform/Pkg-Config.roc b/examples/cli/platform/Pkg-Config.roc index 6a2b1c1913..c1f15a589f 100644 --- a/examples/cli/platform/Pkg-Config.roc +++ b/examples/cli/platform/Pkg-Config.roc @@ -8,7 +8,7 @@ platform rtfeldman/roc-cli { putChar : I64 -> Effect {}, putLine : Str -> Effect {}, - httpGetStr : Str -> Effect Str, + httpGetUtf8 : Str -> Effect Str, getLine : Effect Str } diff --git a/examples/cli/platform/src/lib.rs b/examples/cli/platform/src/lib.rs index dc8197df43..fcab4bfe11 100644 --- a/examples/cli/platform/src/lib.rs +++ b/examples/cli/platform/src/lib.rs @@ -47,7 +47,7 @@ pub fn roc_fx_putLine(line: RocStr) -> () { } #[no_mangle] -pub fn roc_fx_httpGetStr(url: RocStr) -> RocStr { +pub fn roc_fx_httpGetUtf8(url: RocStr) -> RocStr { println!("TODO: read from this URL {:?}", url); RocStr::from_slice("url!!!".as_bytes())