Skip to content

Commit

Permalink
changed build system to cabal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelong Cong committed Nov 19, 2014
1 parent c3edd63 commit 07a7aa4
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 24 deletions.
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
dist
cabal-dev
main
Main
Tests
main
enigma
tests
enigma-hs
enigma-tests

*.o
*.hi
*.chi
*.chs.h
.virthualenv
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
cabal.config
tags


20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2014 kc1212

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.
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

13 changes: 3 additions & 10 deletions README
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Enigma machine emulator written in Haskell to practice and for fun.

To run the program:
make
echo "IDPHRIUSHJ" | ./Main
To build and run:
cabal build
echo "IDPHRIUSHJ" | ./dist/build/enigma-hs/enigma-hs

feel free to change the settings in Main.hs

Expand All @@ -20,10 +20,3 @@ Enigma Process
11. Pass through plugboard


TODO:
take integer key as input
better validation functions
automated testing
random key generation


2 changes: 2 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
25 changes: 25 additions & 0 deletions enigma-hs.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Initial enigma-hs.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/

name: enigma-hs
version: 0.1.0.0
-- synopsis:
-- description:
license: MIT
license-file: LICENSE
author: kc1212
maintainer: [email protected]
-- copyright:
-- category:
build-type: Simple
extra-source-files: README
cabal-version: >=1.10

executable enigma-hs
ghc-options: -Wall
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends: base >=4.6
hs-source-dirs: src
default-language: Haskell2010
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 07a7aa4

Please sign in to comment.