-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
now using stack install of raw cabal
- Loading branch information
Showing
12 changed files
with
253 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
__pycache__ | ||
__pytest__ | ||
corrections | ||
.pytest_cache | ||
MANIFEST | ||
.stack-work/ | ||
*~ | ||
.vscode | ||
verif | ||
dist | ||
cabal.sandbox.config | ||
.cabal-sandbox | ||
a-machine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelog for a-machine | ||
|
||
## Unreleased changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
# a-machine | ||
|
||
## Requirements | ||
|
||
### Windows | ||
Download and install [Stack](https://get.haskellstack.org/stable/windows-x86_64-installer.exe). | ||
|
||
### Unix systems (including MacOs) | ||
```bash | ||
curl -sSL https://get.haskellstack.org/ | sh | ||
``` | ||
or | ||
```bash | ||
wget -qO- https://get.haskellstack.org/ | sh | ||
``` | ||
|
||
### MacOs X Homebrew | ||
```bash | ||
brew install haskell-stack | ||
``` | ||
|
||
## Build | ||
|
||
```bash | ||
stack build | ||
``` | ||
|
||
## Run | ||
|
||
```bash | ||
stack exec a-machine-exe desc.json tape | ||
``` | ||
where: | ||
- `desc.json` is a json encoded file containing a valid machine description | ||
- `tape` is a string of instructions from the machine alphabet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,70 @@ | ||
-- Initial a-machine.cabal generated by cabal init. For further | ||
-- documentation, see http://haskell.org/cabal/users-guide/ | ||
|
||
-- The name of the package. | ||
name: a-machine | ||
|
||
-- The package version. See the Haskell package versioning policy (PVP) | ||
-- for standards guiding when and how versions should be incremented. | ||
-- https://wiki.haskell.org/Package_versioning_policy | ||
-- PVP summary: +-+------- breaking API changes | ||
-- | | +----- non-breaking API additions | ||
-- | | | +--- code changes with no API change | ||
version: 0.1.0.0 | ||
|
||
-- A short (one-line) description of the package. | ||
synopsis: A turing machine | ||
|
||
-- A longer description of the package. | ||
-- description: | ||
|
||
-- URL for the project homepage or repository. | ||
homepage: None | ||
|
||
-- The license under which the package is released. | ||
license: BSD3 | ||
|
||
-- The file containing the license text. | ||
license-file: LICENSE | ||
|
||
-- The package author(s). | ||
author: Kevin Azoulay and Guillaume De Rouville | ||
|
||
-- An email address to which users can send suggestions, bug reports, and | ||
-- patches. | ||
maintainer: None | ||
|
||
-- A copyright notice. | ||
-- copyright: | ||
|
||
category: Math | ||
|
||
build-type: Simple | ||
|
||
-- Extra files to be distributed with the package, such as examples or a | ||
-- README. | ||
extra-source-files: CHANGELOG.md | ||
|
||
-- Constraint on the version of Cabal needed to build this package. | ||
cabal-version: >=1.10 | ||
|
||
|
||
executable a-machine | ||
-- .hs or .lhs file containing the Main module. | ||
main-is: Main.hs | ||
|
||
-- Modules included in this executable, other than Main. | ||
other-modules: Parser, Machine | ||
|
||
-- LANGUAGE extensions used by modules in this package. | ||
-- other-extensions: | ||
|
||
-- Other library packages from which modules are imported. | ||
cabal-version: 1.12 | ||
|
||
-- This file has been generated from package.yaml by hpack version 0.33.0. | ||
-- | ||
-- see: https://github.com/sol/hpack | ||
-- | ||
-- hash: 081d7680aa6edd0db132d6a447fed5e294f3a395863556fb44c2738aa0599292 | ||
|
||
name: a-machine | ||
version: 0.1.0.0 | ||
description: Please see the README on GitHub at <https://github.com/githubuser/a-machine#readme> | ||
homepage: https://github.com/githubuser/a-machine#readme | ||
bug-reports: https://github.com/githubuser/a-machine/issues | ||
author: Author name here | ||
maintainer: [email protected] | ||
copyright: 2021 Author name here | ||
license: BSD3 | ||
license-file: LICENSE | ||
build-type: Simple | ||
extra-source-files: | ||
README.md | ||
ChangeLog.md | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/githubuser/a-machine | ||
|
||
library | ||
exposed-modules: | ||
Machine | ||
Parser | ||
Runner | ||
other-modules: | ||
Paths_a_machine | ||
hs-source-dirs: | ||
src | ||
build-depends: | ||
aeson | ||
, base >=4.7 && <5 | ||
, bytestring | ||
default-language: Haskell2010 | ||
|
||
executable a-machine-exe | ||
main-is: Main.hs | ||
other-modules: | ||
Paths_a_machine | ||
hs-source-dirs: | ||
app | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N | ||
build-depends: | ||
base >=4.12 && <4.13 | ||
a-machine | ||
, aeson | ||
, base >=4.7 && <5 | ||
, bytestring | ||
|
||
-- Directories containing source files. | ||
hs-source-dirs: src | ||
|
||
-- Base language which the package is written in. | ||
default-language: Haskell2010 | ||
|
||
default-language: Haskell2010 | ||
|
||
test-suite a-machine-test | ||
type: exitcode-stdio-1.0 | ||
main-is: Spec.hs | ||
other-modules: | ||
Paths_a_machine | ||
hs-source-dirs: | ||
test | ||
ghc-options: -threaded -rtsopts -with-rtsopts=-N | ||
build-depends: | ||
a-machine | ||
, aeson | ||
, base >=4.7 && <5 | ||
, bytestring | ||
default-language: Haskell2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: a-machine | ||
version: 0.1.0.0 | ||
github: "githubuser/a-machine" | ||
license: BSD3 | ||
author: "Author name here" | ||
maintainer: "[email protected]" | ||
copyright: "2021 Author name here" | ||
|
||
extra-source-files: | ||
- README.md | ||
- ChangeLog.md | ||
|
||
# Metadata used when publishing your package | ||
# synopsis: Short description of your package | ||
# category: Web | ||
|
||
# To avoid duplicated efforts in documentation and dealing with the | ||
# complications of embedding Haddock markup inside cabal files, it is | ||
# common to point users to the README.md file. | ||
description: Please see the README on GitHub at <https://github.com/githubuser/a-machine#readme> | ||
|
||
dependencies: | ||
- base >= 4.7 && < 5 | ||
- bytestring | ||
- aeson | ||
|
||
library: | ||
source-dirs: src | ||
|
||
executables: | ||
a-machine-exe: | ||
main: Main.hs | ||
source-dirs: app | ||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
- -with-rtsopts=-N | ||
dependencies: | ||
- a-machine | ||
|
||
tests: | ||
a-machine-test: | ||
main: Spec.hs | ||
source-dirs: test | ||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
- -with-rtsopts=-N | ||
dependencies: | ||
- a-machine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# 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/ | ||
|
||
# Resolver to choose a 'specific' stackage snapshot or a compiler version. | ||
# A snapshot resolver dictates the compiler version and the set of packages | ||
# to be used for project dependencies. For example: | ||
# | ||
# resolver: lts-3.5 | ||
# resolver: nightly-2015-09-21 | ||
# resolver: ghc-7.10.2 | ||
# | ||
# The location of a snapshot can be provided as a file or url. Stack assumes | ||
# a snapshot provided as a file might change, whereas a url resource does not. | ||
# | ||
# resolver: ./custom-snapshot.yaml | ||
# resolver: https://example.com/snapshots/2018-01-01.yaml | ||
resolver: | ||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml | ||
|
||
# User packages to be built. | ||
# Various formats can be used as shown in the example below. | ||
# | ||
# packages: | ||
# - some-directory | ||
# - https://example.com/foo/bar/baz-0.0.2.tar.gz | ||
# subdirs: | ||
# - auto-update | ||
# - wai | ||
packages: | ||
- . | ||
# Dependency packages to be pulled from upstream that are not in the resolver. | ||
# These entries can reference officially published versions as well as | ||
# forks / in-progress versions pinned to a git hash. For example: | ||
# | ||
# extra-deps: | ||
# - acme-missiles-0.3 | ||
# - git: https://github.com/commercialhaskell/stack.git | ||
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a | ||
# | ||
# extra-deps: [] | ||
|
||
# Override default flag values for local packages and extra-deps | ||
# flags: {} | ||
|
||
# Extra package databases containing global packages | ||
# extra-package-dbs: [] | ||
|
||
# Control whether we use the GHC we find on the path | ||
# system-ghc: true | ||
# | ||
# Require a specific version of stack, using version ranges | ||
# require-stack-version: -any # Default | ||
# require-stack-version: ">=2.5" | ||
# | ||
# Override the architecture used by stack, especially useful on Windows | ||
# arch: i386 | ||
# arch: x86_64 | ||
# | ||
# Extra directories used by stack for building | ||
# extra-include-dirs: [/path/to/dir] | ||
# extra-lib-dirs: [/path/to/dir] | ||
# | ||
# Allow a newer minor version of GHC than the snapshot specifies | ||
# compiler-check: newer-minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file was autogenerated by Stack. | ||
# You should not edit this file by hand. | ||
# For more information, please see the documentation at: | ||
# https://docs.haskellstack.org/en/stable/lock_files | ||
|
||
packages: [] | ||
snapshots: | ||
- completed: | ||
size: 534126 | ||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml | ||
sha256: 637fb77049b25560622a224845b7acfe81a09fdb6a96a3c75997a10b651667f6 | ||
original: | ||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
main :: IO () | ||
main = putStrLn "Test suite not yet implemented" |