about summary refs log tree commit diff
path: root/pkgs/development/tools/parsing/ebnf2ps/modernize.patch
blob: edb5e366d48af8f776ecc78b0943022365569673 (plain) (blame)
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
diff --git a/Ebnf2ps.cabal b/Ebnf2ps.cabal
index 483d34a..0a7b96e 100644
--- a/Ebnf2ps.cabal
+++ b/Ebnf2ps.cabal
@@ -1,66 +1,30 @@
--- Ebnf2ps.cabal auto-generated by cabal init. For additional options,
--- see
--- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
--- The name of the package.
 Name:                Ebnf2ps
-
--- The package version. See the Haskell package versioning policy
--- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
--- standards guiding when and how versions should be incremented.
 Version:             1.0.8
-
--- A short (one-line) description of the package.
-Synopsis:            Ebnf2ps: Peter's Syntax Diagram Drawing Tool
-
--- A longer description of the package.
--- Description:         
-
--- URL for the project homepage or repository.
+Synopsis:               Peter's Syntax Diagram Drawing Tool
 Homepage:            http://www.informatik.uni-freiburg.de/~thiemann/haskell/ebnf2ps/
-
--- The license under which the package is released.
 License:             BSD4
-
--- The file containing the license text.
 -- License-file:        LICENSE
-
--- The package author(s).
-Author:              Peter Thiemann
-
--- An email address to which users can send suggestions, bug reports,
--- and patches.
-Maintainer:          thiemann@acm.org
-
--- A copyright notice.
--- Copyright:           
-
+Author:                 Peter Thiemann <thiemann@acm.org>
+Maintainer:             Peter Thiemann <thiemann@acm.org>
 Category:            Language
-
 Build-type:          Simple
-
--- Extra files to be distributed with the package, such as examples or
--- a README.
--- Extra-source-files:  
-
--- Constraint on the version of Cabal needed to build this package.
 Cabal-version:       >=1.2
-
+Tested-With:            GHC == 6.10.4, GHC == 6.12.3, GHC == 7.0.4, GHC == 7.2.2
+Description:            Ebnf2ps generates nice looking syntax diagrams in EPS
+                        and FIG format from EBNF specifications and from yacc,
+                        bison, and Happy input grammars. The diagrams can be
+                        immediatedly included in TeX/LaTeX documents and in
+                        texts created with other popular document preparation
+                        systems.
 
 Executable Ebnf2ps
-  -- .hs or .lhs file containing the Main module.
   Main-is:   Ebnf2ps.hs
   Hs-source-dirs: src
-  
-  -- Packages needed in order to build this package.
-  Build-depends:  base < 4.3
-               ,  containers < 0.4
-               ,  haskell98
-               ,  unix < 2.5
-  
-  -- Modules not exported by this package.
-  -- Other-modules:       
-  
-  -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
+  Build-depends:        base >= 2 && < 5,
+                        containers,
+                        old-time,
+                        directory,
+                        unix
   Build-tools:         happy
   Cc-options: -DAFMPATH=/usr/share/texmf-texlive/fonts/afm
   
diff --git a/src/Color.hs b/src/Color.hs
index 184e5e6..8786dac 100644
--- a/src/Color.hs
+++ b/src/Color.hs
@@ -23,7 +23,7 @@
 module Color where
 -- (Color (..), lookupColor, showsColor, showsAColor, prepareColors)
 
-import Char
+import Data.Char
 import Numeric
 
 type Color = (Int, Int, Int)
diff --git a/src/CommandLine.hs b/src/CommandLine.hs
index 50d6546..518b107 100644
--- a/src/CommandLine.hs
+++ b/src/CommandLine.hs
@@ -1,6 +1,6 @@
 module CommandLine (parse_cmds) where
-import System
-
+import System.IO
+import System.Environment
 
 defaultArgs :: Args
 defaultArgs  =  MkArgs "Times-Roman" 10 "black" "Times-Roman" 10 "black" "white" "black" "Times-Roman" 10 "black" "white" "black" "black" 500 500 30 100 200 "rgb.txt" False False False False True False False False False
diff --git a/src/Ebnf2ps.hs b/src/Ebnf2ps.hs
index 9dc2e4d..6f340cf 100644
--- a/src/Ebnf2ps.hs
+++ b/src/Ebnf2ps.hs
@@ -25,11 +25,10 @@ import Defaults		(afmPathDefault, ebnfInputDefault, rgbPathDefault)
 import PathExpansion	(expandPath) 
 import Color
 import Info
-import IO
-import Monad
+import System.Time
+import System.Environment
+import Control.Monad
 import Numeric
