conversations
listlengths
3
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Switch from UTCTime to ZonedTime\n" }, { "from": "human", "value": "{-# LANGUAGE ScopedTypeVariables #-}\n{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE RecordWildCards #-}\n\nmodule Types\n ( ShkoloUrl\n , ArticleMetaData(..)\n , parseTime'\n ) where\n\ni...
haskell
chosen
[ { "from": "system", "value": "Add help texts for subcommands\n" }, { "from": "human", "value": "module Main where\n\nimport Build (build)\n\nimport Options.Applicative (\n ParserInfo, Parser, execParser,\n subparser, command, info,\n progDesc, header, metavar,\n many, argument, str, auto)\n\...
haskell
chosen
[ { "from": "system", "value": "Make sure all the JSON modules get compiled\n" }, { "from": "human", "value": "{-# LANGUAGE CPP #-}\n\nmodule Main(main) where\n\nimport Control.Monad\nimport Data.Maybe\nimport System.Console.CmdArgs\nimport System.Environment\nimport System.IO\n\nimport Arguments\...
haskell
chosen
[ { "from": "system", "value": "Add CLI arg parsing skeleton\n\n -- The arg parsing library used is GetOpts. The program compiles\n and outputs that it has zero arguments. The code was borrowed\n from http://leiffrenzel.de/papers/commandline-options-in-haskell.html\n" }, { "from": "human",...
haskell
chosen
[ { "from": "system", "value": "Implement Allocate, Marshal, and encode for Data.\n" }, { "from": "human", "value": "{-# LANGUAGE DataKinds #-}\n{-# LANGUAGE MultiParamTypeClasses #-}\n{-# LANGUAGE TypeFamilies #-}\n{-# LANGUAGE UndecidableInstances #-}\nmodule Capnp.New.Basi...
haskell
chosen
[ { "from": "system", "value": "Test for osx page size\n" }, { "from": "human", "value": "module JournalFileTests where\n\nimport Test.Tasty\nimport Test.Tasty.Hspec\n\nspecTests :: IO TestTree\nspecTests = testGroup \"journal file tests\" <$> sequence [temp2]\n\ntemp2 :: IO Te...
haskell
chosen
[ { "from": "system", "value": "Change project name from Haddock-GHC to Haddock\n" }, { "from": "human", "value": "--\n-- Haddock - A Haskell Documentation Tool\n--\n-- (c) Simon Marlow 2003\n--\n\nmodule Haddock.Version ( \n\tprojectName, projectVersion, projectUrl\n ) where\n\nimport Paths_had...
haskell
chosen
[ { "from": "system", "value": "Introduce ToPosition and ToCount type classes\n" }, { "from": "human", "value": "{-# LANGUAGE GeneralizedNewtypeDeriving #-}\n\nmodule HaskellWorks.Data.Positioning\n ( Count(..)\n , Position(..)\n , lastPositionOf\n , toCount\n , toPosition\n ) where\n\nimpor...
haskell
chosen
[ { "from": "system", "value": "Make 'cabal test' run in a nix-shell\n" }, { "from": "human", "value": "module Data.MediaBus.Conduit.FrameRingSpec (spec) where\n\nimport Conduit\nimport Control.Monad\nimport Data.Conduit.List\nimport Data.MediaBus\nimport Data.Proxy\nimport Data.Word\nimport Debug...
haskell
chosen
[ { "from": "system", "value": "Add mode for querying multiple times\n" }, { "from": "human", "value": "{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}\nmodule Main where\n\nimport Data.Aeson\nimport System.Console.CmdArgs.Implicit\nimport qualified Data.ByteString.Lazy.Char8 as B\nimport Str...
haskell
chosen
[ { "from": "system", "value": "Move code to data type\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\nimport Web.Scotty as S\nimport Network.Wai.Middleware.RequestLogger\nimport Network.Wai.Middleware.Static\nimport System.Environment\nimport System.Process\nimport Control....
haskell
chosen
[ { "from": "system", "value": "Set the post condition after canonicalization\n" }, { "from": "human", "value": "module HTTPMethodInvalid (canonicalizeHTTPMethods, limitHTTPMethods) where\n\nimport qualified Network.Wai as Wai\nimport qualified Network.HTTP.Types as HTTP\nimport qualified Network....
haskell
chosen
[ { "from": "system", "value": "Add header to Haddock docs.\n" }, { "from": "human", "value": "{-# LANGUAGE FlexibleContexts #-}\n\nmodule Data.Iteratee (\n module Data.Iteratee.Base,\n module Data.Iteratee.Binary,\n fileDriverRandom\n)\n\nwhere\n\nimport Data.Iteratee.Base\nimport Data.Iterate...
haskell
chosen
[ { "from": "system", "value": "Add preprocessing for PING message type\n" }, { "from": "human", "value": "module Main where\n\nimport Client\nimport Control.Exception (bracket)\nimport Control.Monad (forever, unless)\nimport System.IO\nimport qualified Message as M\n\nprocessNetworkLoop :: Handle...
haskell
chosen
[ { "from": "system", "value": "Rename type alias for clarity. Use many1 for accesses.\n" }, { "from": "human", "value": "module Parser where\n\nimport Text.Parsec as P\nimport Control.Applicative \n\ntype Key = String\ntype VarName = String\ndata PropAccessPath = PropAccessPath VarName [Key] der...
haskell
chosen
[ { "from": "system", "value": "Correct errors in day 1\n" }, { "from": "human", "value": "module Day1 where\n\nimport Data.List (foldl')\n\nmove :: Char -> Integer -> Integer\nmove '(' = succ\nmove ')' = pred\n\nfloor :: String -> Integer\nfloor = foldl' (flip move) 0\n\nbasement :: String -> Int...
haskell
chosen
[ { "from": "system", "value": "Adjust main to new parser" }, { "from": "human", "value": "import System.Environment\n\nimport Text.Parsec (parse)\n\nimport Uroboro.Parser (library, expression)\n\nparseFromFile p fname = do\n input <- readFile fname\n return $ parse p fname input\n\nmain :: ...
haskell
chosen
[ { "from": "system", "value": "Embed variance in the distribution.\n" }, { "from": "human", "value": "module Rand\n (\n Dist(..),\n Gaussian(..),\n gaussianBySeed,\n ) where\n\nimport System.Random\n\nclass Dist d where\n rand :: Double -> Double -> d -> (Double, d)\n\ndata Gaussian =...
haskell
chosen
[ { "from": "system", "value": "Check correct directory deletion behaviour for simple project\n\n- The integration test ensures the correct directories are present,\nthen deleted, for a project with only one package, not in a\nsubdirectory.\n" }, { "from": "human", "value": "import StackTest\nimp...
haskell
chosen
[ { "from": "system", "value": "Handle exceptions from IO; add comment.\n\n`createDirectoryIfMissing` and `hPrint` can throw IO exception; ignore\nand continue if any of that happens.\n\nSilently failing here may not be a good idea (monit the monitoring app\nmay go haywire), but what this is function does is ...
haskell
chosen
[ { "from": "system", "value": "Modify `printList` to be more readable\n" }, { "from": "human", "value": "import System.Environment\nimport Parser\nimport Eval\nimport Expr\n\nmain :: IO ()\nmain = getArgs >>= handleArgs . getFirst\n where getFirst args = if null args then \"\" else head args\n ...
haskell
chosen
[ { "from": "system", "value": "Move summary description out of summary function\n" }, { "from": "human", "value": "import System.Environment (getArgs)\n\nimport System.Random\n\nimport Data.List\n\ntype Count a = (Int, a)\ntype FrequencyCount a = [Count a]\n\nmain :: IO ()\nmain = do\n [fileName...
haskell
chosen
[ { "from": "system", "value": "Create initial main function structure\n" }, { "from": "human", "value": "-- Main.hs\n-- by Alexandre Medeiros <alexandre.n.medeiros _at_ gmail.com>\n--\n-- Main file for ECS713 Functional Programming Project\n\n\n-- Main function\nmain :: IO ()\nmain = putStrLn \"...
haskell
chosen
[ { "from": "system", "value": "Make the orderOnly test robust to 1s filetime delay\n" }, { "from": "human", "value": "\nmodule Examples.Test.OrderOnly(main) where\n\nimport Development.Shake\nimport Examples.Util\n\n\nmain = shaken test $ \\args obj -> do\n want $ map obj args\n\n obj \"bar...
haskell
chosen
[ { "from": "system", "value": "Add `hoistServerWithContext` implementation for `WalletRequestParams`\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-orphans #-}\n{-# OPTIONS_GHC -fno-warn-missing-methods #-}\n\nmodule Cardano.Wallet.API.V1.Parameters where\n\nimport Univer...
haskell
chosen
[ { "from": "system", "value": "Remove unused import of unboxed vectors.\n\nand change the BV qualified import to just V; more clear esp. since we\nnow have B for ByteString.\n" }, { "from": "human", "value": "module Data.CapNProto.Untyped where\n\nimport qualified Data.ByteString as B\nimport Dat...
haskell
chosen
[ { "from": "system", "value": "Use existing target input instead of made up 'src'\n" }, { "from": "human", "value": "{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}\nmodule Oracles.ArgsHash (checkArgsHash, argsHashOracle) where\n\nimport Expression\nimport Settings\nimport Setting...
haskell
chosen
[ { "from": "system", "value": "utils: Implement functions to work with atoms\n" }, { "from": "human", "value": "module Utils\n (\n listOfAtoms\n ) where\n\nimport Logic\n\nlistOfAtoms :: (Formula a)-> [a]\nlistOfAtoms formula = overAtoms (\\x y -> x:y) formula []\n" }, { "from": "gpt",...
haskell
chosen
[ { "from": "system", "value": "Add a test for the signature parser\n" }, { "from": "human", "value": "\nmodule Dir.Everything(module Data.List.Extra, module Dir.Everything) where\n\nimport Data.List.Extra\n\nusedFunction1 = 12 :: Int\nusedFunction2 = Other\nunusedFunction = 12 :: Int\n(=~=) a b =...
haskell
chosen
[ { "from": "system", "value": "Generalize spotify actions and add spotifyStop\n" }, { "from": "human", "value": "module Spotify where\n\nimport Imports\n\nspotifyTogglePlay :: XX ()\nspotifyTogglePlay = spotify \"PlayPause\"\n\nspotifyNext :: XX ()\nspotifyNext = spotify \"Next\"\n\nspotifyPrevio...
haskell
chosen
[ { "from": "system", "value": "Use readFile from ByteString to read binary files\n\nReading a file that might contain PNG data using `System.IO.readFile`\ncauses `hGetContents: invalid argument (invalid byte sequence)` due to\nfile contents not being valid text under the current system locale.\nThis fixes lo...
haskell
chosen
[ { "from": "system", "value": "Add more details to the downloading, upon mailing list suggestions" }, { "from": "human", "value": "-- Original version by Alistair Bayley\n-- Taken from Haskell-Cafe mailing list\n-- \"Simple HTTP lib for Windows?\", 18 Jan 2007\n\n-- Does not seem very reliable, d...
haskell
chosen
[ { "from": "system", "value": "Move SCC pragmas next to their declarations\n" }, { "from": "human", "value": "\nmodule CUDA (hasCUDA, loadCUDAArray, synchronizeCUDA, getCudaArchitecture) where\n\nimport Data.Int\nimport Foreign.Ptr\n#ifdef DEX_CUDA\nimport Foreign.C\n#else\n#endif\n\nhasCUDA :: B...
haskell
chosen
[ { "from": "system", "value": "Add objectParse to the option of parsers\n" }, { "from": "human", "value": "module Text.Karver where\n\nimport Text.Karver.Types\nimport Text.Karver.Parse\n\nimport Control.Applicative\nimport Data.Attoparsec.Text\nimport Data.HashMap.Strict (HashMap)\nimport qualif...
haskell
chosen
[ { "from": "system", "value": "Fix stray import breaking build\n" }, { "from": "human", "value": "module Main where\n\nimport Control.Monad.Logger (runStdoutLoggingT)\nimport Database.Persist.Postgresql (createPostgresqlPool)\nimport Network.Wai.Handler.Warp (run)\nimport Network.Wai.Middleware.R...
haskell
chosen
[ { "from": "system", "value": "Use jsonb for postgres, not json\n" }, { "from": "human", "value": "module Eventful.Store.Sql.JSONString\n ( JSONString\n ) where\n\nimport Data.Aeson\nimport Data.Text.Lazy (Text)\nimport qualified Data.Text.Lazy.Encoding as TLE\nimport Database.Persist\nimport D...
haskell
chosen
[ { "from": "system", "value": "Make Type an instance of Show\n" }, { "from": "human", "value": "module Statsd (\n StatsdClient,\n client,\n \n increment,\n decrement,\n count,\n gauge,\n timing,\n histogram,\n) where\n \ntype Stat = String\n \ndata StatsdClient = StatsdClient { host :: S...
haskell
chosen
[ { "from": "system", "value": "Add more tests (including some that fail)\n" }, { "from": "human", "value": "{-# LANGUAGE\nOverloadedStrings\n #-}\n\nmodule Main (main) where\n\n\n-- Testing\nimport Test.Tasty\nimport Test.Tasty.HUnit\n-- Text\nimport Text.Printf\nimport qualified Data.Text as T\...
haskell
chosen
[ { "from": "system", "value": "Make sure Travis runs the refactor tests\n" }, { "from": "human", "value": "\nimport System.Time.Extra\nimport System.Process.Extra\n\n\nmain :: IO ()\nmain = do\n system_ \"hlint --test +RTS -K512K\"\n (time,_) <- duration $ system_ \"hlint src --with-group=e...
haskell
chosen
[ { "from": "system", "value": "Add -p option to dump parse tree\n" }, { "from": "human", "value": "module Main where\n\nimport Control.Monad.Except (runExceptT)\nimport Data.Functor.Identity (runIdentity)\nimport Language.Sexp\nimport Parse (parseExp)\nimport qualified Semant\nimport System.Envir...
haskell
chosen
[ { "from": "system", "value": "Enable Cabal flags llvm, gmp, and libffi in Idris.\n\nCc: da39a3ee5e6b4b0d3255bfef95601890afd80709@shlevy\n" }, { "from": "human", "value": "module Cabal2Nix.Flags ( configureCabalFlags ) where\n\nimport Distribution.Package\nimport Distribution.PackageDescription\n...
haskell
chosen
[ { "from": "system", "value": "Fix race in parallel twee.\n" }, { "from": "human", "value": "{-# LANGUAGE ForeignFunctionInterface #-}\nimport System.IO\nimport Control.Concurrent.Async hiding (link)\nimport System.Posix\nimport System.Environment\nimport qualified SequentialMain\nimport Control....
haskell
chosen
[ { "from": "system", "value": "Make the read instance expect lowercase\n" }, { "from": "human", "value": "{-# LANGUAGE GeneralizedNewtypeDeriving #-}\n\nmodule Configuration (\n Environment(..),\n getEnvironment,\n Config(..),\n getConfig,\n\n ConfigM(..),\n\n getPort,\n) where\n\nimport qu...
haskell
chosen
[ { "from": "system", "value": "Add support for hexadecimal integer literals" }, { "from": "human", "value": "module Parse.Literal (literal) where\n\nimport Control.Applicative ((<$>))\nimport Text.Parsec hiding (newline,spaces)\nimport Parse.Helpers (IParser, chr, str)\nimport qualified AST.Liter...
haskell
chosen
[ { "from": "system", "value": "Make ListTok more clear via type alias\n" }, { "from": "human", "value": "module Text.Karver.Types where\n\nimport Data.Text (Text)\nimport Data.HashMap.Strict\nimport Data.Vector\n\ntype ObjectName = Text\ntype Key = Text\n\ndata Tokens = LiteralTok Text\n...
haskell
chosen
[ { "from": "system", "value": "Fix some weird unicode stuff\n" }, { "from": "human", "value": "{-# LANGUAGE DeriveDataTypeable #-}\n-- | The types we use\n-- Copyright Neil Mitchell 2014.\nmodule Language.Haskell.Ghcid.Types where\n\nimport Data.Typeable\nimport Control.Exception.Base (Exception)...
haskell
chosen
[ { "from": "system", "value": "Update to match new Module type\n" }, { "from": "human", "value": "module Build.Print where\n\nimport qualified Data.Map as Map\nimport qualified Data.List as List\nimport qualified SourceSyntax.Module as M\nimport qualified SourceSyntax.PrettyPrint as Pretty\nimpor...
haskell
chosen
[ { "from": "system", "value": "Modify problem 80 to polymorphic type\n" }, { "from": "human", "value": "{-# LANGUAGE UnicodeSyntax #-}\n\nimport Prelude.Unicode\n\ntype Nodes = [Char]\n\ntype Edges = [(Char, Char)]\n\ndata Graph = Graph Nodes Edges deriving (Show, Eq)\n\ntype Adj = [(Char, Nodes)...
haskell
chosen
[ { "from": "system", "value": "Use .oeis-data instead of .hops to store stripped\n\nThe reason for this is for 'hops' and 'sloane' to use a common\ndirectory and thereby not download striped.gz more times than\nnecessary.\n" }, { "from": "human", "value": "-- |\n-- Copyright : Anders Claesson 2...
haskell
chosen
[ { "from": "system", "value": "Remove Splittable class (a vestige of linear implicit parameters)" }, { "from": "human", "value": "-----------------------------------------------------------------------------\n-- |\n-- Module : GHC.Exts\n-- Copyright : (c) The University of Glasgow 2002\n...
haskell
chosen
[ { "from": "system", "value": "Fix haddock link EvilBazaar -> BazaarT\n" }, { "from": "human", "value": "{-# LANGUAGE CPP #-}\n{-# LANGUAGE KindSignatures #-}\n#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704\n{-# LANGUAGE Unsafe #-}\n#endif\n----------------------------------------...
haskell
chosen
[ { "from": "system", "value": "Add type signature for view\n" }, { "from": "human", "value": "{-|\nModule : View\nDescription : Local definition of view\nCopyright : (c) Eric Mertens, 2016\nLicense : ISC\nMaintainer : emertens@gmail.com\n\n-}\nmodule View (view) where\n\nimport Data.F...
haskell
chosen
[ { "from": "system", "value": "Improve handling of user login\n" }, { "from": "human", "value": "module PaneInteractionServer\n ( interactions\n ) where\n\nimport Control.Monad (unless)\nimport Network\nimport Data.List (span)\nimport System.IO\nimport Parser\nimport Base\nimport Nettle.OpenFlo...
haskell
chosen
[ { "from": "system", "value": "Add haddock comments to give example of database multiplexer.\n" }, { "from": "human", "value": "module PostgRESTWS.HasqlBroadcast\n ( newHasqlBroadcaster\n -- re-export\n , acquire\n , relayMessages\n , relayMessagesForever\n ) where\n\nimport Protolude\n\nim...
haskell
chosen
[ { "from": "system", "value": "Remove time from app state\n\nset in display function now\n" }, { "from": "human", "value": "module AppTypes where\n\nimport Data.Time.Clock.POSIX (getPOSIXTime)\n\nimport Language.LanguageAst ( Block(..) )\n\ndata AppState = AppState {\n time :: Double,\n validAs...
haskell
chosen
[ { "from": "system", "value": "Make qsort actually work in parallel" }, { "from": "human", "value": "{-# LANGUAGE PArr #-}\n{-# OPTIONS -fvectorise #-}\n{-# OPTIONS -fno-spec-constr-count #-}\nmodule QSortVect (qsortVect) where\n\nimport Data.Array.Parallel.Prelude\nimport Data.Array.Parallel.Pre...
haskell
chosen
[ { "from": "system", "value": "5: Use \"parse\" to extract log structure\n" }, { "from": "human", "value": "main = do\n logs <- readFile \"serverlogs.log\"\n putStrLn $ head $ lines logs\n" }, { "from": "gpt", "value": "import Control.Applicative ((<$>))\n\nimport Log.LogAnalysis\n\...
haskell
chosen
[ { "from": "system", "value": "Use -h and -v instead of -? and -V\n" }, { "from": "human", "value": "{-# LANGUAGE DeriveDataTypeable #-}\nmodule Main (main) where\n\nimport qualified Bot\nimport Control.Exception\nimport System.Console.CmdArgs\n\ndata Dikunt = Dikunt\n { server :: String\n ...
haskell
chosen
[ { "from": "system", "value": "Add -ignore-dot-ghci to tests, otherwise some fail with erroring .ghci\n" }, { "from": "human", "value": "-- | Test the high level library API\nmodule Test.API(apiTests) where\n\nimport Test.Tasty\nimport Test.Tasty.HUnit\nimport System.FilePath\nimport System.IO.Ex...
haskell
chosen
[ { "from": "system", "value": "Add note about breaking GO FAST!\n" }, { "from": "human", "value": "-- | Press the spacebar repeatedly, really really fast.\n--\n-- 1. Go to <http://mixermike622.deviantart.com/art/GO-FAST-287788805>\n-- 2. Run this program\n-- 3. ???\n-- 4. Profit\n\nimport Control...
haskell
chosen
[ { "from": "system", "value": "Add DataKinds flag to test\n" }, { "from": "human", "value": "{-# LANGUAGE PolyKinds #-}\n\nmodule T5798 where\n\ndata Proxy t = ProxyC\n\ntest :: Proxy '[Int, Bool]\ntest = ProxyC\n" }, { "from": "gpt", "value": "{-# LANGUAGE PolyKinds, DataKinds #-}\n\...
haskell
chosen
[ { "from": "system", "value": "Implement pretty print for ReleaseGroup\n" }, { "from": "human", "value": "-- Types.hs\n-- by alemedeiros <alexandre.n.medeiros _at_ gmail.com>\n--\n-- Musicbrainz interface module for musicdb\n--\n-- Datatypes definition submodule\n\n-- |Contains all the internal ...
haskell
chosen
[ { "from": "system", "value": "Change the downloading code so its more reliable, using a Connection message" }, { "from": "human", "value": "-- Original version by Alistair Bayley\n-- Taken from Haskell-Cafe mailing list\n-- \"Simple HTTP lib for Windows?\", 18 Jan 2007\n\n-- Does not seem very r...
haskell
chosen
[ { "from": "system", "value": "Resolve and sort dependencies locally during link time.\n\njsplink now emits functions depth first, starting with Main.main. This has\nthe consequence of eliminating any unused functions, as well as sorting the\nfunctions in dependency order.\n\njsplink only deals with a single...
haskell
chosen
[ { "from": "system", "value": "Use lookupGetParam instead of list lookup\n" }, { "from": "human", "value": "{-# LANGUAGE TemplateHaskell\n , NamedFieldPuns\n #-}\nmodule Handler.Search\n ( getSearchR\n ) where\n\nimport Import\nimport Data.List as L\nimport Data.Text as T\...
haskell
chosen
[ { "from": "system", "value": "Update sparkle to build with distributed-closure-0.4.0.\n" }, { "from": "human", "value": "{-# LANGUAGE DataKinds #-}\n{-# LANGUAGE FlexibleContexts #-}\n{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE StaticPointers #-}\n{-# LAN...
haskell
chosen
[ { "from": "system", "value": "Make genTest use () return value, it's more usable that way." }, { "from": "human", "value": "-----------------------------------------------------------------------------\n-- |\n-- Module : Data.SBV.BitVectors.GenTest\n-- Copyright : (c) Levent Erkok\n-- L...
haskell
chosen
[ { "from": "system", "value": "Fix the test suite build\n" }, { "from": "human", "value": "{-# LANGUAGE GeneralizedNewtypeDeriving #-}\n{-# LANGUAGE StandaloneDeriving #-}\n{-# OPTIONS_GHC -fno-warn-orphans #-}\n\n{-|\nModule: Instances.Options\nCopyright: (C) 2014-2017 Ryan Scott\...
haskell
chosen
[ { "from": "system", "value": "Add NOINLINE to change fewer things when the data files change\n" }, { "from": "human", "value": "{-# LANGUAGE TemplateHaskell #-}\n\nmodule EmbedData\n ( hlintYaml,\n defaultYaml,\n reportTemplate,\n )\nwhere\n\nimport Data.ByteString.UTF8\nimport Data.File...
haskell
chosen
[ { "from": "system", "value": "Add writeFile_ to the list of derived functions\n" }, { "from": "human", "value": "\nmodule Development.Shake.Derived where\n\nimport Control.Monad\nimport Control.Monad.IO.Class\nimport System.Cmd\nimport System.Exit\n\nimport Development.Shake.Core\nimport Develop...
haskell
chosen
[ { "from": "system", "value": "Fix description for a test\n" }, { "from": "human", "value": "module RunSpec (main, spec) where\n\nimport Test.Hspec.ShouldBe\nimport System.Exit\n\nimport Run\n\nmain :: IO ()\nmain = hspecX spec\n\nspec :: Specs\nspec = do\n describe...
haskell
chosen
[ { "from": "system", "value": "Add findKnownPackage for finding packages by name.\n" }, { "from": "human", "value": "module Settings.Packages (\n module Settings.Default,\n packages, getPackages, knownPackages\n ) where\n\nimport Package\nimport Switches\nimport Expression\nimport Oracle...
haskell
chosen
[ { "from": "system", "value": "Add Value type to accommodate object identities\n" }, { "from": "human", "value": "module Text.Karver.Types where\n\nimport Data.Text (Text)\n\ntype Key = Text\n\ndata Tokens = Literal Text\n | Identity Text\n | Object Text Key\n ...
haskell
chosen
[ { "from": "system", "value": "Remove liftMaybe function for GHC8 compatibility\n\nLooks like some change on GHC8 changed ImpredicativeTypes\nbehavior and it doesn't accept liftMaybe function without cluttering\nit with type annotations.\n" }, { "from": "human", "value": "-- |\n-- Attoparsec pars...
haskell
chosen
[ { "from": "system", "value": "Fix wcwidth import and match safeWcswidth to its documented behavior\n\nPreviously vty_mk_wcwidth was being imported with the wrong type causing\nthe -1 return value to be mapped to the wrong Int value.\n\nAdditionally safeWcswidth was using the unsafe character width function\...
haskell
chosen
[ { "from": "system", "value": "Add a few more exports\n" }, { "from": "human", "value": "{-\n\nThis file is part of the package byline. It is subject to the license\nterms in the LICENSE file found in the top-level directory of this\ndistribution and at git://pmade.com/byline/LICENSE. No part of ...
haskell
chosen
[ { "from": "system", "value": "Use dashes-as-spaces instead of camelCase in instance configs.\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n-- | Parse instances from a YAML file.\nmodule MCCtl.Config.Parser where\nimport Control.Applicative\nimport qualified Data.ByteStri...
haskell
chosen
[ { "from": "system", "value": "Make compilationOnly optional, default to False\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings, Trustworthy #-}\n-- |\n-- Maintainer : Ricky Elrod <ricky@elrod.me>\n-- Stability : probably somewhat stable\n--\n-- Handles incoming requests (usua...
haskell
chosen
[ { "from": "system", "value": "Declare imports as unsafe (they are not calling back)\n" }, { "from": "human", "value": "{-# LANGUAGE ForeignFunctionInterface #-}\nmodule Allegro.C (al_init) where\n\nimport Foreign\nimport Foreign.C.Types\n\n\n#include <allegro5/allegro.h>\n\nal_init :: IO Bool\na...
haskell
chosen
[ { "from": "system", "value": "Fix alignment for fall back case\n" }, { "from": "human", "value": "module Text.Karver where\n\nimport Text.Karver.Types\nimport Text.Karver.Parse\n\nimport Control.Applicative\nimport Data.Attoparsec.Text\nimport Data.HashMap.Strict (HashMap)\nimport qualified Data...
haskell
chosen
[ { "from": "system", "value": "Change `forkNamed` to use `forkFinally` instead\n" }, { "from": "human", "value": "module Hans.Threads where\n\nimport Control.Concurrent (forkIO,ThreadId)\nimport Control.Exception (catch,SomeException,fromException,AsyncException(..))\n\n\nforkNamed :: String -> I...
haskell
chosen
[ { "from": "system", "value": "Use (=<<) instead of flip (>>=)\n" }, { "from": "human", "value": "-- | This module defines the FunctorMaybe class, which extends Functors with the\n-- ability to delete values.\nmodule Reflex.FunctorMaybe\n ( FunctorMaybe (..)\n ) where\n\nimport Data.Maybe\n\n--...
haskell
chosen
[ { "from": "system", "value": "Add benchmarks for number of selects\n" }, { "from": "human", "value": "import Text.HTML.Scalpel\n\nimport Criterion.Main (bgroup, bench, defaultMain, nf)\nimport qualified Data.Text as T\nimport qualified Data.Text.IO as T\n\n\nmain :: IO ()\nmain = do\n nested1...
haskell
chosen
[ { "from": "system", "value": "Make sure <$> is in scope\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-orphans #-}\n\n{-|\nModule: Instances.Data.Dynamic\nCopyright: (C) 2014-2015 Ryan Scott\nLicense: BSD-style (see the file LICENSE)\nMaintainer: Ryan Scott\nStability: ...
haskell
chosen
[ { "from": "system", "value": "Drop redundant clean up after ghc-cabal\n\nSee #113\n" }, { "from": "human", "value": "module Rules.Clean (cleanRules) where\n\nimport Base\nimport Package\nimport Settings\nimport Settings.Path\nimport Stage\nimport UserSettings\nimport Util\n\ncleanRules :: Rules ...
haskell
chosen
[ { "from": "system", "value": "Return 404 for non existent games\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-orphans #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE QuasiQuotes #-}\n{-# LANGUAGE TemplateHaskell #-}\n{-# LANGUAGE TypeFamilies #-}\n\nmodule Handl...
haskell
chosen
[ { "from": "system", "value": "Update the title of nomura laboratory's homepage\n" }, { "from": "human", "value": "{-# LANGUAGE TupleSections, OverloadedStrings #-}\nmodule Handler.Home where\n\nimport Import\n\n-- This is a handler function for the GET request method on the HomeR\n-- resource pa...
haskell
chosen
[ { "from": "system", "value": "Fix displayExceoption not being available on older GHCs\n" }, { "from": "human", "value": "{-# LANGUAGE ScopedTypeVariables #-}\n\nmodule CabalHelper.Compiletime.Log where\n\nimport Control.Monad\nimport Control.Monad.IO.Class\nimport Control.Exception as E\nimport ...
haskell
chosen
[ { "from": "system", "value": "Increase the base size more quickly\n" }, { "from": "human", "value": "{-# LANGUAGE RecordWildCards #-}\n\nmodule General.Ids(\n Ids, Id,\n empty, insert, lookup\n ) where\n\nimport Data.IORef.Extra\nimport Data.Primitive.Array\nimport General.Intern(Id(..)...
haskell
chosen
[ { "from": "system", "value": "Add a notion for (F a -> b).\n" }, { "from": "human", "value": "module PTS.Algebra\r\n ( Algebra\r\n , fold\r\n , allvars\r\n , allvarsAlgebra\r\n ) where\r\n\r\nimport Data.Set (Set)\r\nimport qualified Data.Set as Set\r\n\r\nimport PTS.AST\r\n\r\n-- algebras\...
haskell
chosen
[ { "from": "system", "value": "Remove Shake database on clean.\n\nSee #131. [skip ci]\n" }, { "from": "human", "value": "module Rules.Clean (cleanRules) where\n\nimport Base\nimport Package\nimport Rules.Generate\nimport Settings.Packages\nimport Settings.Paths\nimport Settings.User\nimport Stage...
haskell
chosen
[ { "from": "system", "value": "Add a test using the RawSql instance for a non-composite primary key\n" }, { "from": "human", "value": "{-# LANGUAGE QuasiQuotes, TemplateHaskell, CPP, GADTs, TypeFamilies, OverloadedStrings, FlexibleContexts, EmptyDataDecls, FlexibleInstances, GeneralizedNewtypeDer...
haskell
chosen
[ { "from": "system", "value": "Fix explicit prelude import on Windows.\n\nMaybe. It's hard to get Haskell running on Windows, apparently.\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE QuasiQuotes #-}\n{-# LANGUAGE TemplateHaskell #-}\n-- | The Futhark prelud...
haskell
chosen
[ { "from": "system", "value": "Work better with binary files?\n" }, { "from": "human", "value": "import Network.Socket hiding (send, sendTo, recv, recvFrom)\nimport Network.Socket.ByteString\nimport qualified Data.ByteString.Char8 as C\nimport qualified Data.ByteString.Lazy as B\nimport Control.C...
haskell
chosen
[ { "from": "system", "value": "Change the no test to at least do some testing\n" }, { "from": "human", "value": "\nmodule Examples.Util where\n\nimport Development.Shake\nimport Development.Shake.FilePath\n\nimport Control.Concurrent(threadDelay)\nimport Control.Monad\nimport System.Directory\nim...
haskell
chosen
[ { "from": "system", "value": "Fix inline JS line endings\n" }, { "from": "human", "value": "module Data.Lazy where\n\nforeign import data Lazy :: * -> *\n\nforeign import defer \n \"function defer(thunk) {\\\n \\ if (this instanceof defer) {\n \\ this.thunk = thunk;\\\n \\ retur...
haskell
chosen
[ { "from": "system", "value": "Move code block to clarify structure.\n" }, { "from": "human", "value": "module Bucket.Types where\n\nimport Meta\nimport qualified Data.Map as M\nimport System.FilePath\n\ndata Bucket = Bucket {\n bucketPath :: FilePath,\n bucketItemsMap :: (M.Map FilePat...
haskell
chosen
[ { "from": "system", "value": "Fix channel list being parsed as username and OAuth\n" }, { "from": "human", "value": "{-# LANGUAGE ScopedTypeVariables #-}\n\nmodule Main where\n\nimport System.IO\nimport IRC.IRC\nimport Control.Exception (bracket)\nimport Control.Monad (foldM)\nimport System.Envi...
haskell
chosen
[ { "from": "system", "value": "Include shell line when preprocessing $cmd.\n" }, { "from": "human", "value": "module Main where\n\nimport Control.Monad\nimport System.Process\n\ninteractIO :: (String -> IO String) -> IO ()\ninteractIO act = do\n txt <- getContents\n mapM_ (act >=> putStr) (line...
haskell
chosen
[ { "from": "system", "value": "Add from keywords to the Items type\n" }, { "from": "human", "value": "\nmodule Input.Type(\n Database(..),\n Item(..), Items(..),\n isIPackage, isIModule,\n URL, Documentation,\n Id(..)\n ) where\n\nimport Numeric\nimport Data.Tuple.Extra\nimport ...
haskell
chosen