Skip to content

Commit

Permalink
Bump version to 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-ilyin committed May 3, 2017
1 parent 1cb3056 commit 48ed547
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
5 changes: 4 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
### 1.0.7 - May 02 2017
### 1.0.8 - May 03 2017
* Trying to fix Decode error message

#### 1.0.7 - May 02 2017
* Renames EdIlyin.Elm.Core to EdIlyin.FSharp.Elm.Core

#### 1.0.6 - May 02 2017
Expand Down
8 changes: 4 additions & 4 deletions src/EdIlyin.FSharp.Elm.Core/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("EdIlyin.FSharp.Elm.Core")>]
[<assembly: AssemblyProductAttribute("EdIlyin.FSharp.Elm.Core")>]
[<assembly: AssemblyDescriptionAttribute("Brings to the F# Elm language core package modules like Json.Encode, Json.Decode, Basics, Debug, Result, Tuple, etc")>]
[<assembly: AssemblyVersionAttribute("1.0.7")>]
[<assembly: AssemblyFileVersionAttribute("1.0.7")>]
[<assembly: AssemblyVersionAttribute("1.0.8")>]
[<assembly: AssemblyFileVersionAttribute("1.0.8")>]
[<assembly: AssemblyConfigurationAttribute("Release")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "EdIlyin.FSharp.Elm.Core"
let [<Literal>] AssemblyProduct = "EdIlyin.FSharp.Elm.Core"
let [<Literal>] AssemblyDescription = "Brings to the F# Elm language core package modules like Json.Encode, Json.Decode, Basics, Debug, Result, Tuple, etc"
let [<Literal>] AssemblyVersion = "1.0.7"
let [<Literal>] AssemblyFileVersion = "1.0.7"
let [<Literal>] AssemblyVersion = "1.0.8"
let [<Literal>] AssemblyFileVersion = "1.0.8"
let [<Literal>] AssemblyConfiguration = "Release"
11 changes: 3 additions & 8 deletions src/EdIlyin.FSharp.Elm.Core/Decode.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type DecoderError = string


type Decoder<'a,'b> = {
decoder : ('a -> Result<DecoderError, 'b>)
decoder : ('a -> Result<DecoderLabel * DecoderError, 'b>)
label: DecoderLabel
}

Expand All @@ -23,10 +23,8 @@ module Decode =


let decodeValue decoder value =
let label = getLabel decoder

match run decoder value with
| Err error ->
| Err (label, error) ->
sprintf "Expecting %s. %s" label error |> Err

| Ok value' -> Ok value'
Expand Down Expand Up @@ -62,15 +60,12 @@ module Decode =


let andThen func decoder =
let label = getLabel decoder |> sprintf "%s and then"

primitive
(fun input ->
match run decoder input with
| Err error -> Err error
| Err (label, error) -> Err (label, error)
| Ok value -> run (func value) input
)
<?> label


let (>>=) decoder func = andThen func decoder
Expand Down

0 comments on commit 48ed547

Please sign in to comment.