Skip to content

Commit

Permalink
Update example in Readme (#16)
Browse files Browse the repository at this point in the history
This did not compile without the `<<< string`:

```
  No type class instance was found for
  
    Prim.RowList.RowToList ( search :: forall a b. RouteDuplex a b -> RouteDuplex ... ...
                           )
                           t2
  
  The instance head contains unknown type variables. Consider adding a type annotation.
```

The more verbose one `(record # _search := optional (param "search"))` worked though.
  • Loading branch information
Michael Bock authored May 6, 2020
1 parent eceaba4 commit 150d92b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ This explicit record creation can be done any time you have a record in your rou

```purescript
{ ...
, "Feed": path "feed" $ params { search: optional }
, "Feed": path "feed" $ params { search: optional <<< string }
-- alternately
, "Feed": "feed" / params { search: optional }
, "Feed": "feed" / params { search: optional <<< string }
-- alternately
, "Feed": "feed" ? { search: optional }
, "Feed": "feed" ? { search: optional <<< string }
}
```

Expand All @@ -221,7 +221,7 @@ route = root $ sum
{ "Root": noArgs
, "Profile": "user" / segment
, "Post": "user" / segment / "post" / int segment
, "Feed": "feed" ? { search: optional }
, "Feed": "feed" ? { search: optional <<< string }
}
```

Expand Down

0 comments on commit 150d92b

Please sign in to comment.