From 2879706a0e0ad7447d0bb517d6f9b3478a0b63e6 Mon Sep 17 00:00:00 2001 From: Auke Booij Date: Wed, 14 Oct 2015 10:14:20 +0100 Subject: [PATCH] Converted the project into a cabal project. Using the cabal project files, one can easily build this project in sandboxes. It is also more easy to package for distribution. Also includes a minor LICENSE file reformatting and encoding fix. Original Makefile is still in place. --- .gitignore | 4 +++- LICENSE | 37 +++++++++++++++++-------------------- Setup.hs | 16 ++++++++++++++++ cubicaltt.cabal | 25 +++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 21 deletions(-) create mode 100644 Setup.hs create mode 100644 cubicaltt.cabal diff --git a/.gitignore b/.gitignore index 44a8467..71033db 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ *.o dist/ Exp/ -cubical \ No newline at end of file +cubical +.cabal-sandbox +cabal.sandbox.config diff --git a/LICENSE b/LICENSE index 6016c5d..da70e40 100644 --- a/LICENSE +++ b/LICENSE @@ -1,23 +1,20 @@ -The MIT License (MIT) +Copyright (c) 2015 Cyril Cohen, Thierry Coquand, Simon Huber, Anders Mörtberg -Copyright (c) 2015 Cyril Cohen, Thierry Coquand, Simon Huber, Anders -Mörtberg +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: -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. +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. diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..883ae7a --- /dev/null +++ b/Setup.hs @@ -0,0 +1,16 @@ +import Distribution.Simple +import Distribution.Simple.Program +import System.Process (system) + +main :: IO () +main = defaultMainWithHooks $ simpleUserHooks { + hookedPrograms = [bnfc], + preBuild = \args buildFlags -> do + _ <- system "bnfc --haskell -d Exp.cf" + preBuild simpleUserHooks args buildFlags +} + +bnfc :: Program +bnfc = (simpleProgram "bnfc") { + programFindVersion = findProgramVersion "--version" id + } diff --git a/cubicaltt.cabal b/cubicaltt.cabal new file mode 100644 index 0000000..cdb0512 --- /dev/null +++ b/cubicaltt.cabal @@ -0,0 +1,25 @@ +-- Initial cubicaltt.cabal generated by cabal init. For further +-- documentation, see http://haskell.org/cabal/users-guide/ + +name: cubicaltt +version: 1.0 +synopsis: Experimental implementation of a cubical type theory +description: Experimental implementation of a cubical type theory in which the user can directly manipulate n-dimensional cubes. +license: MIT +license-file: LICENSE +author: Cyril Cohen, Thierry Coquand, Simon Huber, Anders Mörtberg +maintainer: mortberg@chalmers.se +-- copyright: +category: Language +build-type: Custom +extra-source-files: README.md +cabal-version: >=1.10 + +executable cubicaltt + main-is: Main.hs + other-modules: Exp.Lex, Exp.Par + other-extensions: TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving, TupleSections, CPP, MagicHash + build-depends: base >=4.8 && <4.9, containers >=0.5 && <0.6, pretty >=1.1 && <1.2, QuickCheck >=2.8 && <2.9, mtl >=2.2 && <2.3, time >=1.5 && <1.6, directory >=1.2 && <1.3, filepath >=1.4 && <1.5, haskeline >=0.7 && <0.8, array >=0.5 && <0.6 + -- hs-source-dirs: + build-tools: alex, happy, bnfc + default-language: Haskell98 -- 2.34.1