Foster (empty) → 1.0.2
raw patch · 5 files changed
+88/−0 lines, 5 filesdep +arraydep +basedep +cmdthelinesetup-changed
Dependencies added: array, base, cmdtheline, containers, criterion, random, strict
Files
- Foster.cabal +41/−0
- LICENSE +20/−0
- Setup.hs +2/−0
- benchmarks/Bench.hs +19/−0
- src/Main.hs +6/−0
+ Foster.cabal view
@@ -0,0 +1,41 @@+name: Foster+version: 1.0.2+synopsis: Utilities to generate and solve puzzles+description: Utilities to generate and solve puzzles+license: MIT+license-file: LICENSE+author: Jefffrey+maintainer: notjefff@gmail.com+category: Data+build-type: Simple+cabal-version: >=1.10++source-repository head+ type: git+ location: https://github.com/Jefffrey/Foster.git++executable foster + main-is: Main.hs+ build-depends: base >=4.7 && <4.8, + random >=1.0 && <1.1,+ containers >= 0.5 && < 0.6,+ array >= 0.5 && < 0.6,+ cmdtheline >= 0.2 && < 0.3,+ strict >= 0.3 && < 0.4+ hs-source-dirs: src+ default-language: Haskell2010+ ghc-options: -Wall -fno-warn-orphans -threaded +RTS -N -RTS++Benchmark foster-benchmark+ type: exitcode-stdio-1.0+ main-is: Bench.hs+ build-depends: base >=4.7 && <4.8, + random >=1.0 && <1.1,+ containers >= 0.5 && < 0.6,+ array >= 0.5 && < 0.6,+ cmdtheline >= 0.2 && < 0.3,+ strict >= 0.3 && < 0.4,+ criterion+ hs-source-dirs: src, benchmarks+ default-language: Haskell2010+ ghc-options: -Wall -fno-warn-orphans -threaded +RTS -N -RTS
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2015 Jefffrey++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ benchmarks/Bench.hs view
@@ -0,0 +1,19 @@+module Main where++import Criterion.Main+import Foster.Interpreter+import System.Environment (withArgs)++main :: IO ()+main = defaultMain + [ bgroup "foster generate" + [ bench "1,1" $ whnfIO $ withArgs ["generate", "1,1", "-s"] interpret + , bench "10,10" $ whnfIO $ withArgs ["generate", "10,10", "-s"] interpret+ , bench "100,100" $ whnfIO $ withArgs ["generate", "100,100", "-s"] interpret+ , bench "200,200" $ whnfIO $ withArgs ["generate", "200,200", "-s"] interpret+ , bench "300,300" $ whnfIO $ withArgs ["generate", "300,300", "-s"] interpret+ , bench "1000,1000" $ whnfIO $ withArgs ["generate", "1000,1000", "-s"] interpret+ , bench "2000,2000" $ whnfIO $ withArgs ["generate", "2000,2000", "-s"] interpret+ , bench "3000,3000" $ whnfIO $ withArgs ["generate", "3000,3000", "-s"] interpret+ ]+ ]
+ src/Main.hs view
@@ -0,0 +1,6 @@+module Main where++import Foster.Interpreter++main :: IO ()+main = interpret