setup build system properly
This commit is contained in:
parent
f0c44b9477
commit
6fc30272aa
17
Setup.hs
Normal file
17
Setup.hs
Normal file
|
@ -0,0 +1,17 @@
|
|||
import Distribution.Simple
|
||||
import System.Process
|
||||
import System.Environment
|
||||
import System.Directory
|
||||
|
||||
libdir :: String
|
||||
libdir = "src"
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
(a:_) <- getArgs
|
||||
if a == "build"
|
||||
then do
|
||||
callProcess "bnfc" ["-d", "--text-token", "--functor", "hm.cf"]
|
||||
renameDirectory "Hm" (libdir <> "/Hm")
|
||||
else pure ()
|
||||
defaultMain
|
16
hm.cabal
16
hm.cabal
|
@ -7,20 +7,34 @@ homepage: https://githug.xyz/depsterr/hm
|
|||
-- bug-reports:
|
||||
license: ISC
|
||||
license-file: LICENSE
|
||||
build-type: Custom
|
||||
author: depsterr
|
||||
maintainer: depsterr@protonmail.com
|
||||
-- copyright:
|
||||
category: Programming Language
|
||||
|
||||
custom-setup
|
||||
setup-depends: base >= 4
|
||||
, Cabal >= 2.4
|
||||
, process >= 1
|
||||
, directory >= 1
|
||||
|
||||
library
|
||||
ghc-options: -Werror=incomplete-patterns -Wall -fno-warn-name-shadowing
|
||||
, Simple.CC
|
||||
exposed-modules: Hm.Abs
|
||||
, Hm.Layout
|
||||
, Hm.Lex
|
||||
, Hm.Par
|
||||
, Hm.Print
|
||||
|
||||
other-modules: Hm.ErrM
|
||||
build-tool-depends: alex:alex >= 3.0, happy:happy >= 1.19.5
|
||||
build-depends: base >=4
|
||||
, array
|
||||
, containers
|
||||
, transformers
|
||||
, mtl
|
||||
, text
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
|
||||
|
|
|
@ -6,11 +6,8 @@ A simple, terminating, pure, hindley milner lambda calculus with inductively def
|
|||
|
||||
Depends:
|
||||
* BNFC
|
||||
* GNU make
|
||||
* GHC
|
||||
* Cabal
|
||||
|
||||
Instructions:
|
||||
* Run `bnfc -dm --text-token --functor hm.cf`
|
||||
* Run `make`
|
||||
* Run `cabal build`
|
||||
|
|
1
src/.gitignore
vendored
Normal file
1
src/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Hm
|
Loading…
Reference in New Issue
Block a user