commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
b191532f5131df197847b200ea3b7a26ddf9a057 | examples/voices.hs | examples/voices.hs |
import Music.Prelude
import qualified Music.Score
subj :: Voice Pitch
subj = mconcat [c',ab,db',e,f,g,ab,bb,c']
type Chorale = [Voice (Maybe Pitch)]
renderVoice :: Voice (Maybe Pitch) -> Score StandardNote
renderVoice = fmap pitchToNote . removeRests . renderAlignedVoice . aligned 0 0
where
pitchToNote = from... |
import Music.Prelude
import qualified Music.Score
subj :: Voice Pitch
subj = mconcat [c',ab,db',e,f,g,ab,bb,c']
type Chorale = [Voice (Maybe Pitch)]
renderVoice :: Voice (Maybe Pitch) -> Score StandardNote
renderVoice = fmap pitchToNote . removeRests . renderAlignedVoice . aligned 0 0
where
pitchToNote = from... | Change chorale example to use rcat rather than pcat | Change chorale example to use rcat rather than pcat
| Haskell | bsd-3-clause | music-suite/music-preludes,music-suite/music-preludes |
e2339c82d23240517aadb8b60a744de2ee6667c9 | test/Test/Tinfoil/Data/Key.hs | test/Test/Tinfoil/Data/Key.hs | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Tinfoil.Data.Key where
import Disorder.Core.Tripping (tripping)
import P
import System.IO
import Tinfoil.Data.Key
import... | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Tinfoil.Data.Key where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import Disorder.Core.Tripping (tripping)
imp... | Add test for redactedness of Show instance | Add test for redactedness of Show instance
| Haskell | bsd-3-clause | ambiata/tinfoil,ambiata/tinfoil |
7f52ba81cb90613ebca8bb195a474a4832b32c28 | src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration/Maintainers.hs | src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration/Maintainers.hs | module Distribution.Nixpkgs.Haskell.FromCabal.Configuration.Maintainers ( globalPackageMaintainers ) where
import Data.Map as Map
import Data.Set as Set
import Distribution.Nixpkgs.Haskell.FromCabal.Configuration
import Internal.Lens
globalPackageMaintainers :: Map PackageName (Set Identifier)
globalPackageMaintainer... | module Distribution.Nixpkgs.Haskell.FromCabal.Configuration.Maintainers ( globalPackageMaintainers ) where
import Data.Map as Map
import Data.Set as Set
import Distribution.Nixpkgs.Haskell.FromCabal.Configuration
import Internal.Lens
globalPackageMaintainers :: Map PackageName (Set Identifier)
globalPackageMaintainer... | Maintain persistent, shakespeare and path-pieces. | Maintain persistent, shakespeare and path-pieces.
| Haskell | bsd-3-clause | Fuuzetsu/cabal2nix,bennofs/cabal2nix,gridaphobe/cabal2nix |
36e237f2ccec84e4449907c48091e9180963b017 | src/Biegunka/DB.hs | src/Biegunka/DB.hs | {-# LANGUAGE BangPatterns #-}
module Biegunka.DB
( load, save, merge, delete, wipe
) where
import Data.Functor ((<$>))
import Control.Monad (when)
import Data.Maybe (fromJust, isJust)
import Data.Monoid ((<>))
import System.Directory (getHomeDirectory, doesFileExist, removeFile)
import System.FilePath ((</>))
impo... | {-# LANGUAGE BangPatterns #-}
module Biegunka.DB
( load, save, merge, delete, wipe
) where
import Data.Functor ((<$>))
import Control.Monad (when)
import Data.Maybe (fromJust, isJust)
import Data.Monoid ((<>))
import System.Directory (getHomeDirectory, doesFileExist, removeFile)
import System.FilePath ((</>))
impo... | Fix merge dbs function type signature. | Fix merge dbs function type signature.
| Haskell | mit | biegunka/biegunka |
39728521e8320e5f8aceba82f99ca0f2b91c9862 | Setup.hs | Setup.hs | import Data.Maybe
import Distribution.PackageDescription hiding (Flag)
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import Distribution.Simple.Utils
import System.Directory
main = defaultMa... | import Data.Maybe
import Distribution.PackageDescription hiding (Flag)
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
import Distribution.Simple.Utils
import System.Directory
main = defaultMa... | Clean ext_lib on cabal clean. | Clean ext_lib on cabal clean.
| Haskell | mit | jakubfijalkowski/haskell-and-cpp,jakubfijalkowski/haskell-and-cpp |
f27bd6ec5c91651ac8ce9736a85102aa4887310d | src/Test/Rattle.hs | src/Test/Rattle.hs | {-# LANGUAGE ScopedTypeVariables #-}
module Test.Rattle(main) where
import Development.Rattle
import General.Extra
import System.FilePattern.Directory
import Development.Shake.FilePath
import Control.Exception
import Control.Monad
import Test.Type
main = testSimpleClean $ do
let wipe = mapM removeFile_ =<< getDi... | {-# LANGUAGE ScopedTypeVariables #-}
module Test.Rattle(main) where
import Development.Rattle
import General.Extra
import System.FilePattern.Directory
import Development.Shake.FilePath
import Control.Exception
import Control.Monad
import Test.Type
main = testSimpleClean $ do
let wipe = mapM removeFile_ =<< getDi... | Make sure you get a hazard on Linux | Make sure you get a hazard on Linux
| Haskell | bsd-3-clause | ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake |
ee709317e621384f2cd62a7c214a4778c91706e3 | sequence-differ/src/Main.hs | sequence-differ/src/Main.hs | {-
sequence-differ
A very simple tool to compare and suggest changes between two lists
Authors:
Ryan James Spencer
Sean Donald Spencer
-}
-- Note: `undefined` has a polymorphic type and can be put anywhere
-- This just says main is of type Input/Output 'action'. ()
-- stands for 'unit' and usually is akin to 'voi... | {-
sequence-differ
A very simple tool to compare and suggest changes between two lists
Authors:
Ryan James Spencer
Sean Donald Spencer
-}
-- Note: `undefined` has a polymorphic type and can be put anywhere
-- This just says main is of type Input/Output 'action'. ()
-- stands for 'unit' and usually is akin to 'voi... | Change data to type for Change type. | Change data to type for Change type.
| Haskell | mpl-2.0 | justanotherdot/Playground,justanotherdot/Playground,justanotherdot/Playground,justanotherdot/Playground |
021d9a169c021d1d279c77823a945073c29904fc | test/Spec.hs | test/Spec.hs | main :: IO ()
main = putStrLn "Test suite not yet implemented"
| {-# LANGUAGE OverloadedStrings #-}
import Duffer
import Test.Hspec
import System.Process
import Data.ByteString (hGetContents)
import Data.ByteString.UTF8 (fromString, toString)
main :: IO ()
main = do
blobs <- objectsOfType "blob"
hspec $ do
describe "blob" $
it "correctly parses and ... | Add test for blobs in repository. | Add test for blobs in repository.
| Haskell | bsd-3-clause | vaibhavsagar/duffer.hs,vaibhavsagar/duffer |
19adddb4acecdd97bb2ceb97ebf6aa080d110536 | src/Data/Linear.hs | src/Data/Linear.hs | {-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Data.Linear where
liftUnit :: a ⊸ () ⊸ a
liftUnit a () = a
flip :: (a ⊸ b ⊸ c ) ⊸ b ⊸ a ⊸ c
flip f b a = f a b
| {-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Data.Linear where
id :: a ⊸ a
id a = a
liftUnit :: a ⊸ () ⊸ a
liftUnit a () = a
flip :: (a ⊸ b ⊸ c ) ⊸ b ⊸ a ⊸ c
flip f b a = f a b
infixr 0 $
($) :: (a ⊸ b) ⊸ a ⊸ b
f $ x = f x
{-# INLINE ($) #-}
| Add linear id and ($) | Add linear id and ($)
| Haskell | bsd-3-clause | m0ar/safe-streaming,m0ar/safe-streaming |
b8a9ce352b8f821e399080dcd30e983c0c47495e | Databrary/Model/Identity.hs | Databrary/Model/Identity.hs | {-# LANGUAGE OverloadedStrings #-}
module Databrary.Model.Identity
( module Databrary.Model.Identity.Types
, determineIdentity
, foldIdentity
, maybeIdentity
, identityJSON
) where
import Data.Maybe (catMaybes)
import Databrary.Ops
import Databrary.Has (peek, view)
import qualified Databrary.JSON as JSON
... | {-# LANGUAGE OverloadedStrings #-}
module Databrary.Model.Identity
( module Databrary.Model.Identity.Types
, determineIdentity
, foldIdentity
, maybeIdentity
, identityJSON
) where
import Data.Maybe (catMaybes)
import Databrary.Ops
import Databrary.Has (peek, view)
import qualified Databrary.JSON as JSON
... | Change identityJSON to match play | Change identityJSON to match play
| Haskell | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
e60e32e3f0d25757f700cb7a1af336156439699f | bench/Main.hs | bench/Main.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
import qualified Capnp as C
import qualified Capnp.Untyped as U
import Control.Monad (unless)
import Criterion.Main
import System.Exit (... | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
import qualified Capnp as C
import qualified Capnp.Untyped as U
import Control.Monad (unless)
import Criterion.Main
import qualified Data.ByteString ... | Make the sample input to our benchmark a bit bigger. | Make the sample input to our benchmark a bit bigger.
| Haskell | mit | zenhack/haskell-capnp |
5768cd1af945e7b595bbde612950b9661256c4eb | src/MainLoop.hs | src/MainLoop.hs | module MainLoop
(
Put (..),
handlePut,
mainLoop,
newState,
)
where
import Control.Concurrent.STM.TVar (TVar, newTVarIO)
import Control.Concurrent.STM.TBQueue (TBQueue, newTBQueueIO)
import Data.Aeson (Value (..))
import Data.Void (Void)
import Data.Text (Text)
import Data.Maybe (fromMaybe)
import qualified Da... | module MainLoop
(
Put (..),
handlePut,
mainLoop,
newState,
)
where
import Control.Concurrent.STM (atomically)
import Control.Concurrent.STM.TVar (TVar, newTVarIO, writeTVar)
import Control.Concurrent.STM.TBQueue (TBQueue, newTBQueueIO, readTBQueue)
import Data.Aeson (Value (..))
import Data.Void (Void)
import ... | Implement handler loop for puts | Implement handler loop for puts
| Haskell | bsd-3-clause | channable/icepeak,channable/icepeak,channable/icepeak |
434d7c180ccc1dbd1f6f6485f3438f76767c057e | examples/mobile-authentication.hs | examples/mobile-authentication.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Desktop application authentication flow example
--
-- Please remember to substitute __YOUR_API_KEY__,
-- __YOUR_SECRET__, __USERNAME__ and __PASSWORD__
-- for real values
module Main where
import Control.Lens
import Control.Lens.Aeson
import qualified Data.Text as T
import quali... | {-# LANGUAGE OverloadedStrings #-}
-- | Mobile application authentication flow example
--
-- Please remember to substitute __YOUR_API_KEY__,
-- __YOUR_SECRET__, __USERNAME__ and __PASSWORD__
-- for real values
module Main where
import Control.Lens
import Control.Lens.Aeson
import qualified Data.Text as T
import qualif... | Correct another copypaste error in examples | Correct another copypaste error in examples
| Haskell | mit | supki/liblastfm |
7d0625af80cbf74bb24c3e6658c24cb15c1e32e9 | src/Transform/AddDefaultImports.hs | src/Transform/AddDefaultImports.hs | module Transform.AddDefaultImports (add, defaultImports) where
import qualified AST.Module as Module
import qualified AST.Variable as Var
-- DESCRIPTION OF DEFAULT IMPORTS
(==>) :: a -> b -> (a,b)
(==>) = (,)
defaultImports :: [(Module.Name, Module.ImportMethod)]
defaultImports =
[ ["Basics"] ==> Module.Impor... | module Transform.AddDefaultImports (add, defaultImports) where
import qualified AST.Module as Module
import qualified AST.Variable as Var
-- DESCRIPTION OF DEFAULT IMPORTS
(==>) :: a -> b -> (a,b)
(==>) = (,)
defaultImports :: [(Module.Name, Module.ImportMethod)]
defaultImports =
[ ["Basics"] ==> Module.Impor... | Add Stream and Varying as default imports | Add Stream and Varying as default imports
| Haskell | bsd-3-clause | 5outh/Elm,mgold/Elm,Axure/elm-compiler,JoeyEremondi/elm-pattern-effects,laszlopandy/elm-compiler,pairyo/elm-compiler |
bd315a8cd30f2ddfafa09ce867530fa89b5fa091 | src/Pos/Ssc/GodTossing/Richmen.hs | src/Pos/Ssc/GodTossing/Richmen.hs | module Pos.Ssc.GodTossing.Richmen
( gtLrcConsumer
) where
import Universum
import qualified Pos.DB as DB
import Pos.Lrc.Consumer (LrcConsumer (..))
import Pos.Lrc.Types (RichmenStake)
import Pos.Ssc.Extra.Richmen (MonadSscRi... | module Pos.Ssc.GodTossing.Richmen
( gtLrcConsumer
) where
-- import Universum
import qualified Pos.DB as DB
import Pos.DB.Lrc (RCSsc)
import Pos.Lrc.Consumer (LrcConsumer (..),
lrcConsumerFro... | Use proper LrcConsumer for GodTossing | [CSL-519] Use proper LrcConsumer for GodTossing
| Haskell | apache-2.0 | input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl |
74a1ebdefa83a53ba364f79d3583a8027acf977a | examples/Jumbled.hs | examples/Jumbled.hs | module Main where
import Control.Monad (when)
import Data.Default.Class (def)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import qualified SDL
import qualified SDL.Mixer
main :: IO ()
main = do
SDL.initialize [SDL.InitAudio]
SDL.Mixer.openAudio def 256
putStr "Available ch... | module Main where
import Control.Monad (when)
import Data.Default.Class (def)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import qualified SDL
import qualified SDL.Mixer
main :: IO ()
main = do
SDL.initialize [SDL.InitAudio]
SDL.Mixer.openAudio def 256
putStr "Available ch... | Make the jumbled example compile again. | Make the jumbled example compile again.
| Haskell | bsd-3-clause | sbidin/sdl2-mixer |
95f973909fd249a951c6701ce004b8b1a26321b9 | libraries/ghc-prim/GHC/Types.hs | libraries/ghc-prim/GHC/Types.hs |
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
module GHC.Types where
infixr 5 :
data [] a = [] | a : [a]
|
{-# OPTIONS_GHC -XNoImplicitPrelude #-}
module GHC.Types where
import GHC.Prim
infixr 5 :
data [] a = [] | a : [a]
data Char = C# Char#
| Move the Char datatype into ghc-prim | Move the Char datatype into ghc-prim | Haskell | bsd-3-clause | oldmanmike/ghc,nkaretnikov/ghc,snoyberg/ghc,ezyang/ghc,GaloisInc/halvm-ghc,lukexi/ghc,mettekou/ghc,nushio3/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,mettekou/ghc,nushio3/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,mfine/ghc,forked-upstream-packages-for-ghcjs/ghc,elieux/ghc,vTurbine/ghc,sdiehl/ghc,sgillespie/ghc,urbanslug/ghc,m... |
fe305170a2b6bb62e0422d832887bd11c56f752c | src/UI.hs | src/UI.hs | {-# LANGUAGE OverloadedStrings #-}
module UI where
import Core (BotState, Bullet, bulletPosition)
import Data.String (fromString)
import Text.Blaze.Svg (Svg)
import Text.Blaze.Svg11
import Text.Blaze.Svg11.Attributes
showBoard :: [BotState] -> [Bullet] -> IO ()
showBoard = undefined
renderSvg :: [BotState] -> [Bull... | {-# LANGUAGE OverloadedStrings #-}
module UI where
import Core (BotState, Bullet, bulletPosition)
import Data.String (fromString)
import Text.Blaze.Svg (Svg)
import Text.Blaze.Svg11
import Text.Blaze.Svg11.Attributes
showBoard :: [BotState] -> [Bullet] -> IO ()
showBoard = undefined
renderSvg :: [BotState] -> [Bull... | Simplify SVG rendering of bullet | Simplify SVG rendering of bullet
| Haskell | mit | andreyLevushkin/LambdaWars |
e89ebddce2a956d94454d6fecec7169107b6a12b | Main.hs | Main.hs | {-# LANGUAGE OverloadedStrings #-}
import Web.Scotty as S
import Network.Wai.Middleware.RequestLogger
import Network.Wai.Middleware.Static
import System.Environment
import System.Process
import Control.Monad
import Control.Monad.IO.Class
import Data.Monoid (mconcat)
import Data.Aeson
import qualified Data.Text.Lazy a... | {-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Network.Wai.Middleware.RequestLogger
import Network.Wai.Middleware.Static
import System.Environment
import System.Process
import Control.Monad
import Control.Monad.IO.Class
import Data.Monoid (mconcat)
import Data.Aeson (FromJSO... | Use generics instead of a custom toJSON method | Use generics instead of a custom toJSON method
| Haskell | mit | keathley/pointfree.io,keathley/pointfree.io |
2dc1bcc0f2071d81a85622455e9c83972744a284 | unittests/futhark_tests.hs | unittests/futhark_tests.hs | module Main (main) where
import qualified Language.Futhark.SyntaxTests
import qualified Futhark.Representation.AST.Syntax.CoreTests
import qualified Futhark.Representation.AST.AttributesTests
import qualified Futhark.Representation.ExplicitMemory.IndexFunctionTests
import qualified Futhark.Optimise.AlgSimplifyTests
im... | module Main (main) where
import qualified Language.Futhark.SyntaxTests
import qualified Futhark.Representation.AST.Syntax.CoreTests
import qualified Futhark.Representation.AST.AttributesTests
import qualified Futhark.Representation.ExplicitMemory.IndexFunctionTests
import qualified Futhark.Optimise.AlgSimplifyTests
im... | Add this, even if it is currently empty. | Add this, even if it is currently empty.
| Haskell | isc | diku-dk/futhark,diku-dk/futhark,diku-dk/futhark,diku-dk/futhark,HIPERFIT/futhark,HIPERFIT/futhark,diku-dk/futhark,HIPERFIT/futhark |
a4d7579c3b0e14c471e51d4a507800ea906b283c | Hints.hs | Hints.hs |
module Hints where
import Data.List
-- concatMap f x
concat_map f x = concat (map f x)
-- map (f . g) x
map_map f g x = map f (map g x)
-- x : y
box_append x y = [x] ++ y
-- head x
head_index x = x !! 0
-- replicate n x
use_replicate n x = take n (repeat x)
-- unwords (x:xs)
use_unwords1 x xs = x ++ concatMap ... |
module Hints where
import Data.List
-- concatMap f x
concat_map f x = concat (map f x)
-- map (f . g) x
map_map f g x = map f (map g x)
-- x : y
box_append x y = [x] ++ y
-- head x
head_index x = x !! 0
-- replicate n x
use_replicate n x = take n (repeat x)
-- unwords (x:xs)
use_unwords1 x xs = x ++ concatMap ... | Add a couple of hints suggested by Igloo, regarding useless strictness annotations | Add a couple of hints suggested by Igloo, regarding useless strictness annotations | Haskell | bsd-3-clause | ndmitchell/hlint,ndmitchell/hlint,eigengrau/hlint,bitemyapp/hlint,mpickering/hlint,gibiansky/hlint |
f45c2ae5ff9f13e8ad7c8dc4ebb449b6b8c9590a | src/Pos/Constants.hs | src/Pos/Constants.hs | -- | Several constants used by algorithm.
module Pos.Constants
( k
, slotDuration
, epochSlots
, epochDuration
, neighborsSendThreshold
, networkDiameter
, RunningMode (..)
, runningMode
, isDevelopment
) where
import Universum
import ... | -- | Several constants used by algorithm.
module Pos.Constants
( k
, slotDuration
, epochSlots
, epochDuration
, neighborsSendThreshold
, networkDiameter
, RunningMode (..)
, runningMode
, isDevelopment
) where
import Universum
import ... | Update constants to real-time values | Update constants to real-time values
| Haskell | apache-2.0 | input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl |
180e4fc23bc0592c0d3ef655a602a068315ced50 | src/ASPico/Db/Models/EntityDefs.hs | src/ASPico/Db/Models/EntityDefs.hs | {-# LANGUAGE QuasiQuotes #-}
module ASPico.Db.Models.EntityDefs where
import ASPico.Prelude
import Database.Persist ( EntityDef )
import Database.Persist.TH ( persistLowerCase )
import ASPico.Db.Models.Base
( CompName, CreatedTime, DeletedTime, PasswordHash, UpdatedTime )
aspicoEntityDefs :: [EntityDef]
aspico... | {-# LANGUAGE QuasiQuotes #-}
module ASPico.Db.Models.EntityDefs where
import ASPico.Prelude
import Database.Persist ( EntityDef )
import Database.Persist.TH ( persistLowerCase )
import ASPico.Db.Models.Base
( CompName, CreatedTime, DeletedTime, PasswordHash, UpdatedTime )
aspicoEntityDefs :: [EntityDef]
aspico... | Change ordering of entity defs. | Change ordering of entity defs.
| Haskell | mit | arowM/ASPico |
d4b26ce75d5fbe511b38185a1176da69b66154c3 | src/Bead/Controller/Logging.hs | src/Bead/Controller/Logging.hs | module Bead.Controller.Logging where
import Prelude hiding (log)
data LogLevel
= DEBUG
| INFO
| ERROR
deriving (Show)
data Logger = Logger {
log :: LogLevel -> String -> IO ()
}
mockLogger = Logger {
log = \_ msg -> putStrLn msg
}
| module Bead.Controller.Logging where
import Prelude hiding (log)
data LogLevel
= DEBUG
| INFO
| ERROR
deriving (Show)
data Logger = Logger {
log :: LogLevel -> String -> IO ()
}
mockLogger = Logger {
log = \_ msg -> putStrLn msg
}
-- | Logger that does not log anything
nullLogger = Logger {
... | Convert to unix line endings. | Convert to unix line endings.
| Haskell | bsd-3-clause | andorp/bead,andorp/bead |
9bdb3cac382696e772d9b98ed04733567870aa13 | src/Language/K3/Codegen/CPP/Core/Type.hs | src/Language/K3/Codegen/CPP/Core/Type.hs | module Language.K3.Codegen.CPP.Core.Type where
import Language.K3.Core.Common
data Type
= Named Identifier
| Inferred
| Parameter Identifier
| Primitive PrimitiveType
| Templated Type [Type]
| Qualified Identifier Type
deriving (Eq, Read, Show)
data PrimitiveType
= PBool
| PInt
... | module Language.K3.Codegen.CPP.Core.Type where
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import Language.K3.Core.Common
import Language.K3.Codegen.CPP.Core.Stringify
data Type
= Named Identifier
| Inferred
| Parameter Identifier
| Primitive PrimitiveType
| Templated Type [Type]
| Qua... | Add stringification routines for types. | Add stringification routines for types.
| Haskell | apache-2.0 | yliu120/K3,DaMSL/K3,DaMSL/K3 |
e04b9b7c44ee808db48830221ca32b936ed7ff70 | src/Main.hs | src/Main.hs |
import Jana.Ast
import Jana.Parser
fib :: Program
fib = ( ProcMain [] []
, [ Proc { procname = "fib"
, params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
, body = [ If (BinOp Eq (LV $ Var "n")
(Number 0))
[ Assign A... |
import System.Environment
import Jana.Parser
main :: IO ()
main = do args <- getArgs
case args of
[file] -> parseFile (args !! 0) >>= print
_ -> putStrLn "usage: jana <file>"
| Make main do something useful | Make main do something useful
`runhaskell Main.hs fib.ja' now outputs the AST for the program.
| Haskell | bsd-3-clause | mbudde/jana,tyoko-dev/jana,tyoko-dev/jana,mbudde/jana,mbudde/jana,tyoko-dev/jana,tyoko-dev/jana,mbudde/jana |
3101b5b761f923e9f12e458b1d339fbf2c92bb13 | src/Test/Throttle.hs | src/Test/Throttle.hs |
module Test.Throttle(main) where
import Development.Shake
import Development.Shake.FilePath
import Test.Type
import Control.Exception.Extra hiding (assert)
import Control.Monad.Extra
import System.Time.Extra
main = shaken test $ \args obj -> do
res <- newThrottle "test" 2 0.4
want $ map obj ["file1.1","file... |
module Test.Throttle(main) where
import Development.Shake
import Development.Shake.FilePath
import Test.Type
import Control.Exception.Extra hiding (assert)
import Control.Monad.Extra
import System.Time.Extra
main = shaken test $ \args obj -> do
res <- newThrottle "test" 2 0.4
want $ map obj ["file1.1","file... | Update the error message for the throttling | Update the error message for the throttling
| Haskell | bsd-3-clause | ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake |
47d4b44d68524180e269bf722c7354231739c5de | Test.hs | Test.hs | module Main where
import System.Console.Haskeline
import System.Console.Haskeline.Monads
main :: IO ()
main = runInputT defaultSettings (loop 0)
where
loop :: Int -> InputT IO ()
loop n = do
minput <- getInputLine (show n ++ ":")
case minput of
Nothing -> re... | module Main where
import System.Console.Haskeline
import System.Console.Haskeline.Monads
main :: IO ()
main = runInputT defaultSettings {historyFile = Just "myhist"}
(loop 0)
where
loop :: Int -> InputT IO ()
loop n = do
minput <- getInputLine (show n ++ ":")
... | Add history file to test. | Add history file to test. | Haskell | bsd-3-clause | judah/haskeline,leroux/packages-haskeline,judah/haskeline,ghc/packages-haskeline,ghc/packages-haskeline |
2c592c61d271790d17ccf20d172a87a39bb0ffce | env/src/Constants.hs | env/src/Constants.hs | module Constants where
urxvtArgs :: [String]
urxvtArgs = ["-fg", "lightgrey", "-bg", "black", "+sb"]
terminalSh :: String
terminalSh = unwords (terminalCmd : terminalArgs)
terminalCmd :: String
terminalCmd = "urxvt"
terminalArgs :: [String]
terminalArgs = ["-e", "tmux"]
browser, emacs :: String
browser = "google-c... | module Constants where
urxvtArgs :: [String]
urxvtArgs = ["-fg", "lightgrey", "-bg", "black", "+sb"]
terminalSh :: String
terminalSh = unwords (terminalCmd : terminalArgs)
terminalCmd :: String
terminalCmd = "urxvt"
terminalArgs :: [String]
terminalArgs = ["-e", "tmux"]
browser, emacs :: String
browser = "google-c... | Switch over to standard launching of emacs instead of terminal | Switch over to standard launching of emacs instead of terminal
| Haskell | mit | mgsloan/compconfig |
d14dade00eda024bab3585d08717481a8d0c03c1 | Distribution/Compat/Exception.hs | Distribution/Compat/Exception.hs | {-# OPTIONS -cpp #-}
-- OPTIONS required for ghc-6.4.x compat, and must appear first
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp #-}
#if !defined(__GLASGOW_HASKELL__) || (__GLASGOW_HASKELL__ >= 609)
#define NEW_EXCEPTION
#endif
module Distribution.Compat.Exception
... | {-# OPTIONS -cpp #-}
-- OPTIONS required for ghc-6.4.x compat, and must appear first
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp #-}
#if !defined(__GLASGOW_HASKELL__) || (__GLASGOW_HASKELL__ >= 609)
#define NEW_EXCEPTION
#endif
module Distribution.Compat.Exception
... | Simplify the compat exceptions stuff | Simplify the compat exceptions stuff
20081123095737-adfee-b62dac761cc80ac8ededc77b2c593f15b18a20fe.gz
| Haskell | bsd-3-clause | dcreager/cabal,dcreager/cabal |
6697adaecb6fd04d5215eaa84ab459a19701c7aa | bin/Main.hs | bin/Main.hs | module Main (main) where
import System.Directory (getAppUserDataDirectory)
import System.Environment (getArgs)
import System.FilePath ((</>))
import System.Info (arch, os)
import System.Posix.Process (executeFile)
import Text.Printf (printf)
main :: IO ()
main = do
as <- getArgs
p <- program
case as of
["... | module Main (main) where
import Data.Version (showVersion)
import System.Directory (getAppUserDataDirectory)
import System.Environment (getArgs)
import System.FilePath ((</>))
import System.Info (arch, os)
import System.Posix.Process (executeFile)
import Text.Printf (printf)
import Paths_pakej (version)
main :: IO ... | Add version suffix to the pakej binary. | Add version suffix to the pakej binary.
While I'm at it, also added support recompilation from custom source path
| Haskell | bsd-3-clause | supki/pakej |
742fc5802ff3cb307c6a73e8b5278a8d22ff4534 | demo/sourceview/SourceViewTest.hs | demo/sourceview/SourceViewTest.hs | -- Test file for the SourceView widget.
module Main where
import Graphics.UI.Gtk
import Graphics.UI.Gtk.SourceView
main = do
initGUI
win <- windowNew
win `onDestroy` mainQuit
-- create the appropriate language
lm <- sourceLanguagesManagerNew
langM <- sourceLanguagesManagerGetLanguageFromMimeType lm "text... | -- Test file for the SourceView widget.
module Main where
import Graphics.UI.Gtk
import Graphics.UI.Gtk.SourceView
main = do
initGUI
win <- windowNew
win `onDestroy` mainQuit
-- create the appropriate language
lm <- sourceLanguageManagerNew
langM <- sourceLanguageManagerGetLanguage lm "haskell"
lang <-... | Make sourceview demo compilable again. | Make sourceview demo compilable again.
| Haskell | lgpl-2.1 | haskell-gi/gi-gtk-examples |
139d6ca537cfe8e605c9b2a233c0998fd504b801 | tests/PackageTests/BuildDeps/InternalLibrary4/Check.hs | tests/PackageTests/BuildDeps/InternalLibrary4/Check.hs | module PackageTests.BuildDeps.InternalLibrary4.Check where
import Test.HUnit
import PackageTests.PackageTester
import System.FilePath
import qualified Data.ByteString.Char8 as C
suite :: Test
suite = TestCase $ do
let spec = PackageSpec ("PackageTests" </> "BuildDeps" </> "InternalLibrary4") []
let specTI = ... | module PackageTests.BuildDeps.InternalLibrary4.Check where
import Test.HUnit
import PackageTests.PackageTester
import System.FilePath
import Data.List
suite :: Test
suite = TestCase $ do
let spec = PackageSpec ("PackageTests" </> "BuildDeps" </> "InternalLibrary4") []
let specTI = PackageSpec (directory spec... | Fix test case InternalLibrary4 on account of a change in Cabal's behaviour. | Fix test case InternalLibrary4 on account of a change in Cabal's behaviour.
| Haskell | bsd-3-clause | IreneKnapp/Faction,IreneKnapp/Faction |
6f821712429df7356072b01eea9088a7d596c4bd | count-clicks/source.hs | count-clicks/source.hs | import Reflex
import Reflex.Dom
-- Reflex.count does exactly the same thing! Uses "holdDyn"
countNumberOfEvents event = foldDyn (+) 0 $ tagDyn (constDyn 1) event
main = mainWidget $ do
el "h1" $ text "Count clicks"
el "div" $ do
clickEvent <- button "Click me" -- clickEvent :: Event t ()
numberOfTimesClic... | import Reflex
import Reflex.Dom
-- Reflex.count does exactly the same thing! Uses "holdDyn"
countNumberOfEvents event = foldDyn (+) 0 $ tagDyn (constDyn 1) event
main = mainWidget $ do
el "h1" $ text "Count clicks"
el "div" $ do
clickEvent <- button "Click me" -- clickEvent :: Event t ()
numberOfTimesClic... | Use 'display' instead of `dynText =<< mapDyn show` | Use 'display' instead of `dynText =<< mapDyn show`
| Haskell | mit | Ninju/reflex-dom-demos,Ninju/reflex-dom-demos |
dadd7a2be7f128ed0a1eacce67ff6efb6e16c0e4 | src/Pos/Constants.hs | src/Pos/Constants.hs | -- | Several constants used by algorithm.
module Pos.Constants
( k
, slotDuration
, epochSlots
, epochDuration
, neighborsSendThreshold
, networkDiameter
, RunningMode (..)
, runningMode
, isDevelopment
) where
import Universum
import ... | -- | Several constants used by algorithm.
module Pos.Constants
( k
, slotDuration
, epochSlots
, epochDuration
, neighborsSendThreshold
, networkDiameter
, RunningMode (..)
, runningMode
, isDevelopment
) where
import Universum
import ... | Revert "Update constants to real-time values" | Revert "Update constants to real-time values"
This reverts commit f45c2ae5ff9f13e8ad7c8dc4ebb449b6b8c9590a.
| Haskell | apache-2.0 | input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl |
94587970a3f3172ff2be8d19c05b8d5f432d7f11 | GHC/Exts.hs | GHC/Exts.hs | -----------------------------------------------------------------------------
-- |
-- Module : GHC.Exts
-- Copyright : (c) The University of Glasgow 2002
-- License : see libraries/base/LICENSE
--
-- Maintainer : cvs-ghc@haskell.org
-- Stability : internal
-- Portability : non-portable (GHC Extensi... | -----------------------------------------------------------------------------
-- |
-- Module : GHC.Exts
-- Copyright : (c) The University of Glasgow 2002
-- License : see libraries/base/LICENSE
--
-- Maintainer : cvs-ghc@haskell.org
-- Stability : internal
-- Portability : non-portable (GHC Extensi... | Remove Splittable class (a vestige of linear implicit parameters) | Remove Splittable class (a vestige of linear implicit parameters) | Haskell | bsd-3-clause | ekmett/containers,iu-parfunc/containers,shockkolate/containers,ekmett/containers,hvr/containers,Zigazou/containers,hvr/containers,meiersi/psqueues-old,shockkolate/containers,hvr/containers,shockkolate/containers,Zigazou/containers,Zigazou/containers,iu-parfunc/containers,ekmett/containers,iu-parfunc/containers |
030e59fd4348e8804bcf6d60ac772d6d59c5a711 | src/Main.hs | src/Main.hs | module Main where
import Check
import Commandline
import System.Environment
main :: IO ()
main = do
opts <- getArgs >>= commandLineOptions
checkWord opts
| module Main where
import Check
import Commandline
import Control.Monad
import Error
import System.Directory
import System.Environment
import System.IO.Error
-- |Wrapper around catchIOError that prints error messages and terminates the program on error
catchIO :: (FilePath -> IO a) -> FilePath -> IO a
catchIO action ... | Add check that test.sh exists and is executable | Add check that test.sh exists and is executable
| Haskell | bsd-3-clause | m-schmidt/fuzzer |
41e7b4a0fa33242b83a0f62964e9ef7eb34c4aea | clk-ls.hs | clk-ls.hs | import App.Clk.Entry
import App.Clk.Util
import Data.List
import Data.Period
import Data.Time.Clock
import Data.Time.LocalTime
import System.Console.GetOpt
import System.Environment
data Flag = PeriodArg String -- -p or --period
options = [ Option ['p'] ["period"] (ReqArg PeriodArg "PERIOD") ""
]
main = do
... | import App.Clk.Entry
import App.Clk.Util
import Data.List
import Data.Period
import Data.Time.Clock
import Data.Time.LocalTime
import System.Console.GetOpt
import System.Environment
data Flag = PeriodArg String -- -p or --period
options = [ Option ['p'] ["period"] (ReqArg PeriodArg "PERIOD") ""
]
main = do
... | Support multiple command line options | Support multiple command line options
The old approach assumed that any --period flag would be the first value
returned by getOpt. Once the user can specify multiple flags, that
won't be true anymore.
| Haskell | unlicense | mndrix/clk |
106b7bd96b79cad3b258c53a89e58b9a78fe9e1f | Database/Persist/TH/Library.hs | Database/Persist/TH/Library.hs | {-# LANGUAGE CPP #-}
#include "cabal_macros.h"
module Database.Persist.TH.Library
( apE
) where
#if MIN_VERSION_base(4,3,0)
import Control.Applicative
#endif
apE :: Either x (y -> z) -> Either x y -> Either x z
#if MIN_VERSION_base(4,3,0)
apE = (<*>)
#else
apE l@(Left x) _ = l
apE _ l@(Left... | {-# LANGUAGE CPP #-}
#include "cabal_macros.h"
module Database.Persist.TH.Library
( apE
) where
#if MIN_VERSION_base(4,3,0)
import Control.Applicative
#endif
apE :: Either x (y -> z) -> Either x y -> Either x z
#if MIN_VERSION_base(4,3,0)
apE = (<*>)
#else
apE (Left x) _ = Left x
apE _ (Le... | Fix `apE` for base < 4.3 | Fix `apE` for base < 4.3
| Haskell | mit | greydot/persistent,pseudonom/persistent,mitchellwrosen/persistent,mkscrg/persistent,gbwey/persistent,paul-rouse/persistent,erikd/persistent,bitemyapp/persistent,creichert/persistent,meteficha/persistent,superduper/persistent,pseudonom/persistent,mkscrg/persistent,jcristovao/persistent,plow-technologies/persistent,metef... |
5e40cbe1c7607f2d6e737d987bdf8520a48dfffa | src/GHCJS/Three/CanCopy.hs | src/GHCJS/Three/CanCopy.hs | {-# LANGUAGE JavaScriptFFI #-}
module GHCJS.Three.CanCopy (
CanCopy(..)) where
import GHCJS.Types
import GHCJS.Three.Monad
foreign import javascript unsafe "($2)['copy']($1)"
thr_copy :: JSVal -> JSVal -> Three ()
foreign import javascript unsafe "($1).clone()"
thr_clone :: JSVal -> Three JSVal
class Th... | {-# LANGUAGE JavaScriptFFI #-}
module GHCJS.Three.CanCopy (
CanCopy(..)) where
import GHCJS.Types
import GHCJS.Three.Monad
foreign import javascript unsafe "($2)['copy']($1)"
thr_copy :: JSVal -> JSVal -> Three ()
foreign import javascript unsafe "($1)['clone']()"
thr_clone :: JSVal -> Three JSVal
class... | Change clone API to use array index style | Change clone API to use array index style
| Haskell | bsd-3-clause | manyoo/ghcjs-three |
7ddc54d3539c3f6cbf462c475fd2a2b363cb4b74 | d7/test.hs | d7/test.hs | import Control.Monad (guard)
import Data.List (nub)
n :: Int
n = 7
pts :: [(Int, Int)]
pts = [(i, j) | i <- [1..n], j <- [1..n]]
dist :: (Int, Int) -> (Int, Int) -> Int
dist (x1, y1) (x2, y2) = (x1 - x2) ^ 2 + (y1 - y2) ^ 2
search :: Int -> [(Int, Int)] -> [[(Int, Int)]]
search k placed
| k == n = [placed]
| ot... | import Control.Monad (guard)
import Data.List (nub)
n :: Int
n = 7
pts :: [(Int, Int)]
pts = [(i, j) | i <- [1..n], j <- [1..n]]
dist :: (Int, Int) -> (Int, Int) -> Int
dist (x1, y1) (x2, y2) = (x1 - x2) ^ 2 + (y1 - y2) ^ 2
search :: Int -> [(Int, Int)] -> [[(Int, Int)]]
search k placed
| k == n = [placed]
| ot... | Add type sig to `main` | Add type sig to `main`
Signed-off-by: Mihai Maruseac <39c6231fa9e9b146c89a602ee962216660d40303@gmail.com>
| Haskell | mit | mihaimaruseac/blog-demos,mihaimaruseac/blog-demos,mihaimaruseac/blog-demos,mihaimaruseac/blog-demos,mihaimaruseac/blog-demos |
e506f1153a6d0740b37462d07aa59864ba63474b | src/System/Information.hs | src/System/Information.hs | {-|
Module : System.Information
Description : Getting system information
Copyright : 2016 ChaosGroup
License : MIT
Maintainer : daniel.taskoff@chaosgroup.com
Stability : experimental
Portability : non-portable (GHC extensions)
-}
module System.Information
(
-- * OS
OS, os
) where
import Foreig... | {-# Language DerivingStrategies #-}
{-# Language GeneralisedNewtypeDeriving #-}
{-|
Module : System.Information
Description : Getting system information
Copyright : 2016 ChaosGroup
License : MIT
Maintainer : daniel.taskoff@chaosgroup.com
Stability : experimental
Portability : non-portable (GHC extensions)... | Use deriving strategies for the Show instance | Use deriving strategies for the Show instance
| Haskell | mit | ChaosGroup/system-info |
554b101b1227193199e010d1f9bcce414cc67ad6 | src/Effect/Exception.hs | src/Effect/Exception.hs | module Effect.Exception
(throw,catch,throwHandler,Throw(..),ThrowHandler(..),Exception(..),SomeException(..))
where
import Mop
import Control.Exception hiding (throw,catch)
data Throw k = Throw SomeException
data ThrowHandler k = ThrowHandler k
-- abstract over this pattern-matching pattern, it seems common and ... | module Effect.Exception
(throw,catch,throwHandler,Throw(..),ThrowHandler(..),Exception(..),SomeException(..))
where
import Mop
import Control.Exception hiding (throw,catch)
data Throw k = Throw SomeException
data ThrowHandler k = ThrowHandler k
-- abstract over this pattern-matching pattern, it seems common and ... | Convert applicative constraint to monad constraint for consistency. | Convert applicative constraint to monad constraint for consistency.
| Haskell | bsd-3-clause | grumply/mop,grumply/mop |
67a133d303d0e128268c136cd36ec853637e84d3 | programs/MarkupTest.hs | programs/MarkupTest.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Monoid ((<>))
import qualified Data.Text as T
import Data.Text.Markup
import qualified Data.Array as A
import Text.Regex.Base.RegexLike (makeRegex, matchAll)
import Text.Regex.TDFA.String
emailPattern :: Regex
emailPattern = makeRegex ("[[:alnum:]\\+]+... | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (forM_)
import Data.Monoid ((<>))
import qualified Data.Text as T
import Data.Text.Markup
import qualified Data.Array as A
import Text.Regex.Base.RegexLike (makeRegex, matchAll)
import Text.Regex.TDFA.String
emailPattern :: Regex
emailPattern ... | Improve ipv4 pattern and demo output | Improve ipv4 pattern and demo output
| Haskell | bsd-3-clause | jtdaugherty/text-markup |
8a64dc8b2e0c1147df03941d319a474e685e30db | src/HL/Model/Report.hs | src/HL/Model/Report.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS -fno-warn-unused-do-bind #-}
-- | Read the Haskell report from file, do necessary transformations
-- to get a reasonable page out of it.
module HL.Model.Report where
import HL.Controller
import HL.Static
import ... | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS -fno-warn-unused-do-bind #-}
-- | Read the Haskell report from file, do necessary transformations
-- to get a reasonable page out of it.
module HL.Model.Report where
import HL.Controller
import HL.Static
import ... | Fix directory in report page | Fix directory in report page
| Haskell | bsd-3-clause | erantapaa/hl,josefs/hl,commercialhaskell/commercialhaskell.com,haskell-infra/hl,imalsogreg/hl,haskell-lang/haskell-lang,gbaz/hl,haskell-lang/haskell-lang,haskell-infra/hl,josefs/hl,commercialhaskell/commercialhaskell.com,gbaz/hl,gbaz/hl,kxxoling/hl,bitemyapp/commercialhaskell.com,bitemyapp/commercialhaskell.com,haskell... |
22c330212b9a3fdeeaf819e4a056b7c7b68d1a40 | diagrams-demo.hs | diagrams-demo.hs | import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import Optimisation.CirclePacking
colorize = zipWith fc $
cycle [red,blue,yellow,magenta,cyan,bisque,firebrick,indigo]
objects = colorize $
[ circle r | r <- [0.1,0.2..1.6] ] ++
[ hexagon r | r <- [0.1,0.2..0.7] ] ++
[ decagon r | r <- [0... | import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import Diagrams.Core.Envelope
import Optimisation.CirclePacking
colorize = zipWith fc $
cycle [red,blue,yellow,magenta,cyan,bisque,firebrick,indigo]
objects = colorize $
[ circle r | r <- [0.1,0.2..1.6] ] ++
[ hexagon r | r <- [0.1,0.2..0.7] ] ... | Fix code for diagrams 0.6 | Fix code for diagrams 0.6 | Haskell | bsd-3-clause | nomeata/darcs-mirror-circle-packing,nomeata/darcs-mirror-circle-packing |
9f6afb3ed67e9cd719f30c6f833840bcf2169f6e | haskell/Kryptoradio/Exchange/Exchange.hs | haskell/Kryptoradio/Exchange/Exchange.hs | -- |Common functions between exchanges
module Kryptoradio.Exchange.Exchange where
import Data.Scientific
data Kind = Bid -- ^ Buying order
| Trade -- ^ Completed trade
| Ask -- ^ Selling order
| Rate -- ^ Rate is used instead of trade when not
-- broadcasting full ... | -- |Common functions between exchanges
module Kryptoradio.Exchange.Exchange where
import Data.Scientific
data Kind = Bid -- ^ Buying order
| Trade -- ^ Completed trade
| Ask -- ^ Selling order
| Rate -- ^ Rate is used instead of trade when not
-- broadcasting full ... | Use Scientific in data types | Use Scientific in data types
| Haskell | agpl-3.0 | koodilehto/kryptoradio,koodilehto/kryptoradio,koodilehto/kryptoradio,koodilehto/kryptoradio |
f0d9d3be1d0a2cb6691ae8ef09d67ccd5d63387d | compiler/SourceSyntax/PrettyPrint.hs | compiler/SourceSyntax/PrettyPrint.hs |
module SourceSyntax.PrettyPrint where
import Text.PrettyPrint
import qualified SourceSyntax.Helpers as Help
class Pretty a where
pretty :: a -> Doc
instance Pretty () where
pretty () = empty
commaCat docs = cat (punctuate comma docs)
commaSep docs = sep (punctuate comma docs)
parensIf bool doc = if bool then ... |
module SourceSyntax.PrettyPrint where
import Text.PrettyPrint
import qualified SourceSyntax.Helpers as Help
class Pretty a where
pretty :: a -> Doc
instance Pretty () where
pretty () = empty
commaCat docs = cat (punctuate comma docs)
commaSep docs = sep (punctuate comma docs)
parensIf bool doc = if bool then ... | Fix minor indentation issue with `eightyCharLines` | Fix minor indentation issue with `eightyCharLines`
| Haskell | bsd-3-clause | deadfoxygrandpa/Elm,Axure/elm-compiler,pairyo/elm-compiler,laszlopandy/elm-compiler,JoeyEremondi/elm-pattern-effects,5outh/Elm,mgold/Elm |
3fe80e4f58dcc17e429cedfbd825a3c01dfbf163 | src/Input/Download.hs | src/Input/Download.hs | {-# LANGUAGE ViewPatterns, PatternGuards, TupleSections #-}
module Input.Download(downloadInputs) where
import General.Web
import System.FilePath
import Control.Monad.Extra
import System.Directory
urls =
[("keywords.htm","https://www.haskell.org/haskellwiki/Keywords")
,("stackage.txt","http://www.stackage.o... | {-# LANGUAGE ViewPatterns, PatternGuards, TupleSections #-}
module Input.Download(downloadInputs) where
import General.Web
import System.FilePath
import Control.Monad.Extra
import System.Directory
urls =
[("keywords.htm","https://www.haskell.org/haskellwiki/Keywords")
,("stackage.txt","http://www.stackage.o... | Switch back to the github URL for the haskell platform | Switch back to the github URL for the haskell platform
| Haskell | bsd-3-clause | wolftune/hoogle,ndmitchell/hoogle,BartAdv/hoogle,wolftune/hoogle,wolftune/hoogle,ndmitchell/hoogle,BartAdv/hoogle,BartAdv/hoogle,BartAdv/hoogle,ndmitchell/hogle-dead,wolftune/hoogle,ndmitchell/hogle-dead,ndmitchell/hoogle |
6c743ca1e0b80e2e3493896e034d0fcdfff33383 | tests/harness/Driver_cabal.hs | tests/harness/Driver_cabal.hs | -- | Test driver for cabal-based builds.
import Test.Build
import Test.Options
import Options.Applicative
main :: IO ()
main = program cabalTestEnv cabalOutputStripper cabalErrorStripper cabalBuild =<< execParser opts
| -- | Test driver for cabal-based builds.
import Test.Build
import Test.Options
import Options.Applicative
main :: IO ()
main = simpleProgram cabalTestEnv cabalRun =<< execParser opts
| Switch cabal driver to use `simpleProgram` | Switch cabal driver to use `simpleProgram`
| Haskell | bsd-3-clause | ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell |
b78d62cfd412f5d84014e3e0dc3a0fdc615f3371 | website/src/Handler/PaymentInfo.hs | website/src/Handler/PaymentInfo.hs | {-# LANGUAGE FlexibleContexts #-}
-- | Handlers for CRUD'ing patrons' payment info.
module Handler.PaymentInfo
( getPaymentInfoR
, postPaymentInfoR
) where
import Import
import Text.Julius (rawJS)
import Handler.Util
newtype PaymentInfo = PaymentInfo Text deriving (Show)
paymentForm :: Text -> Form PaymentI... | {-# LANGUAGE FlexibleContexts #-}
-- | Handlers for CRUD'ing patrons' payment info.
module Handler.PaymentInfo
( getPaymentInfoR
, postPaymentInfoR
) where
import Import
import Text.Julius (rawJS)
import Handler.Util
newtype PaymentInfo = PaymentInfo Text deriving (Show)
paymentForm :: Text -> Form PaymentI... | Add note about code duplication | Add note about code duplication
| Haskell | agpl-3.0 | snowdriftcoop/snowdrift |
82dcc034fca77c44b1c4df923df98e09eab3ceb8 | Handler/Wiki.hs | Handler/Wiki.hs | module Handler.Wiki
( getWikiHomeR
, getWikiR
) where
import Import
import Network.HTTP.Types (status301)
import qualified Data.Text as T
getWikiHomeR :: Handler Html
getWikiHomeR = redirectWith status301 ("https://github.com/yesodweb/yesod/wiki" :: T.Text)
getWikiR :: Text -> Handler Html
getWikiR path ... | module Handler.Wiki
( getWikiHomeR
, getWikiR
) where
import Import
import Network.HTTP.Types (status301)
import qualified Data.Text as T
getWikiHomeR :: Handler Html
getWikiHomeR = redirect ("https://github.com/yesodweb/yesod-cookbook" :: T.Text)
getWikiR :: Text -> Handler Html
getWikiR path = redirect... | Move to yesod-cookbook repo (pinging @psibi) | Move to yesod-cookbook repo (pinging @psibi)
| Haskell | bsd-2-clause | wolftune/yesodweb.com |
2063a1027c3adf789145dddb0a40156dc8c4dc70 | ihaskell-display/ihaskell-static-canvas/src/IHaskell/Display/StaticCanvas.hs | ihaskell-display/ihaskell-static-canvas/src/IHaskell/Display/StaticCanvas.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module IHaskell.Display.StaticCanvas (Canvas(..)) where
import Data.Text.Lazy.Builder (toLazyText)
import Data.Text.Lazy (unpack)
import Data.Text (pack, Text)
import System.IO.Unsafe
import Control.Concurrent.M... | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module IHaskell.Display.StaticCanvas (Canvas(..)) where
import Data.Text.Lazy.Builder (toLazyText)
import Data.Text.Lazy (unpack)
import Data.Text (pack, Text)
import System.IO.Unsafe
import Control.Concurrent.M... | Fix name collision due to static-canvas | Fix name collision due to static-canvas
| Haskell | mit | thomasjm/IHaskell,thomasjm/IHaskell,thomasjm/IHaskell,franklx/IHaskell,sumitsahrawat/IHaskell,gibiansky/IHaskell,franklx/IHaskell,franklx/IHaskell,gibiansky/IHaskell,thomasjm/IHaskell,gibiansky/IHaskell,franklx/IHaskell,sumitsahrawat/IHaskell,sumitsahrawat/IHaskell |
d2b0fa480a57c27319b999414313d1a7bfbffc18 | src/Dfterm3/Logging.hs | src/Dfterm3/Logging.hs | -- | Logging in Dfterm3
--
-- We use the hslogging package and this module exposes the interface as it is
-- convenient in Dfterm3.
--
module Dfterm3.Logging
( initializeLogging
, logInfo )
where
import System.Log.Logger
import Data.Time
-- | Sets up whatever is necessary to start logging properly.
initi... | -- | Logging in Dfterm3
--
-- We use the hslogging package and this module exposes the interface as it is
-- convenient in Dfterm3.
--
module Dfterm3.Logging
( initializeLogging
, logInfo )
where
import System.Log.Logger
import Data.Time
-- | Sets up whatever is necessary to start logging properly.
initi... | Fix timestamps in logging not padding zeroes to times. | Fix timestamps in logging not padding zeroes to times.
This caused timestamps such as "1:1:13" (really meaning the time 01:01:13).
| Haskell | isc | Noeda/dfterm3,Noeda/dfterm3 |
6c9b1af638e43d09c759285d567af8ab1118f97e | Statistics/Test/Types.hs | Statistics/Test/Types.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Statistics.Test.Types (
TestType(..)
, TestResult(..)
, significant
) where
import Data.Typeable (Typeable)
-- | Test type. Exact meaning depends on a specific test. But
-- generally it's tested whether some statistics is too big (small)
-- for 'OneTailed' or whet... | {-# LANGUAGE DeriveFunctor, DeriveDataTypeable #-}
module Statistics.Test.Types (
Test(..)
, isSignificant
, TestResult(..)
, significant
, TestType(..)
) where
import Data.Typeable (Typeable)
import Statistics.Types (CL)
-- | Result of hypothesis testing
data TestResult = Significant -- ^ Null hypot... | Add types for statistical test results | Add types for statistical test results
| Haskell | bsd-2-clause | bos/statistics,Shimuuar/statistics,bos/statistics,Shimuuar/statistics |
80b19a98866bb5d37e02f00f20dc66738b27a68f | src/Famous/Components/Opacity.hs | src/Famous/Components/Opacity.hs | {-# LANGUAGE JavaScriptFFI #-}
module Famous.Components.Opacity where
import GHCJS.Foreign
import GHCJS.Types
import Famous.Core.Node
data Opacity_
type Opacity = JSRef Opacity_
-- | Add a new Opacity component to a node
foreign import javascript unsafe "new famous.components.Opacity($1)"
fms_addOpacity :: Node... | {-# LANGUAGE JavaScriptFFI #-}
module Famous.Components.Opacity where
import GHCJS.Foreign
import GHCJS.Types
import GHCJS.Marshal
import Famous.Core.Node
import Famous.Transitions.Curves
data Opacity_
type Opacity = JSRef Opacity_
-- | Add a new Opacity component to a node
foreign import javascript unsafe "new f... | Add setter function for opacity with transition | Add setter function for opacity with transition
| Haskell | bsd-3-clause | manyoo/ghcjs-famous |
224f927d50bafbe7c589302ef6eefe435d88615f | Examples/Util.hs | Examples/Util.hs |
module Examples.Util where
import Development.Shake
import Development.Shake.FilePath
import Control.Concurrent(threadDelay)
import Control.Monad
import System.Directory
import System.Environment
shaken
:: (([String] -> IO ()) -> (String -> String) -> IO ())
-> ((String -> String) -> Rules ())
-> IO ()... |
module Examples.Util where
import Development.Shake
import Development.Shake.FilePath
import Control.Concurrent(threadDelay)
import Control.Monad
import System.Directory
import System.Environment
shaken
:: (([String] -> IO ()) -> (String -> String) -> IO ())
-> ((String -> String) -> Rules ())
-> IO ()... | Allow build ["clean"] in recursive invokations of the test | Allow build ["clean"] in recursive invokations of the test
| Haskell | bsd-3-clause | ndmitchell/shake,nh2/shake,nh2/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake,nh2/shake |
5943a5b2cf7d5da2d253dec73ee5be6ce870e4ba | distrib/compare/Utils.hs | distrib/compare/Utils.hs |
module Utils where
import Data.Function
import Data.List
import System.Exit
import System.IO
import Text.Regex.Posix
die :: Errors -> IO a
die errs = do mapM_ (hPutStrLn stderr) errs
exitFailure
dieOnErrors :: Either Errors a -> IO a
dieOnErrors (Left errs) = die errs
dieOnErrors (Right x) = return x
... |
module Utils where
import Data.Function
import Data.List
import System.Exit
import System.IO
import Text.Regex.PCRE
die :: Errors -> IO a
die errs = do mapM_ (hPutStrLn stderr) errs
exitFailure
dieOnErrors :: Either Errors a -> IO a
dieOnErrors (Left errs) = die errs
dieOnErrors (Right x) = return x
... | Use Test.Regex.PCRE instead of .Posix in compare | Use Test.Regex.PCRE instead of .Posix in compare
This program:
main :: IO ()
main = do re "[^ ]" "\207"
re "[ ]" "\207"
re " " "\207"
re :: String -> String -> IO ()
re r str = let r' = makeRegex r :: Regex
res = matchM r' str :: Maybe (String, String, S... | Haskell | bsd-3-clause | jstolarek/ghc,anton-dessiatov/ghc,acowley/ghc,ezyang/ghc,mcschroeder/ghc,nushio3/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,ekmett/ghc,da-x/ghc,AlexanderPankiv/ghc,mfine/ghc,vikraman/ghc,shlevy/ghc,vTurbine/ghc,mettekou/ghc,sdiehl/ghc,gcampax/ghc,snoyberg/ghc,anton-dessiatov/ghc,elieux/ghc,jstolarek/ghc,... |
e0d738ce7556988ff6af2bea32b5fb799852a0ac | examples/write-udp.hs | examples/write-udp.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Exception
import Control.Lens
import Data.Time.Clock
import Network.Socket
import Database.InfluxDB.Types
import Database.InfluxDB.Line
import qualified Database.InfluxDB.Write.UDP as UDP
m... | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Exception
import Control.Lens
import Data.Time.Clock
import Network.Socket
import Database.InfluxDB.Types
import Database.InfluxDB.Line
import qualified Database.InfluxDB.Write.UDP as UDP
m... | Replace the deprecated inet_addr with tupleToHostAddress in an example | Replace the deprecated inet_addr with tupleToHostAddress in an example
| Haskell | bsd-3-clause | maoe/influxdb-haskell |
2554e3b2397b8413c322904977ccc0ae13a1bf41 | test/Handler/ProfileBGUnitSpec.hs | test/Handler/ProfileBGUnitSpec.hs | module Handler.ProfileBGUnitSpec (spec) where
import TestImport
import TestTools
spec :: Spec
spec = withApp $
describe "test /profile/bgunit" $ do
it "get /profile/bgunit without authorization" $ do
get ProfileBGUnitR
statusIs 405
it "post /profile/bgunit without authori... | module Handler.ProfileBGUnitSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $
describe "test /profile/bgunit" $ do
it "get /profile/bgunit without authorization" $ do
get ProfileBGUnitR
statusIs 405
it "post /profile/bgunit without authorization, with CSRF... | Remove unused import of TestTools | Remove unused import of TestTools
| Haskell | agpl-3.0 | sajith/betty-web |
03d97bb9f2d90f09ca940d34d8d27686dcc1eb41 | auto-update/test/Control/AutoUpdateSpec.hs | auto-update/test/Control/AutoUpdateSpec.hs | module Control.AutoUpdateSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Data.IORef
import Control.Concurrent (threadDelay)
import Control.Monad (replicateM_, forM_)
import Control.AutoUpdate
spec :: Spec
spec = do
prop "incrementer" $ \st' -> do
let st = abs st'
ref <- new... | module Control.AutoUpdateSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Data.IORef
import Control.Concurrent (threadDelay)
import Control.Monad (replicateM_, forM_)
import Control.AutoUpdate
spec :: Spec
spec = do
prop "incrementer" $ \st' -> do
let st = abs st' `mod` 10000
... | Make auto-update tests more resilient | Make auto-update tests more resilient
| Haskell | mit | tolysz/wai,utdemir/wai,utdemir/wai,mfine/wai,creichert/wai,AndrewRademacher/wai,jberryman/wai,jberryman/wai,urbanslug/wai,urbanslug/wai,erikd/wai,urbanslug/wai,frontrowed/wai,ygale/wai,tolysz/wai,coypoop/wai,yesodweb/wai,erikd/wai,erikd/wai,awpr/wai,rgrinberg/wai,iquiw/wai,coypoop/wai,iquiw/wai,creichert/wai,sordina/wa... |
e28fb4632d5a9e436bfeab0714bcc97ab5c581de | src/Main.hs | src/Main.hs | module Main where
import Idris.Core.TT
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.REPL
import IRTS.Compiler
import IRTS.CodegenPython
import System.Environment
import System.Exit
import Paths_idris_python
data Opts = Opts { inputs :: [FilePath],
output :: FilePath }
showUsage = ... | module Main where
import Idris.Core.TT
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.REPL
import IRTS.Compiler
import IRTS.CodegenPython
import System.Environment
import System.Exit
import Paths_idris_python
data Opts = Opts { inputs :: [FilePath],
output :: FilePath }
showUsage = ... | Update arguments to Via in main | Update arguments to Via in main
| Haskell | bsd-3-clause | nickgeoca/idris-py |
b9ead42798395d6aa72bcb5fe63011109024394c | test/Handler/ProfileBGUnitSpec.hs | test/Handler/ProfileBGUnitSpec.hs | module Handler.ProfileBGUnitSpec (spec) where
import TestImport
import TestTools
spec :: Spec
spec = withApp $
describe "test /profile/bgunit" $ do
it "get /profile/bgunit without authorization" $ do
get ProfileBGUnitR
statusIs 405
it "post /profile/bgunit without authori... | module Handler.ProfileBGUnitSpec (spec) where
import TestImport
import TestTools
spec :: Spec
spec = withApp $
describe "test /profile/bgunit" $ do
it "get /profile/bgunit without authorization" $ do
get ProfileBGUnitR
statusIs 405
it "post /profile/bgunit without authori... | Update test case for defaultCsrfMiddleware. | Update test case for defaultCsrfMiddleware.
| Haskell | agpl-3.0 | sajith/betty-web |
8862fb620e5af0183259ae3e642e582cc8157334 | tests/registry001.hs | tests/registry001.hs | import System.Win32
import Control.Exception
import Control.Monad
x = "bumble"
name = "test_registry001"
-- Create, read, and delete a value (test for bug #3241)
main = do
k1 <- regOpenKey hKEY_CURRENT_USER "Software"
k2 <- regOpenKey k1 "Haskell"
k3 <- regOpenKey k2 "GHC"
flip finally (regDeleteV... | import System.Win32
import Control.Exception
import Control.Monad
x = "bumble"
name = "test_registry001"
-- Create, read, and delete a value (test for bug #3241)
main = do
k1 <- regCreateKey hKEY_CURRENT_USER "Software"
k2 <- regCreateKey k1 "Haskell"
k3 <- regCreateKey k2 "GHC"
flip finally (regD... | Use regCreateKey to be more robust when registry entry does not exist. | Use regCreateKey to be more robust when registry entry does not exist.
Signed-off-by: Edward Z. Yang <dbd597f5635f432486c5d365e9bb585b3eaa1853@mit.edu>
| Haskell | bsd-3-clause | coreyoconnor/win32,coreyoconnor/win32,Heather/win32,Heather/win32 |
4ce8c41c5d77f2faf684382a422a12409b884223 | test/Headings.hs | test/Headings.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Headings where
import Data.OrgMode.Parse
import Test.Tasty
import Test.Tasty.HUnit
import Util
parserHeadingTests :: TestTree
parserHeadingTests = testGroup "Attoparsec Heading"
[ (testCase "Pars... | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Headings where
import Data.OrgMode.Parse
import Test.Tasty
import Test.Tasty.HUnit
import Util
parserHeadingTests :: TestTree
parserHeadingTests = testGroup "Attoparsec Heading"
[ (testCase "Pars... | Add single test for header without a title | Add single test for header without a title
| Haskell | bsd-3-clause | nushio3/orgmode-parse,digitalmentat/orgmode-parse,imalsogreg/orgmode-parse,imalsogreg/orgmode-parse,digitalmentat/orgmode-parse,nushio3/orgmode-parse |
8f53ab11791a5e8857e21ad1a2855b40cc97b7e0 | travis.hs | travis.hs |
import System.Time.Extra
import System.Process.Extra
main :: IO ()
main = do
let timed x = do
putStrLn $ "\n\nSearching for " ++ x
(time,_) <- duration $ system $ "hogle " ++ (if x == "" then "" else show x)
putStrLn $ "Search " ++ show x ++ " took " ++ showDuration time
putStrLn ... |
import System.Time.Extra
import System.Process.Extra
main :: IO ()
main = do
let timed x = do
putStrLn $ "\n\nSearching for " ++ x
(time,_) <- duration $ system $ "hogle " ++ (if x == "" then "" else show x)
putStrLn $ "Search " ++ show x ++ " took " ++ showDuration time
putStrLn ... | Change the type searches to actually do type searches | Change the type searches to actually do type searches
| Haskell | bsd-3-clause | BartAdv/hoogle,BartAdv/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle,ndmitchell/hogle-dead,ndmitchell/hoogle,wolftune/hoogle,wolftune/hoogle,wolftune/hoogle,ndmitchell/hoogle,ndmitchell/hoogle,ndmitchell/hogle-dead |
51c14961388d95605d5f14a142e108c0af5016a1 | src/Text/Karver/Types.hs | src/Text/Karver/Types.hs | module Text.Karver.Types
( Tokens(..)
, Value(..)
) where
import Data.Text (Text)
import Data.HashMap.Strict
import Data.Vector
type ObjectName = Text
type Key = Text
type ListName = Text
type Index = Int
type Compare = Text
type IfBody = Text
type ElseBody = Text
type Element = Text
type... | module Text.Karver.Types
( Tokens(..)
, Value(..)
) where
import Prelude hiding (FilePath)
import Data.Text (Text)
import Data.HashMap.Strict
import Data.Vector
type ObjectName = Text
type Key = Text
type ListName = Text
type Index = Int
type Compare = Text
type IfBody = Text
type ElseBody =... | Add new token for includes | Add new token for includes
| Haskell | bsd-3-clause | ibotty/stencil,sourrust/karver |
25bc4f8d2f2165f6ed91758f51975b2a3cd45bcf | tests/Doctests.hs | tests/Doctests.hs | module Main (main) where
import Protolude
import Test.DocTest
main :: IO ()
main = doctest $ ["-isrc"] <> options <> files
where
options = map ("-X" <>) extensions
-- These must match the extensions in package.yaml.
extensions = [ "NoImplicitPrelude"
, "OverloadedStrings"
... | module Main (main) where
import Protolude
import Test.DocTest
main :: IO ()
main = doctest $ ["-isrc"] <> options <> files
where
options = map ("-X" <>) extensions
-- These must match the extensions in package.yaml.
extensions = [ "NoImplicitPrelude"
, "OverloadedStrings"
... | Use real directory over symlink. | Use real directory over symlink.
| Haskell | bsd-3-clause | jml/graphql-api |
81f0fc69556ad7a30f81035ddf367c47119974be | Handler/Profile.hs | Handler/Profile.hs | module Handler.Profile where
import Import
import Betty.Token (getToken)
------------------------------------------------------------------------
getProfileR :: Handler Html
getProfileR = do
Entity _ u <- requireAuth
t <- getToken $ userEmail u
let token = fromMaybe "not set" t
defaultLayout $ do
... | module Handler.Profile where
import Import
import Betty.Model
import Betty.Token (getToken)
------------------------------------------------------------------------
getProfileR :: Handler Html
getProfileR = do
Entity uid u <- requireAuth
t <- getToken $ userEmail u
let token = fromMaybe "not set" t
... | Read blood glucose unit preference from database. | Read blood glucose unit preference from database.
The preference is passed to jQuery so that the choice saved in database
is correctly displayed in the settings page.
| Haskell | agpl-3.0 | sajith/betty-web |
ade1795ef480fb435be407f996f3e3ca38b30be4 | XMonad/Config/Desktop.hs | XMonad/Config/Desktop.hs | {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Config.Desktop
-- Copyright : (c) Spencer Janssen <sjanssen@cse.unl.edu>
-- License : BSD
--
-- Maintainer : Spencer Janssen <sjanssen@cse.unl.edu>
--
-... | {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Config.Desktop
-- Copyright : (c) Spencer Janssen <sjanssen@cse.unl.edu>
-- License : BSD
--
-- Maintainer : Spencer Janssen <sjanssen@cse.unl.edu>
--
-... | Add ToggleStruts to the desktop config | Add ToggleStruts to the desktop config
darcs-hash:20080507022516-a5988-052b2672534ec9f4af933450bc6f5d8af3260066
| Haskell | bsd-3-clause | kmels/xmonad-launcher,kmels/xmonad-launcher |
f69b0b7a89e26e4d93b355c0f8d7e56eba2f3653 | src/Foreign/Inference/Preprocessing.hs | src/Foreign/Inference/Preprocessing.hs | {-# LANGUAGE TemplateHaskell #-}
-- | This module defines helpers to preprocess bitcode into an
-- acceptable form. This mostly means deciding which optimizations to
-- run to make analysis easier.
module Foreign.Inference.Preprocessing (
readBitcode,
requiredOptimizations
) where
import Control.Monad ( when )
... | {-# LANGUAGE TemplateHaskell #-}
-- | This module defines helpers to preprocess bitcode into an
-- acceptable form. This mostly means deciding which optimizations to
-- run to make analysis easier.
module Foreign.Inference.Preprocessing (
requiredOptimizations
) where
-- | These are the options that the analysis ... | Remove the unused readBitcode function | Remove the unused readBitcode function
buildModule from LLVM.Analysis.Util.Testing is more robust
| Haskell | bsd-3-clause | travitch/foreign-inference,travitch/foreign-inference |
0dd48baa10de227c4e6abd947b1e5c86abf9f5b7 | src/Distribution/Hi.hs | src/Distribution/Hi.hs | {-# LANGUAGE NamedFieldPuns #-}
module Distribution.Hi where
import Distribution.Hi.Compiler (compile)
import Distribution.Hi.FilePath (toDestionationPath, toDir)
import Distribution.Hi.Context (context)
import Distribution.Hi.Types
import Distribution.Hi.Template (wi... | {-# LANGUAGE NamedFieldPuns #-}
module Distribution.Hi where
import Distribution.Hi.Compiler (compile)
import Distribution.Hi.FilePath (toDestionationPath)
import Distribution.Hi.Context (context)
import Distribution.Hi.Types
import Distribution.Hi.Template (withTempl... | Make directory from the structure of given template, not hardcorded path | Make directory from the structure of given template, not hardcorded path
| Haskell | bsd-3-clause | jonathankochems/hi |
1a3f43b55d543e784762cf8f0e9bf40e15820703 | src/Oracles/PackageData.hs | src/Oracles/PackageData.hs | {-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
module Oracles.PackageData (
PackageDataKey (..),
PackageData (..)
) where
import Development.Shake.Classes
import Base
import Util
newtype PackageDataKey = PackageDataKey (FilePath, String)
deriving (Show, Typeable, ... | {-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
module Oracles.PackageData (
PackageDataKey (..),
PackageData (..)
) where
import Development.Shake.Classes
import Base
import Util
newtype PackageDataKey = PackageDataKey (FilePath, String)
deriving (Show, Typeable, ... | Add package data key HsOpts. | Add package data key HsOpts.
| Haskell | bsd-3-clause | bgamari/shaking-up-ghc,sdiehl/ghc,sdiehl/ghc,quchen/shaking-up-ghc,sdiehl/ghc,izgzhen/hadrian,sdiehl/ghc,sdiehl/ghc,snowleopard/shaking-up-ghc,sdiehl/ghc,snowleopard/hadrian,sdiehl/ghc |
5f2b9b52757276c417880f61963a1d2fe257a984 | haskell/day3/day3.hs | haskell/day3/day3.hs | module Main where
import Data.List
-- • Write a function that looks up a hash table value that uses the Maybe monad. Write a hash that stores other hashes, several levels deep. Use the Maybe monad to retrieve an element for a hash key several levels deep.
try :: Eq a => a -> [(a, b)] -> Maybe b
try _ [] = Nothing... | module Main where
import Data.List
-- • Write a function that looks up a hash table value that uses the Maybe monad. Write a hash that stores other hashes, several levels deep. Use the Maybe monad to retrieve an element for a hash key several levels deep.
try :: Eq a => a -> [(a, b)] -> Maybe b
try _ [] = Nothing... | Add haskell day 3 maze solve | Add haskell day 3 maze solve
| Haskell | mit | hemslo/seven-in-seven,hemslo/seven-in-seven,hemslo/seven-in-seven |
4dd0f4efaa11306edafdc35226f14e4de4a57067 | src/Language/K3/Codegen/CPP/Representation.hs | src/Language/K3/Codegen/CPP/Representation.hs | {-# LANGUAGE OverloadedStrings #-}
module Language.K3.Codegen.CPP.Representation where
import Data.String
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
class Stringifiable a where
stringify :: a -> Doc
| {-# LANGUAGE OverloadedStrings #-}
module Language.K3.Codegen.CPP.Representation where
import Data.String
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
class Stringifiable a where
stringify :: a -> Doc
data Name
= Name Identifier
| Qualified Identifier Name
| Specialized [Type] Name
deriving... | Define AST fragment for Names in C++. | Define AST fragment for Names in C++.
| Haskell | apache-2.0 | DaMSL/K3,DaMSL/K3,yliu120/K3 |
04fb4c9109e752f174d35302256463b46fc4b30a | demo/soe/BouncingBall.hs | demo/soe/BouncingBall.hs | {- Written by Antti-Juhani Kaijanaho.
You may treat this file as if it were in the public domain.
-}
module Main where
import Graphics.SOE.Gtk
main = runGraphics $
do w <- openWindowEx "Bouncing Ball" Nothing (Just (300, 300)) drawBufferedGraphic (Just 30)
let loop x y xd yd
= do... | {- Written by Antti-Juhani Kaijanaho.
You may treat this file as if it were in the public domain.
-}
module Main where
import Graphics.SOE.Gtk
main = runGraphics $
do w <- openWindowEx "Bouncing Ball" Nothing (Just (300, 300)) drawBufferedGraphic
let loop x y xd yd
= do setGraphi... | Fix ball soe demo to work with newer soe api | Fix ball soe demo to work with newer soe api
| Haskell | lgpl-2.1 | haskell-gi/gi-gtk-examples |
31f9dc1641125e942df44497e58d0a5a08c539eb | src/Bash/Config/Expand.hs | src/Bash/Config/Expand.hs | -- | Shell expansions.
module Bash.Config.Expand
( unquote
, expandWords
, expandValue
) where
import Bash.Config.Types
unquote :: String -> String
unquote = undefined
expandWords :: [String] -> Bash [String]
expandWords = undefined
expandValue :: Value -> Bash Value
expandValue = undefined
| -- | Shell expansions.
module Bash.Config.Expand
( unquote
, expandWords
, expandValue
) where
import Bash.Config.Types
unquote :: String -> String
unquote = id -- TODO
expandWords :: [String] -> Bash [String]
expandWords = return -- TODO
expandValue :: Value -> Bash Value
expandValue = return --... | Add dummy implementations of expansions | Add dummy implementations of expansions
| Haskell | bsd-3-clause | knrafto/bash-config |
1692349ec0e0167e3d7ce43c917643bfe7a92c8e | src/HaskellWorks/Data/Json/Succinct/Transform.hs | src/HaskellWorks/Data/Json/Succinct/Transform.hs | module HaskellWorks.Data.Json.Succinct.Transform
( jsonToInterestBits
, jsonToInterestBalancedParens
) where
import qualified Data.ByteString as BS
import Data.Conduit
import HaskellWorks.Data.Conduit.Json
import HaskellWorks.Data.Conduit.List
jsonToInterestBits :: [... | module HaskellWorks.Data.Json.Succinct.Transform
( jsonToInterestBits
, jsonToInterestBalancedParens
) where
import qualified Data.ByteString as BS
import Data.Conduit
import HaskellWorks.Data.Conduit.Json
import HaskellWorks.Data.Conduit.Json.Blank
import ... | Use blanked json to optimise balanced parens as well. | Use blanked json to optimise balanced parens as well.
| Haskell | bsd-3-clause | haskell-works/hw-bits |
e82538d4e6de14f62bf19b88ecb42dd73495c8fb | 189252/A.hs | 189252/A.hs | import Control.Monad
import Data.List
import Data.Maybe
import Text.Printf
main = do
tests <- readLn
forM_ [1..tests] $ \ caseNum -> do
str <- getLine
let digify c = case elemIndex c (nub str) of
Just 0 -> 1
Just 1 -> 0
Just n -> n
Nothing -> error "The im... | import Control.Monad
import Data.List
import Data.Maybe
import Text.Printf
main = do
tests <- readLn
forM_ [1..tests] $ \ caseNum -> do
str <- getLine
let ans = foldl (\x y -> x*base + y) 0 . map digify $ str where
digify c = case elemIndex c (nub str) of
Just 0 -> 1
... | Move intermediates into where clause | Move intermediates into where clause
| Haskell | mit | marknsikora/codejam,marknsikora/codejam |
e92d7cf642de8d002d78f0421b449293cd7ecee5 | Development/Shake/Shake.hs | Development/Shake/Shake.hs |
-- | The main entry point that calls all the default rules
module Development.Shake.Shake(shake) where
import Development.Shake.Types
import Development.Shake.Core
import Development.Shake.Directory
import Development.Shake.File
import Development.Shake.Rerun
-- | Main entry point for running Shake build systems. ... |
-- | The main entry point that calls all the default rules
module Development.Shake.Shake(shake) where
import Development.Shake.Types
import Development.Shake.Core
import Development.Shake.Directory
import Development.Shake.File
import Development.Shake.Rerun
-- | Main entry point for running Shake build systems. ... | Improve the documentation a bit | Improve the documentation a bit
| Haskell | bsd-3-clause | ndmitchell/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake,nh2/shake,nh2/shake,nh2/shake |
c5a9420265850c7f83896819e43f1b75a834a5d8 | 6234486/A.hs | 6234486/A.hs | import Control.Applicative
import Control.Monad
import Data.List
import Data.Ord
import Text.Printf
import qualified Data.Set as Set
main = do
tests <- readLn
forM_ [1..tests] $ \ caseNum -> do
n <- readLn
pairs <- replicateM n $ words <$> getLine
let sortedPairs = sortBy (comparing head) . map sort... | import Control.Applicative
import Control.Monad
import Data.List
import Data.Ord
import Text.Printf
import qualified Data.Set as Set
main = do
tests <- readLn
forM_ [1..tests] $ \ caseNum -> do
n <- readLn
pairs <- replicateM n $ words <$> getLine
let sortedPairs = sortBy (comparing head) . map sort... | Simplify expression by reducing to bool equation | Simplify expression by reducing to bool equation
| Haskell | mit | marknsikora/codejam,marknsikora/codejam |
fbdac6b630e1c77b15d0c5fae0e579158cbc8ca0 | xmonad.hs | xmonad.hs | import XMonad
import XMonad.Config.Xfce
import XMonad.Util.EZConfig
import XMonad.Hooks.EwmhDesktops
import XMonad.Layout.NoBorders
main = xmonad $ xfceConfig
{ modMask = mod4Mask
, terminal = "xfce4-terminal"
, manageHook = myManageHook <+> manageHook xfceConfig
, layoutHook = smartBorders $ layoutHoo... | import XMonad
import XMonad.Config.Xfce
import XMonad.Util.EZConfig
import XMonad.Layout.NoBorders
import qualified XMonad.StackSet as W
import XMonad.Util.WindowProperties
import Data.Monoid
main :: IO ()
main = xmonad $ xfceConfig
{ modMask = mod4Mask
, terminal = "xfce4-terminal"
, manageHook = hideNoti... | Hide notifications in mpv and xbmc | Hide notifications in mpv and xbmc
| Haskell | mit | paretje/dotfiles,paretje/dotfiles,paretje/dotfiles,paretje/dotfiles,paretje/dotfiles |
e83cd83d66153b1df13d98f278602ef7bfcc8212 | Handler/Snippet.hs | Handler/Snippet.hs | module Handler.Snippet where
import Import
import Widget
import Model.Snippet.Api (getSnippet, updateSnippet)
import Network.Wai (lazyRequestBody)
getSnippetR :: Text -> Handler Html
getSnippetR snippetId = do
snippet <- liftIO $ getSnippet snippetId Nothing
mUserId <- maybeAuthId
mApiUser <- maybeApiUser... | module Handler.Snippet where
import Import
import Widget
import Model.Snippet.Api (getSnippet, updateSnippet)
import Network.Wai (lazyRequestBody)
getSnippetR :: Text -> Handler Html
getSnippetR snippetId = do
mUserId <- maybeAuthId
mApiUser <- maybeApiUser mUserId
snippet <- liftIO $ getSnippet snippetId... | Send token with get requests | Send token with get requests
| Haskell | mit | prasmussen/glot-www,vinnymac/glot-www,prasmussen/glot-www |
085d3368ad94a4e1a413a305876b829ffdcefbcf | tests/Network/BitTorrent/Exchange/BlockSpec.hs | tests/Network/BitTorrent/Exchange/BlockSpec.hs | module Network.BitTorrent.Exchange.BlockSpec (spec) where
import Control.Applicative
import Test.Hspec
import Test.QuickCheck
import Network.BitTorrent.Exchange.Block
instance Arbitrary a => Arbitrary (Block a) where
arbitrary = Block <$> arbitrary <*> arbitrary <*> arbitrary
instance Arbitrary BlockIx where
ar... | module Network.BitTorrent.Exchange.BlockSpec (spec) where
import Control.Applicative
import Test.Hspec
import Test.QuickCheck
import Network.BitTorrent.Exchange.Block
instance Arbitrary a => Arbitrary (Block a) where
arbitrary = Block <$> arbitrary <*> arbitrary <*> arbitrary
instance Arbitrary BlockIx where
ar... | Add a test for block bucket | Add a test for block bucket
| Haskell | bsd-3-clause | pxqr/bittorrent,DavidAlphaFox/bittorrent |
25e872600552d1d5dc554f170c4e7935e8935281 | src/Action/Test.hs | src/Action/Test.hs | {-# LANGUAGE ViewPatterns, TupleSections, RecordWildCards, ScopedTypeVariables, PatternGuards #-}
module Action.Test(actionTest) where
import Query
import Action.CmdLine
import Action.Search
import Action.Server
import General.Util
import Input.Type
import System.IO.Extra
actionTest :: CmdLine -> IO ()
actionTest T... | {-# LANGUAGE ViewPatterns, TupleSections, RecordWildCards, ScopedTypeVariables, PatternGuards #-}
module Action.Test(actionTest) where
import Query
import Action.CmdLine
import Action.Search
import Action.Server
import General.Util
import Input.Type
import System.IO.Extra
import Control.Monad
import Output.Items
imp... | Add some very coarse --deep testing | Add some very coarse --deep testing
| Haskell | bsd-3-clause | BartAdv/hoogle,wolftune/hoogle,wolftune/hoogle,BartAdv/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle,wolftune/hoogle,ndmitchell/hoogle,ndmitchell/hoogle,ndmitchell/hoogle |
ff09cfd4e529251d81c44fa8e622f7289654d92a | src/Text/Karver/Types.hs | src/Text/Karver/Types.hs | module Text.Karver.Types where
import Data.Text (Text)
data Tokens = Literal Text
| Identity Text
deriving (Show, Eq)
| module Text.Karver.Types where
import Data.Text (Text)
type Key = Text
data Tokens = Literal Text
| Identity Text
| Object Text Key
deriving (Show, Eq)
| Add Object type to Token optional types | Add Object type to Token optional types
| Haskell | bsd-3-clause | ibotty/stencil,sourrust/karver |
092efd524310cdfc718b416650336c6e83fd2423 | Example/Validate.hs | Example/Validate.hs | {-
Example program for TagSoup.
Detects basic syntax errors like isolated ampersands and unquoted attribute values.
-}
module Main where
import Text.HTML.TagSoup
import Text.HTML.TagSoup.Position
import System.Environment
validate :: FilePath -> String -> String
validate file input = unlines
[toReportText (setFi... | {-
Example program for TagSoup.
Detects basic syntax errors like isolated ampersands and unquoted attribute values.
-}
module Main where
import Text.HTML.TagSoup
import System.Environment
validate :: FilePath -> String -> String
validate file = unlines . f . parseTagsOptions opts
where
opts = options{opt... | Change the validate program to still work | Change the validate program to still work | Haskell | bsd-3-clause | silkapp/tagsoup |
fe2655b6cd60d09311e87e1aa8736a3bbd847d9b | src/Config.hs | src/Config.hs | module Config (
autoconfRules, configureRules, cfgPath
) where
import Development.Shake
import Development.Shake.Command
import Development.Shake.FilePath
import Development.Shake.Rule
import Control.Applicative
import Control.Monad
import Base
cfgPath :: FilePath
cfgPath = "shake" </> "cfg"
autoconfRules ::... | module Config (
autoconfRules, configureRules, cfgPath
) where
import Base
cfgPath :: FilePath
cfgPath = "shake" </> "cfg"
autoconfRules :: Rules ()
autoconfRules = do
"configure" %> \out -> do
copyFile' (cfgPath </> "configure.ac") "configure.ac"
cmd "bash autoconf" -- TODO: get rid of '... | Remove redundant imports, add TODO's. | Remove redundant imports, add TODO's.
| Haskell | bsd-3-clause | sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,snowleopard/shaking-up-ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,bgamari/shaking-up-ghc,snowleopard/hadrian,sdiehl/ghc,quchen/shaking-up-ghc,izgzhen/hadrian |
dd1e0fda50e6ccc61d2c754394061299acbe751d | haskell/robot-name/Robot.hs | haskell/robot-name/Robot.hs | module Robot
( mkRobot
, resetName
, robotName
) where
import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, readMVar, tryTakeMVar)
import System.Random (newStdGen, randomRs)
data Robot = Robot (MVar String)
mkRobot :: IO Robot
mkRobot = do
var <- newEmptyMVar
let robot = Robot var
resetName robot
ret... | module Robot
( mkRobot
, resetName
, robotName
) where
import GHC.Conc (TVar, atomically, newTVar, readTVar, writeTVar)
import System.Random (randomRIO)
data Robot = Robot (TVar String)
mkRobot :: IO Robot
mkRobot = do
var <- atomically $ newTVar ""
let robot = Robot var
resetName robot
return robot
resetNa... | Use TVar instead of MVar | Use TVar instead of MVar
| Haskell | mit | tfausak/exercism-solutions,tfausak/exercism-solutions,tfausak/exercism-solutions |
2589c84d2fa0b852d292eb0e0f77323f8d3af85f | 2974486/D.hs | 2974486/D.hs | import Control.Applicative
import Control.Lens
import Control.Monad
import Data.Ix
import Data.List
import Text.Printf
import qualified Data.Set as Set
main :: IO ()
main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
_ <- getLine
naomi <- Set.fromList . map read . words <$> getLine
ken <- Se... | import Control.Applicative
import Control.Lens
import Control.Monad
import Data.Ix
import Data.List
import Text.Printf
import qualified Data.Set as Set
main :: IO ()
main = do
tests <- readLn
forM_ [1..tests] $ \caseNum -> do
_ <- getLine
naomi <- Set.fromList . map (read . padBlock) . words <$> getLine
... | Use Int instead of double to avoid rounding error | Use Int instead of double to avoid rounding error
| Haskell | mit | marknsikora/codejam,marknsikora/codejam |
9295c757990adea443a33968f446d5d595244e2a | src/Main.hs | src/Main.hs | import System.IO
import Text.ParserCombinators.Parsec (eof)
import NGramCrackers.NGramCrackers
import NGramCrackers.ParagraphParsers
import Data.Char (toUpper)
import Data.List (intersperse)
import Control.Monad (liftM)
import Data.Either.Unwrap (fromRight)
main = do
inHandle <- openFile "NGramCrackers/spaceless... | import System.IO
import Text.ParserCombinators.Parsec (eof)
import NGramCrackers.NGramCrackers
import NGramCrackers.TupleManipulation
import NGramCrackers.ParagraphParsers
import Data.Char (toUpper)
import Data.List (intersperse)
import Control.Monad (liftM)
import Data.Either.Unwrap (fromRight)
main = do
inHandle... | Add output of lexeme counts to stdout | Add output of lexeme counts to stdout
-- With the parser doing what it is supposed to mostly, it
was necessary to include a function to put the count tuple
into a string for printing.
-- Added the TupleManipulation import
-- Will be useful to clean up the excess, trial and error code,
most of wh... | Haskell | agpl-3.0 | R-Morgan/NGramCrackers |
dea38840a496bebd16e339fdd095fde42ad92c89 | haskell/robot-simulator/Robot.hs | haskell/robot-simulator/Robot.hs | module Robot
( Bearing(..)
, Robot
, bearing
, coordinates
, mkRobot
, simulate
, turnLeft
, turnRight
) where
type Point = (Int, Int)
data Bearing = North
| East
| South
| West
deriving (Bounded, Enum, Eq, Show)
data Robot = Robot
{ bearing :: Bearing
, co... | module Robot
( Bearing(..)
, Robot
, bearing
, coordinates
, mkRobot
, simulate
, turnLeft
, turnRight
) where
import Data.List (foldl')
type Point = (Int, Int)
data Bearing = North
| East
| South
| West
deriving (Bounded, Enum, Eq, Show)
data Robot = Robot
{ ... | Use a fold instead of recursion | Use a fold instead of recursion
| Haskell | mit | tfausak/exercism-solutions,tfausak/exercism-solutions,tfausak/exercism-solutions |
80e0b922c21a2063ac4adcabbc0128325e1158a7 | tests/Benchmark.hs | tests/Benchmark.hs | module Main where
import qualified Data.ByteString.Lazy as L
import Data.Binary
import Data.Binary.Put
import Control.Exception
import System.CPUTime
main :: IO ()
main = do
word8
time :: String -> IO a -> IO a
time label f = do
putStr (label ++ " ")
start <- getCPUTime
v <- f
end <- getC... | module Main where
import qualified Data.ByteString.Lazy as L
import Data.Binary
import Data.Binary.Put
import Control.Exception
import System.CPUTime
main :: IO ()
main = do
word8
word16
word32
word64
time :: String -> IO a -> IO a
time label f = do
putStr (label ++ " ")
start <- getCPUTime... | Make the silly benchmark slightly better | Make the silly benchmark slightly better
| Haskell | bsd-3-clause | bergmark/binary,beni55/binary,flowbox-public/binary,ezyang/binary,flowbox-public/binary,beni55/binary,basvandijk/binary,fpco/binary,x456/binary |
2251e5402634fdee6657bea4d952f87ffce85f89 | tests/CreateCommentTest.hs | tests/CreateCommentTest.hs | {-# LANGUAGE OverloadedStrings #-}
module CreateCommentTest
( createCommentSpecs
) where
import TestImport
createCommentSpecs :: Spec
createCommentSpecs =
ydescribe "POST /api/v1/comments" $ do
yit "responds with 201 created" $ do
postBody CommentsR $ commentJSON "" ""
sta... | {-# LANGUAGE OverloadedStrings #-}
module CreateCommentTest
( createCommentSpecs
) where
import TestImport
createCommentSpecs :: Spec
createCommentSpecs =
ydescribe "POST /api/v1/comments" $ do
yit "responds with 201 created" $ do
postBody CommentsR $ commentJSON "" ""
sta... | Add spec for error handling | Add spec for error handling
| Haskell | mit | peterwang/carnival,thoughtbot/carnival,vaporware/carnival |
b448879649130b48e5aa0fff9f024c485ebc1929 | data/HLint_Hints.hs | data/HLint_Hints.hs |
import HLint.HLint
-- Hints that apply only to the HLint source code
error = QVarOp a (UnQual b x) ==> toNamed x
error = QConOp a (UnQual b x) ==> toNamed x
error = UnQual a (Symbol b x) ==> toNamed x
error = UnQual a (Ident b x) ==> toNamed x
error = idea Error ==> err
error = idea Warning ==> warn
-- deliberate... |
import "hint" HLint.HLint
-- Hints that apply only to the HLint source code
error = QVarOp a (UnQual b x) ==> toNamed x
error = QConOp a (UnQual b x) ==> toNamed x
error = UnQual a (Symbol b x) ==> toNamed x
error = UnQual a (Ident b x) ==> toNamed x
error = idea Error ==> err
error = idea Warning ==> warn
-- del... | Make sure you properly import the hlint rules | Make sure you properly import the hlint rules | Haskell | bsd-3-clause | mpickering/hlint,ndmitchell/hlint,bitemyapp/hlint,ndmitchell/hlint,gibiansky/hlint,eigengrau/hlint |
0fd880a1bbb1fb9252e3deaae8fb43f3fdbe7c5a | code/drasil-lang/lib/Language/Drasil/Misc.hs | code/drasil-lang/lib/Language/Drasil/Misc.hs | -- | A collection of 'String'-handling routines as well as one for making tables.
module Language.Drasil.Misc(mkTable, repUnd) where
{- |
Create a table body (not including header row) by applying the given
functions to the column elements of the table rows (in order).
The first argument is a list of functions t... | -- | A collection of 'String'-handling routines as well as one for making tables.
module Language.Drasil.Misc(mkTable, repUnd) where
{- |
Create a table body (not including header row) by applying the given
functions to the column elements of the table rows (in order).
The first argument is a list of functions t... | Simplify mkTable, and remove error | Simplify mkTable, and remove error
| Haskell | bsd-2-clause | JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software |
2c96b37de12d1a389134e35a5f91bf5c9526e836 | ihaskell-display/ihaskell-plot/IHaskell/Display/Plot.hs | ihaskell-display/ihaskell-plot/IHaskell/Display/Plot.hs | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-}
module IHaskell.Display.Plot where
import ClassyPrelude
import qualified Data.ByteString.Char8 as Char
import Graphics.Rendering.Plot
import IHaskell.Display
instance IHaskellDisplay (Figure ()) where
display fig... | {-# LANGUAGE NoImplicitPrelude #-}
module IHaskell.Display.Plot where
import ClassyPrelude
import qualified Data.ByteString.Char8 as Char
import Graphics.Rendering.Plot
import IHaskell.Display
instance IHaskellDisplay (Figure a) where
display fig = do
let figure = fig >> return... | Generalize ihaskell-plot to work for all types | Generalize ihaskell-plot to work for all types
| Haskell | mit | beni55/IHaskell,kfiz/IHaskell,thomasjm/IHaskell,gibiansky/IHaskell,wyager/IHaskell,thomasjm/IHaskell,artuuge/IHaskell,kfiz/IHaskell,artuuge/IHaskell,artuuge/IHaskell,thomasjm/IHaskell,kfiz/IHaskell,beni55/IHaskell,wyager/IHaskell,sumitsahrawat/IHaskell,beni55/IHaskell,franklx/IHaskell,kfiz/IHaskell,franklx/IHaskell,sum... |
34756107c8acc9bf6a2decc7dad18d64d3a87d63 | test/integration/tests/3863-purge-command/Main.hs | test/integration/tests/3863-purge-command/Main.hs | {-# LANGUAGE ViewPatterns #-}
import StackTest
import Data.Maybe (listToMaybe, fromMaybe)
import System.Directory
import System.FilePath
import Data.List.Extra (trimEnd)
newline :: Char
newline = '\n'
main :: IO ()
main =
-- For these commands, we'll need to know the `dist` directory.
-- This is usually `.stack-... | {-# LANGUAGE ViewPatterns #-}
import StackTest
import Data.Maybe (listToMaybe, fromMaybe)
import System.Directory
import System.FilePath
import Data.List.Extra (trimEnd)
main :: IO ()
main =
-- For these commands, we'll need to know the `dist` directory.
-- This is usually `.stack-work/dist/$compiler-variant/Caba... | Remove definition of newline that is no longer necessary | Remove definition of newline that is no longer necessary
| Haskell | bsd-3-clause | juhp/stack,juhp/stack |
4e9aa252de4d415f728678bb4059f65bc121555d | supervisor/GetLineNonBlocking.hs | supervisor/GetLineNonBlocking.hs | {-# LANGUAGE OverloadedStrings #-}
module GetLineNonBlocking where
import Control.Applicative ((<$>))
import Control.Arrow (second)
import Control.Concurrent.MVar (MVar, modifyMVar_, readMVar)
import qualified Data.ByteString.Char8 as B
import Data.Maybe (listToMaybe)
import Data.Monoid ((<>))
import System.IO (Handl... | {-# LANGUAGE OverloadedStrings #-}
module GetLineNonBlocking where
import Control.Applicative ((<$>))
import Control.Arrow (second)
import Control.Concurrent.MVar (MVar, modifyMVar_, readMVar)
import Control.Monad (unless)
import qualified Data.ByteString.Char8 as B
import Data.Maybe (listToMaybe)
import Data.Monoid ... | Fix memory leak in supervisor | Fix memory leak in supervisor
fixes #4
| Haskell | mit | shak-mar/botstrats |
153ff34189d6fd17ce7fba0e36f318019e2e2d7f | test/Test/Tinfoil/Hash.hs | test/Test/Tinfoil/Hash.hs | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Tinfoil.Hash where
import Data.ByteString (ByteString)
import Disorder.Core.UniquePair (UniquePair(..))
import P
import S... | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Tinfoil.Hash where
import Data.ByteString (ByteString)
import Disorder.Core.UniquePair (UniquePair(..))
import P
import S... | Add referential transparency test for hashSHA256 | Add referential transparency test for hashSHA256
| Haskell | bsd-3-clause | ambiata/tinfoil,ambiata/tinfoil |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.