That makes sense. Every record type needs to have a type-class instance
declared, to support JSON-ification. My advice is to give up on writing
Ur/Web code until you have read a Haskell monad tutorial and feel
comfortable with the concepts.
On 03/08/2017 06:32 PM, Isaac Torbett wrote:
table topic: { Id: int, Title: string, Body: string, Links: string,
Author: string, Summary: string }
PRIMARY KEY Id
fun main () =
returnBlob (
textBlob (
Json.toJson {
Topics = queryL1 (SELECT topic.Title, topic.Body FROM
topic)
}
)
) (blessMime "application/json")
I've tried changing line 12 to:
, blessMime "application/json")
As that seems to me like it makes more sense, but my one line of error
turns into quite a lot more than one line. (*Measure in lines because
I am still having trouble reading the errors.*)
Error for the first code block is:
"/home/izach/projects/urweb/test.ur:7:3: (to 7:14) Can't resolve type
class instance"
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur