-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathinfernu.cabal
144 lines (134 loc) · 5.5 KB
/
infernu.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: infernu
version: 0.0.0.1
synopsis: Type inference and checker for JavaScript (experimental)
description: This version is highly experimental and may set your computer on fire (also, a lot of JS is not supported yet, so it may not be very useful.)
.
Infernu is a type checker for JavaScript. Since JavaScript is dynamically and weakly typed, it makes no sense to talk about "type errors" in arbitrary JavaScript code.
.
Consequently Infernu makes assumptions about the code and expects it to follow certain rules that
are not required by plain JavaScript (for example, implicit coercions such as `3 + 'a'` are not
allowed.)
.
Infernu's type system is designed for writing dynamic-looking code in a safe statically type-checked
environment. Type annotations are not required (though they would be nice to support, for various
reasons). Instead, Infernu *infers* the types of expressions by examining the code. If the inferred
types contradict each other, Infernu reports the contradiction as an error.
.
Infernu places restrictions on JS programs that are otherwise valid. In other words, Infernu is a
**subset of JavaScript**. Infernu tries to strike a balance between type system complexity and
dynamic-style coding flexibility.
.
See the .md files included in the package for more information.
license: GPL-2
homepage: https://github.com/sinelaw/infernu
bug-reports: https://github.com/sinelaw/infernu/issues
license-file: LICENSE
author: Noam Lewis
maintainer: jones.noamle@gmail.com
copyright: Noam Lewis, 2014-2015
-- category:
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
stability: experimental
source-repository head
type: git
location: git@github.com:sinelaw/infernu.git
flag quickcheck
default: False
manual: True
flag trace
default: False
manual: True
flag debug
default: False
manual: True
library
hs-source-dirs: src
exposed-modules: Infernu.Builtins.Array
, Infernu.Builtins.Date
-- WIP: Dom
--, Infernu.Builtins.DOM
, Infernu.Builtins.Math
, Infernu.Builtins.Names
, Infernu.Builtins.Number
, Infernu.Builtins.Object
, Infernu.Builtins.Operators
, Infernu.Builtins.Regex
, Infernu.Builtins.String
, Infernu.Builtins.StringMap
, Infernu.Builtins.TypeClasses
, Infernu.Builtins
, Infernu.Decycle
, Infernu.Expr
, Infernu.Fix
, Infernu.Infer
, Infernu.InferState
, Infernu.Lib
, Infernu.Log
, Infernu.Options
, Infernu.Parse
, Infernu.Prelude
, Infernu.Pretty
, Infernu.Source
, Infernu.Types
, Infernu.Unify
, Infernu.Util
other-modules: Infernu.Builtins.Util
-- TODO: use only mtl (not transformers)
build-depends: base >= 4.6 && < 5, base-compat, base-orphans, mtl, containers, transformers, either, language-ecmascript, digits, parsec, optparse-applicative, ansi-wl-pprint, unordered-containers, hashable
default-language: Haskell2010
default-extensions: NoImplicitPrelude
ghc-options: -Wall -O2 -rtsopts -threaded
ghc-prof-options: -threaded -auto-all -caf-all -O2 -rtsopts
if flag(debug)
ghc-options: -g
if flag(trace)
cpp-options: -DTRACE
if flag(quickcheck)
cpp-options: -DQUICKCHECK
build-depends: QuickCheck, derive
default-extensions: TemplateHaskell, DeriveGeneric, FlexibleInstances
executable infernu
main-is: Main.hs
build-depends: base, parsec, infernu, optparse-applicative, ansi-wl-pprint
default-language: Haskell2010
default-extensions: NoImplicitPrelude
ghc-options: -Wall -O2 -rtsopts -threaded
ghc-prof-options: -threaded -auto-all -caf-all -O2 -rtsopts
if flag(debug)
ghc-options: -g
if flag(trace)
cpp-options: -DTRACE
if flag(quickcheck)
cpp-options: -DQUICKCHECK
build-depends: QuickCheck, derive
default-extensions: TemplateHaskell, DeriveGeneric
executable infernu-demo
main-is: Demo.hs
hs-source-dirs: test
build-depends: base, infernu, ansi-wl-pprint
default-language: Haskell2010
default-extensions: NoImplicitPrelude
ghc-options: -Wall -O2 -main-is Demo
if flag(trace)
cpp-options: -DTRACE
if flag(quickcheck)
cpp-options: -DQUICKCHECK
build-depends: QuickCheck, derive
default-extensions: TemplateHaskell, DeriveGeneric
executable test
if flag(quickcheck)
cpp-options: -DQUICKCHECK
build-depends: QuickCheck, derive
default-extensions: TemplateHaskell, DeriveGeneric
else
buildable: False
main-is: Test.hs
hs-source-dirs: test
build-depends: base, infernu
default-language: Haskell2010
default-extensions: NoImplicitPrelude
ghc-options: -Wall -O2 -main-is Test
if flag(trace)
cpp-options: -DTRACE