Skip to content

Commit 7c50a8c

Browse files
committed
convert tabs to spaces. strip trailing whitespace.
1 parent da0b010 commit 7c50a8c

File tree

11 files changed

+129
-134
lines changed

11 files changed

+129
-134
lines changed

src/System/Eval.hs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
--
1+
--
22
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
3-
--
3+
--
44
-- This library is free software; you can redistribute it and/or
55
-- modify it under the terms of the GNU Lesser General Public
66
-- License as published by the Free Software Foundation; either
77
-- version 2.1 of the License, or (at your option) any later version.
8-
--
8+
--
99
-- This library is distributed in the hope that it will be useful,
1010
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
-- Lesser General Public License for more details.
13-
--
13+
--
1414
-- You should have received a copy of the GNU Lesser General Public
1515
-- License along with this library; if not, write to the Free Software
1616
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
1717
-- USA
18-
--
18+
--
1919

20-
module System.Eval (
20+
module System.Eval (
2121
module System.Eval.Haskell,
2222
) where
2323

2424
import System.Eval.Haskell {-all-}
25-

src/System/Eval/Utils.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,3 @@ mkUniqueWith wrapper src mods = do
9393
--
9494
cleanup :: String -> String -> IO ()
9595
cleanup a b = mapM_ removeFile [a, b, replaceSuffix b ".hi"]
96-

src/System/Plugins.hs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
--
1+
--
22
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
3-
--
3+
--
44
-- This library is free software; you can redistribute it and/or
55
-- modify it under the terms of the GNU Lesser General Public
66
-- License as published by the Free Software Foundation; either
77
-- version 2.1 of the License, or (at your option) any later version.
8-
--
8+
--
99
-- This library is distributed in the hope that it will be useful,
1010
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
1111
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212
-- Lesser General Public License for more details.
13-
--
13+
--
1414
-- You should have received a copy of the GNU Lesser General Public
1515
-- License along with this library; if not, write to the Free Software
1616
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
1717
-- USA
18-
--
18+
--
1919

20-
module System.Plugins (
20+
module System.Plugins (
2121

2222
-- $Description
2323

@@ -34,4 +34,3 @@ import System.Plugins.Load {-all-}
3434
--
3535
-- [@NAME@] hs-plugins library : compile and load Haskell code at runtime
3636
--
37-

src/System/Plugins/Consts.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{-# LANGUAGE CPP #-}
2-
--
2+
--
33
-- Copyright (C) 2004 Don Stewart - http://www.cse.unsw.edu.au/~dons
4-
--
4+
--
55
-- This library is free software; you can redistribute it and/or
66
-- modify it under the terms of the GNU Lesser General Public
77
-- License as published by the Free Software Foundation; either
88
-- version 2.1 of the License, or (at your option) any later version.
9-
--
9+
--
1010
-- This library is distributed in the hope that it will be useful,
1111
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1313
-- Lesser General Public License for more details.
14-
--
14+
--
1515
-- You should have received a copy of the GNU Lesser General Public
1616
-- License along with this library; if not, write to the Free Software
1717
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
1818
-- USA
19-
--
19+
--
2020

2121
module System.Plugins.Consts where
2222

@@ -60,7 +60,7 @@ sysPkgPrefix = "HS"
6060

6161
-- | '_' on a.out, and Darwin
6262
#if LEADING_UNDERSCORE == 1
63-
prefixUnderscore = "_"
63+
prefixUnderscore = "_"
6464
#else
6565
prefixUnderscore = ""
6666
#endif

src/System/Plugins/Env.hs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -429,37 +429,37 @@ lookupPkg' p = withPkgEnvs env $ \fms -> go fms p
429429
#else
430430
libdirs = libraryDirs pkg ++ ldOptsPaths
431431
#endif
432-
-- If we're loading dynamic libs we need the cbits to appear before the
433-
-- real packages.
432+
-- If we're loading dynamic libs we need the cbits to appear before the
433+
-- real packages.
434434
libs <- mapM (findHSlib libdirs) (cbits ++ hslibs)
435435
#if defined(CYGWIN) || defined(__MINGW32__)
436436
windowsos <- catch (getEnv "OS")
437-
(\e -> if isDoesNotExistError e then return "Windows_98" else ioError e)
437+
(\e -> if isDoesNotExistError e then return "Windows_98" else ioError e)
438438
windowsdir <-
439439
if windowsos == "Windows_9X" -- I don't know Windows 9X has OS system variable
440440
then return "C:/windows"
441441
else return "C:/winnt"
442442
sysroot <- catch (getEnv "SYSTEMROOT")
443-
(\e -> if isDoesNotExistError e then return windowsdir else ioError e) -- guess at a reasonable default
444-
let syslibdir = sysroot ++ (if windowsos == "Windows_9X" then "/SYSTEM" else "/SYSTEM32")
445-
libs' <- mapM (findDLL $ syslibdir : libdirs) dlls
443+
(\e -> if isDoesNotExistError e then return windowsdir else ioError e) -- guess at a reasonable default
444+
let syslibdir = sysroot ++ (if windowsos == "Windows_9X" then "/SYSTEM" else "/SYSTEM32")
445+
libs' <- mapM (findDLL $ syslibdir : libdirs) dlls
446446
#else
447-
libs' <- mapM (findDLL libdirs) dlls
447+
libs' <- mapM (findDLL libdirs) dlls
448448
#endif
449-
let slibs = [ lib | Right (Static lib) <- libs ]
450-
dlibs = [ lib | Right (Dynamic lib) <- libs ]
449+
let slibs = [ lib | Right (Static lib) <- libs ]
450+
dlibs = [ lib | Right (Dynamic lib) <- libs ]
451451
return (deppkgs, (slibs,map (either id id) libs' ++ dlibs) )
452452

453453
#if defined(CYGWIN) || defined(__MINGW32__)
454454
-- replace $topdir
455-
fix_topdir [] = []
456-
fix_topdir (x:xs) = replace_topdir x : fix_topdir xs
455+
fix_topdir [] = []
456+
fix_topdir (x:xs) = replace_topdir x : fix_topdir xs
457457

458458
replace_topdir [] = []
459-
replace_topdir ('$':xs)
460-
| take 6 xs == "topdir" = ghcLibraryPath ++ (drop 6 xs)
461-
| otherwise = '$' : replace_topdir xs
462-
replace_topdir (x:xs) = x : replace_topdir xs
459+
replace_topdir ('$':xs)
460+
| take 6 xs == "topdir" = ghcLibraryPath ++ (drop 6 xs)
461+
| otherwise = '$' : replace_topdir xs
462+
replace_topdir (x:xs) = x : replace_topdir xs
463463
#endif
464464
-- a list elimination form for the Maybe type
465465
--filterRight :: [Either left right] -> [right]
@@ -477,31 +477,31 @@ lookupPkg' p = withPkgEnvs env $ \fms -> go fms p
477477
if b then return $ Just l -- found it!
478478
else findHSlib' dirs lib
479479

480-
findHSslib dirs lib = findHSlib' dirs $ lib ++ sysPkgSuffix
481-
findHSdlib dirs lib = findHSlib' dirs $ mkDynPkgName lib
480+
findHSslib dirs lib = findHSlib' dirs $ lib ++ sysPkgSuffix
481+
findHSdlib dirs lib = findHSlib' dirs $ mkDynPkgName lib
482482

483483
-- Problem: sysPkgSuffix is ".o", but extra libraries could be
484484
-- ".so"
485485
-- Solution: first look for static library, if we don't find it
486-
-- look for a dynamic version.
487-
findHSlib :: [FilePath] -> String -> IO (Either String HSLib)
488-
findHSlib dirs lib = do
489-
static <- findHSslib dirs lib
490-
case static of
491-
Just file -> return $ Right $ Static file
492-
Nothing -> do
493-
dynamic <- findHSdlib dirs lib
494-
case dynamic of
495-
Just file -> return $ Right $ Dynamic file
496-
Nothing -> return $ Left lib
486+
-- look for a dynamic version.
487+
findHSlib :: [FilePath] -> String -> IO (Either String HSLib)
488+
findHSlib dirs lib = do
489+
static <- findHSslib dirs lib
490+
case static of
491+
Just file -> return $ Right $ Static file
492+
Nothing -> do
493+
dynamic <- findHSdlib dirs lib
494+
case dynamic of
495+
Just file -> return $ Right $ Dynamic file
496+
Nothing -> return $ Left lib
497497

498498
findDLL :: [FilePath] -> String -> IO (Either String FilePath)
499-
findDLL [] lib = return (Left lib)
500-
findDLL (dir:dirs) lib = do
501-
let l = dir </> lib
502-
b <- doesFileExist l
503-
if b then return $ Right l
504-
else findDLL dirs lib
499+
findDLL [] lib = return (Left lib)
500+
findDLL (dir:dirs) lib = do
501+
let l = dir </> lib
502+
b <- doesFileExist l
503+
if b then return $ Right l
504+
else findDLL dirs lib
505505

506506
------------------------------------------------------------------------
507507
-- do we have a Module name for this merge?

src/System/Plugins/Load.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ loadPackage p = do
610610
putStr (' ':show libs) >> hFlush stdout
611611
putStr (' ':show dlls) >> hFlush stdout
612612
#endif
613-
mapM_ loadShared dlls
613+
mapM_ loadShared dlls
614614

615615

616616

src/System/Plugins/LoadTypes.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
--
1+
--
22
-- Copyright (c) 2005 Lemmih <lemmih@gmail.com>
33
-- Copyright (c) 2005 Don Stewart - http://www.cse.unsw.edu.au/~dons
4-
--
4+
--
55
-- This program is free software; you can redistribute it and/or
66
-- modify it under the terms of the GNU General Public License as
77
-- published by the Free Software Foundation; either version 2 of
88
-- the License, or (at your option) any later version.
9-
--
9+
--
1010
-- This program is distributed in the hope that it will be useful,
1111
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1313
-- General Public License for more details.
14-
--
14+
--
1515
-- You should have received a copy of the GNU General Public License
1616
-- along with this program; if not, write to the Free Software
1717
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1818
-- 02111-1307, USA.
19-
--
19+
--
2020

2121
module System.Plugins.LoadTypes
2222
( Key (..)

0 commit comments

Comments
 (0)