From a3df10840b7693a7a17b6774195bd2008dd9e93c Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:38:40 +0100 Subject: [PATCH] new format Result/main.roc --- examples/Results/main.roc | 10 +++++----- flake.lock | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/Results/main.roc b/examples/Results/main.roc index 43170cb..bae6dc6 100644 --- a/examples/Results/main.roc +++ b/examples/Results/main.roc @@ -68,15 +68,15 @@ parseWithTryOp = \line -> parseWithTryOpV2 = \line -> { before: fullName, after: birthYearStr } = line - |> Str.splitFirst " was born in " - |> Result.mapErr? \_ -> Err InvalidRecordFormat + |> Str.splitFirst " was born in " + |> Result.mapErr? \_ -> Err InvalidRecordFormat { before: firstName, after: lastName } = fullName - |> Str.splitFirst " " - |> Result.mapErr? \_ -> Err InvalidNameFormat + |> Str.splitFirst " " + |> Result.mapErr? \_ -> Err InvalidNameFormat birthYear = Str.toU16 birthYearStr - |> Result.mapErr? \_ -> Err InvalidBirthYearFormat + |> Result.mapErr? \_ -> Err InvalidBirthYearFormat Ok { firstName, lastName, birthYear } ## This function parses a string using a given parser and returns a string to diff --git a/flake.lock b/flake.lock index ed357b4..09f6844 100644 --- a/flake.lock +++ b/flake.lock @@ -102,11 +102,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1732237922, - "narHash": "sha256-x4tA+LkfElGMCMo0fve76z3bRkpSDxZ9BF1h5iNbBRc=", + "lastModified": 1733120124, + "narHash": "sha256-xqhX2erDfsjBrbT61LJzH124QtOf7/KZyTBpeJOBKas=", "owner": "roc-lang", "repo": "roc", - "rev": "22423ca98bef41e2f55ae54e11c632bd0610c241", + "rev": "a7168a4ad6ea9440bc8a8538672c633cf3a2261d", "type": "github" }, "original": {