Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanphilippe.bernardy@gmail.com committed Oct 9, 2008
1 parent 33cd952 commit e3a3e1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Data/Trie.hs
Expand Up @@ -13,9 +13,10 @@ empty = Trie False Map.empty

-- | Insert a new string into the trie.
insert :: String -> Trie -> Trie
insert [] (Trie b m) = Trie True m
insert [] (Trie _ m) = Trie True m
insert (x:xs) (Trie b m) = Trie b $ Map.alter (maybe (Just $ fromString xs) (Just . insert xs)) x m

fromString :: String -> Trie
fromString = foldr (\x xs -> Trie False (Map.singleton x xs)) (Trie True Map.empty)

-- | Take a list of String and compress it into a Trie
Expand Down
2 changes: 1 addition & 1 deletion Yi/Syntax/OnlineTree.hs
Expand Up @@ -13,7 +13,7 @@ data Tree a = Node a (Tree a) (Tree a)

instance Traversable Tree where
traverse f (Node x l r) = Node <$> f x <*> traverse f l <*> traverse f r
traverse f Leaf = pure Leaf
traverse _ Leaf = pure Leaf

instance Foldable Tree where
foldMap = foldMapDefault
Expand Down
2 changes: 0 additions & 2 deletions Yi/Tag.hs
Expand Up @@ -19,8 +19,6 @@ import Data.List (isPrefixOf)
import System.FilePath (takeFileName, takeDirectory, FilePath, (</>))
import System.FriendlyPath
import Data.Map (Map, fromList, lookup, keys)
import Control.Monad (liftM)


import qualified Data.Trie as Trie

Expand Down

0 comments on commit e3a3e1c

Please sign in to comment.