[Fencommits] fenfire-hs: clean Fenfire.fhs imports
Benja Fallenstein
benja.fallenstein at gmail.com
Wed Feb 28 18:34:31 EET 2007
Wed Feb 28 18:34:16 EET 2007 Benja Fallenstein <benja.fallenstein at gmail.com>
* clean Fenfire.fhs imports
diff -rN -u old-fenfire-hs/Fenfire.fhs new-fenfire-hs/Fenfire.fhs
--- old-fenfire-hs/Fenfire.fhs 2007-02-28 18:34:31.000000000 +0200
+++ new-fenfire-hs/Fenfire.fhs 2007-02-28 18:34:31.000000000 +0200
@@ -23,44 +23,22 @@
import Cairo hiding (rotate, Path)
import Vobs
import Utils
+import qualified Raptor
import RDF
-import qualified Raptor (filenameToTriples, uriToTriples,
- triplesToFilename, filenameToURI, Identifier(..))
-
import qualified Data.Map as Map
import qualified Data.Set as Set
-import qualified Data.Tree as Tree
-import Data.List (intersperse)
-import qualified Data.List
+import qualified Data.List as List
import Data.Set (Set)
import Data.IORef
import Data.Maybe (fromMaybe, fromJust, isJust, isNothing, catMaybes)
-import Data.Monoid(Monoid(mempty, mconcat), Dual(Dual), getDual)
+import Data.Monoid(Monoid(mempty, mconcat))
import Control.Applicative
-import qualified Control.Exception
import Control.Monad (when, guard, mplus, msum, liftM, join)
-import Control.Monad.Reader (ReaderT, runReaderT, local, ask, asks)
-import Control.Monad.State (StateT, get, gets, modify, put, execStateT)
-import Control.Monad.Trans (lift, liftIO)
-import Control.Monad.Writer (Writer, execWriter, tell)
-
-import GtkFixes
-import Graphics.UI.Gtk hiding (Color, get, disconnect, fill,
--- GtkFixes overrides:
- actionNew,
- widgetGetStyle,
- styleGetForeground, styleGetBackground,
- styleGetLight, styleGetMiddle, styleGetDark,
- styleGetText, styleGetBase,
- styleGetAntiAliasing)
-import Graphics.UI.Gtk.ModelView as New
import qualified Network.URI
-import System.Directory (canonicalizePath)
-import System.Environment (getArgs, getProgName)
import System.Mem.StableName
import System.Random (randomRIO)
@@ -84,7 +62,7 @@
fromPath :: (?vs :: ViewSettings, ?graph :: Graph) => Path -> Rotation
fromPath path@(Path node (Conn _ dir _ : _)) = fromMaybe (Rotation node 0) $ do
let c = conns node dir
- i <- Data.List.elemIndex path c
+ i <- List.elemIndex path c
return $ Rotation node (i - min (length c `div` 2) (maxCenter ?vs))
fromPath (Path node []) = Rotation node 0
@@ -105,7 +83,7 @@
conns node dir = Cache.cached (Cache.byAddress ?graph, (node,dir))
connsCache result where
result = map (\(prop, node') -> Path node [Conn prop dir node']) sorted
- sorted = Data.List.sortBy cmp' list
+ sorted = List.sortBy cmp' list
list = [(p,n) | (p,s) <- Map.toList $ getConns ?graph node dir,
not (p `elem` hiddenProps ?vs), n <- Set.toList s]
cmp n1 n2 | p n1 && p n2 = compare (f n1) (f n2) where
@@ -155,7 +133,7 @@
cursor = flip (maybe mempty) selected $ \n ->
showAtKey n $ keyVob (PlainLiteral "CURSOR") $ rectBox mempty
space = changeSize (const (0, 20)) mempty
- vob = pad 30 $ vbox $ intersperse space $ f 3 node : map (f 2) children
+ vob = pad 30 $ vbox $ List.intersperse space $ f 3 node : map (f 2) children
@@ -260,7 +238,7 @@
f (Raptor.Uri s) = URI s
f (Raptor.Literal s) = PlainLiteral s
f (Raptor.Blank s) = URI $ "blank:" ++ s
- (raptorTriples, namespaces) <- if Data.List.isPrefixOf "http:" fileName
+ (raptorTriples, namespaces) <- if List.isPrefixOf "http:" fileName
then Raptor.uriToTriples fileName Nothing
else Raptor.filenameToTriples fileName Nothing
triples <- return $ map convert raptorTriples
diff -rN -u old-fenfire-hs/Main.hs new-fenfire-hs/Main.hs
--- old-fenfire-hs/Main.hs 2007-02-28 18:34:31.000000000 +0200
+++ new-fenfire-hs/Main.hs 2007-02-28 18:34:31.000000000 +0200
@@ -33,7 +33,7 @@
import Control.Monad.State
import Data.IORef
-import qualified Data.List
+import qualified Data.List as List
import qualified Data.Set as Set
import GtkFixes
@@ -92,7 +92,7 @@
_ -> return (fileName0, False)
checkSuffix :: FilePath -> FilePath
-checkSuffix s | Data.List.isSuffixOf ".turtle" s = s
+checkSuffix s | List.isSuffixOf ".turtle" s = s
| otherwise = s ++ ".turtle"
confirmSave :: (?vs :: ViewSettings, ?pw :: Window,
@@ -418,7 +418,7 @@
(g, rot) <- newGraph
newIORef $ newState g rot "" False
xs -> do
- let f x | Data.List.isPrefixOf "http:" x = return x
+ let f x | List.isPrefixOf "http:" x = return x
| otherwise = canonicalizePath x
fileName:fileNames <- mapM f xs
g' <- loadGraph fileName
@@ -477,7 +477,7 @@
forM_ (Set.toAscList $ fsProperties state) $ \prop ->
let ?graph = g in
New.listStoreAppend propList (prop, getTextOrURI prop)
- let activeIndex = Data.List.elemIndex (fsProperty state)
+ let activeIndex = List.elemIndex (fsProperty state)
(Set.toAscList $ fsProperties state)
maybe (return ()) (New.comboBoxSetActive combo) activeIndex
More information about the Fencommits
mailing list