diff --git a/Args.hs b/Args.hs index 43837a3..295a674 100644 --- a/Args.hs +++ b/Args.hs @@ -10,8 +10,8 @@ import Parse (parseError,onlyCheckMatchIdentifier) import Data.List import Data.Maybe -import State -import qualified Data.Set as Set +import Control.Monad.State -- needs cabal install --lib mtl +import qualified Data.Set as Set -- needs cabal install --lib containers argStr n tn = "arg" ++ show n ++ "t" ++ show tn letStr n tn = "larg" ++ show n ++ "t" ++ show tn diff --git a/Compile.hs b/Compile.hs index 968c9c1..d1de59d 100644 --- a/Compile.hs +++ b/Compile.hs @@ -4,8 +4,8 @@ module Compile(compile,padToEvenNibbles,charClassesDefs) where import Data.List(inits,intercalate,nub) import Data.Maybe -import State -import qualified Data.Set as Set +import Control.Monad.State -- needs cabal install --lib mtl +import qualified Data.Set as Set -- needs cabal install --lib containers import Polylib(coerceTo,fillAccums,join,truthy,curryN,rotateTuple,flattenTuples,fullVectorize,baseElem,cidim,promoteListRepeat,promoteList,coerce,minForType,maxForType,defaultValue) import Ops diff --git a/Expr.hs b/Expr.hs index e7cc5d5..e0b8c9a 100644 --- a/Expr.hs +++ b/Expr.hs @@ -1,12 +1,12 @@ module Expr where -import State +import Control.Monad.State -- needs cabal install --lib mtl import qualified Data.DList as DList -- needs cabal install --lib dlist import Types import Hs import SmartList -import qualified Data.Set as Set +import qualified Data.Set as Set -- needs cabal install --lib containers -- if change, change downloads.md diff --git a/FileQuoter.hs b/FileQuoter.hs index 34dcaac..22e42ad 100644 --- a/FileQuoter.hs +++ b/FileQuoter.hs @@ -1,7 +1,7 @@ module FileQuoter where -import Language.Haskell.TH -import Language.Haskell.TH.Quote +import Language.Haskell.TH -- needs cabal install --lib template-haskell +import Language.Haskell.TH.Quote -- needs cabal install --lib template-haskell -- Quasi-quoter for adding files as string constants -- Taken from https://stackoverflow.com/a/12717160/7588488 via Husk diff --git a/Header.hs b/Header.hs index 24b05ef..ec50508 100644 --- a/Header.hs +++ b/Header.hs @@ -11,13 +11,13 @@ import Data.List.Split -- needs cabal install --lib split import Text.Read (readMaybe) import Data.Function (fix) import System.IO -import qualified Data.Set as Set +import qualified Data.Set as Set -- needs cabal install --lib containers import System.Environment import Control.Monad (when) import GHC.IO.Encoding -- for Hash -import qualified Data.ByteString as B8 +import qualified Data.ByteString as B8 -- needs cabal install --lib bytestring import qualified Data.Digest.Murmur64 as Murmur -- needs cabal install --lib murmur-hash newli = myOrd '\n' diff --git a/Ops.hs b/Ops.hs index 1431806..d0019f4 100644 --- a/Ops.hs +++ b/Ops.hs @@ -9,7 +9,7 @@ import Args import Hs import OpsHelper -import State +import Control.Monad.State -- needs cabal install --lib mtl import Data.List(concat,sortOn) import Data.Maybe @@ -278,9 +278,7 @@ rawOps = [ -- hidden Example: / | `,~ - ~ $ -> 0 -- Test tuple: / |`.~1 0 \a b - a ~ b \a b a -> 1 -- Test: /,0 -> 0 - op(('/',10), [list, EOF], \[a1] -> do - modify $ \s -> s { pdImplicitArgUsed = True } - return $ "\\a -> if null a then "++defaultValue (elemT a1)++" else head a" ~> elemT a1), + op(('/',10), [list, EOF], \[a1] -> "\\a -> if null a then "++defaultValue (elemT a1)++" else head a" ~> elemT a1), -- Desc: foldr1 -- Example: /,3+@$ -> 6 diff --git a/Parse.hs b/Parse.hs index 9d402c7..a6f57c0 100644 --- a/Parse.hs +++ b/Parse.hs @@ -35,7 +35,7 @@ import Header (at,fromBase,toBase) import Data.Char import Numeric (showOct,showHex) import Data.Maybe (fromMaybe) -import State +import Control.Monad.State -- needs cabal install --lib mtl import Text.ParserCombinators.ReadP (gather, readP_to_S) import Text.Read.Lex as Lex (readDecP, readHexP, lex, Lexeme(String), Lexeme(Char)) diff --git a/nibbles.hs b/nibbles.hs index 74e870f..d929809 100644 --- a/nibbles.hs +++ b/nibbles.hs @@ -5,8 +5,8 @@ import Data.List(isPrefixOf,partition,elemIndex) import System.Environment import System.IO import GHC.IO.Encoding -import System.FilePath -import System.Process +import System.FilePath -- needs cabal install --lib filepath +import System.Process -- needs cabal install --lib process import System.Exit import Control.Monad import Data.List(intercalate) diff --git a/test/test.hs b/test/test.hs index 7857b12..b2c99e2 100644 --- a/test/test.hs +++ b/test/test.hs @@ -5,7 +5,7 @@ import Expr import Types import Polylib -import System.Process +import System.Process -- needs cabal install --lib process import System.IO import Control.Monad (when) import Data.Maybe diff --git a/web/quickref.hs b/web/quickref.hs index 18806c4..aa28ec8 100644 --- a/web/quickref.hs +++ b/web/quickref.hs @@ -7,7 +7,7 @@ import Text.Blaze.Html5 as H hiding (main, map) import Text.Blaze.Html5.Attributes as A import Control.Monad (forM_, mapM_) import Text.Blaze.Html.Renderer.Utf8 (renderHtml) -import qualified Data.ByteString.Lazy.Char8 as Char8 +import qualified Data.ByteString.Lazy.Char8 as Char8 -- needs cabal install --lib bytestring import Data.List (intercalate) import Ops