Closed lilyanatia closed 9 years ago
diff --git a/lib/Kitten/Tokenize.hs b/lib/Kitten/Tokenize.hs
index 4016e67..870821b 100644
--- a/lib/Kitten/Tokenize.hs
+++ b/lib/Kitten/Tokenize.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE FlexibleContexts #-}
module Kitten.Tokenize
( tokenize
@@ -186,7 +187,7 @@ silence = skipMany $ comment <|> whitespace
pos <- getPosition
putState $ sourceColumn pos
- nonNewline = void $ Parsec.satisfy (`elem` "\t\v\f\r ")
+ nonNewline = void $ Parsec.satisfy (`elem` ("\t\v\f\r " :: String))
comment = single <|> multi <?> "comment"
diff --git a/src/Interactive.hs b/src/Interactive.hs
index 21bd2cd..0d509f0 100644
--- a/src/Interactive.hs
+++ b/src/Interactive.hs
@@ -139,7 +139,7 @@ matched :: String -> Bool
matched = go Outside (0::Int)
where
go q n ('\\':x:xs)
- | x `elem` "'\"" = go q n xs
+ | x `elem` ("'\"" :: String) = go q n xs
| otherwise = go q n xs
go q n ('"':xs) = go (case q of Inside -> Outside; Outside -> Inside) n xs
go Inside n (_:xs) = go Inside n xs
@@ -149,8 +149,8 @@ matched = go Outside (0::Int)
| isClose x = n <= 0 || go Outside (pred n) xs
| otherwise = go Outside n xs
go Outside n [] = n == 0
- isOpen = (`elem` "([{")
- isClose = (`elem` "}])")
+ isOpen = (`elem` ("([{" :: String))
+ isClose = (`elem` ("}])" :: String))
continue :: Int -> Text -> Input ()
continue offset acc = do
Thanks! I’ll get this in later today. Right now I’m working on integrating a new version of the typechecker into the existing compiler, so I haven’t been housekeeping.
later today
Oops. Fixed in 1da983be65b87c3356a528dd25bdb5da5fd05420.
building fails with multiple errors. adding
{-# LANGUAGE FlexibleContexts #-}
to lib/Kitten/Tokenize.hs and changingelem "..."
toelem ("..." :: String)
in a few places (as described at https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10) seems to fix it.