Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Extend FormatSpec with a data types #1605

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

EncodePanda
Copy link
Contributor

Show how different formatters are formatting code with a data type definition

Show how different formatters are formatting code with a data type definition
@EncodePanda EncodePanda requested a review from lukel97 January 26, 2020 12:23
Copy link
Collaborator

@lukel97 lukel97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! From what I can see these changes look good but the test is failing on ghc 8.4.x

Expected "module    Format where\nfoo   :: Int ->  Int\nfoo  3 = 2\nfoo    x  = x\nbar   :: String ->   IO String\nbar s =  do\n      x <- return \"hello\"\n      return \"asdf\"\n      \ndata Baz = Baz { a :: Int, b :: String }\n\n" but got "module    Format where\nfoo   :: Int ->  Int\nfoo  3 = 2\nfoo    x  = x\nbar   :: String ->   IO String\nbar s =  do\n      x <- return \"hello\"\n      return \"asdf\"\n\ndata Baz = Baz { a :: Int, b :: String }\n\n"

image

Looks like a tab is being added in a specific version? Can you check that 8.4.x is using the same version of Ormolu as 8.6.x?

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be enough to make the tests compile.

@alanz
Copy link
Collaborator

alanz commented Mar 12, 2020

Are the spaces in the input data files originally deliberate?

@fendor
Copy link
Collaborator

fendor commented Mar 13, 2020

@alanz I dont think so. However, I would like to merge this PR now, if everyone's fine with that.

@alanz
Copy link
Collaborator

alanz commented Mar 13, 2020

I am happy to merge.

@fendor fendor merged commit d2b3237 into haskell:master Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants