@@ -36,10 +36,10 @@ flag llvm-head
3636
3737flag foreign
3838 description : Build the C interface to Dex
39- default : True
39+ default : False
4040
41- flag safe-names
42- description : Enables building with safe names checks
41+ flag debug
42+ description : Enable extra checks and stack trace printing (useful for developers)
4343 default : False
4444
4545library dex-resources
@@ -51,25 +51,19 @@ library dex-resources
5151 default-extensions : CPP
5252
5353library
54- exposed-modules : Env, Syntax, Type, Inference,
55- Parser, Util, Imp, Imp.Builder, Imp.Optimize,
56- PPrint, Algebra, Parallelize, Optimize, Serialize
57- Builder, Cat,
58- Simplify, TopLevel,
59- Autodiff, Interpreter, Logging, CUDA,
60- LLVM.JIT, LLVM.Shims, JIT, LLVMExec, Export
61- Err, LabeledItems, SourceRename,
62- SaferNames.Name, SaferNames.LazyMap,
63- SaferNames.Syntax, SaferNames.Bridge,
64- SaferNames.PPrint, SaferNames.Parser,
65- SaferNames.ResolveImplicitNames, SaferNames.SourceRename,
66- SaferNames.Type, SaferNames.Builder, SaferNames.Inference,
67- SaferNames.CheapReduction
54+ exposed-modules : Syntax, Cat, Util, PPrint, Serialize
55+ TopLevel, Interpreter, Logging, CUDA,
56+ LLVM.JIT, LLVM.Shims, JIT, LLVMExec,
57+ Err, LabeledItems, SourceRename, Name, Parser, MTL1,
58+ Type, Builder, Inference, CheapReduction, GenericTraversal,
59+ Simplify, Imp, Algebra, Linearize, Transpose,
60+ LLVM.HEAD.JIT
6861 if flag(live)
6962 exposed-modules : Actor, RenderHtml, LiveOutput
7063 other-modules : Paths_dex
7164 build-depends : base, containers, mtl, bytestring,
72- llvm-hs-pure, llvm-hs, transformers,
65+ llvm-hs-pure, llvm-hs, transformers, hashable, unordered-containers,
66+ exceptions, utf8-string, cryptonite,
7367 -- Parsing
7468 megaparsec, parser-combinators,
7569 -- Text output
@@ -82,9 +76,8 @@ library
8276 build-depends : warp, wai, blaze-html, http-types, cmark, binary
8377 cpp-options : -DDEX_LIVE
8478 cxx-options : -DDEX_LIVE
85- if flag(safe-names)
86- cpp-options : -DDEX_SAFE_NAMES
87- cxx-options : -DDEX_SAFE_NAMES
79+ if flag(debug)
80+ cpp-options : -DDEX_DEBUG
8881 if !os(darwin)
8982 exposed-modules : Resources
9083 hs-source-dirs : src/resources
@@ -101,7 +94,8 @@ library
10194 TupleSections, ScopedTypeVariables, LambdaCase, PatternSynonyms,
10295 BlockArguments, GADTs, TypeOperators, DataKinds, KindSignatures
10396 ConstraintKinds, FlexibleContexts, RankNTypes, QuantifiedConstraints,
104- TypeOperators, MultiParamTypeClasses, FunctionalDependencies
97+ TypeOperators, MultiParamTypeClasses, FunctionalDependencies,
98+ GeneralizedNewtypeDeriving
10599 pkgconfig-depends : libpng
106100 if flag(cuda)
107101 include-dirs : /usr/local/cuda/include
@@ -112,21 +106,13 @@ library
112106 ghc-options : -O3
113107 else
114108 ghc-options : -O0
115- if flag(llvm-head)
116- cpp-options : -DDEX_LLVM_VERSION=HEAD
117- build-depends : mlir-hs
118- exposed-modules : LLVM.HEAD.JIT,
119- MLIR.Lower, MLIR.Eval
120- else
121- cpp-options : -DDEX_LLVM_VERSION= 9
122- exposed-modules : LLVM.V9.JIT, LLVM.V9.Shims
123109
124110executable dex
125111 main-is : dex.hs
126112 other-extensions : OverloadedStrings
127113 build-depends : dex, base, containers, haskeline, prettyprinter, mtl,
128114 optparse-applicative, ansi-wl-pprint,
129- unix, store, bytestring, directory
115+ unix, store, bytestring, directory, exceptions
130116 if os(darwin)
131117 build-depends : dex-resources
132118 default-language : Haskell2010
0 commit comments