Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Args.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Expr.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions FileQuoter.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Header.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 2 additions & 4 deletions Ops.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original piece of code led to a number of ambiguity errors. With this change, the sample tests will certainly also produce the desired results.


-- Desc: foldr1
-- Example: /,3+@$ -> 6
Expand Down
2 changes: 1 addition & 1 deletion Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions nibbles.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web/quickref.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down