slamdata / purescript-markdown

A Purescript library for parsing SlamData's dialect of Markdown.
Other
36 stars 24 forks source link

Updates for 0.12 #85

Closed paulyoung closed 6 years ago

paulyoung commented 6 years ago

There are a few things to discuss here, which I'll point out.

I think the biggest change is using sharkdp/purescript-decimals instead of purescript-contrib/purescript-precise. The former seems better maintained but has a JavaScript dependency.

paulyoung commented 6 years ago

FWIW I opened https://github.com/purescript-contrib/purescript-precise/pull/13 so we could keep using that if necessary.

paulyoung commented 6 years ago

This now depends on my PR for purescript-precise.

Still getting a stack overflow:

Original:
   (Right (SlamDown ((Paragraph ((FormField "name" false (TextBox (PlainText (Compose (Just (Literal "Phil Freeman")))))) : Nil)) : Nil)))
Printed:
   (Right "name  = ______ (Phil Freeman)\n")
Parsed:
   (Right (SlamDown ((Paragraph ((FormField "name" false (TextBox (PlainText (Compose (Just (Literal "Phil Freeman")))))) : Nil)) : Nil)))
/Users/py/projects/slamdata/purescript-markdown/output/Data.Eq/index.js:13
var Eq1 = function (eq1) {
                   ^

RangeError: Maximum call stack size exceeded
    at new Eq1 (/Users/py/projects/slamdata/purescript-markdown/output/Data.Eq/index.js:13:20)
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:90:16
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:84:66
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:91:59
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:84:77
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:91:59
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:84:77
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:91:59
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:84:77
    at /Users/py/projects/slamdata/purescript-markdown/output/Data.Functor.Compose/index.js:91:59
* ERROR: Subcommand terminated with exit code 1
cryogenian commented 6 years ago

The fact travis is unhappy is very interesting, I'm not absolutely sure, but this might be somehow connected with Eq1 deriving. Perhaps @garyb could say something about it :)

garyb commented 6 years ago

I'll take a look!

garyb commented 6 years ago

Ok, after much head scratching, it's a problem with Eq for Compose: https://github.com/purescript/purescript-functors/pull/16

I'll push some other changes into this branch though, as a lot of the Eq / Ord constraints in here are avoidable.

paulyoung commented 6 years ago

I think this should be good now. Thanks @garyb!