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 |
|---|---|---|---|---|---|---|---|---|---|
6a84b9c70f5de404ce6f5174a39dde6c6b37cedb | src/Hint/List.hs | src/Hint/List.hs | {-
Find and match:
1:2:[] -> [1,2]
['a':'b'] -> "ab"
[a]++b -> a : b, but only if not in a chain of ++'s
"c"++x -> 'c':x, but only if not in a chain of ++'s
-}
module Hint.List where
import Hint.Util
import Hint.Type
import Language.Haskell.Exts
listHint :: Hint
listHint = listDecl
listDecl :... | {-
Find and match:
1:2:[] -> [1,2]
['a':'b'] -> "ab"
[a]++b -> a : b, but only if not in a chain of ++'s
"c"++x -> 'c':x, but only if not in a chain of ++'s
-}
module Hint.List where
import Hint.Util
import Hint.Type
import Language.Haskell.Exts
listHint :: Hint
listHint = listDecl
listDecl :... | Refactor the list to make it easier to add more tests | Refactor the list to make it easier to add more tests | Haskell | bsd-3-clause | eigengrau/hlint,bitemyapp/hlint,ndmitchell/hlint,gibiansky/hlint,ndmitchell/hlint,mpickering/hlint |
aad169ce0f24e9497c529358d90f2743b1230c75 | src/Mafia/Home.hs | src/Mafia/Home.hs | {-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
module Mafia.Home
( getMafiaHome
, getMafiaDir
, ensureMafiaDir
) where
import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.Text as T
import Maf... | {-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
module Mafia.Home
( getMafiaHome
, getMafiaDir
, ensureMafiaDir
) where
import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.Text as T
import Maf... | Resolve symbolic links when fetching MAFIA_HOME | Resolve symbolic links when fetching MAFIA_HOME
| Haskell | bsd-3-clause | ambiata/mafia |
dc6fc2be666cfcd04192030d29076d0d167e069e | src/Optimizer/Dataflow.hs | src/Optimizer/Dataflow.hs | module Optimizer.Dataflow(getLiveVariables) where
import Datatypes
import Data.List
getLiveVariables :: [IR] -> [[Int]]
getLiveVariables ir =
let live = foldr analyseLiveness [[]] ir
shiftedLive = tail live ++ [[]] in
map (uncurry union) (zip live shiftedLive)
analyseLiveness :: IR -> [[Int]] -> [[Int]]... | module Optimizer.Dataflow(getLiveVariables) where
import Datatypes
import Data.List
import Debug.Trace
getLiveVariables :: [IR] -> [[Int]]
getLiveVariables ir =
map (uncurry union) (zip live shiftedLive)
where live = foldr analyseLiveness [[]] ir
shiftedLive = tail live ++ [[]]
analyseLiveness :: IR -> ... | Fix bug in liveness when same operand appears twice in righthand | Fix bug in liveness when same operand appears twice in righthand
| Haskell | mit | aleksanb/hdc |
5f773e1a1353d3e49666fad9effeceb4c10a9909 | testsuite/Main.hs | testsuite/Main.hs | module Main where
import Data.List
import System.Environment
import Tests.Frenetic.NetCore.TestCompiler
import Tests.Frenetic.NetCore.TestNetCore
import Tests.Frenetic.Slices.TestCompile
import Tests.Frenetic.Slices.TestEndToEnd
import Tests.Frenetic.Slices.TestSlice
import Tests.Frenetic.Slices.TestVerification
impo... | module Main where
import Data.List
import System.Environment
import Tests.Frenetic.NetCore.TestCompiler
import Tests.Frenetic.NetCore.TestNetCore
import Tests.Frenetic.Slices.TestCompile
import Tests.Frenetic.Slices.TestEndToEnd
import Tests.Frenetic.Slices.TestSlice
import Tests.Frenetic.Slices.TestVerification
impo... | Move all SAT-based tests under --test-option=sat flag | Move all SAT-based tests under --test-option=sat flag
| Haskell | bsd-3-clause | frenetic-lang/netcore-1.0,frenetic-lang/netcore-1.0 |
5733816d524f791f8968e6c9154a10853906a5e8 | src/L0C/InternalRep.hs | src/L0C/InternalRep.hs | module L0C.InternalRep
( module L0C.InternalRep.Syntax
, module L0C.InternalRep.Attributes
, module L0C.InternalRep.Traversals
, module L0C.InternalRep.Pretty
, newNameSourceForProg
, Several(..)
, justOne
)
where
import Text.PrettyPrint.Mainland
import L0C.InternalRep.Syntax
import L0C.InternalRep.... | module L0C.InternalRep
( module L0C.InternalRep.Syntax
, module L0C.InternalRep.Attributes
, module L0C.InternalRep.Traversals
, module L0C.InternalRep.Pretty
, newNameSourceForProg
, Several(..)
, justOne
)
where
import Text.PrettyPrint.Mainland
import L0C.InternalRep.Syntax
import L0C.InternalRep.... | Add Eq, Ord, Show instances for Several. | Add Eq, Ord, Show instances for Several.
| Haskell | isc | diku-dk/futhark,ihc/futhark,HIPERFIT/futhark,diku-dk/futhark,diku-dk/futhark,mrakgr/futhark,mrakgr/futhark,diku-dk/futhark,diku-dk/futhark,HIPERFIT/futhark,HIPERFIT/futhark,CulpaBS/wbBach,ihc/futhark,mrakgr/futhark,ihc/futhark |
4c4776c1352e50997604d9fa9682b2f9aeda0fba | src/Reflex/Dom/Time.hs | src/Reflex/Dom/Time.hs | module Reflex.Dom.Time where
import Reflex
import Reflex.Dom.Class
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
import Data.Fixed
import Data.Time.Clock
-- | Send events over time with the given basis time and interval
-- If the system starts running behind, occurrences will be drop... | module Reflex.Dom.Time where
import Reflex
import Reflex.Dom.Class
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
import Data.Fixed
import Data.Time.Clock
-- | Send events over time with the given basis time and interval
-- If the system starts running behind, occurrences will be drop... | Fix timer code in tickLossy | Fix timer code in tickLossy
| Haskell | bsd-3-clause | reflex-frp/reflex-dom,reflex-frp/reflex-dom |
805e6c0ffbf5cc5c4b2cc1cb968a912b18525c28 | examples/qsort/vect.hs | examples/qsort/vect.hs | module Main where
import QSortVect
import Control.Exception (evaluate)
import System.Console.GetOpt
import qualified System.Random as R
import Data.Array.Parallel.Prelude (PArray, toUArrPA, fromUArrPA')
import qualified Data.Array.Parallel.Unlifted as U
import Bench.Benchmark
import Bench.Options
import Debug.Trace... | module Main where
import QSortVect
import Control.Exception (evaluate)
import System.Console.GetOpt
import qualified System.Random as R
import Data.Array.Parallel.PArray (PArray)
import qualified Data.Array.Parallel.PArray as P
import Bench.Benchmark
import Bench.Options
import Debug.Trace
generateVector :: Int ->... | Use new stuff in qsort | Use new stuff in qsort | Haskell | bsd-3-clause | mainland/dph,mainland/dph,mainland/dph |
f723f0353c69576ab8a68e54aaff54804e7ac051 | test/EarleyExampleSpec.hs | test/EarleyExampleSpec.hs | module EarleyExampleSpec where
import EarleyExample (grammar, NumberWord, Expected)
import qualified Text.Earley as E
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.List as List
import Test.Hspec (Spec, hspec, describe, it, shouldBe, shouldSatisfy)
import Test.Hspec.QuickCheck (prop)
import Tes... | module EarleyExampleSpec where
import EarleyExample (grammar, NumberWord, Expected)
import qualified Text.Earley as E
import qualified Data.List.NonEmpty as NonEmpty
import Test.Hspec (Spec, hspec, describe, it, shouldMatchList)
-- | Required for auto-discovery.
spec :: Spec
spec =
describe "EarleyExample" $ do
... | Clean up Earley test code. | Clean up Earley test code.
| Haskell | bsd-3-clause | FranklinChen/twenty-four-days2015-of-hackage |
6cc0f902a3aec5a9161a9268c9ad4598ad4a5e36 | Setup.hs | Setup.hs | module Main (main) where
import Distribution.Simple
main :: IO ()
main = defaultMainWithHooks defaultUserHooks
| module Main (main) where
import Distribution.Simple
main :: IO ()
main = defaultMainWithHooks autoconfUserHooks
| Replace obsolete `defaultUserHooks` by `autoconfUserHooks` | Replace obsolete `defaultUserHooks` by `autoconfUserHooks`
This is to avoid the warning printed otherwise when executing `Setup.hs`:
Setup.hs:6:29: Warning:
In the use of ‘defaultUserHooks’
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need ... | Haskell | bsd-3-clause | coreyoconnor/win32,coreyoconnor/win32,Heather/win32,Heather/win32 |
f664e70b9f0c76550e0f228df29bf4c0192723e3 | grin/test/Transformations/Optimising/CSESpec.hs | grin/test/Transformations/Optimising/CSESpec.hs | {-# LANGUAGE OverloadedStrings, QuasiQuotes, ViewPatterns #-}
module Transformations.Optimising.CSESpec where
import Transformations.Optimising.CSE
import Test.Hspec
import Grin
import GrinTH
import Test hiding (newVar)
import Assertions
import ParseGrin
import TypeEnv
import Data.Monoid
import Control.Arrow
runTes... | {-# LANGUAGE OverloadedStrings, QuasiQuotes, ViewPatterns #-}
module Transformations.Optimising.CSESpec where
import Transformations.Optimising.CSE
import Test.Hspec
import Grin
import GrinTH
import Test hiding (newVar)
import Assertions
import ParseGrin
import TypeEnv
import Data.Monoid
import Control.Arrow
runTes... | Add simple tests for some optimisations. | Add simple tests for some optimisations.
| Haskell | bsd-3-clause | andorp/grin,andorp/grin |
fc9353626851961e97971775aedf8e18b56a2285 | src/Model/Format/Types.hs | src/Model/Format/Types.hs | {-# LANGUAGE TemplateHaskell, OverloadedStrings, TypeFamilies #-}
module Model.Format.Types
( Format(..)
, unknownFormat
) where
import qualified Data.ByteString as BS
import Data.Function (on)
import Data.Int (Int16)
import qualified Data.Text as T
import Instances.TH.Lift ()
import Language.Haskell.TH.Lift (de... | {-# LANGUAGE TemplateHaskell, OverloadedStrings, TypeFamilies #-}
module Model.Format.Types
( Format(..)
, unknownFormat
) where
import qualified Data.ByteString as BS
import Data.Function (on)
import Data.Int (Int16)
import qualified Data.Text as T
import Instances.TH.Lift ()
import Language.Haskell.TH.Lift (de... | Remove redundant definition of /=, comment out unused Kinded instance | Remove redundant definition of /=, comment out unused Kinded instance
| Haskell | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
195241607e019f82ede9ff6c5695ba880cd2712a | Game/LambdaHack/Common/Ability.hs | Game/LambdaHack/Common/Ability.hs | {-# LANGUAGE DeriveGeneric #-}
-- | AI strategy abilities.
module Game.LambdaHack.Common.Ability
( Ability(..)
) where
import Data.Binary
import Data.Hashable (Hashable)
import GHC.Generics (Generic)
-- | Actor and faction abilities corresponding to client-server requests.
data Ability =
AbMove
| AbMelee
... | {-# LANGUAGE DeriveGeneric #-}
-- | AI strategy abilities.
module Game.LambdaHack.Common.Ability
( Ability(..)
) where
import Data.Binary
import Data.Hashable (Hashable)
import GHC.Generics (Generic)
-- | Actor and faction abilities corresponding to client-server requests.
data Ability =
AbMove
| AbMelee
... | Define a Show instace for abilities | Define a Show instace for abilities
| Haskell | bsd-3-clause | LambdaHack/LambdaHack |
6d15b7de1e0dba0c678948e6851103e6037443d6 | 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
{ terminal = "xfce4-terminal"
, manageHook = myManageHook <+> manageHook xfceConfig
, layoutHook = smartBorders $ layoutHook xfceConfig
, focusFollowsMouse ... | 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 $ layoutHook xfc... | Use super key as modifier | Use super key as modifier
| Haskell | mit | paretje/dotfiles,paretje/dotfiles,paretje/dotfiles,paretje/dotfiles,paretje/dotfiles |
b625de8259ae61821fcfefc4290743d9eb70c71e | code/drasil-gool/GOOL/Drasil/CodeAnalysis.hs | code/drasil-gool/GOOL/Drasil/CodeAnalysis.hs | module GOOL.Drasil.CodeAnalysis (
Exception(loc, exc), printExc, hasLoc, exception, stdExc
) where
-- Stores exception information
-- Eq is needed so that the same exception doesn't get added multiple times
-- to the list of exceptions for a given method.
data Exception = Exc {
loc :: String, -- import string whe... | module GOOL.Drasil.CodeAnalysis (
Exception(loc, exc), printExc, hasLoc, exception, stdExc
) where
-- Stores exception information
-- Eq is needed so that the same exception doesn't get added multiple times
-- to the list of exceptions for a given method.
data Exception = Exc {
loc :: String, -- import string whe... | Remove catch-all case in hasLoc | Remove catch-all case in hasLoc
| 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 |
9fa491cd722af1cd576448b74e18d74cf577cfd8 | Example.hs | Example.hs |
module Example where
main xs = map head xs
|
module Example where
{-
main xs = map head xs
-}
{-
main x = neq x
neq = not . eq
eq x = x == (0::Int)
-}
main x y = neq (x::Int) y
neq x y = not (x == y)
| Add more examples, illuminating new bits | Add more examples, illuminating new bits | Haskell | bsd-3-clause | ndmitchell/firstify |
649c6455a3009585e0e646c5b2eb8b31c33c739c | src/Spire/Debug.hs | src/Spire/Debug.hs | module Spire.Debug where
import Data.IORef
import Debug.Trace
import System.IO.Unsafe
----------------------------------------------------------------------
setDebugging :: Bool -> IO ()
setDebugging = writeIORef debuggingEnabledRef
infix 0 `debug`
debug :: a -> String -> a
debug x msg =
if getDebugging
then tr... | {-# GHC_OPTIONS -O0 #-}
module Spire.Debug where
import Data.IORef
import Debug.Trace
import System.IO.Unsafe
----------------------------------------------------------------------
setDebugging :: Bool -> IO ()
setDebugging = writeIORef debuggingEnabledRef
infix 0 `debug`
debug :: a -> String -> a
debug x msg =
i... | Improve debug code and add explanatory notes (Really ...). | Improve debug code and add explanatory notes (Really ...).
Forgot to actually check in the referenced debug code and notes last
time :P Here they are.
| Haskell | bsd-3-clause | spire/spire |
2b47c0ee1ba6696e208c9b9a23b4782ebd7d60df | src/Main.hs | src/Main.hs | module Main where
import System.Environment
import PLexceptGOTOdotNET
main = do
args <- getArgs
case args of
["parse", fileName] ->
workOnFile pa fileName
["labelloops", fileName] ->
loopLabelFile fileName
["interpret", fileName] ->
runFile fileName
... | module Main where
import System.Environment
import PLexceptGOTOdotNET
main = do
args <- getArgs
case args of
["parse", fileName] ->
workOnFile pa fileName
["labelloops", fileName] ->
loopLabelFile fileName
["interpret", fileName] ->
runFile fileName
... | Update usage message: remove options that no longer exist. | Update usage message: remove options that no longer exist.
| Haskell | unlicense | catseye/PL-GOTO.NET |
51c27f7702f165e7307b2df16ef5bbe83896e4b9 | haskell/greek-grammar/src/Text/Greek/Json.hs | haskell/greek-grammar/src/Text/Greek/Json.hs | {-# LANGUAGE DeriveGeneric #-}
module Text.Greek.Json where
import Control.Lens
import Data.Aeson
import Data.Text (Text)
import GHC.Generics
import System.FilePath
import qualified Text.Greek.Paths as Path
import qualified Text.Greek.Source.All as All
import qualified Text.Greek.Script.Word as Word
import qualified ... | {-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.Greek.Json where
import Control.Lens
import Data.Aeson
import Data.Text (Text)
import GHC.Generics
import System.FilePath
import qualified Text.Greek.Paths as Path
import qualified Text.Greek.Source.All as All
import qualified Text.Greek.Sc... | Tweak json data for UI. | Tweak json data for UI.
| Haskell | mit | scott-fleischman/greek-grammar,scott-fleischman/greek-grammar |
c6c5348b9184fa51be7ebc8be972029d8b355255 | src/Input/Download.hs | src/Input/Download.hs | {-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -- Use conduitManagerSettings to work with http-conduit-2.1.6 and below
module Input.Download(downloadInput) where
import System.FilePath
import Control.Monad.Extra
import System.Directory
import Data.Conduit.Binary (sinkFile)
import q... | {-# LANGUAGE TupleSections #-}
module Input.Download(downloadInput) where
import System.FilePath
import Control.Monad.Extra
import System.Directory
import Data.Conduit.Binary (sinkFile)
import qualified Network.HTTP.Conduit as C
import Network.Connection
import qualified Data.Conduit as C
import General.Util
import G... | Remove an unneeded deprecation warning | Remove an unneeded deprecation warning
| Haskell | bsd-3-clause | ndmitchell/hoogle,ndmitchell/hoogle,ndmitchell/hoogle |
a0dd26894804aea2d0e77fcbf63eaf84068e8491 | Data/CapNProto/Untyped.hs | Data/CapNProto/Untyped.hs | module Data.CapNProto.Untyped where
import qualified Data.ByteString as B
import Data.Word
import Data.Int
import Data.Vector ((!))
import qualified Data.Vector as V
import Control.Monad.Catch (MonadThrow, throwM)
import Control.Exception (ArrayException(IndexOutOfBounds))
type Segment = B.ByteString
type Message = ... | module Data.CapNProto.Untyped where
import qualified Data.ByteString as B
import Data.Word
import Data.Int
import Data.Vector ((!))
import qualified Data.Vector as V
import Control.Monad.Catch (MonadThrow, throwM)
import Control.Exception (ArrayException(IndexOutOfBounds))
type Segment = B.ByteString
type Message = ... | Add a `div` 8, now that we're reading ByteStrings. | Add a `div` 8, now that we're reading ByteStrings.
| Haskell | mit | zenhack/haskell-capnp |
fee30c7ec7044ab3f6176ce8f4eb39a8a5f64655 | Language/Hakaru/Types.hs | Language/Hakaru/Types.hs | {-# LANGUAGE RankNTypes, DeriveDataTypeable, StandaloneDeriving #-}
{-# OPTIONS -W #-}
module Language.Hakaru.Types where
import Data.Dynamic
import Control.Monad.Primitive
import qualified System.Random.MWC as MWC
type PRNG m = MWC.Gen (PrimState m)
-- Basic types for conditioning and conditioned sampler
data Dens... | {-# LANGUAGE RankNTypes, DeriveDataTypeable, StandaloneDeriving #-}
{-# OPTIONS -W #-}
module Language.Hakaru.Types where
import Data.Dynamic
import Control.Monad.Primitive
import qualified System.Random.MWC as MWC
type PRNG m = MWC.Gen (PrimState m)
-- Basic types for conditioning and conditioned sampler
data Dens... | Use Typeable1 (not Typeable) for ghc 7.6 compat | Use Typeable1 (not Typeable) for ghc 7.6 compat
| Haskell | bsd-3-clause | zachsully/hakaru,suhailshergill/hakaru,bitemyapp/hakaru,zachsully/hakaru,zaxtax/hakaru,zaxtax/hakaru |
59d43c605c985f3981475eaf859950413ae85391 | tests/Test/Nero/Param.hs | tests/Test/Nero/Param.hs | {-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.Nero.Param (tests) where
import Data.Proxy (Proxy(..))
import Data.ByteString.Lazy (ByteString)
import Test.Tasty (TestTree, testGroup)
import Test.SmallCheck.Series (Serial,CoSerial)
import Test... | {-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.Nero.Param (tests) where
import Data.Proxy (Proxy(..))
import Data.ByteString.Lazy (ByteString)
import Test.Tasty (TestTree, testGroup)
import Test.SmallCheck.Series (Serial,CoSerial)
import Test... | Test Applicative laws for `Values` | Test Applicative laws for `Values`
| Haskell | bsd-3-clause | plutonbrb/nero |
04af017bf0ef1745a2dc1bebdf6a3837177db9a1 | XMonad/Actions/SinkAll.hs | XMonad/Actions/SinkAll.hs | -----------------------------------------------------------------------------
-- |
-- Module : Xmonad.Actions.SinkAll
-- License : BSD3-style (see LICENSE)
-- Stability : unstable
-- Portability : unportable
--
-- Provides a simple binding that pushes all floating windows on the current
-- workspace back... | -----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.SinkAll
-- License : BSD3-style (see LICENSE)
-- Stability : unstable
-- Portability : unportable
--
-- Provides a simple binding that pushes all floating windows on the current
-- workspace back... | Correct caps in module header. | Correct caps in module header. | Haskell | bsd-3-clause | MasseR/xmonadcontrib,MasseR/xmonadcontrib |
20b59b0860f00b75f0b2680b4274f4f5d4c19804 | examples/MemoryManager.hs | examples/MemoryManager.hs | module MemoryManager where
import SoOSiM
import SoOSiM.Util
instance ComponentIface MemState where
initState = MemState [] empty
componentFun = memoryManager
data MemState =
MemState { localAddress :: [Int]
, remoteAddress :: IntMap ComponentId
}
memoryManager s (ComponentMsg senderI... | module MemoryManager where
import Data.Maybe
import Data.IntMap
import SoOSiM
data MemState =
MemState { localAddress :: [Int]
, remoteAddress :: IntMap ComponentId
}
memoryManager :: MemState -> ComponentInput -> SimM MemState
memoryManager s (ComponentMsg senderId msgContent) = do
let ad... | Update memoryManager example to reflect changes in SoOSiM.Util | Update memoryManager example to reflect changes in SoOSiM.Util
| Haskell | mit | christiaanb/SoOSiM,christiaanb/SoOSiM |
f5a7f1d9bf5a436baaa146e0e17f71d14e55cce8 | travis.hs | travis.hs |
import System.Time.Extra
import System.Process.Extra
main :: IO ()
main = do
-- retry 3 $ system_ "cabal install QuickCheck"
-- FIXME: Temporarily disabled --typecheck --quickcheck due to GHC 7.10 issues
system_ "hlint test +RTS -K512K" --typecheck --quickcheck
(time,_) <- duration $ system_ "hlint s... |
import System.Time.Extra
import System.Process.Extra
main :: IO ()
main = do
-- retry 3 $ system_ "cabal install QuickCheck"
-- FIXME: Temporarily disabled --typecheck --quickcheck due to GHC 7.10 issues
system_ "hlint test +RTS -K512K" --typecheck --quickcheck
(time,_) <- duration $ system_ "hlint s... | Enable the extra/future groups of tests | Enable the extra/future groups of tests
| Haskell | bsd-3-clause | ndmitchell/hlint,ndmitchell/hlint |
5d29d74d0047766f90288f9b86bb5c6bee302be1 | Development/Shake/Derived.hs | Development/Shake/Derived.hs |
module Development.Shake.Derived where
import Control.Monad
import Control.Monad.IO.Class
import System.Cmd
import System.Exit
import Development.Shake.Core
import Development.Shake.File
import Development.Shake.FilePath
system_ :: [String] -> Action ()
system_ (x:xs) = do
let cmd = unwords $ toNative x : xs
... |
module Development.Shake.Derived where
import Control.Monad
import Control.Monad.IO.Class
import System.Cmd
import System.Exit
import Development.Shake.Core
import Development.Shake.File
import Development.Shake.FilePath
system_ :: [String] -> Action ()
system_ (x:xs) = do
let cmd = unwords $ toNative x : xs
... | Add writeFileLines as a derived function | Add writeFileLines as a derived function
| Haskell | bsd-3-clause | ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,nh2/shake,ndmitchell/shake,nh2/shake,nh2/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake |
d89c7a43607990ed691d9f9121b14492c1e2d2d6 | tests/RegressionTests.hs | tests/RegressionTests.hs | module Main where
-- To generate the golden files use a script similiar to this one
-- > ghc -e 'compile example9 "tests/gold/example9" "example9" defaultOptions' tests/RegressionTests.hs
import Test.Framework
import Test.Golden
import qualified Prelude
import Feldspar
import Feldspar.Compiler
example9 :: Data Int3... | module Main where
-- To generate the golden files use a script similiar to this one
-- > ghc -ilib -isrc -itests -e 'compile example9 "tests/gold/example9" "example9" defaultOptions' tests/RegressionTests.hs
import Test.Framework
import Test.Golden
import qualified Prelude
import Feldspar
import Feldspar.Compiler
e... | Update script for generating golden test programs | Update script for generating golden test programs
| Haskell | bsd-3-clause | emwap/feldspar-compiler,emwap/feldspar-compiler |
cccf2aa9d1cc9ff210b0b46de8e3ecb1b14e7c77 | src/Example.hs | src/Example.hs | module Example where
markdownExample :: String
markdownExample =
unlines ["Heading"
,"======="
,""
,"Sub-heading"
,"-----------"
,""
,"### Another deeper heading"
,""
,"Paragraphs are separated"
,"by a blank line."
,"... | module Example where
markdownExample :: String
markdownExample =
unlines ["markup.rocks"
,"============"
,""
,"> *markup.rocks* is a client-side app that lets you **edit**, **preview** and"
,"> **convert** between documents written in various markup languages in your"
... | Update markdown example to match readme | Update markdown example to match readme
| Haskell | mit | davidar/markup.rocks,davidar/markup.rocks,osener/markup.rocks,osener/markup.rocks |
ea7c3daf3835261e233e598b0d9211c644ed9fd4 | examples/quickhull/vectSVG.hs | examples/quickhull/vectSVG.hs |
-- This version prints a SVG of the test data and computed hull to stdout.
-- usage: vectSVG <POINTS>
--
import qualified Types as QH
import QuickHullVect (quickhull)
import qualified Data.Array.Parallel.Unlifted as U
import qualified Data.Array.Parallel.Prelude as P
import qualified Data.Array.Parallel.P... |
-- This version prints a SVG of the test data and computed hull to stdout.
-- usage: vectSVG <POINTS>
--
import qualified Types as QH
import QuickHullVect (quickhull)
import qualified Data.Array.Parallel.Unlifted as U
import qualified Data.Array.Parallel.Prelude as P
import qualified Data.Array.Parallel.P... | Add support for loading data from file to SVG QH | Add support for loading data from file to SVG QH | Haskell | bsd-3-clause | mainland/dph,mainland/dph,mainland/dph |
32a4c47f91a4b2247ed7dbe65ec8dadd29fb4f9f | test-report.hs | test-report.hs | #! /bin/sh
HPC_DIR=dist/hpc
cabal clean
cabal configure --enable-tests --enable-library-coverage
cabal build
cabal test
open ${HPC_DIR}/html/*/hpc-index.html
| #! /bin/sh
HPC_DIR=dist/hpc
cabal-dev clean
cabal-dev configure --enable-tests --enable-library-coverage
cabal-dev build
cabal-dev test
open ${HPC_DIR}/html/*/hpc-index.html
| Use cabal-dev for hpc report generation | Use cabal-dev for hpc report generation
| Haskell | bsd-3-clause | haskell-distributed/distributed-process-supervisor |
f59c8bd492350cd910f46479563719bfa50a1a7a | src/Language/Haskell/Ghcid/Util.hs | src/Language/Haskell/Ghcid/Util.hs | -- | Utility functions
-- Copyright Neil Mitchell 2014.
module Language.Haskell.Ghcid.Util
( dropPrefixRepeatedly
, outStrLn
, outStr
, allGoodMessage
) where
import Control.Concurrent.Extra
import System.IO.Unsafe
import Data.List
-- | Drop a prefix from a list, no matter how many times that prefix is pres... | -- | Utility functions
-- Copyright Neil Mitchell 2014.
module Language.Haskell.Ghcid.Util
( dropPrefixRepeatedly
, chunksOfWord
, outStrLn
, outStr
, allGoodMessage
) where
import Control.Concurrent.Extra
import System.IO.Unsafe
import Data.List.Extra
import Data.Char
-- | Drop a prefix from a list, no ... | Add a utility for splitting a string into chunks, but respecting word boundaries | Add a utility for splitting a string into chunks, but respecting word boundaries
| Haskell | bsd-3-clause | ndmitchell/ghcid |
8bc84112fbb2a3281de2070fd20b9440facb6327 | src/Cabal2Nix/Flags.hs | src/Cabal2Nix/Flags.hs | module Cabal2Nix.Flags ( configureCabalFlags ) where
import Distribution.Package
import Distribution.PackageDescription
configureCabalFlags :: PackageIdentifier -> FlagAssignment
configureCabalFlags (PackageIdentifier (PackageName name) _)
| name == "accelerate-examples"= [disable "opencl"]
| name == "git-annex" ... | module Cabal2Nix.Flags ( configureCabalFlags ) where
import Distribution.Package
import Distribution.PackageDescription
configureCabalFlags :: PackageIdentifier -> FlagAssignment
configureCabalFlags (PackageIdentifier (PackageName name) _)
| name == "accelerate-examples"= [disable "opencl"]
| name == "git-annex" ... | Enable ALSA support in xmobar. | Enable ALSA support in xmobar.
| Haskell | bsd-3-clause | psibi/cabal2nix,gridaphobe/cabal2nix,bennofs/cabal2nix,jb55/cabal2nix,dmalikov/cabal2nix,spencerjanssen/cabal2nix,Fuuzetsu/cabal2nix |
9200574e70a841f5194fc0071b077548d5b342ff | src/Text/Karver/Types.hs | src/Text/Karver/Types.hs | -- |
-- Module: Data.Karver.Types
-- Copyright: Jeremy Hull 2013
-- License: BSD3
--
-- Maintainer: Jeremy Hull <sourdrums@gmail.com>
-- Stability: experimental
-- Portability: unknown
--
-- Base types used throughout Karver.
module Text.Karver.Types
( Tokens(..)
, Value(..)
) where
import Data.Text (Te... | -- |
-- Module: Data.Karver.Types
-- Copyright: Jeremy Hull 2013
-- License: BSD3
--
-- Maintainer: Jeremy Hull <sourdrums@gmail.com>
-- Stability: experimental
-- Portability: unknown
--
-- Base types used throughout Karver.
module Text.Karver.Types
( Tokens(..)
, Value(..)
) where
import Data.Text (Te... | Fix spell in Tokens description | Fix spell in Tokens description
| Haskell | bsd-3-clause | ibotty/stencil,sourrust/karver |
f43340291723c4733503d5ef0fb67fbc19d69f61 | src/Clang/Monad.hs | src/Clang/Monad.hs | module Clang.Monad
( ClangApp
, runClangApp
) where
import Clang.Internal.ClangApp (ClangApp, runClangApp)
| {-# LANGUAGE RankNTypes #-}
module Clang.Monad
( ClangApp
, clangScope
) where
import Control.Monad.Trans (liftIO)
import Clang.Internal.ClangApp (ClangApp, runClangApp)
clangScope :: (forall s. ClangApp s a) -> ClangApp s' a
clangScope app = liftIO $ runClangApp app
{-# INLINEABLE clangScope #-}
| Replace the public runClangApp with clangScope | Replace the public runClangApp with clangScope
| Haskell | bsd-3-clause | ony/LibClang,chetant/LibClang,deech/LibClang,chetant/LibClang,deech/LibClang,deech/LibClang,ony/LibClang,ony/LibClang,deech/LibClang,chetant/LibClang,chetant/LibClang |
0ccc980e457343c696b64752b118a131444c000b | Data/Hashable/RandomSource.hs | Data/Hashable/RandomSource.hs | {-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Data.Hashable.RandomSource
(
getRandomBytes
, getRandomBytes_
) where
import Data.ByteString as B
import Data.ByteString.Internal (create)
import Foreign.C.Error (throwErrnoIfMinus1_)
import Foreign.C.Types (CInt(..))
import Foreign.Ptr (Ptr)
ge... | {-# LANGUAGE CPP, ForeignFunctionInterface #-}
module Data.Hashable.RandomSource
(
getRandomBytes
, getRandomBytes_
) where
import Data.ByteString as B
import Data.ByteString.Internal (create)
import Foreign.C.Error (throwErrnoIfMinus1_)
#if MIN_VERSION_base(4,5,0)
import Foreign.C.Types (CInt(CInt)... | Fix warning on older GHCs | Fix warning on older GHCs
| Haskell | bsd-3-clause | ekmett/hashable |
958d8305089c819ea24eb32c7f1e136c2bcc938b | Distribution/Franchise/AutoHeader.hs | Distribution/Franchise/AutoHeader.hs | {-# LANGUAGE PatternGuards #-}
module Distribution.Franchise.AutoHeader ( autoHeader ) where
import Distribution.Franchise.SplitFile
import Distribution.Franchise.Buildable
import Distribution.Franchise.ConfigureState
-- |This is the split function for @splitFile@. We need to provide the output filename
-- explicit... | {-# LANGUAGE PatternGuards #-}
module Distribution.Franchise.AutoHeader ( autoHeader ) where
import Distribution.Franchise.SplitFile
import Distribution.Franchise.Buildable
import Distribution.Franchise.ConfigureState
-- |This is the split function for @splitFile@. We need to provide the output filename
-- explicit... | Fix autoHeader API to only take target Ignore-this: b09fc568db849aed6d200f8c7fdd4b1b | Fix autoHeader API to only take target
Ignore-this: b09fc568db849aed6d200f8c7fdd4b1b
| Haskell | bsd-3-clause | droundy/franchise |
386dd443f19f0ef68dccbae25966f6e0711ab93c | code/Example/Drasil/TableOfAbbAndAcronyms.hs | code/Example/Drasil/TableOfAbbAndAcronyms.hs | -- Standard code to make a table of symbols.
module Drasil.TableOfAbbAndAcronyms
( table_of_abb_and_acronyms ) where
import Control.Lens ((^.))
import Language.Drasil
import Data.Drasil.Concepts.Documentation
table_of_abb_and_acronyms :: (NamedIdea s) => [s] -> Section
table_of_abb_and_acronyms ls = Section (S "Ab... | -- Standard code to make a table of symbols.
module Drasil.TableOfAbbAndAcronyms
( table_of_abb_and_acronyms ) where
import Control.Lens ((^.))
import Language.Drasil
import Data.Drasil.Concepts.Documentation
table_of_abb_and_acronyms :: (NamedIdea s) => [s] -> Section
table_of_abb_and_acronyms ls = Section (S "Ab... | Use titleize for abbreviations/acronyms table. | Use titleize for abbreviations/acronyms table.
| 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 |
6cdcd3d54ebe45aea226599150dfcba6edb154a0 | test/Test/IO/Tinfoil/KDF/Common.hs | test/Test/IO/Tinfoil/KDF/Common.hs | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.IO.Tinfoil.KDF.Common where
import Data.ByteString (ByteString)
import Disorder.Core.IO (testIO)
import Disorder.Core.UniquePair (Uni... | {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.IO.Tinfoil.KDF.Common where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Disorder.Core.IO (testIO)
import ... | Add copy test for safeEq | Add copy test for safeEq
| Haskell | bsd-3-clause | ambiata/tinfoil,ambiata/tinfoil |
09ddd272874b1c38034438654e3142e61e1f0cb9 | test/TestMain.hs | test/TestMain.hs | -- | main entry point for tests
module Main where
import Test.Framework
import Test.Unit
import Test.Pretty
import Test.Diff
-- entry point for the test-suite
main = defaultMain tests
tests = [tests_diff, tests_pretty, tests_unit]
| -- | main entry point for tests
module Main where
import Test.Framework
import Test.Unit
import Test.Pretty
import Test.Diff
-- entry point for the test-suite
main = defaultMain tests
tests = [tests_diff
,tests_unit
--,tests_pretty -- disabled the pretty tests until version 1.0
]
| Disable QuickCheck tests that we can't fix until version 1.0 | Disable QuickCheck tests that we can't fix until version 1.0
| Haskell | bsd-3-clause | sinelaw/language-ecmascript |
4639933b7ca1c4984a11ff66fc74a40e20e57a60 | tests/UnitTest/Distribution.hs | tests/UnitTest/Distribution.hs | module UnitTest.Distribution where
import Test.HUnit
import Statistics.Distribution
import Statistics.Distribution.Gamma
distributionTests :: [Test]
distributionTests =
[TestCase $ assertEqual "density (gammaDistr 150 1/150) 1 == 4.883311" 4.883311418525483 (density (gammaDistr 150 (1/150)) 1)
]
| module UnitTest.Distribution where
import Test.HUnit
import Statistics.Constants
import Statistics.Distribution
import Statistics.Distribution.Gamma
-- Approximate equality
eq :: Double -> Double -> Double -> Bool
eq eps a b = abs (a - b) / max (abs a) (abs b) <= eps
-- Approximately equal up to 1 ulp
(=~) :: Double... | Fix test for gamma distibution. Compare values with 1 ulp accuracy | Fix test for gamma distibution. Compare values with 1 ulp accuracy
| Haskell | bsd-2-clause | bos/statistics,mihaimaruseac/statistics,fpco/statistics,Shimuuar/statistics,mihaimaruseac/statistics,mihaimaruseac/statistics,Shimuuar/statistics,bos/statistics,fpco/statistics |
6023fb0f40eab6af3014e9e4d1de02d6d69e2e8e | src/General/Str.hs | src/General/Str.hs |
module General.Str(
Str, strPack, strUnpack, strReadFile, strSplitInfix,
LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.UTF8 as US
import qualified Data.ByteString.Lazy as LBS
import qualified Data.ByteString.Lazy.UT... | {-# LANGUAGE PatternGuards #-}
module General.Str(
Str, strPack, strUnpack, strReadFile, strSplitInfix,
LStr, lstrPack, lstrUnpack, lstrToChunks, lstrFromChunks
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.UTF8 as US
import qualified Data.ByteString.Lazy as LBS
import qu... | Add a missing language pragma | Add a missing language pragma
| Haskell | bsd-3-clause | wolftune/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle,ndmitchell/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle,ndmitchell/hoogle,ndmitchell/hoogle,wolftune/hoogle |
583e3a9dd3dd459b561a232febb6852108874c49 | src/Duffer/Pack/Index.hs | src/Duffer/Pack/Index.hs | module Duffer.Pack.Index where
import qualified Data.ByteString as B
import Prelude hiding (take)
import Data.Bits (Bits, bit, shiftL)
fromBytes :: (Bits t, Integral t) => [t] -> t
fromBytes = foldl (\a b -> (fromIntegral a `shiftL` 8) + b) 0
toBytes :: (Bits t, Integral t) => t -> [t]
toBytes n = case divMod n (b... | module Duffer.Pack.Index where
import qualified Data.ByteString as B
import Prelude hiding (take)
import Data.Bits (Bits, bit, shiftL)
fromBytes :: (Bits t, Integral t) => [t] -> t
fromBytes = foldl (\a b -> (fromIntegral a `shiftL` 8) + b) 0
toBytes :: (Bits t, Integral t) => t -> [t]
toBytes n = case divMod n (b... | Move common alternative to the top. | Move common alternative to the top.
| Haskell | bsd-3-clause | vaibhavsagar/duffer,vaibhavsagar/duffer.hs |
385332dc7bdc98e541358ec6f191a727adb75cb4 | test/integration/tests/443-specify-path/Main.hs | test/integration/tests/443-specify-path/Main.hs | import StackTest
import System.Directory
import System.FilePath
main :: IO ()
main = do
-- install in relative path
createDirectory "bin"
stack ["--local-bin-path", "./bin", "install" , "happy"]
doesExist "./bin/happy"
-- Default install
-- This seems to fail due to direcory being cleaned up,
-- a manua... | import StackTest
import System.Directory
import System.FilePath
import System.Info (os)
main :: IO ()
main = do
let ext = if os == "mingw32" then ".exe" else ""
-- install in relative path
createDirectory "bin"
stack ["--local-bin-path", "./bin", "install" , "happy"]
doesExist ("./bin/happy" ++ ext)
-- D... | Fix 443-specify-path integration test on Windows | Fix 443-specify-path integration test on Windows
| Haskell | bsd-3-clause | lukexi/stack,Fuuzetsu/stack,robstewart57/stack,adinapoli/stack,fizruk/stack,luigy/stack,agrafix/stack,Heather/stack,rekka/stack,sjakobi/stack,martin-kolinek/stack,wolftune/stack,juhp/stack,supermario/stack,athanclark/stack,achernyak/stack,rrnewton/stack,rvion/stack,AndrewRademacher/stack,bixuanzju/stack,rekka/stack,Dan... |
5144e892dd5c6f92a0c18dce1358279330bc75e6 | src/Main.hs | src/Main.hs | module Main where
import Control.Monad (replicateM_)
import Data.Aeson (encode)
import Data.Time (getCurrentTime)
import System.IO (readFile)
main :: IO ()
main = do
putStrLn "Enter a message: "
message <- getLine
putStrLn "Enter a number of times to print: "
... | module Main where
import Control.Monad (replicateM_)
import Data.Aeson (encode)
import Data.Time (getCurrentTime)
import System.IO (readFile)
main :: IO ()
main = do
putStrLn "Enter a message: "
message <- getLine
putStrLn "Enter a number of times to print: "
... | Clean up a bit of the code | Clean up a bit of the code
| Haskell | mit | mikegehard/haskell-api |
f54e46b16a31e59ece7cfec87317fa43a22a3bde | test/Test/Unit/Typechecker.hs | test/Test/Unit/Typechecker.hs | module Test.Unit.Typechecker where
import Test.Tasty
import Test.Tasty.HUnit
import AudiComp.Typechecker
import AudiComp.Core.Language
import AudiComp.Helper
typecheck = parseAndTypecheck "<test>"
typecheckerTests :: TestTree
typecheckerTests = testGroup "Typechecker"
[ intType ]
intType =
testCase "int type" ... | module Test.Unit.Typechecker where
import Test.Tasty
import Test.Tasty.HUnit
import AudiComp.Typechecker
import AudiComp.Core.Language
import AudiComp.Helper
typecheck = parseAndTypecheck "<test>"
typecheckerTests :: TestTree
typecheckerTests = testGroup "Typechecker"
[ intType
, boolType
, arrowType
]
int... | Add bool and arrow type tests. | Add bool and arrow type tests.
| Haskell | mit | jgardella/AuditedComputation |
5f656614f2648b4ca5fa43f7b52c4babba3b8f68 | GHC/Integer/Type.hs | GHC/Integer/Type.hs |
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Integer.Type
-- Copyright : (c) Ian Lynagh 2007-2008
-- License : BSD3
--
-- Maintainer : igloo@earth.li
-- Stability : internal
-- Portability : non-portable (GHC ... |
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Integer.Type
-- Copyright : (c) Ian Lynagh 2007-2008
-- License : BSD3
--
-- Maintainer : igloo@earth.li
-- Stability : internal
-- Portability : non-portable (GHC ... | Add an import so the deps get sorted out correctly | Add an import so the deps get sorted out correctly | Haskell | bsd-3-clause | haskell-suite/integer-simple |
b782fc9e8056ad5e479310a513a915c562b6740f | src/Foreign/Inference/Internal/FlattenValue.hs | src/Foreign/Inference/Internal/FlattenValue.hs | module Foreign.Inference.Internal.FlattenValue ( flattenValue ) where
import Data.List ( foldl' )
import qualified Data.Set as S
import LLVM.Analysis
-- | Turn a value into a list of all of the possible values it could
-- represent. This effectively means returning all possible values
-- that phi and select instruc... | module Foreign.Inference.Internal.FlattenValue ( flattenValue ) where
import Data.List ( foldl' )
import qualified Data.HashSet as S
import LLVM.Analysis
-- | Turn a value into a list of all of the possible values it could
-- represent. This effectively means returning all possible values
-- that phi and select ins... | Switch from a depth-first to breadth-first search in flatten value. | Switch from a depth-first to breadth-first search in flatten value.
The depth-first search was very inefficient and susceptible to
stack overflows on very complex inputs.
| Haskell | bsd-3-clause | travitch/foreign-inference,travitch/foreign-inference |
123c0c58e91c5251f23a2263195f0d7b5b264d14 | dynamic-list-of-items/add-static-items/source.hs | dynamic-list-of-items/add-static-items/source.hs | {-# LANGUAGE RecursiveDo, FlexibleContexts #-}
import Reflex
import Reflex.Dom
import qualified Data.Map as Map
renderStaticListOfItems :: MonadWidget t m => [String] -> m ()
renderStaticListOfItems items = el "ul" $ do
mapM_ (el "li" . text) items
renderDynamicList items = do
dynamicOfWidgets <- mapDyn renderSta... | {-# LANGUAGE RecursiveDo #-}
import Reflex
import Reflex.Dom
import qualified Data.Map as Map
renderStaticListOfItems items = el "ul" $ do
mapM_ (el "li" . text) items
renderDynamicList items = do
dynamicOfWidgets <- mapDyn renderStaticListOfItems items
dyn dynamicOfWidgets
renderAddNewTaskForm = el "div" $ do... | Remove FlexibleContents and type signature for renderStaticListOfItems | Remove FlexibleContents and type signature for renderStaticListOfItems
| Haskell | mit | Ninju/reflex-dom-demos,Ninju/reflex-dom-demos |
5ff7c10e5e70e3109349588cac22026cd52c293a | library/Stratosphere/Types.hs | library/Stratosphere/Types.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StandaloneDeriving #-}
-- | Module for hand-written types that are used in generated modules.
module Stratosphere.Types
( CannedACL (..)
) where
import Data.Aeson
import GHC.Generics
-- | Amazon S3 supports a set of predefined grants, k... | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
-- | Module for hand-written types that are used in generated modules.
module Stratosphere.Types
( CannedACL (..)
) where
import Data.Aeson
import GHC.Generics
-- | Amazon S3 supports a set of predefined grants, known as canned ACLs. Each
-- canned ... | Simplify deriving of CannedACL JSON classes | Simplify deriving of CannedACL JSON classes
| Haskell | mit | frontrowed/stratosphere |
a48cce3905a01ead5adf007aeb6446f613c67546 | test/CryptolVerifierTC.hs | test/CryptolVerifierTC.hs | {-# LANGUAGE ImplicitParams #-}
module Main where
import qualified Data.ByteString as BS
import qualified Data.Map as Map
import qualified Cryptol.ModuleSystem.Name as N
import qualified Cryptol.Utils.Ident as N
import qualified Verifier.SAW.Cryptol as C
import Verifier.SAW.SharedTerm
import qualified Ver... | {-# LANGUAGE ImplicitParams #-}
module Main where
import qualified Data.ByteString as BS
import qualified Data.Map as Map
import qualified Cryptol.ModuleSystem.Name as N
import qualified Cryptol.Utils.Ident as N
import qualified Verifier.SAW.Cryptol as C
import Verifier.SAW.SharedTerm
import qualified Ver... | Make test binary translate and check `Float.cry` and `Array.cry`. | Make test binary translate and check `Float.cry` and `Array.cry`.
This is another step toward addressing #25.
| Haskell | bsd-3-clause | GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script,GaloisInc/saw-script |
f42f7769e1c627b16b983a428e8711bf3e37743c | test/Feature/RangeSpec.hs | test/Feature/RangeSpec.hs | {-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Feature.RangeSpec where
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import SpecHelper
import Dbapi (app)
main :: IO ()
main = hspec spec
spec :: Spec
spec = with (prepareAppDb "schema" $ app cfg) $ do
describe "GET /" $ do
it "resp... | {-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Feature.RangeSpec where
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import SpecHelper
import Network.HTTP.Types
import Dbapi (app)
main :: IO ()
main = hspec spec
spec :: Spec
spec = with (prepareAppDb "schema" $ app cfg) $ do
describe... | Test OPTIONS request for /table | Test OPTIONS request for /table
| Haskell | mit | alihalabyah/postgrest,nayosx/postgrest,steve-chavez/postgrest,bussiere/postgrest,janusnic/postgrest,begriffs/postgrest,paladin74/postgrest,beni55/postgrest,Drooids/postgrest,framp/postgrest,ruslantalpa/postgrest,w4ngyi/postgrest,CityOfPhiladelphia/postgrest,diogob/postgrest,modulexcite/postgrest,tml/postgrest,IndraVika... |
90570c397fc4df9f68c3144f6cae4bfca8177997 | day2/day2.hs | day2/day2.hs | import Control.Applicative
import Data.Attoparsec.ByteString.Char8
import qualified Data.ByteString as B
main = do
input <- B.readFile "input.txt"
let presents =
case parsePresents input of
Right (p) -> p
Left (err) -> error ("Parse error: " ++ err)
print . sum .... | import Data.List (sort)
import Control.Applicative
import qualified Data.Attoparsec.ByteString.Char8 as A
import qualified Data.ByteString as B
main = do
input <- B.readFile "input.txt"
let presents =
case parsePresents input of
Right (p) -> p
Left (err) -> error ("P... | Complete Day 2 Part 2 | Complete Day 2 Part 2
| Haskell | mit | devonhollowood/adventofcode,devonhollowood/adventofcode |
6fc527b41b1ba80c706a375420f40e6eed8c81c8 | haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs | haddock-api/src/Haddock/Backends/Xhtml/Specialize.hs | {-# LANGUAGE FlexibleContexts #-}
module Haddock.Backends.Xhtml.Specialize (specialize) where
import Haddock.Syb
import GHC
import Data.Data
specialize :: (Eq name, Typeable name)
=> Data a
=> name -> HsType name -> a -> a
specialize name details = everywhere (mkT $ specialize' name detail... | {-# LANGUAGE FlexibleContexts #-}
module Haddock.Backends.Xhtml.Specialize
( specialize, specialize'
, specializeTyVarBndrs
) where
import Haddock.Syb
import GHC
import Data.Data
specialize :: (Eq name, Typeable name)
=> Data a
=> name -> HsType name -> a -> a
specialize name d... | Create convenience functions for type specialization module. | Create convenience functions for type specialization module. | Haskell | bsd-2-clause | Helkafen/haddock,idontgetoutmuch/haddock,Fuuzetsu/haddock,niteria/haddock,randen/haddock,haskell/haddock,idontgetoutmuch/haddock,sboosali/haddock,randen/haddock,randen/haddock,beni55/haddock,lamefun/haddock,niteria/haddock,beni55/haddock,haskell/haddock,niteria/haddock,lamefun/haddock,sboosali/haddock,haskell/haddock,i... |
a6c3734851384d61f64ce512f8117c21923ff37f | testsuite/tests/indexed-types/should_fail/SkolemOccursLoop.hs | testsuite/tests/indexed-types/should_fail/SkolemOccursLoop.hs | {-# LANGUAGE TypeFamilies, FlexibleContexts, EmptyDataDecls #-}
module SkolemOccursLoop where
-- SkelemOccurs tests by Tom and Martin
data T x
type family F x
type instance F [x] = [T (F x)]
t :: a -> a -> Bool
t _ _ = True
f :: a -> F [a]
f = undefined
test1 :: (F [a] ~ a) => a -> Bool
test1 x = t x (f x)
--
d... | {-# OPTIONS_GHC -fcontext-stack=10 #-}
{-# LANGUAGE TypeFamilies, FlexibleContexts, EmptyDataDecls #-}
module SkolemOccursLoop where
-- SkelemOccurs tests by Tom and Martin
data T x
type family F x
type instance F [x] = [T (F x)]
t :: a -> a -> Bool
t _ _ = True
f :: a -> F [a]
f = undefined
test1 :: (F [a] ~ a) ... | Reduce context stack max depth, to avoid validate running out of memory | Reduce context stack max depth, to avoid validate running out of memory
| Haskell | bsd-3-clause | vTurbine/ghc,snoyberg/ghc,gridaphobe/ghc,nushio3/ghc,mcschroeder/ghc,fmthoma/ghc,oldmanmike/ghc,ryantm/ghc,tjakway/ghcjvm,jstolarek/ghc,snoyberg/ghc,wxwxwwxxx/ghc,hferreiro/replay,sgillespie/ghc,anton-dessiatov/ghc,sgillespie/ghc,anton-dessiatov/ghc,wxwxwwxxx/ghc,nkaretnikov/ghc,sdiehl/ghc,ezyang/ghc,urbanslug/ghc,gcam... |
9503f5422ce0f16c0bfc4fcfe0ea74354de33d72 | src/Main.hs | src/Main.hs |
import Jana.Ast
fib = [ Proc { procname = "fib"
, params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
, body = [ If (BinOp Eq (LV $ Scalar "n")
(Number 0))
[ Assign AddEq (Scalar "x1") (Number 1)
, Assig... |
import Jana.Ast
fib = [ Proc { procname = "fib"
, params = [ (Int, "x1"), (Int, "x2"), (Int, "n") ]
, body = [ If (BinOp Eq (LV $ Scalar "n")
(Number 0))
[ Assign AddEq (Scalar "x1") (Number 1)
, Assig... | Add rest of fib program | Add rest of fib program
| Haskell | bsd-3-clause | mbudde/jana,mbudde/jana,mbudde/jana,tyoko-dev/jana,tyoko-dev/jana,mbudde/jana,tyoko-dev/jana,tyoko-dev/jana |
bf36e7451b9da597b832047f9096f739a07485d6 | src/Main.hs | src/Main.hs | import System.Environment
import Parser
import Eval
import Expr
import Error
main :: IO ()
main = getArgs >>= handleArgs . getFirst
where getFirst args = if null args then "" else head args
handleArgs args = case args of
"--ast" -> putAst
_ -> put... | import Control.Monad (liftM)
import System.Environment
import Parser
import Eval
import Expr
import Error
main :: IO ()
main = getArgs >>= handleArgs . getFirst
where getFirst args = if null args then "" else head args
handleArgs args = case args of
"--ast" -> putAst
... | Add result printing to main | Add result printing to main
| Haskell | mit | apollo-lang/apollo |
31fdd05ebd98b9d20a11ed153a85f350c1c835d2 | src/Main.hs | src/Main.hs | {-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
{-# OPTIONS_GHC -Wall #-}
import System.IO
import System.Environment (getArgs, withArgs)
import System.Console.CmdArgs (cmdArgsRun)
import NGramCrackers.NGramCrackers
import NGramCrackers.ArgParser
import NGramCrackers.TupleManipulation
import NGramCrackers.Paragrap... | {-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
{-# OPTIONS_GHC -Wall -O2 #-}
import System.IO
import System.Environment (getArgs, withArgs)
import System.Console.CmdArgs (cmdArgsRun)
import NGramCrackers.NGramCrackers
import NGramCrackers.ArgParser
import NGramCrackers.TupleManipulation
import NGramCrackers.Para... | Add -O2 flag to compiler options | Add -O2 flag to compiler options
| Haskell | agpl-3.0 | R-Morgan/NGramCrackers |
0772a52a9edc7dce95822ee836ef8ece3861800a | src/Game/GoreAndAsh/Logging/State.hs | src/Game/GoreAndAsh/Logging/State.hs | {-|
Module : Game.GoreAndAsh.Logging.State
Description : State of logging core module
Copyright : (c) Anton Gushcha, 2015-2016
License : BSD3
Maintainer : ncrashed@gmail.com
Stability : experimental
Portability : POSIX
Contains description of state for logging core module.
-}
module Game.GoreAndAsh.Loggi... | {-|
Module : Game.GoreAndAsh.Logging.State
Description : State of logging core module
Copyright : (c) Anton Gushcha, 2015-2016
License : BSD3
Maintainer : ncrashed@gmail.com
Stability : experimental
Portability : POSIX
Contains description of state for logging core module.
-}
module Game.GoreAndAsh.Loggi... | Add logging level, filter and source | Add logging level, filter and source
| Haskell | bsd-3-clause | Teaspot-Studio/gore-and-ash-logging |
078177084c8b7d0a3bfa0b10cba4e6dbf229b125 | test/integration/tests/cyclic-test-deps/Main.hs | test/integration/tests/cyclic-test-deps/Main.hs | import StackTest
main :: IO ()
main = do
stack ["unpack", "text-1.2.2.1"]
stack ["init", defaultResolverArg]
stack ["test", "--dry-run"]
| import StackTest
main :: IO ()
main = do
stack ["unpack", "text-1.2.2.1"]
stack ["init", defaultResolverArg]
appendFile "stack.yaml" "\n\nextra-deps:\n- test-framework-quickcheck2-0.3.0.3@sha256:989f988d0c4356d7fc1d87c062904d02eba0637c5adba428b349aeb709d81bc0"
readFile "stack.yaml" >>= putStrLn
sta... | Fix integration test by bypassing Hackage revisions :( | Fix integration test by bypassing Hackage revisions :(
| Haskell | bsd-3-clause | anton-dessiatov/stack,martin-kolinek/stack,juhp/stack,juhp/stack,anton-dessiatov/stack,martin-kolinek/stack,MichielDerhaeg/stack,MichielDerhaeg/stack |
bd7f66452341a02e78db0058413f11840b50e5ae | src/System/Information.hs | src/System/Information.hs | {-# 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)... | {-# Language DerivingStrategies #-}
{-# Language GeneralisedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Information
-- Copyright : (c) ChaosGroup, 2020
-- License : MIT
--
-- Maintainer : daniel.taskoff@gmail.com
-- Stability ... | Change the format of and reword the documentation | Change the format of and reword the documentation
| Haskell | mit | ChaosGroup/system-info |
1d0e993dd82b21029b3e8d790027f4a2d0c76868 | tests/Tests/Comparison.hs | tests/Tests/Comparison.hs | -- |
-- Tests for approximate comparison
module Tests.Comparison (tests) where
import Test.QuickCheck hiding (choose)
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Tests.Helpers
import Tests.SpecFunctions.Tables
import Numeric.MathFunctions.Comparison
import Numeric.MathFunctions.Constant... | -- |
-- Tests for approximate comparison
module Tests.Comparison (tests) where
import Test.QuickCheck hiding (choose)
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Tests.Helpers
import Tests.SpecFunctions.Tables
import Numeric.MathFunctions.Comparison
import Numeric.MathFunctions.Constant... | Add another test for ulpDistance & addUlps | Add another test for ulpDistance & addUlps
| Haskell | bsd-2-clause | bos/math-functions,bos/math-functions,Shimuuar/math-functions,Shimuuar/math-functions |
8433b46d5da6ae9df88905c3a53ed94662a60a2d | Databrary/Controller/Audit.hs | Databrary/Controller/Audit.hs | {-# LANGUAGE OverloadedStrings #-}
module Databrary.Controller.Audit
( viewActivity
) where
import Control.Arrow (second)
import Data.Function (on)
import Data.List (nubBy)
import Data.Monoid ((<>))
import Data.Ord (comparing)
import Databrary.Ops
import qualified Databrary.JSON as JSON
import Databrary.Model.Par... | {-# LANGUAGE OverloadedStrings #-}
module Databrary.Controller.Audit
( viewActivity
) where
import Control.Arrow (second)
import Data.Function (on)
import Data.List (nubBy)
import Data.Ord (comparing)
import Databrary.Ops
import qualified Databrary.JSON as JSON
import Databrary.Model.Party
import Databrary.Model.... | Fix (flip) order of news feed | Fix (flip) order of news feed
| Haskell | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
9243d5840f87a1324f8b1c3eb778205451d9cbc1 | src/Main.hs | src/Main.hs | module Main where
import Control.Monad
import System.Environment
import System.IO (hFlush, stdout)
import Lishp.Interpreter
import Lishp.Readline
main :: IO ()
main = do args <- getArgs
case length args of
0 -> repl
1 -> evalAndPrint $ args !! 0
otherwise -> put... | module Main where
import Control.Monad
import System.Environment
import System.IO (hFlush, stdout)
import Lishp.Interpreter
import Lishp.Readline
main :: IO ()
main = do args <- getArgs
case length args of
0 -> repl
1 -> evalAndPrint $ args !! 0
otherwise -> put... | Add explicit type declarations for repl and replLoop | Add explicit type declarations for repl and replLoop
| Haskell | mit | wildlyinaccurate/lishp |
a310ac50f96102a0c4a235a6357b0e42b0d32f13 | src/Main.hs | src/Main.hs | import System.Random
import Data.List
main :: IO ()
main = do
seed <- newStdGen
let numbers = take 50000 $ randomIntStream seed
putStrLn $ summary $ frequency numbers
frequency :: Ord a => [a] -> [(a, Int)]
frequency xs = map (\l -> (head l, length l)) (group (sort xs))
summary :: [(Int, Int)] -> String
sum... | import System.Random
import Data.List
main :: IO ()
main = do
seed <- newStdGen
let numbers = take 50000 $ randomIntStream seed
putStrLn $ summary $ frequency numbers
putStrLn $ summary $ frequency "Hello, world!"
frequency :: Ord a => [a] -> [(a, Int)]
frequency xs = map (\l -> (head l, length l)) (group ... | Allow more than just Int to be counted | Allow more than just Int to be counted
| Haskell | mit | apauley/parallel-frequency |
cd9b664183d87abd6c1f3a6e32cdbe8ba91d8f1c | src/Cabal2Nix/Flags.hs | src/Cabal2Nix/Flags.hs | module Cabal2Nix.Flags ( configureCabalFlags ) where
import Distribution.Package
import Distribution.PackageDescription
configureCabalFlags :: PackageIdentifier -> FlagAssignment
configureCabalFlags (PackageIdentifier (PackageName name) _)
| name == "accelerate-examples"= [disable "opencl"]
| name == "git-annex" ... | module Cabal2Nix.Flags ( configureCabalFlags ) where
import Distribution.Package
import Distribution.PackageDescription
configureCabalFlags :: PackageIdentifier -> FlagAssignment
configureCabalFlags (PackageIdentifier (PackageName name) _)
| name == "accelerate-examples"= [disable "opencl"]
| name == "git-annex" ... | Configure 'NoInteractiveTests' flag for io-streams library. | Configure 'NoInteractiveTests' flag for io-streams library.
Suggested in <https://github.com/NixOS/cabal2nix/pull/57>.
| Haskell | bsd-3-clause | bennofs/cabal2nix,jb55/cabal2nix,dmalikov/cabal2nix,spencerjanssen/cabal2nix,Fuuzetsu/cabal2nix,gridaphobe/cabal2nix,psibi/cabal2nix |
2703839da018929953790a5c4d369ec74f1a6237 | src/Main.hs | src/Main.hs | import System.IO
--import NGramCrackers.NGramCrackers
import Data.Char (toUpper)
main = do
inHandle <- openFile "NGramCrackers/story.txt" ReadMode
outHandle <- openFile "NGramCrackers/processedStory.txt" WriteMode
-- contents <- hGetContents inHandle
mainLoop inHandle outHandle
--hPutStrLn outHa... | 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... | Add pattern matching for Left and Right results of parseParagraph | Add pattern matching for Left and Right results of parseParagraph
-- The primary addition is the use of case syntax to define the
behaviour of parseParagraph's Left and Right behaviour. Left
prints the error to stdout.in. Right prints each sentence on its
own line in stdout. mapM_ is used to to map o... | Haskell | agpl-3.0 | R-Morgan/NGramCrackers |
2db98525ff5247f60755fdf16490950ca4de08d1 | ZoomHub.hs | ZoomHub.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module ZoomHub where
import Control.Monad.Trans.Either
import Data.Char
import GHC.Generics
import Network.Wai
import Servant
import Types.Content
-- Servant defaul... | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module ZoomHub where
import Control.Monad.Trans.Either
import Data.Char
import GHC.Generics
import Network.Wai
import Servant
import... | Enable `OverloadedStrings` for simple `ByteString`s | Enable `OverloadedStrings` for simple `ByteString`s
| Haskell | mit | zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub |
0e03c0965ceee31060c8f880fa19d40e185c50ec | Data/Aeson.hs | Data/Aeson.hs | -- |
-- Module: Data.Aeson
-- Copyright: (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@mailrank.com>
-- Stability: experimental
-- Portability: portable
--
-- Types and functions for working efficiently with JSON data.
--
-- (A note on naming: in Greek mythology, Aeson wa... | -- |
-- Module: Data.Aeson
-- Copyright: (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@mailrank.com>
-- Stability: experimental
-- Portability: portable
--
-- Types and functions for working efficiently with JSON data.
--
-- (A note on naming: in Greek mythology, Aeson wa... | Add the oft-requested decode function. | Add the oft-requested decode function.
| Haskell | bsd-3-clause | timmytofu/aeson,lpsmith/aeson |
2c815bae6971de93ecac1cd67173e57c25c04eec | code/drasil-printers/Language/Drasil/Plain/Helpers.hs | code/drasil-printers/Language/Drasil/Plain/Helpers.hs | module Language.Drasil.Plain.Helpers where
import Data.String.Utils (replace)
toPlainName :: String -> String
toPlainName s =
let illegalChars = [
",","~","`","-","=","!","@","#","$","%","^","&","*","(",")","+",
"[","]","\\",";","'","/","|",":","\"","<",">","?"," "]
in foldl varNameRep... | module Language.Drasil.Plain.Helpers where
import Data.String.Utils (replace)
toPlainName :: String -> String
toPlainName s =
let illegalChars = [
",","~","`","-","=","!","@","#","$","%","^","&","*","+",
"[","]","\\",";","'","/","|","\"","<",">","?"," "]
in foldl varNameReplace s illeg... | Fix overzealous character replacement in function names | Fix overzealous character replacement in function names
| 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 |
10e9636ade43ed7eea27ac601bf3f11cda713dc6 | day3/day3.hs | day3/day3.hs | import Data.List (nub)
main = do
input <- readFile "input.txt"
let directions = map toDir . filter (`elem` "^v<>") $ input
let houses = applyDirections (0,0) directions
let unique_houses = length . nub $ houses
print unique_houses
applyDirections :: House -> [Direction] -> [House]
applyDirections ... | import Data.List (nub)
main = do
input <- readFile "input.txt"
let directions = map toDir . filter (`elem` "^v<>") $ input
let (santa_dir, robo_dir) = splitDirections directions
let santa_houses = applyDirections (0,0) santa_dir
let robo_houses = applyDirections (0,0) robo_dir
let houses = sant... | Complete Day 3 Part 2 | Complete Day 3 Part 2
| Haskell | mit | devonhollowood/adventofcode,devonhollowood/adventofcode |
3402cf5ea531eacefeb54c819d8cdfbd6832d1c2 | src/Language/K3/Codegen/CPP/Core/Expression.hs | src/Language/K3/Codegen/CPP/Core/Expression.hs | module Language.K3.Codegen.CPP.Core.Expression where
import Language.K3.Core.Common
import Language.K3.Codegen.CPP.Core.Type
import Language.K3.Codegen.CPP.Core.Statement
data Expression
= Binary Identifier Expression Expression
| Call Expression Expression
| Dereference Expression
| Lambda [(Identif... | module Language.K3.Codegen.CPP.Core.Expression where
import Language.K3.Core.Common
import Language.K3.Codegen.CPP.Core.Type
import Language.K3.Codegen.CPP.Core.Statement
data Expression
= Binary Identifier Expression Expression
| Call Expression [Expression]
| Dereference Expression
| Lambda [(Ident... | Fix call expressions to take multiple arguments. | Fix call expressions to take multiple arguments.
| Haskell | apache-2.0 | DaMSL/K3,DaMSL/K3,yliu120/K3 |
1c3d79bab28f4f4a6aeb00bdad74e76213705288 | Main.hs | Main.hs | module Main where
import System.Environment (getProgName)
import qualified Kiwi.API as API
import qualified Kiwi.Config as Config
import qualified Kiwi.Generate as Generate
import qualified Kiwi.Server as Server
import qualified Kiwi.ServerAndAPI as ServerAndAPI
import Kiwi.Data
import qualified Kiwi.Storage as Stora... | module Main where
import System.Environment (getProgName)
import qualified Kiwi.API as API
import qualified Kiwi.Config as Config
import qualified Kiwi.Generate as Generate
import qualified Kiwi.Server as Server
import qualified Kiwi.ServerAndAPI as ServerAndAPI
import Kiwi.Data
import qualified Kiwi.Storage as Stora... | Create tables when they don't exist yet | Create tables when they don't exist yet
| Haskell | bsd-3-clause | acieroid/kiwi |
fee7bd3abe254d3c97c37b5f10e2584b5a04bc17 | Numeric/Polynomial.hs | Numeric/Polynomial.hs | {-# LANGUAGE FlexibleContexts #-}
-- |
-- Module : Numeric.Polynomial.Chebyshev
-- Copyright : (c) 2012 Aleksey Khudyakov
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- Chebyshev polynomials.
module Numeric.Polynomial (
evaluatePolynomial
... | {-# LANGUAGE FlexibleContexts #-}
-- |
-- Module : Numeric.Polynomial.Chebyshev
-- Copyright : (c) 2012 Aleksey Khudyakov
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- Chebyshev polynomials.
module Numeric.Polynomial (
evaluatePolynomial
... | Add function to evaluate even and odd polynomials | Add function to evaluate even and odd polynomials
| Haskell | bsd-2-clause | Shimuuar/math-functions,Shimuuar/math-functions,bos/math-functions,bos/math-functions |
71929000d30e4cbce4f606c1463f327147e34fd7 | src/ElmFormat/Filesystem.hs | src/ElmFormat/Filesystem.hs | module ElmFormat.Filesystem where
import Control.Monad.Free
import ElmFormat.FileStore
import System.FilePath ((</>))
import Data.Text (pack, isSuffixOf)
collectFiles :: Monad m => (a -> m [a]) -> a -> m [a]
collectFiles children root =
do
xs <- children root
subChildren <- mapM (collectFiles chi... | module ElmFormat.Filesystem where
import Control.Monad.Free
import ElmFormat.FileStore
import System.FilePath ((</>))
import qualified System.FilePath as FilePath
collectFiles :: Monad m => (a -> m [a]) -> a -> m [a]
collectFiles children root =
do
xs <- children root
subChildren <- mapM (collect... | Use System.FilePath functions to check filenames and extensions | Use System.FilePath functions to check filenames and extensions
| Haskell | bsd-3-clause | avh4/elm-format,avh4/elm-format,avh4/elm-format,avh4/elm-format |
e2ccb650e0555224f682f33dedd522648b2fb45d | commands/Pretty.hs | commands/Pretty.hs | {-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.AST.Transforms
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Command
import Data.Text
import qualified Data.Te... | {-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.AST.Transforms
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Command
import Data.Text
import qualified Data.Te... | Use utf8 IO in output | Use utf8 IO in output
| Haskell | bsd-3-clause | zachsully/hakaru,zachsully/hakaru |
16d0bffbddbe48d577136522d2df1e013ab43c00 | main.hs | main.hs | {-# LANGUAGE DeriveDataTypeable #-}
import Import
import Export
import System.Console.CmdLib
data Cmd = Import { repo :: String, format :: RepoFormat }
| Export { repo :: String }
deriving (Eq, Typeable, Data)
instance Attributes Cmd where
attributes _ = repo %> [ Positional 0 ] %%
... | {-# LANGUAGE DeriveDataTypeable #-}
import Import
import Export
import System.Console.CmdLib
data Cmd = Import { repo :: String, format :: RepoFormat }
| Export { repo :: String }
deriving (Eq, Typeable, Data)
instance Attributes Cmd where
attributes _ = repo %> [ Positional 0 ] %%
... | Fix help, use darcs-2 instead of darcs2 (like darcs itself). | Fix help, use darcs-2 instead of darcs2 (like darcs itself).
| Haskell | bsd-3-clause | nh2/darcs-fastconvert |
5c91a42708c986e0e105ddc80ca7585e3e2f886f | app/Main.hs | app/Main.hs | {-# LANGUAGE LambdaCase #-}
module Main where
import Data.Text.IO (readFile, writeFile)
import Prelude hiding (readFile, writeFile)
import System.Environment (getArgs)
import Update.Nix.FetchGit
import Update.Span
main :: IO ()
main =
-- Super s... | {-# LANGUAGE LambdaCase #-}
module Main where
import Data.Text.IO (readFile, writeFile)
import Prelude hiding (readFile, writeFile)
import System.Environment (getArgs)
import System.Exit
import Update.Nix.FetchGit
import Update.Span
main... | Return an error code if the program is called with no arguments. | Return an error code if the program is called with no arguments.
If we want to provide the help screen without an error code there
should be a --help option. An empty command line could pretty easily
by a typo or error in the program that is starting this program, so
that should result in an error code.
| Haskell | bsd-3-clause | DavidEGrayson/update-nix-fetchgit |
143c803b9566f03e4a409da35be7f37f1e8441e6 | Text/HTML/TagSoup/Parser_.hs | Text/HTML/TagSoup/Parser_.hs |
module Text.HTML.TagSoup.Parser_(TagSoup(..), parseTags) where
import Text.HTML.TagSoup.Specification
import Text.HTML.TagSoup.Implementation
import Text.HTML.TagSoup.Type
import Text.HTML.TagSoup.Options_
import Text.StringLike
test x = parseTagsOptions parseOptions{optTagWarning=True,optTagPosition=True} $ Spec x... |
module Text.HTML.TagSoup.Parser_(TagSoup(..), parseTags) where
import Text.HTML.TagSoup.Specification
import Text.HTML.TagSoup.Implementation
import Text.HTML.TagSoup.Type
import Text.HTML.TagSoup.Options_
import Text.StringLike
parseTags :: TagSoup str => str -> [Tag str]
parseTags = parseTagsOptions parseOptions
... | Delete test code left over | Delete test code left over | Haskell | bsd-3-clause | silkapp/tagsoup |
f954fd84dd9e4417809b332fd3d3a283caca4040 | examples/TemplateHaskell.hs | examples/TemplateHaskell.hs | -- We can use Template Haskell (TH) to generate instances of the
-- FromJSON and ToJSON classes automatically. This is the fastest way
-- to add JSON support for a type.
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson (decode, encode)
import Data.Aeson.TH (deriveJSON, defaultOp... | -- We can use Template Haskell (TH) to generate instances of the
-- FromJSON and ToJSON classes automatically. This is the fastest way
-- to add JSON support for a type.
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson (decode, encode)
import Data.Aeson.TH (deriveJSON, defaultOp... | Remove obsolete comment for TH example | Remove obsolete comment for TH example
Nitpicking :)
| Haskell | bsd-3-clause | sol/aeson,23Skidoo/aeson,SeanRBurton/aeson,bwo/aeson,neobrain/aeson,jkarni/aeson,beni55/aeson,nurpax/aeson,JPMoresmau/aeson,aelve/json-x,roelvandijk/aeson,lykahb/aeson,neobrain/aeson,sol/aeson,abbradar/aeson,timmytofu/aeson,dmjio/aeson,roelvandijk/aeson,plaprade/aeson,sol/aeson |
bda1dc971ae23008ad95d647e1e010effba8377a | src/Elm/Compiler/Imports.hs | src/Elm/Compiler/Imports.hs | module Elm.Compiler.Imports (defaults) where
import qualified AST.Module as Module
import qualified AST.Variable as Var
-- DEFAULT IMPORTS
(==>) :: a -> b -> (a,b)
(==>) = (,)
defaults :: [Module.DefaultImport]
defaults =
[ ["Basics"] ==> Module.ImportMethod Nothing Var.openListing
, ["List"] ==> exposing... | module Elm.Compiler.Imports (defaults) where
import qualified AST.Module as Module
import qualified AST.Variable as Var
-- DEFAULT IMPORTS
(==>) :: a -> b -> (a,b)
(==>) = (,)
defaults :: [Module.DefaultImport]
defaults =
[ ["Basics"] ==> Module.ImportMethod Nothing Var.openListing
, ["Debug"] ==> Module.... | Add Debug to default imports | Add Debug to default imports
| Haskell | bsd-3-clause | JoeyEremondi/elm-pattern-effects,laszlopandy/elm-compiler,mgold/Elm,5outh/Elm |
86700a412935b6eb57648c191353421eac7387d5 | haskell/src/StackIdeM.hs | haskell/src/StackIdeM.hs | {-# LANGUAGE StandaloneDeriving, DeriveFunctor, TemplateHaskell, FlexibleContexts #-}
module StackIdeM (
VersionInfo(..)
, module StackIdeM
) where
import Control.Monad.Free
import Control.Monad.Free.TH (makeFree)
import Data.Text (Text)
import Stack.Ide.JsonAPI
deriving instance Show VersionInfo
deriving instanc... | {-# LANGUAGE DeriveFunctor, TemplateHaskell, FlexibleContexts #-}
module StackIdeM (
VersionInfo(..)
, module StackIdeM
) where
import Control.Monad.Free
import Control.Monad.Free.TH (makeFree)
import Data.Text (Text)
import Stack.Ide.JsonAPI
type Directory = Text
data StackIde next
= CreateSession Directory n... | Remove standalone deriving now PR is in | Remove standalone deriving now PR is in
| Haskell | mit | CRogers/stack-ide-atom,CRogers/stack-ide-atom |
2aa7576e00be5bc05b4dec88df84cf46cba1af1d | src/Plunge.hs | src/Plunge.hs | module Main where
import Plunge.Parsers.PreprocessorOutput
import Plunge.Preprocessor
import Plunge.Analytics.C2CPP
import Plunge.Printers.Analytics
import Control.Monad
import System.Environment
main :: IO ()
main = do
fPath <- parseArguments
cppResult <- preprocessFile fPath []
case cppResult of
Left er... | module Main where
import Plunge.Parsers.PreprocessorOutput
import Plunge.Preprocessor
import Plunge.Analytics.C2CPP
import Plunge.Printers.Analytics
import Control.Monad
import System.Environment
type Options = Options { inputFile :: Maybe String
, linePader :: Char
... | Define what we expect options will be. | Define what we expect options will be.
| Haskell | bsd-3-clause | sw17ch/plunge,sw17ch/plunge |
5dc139c42bf17a6ed44d297f654bed74a61636fc | exercises/nth-prime/test/Tests.hs | exercises/nth-prime/test/Tests.hs | {-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Prime (nth)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = Tr... | {-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Prime (nth)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = Tr... | Fix comment to say that is matches x-common. | nth-prime: Fix comment to say that is matches x-common.
| Haskell | mit | exercism/xhaskell |
35d1e8c03f23027b5ad7aae58ca4c47fe38a7573 | 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 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... | Change to Vector Value for objects stored in lists | Change to Vector Value for objects stored in lists
| Haskell | bsd-3-clause | ibotty/stencil,sourrust/karver |
c82f251bbcb9e142e2b702c8a2358b2911d82a68 | src/Shaker/Action/Compile.hs | src/Shaker/Action/Compile.hs | module Shaker.Action.Compile(
runCompile
,runFullCompile
,ghcCompile
)
where
import Shaker.SourceHelper
import GHC
import DynFlags
import GHC.Paths
import Shaker.Type
import Control.Monad.Reader
-- | Run haskell compilation on given CompileInput list
runCompile :: Plugin
runCompile = asks compileInput... | module Shaker.Action.Compile(
runCompile
,runFullCompile
,ghcCompile
)
where
import Shaker.SourceHelper
import GHC
import DynFlags
import GHC.Paths
import Shaker.Type
import Control.Monad.Reader
-- | Run haskell compilation on given CompileInput list
runCompile :: Plugin
runCompile = asks compileInput... | Remove th filtering, seems to be a windows bug instead | Remove th filtering, seems to be a windows bug instead
| Haskell | isc | bonnefoa/Shaker |
0fd1db73f9952395764e2d66ff05a2497aa5fb71 | test/BACnet/WriterSpec.hs | test/BACnet/WriterSpec.hs | module BACnet.WriterSpec where
import Test.Hspec
import Test.QuickCheck
import BACnet.Writer
spec :: Spec
spec =
do
describe "writeNullAP" $
it "writes [0x00]" $
runW writeNullAP `shouldBe` [0x00]
describe "writeBoolAP" $ do
it "writes [0x10] for Bool input False" $
runW (writeB... | module BACnet.WriterSpec where
import Test.Hspec
import Test.QuickCheck
import BACnet.Writer
spec :: Spec
spec =
do
describe "writeNullAP" $
it "writes [0x00]" $
runW writeNullAP `shouldBe` [0x00]
describe "writeBoolAP" $ do
it "writes [0x10] for Bool input False" $
runW (writeB... | Add 4th test for writeUnsignedAP | Add 4th test for writeUnsignedAP
| Haskell | mit | michaelgwelch/bacnet |
c63e76ebb179323f12cd10d38190343ff1f8e6bb | Examples/Test/Files.hs | Examples/Test/Files.hs |
module Examples.Test.Files(main) where
import Development.Shake
import Examples.Util
import Control.Monad
import Data.List
main = shaken test $ \args obj -> do
let fun = "@" `elem` args
let rest = delete "@" args
want $ map obj $ if null rest then ["even.txt","odd.txt"] else rest
let deps ?*>> act ... |
module Examples.Test.Files(main) where
import Development.Shake
import Examples.Util
import Control.Monad
import Data.List
main = shaken test $ \args obj -> do
let fun = "@" `elem` args
let rest = delete "@" args
want $ map obj $ if null rest then ["even.txt","odd.txt"] else rest
-- Since ?>> and *... | Add a note about why so many files tests | Add a note about why so many files tests
| Haskell | bsd-3-clause | ndmitchell/shake,nh2/shake,ndmitchell/shake,nh2/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,nh2/shake |
387fe06825be945f5e607b0c26a3442986560af2 | assignments/haskell/parallel-letter-frequency/example.hs | assignments/haskell/parallel-letter-frequency/example.hs | module Frequency (frequency) where
import Control.Monad.Par (IVar, Par)
import qualified Control.Monad.Par as Par
import Data.Char (isLetter, toLower)
import Data.List.Split (chunksOf)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Text (Text)
impor... | module Frequency (frequency) where
import Control.Parallel.Strategies (using, parListChunk, rdeepseq)
import Data.Char (isLetter, toLower)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Ratio ((%))
import Data.Text (Text)
import qualified Data.Text ... | Use the parallel library, monad-par breaks build | Use the parallel library, monad-par breaks build
The monad-par library isn't in the Haskell platform
| Haskell | mit | pminten/xhaskell,exercism/xhaskell,stevejb71/xhaskell |
ef7d323bd118006e610560461ddb07973e216e4d | test/Main.hs | test/Main.hs | module Main where
import Hasql.TH.Prelude
import Hedgehog
import Hedgehog.Main
import qualified Main.Gen as Gen
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import qualified Hasql.TH.Syntax.Ast as Ast
import qualified Hasql.TH.Syntax.Parsing as Parsing
import qualified Hasql.TH.Syntax.... | module Main where
import Hasql.TH.Prelude
import Hedgehog
import Hedgehog.Main
import qualified Main.Gen as Gen
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import qualified Hasql.TH.Syntax.Ast as Ast
import qualified Hasql.TH.Syntax.Parsing as Parsing
import qualified Hasql.TH.Syntax.... | Decrease the amount of simulations in tests | Decrease the amount of simulations in tests
| Haskell | mit | nikita-volkov/hasql-th |
5959795492c6a047ad47642ff301b6312ac8f9a3 | BridgeBuddy.hs | BridgeBuddy.hs | import System.Environment (getArgs)
import Control.Monad
import Control.Monad.Writer
import Cards
import Data.List
main :: IO ()
main = do
args <- getArgs
let num_decks =
case args of
[] -> 1
(x:_) -> (read x) :: Int
forM_ [1 .. num_decks] $ \_ -> do
han... | import System.Environment (getArgs)
import Control.Monad
import Control.Monad.Writer
import Cards
import Data.List
main :: IO ()
main = do
args <- getArgs
let num_decks =
case args of
[] -> 1
(x:_) -> (read x) :: Int
forM_ [1 .. num_decks] $ \_ -> do
pri... | Change to print all 4 hands | Change to print all 4 hands
| Haskell | apache-2.0 | derekmcloughlin/BridgeBuddyServer |
1d622154bd5d4181bdbf2962b6e57c41ef928bad | config/Main.hs | config/Main.hs | import Development.Shake.Config
import Node
import Node.MeasureTractsCsv hiding (rules)
import Paths (outdir)
import Shake.BuildNode
main :: IO ()
main = shakeArgs shakeOptions{shakeFiles=outdir
,shakeVerbosity=Chatty
... | import Development.Shake.Config
import Node
import Node.MeasureTractsCsv hiding (rules)
import Paths (outdir)
import Shake.BuildNode
import System.Console.GetOpt
-- import Data.Maybe ( fromMaybe )
-- options :: [OptDescr String-- ]
-- o... | Add commandline case id targets | ENH: Add commandline case id targets
| Haskell | bsd-3-clause | reckbo/ppl,reckbo/ppl,reckbo/ppl |
cb5ed257a85a133fdf75dcd8e12295b3f4fe9513 | testsuite/tests/typecheck/should_compile/T7891.hs | testsuite/tests/typecheck/should_compile/T7891.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module T7891 where
newtype T = T (forall t. t -> t)
tf :: T
tf = T id
-- Can't write this type signature:
-- f :: t -> t
T f = tf
-- But with an indirection we can:
g :: t -> t
g = f
-- We can still use f as it were fully polymorphic (which is good):
a :: ... | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module T7891 where
newtype T = T (forall t. t -> t)
tf :: T
tf = T id
-- Can't write this type signature:
f :: t -> t
T f = tf
-- But with an indirection we can:
g :: t -> t
g = f
-- We can still use f as it were fully polymorphic (which is good):
a :: ()
... | Make the test actually test the bug! | Make the test actually test the bug!
(Thanks to Martijn for correcting this oversight.)
| Haskell | bsd-3-clause | ezyang/ghc,AlexanderPankiv/ghc,tibbe/ghc,da-x/ghc,wxwxwwxxx/ghc,tjakway/ghcjvm,nathyong/microghc-ghc,GaloisInc/halvm-ghc,gcampax/ghc,tjakway/ghcjvm,TomMD/ghc,urbanslug/ghc,mettekou/ghc,elieux/ghc,vTurbine/ghc,ghc-android/ghc,mcschroeder/ghc,olsner/ghc,nathyong/microghc-ghc,olsner/ghc,ghc-android/ghc,elieux/ghc,nathyong... |
8d18ba6b4ab557cad9c827ba0701a8e4b6af87d7 | src/System/SendFile.hs | src/System/SendFile.hs | {-# LANGUAGE CPP #-}
-- | Snap's unified interface to sendfile.
-- Modified from sendfile 0.6.1
module System.SendFile
( sendFile
, sendFileMode
) where
#if defined(LINUX)
import System.SendFile.Linux (sendFile)
#elif defined(FREEBSD)
import System.SendFile.FreeBSD (sendFile)
#elif define... | {-# LANGUAGE CPP #-}
-- | Snap's unified interface to sendfile.
-- Modified from sendfile 0.6.1
module System.SendFile
( sendFile
, sendFileMode
) where
#if defined(LINUX)
import System.SendFile.Linux (sendFile)
#elif defined(FREEBSD)
import System.SendFile.FreeBSD (sendFile)
#elif define... | Fix breakage caused by last style commit. | Fix breakage caused by last style commit.
| Haskell | bsd-3-clause | 23Skidoo/snap-server,snapframework/snap-server,k-bx/snap-server,sopvop/snap-server,snapframework/snap-server,23Skidoo/snap-server,snapframework/snap-server,k-bx/snap-server,sopvop/snap-server,23Skidoo/snap-server |
b75fbb9d01b1f30386d5b95f9469e4d6e10da4ca | Handler/User.hs | Handler/User.hs | module Handler.User where
import Import
userForm :: Form User
userForm = renderDivs $ User
<$> areq textField "Nimi" Nothing
<*> areq emailField "Sähköpostiosoite" Nothing
getUserR :: Handler Html
getUserR = do
-- Generate the form to be displayed
(widget, enctype) <- generateFormPost userForm
de... | module Handler.User where
import Import
userForm :: Form User
userForm = renderDivs $ User
<$> areq textField "Nimi" Nothing
<*> areq emailField "Sähköpostiosoite" Nothing
getUserR :: Handler Html
getUserR = do
-- Generate the form to be displayed
(widget, enctype) <- generateFormPost userForm
de... | Add database insert for user | Add database insert for user
| Haskell | agpl-3.0 | Lasokki/omanet |
6efc4797937d163afc65a941149cf449f909bed0 | server/Email.hs | server/Email.hs |
module Email where
import Config
import Files
import SendMail
import ServerMonad
import Utils
import Control.Monad
import System.Exit
import System.FilePath
sendEmails :: User -> BuildNum -> String -> IO ()
sendEmails u bn url
= do let buildsDir = baseDir </> "clients" </> u </> "builds"
buildDir = build... |
module Email where
import Config
import Files
import SendMail
import ServerMonad
import Utils
import Control.Monad
import System.Exit
import System.FilePath
sendEmails :: User -> BuildNum -> String -> IO ()
sendEmails u bn url
= do let buildsDir = baseDir </> "clients" </> u </> "builds"
buildDir = build... | Put the build result in e-mails | Put the build result in e-mails | Haskell | bsd-3-clause | haskell/ghc-builder,bgamari/ghc-builder |
02a7c654286953a2898d17fa7e3cb9f745fcc0ea | src/Hint/All.hs | src/Hint/All.hs |
module Hint.All(readHints) where
import Control.Monad
import Util
import Type
import Hint.Match
import Hint.List
import Hint.Monad
import Hint.Lambda
import Hint.Bracket
readHints :: [FilePath] -> IO Hint
readHints = liftM (concatHints . concat) . mapM readHint
readHint :: FilePath -> IO [Hint]
readHint file = d... |
module Hint.All(readHints) where
import Control.Monad
import Util
import Type
import Language.Haskell.Exts
import Hint.Match
import Hint.List
import Hint.Monad
import Hint.Lambda
import Hint.Bracket
hints :: [(String,Module -> Hint)]
hints = let (*) = (,) in
["Match" * readMatch
,"List" * const listHi... | Reformat to making the hints more modular in a list | Reformat to making the hints more modular in a list | Haskell | bsd-3-clause | bitemyapp/hlint,eigengrau/hlint,gibiansky/hlint,ndmitchell/hlint,ndmitchell/hlint,mpickering/hlint |
c29a0f6d88cc548ce6976d84e7fa06839d8a4799 | lib/sandbox/hs/Environment.hs | lib/sandbox/hs/Environment.hs | module Environment where
import Prelude
import Control.Applicative
import Control.Arrow
import qualified Control.Exception as E
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Reader
import Control.Monad.State
import Con... | module Environment where
import Prelude
import Control.Applicative
import Control.Arrow
import qualified Control.Exception as E
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Reader
import Control.Monad.State
import Con... | Remove JSON import from Haskell sandbox. | Remove JSON import from Haskell sandbox.
| Haskell | mit | oftn/oftn-bot,brigand/oftn-bot,vnen/nanobot,NinjaBanjo/vbot,brigand/oftn-bot,oftn/oftn-bot,robertmaxrees/r0b0t,robotlolita/nanobot,robertmaxrees/r0b0t,vnen/nanobot,robertmaxrees/r0b0t,robotlolita/nanobot,brigand/oftn-bot,oftn/oftn-bot |
d07ba102f996cf4a58721334991ad839e06d2e19 | Handler/Api.hs | Handler/Api.hs | module Handler.Api where
import Import
import Util
import qualified Data.Text as T
import qualified Network.HTTP.Types as HTTP
import Network.Wai (requestHeaders)
import Yesod.Auth.Email (isValidPass)
postApiTasksR :: Handler RepJson
postApiTasksR = do
userId <- httpBasicAuth
newTask <- parseJsonBody_ -- TODO er... | module Handler.Api where
import Import
import Util
import qualified Data.Text as T
import qualified Network.HTTP.Types as HTTP
import Network.Wai (requestHeaders)
import Yesod.Auth.Email (isValidPass)
import Yesod.Default.Config (AppConfig(..))
postApiTasksR :: Handler RepJson
postApiTasksR = do
userId <- httpBasi... | Use appRoot as basic auth realm | Use appRoot as basic auth realm
| Haskell | bsd-2-clause | samstokes/yesodoro-reboot,samstokes/yesodoro-reboot |
bffda882ec19941a1f11da64accd6c94f3c64acd | test/Parser/EventParserSpec.hs | test/Parser/EventParserSpec.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Parser.EventParserSpec where
import Parser.EventParser
import Test.Hspec
import Text.RawString.QQ
import Types.Metric
spec :: Spec
spec =
describe "EventParser" $
it "returns an Event parsed from... | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Parser.EventParserSpec where
import Parser.EventParser
import Test.Hspec
import Text.RawString.QQ
import Types.Metric
spec :: Spec
spec =
describe "EventParser" $
it "returns an Event parsed from... | Fix bdd language in spec | Fix bdd language in spec
| Haskell | bsd-3-clause | hsienchiaolee/stethoscope,ericTsiliacos/stethoscope,hsienchiaolee/stethoscope,ericTsiliacos/stethoscope |
765af480e264621f074c9e5ae5829d61e708b67a | test/integration/tests/cabal-solver/Main.hs | test/integration/tests/cabal-solver/Main.hs | import StackTest
import System.Directory
main :: IO ()
main = do
isAlpine <- getIsAlpine
if isAlpine || isARM
then logInfo "Disabled on Alpine Linux and ARM since it cannot yet install its own GHC."
else do
run "cabal" ["sandbox", "init"]
stack ["unpack", "acme-dont-1.1"]
run "cabal" ["in... | import StackTest
import System.Directory
main :: IO ()
main = do
isAlpine <- getIsAlpine
if isAlpine || isARM
then logInfo "Disabled on Alpine Linux and ARM since it cannot yet install its own GHC."
else do
run "cabal" ["sandbox", "init"]
stack ["unpack", "acme-dont-1.1"]
run "cabal" ["in... | Fix resolver of test to pin GHC version. | Fix resolver of test to pin GHC version.
| Haskell | bsd-3-clause | juhp/stack,juhp/stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.