-import System 
-import Time
 
 --------------------------------------------------------------------------------
 main :: IO () 
diff --git a/src/Ebnf2psParser.hs b/src/Ebnf2psParser.hs
index 4cc7052..0fb4557 100644
--- a/src/Ebnf2psParser.hs
+++ b/src/Ebnf2psParser.hs
@@ -4,7 +4,7 @@
 module Ebnf2psParser (theEbnfParser, theHappyParser, theYaccParser) where
 import AbstractSyntax
 import Lexer
-import List
+import Data.List
 
 data HappyAbsSyn 
 	= HappyTerminal Token'
diff --git a/src/EbnfLayout.hs b/src/EbnfLayout.hs
index cd0b4d9..aecc0b4 100644
--- a/src/EbnfLayout.hs
+++ b/src/EbnfLayout.hs
@@ -25,7 +25,7 @@ import AbstractSyntax
 import Color
 import Fonts (FONT, stringWidth, stringHeight, fontDescender)
 import Info
-import List
+import Data.List
 
 -- all arithmetic is done in 1/100 pt
 
diff --git a/src/Fonts.hs b/src/Fonts.hs
index c1639de..ed36a79 100644
--- a/src/Fonts.hs
+++ b/src/Fonts.hs
@@ -17,7 +17,7 @@
 module Fonts (FONT, makeFont, fontDescender, stringWidth, stringHeight, fontName, fontScale, noFont)
 where
 
-import Char
+import Data.Char
 import Numeric
 
 data FONT = FONT String Int Int (String -> Int)
diff --git a/src/GrammarTransform.hs b/src/GrammarTransform.hs
index 99c3840..65624ab 100644
--- a/src/GrammarTransform.hs
+++ b/src/GrammarTransform.hs
@@ -13,7 +13,7 @@ module GrammarTransform
 where
 
 import AbstractSyntax
-import List
+import Data.List
 
 
 data RInfo
diff --git a/src/GrammarUnfold.hs b/src/GrammarUnfold.hs
index 056119a..d35a630 100644
--- a/src/GrammarUnfold.hs
+++ b/src/GrammarUnfold.hs
@@ -17,7 +17,7 @@ module GrammarUnfold (
 import AbstractSyntax
 import GrammarTransform 
 import StringMatch      (stringMatch)
-import List
+import Data.List
 
 import qualified Data.Map (Map, keys, elems, findWithDefault, fromList)
 
diff --git a/src/IOSupplement.hs b/src/IOSupplement.hs
index 3251365..ba666b1 100644
--- a/src/IOSupplement.hs
+++ b/src/IOSupplement.hs
@@ -29,8 +29,9 @@
 module IOSupplement (getPath, readPathFile, readRGBPathFile)
 where
 
-import System
-import IO
+import System.IO
+import System.IO.Error
+import System.Environment
 
 #ifdef __HBC__
 ioError = fail
diff --git a/src/Lexer.hs b/src/Lexer.hs
index 52f2549..8bf9f82 100644
--- a/src/Lexer.hs
+++ b/src/Lexer.hs
@@ -3,7 +3,7 @@ module Lexer where
 -- Last Modified By: M. Walter
 --
 
-import Char
+import Data.Char
 
 ------------------------------------------------------------------------------
 --NOW the lexer
diff --git a/src/PathExpansion.hs b/src/PathExpansion.hs
index 48e27d6..01807e5 100644
--- a/src/PathExpansion.hs
+++ b/src/PathExpansion.hs
@@ -3,10 +3,11 @@ module PathExpansion (expandPath)
 where
  
 #ifdef __GLASGOW_HASKELL__
-import System
-import Directory
-import Monad
-import IO
+import System.Directory
+import System.Environment
+import Control.Monad
+import System.IO
+import System.IO.Error
 import System.Posix.User (getUserEntryForName, homeDirectory)
 #endif
 
@@ -99,8 +100,8 @@ replaceEnv (x:xs) = do t <- replaceEnv xs
 		       return (x:t)
 
 getEnv2 t
-	|t == "HOME" = catch (getEnv t) (\e -> if IO.isDoesNotExistError e then return ['.'] else ioError e)
-	|otherwise = catch (getEnv t) (\e -> if IO.isDoesNotExistError e then return [] else ioError e)
+	|t == "HOME" = catch (getEnv t) (\e -> if isDoesNotExistError e then return ['.'] else ioError e)
+	|otherwise = catch (getEnv t) (\e -> if isDoesNotExistError e then return [] else ioError e)
 -------------------------------------------------------	
 
 ---------------- Teilen nach Doppelpunkt --------------