natefaubion / purescript-routing-duplex

Unified parsing and printing for routes in PureScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

product operator in the docs is incorrect

cscalfani opened this issue · comments

The docs say to use (/) for product but the code uses (~):

infixr 0 product as ~

(/) is slightly more general since it takes care of some syntactic conveniences for static prefixes and suffixes, but is otherwise an alias for product.

instance gsepProduct ::
GRouteDuplexCtr b c =>
GSep (RouteDuplex a a) (RouteDuplex b b) (Product (Argument a) c) where
gsep = product

foo / bar is the same for as foo ~ bar given two codecs, however / lets you do things like "api" / foo / bar / "edit" and still keep the foo ~ bar equivalence.

Thanks. I see.

May I suggest adding:

import Routing.Duplex.Generic.Syntax ((/))

to the docs at the point where this operator is introduced.