yesodweb / css-text

CSS parser and renderer.
MIT License
16 stars 8 forks source link

Fix the build on GHC 8.4 #13

Closed RyanGlScott closed 6 years ago

RyanGlScott commented 6 years ago

The (<>) function defined locally in Text.CSS.Render clashes with (Data.Semigroup.<>), which is exported by the Prelude in base-4.11 (GHC 8.4). A simple solution is to simply use (Data.Semigroup.<>) instead, since its use is entirely internal to this module.

RyanGlScott commented 6 years ago

I'm not sure why the Travis builds are failing, but I'm relatively confident it isn't due to these changes, as it builds for me locally.

MaxGabriel commented 6 years ago

Unable to parse cabal file /home/travis/build/yesodweb/css-text/css-text.cabal: FromString "'then' branch of 'if' is empty" (Just 20)

I saw some build errors that look like this, so I think the conditional semigroup change is related.

RyanGlScott commented 6 years ago

Ah, good catch. I'm using some questionable indentation there, which I'll fix in a moment.

MaxGabriel commented 6 years ago

Not sure if/how your changes caused these, but looks like there are some other failures:

Failures:
  runtests.hs:66: 
  1) parse/render three levels of nesting
       expected: Right [NestedBlock "a" [NestedBlock "b" [LeafBlock ("c",[])]]]
        but got: Right []
  runtests.hs:69: 
  2) parse/render idempotent nested blocks
       Falsifiable (after 9 tests and 3 shrinks): 
       expected: Right [NestedBlock "print" [LeafBlock ("T",[("utP","S2Gruc"),("ZoZ8qm","H39UZoK"),("Sq","ItjI"),("VWya","LUj9AWw")])],LeafBlock ("U",[("9apIt8-N","8HUmtrL"),("rO","tYh"),("JviTWP7","aLWxblf"),("XSNA","YuQKvE")])]
        but got: Right []
       [NestedBlock "print" [LeafBlock ("T",[("utP","S2Gruc"),("ZoZ8qm","H39UZoK"),("Sq","ItjI"),("VWya","LUj9AWw")])],LeafBlock ("U",[("9apIt8-N","8HUmtrL"),("rO","tYh"),("JviTWP7","aLWxblf"),("XSNA","YuQKvE")])]
RyanGlScott commented 6 years ago

I'm 90% sure that's not my fault, as master has a similar error on its Travis builds.

MaxGabriel commented 6 years ago

Ah ok, I think from the commit history @snoyberg intentionally added a failing test case to demonstrate a bug. If that’s the case, @snoyberg can you merge and release this?

snoyberg commented 6 years ago

You're right, I added the failing test case. I'll take care of merge and release, thanks gents.