| 1 |
diff --git a/Base.lhs b/Base.lhs |
| 2 |
index bbd9df5..c26e048 100644 |
| 3 |
--- a/Base.lhs |
| 4 |
+++ b/Base.lhs |
| 5 |
@@ -36,9 +36,9 @@ |
| 6 |
> where |
| 7 |
> |
| 8 |
> import Prettier |
| 9 |
-> import Monad ( MonadPlus(..) ) |
| 10 |
-> import IO |
| 11 |
-> import System |
| 12 |
+> import Control.Monad ( MonadPlus(..) ) |
| 13 |
+> import System.IO |
| 14 |
+> import System.Exit |
| 15 |
|
| 16 |
%------------------------------------------------------------------------------- |
| 17 |
\subsection{List utilities} |
| 18 |
diff --git a/Case.lhs b/Case.lhs |
| 19 |
index 6558614..cbe87c0 100644 |
| 20 |
--- a/Case.lhs |
| 21 |
+++ b/Case.lhs |
| 22 |
@@ -45,10 +45,10 @@ |
| 23 |
> import MergeSort |
| 24 |
> import Base |
| 25 |
> import Options |
| 26 |
-> import Maybe |
| 27 |
-> import IO |
| 28 |
-> import Monad |
| 29 |
-> import List ( partition ) |
| 30 |
+> import Data.Maybe |
| 31 |
+> import System.IO |
| 32 |
+> import Control.Monad |
| 33 |
+> import Data.List ( partition ) |
| 34 |
> import Prelude hiding ( lookup ) |
| 35 |
|
| 36 |
%-------------------------------= -------------------------------------------- |
| 37 |
@@ -347,4 +347,4 @@ More lookahead. |
| 38 |
> actions' :: Symbol -> Past -> Past |
| 39 |
> actions' x (Node es ts) = Node [ a{ future = f } | a <- es |
| 40 |
> , Just f <- [lookup (future a) x] ] |
| 41 |
-> [ (e, actions' x t) | (e, t) <- ts ] |
| 42 |
\ No newline at end of file |
| 43 |
+> [ (e, actions' x t) | (e, t) <- ts ] |
| 44 |
diff --git a/Compact.lhs b/Compact.lhs |
| 45 |
index f878a06..6886a6a 100644 |
| 46 |
--- a/Compact.lhs |
| 47 |
+++ b/Compact.lhs |
| 48 |
@@ -49,9 +49,9 @@ |
| 49 |
> import Base |
| 50 |
> import Generate |
| 51 |
> import MergeSort |
| 52 |
-> import Char |
| 53 |
-> import IO |
| 54 |
-> import Maybe |
| 55 |
+> import Data.Char |
| 56 |
+> import System.IO |
| 57 |
+> import Data.Maybe |
| 58 |
> import Prelude hiding ( lookup ) |
| 59 |
|
| 60 |
%-------------------------------= -------------------------------------------- |
| 61 |
@@ -444,4 +444,4 @@ Names. |
| 62 |
|
| 63 |
> wrap s = prefix opts ++ s ++ suffix opts |
| 64 |
> wrap_var s = var (wrap s) |
| 65 |
-> wrap_con s = con (wrap s) |
| 66 |
\ No newline at end of file |
| 67 |
+> wrap_con s = con (wrap s) |
| 68 |
diff --git a/Convert.lhs b/Convert.lhs |
| 69 |
index 6b7d836..01d2c32 100644 |
| 70 |
--- a/Convert.lhs |
| 71 |
+++ b/Convert.lhs |
| 72 |
@@ -42,13 +42,13 @@ |
| 73 |
> import OrdUniqListSet ( Set, MinView(Empty, Min) ) -- for nhc98 |
| 74 |
> import Atom hiding ( string ) |
| 75 |
> import Haskell hiding ( Empty, Decl, guard ) |
| 76 |
-> import Maybe |
| 77 |
-> import List |
| 78 |
+> import Data.Maybe |
| 79 |
+> import Data.List |
| 80 |
> import Base |
| 81 |
> import Prettier hiding ( concat, intersperse ) |
| 82 |
> import qualified Prettier as PP |
| 83 |
-> import Monad |
| 84 |
-> import IO hiding ( isEOF ) |
| 85 |
+> import Control.Monad |
| 86 |
+> import System.IO hiding ( isEOF ) |
| 87 |
> import Options |
| 88 |
|
| 89 |
> newEOF :: Ident |
| 90 |
@@ -361,4 +361,4 @@ Instance of a rule scheme. |
| 91 |
> | terminal w = w |
| 92 |
> | otherwise = case lookup w bindings of |
| 93 |
> Just w' -> w' { attributes = attributes w } |
| 94 |
-> Nothing -> updateArgs w (map substitute (arguments w)) |
| 95 |
\ No newline at end of file |
| 96 |
+> Nothing -> updateArgs w (map substitute (arguments w)) |
| 97 |
diff --git a/GParser2.hs b/GParser2.hs |
| 98 |
index 9d04100..0cb4c21 100644 |
| 99 |
--- a/GParser2.hs |
| 100 |
+++ b/GParser2.hs |
| 101 |
@@ -47,9 +47,9 @@ |
| 102 |
import qualified Base |
| 103 |
import Prettier ( Pretty ) |
| 104 |
import Options |
| 105 |
- import Char |
| 106 |
- import List |
| 107 |
- import IO |
| 108 |
+ import Data.Char hiding ( isSymbol ) |
| 109 |
+ import Data.List |
| 110 |
+ import System.IO |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
@@ -2258,4 +2258,4 @@ |
| 115 |
where verb = verbose opts |
| 116 |
|
| 117 |
run :: (Monad m) => Lex m Answer -> (String -> m Answer) |
| 118 |
- run parser inp = unLex parser (\a _ _ _ _ -> return a) False inp 1 (take 1 (lines inp)) |
| 119 |
\ No newline at end of file |
| 120 |
+ run parser inp = unLex parser (\a _ _ _ _ -> return a) False inp 1 (take 1 (lines inp)) |
| 121 |
diff --git a/GVStack.lhs b/GVStack.lhs |
| 122 |
index f5968ad..acb5d96 100644 |
| 123 |
--- a/GVStack.lhs |
| 124 |
+++ b/GVStack.lhs |
| 125 |
@@ -45,10 +45,10 @@ |
| 126 |
> import Options |
| 127 |
> import Base |
| 128 |
> import Generate |
| 129 |
-> import IO |
| 130 |
-> import Monad |
| 131 |
-> import Char |
| 132 |
-> import List ( maximumBy ) |
| 133 |
+> import System.IO |
| 134 |
+> import Control.Monad |
| 135 |
+> import Data.Char |
| 136 |
+> import Data.List ( maximumBy ) |
| 137 |
> import Prelude hiding ( lookup ) |
| 138 |
|
| 139 |
%-------------------------------= -------------------------------------------- |
| 140 |
diff --git a/Generate.lhs b/Generate.lhs |
| 141 |
index 74d7335..3b7284f 100644 |
| 142 |
--- a/Generate.lhs |
| 143 |
+++ b/Generate.lhs |
| 144 |
@@ -43,7 +43,7 @@ |
| 145 |
> import OrdUniqListSet ( Set ) |
| 146 |
> import Base |
| 147 |
> --import Char ( toLower, toUpper ) |
| 148 |
-> import List ( intersperse ) |
| 149 |
+> import Data.List ( intersperse ) |
| 150 |
|
| 151 |
Symbols. |
| 152 |
|
| 153 |
diff --git a/Haskell.lhs b/Haskell.lhs |
| 154 |
index aba2831..74f7bec 100644 |
| 155 |
--- a/Haskell.lhs |
| 156 |
+++ b/Haskell.lhs |
| 157 |
@@ -35,7 +35,7 @@ |
| 158 |
> import Atom hiding ( string ) |
| 159 |
> import qualified Atom |
| 160 |
> import Prettier |
| 161 |
-> import Char |
| 162 |
+> import Data.Char |
| 163 |
> import Prelude hiding ( concat ) |
| 164 |
|
| 165 |
%-------------------------------= -------------------------------------------- |
| 166 |
diff --git a/LR0.lhs b/LR0.lhs |
| 167 |
index 0a16123..60bb002 100644 |
| 168 |
--- a/LR0.lhs |
| 169 |
+++ b/LR0.lhs |
| 170 |
@@ -45,7 +45,7 @@ |
| 171 |
> import Base hiding ( list ) |
| 172 |
> import qualified Base |
| 173 |
> import Prelude hiding ( null ) |
| 174 |
-> import IO |
| 175 |
+> import System.IO |
| 176 |
> import Options |
| 177 |
|
| 178 |
%-------------------------------= -------------------------------------------- |
| 179 |
@@ -269,4 +269,4 @@ State |0| is the error or trap state and the goto state for start |
| 180 |
productions such as |Start# : Start, EOF;|. |
| 181 |
|
| 182 |
> errorState :: State |
| 183 |
-> errorState = State 0 (Set.empty :\/ Set.empty) |
| 184 |
\ No newline at end of file |
| 185 |
+> errorState = State 0 (Set.empty :\/ Set.empty) |
| 186 |
diff --git a/Lexer2.lhs b/Lexer2.lhs |
| 187 |
index af55186..3bb1e33 100644 |
| 188 |
--- a/Lexer2.lhs |
| 189 |
+++ b/Lexer2.lhs |
| 190 |
@@ -35,9 +35,9 @@ |
| 191 |
> module Lexer2 |
| 192 |
> where |
| 193 |
> import Prelude |
| 194 |
-> import Char |
| 195 |
-> import IO |
| 196 |
-> import Monad |
| 197 |
+> import Data.Char |
| 198 |
+> import System.IO |
| 199 |
+> import Control.Monad |
| 200 |
> import Base |
| 201 |
> import Options |
| 202 |
|
| 203 |
@@ -156,4 +156,4 @@ |
| 204 |
|
| 205 |
> isSymbol, isIdChar :: Char -> Bool |
| 206 |
> isSymbol c = c `elem` "!@#$%&*+./<=>?\\^|:-~" |
| 207 |
-> isIdChar c = isAlphaNum c || c `elem` "_'" |
| 208 |
\ No newline at end of file |
| 209 |
+> isIdChar c = isAlphaNum c || c `elem` "_'" |
| 210 |
diff --git a/Lib/OrdUniqListFM.lhs b/Lib/OrdUniqListFM.lhs |
| 211 |
index 1419028..4e2eea5 100644 |
| 212 |
--- a/Lib/OrdUniqListFM.lhs |
| 213 |
+++ b/Lib/OrdUniqListFM.lhs |
| 214 |
@@ -64,8 +64,8 @@ |
| 215 |
> import qualified OrdUniqList as OUL |
| 216 |
> import MergeSort ( mergeSort ) |
| 217 |
> import Prettier hiding ( empty ) |
| 218 |
-> import qualified List |
| 219 |
-> import Maybe ( fromMaybe ) |
| 220 |
+> import qualified Data.List as List |
| 221 |
+> import Data.Maybe ( fromMaybe ) |
| 222 |
|
| 223 |
> infixl 9 ! |
| 224 |
> infixl 9 // |
| 225 |
@@ -292,4 +292,4 @@ The list argument of |fromList_C| need not be functional. |
| 226 |
@prefixLookup@ returns the list of all completions of the given list. |
| 227 |
|
| 228 |
prefixLookup :: Ord a => FM [a] b -> [a] -> [([a], b)] |
| 229 |
- prefixLookup (FM f) s = [ b | Assoc b@(a, _)<-f, s `isPrefixOf` a ] |
| 230 |
\ No newline at end of file |
| 231 |
+ prefixLookup (FM f) s = [ b | Assoc b@(a, _)<-f, s `isPrefixOf` a ] |
| 232 |
diff --git a/Lib/OrdUniqListSet.lhs b/Lib/OrdUniqListSet.lhs |
| 233 |
index 66eba10..ddb8629 100644 |
| 234 |
--- a/Lib/OrdUniqListSet.lhs |
| 235 |
+++ b/Lib/OrdUniqListSet.lhs |
| 236 |
@@ -59,8 +59,8 @@ |
| 237 |
> import qualified Prelude |
| 238 |
> import qualified OrdUniqList as OUL |
| 239 |
> import Prettier hiding ( empty ) |
| 240 |
-> import qualified List |
| 241 |
-> import Monad |
| 242 |
+> import qualified Data.List as List |
| 243 |
+> import Control.Monad |
| 244 |
|
| 245 |
%------------------------------------------------------------------------------- |
| 246 |
\subsection{Type definitions and instance declarations} |
| 247 |
diff --git a/Lookahead.lhs b/Lookahead.lhs |
| 248 |
index ba23a5d..5c0fb31 100644 |
| 249 |
--- a/Lookahead.lhs |
| 250 |
+++ b/Lookahead.lhs |
| 251 |
@@ -42,9 +42,9 @@ |
| 252 |
> import qualified Prettier as PP |
| 253 |
> import Base |
| 254 |
> import Options |
| 255 |
-> import IO |
| 256 |
-> import Maybe |
| 257 |
-> import Monad ( when ) |
| 258 |
+> import System.IO |
| 259 |
+> import Data.Maybe |
| 260 |
+> import Control.Monad ( when ) |
| 261 |
|
| 262 |
%-------------------------------= -------------------------------------------- |
| 263 |
\section{Grouping of actions} |
| 264 |
diff --git a/Main.lhs b/Main.lhs |
| 265 |
index b9b2a2e..98af968 100644 |
| 266 |
--- a/Main.lhs |
| 267 |
+++ b/Main.lhs |
| 268 |
@@ -53,11 +53,12 @@ Compile me with |
| 269 |
> import Prettier hiding ( string, concat ) |
| 270 |
> import qualified Prettier as PP |
| 271 |
> import qualified SearchTree as ST |
| 272 |
-> import Monad ( when ) |
| 273 |
-> import Directory |
| 274 |
-> import IO |
| 275 |
-> import System |
| 276 |
+> import Control.Monad ( when ) |
| 277 |
+> import System.Directory |
| 278 |
> import System.Console.GetOpt |
| 279 |
+> import System.Exit |
| 280 |
+> import System.Environment |
| 281 |
+> import System.IO |
| 282 |
|
| 283 |
%-------------------------------= -------------------------------------------- |
| 284 |
\section{The main program} |
| 285 |
@@ -689,4 +690,4 @@ o Introduce abbreviations for patterns (as in Happy): |
| 286 |
| let add op = ADDOP (op :: Addop) |
| 287 |
| let id s = IDENT (s :: String); |
| 288 |
|
| 289 |
- |add op| serves as an abbreviation for |ADDOP op|. |
| 290 |
\ No newline at end of file |
| 291 |
+ |add op| serves as an abbreviation for |ADDOP op|. |
| 292 |
diff --git a/Options.lhs b/Options.lhs |
| 293 |
index a0e559f..ece780d 100644 |
| 294 |
--- a/Options.lhs |
| 295 |
+++ b/Options.lhs |
| 296 |
@@ -33,8 +33,8 @@ |
| 297 |
> where |
| 298 |
> import Base |
| 299 |
> import System.Console.GetOpt |
| 300 |
-> import Char |
| 301 |
-> import IO |
| 302 |
+> import Data.Char |
| 303 |
+> import System.IO |
| 304 |
|
| 305 |
%-------------------------------= -------------------------------------------- |
| 306 |
\section{Command line options} |
| 307 |
@@ -149,4 +149,4 @@ |
| 308 |
> | otherwise = Signature False |
| 309 |
|
| 310 |
> (<<) :: String -> String -> Bool |
| 311 |
-> s << t = map toLower s `isPrefix` map toLower t |
| 312 |
\ No newline at end of file |
| 313 |
+> s << t = map toLower s `isPrefix` map toLower t |
| 314 |
diff --git a/SearchTree.lhs b/SearchTree.lhs |
| 315 |
index 85755d4..d1c58ba 100644 |
| 316 |
--- a/SearchTree.lhs |
| 317 |
+++ b/SearchTree.lhs |
| 318 |
@@ -32,7 +32,7 @@ |
| 319 |
> , length, lookup, unsafeLookup ) |
| 320 |
> where |
| 321 |
> import MergeSort ( mergeSortBy ) |
| 322 |
-> import Maybe ( fromMaybe ) |
| 323 |
+> import Data.Maybe ( fromMaybe ) |
| 324 |
> import Prelude hiding ( length, lookup ) |
| 325 |
> import qualified Prelude |
| 326 |
|
| 327 |
@@ -99,4 +99,4 @@ Lookup. |
| 328 |
|
| 329 |
|
| 330 |
> unsafeLookup :: (Ord a, Show a) => FM a v -> a -> v |
| 331 |
-> unsafeLookup fm a = fromMaybe (error ("unsafeLookup: key not found: " ++ show a)) (lookup fm a) |
| 332 |
\ No newline at end of file |
| 333 |
+> unsafeLookup fm a = fromMaybe (error ("unsafeLookup: key not found: " ++ show a)) (lookup fm a) |
| 334 |
diff --git a/Stackless.lhs b/Stackless.lhs |
| 335 |
index 106b8f3..2fb1a97 100644 |
| 336 |
--- a/Stackless.lhs |
| 337 |
+++ b/Stackless.lhs |
| 338 |
@@ -47,10 +47,10 @@ |
| 339 |
> import Base |
| 340 |
> import Generate |
| 341 |
> import MergeSort |
| 342 |
-> import Char |
| 343 |
-> import Maybe |
| 344 |
-> import IO |
| 345 |
-> import Monad |
| 346 |
+> import Data.Char |
| 347 |
+> import Data.Maybe |
| 348 |
+> import System.IO |
| 349 |
+> import Control.Monad |
| 350 |
> import Prelude hiding ( lookup ) |
| 351 |
|
| 352 |
Characteristics. |
| 353 |
@@ -311,4 +311,4 @@ Names. |
| 354 |
|
| 355 |
> wrap s = prefix opts ++ s ++ suffix opts |
| 356 |
> wrap_var s = var (wrap s) |
| 357 |
-> wrap_con s = con (wrap s) |
| 358 |
\ No newline at end of file |
| 359 |
+> wrap_con s = con (wrap s) |
| 360 |
diff --git a/Standard.lhs b/Standard.lhs |
| 361 |
index 18bce59..9fb5305 100644 |
| 362 |
--- a/Standard.lhs |
| 363 |
+++ b/Standard.lhs |
| 364 |
@@ -47,9 +47,9 @@ |
| 365 |
> import Options |
| 366 |
> import Base |
| 367 |
> import Generate |
| 368 |
-> import Char |
| 369 |
-> import IO |
| 370 |
-> import Maybe |
| 371 |
+> import Data.Char |
| 372 |
+> import System.IO |
| 373 |
+> import Data.Maybe |
| 374 |
> import Prelude hiding ( lookup ) |
| 375 |
|
| 376 |
Characteristics. |
| 377 |
@@ -293,4 +293,4 @@ Names. |
| 378 |
|
| 379 |
> wrap s = prefix opts ++ s ++ suffix opts |
| 380 |
> wrap_var s = var (wrap s) |
| 381 |
-> wrap_con s = con (wrap s) |
| 382 |
\ No newline at end of file |
| 383 |
+> wrap_con s = con (wrap s) |
| 384 |
diff --git a/frown.cabal b/frown.cabal |
| 385 |
index 19448ed..5a44fdf 100644 |
| 386 |
--- a/frown.cabal |
| 387 |
+++ b/frown.cabal |
| 388 |
@@ -2,7 +2,7 @@ Name: Frown |
| 389 |
Version: 0.6 |
| 390 |
License: GPL |
| 391 |
Author: Ralf Hinze |
| 392 |
-Build-Depends: base, haskell98 |
| 393 |
+Build-Depends: base, directory |
| 394 |
Synopsis: A parser generator for Haskell |
| 395 |
|
| 396 |
Executable: frown |