Gabriella439 / Gabriella439/Haskell-Pipes-Safe-Library
Simple execution error on Win32
- Dominant language
- Haskell
- Stars
- 27
- Forks
- 22
- Avg merge
- 12d 10h
- Merged PRs (30d)
- 1
Description
### 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?](https://gist.github.com/m15k/7190b78d63e88b0bc01d)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue in GHCI with scanFileSystem on a single Windows directory, then inspect the linked gist and compare that path with the working single-file check. Done means the filesystem scan performs work and completes without hanging or crashing on Windows while retaining the existing Linux behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100