Skip to content

Print five exhaustivity checking warnings for each definition#1282

Merged
paf31 merged 1 commit intopurescript:masterfrom
nicodelpiano:master
Jul 18, 2015
Merged

Print five exhaustivity checking warnings for each definition#1282
paf31 merged 1 commit intopurescript:masterfrom
nicodelpiano:master

Conversation

@nicodelpiano
Copy link
Copy Markdown
Contributor

This is because the compiler hangs printing the whole set of warnings, as mentioned in #1281

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Jul 17, 2015

Maybe we could indicate if there are more than 5 with an ellipsis (...)?

@nicodelpiano
Copy link
Copy Markdown
Contributor Author

@paf31 Yes, that'd be great

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Jul 17, 2015

You'll have to be careful not to evaluate the whole list though. Using length will do so, I think, so you'd need a function take5 :: [a] -> ([a], Bool) which matched the first 5 head elements explicitly (lazily).

@garyb
Copy link
Copy Markdown
Member

garyb commented Jul 17, 2015

Or maybe drop 5 and check if the remainder is null?

@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Jul 17, 2015

Yeah, that works. Might want to do it in one pass though. I think there is a function called break or something like that.

@garyb
Copy link
Copy Markdown
Member

garyb commented Jul 17, 2015

Ah yep, splitAt 5 then perhaps? span and break need a predicate.

paf31 added a commit that referenced this pull request Jul 18, 2015
Print five exhaustivity checking warnings for each definition
@paf31 paf31 merged commit ef61dad into purescript:master Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants