-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I can't get how to use the lenses generated by purescript-bridge...
Let's suppose I have the following haskell types defined:
data Book = Book { author :: Author, pages :: Int }
data Author = Author { name :: String }
given a purescript Book:
let a = { name: "James" }
let b = { author: a, pages: 100}
How can I access to the number of pages, and the author name?
I would expect something like this:
let pages = b ^. _pages
let name = b ^. _author ^. _name
but it does not seem to work...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels