New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use cabal to build executable #3

Merged
merged 1 commit into from Dec 20, 2014

Conversation

Projects
None yet
3 participants
@etrepum
Contributor

etrepum commented Dec 19, 2014

This uses cabal to build, cleans up some -Wall warnings, and adds a few obvious performance fixes (although using ByteString everywhere may be a better solution). There are some lingering correctness issues such that it's possible to type in a word that's not close enough to one that's already in the map and you'll get an exception (choices and chooseBest need to be refactored appropriately).

Show outdated Hide outdated cabal.sandbox.config
ws `M.intersection` M.fromList (map (\x -> (x, ())) (S.toList ch))
where
chooseBest' bestChs = head (map fst (sortCandidates bestChs))
sortCandidates = sortBy (comparing snd) . M.toList

This comment has been minimized.

@MarcoSero

MarcoSero Dec 20, 2014

Owner

@fffej said he probably introduced a bug here 3eacf71#commitcomment-9052210
I can't try the code right now (no internet access from my laptop). @etrepum have you seen the issue as well?

@MarcoSero

MarcoSero Dec 20, 2014

Owner

@fffej said he probably introduced a bug here 3eacf71#commitcomment-9052210
I can't try the code right now (no internet access from my laptop). @etrepum have you seen the issue as well?

This comment has been minimized.

@etrepum

etrepum Dec 20, 2014

Contributor

Yes. If the word isn't close to one in the dictionary it tries to get the head of an empty list.

@etrepum

etrepum Dec 20, 2014

Contributor

Yes. If the word isn't close to one in the dictionary it tries to get the head of an empty list.

@MarcoSero

This comment has been minimized.

Show comment
Hide comment
@MarcoSero

MarcoSero Dec 20, 2014

Owner

Can I just ask you to keep the same spelling.hs for adding all your changes? I like being able to use git history

Owner

MarcoSero commented Dec 20, 2014

Can I just ask you to keep the same spelling.hs for adding all your changes? I like being able to use git history

@etrepum

This comment has been minimized.

Show comment
Hide comment
@etrepum

etrepum Dec 20, 2014

Contributor

No, modules need to have an uppercase name.

Contributor

etrepum commented Dec 20, 2014

No, modules need to have an uppercase name.

@MarcoSero

This comment has been minimized.

Show comment
Hide comment
@MarcoSero

MarcoSero Dec 20, 2014

Owner

What I mean is could you just git rename the file instead of deleting it and creating a new one?

git mv spelling.hs Spelling.hs
Owner

MarcoSero commented Dec 20, 2014

What I mean is could you just git rename the file instead of deleting it and creating a new one?

git mv spelling.hs Spelling.hs
@etrepum

This comment has been minimized.

Show comment
Hide comment
@etrepum

etrepum Dec 20, 2014

Contributor

That's what I did.

On Saturday, December 20, 2014, Marco Sero notifications@github.com wrote:

What I mean is could you just git rename the file instead of deleting it
and creating a new one?

git mv spelling.hs Spelling.hs


Reply to this email directly or view it on GitHub
#3 (comment)
.

Contributor

etrepum commented Dec 20, 2014

That's what I did.

On Saturday, December 20, 2014, Marco Sero notifications@github.com wrote:

What I mean is could you just git rename the file instead of deleting it
and creating a new one?

git mv spelling.hs Spelling.hs


Reply to this email directly or view it on GitHub
#3 (comment)
.

@MarcoSero

This comment has been minimized.

Show comment
Hide comment
@MarcoSero

MarcoSero Dec 20, 2014

Owner

Mhm weird that GitHub shows the whole file changed then. Cool no big deal!

Owner

MarcoSero commented Dec 20, 2014

Mhm weird that GitHub shows the whole file changed then. Cool no big deal!

MarcoSero added a commit that referenced this pull request Dec 20, 2014

Merge pull request #3 from etrepum/cabalize
use cabal to build executable

@MarcoSero MarcoSero merged commit 550adae into MarcoSero:master Dec 20, 2014

@etrepum

This comment has been minimized.

Show comment
Hide comment
@etrepum

etrepum Dec 20, 2014

Contributor

Git doesn't track renames, it uses heuristics to detect copy and move.

Contributor

etrepum commented Dec 20, 2014

Git doesn't track renames, it uses heuristics to detect copy and move.

@MarcoSero

This comment has been minimized.

Show comment
Hide comment
@MarcoSero

MarcoSero Dec 20, 2014

Owner

That's not true. What about this master...rename-test

Owner

MarcoSero commented Dec 20, 2014

That's not true. What about this master...rename-test

@etrepum

This comment has been minimized.

Show comment
Hide comment
@MarcoSero

This comment has been minimized.

Show comment
Hide comment
@MarcoSero

MarcoSero Dec 20, 2014

Owner

My point is that you can still preserve the history of a file even if you rename it (like I did in that commit).

See also http://stackoverflow.com/questions/2641146/handling-file-renames-in-git

Owner

MarcoSero commented Dec 20, 2014

My point is that you can still preserve the history of a file even if you rename it (like I did in that commit).

See also http://stackoverflow.com/questions/2641146/handling-file-renames-in-git

@etrepum

This comment has been minimized.

Show comment
Hide comment
@etrepum

etrepum Dec 21, 2014

Contributor

If you do a separate commit for just the rename, it may track properly. If you want to revise the history to make that happen, go ahead.

Contributor

etrepum commented Dec 21, 2014

If you do a separate commit for just the rename, it may track properly. If you want to revise the history to make that happen, go ahead.

@joom

This comment has been minimized.

Show comment
Hide comment
@joom

joom Dec 21, 2014

Contributor

You can rename/move and change the file in the same commit, you don't need separate commits for that. Here's an example.

Contributor

joom commented Dec 21, 2014

You can rename/move and change the file in the same commit, you don't need separate commits for that. Here's an example.

@etrepum

This comment has been minimized.

Show comment
Hide comment
@etrepum

etrepum Dec 21, 2014

Contributor

If you change and rename a file in the same commit, Git may not track it as a rename. Depends on the size of the change. have you read the rest of the comments here?

Contributor

etrepum commented Dec 21, 2014

If you change and rename a file in the same commit, Git may not track it as a rename. Depends on the size of the change. have you read the rest of the comments here?

@joom

This comment has been minimized.

Show comment
Hide comment
@joom

joom Dec 21, 2014

Contributor

Oops, you're right. Apparently, it only tracks the change and the rename at the same time if the change is small.

Contributor

joom commented Dec 21, 2014

Oops, you're right. Apparently, it only tracks the change and the rename at the same time if the change is small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment