Skip to content
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

Simple execution error on Win32 #17

Open
m15k opened this issue Dec 9, 2014 · 4 comments
Open

Simple execution error on Win32 #17

m15k opened this issue Dec 9, 2014 · 4 comments

Comments

@m15k
Copy link

m15k commented Dec 9, 2014

The intent of program

The intent of the program is to crawl a top level directory and look at each file, using libmagic determine if that file is a data file. If so then collect some metrics like create a histogram of the bytes of the file and run a variance against that result.

The issue

On Windows the program just hangs or crashes. Using sysinternals nothing appears to be wrong as far as commands issued through Windows. It should be said that this works flawlessly on Linux.

So I fire up cabal and check the function that does the work against a single file, works as intended.

However, if i do something like this in GHCI

ghci> let a = scanFileSystem "C:\Users\Montez\Documents\Code"
ghci> :t a
a :: Pipes.ListT (Pipes.Safe.SafeT IO) Info
ghci> import Pipes
ghci> import Pipes.Safe
ghci> runSafeT $ runListT a >> mzero

:27:26:
No instance for (MonadPlus (SafeT IO))
arising from a use of mzero' In the second argument of(>>)', namely mzero' In the second argument of($)', namely `runListT a >> mzero'
In the expression: runSafeT $ runListT a >> mzero
ghci> runSafeT $ runListT a

(This hangs and never does any work, similarly to how the application operates)

Library versions

pipes-4.1.4
pipes-safe-2.2.0
dirstream-1.0.0

Maybe relevant code gist?

@Gabriella439
Copy link
Owner

Thanks for opening the issue! It may take me a couple of weeks, but I will try to complete this as soon as possible.

@m15k
Copy link
Author

m15k commented Dec 10, 2014

No worries. Wish I had enough knowledge to squash it myself.
On Dec 9, 2014 6:49 PM, "Gabriel Gonzalez" notifications@github.com wrote:

Thanks for opening the issue! It may take me a couple of weeks, but I will
try to complete this as soon as possible.


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

@Gabriella439
Copy link
Owner

I haven't had a chance to look at this yet, but I wanted to point you to my newly released turtle library, which provides a similar functionality (streaming over directory trees): https://hackage.haskell.org/package/turtle-1.0.1/docs/Turtle-Tutorial.html

I'm mentioning this for two reasons:

  • turtle has a simpler implementation and API and may work for you instead of dirstream.
  • I would like you to test your program against turtle if you could. The reason why is that I want to see if it's an issue specific to pipes-safe or not

@m15k
Copy link
Author

m15k commented Feb 4, 2015

Awesome, will wire it up tomorrow.
On Feb 3, 2015 5:04 PM, "Gabriel Gonzalez" notifications@github.com wrote:

I haven't had a chance to look at this yet, but I wanted to point you to
my newly released turtle library, which provides a similar functionality
(streaming over directory trees):
https://hackage.haskell.org/package/turtle-1.0.1/docs/Turtle-Tutorial.html

I'm mentioning this for two reasons:

turtle has a simpler implementation and API and may work for you
instead of dirstream.

I would like you to test your program against turtle if you could. The
reason why is that I want to see if it's an issue specific to
pipes-safe or not


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

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

No branches or pull requests

2 participants