conversations
listlengths
3
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Revert \"Use `putMVar` instead of `tryPutMVar` in rate limiter\"\n\nThis reverts commit 1a79831b00edc6ebcc2bbc3a51035780392bfd77.\n" }, { "from": "human", "value": "-- | Simple rate limiting combinator.\n\nmodule NationStates.RateLimit (\n RateLimit(),\n newRa...
haskell
chosen
[ { "from": "system", "value": "Fix http-conduit/client reference for FPHC\n" }, { "from": "human", "value": "{-# LANGUAGE CPP #-}\n{-# LANGUAGE FlexibleContexts #-}\n{-# LANGUAGE RankNTypes #-}\n{-# LANGUAGE ScopedTypeVariables #-}\n{-# LANGUAGE OverloadedStrings #-}\n\nmodule DataAnalysis.Applic...
haskell
chosen
[ { "from": "system", "value": "Correct caps in module header." }, { "from": "human", "value": "-----------------------------------------------------------------------------\n-- |\n-- Module : Xmonad.Actions.SinkAll\n-- License : BSD3-style (see LICENSE)\n-- Stability : unstable\n-- ...
haskell
chosen
[ { "from": "system", "value": "Change Language members to Text\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}\n\nmodule Hyakko.Types where\n\nimport Control.Applicative ((<$>), (<*>), empty)\nimport Data.Aeson\nimport Data.ByteString.Lazy (ByteString)\ni...
haskell
chosen
[ { "from": "system", "value": "Remove a bunch of unused imports.\n" }, { "from": "human", "value": "{-# LANGUAGE DuplicateRecordFields #-}\n{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE LambdaCase #-}\n{-# LANGUAGE MultiParamTypeClasses #-}\n{-# LANGUAGE OverloadedStrings #-...
haskell
chosen
[ { "from": "system", "value": "Make instanceof check safer, check if it's an object before using instance of\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -W #-}\nmodule Generate.JavaScript.Helpers where\n\nimport qualified SourceSyntax.Helpers as Help\nimport Language.ECMAScript3.Syntax\n\n...
haskell
chosen
[ { "from": "system", "value": "Add a missing NOINLINE, spotted by HLint\n" }, { "from": "human", "value": "-- | Fake cabal module for local building\n\nmodule Paths_shake where\n\nimport Data.Version.Extra\nimport System.IO.Unsafe\nimport System.Directory\nimport Control.Exception\n\n\n-- We want...
haskell
chosen
[ { "from": "system", "value": "Add spec for elementAt index out of bounds.\n" }, { "from": "human", "value": "import Test.Hspec\nimport Test.QuickCheck\nimport Control.Exception (evaluate)\nimport Lists\n\nmain :: IO ()\nmain = hspec $ do\n describe \"Lists.last\" $ do\n it \"returns the last...
haskell
chosen
[ { "from": "system", "value": "Add wiki tests with unestablished user\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n\nmodule WikiTest\n ( wikiSpecs\n ) where\n\nimport TestImport\n\nimport Model.Language\n\nwikiSpecs :: Spec\nwikiSpecs =\n ydescribe \"wiki\" $ do...
haskell
chosen
[ { "from": "system", "value": "Print out the highest-scoring words\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}\n\nimport Control.Lens\nimport Network.Wreq\nimport Data.Text as T (Text)\nimport Data.Aeson\nimport GHC.Generic...
haskell
chosen
[ { "from": "system", "value": "Make pretty printing code nicer\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -Wall #-}\nmodule AST.Literal where\n\nimport qualified Data.Map as Map\nimport qualified Text.PrettyPrint as P\n\nimport qualified Reporting.PrettyPrint as P\n\n\ndata Literal\n =...
haskell
chosen
[ { "from": "system", "value": "Add benchmarks for random noise generation, and tweak others.\n" }, { "from": "human", "value": "module Main (main) where\n\nimport Criterion.Main\n\nimport Control.Monad.ST\nimport Control.Monad.Primitive (PrimMonad)\nimport Control.Monad.Random (MonadRandom)\n\nim...
haskell
chosen
[ { "from": "system", "value": "Switch to using Double to represent floats internal\n" }, { "from": "human", "value": "{-# LANGUAGE DeriveDataTypeable #-}\nmodule SourceSyntax.Literal where\n\nimport Data.Data\nimport SourceSyntax.PrettyPrint\nimport qualified Text.PrettyPrint as PP\n\ndata Litera...
haskell
chosen
[ { "from": "system", "value": "Test for getProcessorName, commRank, commSize\n" }, { "from": "human", "value": "module OtherTests (otherTests) where\n\nimport TestHelpers\n\nimport Foreign.Storable (peek, poke)\nimport Foreign.Marshal (alloca)\n\notherTests :: Rank -> [(String,TestRunnerTest)]\no...
haskell
chosen
[ { "from": "system", "value": "Add wikirick's sub snaplets to the app\n" }, { "from": "human", "value": "module Wikirick.Application where\n\nimport Control.Lens\nimport Snap.Snaplet\nimport Snap.Snaplet.Heist\nimport Snap.Snaplet.Auth\nimport Snap.Snaplet.Session\n\nimport Wikirick.JSONConnectio...
haskell
chosen
[ { "from": "system", "value": "Add more allowed file names for changelogs\n\nBased on byorgey's pull req #149\n" }, { "from": "human", "value": "{-# LANGUAGE NamedFieldPuns #-}\nmodule Distribution.Server.Packages.ChangeLog (\n findChangeLog\n ) where\n\nimport Data.TarIndex (TarIndex, TarEnt...
haskell
chosen
[ { "from": "system", "value": "Make a local function top-level\n\nIt only accessed local state because it was ignoring its parameter.\n" }, { "from": "human", "value": "-----------------------------------------------------------------------------\n-- |\n-- Module : System.Taffybar.FSMonitor\n-- M...
haskell
chosen
[ { "from": "system", "value": "Fix the type of String literals\n" }, { "from": "human", "value": "module Type.Constrain.Literal where\n\nimport Data.Map ((!))\nimport qualified Data.Map as Map\n\nimport SourceSyntax.Literal\nimport Type.Type\nimport Type.Fragment\nimport Type.Environment as Env\n...
haskell
chosen
[ { "from": "system", "value": "Fix license of generated code\n" }, { "from": "human", "value": "-- | Project information to include in generated bindings, should be\n-- kept in sync with haskell-gi.cabal\nmodule GI.ProjectInfo\n ( homepage\n , authors\n , license\n , maintainers\n ...
haskell
chosen
[ { "from": "system", "value": "Build up docList and fullText\n" }, { "from": "human", "value": "module EmailDemo (runEmailDemos) where\n\nimport Ch04NaiveBayes.Email\nimport Control.Monad\nimport Paths_ch04_naive_bayes\nimport System.Directory\nimport ...
haskell
chosen
[ { "from": "system", "value": "Update the timer *after* the request completes\n\nLet's see if this fixes the rate limit issue.\n" }, { "from": "human", "value": "-- | Simple rate limiting combinator.\n\nmodule NationStates.RateLimit (\n RateLimit(),\n newRateLimit,\n rateLimit,\n ) wh...
haskell
chosen
[ { "from": "system", "value": "Remove TODO already dealt with\n" }, { "from": "human", "value": "import System.Exit (exitFailure)\nimport Data.List (elemIndices, sort, nub)\n\nimport Test.Check\nimport Test.Check.Utils\nimport Test.Check.Invariants\nimport Test.Types (Nat)\n\nmain :: IO ()\nmain ...
haskell
chosen
[ { "from": "system", "value": "Use applicative style in widget test loop\n\nIgnore-this: 8b9e6fbd52ccbe2c3fe307b3e35d8cb7\n\ndarcs-hash:20090927210224-e018d-733ff1a483e7042dd4c1b44e35447440d57039d5.gz\n" }, { "from": "human", "value": "module Main where\n\nimport Control.Monad ( forM_ )\nimport W...
haskell
chosen
[ { "from": "system", "value": "Add back some more examples" }, { "from": "human", "value": "\nmodule Main(main) where\n\nimport System.Environment\nimport Example.Example\nimport System.Exit\n\n\ntype Test = (String,IO ())\n\nallTests = tests ++ regress\n\ntests = [(\"hitcount\",(\"Haskell Hit Co...
haskell
chosen
[ { "from": "system", "value": "Fix last for new/never-hinted files\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\nmodule Databrary.Web.JSHint\n ( checkJSHint\n ) where\n\nimport Control.Applicative ((<$>))\nimport Control.Monad (mzero, when)\nimport Control.Monad.IO.Clas...
haskell
chosen
[ { "from": "system", "value": "Fix behavior of --no-signature to turn signing off\n\nThe --no-signature switch should enable signing rather than disable it;\nconsequently, the default for 'stack upload' should be to sign the package.\n" }, { "from": "human", "value": "{-# LANGUAGE NoImplicitPrelu...
haskell
chosen
[ { "from": "system", "value": "refactoring: Use bimapForest instead of bimapTree\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-orphans #-}\nmodule Test.Hspec.Contrib.HUnitSpec (spec) where\n\nimport Helper\n\nimport Test.Hspec.Core.Spec\nimport Test.Hs...
haskell
chosen
[ { "from": "system", "value": "Add success message that makes it clearer that the compiler is built separately.\n" }, { "from": "human", "value": "-- This file compiles all library and runtime code \n-- into elm-runtime.js. Run it with following command:\n--\n-- runHaskell Build.hs\n--\n-- No...
haskell
chosen
[ { "from": "system", "value": "Use Q monad fail for failure instead of throwing an exception.\n\nI copied the throwing code from an example online but I was never happy with that approach. Calling fail (instead of throwing) generates less noise in the output when there's a parser error.\n" }, { "from...
haskell
chosen
[ { "from": "system", "value": "Update exports so the installed package is usable.\n" }, { "from": "human", "value": "module Language.JavaScript.Parser\n (\n PA.parse\n , PA.readJs\n , PA.parseFile\n , PA.showStripped\n , PA.showStrippedMaybe\n -- * AST ...
haskell
chosen
[ { "from": "system", "value": "Use function application instead of parentheses\n" }, { "from": "human", "value": "maxCount :: Int\nmaxCount = 4000000\n\nfibs :: (Integral a) => [a]\nfibs = 0 : 1 : zipWith (+) fibs (tail fibs)\n\neuler002 :: Int\neuler002 = sum (filter odd (takeWhile (<maxCount) f...
haskell
chosen
[ { "from": "system", "value": "Improve style, remove unused brkt function\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -Wall #-}\nmodule AST.Helpers where\n\nimport qualified Data.Char as Char\n\nsplitDots :: String -> [String]\nsplitDots = go []\n where\n go vars str =\n case br...
haskell
chosen
[ { "from": "system", "value": "Use (ISubset xs ys) instead of (Implicit (Subset xs ys))\n" }, { "from": "human", "value": "{-# LANGUAGE UnicodeSyntax #-}\n{-# LANGUAGE TypeOperators #-}\n{-# LANGUAGE ConstraintKinds #-}\n\nmodule Data.Vinyl.Unicode where\n\nimport Data.Vinyl.Relation\nimport Data...
haskell
chosen
[ { "from": "system", "value": "Add a couple extra grammar sources.\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE RankNTypes #-}\n{-# LANGUAGE TemplateHaskell #-}\n\nmodule Text.Greek.Grammar where\n\nimport Control.Lens (makeLenses)\nimport Data.Text (Text)\n...
haskell
chosen
[ { "from": "system", "value": "Update test to show error with [e|| becoming [||\n" }, { "from": "human", "value": "{-# LANGUAGE TemplateHaskell #-}\n{-# LANGUAGE QuasiQuotes #-}\n\nfoo = $footemplate\n\nmakeSplices ''Foo\n\nold = $(old)\n\nbar = $$bartemplate\n\nbar = [e| quasi |]\n\nbar = [| qua...
haskell
chosen
[ { "from": "system", "value": "Check function names for name uniqueness\n" }, { "from": "human", "value": "{-# LANGUAGE FlexibleContexts #-}\nmodule Sodium.Nucleus.Vector.Sanity where\n\nimport Sodium.Prelude\nimport Sodium.Nucleus.Vector.Program\n\nsanity_nameUniqueness :: Program -> Bool\nsanit...
haskell
chosen
[ { "from": "system", "value": "Return multiple representations from /command\n\n- POST -> Text or JSON\n- GET -> JSON or HTML\n" }, { "from": "human", "value": "module Handler.Command\n ( postCommandsR\n , putCommandR\n , getCommandR\n )\n where\n\nimport Import hiding (Request)\n\...
haskell
chosen
[ { "from": "system", "value": "Upgrade wreq, checkStatus to checkResponse\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n\nmodule Web.Offset.HTTP where\n\nimport Control.Lens\nimport Data.Monoid\nimport Data.Text (Text)\nimport q...
haskell
chosen
[ { "from": "system", "value": "Add code to echo response body to the testserver\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\nmodule Main where\n\nimport Control.Concurrent\n\nimport Snap.Iteratee\nimport Snap.Types\nimport Snap.Htt...
haskell
chosen
[ { "from": "system", "value": "Create scan edge type for scan lining polies.\n" }, { "from": "human", "value": "module Shape\n ( Polygon(..)\n , Rect(..)\n ) where\n\nimport qualified Data.Vector as V\n\n-- Point (x, y)\nnewtype Point =\n Point (Int, Int)\n\nnewtype Edge =\n Edge (Point, Poi...
haskell
chosen
[ { "from": "system", "value": "Reduce the amount of simulations to 100 000\n" }, { "from": "human", "value": "module Main where\n\nimport Hasql.TH.Prelude\nimport Hedgehog\nimport Hedgehog.Main\nimport qualified Main.Gen as Gen\nimport qualified Hedgehog.Gen as Gen\nimport qualified Hedgehog.Rang...
haskell
chosen
[ { "from": "system", "value": "Fix missing ConstraintKinds on EventTargetClosure.hs error\n" }, { "from": "human", "value": "{-# LANGUAGE CPP #-}\nmodule GHCJS.DOM.EventTargetClosures\n (eventTargetAddEventListener) where\n\nimport GHCJS.DOM.Types\n\neventTargetAddEventListener ::\n ...
haskell
chosen
[ { "from": "system", "value": "Include date in version command\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE TemplateHaskell #-}\n\nmodule Version where\n\nimport Language.Haskell.TH (runIO)\nimport Language.Haskell.TH.Syntax (Exp(LitE), Lit(StringL))\nimport...
haskell
chosen
[ { "from": "system", "value": "Use gmrun as default runner\n" }, { "from": "human", "value": "import XMonad\nimport XMonad.Config.Xfce\nimport XMonad.Util.EZConfig\nimport XMonad.Layout.NoBorders\nimport qualified XMonad.StackSet as W\nimport XMonad.Util.WindowProperties\nimport Data.Monoid\n\nma...
haskell
chosen
[ { "from": "system", "value": "Improve getModTime so IO errors are not caught and rethrown, but not caught in the first place\n" }, { "from": "human", "value": "{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-}\n\nmodule Development.Shake.FileTime(\n FileTime,\n getModTimeErro...
haskell
chosen
[ { "from": "system", "value": "Correct the inferred type (in comment)\n" }, { "from": "human", "value": "{-# LANGUAGE ImplicitParams, RankNTypes #-}\n\nmodule Main where\n\nf0 :: (?x :: Int) => () -> Int\nf0 () = let ?x = 5 in ?x\n -- Should always return 5\n\nf1 :: (?x :: Int) => () -> Int\nf1...
haskell
chosen
[ { "from": "system", "value": "Add functions for reading and preprocessing emails\n" }, { "from": "human", "value": "module Lib\n ( someFunc\n , allPaths\n ) where\n\nimport System.Directory\n\nsomeFunc :: IO ()\nsomeFunc = putStrLn \"someFunc\"\n\nrootPath = \"./data/lingspam_public/bar...
haskell
chosen
[ { "from": "system", "value": "Fix a test to support the new analysis signatures\n" }, { "from": "human", "value": "module Main ( main ) where\n\nimport qualified Data.Map as M\nimport qualified Data.Set as S\nimport System.FilePath ( (<.>) )\nimport System.Environment ( getArgs, withArgs )\nimpo...
haskell
chosen
[ { "from": "system", "value": "Revert \"Temp redirect to other page\"\n\nThis reverts commit 96099cb97eda4c7a1809a2ec2ad5e170d840f88b.\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\nmodule Main (main) where\n\nimport Control.Concurrent\nimport Control.Monad\nimport Control...
haskell
chosen
[ { "from": "system", "value": "Use better names for bindings\n" }, { "from": "human", "value": "module Main where\n\nimport Test.HUnit (runTestTT, Test(..), Counts(..))\nimport System.Exit (exitSuccess, exitFailure)\n\nimport HaddockBackend.Api\nimport Options\nimport DocTest\n\nimport qualified ...
haskell
chosen
[ { "from": "system", "value": "Use proper failure codes for executable\n" }, { "from": "human", "value": "import System.Environment\nimport Text.Parsec\nimport Text.Parsec.Error\nimport NgLint.Parser\nimport NgLint.Linter\n\n\nprintUsage :: IO ()\nprintUsage = putStrLn \"usage: nglint file.conf\"...
haskell
chosen
[ { "from": "system", "value": "Test that you only get one line when reading\n" }, { "from": "human", "value": "module NiceChildProcessSpec where\n\nimport Test.Hspec\n\nimport GHCJS.Types\n\nimport NiceChildProcess\n\nshould = it\nxshould _ _ = return ()\n\nspec :: Spec\nspec = do\n describe \"N...
haskell
chosen
[ { "from": "system", "value": "Fix ball soe demo to work with newer soe api\n" }, { "from": "human", "value": "{- Written by Antti-Juhani Kaijanaho.\n You may treat this file as if it were in the public domain.\n-}\nmodule Main where\n\nimport Graphics.SOE.Gtk\n\nmain = runGraphics $\n do...
haskell
chosen
[ { "from": "system", "value": "Use Build.Print to show errors\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -W #-}\nmodule Build.Interface (load,isValid) where\n\nimport qualified Data.ByteString.Lazy as L\nimport qualified Data.Binary as Binary\n\nimport qualified Elm.Internal.Version as Ve...
haskell
chosen
[ { "from": "system", "value": "Use `either` instead of `case`\n\nThis is nicer\n" }, { "from": "human", "value": "module Hfold.Parser where\n\nimport Data.Monoid ((<>))\nimport Data.Text (Text)\nimport qualified Data.Text as T\nimport Text.ParserCombinators.Parsec\n\nimport Hfold.Types\n\nparseFi...
haskell
chosen
[ { "from": "system", "value": "Add some documentation to reexport module\n" }, { "from": "human", "value": "module Nero\n ( -- * Re-exports\n module X\n ) where\n\nimport Control.Applicative as X ((<$>), pure)\nimport Data.Monoid as X ((<>))\nimport Control.Lens as X\n\nimport Nero.Applicati...
haskell
chosen
[ { "from": "system", "value": "Expand benchmark to all supported types and add normal too\n" }, { "from": "human", "value": "{-# LANGUAGE Rank2Types #-}\nimport Control.Monad.ST\nimport Criterion.Main\nimport System.Random.MWC\n\nmain = do\n gen <- create\n defaultMain [\n bench \"mwc\" ...
haskell
chosen
[ { "from": "system", "value": "Remove the text node, wasn't actually needed" }, { "from": "human", "value": "\nmodule Implementation where\n\nimport Data.List\n\n---------------------------------------------------------------------\n-- OUTPUT\n\n\ndata Out\n = Char Char\n | TagOpen -- ...
haskell
chosen
[ { "from": "system", "value": "Add a function to find Functions in Modules by their name. This generalizes findMain\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n-- | This is the top-level LLVM IR module. It provides functions to\n-- construct the IR from a bitcode file...
haskell
chosen
[ { "from": "system", "value": "Reformat to <version> (built on <date>)\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE TemplateHaskell #-}\n\nmodule Version where\n\nimport Language.Haskell.TH (runIO)\nimport Language.Haskell.TH.Syntax (Exp(LitE), Lit(StringL))...
haskell
chosen
[ { "from": "system", "value": "Add ToggleStruts to the desktop config\n\ndarcs-hash:20080507022516-a5988-052b2672534ec9f4af933450bc6f5d8af3260066\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-missing-signatures #-}\n\n----------------------------------------------------------------...
haskell
chosen
[ { "from": "system", "value": "Implement an arbitrary turn function\n" }, { "from": "human", "value": "module Robot\n( Bearing(..)\n, Robot\n, bearing\n, coordinates\n, mkRobot\n, simulate\n, turnLeft\n, turnRight\n) where\n\ntype Point = (Int, Int)\n\ndata Bearing = North\n | East\n ...
haskell
chosen
[ { "from": "system", "value": "Use Peeker's State functions to simplify movement processing." }, { "from": "human", "value": "module Labyrinth.Action where\n\nimport Control.Monad.State\n\nimport Labyrinth.Map\nimport Labyrinth.Move\n\nimport Peeker\n\nperformMove :: Move -> State Labyrinth MoveR...
haskell
chosen
[ { "from": "system", "value": "Add forgotten fall-through case for update sequencing\n" }, { "from": "human", "value": "module Frenetic.Update1 where\n\nimport Frenetic.Common\nimport Nettle.OpenFlow.Match\nimport Frenetic.NetCore.Compiler\nimport Frenetic.NetCore.Types\nimport Frenetic.NetCore.S...
haskell
chosen
[ { "from": "system", "value": "Add default values to command line arguments\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 :: St...
haskell
chosen
[ { "from": "system", "value": "Remove spurious undefined that was crashing file service\n" }, { "from": "human", "value": "module Main where\n\nimport Control.Monad.Except (runExceptT)\nimport Control.Monad.Logger (runStdoutLoggingT)\nimport Database.Persist.Postgresql (createPostgresqlPool)\nimp...
haskell
chosen
[ { "from": "system", "value": "Use pattern matching in commandLineArgs.\n\nI think this is clearer than using an if statement and head and drop.\n" }, { "from": "human", "value": "module Utils.GetOpt(OptClass,\n commandLineArgs,\n compilerOpts)\n where\n\nimp...
haskell
chosen
[ { "from": "system", "value": "Fix description of a spec item\n" }, { "from": "human", "value": "module Test.Hspec.OptionsSpec (main, spec) where\n\nimport Helper\n\nimport Test.Hspec.Options hiding (parseOptions)\nimport qualified Test.Hspec.Options as Options\n\nmain :: IO (...
haskell
chosen
[ { "from": "system", "value": "Use Text.splitAt instead of take/drop\n" }, { "from": "human", "value": "module Data.Text.Markup\n ( Markup\n , toMarkup\n , fromMarkup\n )\nwhere\n\nimport Data.Monoid ((<>))\nimport qualified Data.Text as T\nimport Data.Tree\n\ndata Descriptor a =\n Desc { s...
haskell
chosen
[ { "from": "system", "value": "Convert modules handler to Esqueleto.\n" }, { "from": "human", "value": "{-# LANGUAGE NoImplicitPrelude #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE QuasiQuotes #-}\n{-# LANGUAGE MultiParamTypeClasses #-}\n{-# LANGUAGE TypeFamilies #-}\n{-# LANGUAGE ScopedT...
haskell
chosen
[ { "from": "system", "value": "Make the termination module compile" }, { "from": "human", "value": "\nmodule Yhc.Core.Firstify.Mitchell.Terminate where\n\nimport Yhc.Core\nimport qualified Data.Homeomorphic as H\n\ndata Terminate = Terminate\n {specs :: H.Homeomorphic CoreExpr1 CoreExpr\n ,...
haskell
chosen
[ { "from": "system", "value": "Change array index to Int\n\nThis is just so I don't have to convert Word32 to Int for functions like !\nwhen accessing vector elements.\n" }, { "from": "human", "value": "module Text.Karver.Types where\n\nimport Data.Text (Text)\nimport Data.HashMap.Strict\nimport ...
haskell
chosen
[ { "from": "system", "value": "Remove import not used yet\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}\nmodule Databrary.Model.Audit.TypesTest where\n\nimport Data.Time as Time\nimport Database.PostgreSQL.Typed.Inet (PGInet(..))\n\nimport Databrary.Mo...
haskell
chosen
[ { "from": "system", "value": "Add a test driver for the Andersen analysis\n" }, { "from": "human", "value": "import System.Environment ( getArgs )\n\nimport Data.LLVM.Analysis.PointsTo.Andersen\nimport Data.LLVM\n\nmain :: IO ()\nmain = do\n [ fname ] <- getArgs\n Right m <- parseLLVMBitcodeFi...
haskell
chosen
[ { "from": "system", "value": "Add a bunch of routes!\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n\nmodule App where\n\nimport Web.Scotty\nimport Data.Monoid ((<>))\n\nimport Views(indexV)\n\napp :: ScottyM ()\napp = do\n get \"/\" indexH\n get \"/...
haskell
chosen
[ { "from": "system", "value": "Fix accessing directory API in the file service\n" }, { "from": "human", "value": "module Main where\n\nimport Control.Monad.Except (runExceptT)\nimport Control.Monad.Logger (runStdoutLoggingT)\nimport Database.Persist.Postgresql (createPostgresqlPool)\nimport Netwo...
haskell
chosen
[ { "from": "system", "value": "Put the results into the IO monad\n" }, { "from": "human", "value": "module Y2017.M01.D25.Exercise where\n\nimport System.Directory\n\n{--\nOkay, they say 'a' is the second-most popular 'word' in Haskell.\n\nThey. Pfft! Well, where will 'they' be when you're in fron...
haskell
chosen
[ { "from": "system", "value": "Use `as` pattern for better efficiency in haskell.\n" }, { "from": "human", "value": "-- roman2decimal\nmodule Roman2Decimal (\n RomanAlg(..),\n romanAlgToDecimal,\n RomanNum,\n romanToDecimal,\n strToRoman,\n romanStrToDecimal\n) where\n\ndata RomanAlg = I | ...
haskell
chosen
[ { "from": "system", "value": "Update cryptol_ss for changed theorem names.\n" }, { "from": "human", "value": "{- |\nModule : Verifier.SAW.Cryptol.Simpset\nCopyright : Galois, Inc. 2018\nLicense : BSD3\nMaintainer : huffman@galois.com\nStability : experimental\nPortability : non-por...
haskell
chosen
[ { "from": "system", "value": "Fix the incorrectly-used sample app that shows a specific comment.\n" }, { "from": "human", "value": "module CommitComment where\n\nimport qualified Github.Repos.Commits as Github\n\nmain = do\n possibleComment <- Github.commitCommentFor \"thoughtbot\" \"paperclip\...
haskell
chosen
[ { "from": "system", "value": "Use simpler definition and rely on vector fusion to optimise. (Fingers crossed)\n" }, { "from": "human", "value": "module HaskellWorks.Data.Vector.Storable where\n\nimport Data.Word\n\nimport qualified Data.ByteString.Internal as BSI\nimport qualified Data.Vector.S...
haskell
chosen
[ { "from": "system", "value": "Add stringification routines for primitive types.\n" }, { "from": "human", "value": "module Language.K3.Codegen.CPP.Core.Type where\n\nimport Text.PrettyPrint.ANSI.Leijen hiding ((<$>))\n\nimport Language.K3.Core.Common\nimport Language.K3.Codegen.CPP.Core.Stringify...
haskell
chosen
[ { "from": "system", "value": "pascals-triangle: Improve code base on HLint's suggestions.\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-type-defaults #-}\n\nimport Data.Foldable (for_)\nimport Test.Hspec (Spec, describe, it, shouldBe)\nimport Test.Hspec.Runner (configFa...
haskell
chosen
[ { "from": "system", "value": "Add an explicit getDataDirectory, to only look up directories\n" }, { "from": "human", "value": "\n-- | The information from Paths_shake cleaned up\nmodule Development.Shake.Internal.Paths(\n shakeVersionString,\n initDataDirectory,\n hasManualData, copyMan...
haskell
chosen
[ { "from": "system", "value": "Fix a test on Windows.\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -fno-warn-name-shadowing #-}\nmodule Hpack.DefaultsSpec (spec) where\n\nimport Helper\nimport System.Directory\n\nimport Hpack.Syntax.Defaults\nimport H...
haskell
chosen
[ { "from": "system", "value": "Fix block parse skipSpace taking up newline as well\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n\nmodule Block.Parse \n ( Block (Block)\n , parseBlocks\n ) where\n\nimport Data.Attoparsec.ByteString (takeTill)\nimport Data.Attoparsec.By...
haskell
chosen
[ { "from": "system", "value": "Add matcher for the Object type to mergeMap\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 qua...
haskell
chosen
[ { "from": "system", "value": "Change solution to use foldl'\n" }, { "from": "human", "value": "module Binary\n( toDecimal\n) where\n\nimport Data.Map (findWithDefault, fromList)\n\ntoDecimal :: String -> Int\ntoDecimal = convert \"01\"\n\nconvert :: String -> String -> Int\nconvert digits string...
haskell
chosen
[ { "from": "system", "value": "Use correct path to fixture\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n\nmodule System.PassengerCheck.ParseSpec (spec) where\n\nimport Test.Hspec\n\nimport Text.Parsec\n\nimport System.PassengerCheck.Types\nimport System.PassengerCheck.Pa...
haskell
chosen
[ { "from": "system", "value": "Add expressionDelimiter for future logic tokens\n" }, { "from": "human", "value": "{-# LANGUAGE OverloadedStrings #-}\n\nmodule Text.Karver.Parse\n( literalParser\n, identityParser\n, objectParser\n, listParser\n) where\n\nimport Text.Karver.Types\n\nimport Data.Att...
haskell
chosen
[ { "from": "system", "value": "Refactor the set top to use windows flags, not random constants\n" }, { "from": "human", "value": "{-# LANGUAGE CPP #-}\nmodule Language.Haskell.Ghcid.Terminal(\n terminalSize, terminalTopmost\n ) where\n\n#if !defined(mingw32_HOST_OS)\nimport qualified System...
haskell
chosen
[ { "from": "system", "value": "Improve the performance of needMakefileDependencies, use needBS\n" }, { "from": "human", "value": "\nmodule Development.Shake.Util(\n parseMakefile, needMakefileDependencies\n ) where\n\nimport Development.Shake\nimport qualified Data.ByteString.Char8 as BS\ni...
haskell
chosen
[ { "from": "system", "value": "Update for new Module AST\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -W #-}\nmodule Build.Interface (load,isValid) where\n\nimport qualified Data.ByteString.Lazy as L\nimport qualified Data.Binary as Binary\n\nimport qualified Build.Print as Print\nimport qu...
haskell
chosen
[ { "from": "system", "value": "Print stats to stderr instead of stdout\n" }, { "from": "human", "value": "module Main where\n\nimport Test.HUnit (runTestTT, Test(..), Counts(..))\nimport System.Exit (exitSuccess, exitFailure)\n\nimport HaddockBackend.Api\nimport Options\nimport DocTest\n\nimport ...
haskell
chosen
[ { "from": "system", "value": "Fix silly error that shows up when installing through cabal\n" }, { "from": "human", "value": "{-# OPTIONS_GHC -Wall #-}\nmodule Elm.Internal.Paths where\n\nimport System.Directory (doesDirectoryExist)\nimport System.Environment (getEnv)\nimport System.FilePath ((</...
haskell
chosen
[ { "from": "system", "value": "Update examples to follow changes to incremental API\n" }, { "from": "human", "value": "{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}\n\nimport Control.Monad\nimport qualified Data.ByteString as B\nimport Data.Csv.Incremental\nimport System.Exit\nimport System....
haskell
chosen
[ { "from": "system", "value": "Revert \"Length correct, with fake division of money\"\n\nThis reverts commit 01fb9f18c78419bba983240db10b3e46cd3be5c6.\n" }, { "from": "human", "value": "{-# LANGUAGE ScopedTypeVariables #-} -- We will explain why we need this later\nmodule GettingStarted (runTests...
haskell
chosen
[ { "from": "system", "value": "Fix license file path in build script\n" }, { "from": "human", "value": "-- Copyright 2012-2013 Samplecount S.L.\n--\n-- Licensed under the Apache License, Version 2.0 (the \"License\");\n-- you may not use this file except in compliance with the License.\n-- You ma...
haskell
chosen
[ { "from": "system", "value": "Debug print tokens in print_tokens\n" }, { "from": "human", "value": "module Lexer.Tokens (\n Token(..),\n TokenType(..),\n print_tokens\n) where\n\nimport qualified Tools.Formatting as Formatting\nimport qualified Lexer.SourceInfo as SourceInfo\n\ndata Tok...
haskell
chosen
[ { "from": "system", "value": "Revert \"Remove liftMaybe function for GHC8 compatibility\"\n\nThis reverts commit bd15b8f1456302f919ed3d091c93f738e0509b9e.\n" }, { "from": "human", "value": "-- |\n-- Attoparsec parsers.\nmodule HTMLEntities.Parser where\n\nimport HTMLEntities.Prelude\nimport Data...
haskell
chosen