Sitelet https://github.com/slamdata/purescript-sql-squared/pull/37
Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Missed some bits of MonadGen conversion - #37

Merged
garyb merged 1 commit into
slamdata:masterfrom
garyb:monadgen-2
Oct 31, 2017
Merged

garyb merged 1 commit into
slamdata:masterfrom
garyb:monadgen-2

Conversation

@garyb

@garyb garyb commented Oct 31, 2017

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/SqlSquared.purs
arbitrarySqlModuleOfSize = traverse arbitrarySqlOfSize <=< Sig.arbitrarySqlModuleF
genSqlModule ∷ ∀ m. Gen.MonadGen m ⇒ MonadRec m ⇒ m SqlModule
genSqlModule =
Gen.sized $ traverse (flip Gen.resize genSql <<< const) <=< Sig.genSqlModuleF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will (_ `Gen.resize` genSql <<< const) work here? (I find _ easier to read than flip)

@garyb garyb Oct 31, 2017 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You'd need some more parens ((_ `Gen.resize` genSql) <<< const) which probably tips it into being worse than using flip again, I think. It's syntactically valid without the parens, but means _ `Gen.Resize` (genSql <<< const) if you don't include them, so it fails to typecheck instead... a little weird!

@garyb
garyb merged commit 976e79e into slamdata:master Oct 31, 2017
@garyb
garyb deleted the monadgen-2 branch October 31, 2017 11:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants