Skip to content
Browse files

Ceremony

  • Loading branch information...
1 parent 5b48188 commit f7c582666c508acdeb76855099ac476a9317a72b @bos committed Oct 1, 2010
Showing with 91 additions and 0 deletions.
  1. +5 −0 .hgignore
  2. +26 −0 LICENSE
  3. +3 −0 Setup.lhs
  4. +20 −0 tests/benchmarks/Benchmark.hs
  5. +37 −0 vectro.cabal
View
5 .hgignore
@@ -0,0 +1,5 @@
+^dist$
+\.(?:aux|eventlog|h[ip]|log|[oa]|orig|prof|ps|swp)$
+~$
+syntax: glob
+.\#*
View
26 LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2010, Bryan O'Sullivan
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
3 Setup.lhs
@@ -0,0 +1,3 @@
+#!/usr/bin/env runhaskell
+> import Distribution.Simple
+> main = defaultMain
View
20 tests/benchmarks/Benchmark.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+import Criterion.Main
+import Data.Vectro as TV
+import Data.Vector as V
+
+main = do
+ let l = [1..(1000::Int)]
+ let v = V.fromList l
+ let tv = TV.fromVector v
+ defaultMain [
+ bgroup "build" [
+ bench "tv" $ nf TV.fromList l
+ , bench "v" $ whnf V.fromList l
+ , bench "tvv" $ nf TV.fromVector v
+ ],
+ bgroup "update" [
+ bench "v" $ whnf (V.foldl' (\v i -> v V.// [(i-1,0)]) v) v
+ , bench "tv" $ nf (V.foldl' (\t i -> TV.update t (i-1) 0) tv) v
+ ]
+ ]
View
37 vectro.cabal
@@ -0,0 +1,37 @@
+name: vectro
+version: 0.0.0.1
+synopsis: Vector
+description: Vector
+license: BSD3
+license-file: LICENSE
+homepage: http://bitbucket.org/bos/vector
+author: Bryan O'Sullivan <bos@serpentine.com>
+maintainer: Bryan O'Sullivan <bos@serpentine.com>
+copyright: 2010 Bryan O'Sullivan
+category: Data, Data Structures
+build-type: Simple
+cabal-version: >= 1.6
+extra-source-files:
+ benchmarks/Benchmark.hs
+
+library
+ exposed-modules:
+ Data.Vectro
+ build-depends:
+ base < 5,
+ deepseq == 1.1.*,
+ vector >= 0.5
+ if impl(ghc >= 6.10)
+ build-depends:
+ base >= 4
+
+ -- gather extensive profiling data for now
+ ghc-prof-options: -auto-all
+
+ ghc-options: -Wall -funbox-strict-fields
+ if impl(ghc >= 6.8)
+ ghc-options: -fwarn-tabs
+
+source-repository head
+ type: mercurial
+ location: http://bitbucket.org/bos/vectro

0 comments on commit f7c5826

Please sign in to comment.
Something went wrong with that request. Please try again.