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

Add Finite and change run.sh to use 'tail -r' #4

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions haskell/BufwiseFiniteBS/BufwiseFiniteBS.hs
Expand Up @@ -12,14 +12,14 @@ import System.IO (stdin)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as C


-- counton
import qualified Finite as H


main :: IO ()
main = do
t <- H.new 128000
let incr = H.count t
t <- H.new 48017 100003
let incr = H.countOn H.ascii t
flip fix B.empty $ \rec b -> do
bs <- B.hGet stdin (64 * 1024)
if B.null bs
Expand Down
15 changes: 14 additions & 1 deletion haskell/countwordsHS.cabal
Expand Up @@ -24,7 +24,6 @@ source-repository head
library
exposed-modules:
Data.FastChar
Finite
other-modules:
Paths_countwordsHS
hs-source-dirs:
Expand All @@ -34,6 +33,7 @@ library
, bytestring
, clutter
, containers
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -59,6 +59,7 @@ executable BufwiseClutter
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -84,6 +85,7 @@ executable BufwiseFiniteBS
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -108,6 +110,7 @@ executable BufwiseVHBS
, bytestring
, clutter
, containers
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -133,6 +136,7 @@ executable LazyHMBS
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -158,6 +162,7 @@ executable LazyHMRef
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -183,6 +188,7 @@ executable LazyMap
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -208,6 +214,7 @@ executable LazyVH
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -233,6 +240,7 @@ executable LinewiseClutter
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -258,6 +266,7 @@ executable LinewiseVH
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -282,6 +291,7 @@ executable StreamingHMBS
, bytestring
, clutter
, containers
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -307,6 +317,7 @@ executable StreamlyHMRef
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -332,6 +343,7 @@ executable StreamlyThreadedHMRef
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand All @@ -357,6 +369,7 @@ executable StreamlyVH
, clutter
, containers
, countwordsHS
, finite
, fusion-plugin
, hashable
, primitive
Expand Down
1 change: 1 addition & 0 deletions haskell/package.yaml
Expand Up @@ -32,6 +32,7 @@ dependencies:
- streaming
- streaming-bytestring
- clutter
- finite
- hashable

library:
Expand Down
2 changes: 1 addition & 1 deletion haskell/run.sh
Expand Up @@ -4,7 +4,7 @@ stack build || exit 1

normalize () {
# tac on a sponge at the end to avoid BrokenPipeError from diff's short-circuiting
grep -v '^ ' | python3 ../normalize.py | tac | tac
grep -v '^ ' | python3 ../normalize.py | tail -r | tail -r
}

stack --bash-completion-index 2 --bash-completion-word stack --bash-completion-word build --bash-completion-word countwordsHS:exe: \
Expand Down
189 changes: 0 additions & 189 deletions haskell/src/Finite.hs

This file was deleted.

4 changes: 2 additions & 2 deletions haskell/stack.yaml
@@ -1,5 +1,3 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/
Expand Down Expand Up @@ -47,6 +45,8 @@ extra-deps:
- vector-hashtables-0.1.1.1@sha256:cb4ba4af6b83b6956278bbfe8d0f779a40928728e82977e566c0103fe8d6c867,2725
- git: https://github.com/noughtmare/clutter.git
commit: a8364c0adf377501a2b012336db57edae380c49f
- git: https://github.com/kalhauge/finite.git
commit: 15e33d411fd7ae9ba12a9971fe2ab5528a1d2036
- compact-0.2.0.0@sha256:75ef98cb51201b4a0d6de95cbbb62be6237c092a3d594737346c70c5d56c2380,2413
- git: https://github.com/haskell/text.git
commit: 8ae2888a340911e088ad9507f22464dc383c944b
Expand Down