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 |
|---|---|---|---|---|---|---|---|---|---|
6fc8cb313e75414a7e7fb91fa725015a2ae2c46c | src/Grep.hs | src/Grep.hs | {-# LANGUAGE RecordWildCards #-}
module Grep(runGrep) where
import Language.Haskell.HLint2
import HSE.All
import Control.Monad
runGrep :: String -> Bool -> ParseFlags -> [FilePath] -> IO ()
runGrep pattern exact flags files = do
let exp = fromParseResult $ parseExp pattern
forM_ files $ \file -> do
... | {-# LANGUAGE RecordWildCards #-}
module Grep(runGrep) where
import Language.Haskell.HLint2
import HSE.All
import Control.Monad
runGrep :: String -> Bool -> ParseFlags -> [FilePath] -> IO ()
runGrep pattern exact flags files = do
let exp = fromParseResult $ parseExp pattern
let scope = scopeCreate $ Module a... | Fix up grep to use a correct module scope | Fix up grep to use a correct module scope
| Haskell | bsd-3-clause | ndmitchell/hlint,mpickering/hlint,eigengrau/hlint,bitemyapp/hlint,gibiansky/hlint,ndmitchell/hlint |
18539d0ca551e312a81f2d9bda5ad055a657906a | src/Rules/Configure.hs | src/Rules/Configure.hs | module Rules.Configure (configureRules) where
import qualified System.Info.Extra as System
import Base
import Builder
import CommandLine
import Context
import GHC
import Target
import Utilities
configureRules :: Rules ()
configureRules = do
[configFile, "settings", configH] &%> \outs -> do
skip <- cmdSki... | module Rules.Configure (configureRules) where
import qualified System.Info.Extra as System
import Base
import Builder
import CommandLine
import Context
import GHC
import Target
import Utilities
configureRules :: Rules ()
configureRules = do
[configFile, "settings", configH] &%> \outs -> do
skip <- cmdSki... | Switch to the python based boot script | Switch to the python based boot script
See #314
| Haskell | bsd-3-clause | bgamari/shaking-up-ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,snowleopard/hadrian,snowleopard/shaking-up-ghc |
9a861d89c5b7e8eec902bb898741094efa2c6496 | src/Formalize/Html.hs | src/Formalize/Html.hs | {-# LANGUAGE OverloadedStrings #-}
module Formalize.Html
( formHtml
, pdfHtml
) where
import Control.Monad.IO.Class (MonadIO)
import Data.Text.Lazy (Text)
import Formalize.Types
import System.FilePath
import Text.Hastache
import Text.Hastache.Context
import qualified Data.Text as T
-- Location of view fil... | {-# LANGUAGE OverloadedStrings #-}
module Formalize.Html
( formHtml
, pdfHtml
) where
import Control.Monad.IO.Class (MonadIO)
import Data.Text.Lazy as LT (Text)
import Formalize.Types
import System.FilePath
import Text.Hastache
import Text.Hastache.Context
-- Location of view files.
viewFolder :: FilePath... | Make it more clear where text is lazy. | Make it more clear where text is lazy.
| Haskell | bsd-3-clause | thevangelist/Crystallize,Lepovirta/Crystallize,thevangelist/Crystallize,Lepovirta/Crystallize,Lepovirta/Crystallize,thevangelist/Crystallize |
e31bf1e9b010a9bc0dd0ecf083f609afa6b3494c | Main.hs | Main.hs | {-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
module Main where
import Data.ByteString.Lazy.Char8 ()
import Network.HTTP.Types
import Network.Wai
import qualified Network.Wai.Handler.Warp as W
import System.Console.CmdArgs
data Nixrbd = Nixrbd {
port :: Int
} deriving (Show, Data, Typeable)
nixrbdOpts = N... | {-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
module Main where
import Data.ByteString.Lazy.Char8 ()
import Network.HTTP.Types
import Network.Wai
import qualified Network.Wai.Handler.Warp as W
import System.Console.CmdArgs
data Nixrbd = Nixrbd {
nixrbdPort :: Int,
nixrbdConfigFile :: FilePath
} deriving ... | Clean up command line arguments a bit | Clean up command line arguments a bit
| Haskell | bsd-3-clause | rickynils/nixrbd |
737c7a31a5add75ee7f81d12e54960d526e30c5b | src/State/Types.hs | src/State/Types.hs | {-# LANGUAGE OverloadedStrings #-}
module State.Types
( Comment(..)
, ChapterId
, chapterId
, mkChapterId
, CommentId
, commentId
, mkCommentId
, State(..)
)
where
import Control.Applicative ( (<$>), (<*>) )
import qualified Data.Text as T
import qualified Data.Text.Encoding as E... | {-# LANGUAGE OverloadedStrings #-}
module State.Types
( Comment(..)
, ChapterId
, chapterId
, mkChapterId
, CommentId
, commentId
, mkCommentId
, State(..)
)
where
import Control.Applicative ( (<$>), (<*>) )
import qualified Data.Text as T
import qualified Data.Text.Encoding as E... | Add comment explaining mysterious CommentId and ChapterId introduction functions | Add comment explaining mysterious CommentId and ChapterId introduction functions
| Haskell | bsd-3-clause | j3h/doc-review |
627db95a1262bd68bf2a21b0a4200eb14c0d2e3b | src/DefaultMain.hs | src/DefaultMain.hs | module DefaultMain where
import System.Environment (getArgs)
import Shared
defaultMain :: (Show a, Ord a) => ([String] -> FrequencyCount a) -> IO ()
defaultMain frequency = do
t0 <- printT0
[fileName] <- getArgs
fileContents <- readFile fileName
let wordFreq = frequency (words fileContents)
pri... | module DefaultMain where
import System.Environment (getArgs)
import Shared
defaultMain :: (Show a, Ord a) => ([Char] -> FrequencyCount a) -> IO ()
defaultMain frequency = do
t0 <- printT0
[fileName] <- getArgs
fileContents <- readFile fileName
let charFreq = frequency fileContents
printTimeSinc... | Switch to character counting, it takes longer than word counting | Switch to character counting, it takes longer than word counting
| Haskell | mit | apauley/parallel-frequency |
b904c5f7ad2ad0a2f906936a5d5b5648b5ea59c6 | clk-report.hs | clk-report.hs | import App.Clk.Entry
import Data.Maybe
import qualified Data.Map as Map
import Text.Printf
main = do
entries <- mostRecentMonthEntries
let reportable = filter isReportable entries
let totalDuration = sum $ map (fromJust.dur) $ reportable
let f = \s e -> Map.insertWith (+) (client e) (maybe 0 id $ du... | import App.Clk.Entry
import Data.Maybe
import qualified Data.Map as Map
import Text.Printf
main = do
entries <- mostRecentMonthEntries
let reportable = filter isReportable entries
let f = \s e -> Map.insertWith (+) (client e) (maybe 0 id $ dur e) s
let byClient = foldl f Map.empty reportable
let... | Simplify calculation of the total duration | Simplify calculation of the total duration
Since we've already traversed the list of entries and summed the
durations by client, we don't need to traverse the entire list of
entries again. One more summing stage finishes the job.
| Haskell | unlicense | mndrix/clk |
e9a7f63df9e2085d177d5d716dec6d1e056b1b84 | 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.
darcs-hash:20071230061920-928c4-3c0738fd1619b9a11510bd99413045aa39707c0a
| Haskell | bsd-3-clause | yzhou61/xmonad-contrib,yzhou61/xmonad-contrib,yzhou61/xmonad-contrib |
c7ebf56f26f2e480f9d74a7f7329f18ba2760f30 | tests/CheckAbstractSyntax.hs | tests/CheckAbstractSyntax.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module CheckAbstractSyntax
( checkAbstractSyntax
)
where
import Core.Text.Rope ()
import Core.Text.Utilities ()
import Test.Hspec
import Technique.Language
import Technique.Quantity
import Technique.Formatter
import ExampleProcedure hiding (mai... | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module CheckAbstractSyntax
( checkAbstractSyntax
)
where
import Core.Data.Structures
import Core.Text.Rope ()
import Core.Text.Utilities
import Data.Maybe (fromJust)
import Data.Text.Prettyprint.Doc (line)
import Test.Hspec
import Technique.Lang... | Test rendering of a result Tablet | Test rendering of a result Tablet
Add a helper function to render to an expectation in a quasi-quoted here
document.
| Haskell | mit | oprdyn/technique,oprdyn/technique |
bafc998e02d538a14c2d0930e071e8c0be659873 | src/Language/K3/Core/Expression.hs | src/Language/K3/Core/Expression.hs | {-# LANGUAGE TypeFamilies #-}
-- | Expressions in K3.
module Language.K3.Core.Expression where
import Language.K3.Core.Annotation
import Language.K3.Core.Type
-- | Expression tags. Every expression can be qualified with a mutability annotation.
data Expression
= EConstant Constant
| EVariable Identifier
... | {-# LANGUAGE TypeFamilies #-}
-- | Expressions in K3.
module Language.K3.Core.Expression where
import Data.Word (Word8)
import Language.K3.Core.Annotation
import Language.K3.Core.Type
-- | Expression tags. Every expression can be qualified with a mutability annotation.
data Expression
= EConstant Constant
|... | Change the 'byte' datatype to a Word8 representation. | Change the 'byte' datatype to a Word8 representation.
| Haskell | apache-2.0 | DaMSL/K3,DaMSL/K3,yliu120/K3 |
11c1572f0b62ecb644ba0311f89c4fc1d202a161 | chain/test/Test/Pos/Chain/Update/Json.hs | chain/test/Test/Pos/Chain/Update/Json.hs | {-# LANGUAGE TemplateHaskell #-}
module Test.Pos.Chain.Update.Json
( tests
) where
import Universum
import Hedgehog (Property)
import qualified Hedgehog as H
import Test.Pos.Chain.Update.Gen (genBlockVersionData,
genSoftforkRule)
import Test... | {-# LANGUAGE TemplateHaskell #-}
module Test.Pos.Chain.Update.Json
( tests
) where
import Universum
import Hedgehog (Property)
import qualified Hedgehog as H
import Test.Pos.Chain.Update.Gen (genApplicationName,
genBlockVersionData, genSoftforkRule, g... | Add JSON tests for a few `chain` datatypes | [CBR-502] Add JSON tests for a few `chain` datatypes
| Haskell | apache-2.0 | 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/pos-haskell-prototype,input-output-hk/cardano-sl |
5da4815aa9de2c2a243bc60e2ee22f8c8bc9e584 | src/HaskellWorks/Data/Succinct/BalancedParens/Internal.hs | src/HaskellWorks/Data/Succinct/BalancedParens/Internal.hs | module HaskellWorks.Data.Succinct.BalancedParens.Internal
( BalancedParens(..)
, firstChild
, nextSibling
, parent
, depth
, subtreeSize
) where
import HaskellWorks.Data.Positioning
import HaskellWorks.Data.Succinct.RankSelect.Internal
class BalancedParens v where
findOpen :: v -> Position -> Position... | module HaskellWorks.Data.Succinct.BalancedParens.Internal
( BalancedParens(..)
, firstChild
, nextSibling
, parent
, depth
, subtreeSize
) where
import HaskellWorks.Data.Positioning
import HaskellWorks.Data.Succinct.RankSelect.Internal
class BalancedParens v where
findOpen :: v -> Position -> Position... | Change return type of subtreeSize to Count. | Change return type of subtreeSize to Count.
| Haskell | bsd-3-clause | haskell-works/hw-bits |
2c9c42ab05432014b74f4427458cb1e85840967a | hello.hs | hello.hs | module Main where
import Control.Monad
import Foreign.C.Types
import System.Environment
foreign import ccall unsafe current_timestamp :: IO CLLong
foreign import ccall unsafe plusone :: CInt -> CInt
run :: CInt -> IO ()
run count = do
start <- current_timestamp
let
go x =
... | module Main where
import Control.Monad
import Foreign.C.Types
import System.Environment
foreign import ccall unsafe current_timestamp :: IO CLLong
foreign import ccall unsafe plusone :: CInt -> CInt
run :: CInt -> IO ()
run count = do
start <- current_timestamp
let
go x | x < c... | Move increment out of IO | Move increment out of IO
| Haskell | apache-2.0 | dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead,dyu/ffi-overhead |
163da5a4b6268de54594e18f69f06799df637305 | haddock-test/src/Test/Haddock/Utils.hs | haddock-test/src/Test/Haddock/Utils.hs | module Test.Haddock.Utils where
import Data.Maybe
mlast :: [a] -> Maybe a
mlast = listToMaybe . reverse
| module Test.Haddock.Utils where
import Control.Monad
import Data.Maybe
import System.Directory
import System.FilePath
mlast :: [a] -> Maybe a
mlast = listToMaybe . reverse
partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a])
partitionM _ [] = pure ([], [])
partitionM p (x:xs) = do
(ss, fs) <- parti... | Create utility function for recursive obtaining directory contents. | Create utility function for recursive obtaining directory contents. | Haskell | bsd-2-clause | Helkafen/haddock,Fuuzetsu/haddock,niteria/haddock,idontgetoutmuch/haddock,haskell/haddock,niteria/haddock,haskell/haddock,Fuuzetsu/haddock,randen/haddock,haskell/haddock,idontgetoutmuch/haddock,Helkafen/haddock,haskell/haddock,Helkafen/haddock,Fuuzetsu/haddock,idontgetoutmuch/haddock,randen/haddock,haskell/haddock,rand... |
e845c45ce512f920552f581a5bcd133bb9ab286a | src/Input/Set.hs | src/Input/Set.hs | {-# LANGUAGE PatternGuards, TupleSections #-}
module Input.Set(setStackage, setPlatform, setGHC) where
import Control.Applicative
import Data.List.Extra
import System.IO.Extra
import qualified Data.Set as Set
import Prelude
-- | Return information about which items are in a particular set.
setStackage :: FilePath -... | {-# LANGUAGE PatternGuards, TupleSections #-}
module Input.Set(setStackage, setPlatform, setGHC) where
import Control.Applicative
import Data.List.Extra
import System.IO.Extra
import qualified Data.Set as Set
import Prelude
-- | Return information about which items are in a particular set.
setStackage :: FilePath -... | Exclude the telegram-api, causes a stack overflow | Exclude the telegram-api, causes a stack overflow
| Haskell | bsd-3-clause | ndmitchell/hoogle,ndmitchell/hoogle,ndmitchell/hoogle |
93fb77e71427a4156478e41ebc3f043dc1a620dc | Example.hs | Example.hs |
module Example where
int0 = 0 :: Int
int1 = 1 :: Int
{-
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)
-}
{-
main xs = (a . b . c) xs
a x = x+(1::Int)
b x = x*(4::Int)
c x = x-(3::Int)
-}
{-
main x = even (x :: Int)
-}
{-
ma... |
module Example where
import Array
int0 = 0 :: Int
int1 = 1 :: Int
main0 xs = map head xs
main1 x = neq x
neq = not . eq
eq x = x == (0::Int)
main2 x y = neq2 (x::Int) y
neq2 x y = not (x == y)
main3 xs = (a . b . c) xs
a x = x+(1::Int)
b x = x*(4::Int)
c x = x-(3::Int)
main4 x = even (x :: Int)
main5 x =... | Move all the examples into being active at once | Move all the examples into being active at once | Haskell | bsd-3-clause | ndmitchell/firstify |
759649d1a02add39b46c69fecff7a6e504aa3447 | Distribution/Server/Pages/BuildReports.hs | Distribution/Server/Pages/BuildReports.hs | -- Generate an HTML page listing all build reports for a package
module Distribution.Server.Pages.BuildReports (buildReportSummary) where
import Distribution.Server.BuildReport
import Distribution.Server.BuildReports
import Distribution.Server.Pages.Template ( hackagePage )
import Distribution.Package
( Pac... | -- Generate an HTML page listing all build reports for a package
module Distribution.Server.Pages.BuildReports (buildReportSummary) where
import qualified Distribution.Server.BuildReport as BuildReport
import Distribution.Server.BuildReport (BuildReport)
import Distribution.Server.BuildReports
import Distribution.Ser... | Add initial build report summary table | Add initial build report summary table | Haskell | bsd-3-clause | beni55/hackage2,beni55/hackage2,isomorphism/hackage2 |
b8a640710bda50c3e9ddc1cf340fc5268b46cd47 | src/Pos/Crypto/Arbitrary/Hash.hs | src/Pos/Crypto/Arbitrary/Hash.hs | {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE TypeApplications #-}
-- | `Arbitrary` instance for `Hash`
--
-- Moved to a separate module to suppress `redundant constraint`
-- warning about `Binary a` constraint
-- (discussion: https://github.com/input-output-hk/pos-haskell-prototype/commit/b0655df21... | {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
{-# LANGUAGE TypeApplications #-}
-- | `Arbitrary` instance for `Hash`
--
-- Moved to a separate module to suppress `redundant constraint`
-- warning about `Binary a` constraint
-- (discussion: https://github.com/input-output-hk/pos-haskell-prototype/commit/b0655df21... | Fix benchmarks after dirty merge | Fix benchmarks after dirty merge
| Haskell | apache-2.0 | input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl |
9cbe7e8ee1023f9813fcd49ac3a2c5ea620a8a0c | misc/HLint_Hints.hs | misc/HLint_Hints.hs |
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 Warning ==> warn
error = idea Suggestion ==> suggest... |
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 = Var a (toNamed x) ==> toNamed x
error = Con a (toNamed x)... | Add more HLint rules to use toNamed | Add more HLint rules to use toNamed
| Haskell | bsd-3-clause | ndmitchell/hlint,ndmitchell/hlint |
470471127e30901aadc7ec057880a2d43153c743 | 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.... | Reduce the amount of simulations by half | Reduce the amount of simulations by half
For Travis not to quit on us
| Haskell | mit | nikita-volkov/hasql-th |
c46a7fecc212573cc7864a25a762e9e6849f7257 | 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`
| Haskell | bsd-3-clause | rimmington/unix,rimmington/unix,rimmington/unix,rimmington/unix |
79ade11d1182f65b494a2aef951e8d33ddb7b03c | test/Spec.hs | test/Spec.hs | import Debug.Trace
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Text.Unidecode
main :: IO ()
main = hspec spec
spec = describe "unidecode" $ do
it "doesn't hurt ascii text" $ do
unidecode 'a' `shouldBe` "a"
it "doesn't crash" $... | import Debug.Trace
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Text.Unidecode
main :: IO ()
main = hspec spec
spec = describe "unidecode" $ do
it "doesn't hurt ascii text" $ do
unidecode 'a' `shouldBe` "a"
it "doesn't crash" $... | Add an explicit non-generative test for characters that are multi-byte in all UTF encodings | Add an explicit non-generative test for characters that are multi-byte in all UTF encodings
| Haskell | bsd-3-clause | mwotton/unidecode |
6ed8697fc9d4e60fe21b0983b2d08a77f4443c77 | testsuite/tests/ghc-regress/typecheck/should_compile/tc081.hs | testsuite/tests/ghc-regress/typecheck/should_compile/tc081.hs | -- !!! an example Simon made up
--
module ShouldSucceed where
f x = (x+1, x<3, g True, g 'c')
where
g y = if x>2 then [] else [y]
{-
Here the type-check of g will yield an LIE with an Ord dict
for x. g still has type forall a. a -> [a]. The dictionary is
free, bound by the x.
It should be ok to add the signature:... | -- !!! an example Simon made up
--
module ShouldSucceed where
f x = (x+1, x<3, g True, g 'c')
where
g y = if x>2 then [] else [y]
{-
Here the type-check of g will yield an LIE with an Ord dict
for x. g still has type forall a. a -> [a]. The dictionary is
free, bound by the x.
It should be ok to add the signature:... | Add a type signature in the test | Add a type signature in the test | Haskell | bsd-3-clause | snoyberg/ghc,mcschroeder/ghc,mfine/ghc,fmthoma/ghc,lukexi/ghc,christiaanb/ghc,gcampax/ghc,acowley/ghc,ml9951/ghc,lukexi/ghc-7.8-arm64,olsner/ghc,nathyong/microghc-ghc,snoyberg/ghc,urbanslug/ghc,ghc-android/ghc,mettekou/ghc,anton-dessiatov/ghc,bitemyapp/ghc,jstolarek/ghc,spacekitteh/smcghc,GaloisInc/halvm-ghc,hferreiro/... |
a17761d652b1771b763aef70c0ea54576a8511be | devel.hs | devel.hs | {-# LANGUAGE PackageImports #-}
import "Snowdrift" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (forkIO, threadDelay)
main :: IO ()
main = d... | {-# LANGUAGE PackageImports #-}
import "Snowdrift" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, setPort)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (forkIO, threadDelay)
main :: IO ()
main = do
... | Use setPort instead of deprecated settingsPort | Use setPort instead of deprecated settingsPort
| Haskell | agpl-3.0 | chreekat/snowdrift,snowdriftcoop/snowdrift,chreekat/snowdrift,akegalj/snowdrift,akegalj/snowdrift |
049f952c9c88dc5545aa2649a7216762d02d76d6 | System/Hardware/Haskino/SamplePrograms/ExampleE.hs | System/Hardware/Haskino/SamplePrograms/ExampleE.hs | -------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.SamplePrograms.ExampleE
-- Based on System.Hardware.Arduino
-- Copyright : (c) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Based on our in... | -------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.SamplePrograms.ExampleE
-- Based on System.Hardware.Arduino
-- Copyright : (c) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Based on our in... | Rename extend op to <<= | Rename extend op to <<=
| Haskell | bsd-3-clause | ku-fpg/arduino-lab,ku-fpg/arduino-lab,ku-fpg/kansas-amber,ku-fpg/kansas-amber |
a7d84c90b4309c630a709778f8951a0194af9673 | Examples/Test/Manual.hs | Examples/Test/Manual.hs |
module Examples.Test.Manual(main) where
import Development.Shake
import Development.Shake.FilePath
import Examples.Util
import General.Base
main = shaken test $ \args obj ->
action $ liftIO $ error "The 'manual' example should only be used in test mode"
test build obj = do
copyDirectory "docs/manual" $ obj... |
module Examples.Test.Manual(main) where
import Development.Shake
import Development.Shake.FilePath
import Examples.Util
import General.Base
import System.Directory
main = shaken test $ \args obj ->
action $ liftIO $ error "The 'manual' example should only be used in test mode"
test build obj = do
copyDirec... | Change the manual to build Shake locally | Change the manual to build Shake locally
| Haskell | bsd-3-clause | ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake |
66214f11476bfa3a405f5aa0eb2641ca95f9f3f8 | src/Hi/Git.hs | src/Hi/Git.hs | module Hi.Git
(
clone
, config
, lsFiles
, expandUrl
) where
import Control.Applicative
import System.Exit
import System.Process (readProcess, readProcessWithExitCode, system)
expandUrl :: String -> String
expandUrl ('g':'h':':':xs) = "git@github.com:" ++ x... | module Hi.Git
(
clone
, config
, lsFiles
, expandUrl
) where
import Control.Applicative
import System.Exit
import System.Process (readProcess, readProcessWithExitCode, system)
expandUrl :: String -> String
expandUrl ('g':'h':':':xs) = "git@github.com:" ++ x... | Remove rather useless option from git-clone | Remove rather useless option from git-clone
| Haskell | bsd-3-clause | jonathankochems/hi |
9ef2f5e9de3a9828d78397fc4e47d43016caaba7 | src/Main.hs | src/Main.hs | module Main where
import Parser
import Text.ParserCombinators.Parsec.Prim
main :: IO ()
main =
putStrLn "wow"
| module Main where
import Parser
import Control.Monad.Trans
import System.Console.Haskeline
process :: String -> IO ()
process line = do
let res = parseToplevel line
case res of
Left err -> print err
Right ex -> mapM_ print ex
main :: IO ()
main = runInputT defaultSettings loop
where
loop = do
mi... | Add repl interface as main IO | Add repl interface as main IO
| Haskell | mit | yigitozkavci/glow,yigitozkavci/glow |
f3ba424bc4c397f115040a4607a9b700d9533aa9 | src/Hint/Util.hs | src/Hint/Util.hs | {-# LANGUAGE PatternGuards, ViewPatterns #-}
module Hint.Util where
import HSE.All
-- generate a lambda, but prettier (if possible)
niceLambda :: [String] -> Exp_ -> Exp_
niceLambda xs (Paren _ x) = niceLambda xs x
niceLambda xs (Lambda _ ((view -> PVar_ v):vs) x) = niceLambda (xs++[v]) (Lambda an vs x)
niceLambda ... | {-# LANGUAGE PatternGuards, ViewPatterns #-}
module Hint.Util where
import HSE.All
-- generate a lambda, but prettier (if possible)
niceLambda :: [String] -> Exp_ -> Exp_
niceLambda xs (Paren _ x) = niceLambda xs x
niceLambda xs (Lambda _ ((view -> PVar_ v):vs) x) = niceLambda (xs++[v]) (Lambda an vs x)
niceLambda ... | Fix some incorrect niceLambda transformations | Fix some incorrect niceLambda transformations | Haskell | bsd-3-clause | ndmitchell/hlint,gibiansky/hlint,eigengrau/hlint,ndmitchell/hlint,mpickering/hlint,bitemyapp/hlint |
1bb931c5c4fef98894288213ec65ba9dd73678f5 | tests/Text/Blaze/Tests.hs | tests/Text/Blaze/Tests.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.Blaze.Tests
( tests
) where
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test)
import Text.Blaze
tests :: [Test]
tests = []
| {-# LANGUAGE OverloadedStrings #-}
module Text.Blaze.Tests
( tests
) where
import Prelude hiding (div)
import Data.Monoid (mconcat, mempty, mappend)
import Control.Monad (replicateM)
import Control.Applicative ((<$>))
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
imp... | Add Arbitrary instance for Html a. | Add Arbitrary instance for Html a.
| Haskell | bsd-3-clause | jgm/blaze-html,Soostone/blaze-markup-haste,dylex/blaze-markup,mikehat/blaze-all,iblech/blaze-html,FranklinChen/blaze-markup,Soostone/blaze-html-haste,jgm/blaze-html,Soostone/blaze-markup-haste,FranklinChen/blaze-markup,mikehat/blaze-all,dylex/blaze-markup,iblech/blaze-html,mikehat/blaze-all,jgm/blaze-html |
0ca39e8d35ed82948da08d860403ff3db1cb182d | tests/lint/Shakefile.hs | tests/lint/Shakefile.hs | import Development.Shake
import Development.Shake.System
import System.FilePath
import Control.Exception
import Control.Monad.IO.Class
main :: IO ()
main = shake $ do
"access-without-need" *> \x -> do
liftIO $ readFile "accessed-without-need"
system' ["touch", "access-without-need"]
"ac... | import Development.Shake
import Development.Shake.System
import System.FilePath
import Control.Exception
import Control.Monad.IO.Class
main :: IO ()
main = shake $ do
"access-without-need" *> \x -> do
liftIO $ readFile "accessed-without-need" >>= putStrLn -- It's very important we actually use the conte... | Fix lint test so it actually accesses files | Fix lint test so it actually accesses files
| Haskell | bsd-3-clause | beni55/openshake,batterseapower/openshake,beni55/openshake |
1b07a905ea80fcd8abf8b516ffb5f95abea50dbc | BuildTest.hs | BuildTest.hs | module Main where
import qualified Hapistrano as Hap
import Control.Monad (void)
testConfig :: Hap.Config
testConfig = Hap.Config { Hap._deployPath = "/tmp/project"
, Hap._host = "localhost"
, Hap._repository = "/tmp/testrepo"
, Hap._revisi... | module Main where
import qualified Hapistrano as Hap
import Control.Monad (void)
testConfig :: Hap.Config
testConfig = Hap.Config { Hap._deployPath = "/tmp/project"
, Hap._host = "localhost"
, Hap._repository = "/tmp/testrepo"
, Hap._revisi... | Use void instead of explicit return of (). | Use void instead of explicit return of ().
| Haskell | mit | stackbuilders/hapistrano |
9ec0dd1a5ff54cab04ba093a2a41f6debe75f7c6 | code/Example/Drasil/SWHS/Generate.hs | code/Example/Drasil/SWHS/Generate.hs | module Drasil.SWHS.Generate where
import Language.Drasil (DocType(SRS,MG,Website), Recipe(..), gen)
import Drasil.SWHS.Body (swhs_srs, swhs_mg)
docs :: [Recipe]
docs = [Recipe (SRS "SWHS_SRS") swhs_srs,
Recipe (Website "SWHS_SRS") swhs_srs,
Recipe (MG "SWHS_MG") swhs_mg
]
generate :: IO () ... | module Drasil.SWHS.Generate where
import Language.Drasil (DocType(SRS,MG,Website), Recipe(..), gen)
import Drasil.SWHS.Body (swhs_srs', swhs_srs, swhs_mg)
docs :: [Recipe]
docs = [Recipe (SRS "SWHS_SRS") swhs_srs,
Recipe (SRS "SWHS_SRS2") swhs_srs',
Recipe (Website "SWHS_SRS") swhs_srs,
Recip... | Add SRS generation from new DocumentLanguage version of SWHS. | Add SRS generation from new DocumentLanguage version of SWHS.
| 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 |
079fd7936d29c487e31a3850aba852b0e20436e0 | src/Input/Cabal.hs | src/Input/Cabal.hs | {-# LANGUAGE ViewPatterns, PatternGuards, TupleSections #-}
module Input.Cabal(parseCabal) where
import Data.List.Extra
import System.FilePath
import Control.Applicative
import qualified Data.Map as Map
import qualified Data.ByteString.Lazy.Char8 as LBS
import Util
-- items are stored as:
-- QuickCheck/2.7.5/QuickC... | {-# LANGUAGE ViewPatterns, PatternGuards, TupleSections #-}
module Input.Cabal(parseCabal) where
import Data.List.Extra
import System.FilePath
import Control.Applicative
import qualified Data.Map as Map
import qualified Data.ByteString.Lazy.Char8 as LBS
import Util
-- items are stored as:
-- QuickCheck/2.7.5/QuickC... | Split author names on "and" | Split author names on "and"
| Haskell | bsd-3-clause | ndmitchell/hoogle,ndmitchell/hoogle,BartAdv/hoogle,wolftune/hoogle,wolftune/hoogle,ndmitchell/hoogle,ndmitchell/hogle-dead,ndmitchell/hogle-dead,wolftune/hoogle,BartAdv/hoogle,wolftune/hoogle,BartAdv/hoogle,BartAdv/hoogle |
f5bd356d0bff1c55433ad460f196316f4362370e | src/L0/FreshNames.hs | src/L0/FreshNames.hs | module L0.FreshNames
( NameSource
, newNameSource
, newNameSourceForProg
, newName
) where
import L0.AbSyn
import qualified Data.Set as S
data NameSource = NameSource Int (S.Set String)
-- | Create a new 'NameSource' that will never produce any of the
-- names in the given list.
newNameSource :: [String] ... | module L0.FreshNames
( NameSource
, newNameSource
, newNameSourceForProg
, newName
) where
import L0.AbSyn
import Data.Char (isDigit)
import qualified Data.Set as S
data NameSource = NameSource Int (S.Set String)
-- | Chop off terminating underscore followed by numbers.
baseName :: String -> String
baseNa... | Make renamer not create crazy long names. | Make renamer not create crazy long names.
| Haskell | isc | ihc/futhark,HIPERFIT/futhark,diku-dk/futhark,mrakgr/futhark,mrakgr/futhark,HIPERFIT/futhark,HIPERFIT/futhark,diku-dk/futhark,diku-dk/futhark,ihc/futhark,CulpaBS/wbBach,ihc/futhark,diku-dk/futhark,mrakgr/futhark,diku-dk/futhark |
8d8bfecab60a4104d0e7871d51216e2524da8dea | src/Reflow/Parser.hs | src/Reflow/Parser.hs | module Reflow.Parser where
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import Text.ParserCombinators.Parsec
import Reflow.Types
parseFile :: Text -> [Content]
parseFile t = either (const []) id $ parse parseContent "content" (T.unpack t)
parseContent :: Parser [Content]
parseCo... | module Reflow.Parser where
import Data.Monoid ((<>))
import Data.Text (Text, pack)
import Text.Parsec
import Text.Parsec.Text (Parser)
import Reflow.Types
parseFile :: Text -> [Content]
parseFile t = either (const []) id $ parse parseContent "content" t
parseContent :: Parser [Content]
parseContent = many (quoted <... | Make parsing Data.Text.Text slightly nicer | Make parsing Data.Text.Text slightly nicer
Parsec has had support for parsing Text Since version 3.1.2, so we don't need
`T.unpack text` as long as we also import `Text.Parsec.Text`.
This also means that the code only requires `(Text, pack)` from `Data.Text`, so
import only those (unqualified).
| Haskell | mit | gfontenot/reflow |
f60980a571dc9da77a6718d889faf0b8a9b4b58b | src/Package.hs | src/Package.hs | module Package (Package (..), library, setCabal) where
import Base
import Util
-- pkgPath is the path to the source code relative to the root
data Package = Package
{
pkgName :: String, -- Examples: "deepseq", "Cabal/Cabal"
pkgPath :: FilePath, -- "libraries/deepseq", "libraries/Cabal/Cabal... | module Package (Package (..), library, topLevel, setCabal) where
import Base
import Util
-- pkgPath is the path to the source code relative to the root
data Package = Package
{
pkgName :: String, -- Examples: "deepseq", "Cabal/Cabal"
pkgPath :: FilePath, -- "libraries/deepseq", "libraries/C... | Add topLevel function to construct top-level packages like compiler. | Add topLevel function to construct top-level packages like compiler.
| Haskell | bsd-3-clause | sdiehl/ghc,bgamari/shaking-up-ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,snowleopard/shaking-up-ghc,sdiehl/ghc,quchen/shaking-up-ghc,snowleopard/hadrian,sdiehl/ghc,sdiehl/ghc,izgzhen/hadrian |
a58f1e1e236db23b2750afc75550b18a77317503 | src/parsers.hs | src/parsers.hs | import Text.ParserCombinators.Parsec
import Data.Either.Unwrap (mapRight)
import Data.List (concat, unwords)
paragraph = endBy sentence eos
sentence = sepBy word (oneOf " \n")
word = many (noneOf " .\n")
eos = char '.'
{-| -}
parseParagraph :: String -> Either ParseError [[String]]
parseParagraph input = parse ... | import Text.ParserCombinators.Parsec
import Data.Either.Unwrap (mapRight)
import Data.List (concat, unwords)
paragraph = endBy sentence eos
sentence = sepBy word (oneOf " \n")
word = many (noneOf " .?!\n")
eos = oneOf ".?!"
{-| -}
parseParagraph :: String -> Either ParseError [[String]]
parseParagraph input = p... | Add support for '?' and '!' eos markers | Add support for '?' and '!' eos markers
| Haskell | agpl-3.0 | R-Morgan/NGramCrackers |
f1b3108adf5a252156e94eed9b10fdd9328eda93 | Benchmark/Crypto.hs | Benchmark/Crypto.hs | module Benchmark.Crypto
( benchmarkHash
, benchmarkBlockCipher
) where
import Data.Crypto.Classes
import Data.Crypto.Modes (ecb', unEcb')
import qualified Data.Serialize as Ser
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.Serialize as Ser
import Criterion
import Contr... | module Benchmark.Crypto
( benchmarkHash
, benchmarkBlockCipher
) where
import Data.Crypto.Classes
import Data.Crypto.Modes (ecb', unEcb')
import qualified Data.Serialize as Ser
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
import Data.Serialize as Ser
import Criterion
import Contr... | Increase the size of ciphered data on benchmarks | Increase the size of ciphered data on benchmarks
Ignore-this: 49eb874b85a8238abdb060b843c46d1e
darcs-hash:20100822165929-cef97-844e644ee9799d0462f973aa6c8caee9fbdc19f2.gz
| Haskell | bsd-3-clause | TomMD/crypto-api |
202a61016d2e0ebbc86b221390451015bb741b04 | src/Development/Shake/Internal/History/Symlink.hs | src/Development/Shake/Internal/History/Symlink.hs | {-# LANGUAGE CPP #-}
module Development.Shake.Internal.History.Symlink(
copyFileLink
) where
import Control.Monad.Extra
import General.Extra
import System.Directory
import System.FilePath
#ifdef mingw32_HOST_OS
import Foreign.Ptr
import Foreign.C.Types
import Foreign.C.String
#else
import System.Posix.Files... | {-# LANGUAGE CPP #-}
module Development.Shake.Internal.History.Symlink(
copyFileLink
) where
import Control.Monad.Extra
import General.Extra
import System.Directory
import System.FilePath
#ifdef mingw32_HOST_OS
import Foreign.Ptr
import Foreign.C.String
#else
import System.Posix.Files(createLink)
#endif
cr... | Clean up some FFI a bit more | Clean up some FFI a bit more
| Haskell | bsd-3-clause | ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake |
327f6a633011496950c80b01eae3e7ff04218023 | src/Shaker/PluginConfig.hs | src/Shaker/PluginConfig.hs | -- | Register available actions and how they will be called
module Shaker.PluginConfig
where
import qualified Data.Map as M (fromList)
import Shaker.Type
import Shaker.Action.Test
import Shaker.Action.Compile
import Shaker.Action.Standard
-- | The default plugin map contains mapping for compile, help and exit action... | -- | Register available actions and how they will be called
module Shaker.PluginConfig
where
import qualified Data.Map as M (fromList)
import Shaker.Type
import Shaker.Action.Test
import Shaker.Action.Compile
import Shaker.Action.Standard
-- | The default plugin map contains mapping for compile, help and exit action... | Switch all actions to lowerCases | Switch all actions to lowerCases
| Haskell | isc | bonnefoa/Shaker |
617b14049eb2779f2d53bb3c7f7e9c8eed1be376 | Handler/Home.hs | Handler/Home.hs | {-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import qualified Database.Esqueleto as E
import Import
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of th... | {-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import qualified Database.Esqueleto as E
import Import
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of th... | Use @fpcomplete (for local) or fpcomplete for production | Use @fpcomplete (for local) or fpcomplete for production
@snoyberg
| Haskell | mit | fpco/stackage-server |
881b7eeeb5c61f8561ffbe78d5889b6505244932 | app/Main.hs | app/Main.hs | module Main where
import Commands
import Lib
import Driver.Console
dummyScript :: Script ()
dummyScript = do
forward 5.5
clockwise 30.0
forward 3.2
main :: IO ()
main = run dummyScript
| module Main where
import Commands
import Lib
import System
import Driver.Console
dummyScript :: Script ()
dummyScript = do
forward chrs 5.5
clockwise chrs 30.0
forward chrs 3.2
where chrs = Vehical 0.2 (\x -> (*1.8) . fromIntegral $ x) (\x -> x*0.25)
main :: IO ()
main = run dummyScript
| Change a little the body of dummyScript function. | Change a little the body of dummyScript function.
| Haskell | mit | research-team/robot-dream,research-team/robot-dream,research-team/robot-dream |
eb9a3850c58f8b014d24b752051ef4e5de479fe1 | cli/Options.hs | cli/Options.hs | module Options
where
import Options.Applicative
data TemplateSource
= TemplateFromFile FilePath
| TemplateFromStdin
data DataSource
= DataFromFile FilePath
| DataLiteral String
| DataFromStdin
data Options
= RunOptions TemplateSource DataSource
parseOptions :: [String] -> IO Options
parseOptions args ... | module Options
where
import Data.Semigroup ( (<>) ) -- needed for GHC 8.0 and 8.2
import Options.Applicative
data TemplateSource
= TemplateFromFile FilePath
| TemplateFromStdin
data DataSource
= DataFromFile FilePath
| DataLiteral String
| DataFromStdin
data Options
= RunOptions TemplateSource DataSour... | Fix build failures on GHC 8.0 and 8.2 | Fix build failures on GHC 8.0 and 8.2
| Haskell | mit | tdammers/ginger,tdammers/ginger |
1988901d7b174d041ae1418179d63b7b7941a4e3 | src/Euler/Problem016.hs | src/Euler/Problem016.hs | -- 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
-- What is the sum of the digits of the number 2^1000?
module Euler.Problem016
( solution
) where
solution :: Integer -> Integer
solution = undefined
| -- 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
-- What is the sum of the digits of the number 2^1000?
module Euler.Problem016
( solution
) where
solution :: Integer -> Integer
solution e = sum . digits $ 2^e
digits :: Integer -> [Integer]
digits = map (read . return) . show
| Add solution to problem 16. | Add solution to problem 16.
| Haskell | mit | whittle/euler |
31509dce57e6304b76ad6f4fc604e54dd6310011 | examples/Jumbled.hs | examples/Jumbled.hs | module Main where
import Data.Default.Class (def)
import qualified SDL
import qualified SDL.Mixer
main :: IO ()
main = do
SDL.initialize [SDL.InitAudio]
SDL.Mixer.initialize [SDL.Mixer.InitMP3]
SDL.Mixer.openAudio def 256
putStr "Available chunk decoders: "
print =<< SDL.Mixer.chunkDecoders
putStr "Ava... | module Main where
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 chunk decoders: "
print =<< SDL.M... | Add playing files to example. | Add playing files to example.
| Haskell | bsd-3-clause | sbidin/sdl2-mixer |
bcccbaf9d27738a45b7f532f3711e1b3c2770bc9 | hw3/GolfTest.hs | hw3/GolfTest.hs | -- GolfTest
module Main where
import Golf
main :: IO ()
main = do
putStrLn "Testing 'skips' function..."
putStrLn "skips \"ABCD\": "
putStrLn ("Actual:\t" ++ show (skips "ABCD"))
putStrLn "Expected: ['ABCD', 'BD', 'C', 'D']"
if (skips "ABCD" == ["ABCD","BD","C","D"])
then putStrLn "ABCD Passed!"
else putSt... | -- GolfTest
module Main where
import Golf
main :: IO ()
main = do
putStrLn "Testing 'skips' function..."
putStrLn "skips \"ABCD\": "
putStrLn ("Actual:\t" ++ show (skips "ABCD"))
putStrLn "Expected: ['ABCD', 'BD', 'C', 'D']"
if (skips "ABCD" == ["ABCD","BD","C","D"])
then putStrLn "ABCD Passed!"
else putSt... | Add two tests for localMaxima | Add two tests for localMaxima
| Haskell | apache-2.0 | parsonsmatt/cis194,parsonsmatt/cis194 |
57d66afd310c8c0785d11bf6521536e51a577d14 | examples/fibonacci/Main.hs | examples/fibonacci/Main.hs | module Main where
import qualified GHCJS.CommonJS as CommonJS
fibs :: [Int]
fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
main :: IO ()
main = CommonJS.exportMain
[ CommonJS.pack ("fibs", \n -> take n fibs)
-- ^ We can "CommonJS.pack" pure functions!
, CommonJS.pack
("fibsIO", \n -> do
... | module Main where
import GHCJS.CommonJS (exportMain, exports)
fibs :: [Int]
fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
main :: IO ()
main = exportMain
[ "fibs" `exports` \n -> take n fibs
-- ^ We can "exports" pure functions!
, "fibsIO" `exports` \n -> do
putStrLn ("HASKELL LAND - ... | Update fibonacci to the latest API | Update fibonacci to the latest API
| Haskell | mit | beijaflor-io/ghcjs-commonjs,beijaflor-io/ghcjs-commonjs,beijaflor-io/ghcjs-commonjs |
3eee6377b71747024df00a5bc6a7e66ca3d43aee | Gamgine/State/RenderState.hs | Gamgine/State/RenderState.hs |
module Gamgine.State.RenderState where
#include "Gamgine/Utils.cpp"
import Control.Applicative ((<$>))
import qualified Data.List as L
import qualified Graphics.Rendering.OpenGL.Raw as GL
import qualified Gamgine.Font.GLF as GLF
IMPORT_LENS_AS_LE
newtype TextureName = TextureName Int deriving (Show, Eq)
newtype FontN... |
module Gamgine.State.RenderState where
#include "Gamgine/Utils.cpp"
import Control.Applicative ((<$>))
import qualified Data.List as L
import qualified Graphics.Rendering.OpenGL.Raw as GL
import qualified Gamgine.Font.GLF as GLF
IMPORT_LENS_AS_LE
newtype TextureName = TextureName Int deriving (Show, Eq)
newtype FontN... | Use lookup function instead of find | Use lookup function instead of find
| Haskell | bsd-3-clause | dan-t/layers |
772917ac8c063a33f128c18ceb4aecd3e0102541 | Data/Kicad/SExpr/Write.hs | Data/Kicad/SExpr/Write.hs | module Data.Kicad.SExpr.Write
( pretty
, write
)
where
import Data.Char (toLower, isLower, isNumber)
import Data.List (intercalate)
import Text.PrettyPrint.Compact
import Data.Kicad.SExpr.SExpr
{-| Pretty-print a 'SExpr' as a readable 'Doc'. -}
pretty :: SExpr -> Doc
pretty (List _ xs) = text "(" <> align (sep $ map ... | module Data.Kicad.SExpr.Write
( pretty
, write
)
where
import Data.Char (toLower, isLower, isNumber)
import Data.List (intercalate)
import Text.PrettyPrint.Compact
import Data.Kicad.SExpr.SExpr
{-| Pretty-print a 'SExpr' as a readable 'Doc'. -}
pretty :: SExpr -> Doc
pretty (List _ xs) = text "(" <> align (sep $ map ... | Stop quoting numbers in s-expressions | Stop quoting numbers in s-expressions
| Haskell | mit | kasbah/haskell-kicad-data,monostable/haskell-kicad-data,monostable/haskell-kicad-data |
87a920e0f7b0bce593883a8a242cb414ecb24d0d | Main.hs | Main.hs |
module Main(main) where
import System.Environment
import Example.Example
import System.Exit
type Test = (String,IO ())
allTests = tests ++ regress
tests = [("hitcount",("Haskell Hit Count",haskellHitCount))
,("google",("Google Tech News",googleTechNews))
,("spj",("Simon Peyton Jones' papers",spjPa... |
module Main(main) where
import System.Environment
import Example.Example
import Example.Regress
import System.Exit
type Test = (String,IO ())
allTests = tests ++ regression
tests = [("hitcount",("Haskell Hit Count",haskellHitCount))
,("google",("Google Tech News",googleTechNews))
,("spj",("Simon P... | Make the main program run the regression tests | Make the main program run the regression tests | Haskell | bsd-3-clause | silkapp/tagsoup |
24aa652981b7e06af2ac58848da0c55ee8c13a67 | src/HSE/All.hs | src/HSE/All.hs |
module HSE.All(
module Language.Haskell.Exts,
module HSE.Util, module HSE.Evaluate,
module HSE.Bracket, module HSE.Match,
module HSE.Operators, module HSE.Generics,
parseFile, parseString
) where
import Language.Haskell.Exts hiding (parseFile, paren)
import qualified Language.Haskell.Exts as H... |
module HSE.All(
module Language.Haskell.Exts,
module HSE.Util, module HSE.Evaluate,
module HSE.Bracket, module HSE.Match,
module HSE.Operators, module HSE.Generics,
parseFile, parseString
) where
import Language.Haskell.Exts hiding (parseFile, paren)
import qualified Language.Haskell.Exts as H... | Remove a space leak, halves the memory require to run over darcs | Remove a space leak, halves the memory require to run over darcs | Haskell | bsd-3-clause | mpickering/hlint,bitemyapp/hlint,ndmitchell/hlint,gibiansky/hlint,ndmitchell/hlint,eigengrau/hlint |
9de4cfff44365db82f0f37db82d7e4c76dee1e41 | Dvx/Utils.hs | Dvx/Utils.hs | module Dvx.Utils
( isNumeric
, joinsub
, middle
, splitAndKeep
, splitOn
, trim
) where
import Data.Char (isSpace, isDigit)
trim :: String -> String
trim = f . f where f = reverse . dropWhile isSpace
splitOn :: Eq a => a -> [a] -> [[a]]
splitOn _ [] = []
splitOn i lst = a : splitOn i bx
where
... | module Dvx.Utils
( isNumeric
, joinsub
, middle
, splitAndKeep
, splitOn
, trim
) where
import Data.Char (isSpace, isDigit)
trim :: String -> String
trim = f . f where f = reverse . dropWhile isSpace
splitOn :: Eq a => a -> [a] -> [[a]]
splitOn _ [] = []
splitOn i lst | null b = [a]
| o... | Fix crash while parsing test2.dvx | Fix crash while parsing test2.dvx
| Haskell | mit | Hamcha/dvx |
e928991410849edf9ded2e10d17dfcd8f9c40847 | yesod-core/test/YesodCoreTest/NoOverloadedStrings.hs | yesod-core/test/YesodCoreTest/NoOverloadedStrings.hs | {-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module YesodCoreTest.NoOverloadedStrings (noOverloadedTest, Widget) where
import Test.Hspec
import Yesod.Core
import Network.Wai.Test
import Data.Monoid (mempty)
data Subsite = Subsite
getSubsite ::... | {-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module YesodCoreTest.NoOverloadedStrings (noOverloadedTest, Widget) where
import Test.Hspec
import Yesod.Core
import Network.Wai
import Network.Wai.Test
import Data.Monoid (mempty)
import qualified Da... | Include a proper subsite test | Include a proper subsite test
| Haskell | mit | MaxGabriel/yesod,frontrowed/yesod,yesodweb/yesod,wuzzeb/yesod,ericnething/yesod,pikajude/yesod,jprider63/yesod,Daniel-Diaz/yesod,pikajude/yesod,MaxGabriel/yesod,wuzzeb/yesod,urbanslug/yesod,DavidAlphaFox/yesod,meteficha/yesod,andrewthad/yesod,ygale/yesod,yesodweb/yesod,creichert/yesod,tolysz/yesod,geraldus/yesod,andrew... |
81f2014875e9d999cd013e566cf354b56cbcc51e | testsuite/TestLabyrinthServer.hs | testsuite/TestLabyrinthServer.hs | {-# OPTIONS_GHC -F -pgmF htfpp #-}
{-# LANGUAGE OverloadedStrings #-}
module TestLabyrinthServer where
import Control.Monad
import System.Directory
import Yesod
import Test.Framework
import Test.Framework.TestTypes (Test)
import Network.Wai.Test
import LabyrinthServer
{-# ANN module "HLint: ignore Use camelCase... | {-# OPTIONS_GHC -F -pgmF htfpp #-}
module TestLabyrinthServer where
import Control.Monad
import Data.Aeson
import Data.String (fromString)
import System.Directory
import Yesod
import Test.Framework
import Test.Framework.TestTypes (Test)
import Network.Wai.Test
import LabyrinthServer
{-# ANN module "HLint: igno... | Remove OverloadedStrings due to conflict with HLint | Remove OverloadedStrings due to conflict with HLint
| Haskell | mit | koterpillar/labyrinth-server |
eac36b91e568ebccd26ecc5e7298d1fd21567c5e | src/Network/HTTP/Authentication/Basic.hs | src/Network/HTTP/Authentication/Basic.hs | module Network.HTTP.Authentication.Basic (
Credentials(..),
parseCredentials,
) where
import Control.Monad
import Data.ByteString.Base64
import qualified Data.ByteString.Char8 as B
import Text.ParserCombinators.Parsec
data Credentials = Credentials { getUsername :: String
, getPas... | module Network.HTTP.Authentication.Basic (
Credentials(..),
parseCredentials,
) where
import Control.Monad
import Control.Monad.Except
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Char8 as B
import Text.ParserCombinators.Parsec
data Credentials = Credentials { getUsername :: S... | Use a better monad instance of Either | Use a better monad instance of Either
| Haskell | mit | keithduncan/logplex-statsd,keithduncan/logplex-statsd |
1b56bd6974c0f7fb5b9b7926cf540b423439749f | Development/Shake/FileTime.hs | Development/Shake/FileTime.hs | {-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving, DeriveDataTypeable #-}
module Development.Shake.FileTime(
FileTime,
getModTimeError, getModTimeMaybe
) where
import Control.DeepSeq
import Data.Binary
import Data.Hashable
import Data.Typeable
import System.Directory
import System.Time
newt... | {-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving, DeriveDataTypeable #-}
module Development.Shake.FileTime(
FileTime,
getModTimeError, getModTimeMaybe
) where
import Control.DeepSeq
import Data.Binary
import Data.Hashable
import Data.Typeable
import System.Directory
import System.IO.Error
im... | Use error catching to determine if a file does not exist, rather than an explicit doesFileExist check (slightly faster) | Use error catching to determine if a file does not exist, rather than an explicit doesFileExist check (slightly faster)
| Haskell | bsd-3-clause | ndmitchell/shake,nh2/shake,nh2/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake,nh2/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake |
47b07a3af2352fa3d3ad0d4a79343b7e2d80cf56 | src/State/Attachments.hs | src/State/Attachments.hs | module State.Attachments
( showAttachmentList
, resetAttachmentList
, showAttachmentFileBrowser
)
where
import Prelude ()
import Prelude.MH
import System.Directory
import Data.Bool (bool)
import Brick ( vScrollToBeginning, viewportScroll )
import qualified Bri... | module State.Attachments
( showAttachmentList
, resetAttachmentList
, showAttachmentFileBrowser
)
where
import Prelude ()
import Prelude.MH
import qualified Control.Exception as E
import Data.Either ( isRight )
import System.Directory ( doesDirectoryExist, getDirectoryCo... | Include directory read test in attachment path validation | Include directory read test in attachment path validation
| Haskell | bsd-3-clause | matterhorn-chat/matterhorn |
e2fc8302988c23bdd7205272f2599f32de6271ac | src/Text/Karver.hs | src/Text/Karver.hs | module Text.Karver where
import Text.Karver.Types
import Text.Karver.Parse
import Control.Applicative
import Data.Attoparsec.Text
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as H
import Data.Text (Text)
import qualified Data.Text as T
renderTemplate :: HashMap Text Value -> Text -> Text... | module Text.Karver where
import Text.Karver.Types
import Text.Karver.Parse
import Control.Applicative
import Data.Attoparsec.Text
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as H
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Vector as V
renderTemplate :: ... | Add processing arrays into renderTemplate | Add processing arrays into renderTemplate
| Haskell | bsd-3-clause | sourrust/karver,ibotty/stencil |
914cc3b1be580f94f1c4b1733279abed9fb4a7d4 | src/SplitMix.hs | src/SplitMix.hs | module SplitMix (
module SplitMix.Gen,
module SplitMix.Instances
) where
import SplitMix.Gen
import SplitMix.Instances
| module SplitMix (
module SplitMix.Gen
) where
import SplitMix.Gen
| Fix a problem with deleted file | Fix a problem with deleted file
| Haskell | mit | nkartashov/SplitMix,nkartashov/SplitMix |
656799d0fc796344f73d2f61bb3e208ca27608e6 | bench/Network/Sender/Main.hs | bench/Network/Sender/Main.hs | import Control.Monad (forM_)
import Control.Monad.Trans (liftIO)
import Data.List.Extra (chunksOf)
import GHC.IO.Encoding (setLocaleEncoding, utf8)
import Bench.Network.Commons (MeasureEvent (..), Ping (..), logMeasure,
... | import Control.Monad (forM_)
import Control.Monad.Trans (liftIO)
import Data.List.Extra (chunksOf)
import GHC.IO.Encoding (setLocaleEncoding, utf8)
import Bench.Network.Commons (MeasureEvent (..), Ping (..), logMeasure,
... | Use different connections from different threads | [TW-38] Use different connections from different threads
| Haskell | mit | serokell/time-warp |
9fd424234ec63316ff1b5eab4266e8d80d8260ae | data/Test.hs | data/Test.hs | -- These hints are for test purposes, and are not intended to
-- be used for real.
module HLint.Test where
error = Prelude.readFile ==> bad
{-
main = readFile "foo" >>= putStr \
-- bad
import Prelude hiding(readFile) \
import Data.ByteString.Char8(readFile) \
test = readFile "foo" >>=... | -- These hints are for test purposes, and are not intended to
-- be used for real.
module HLint.Test where
error = Prelude.readFile ==> bad
{-
<TEST>
main = readFile "foo" >>= putStr \
-- bad
import Prelude hiding(readFile) \
import Data.ByteString.Char8(readFile) \
test = readFile "f... | Add a missing <TEST> to the test hints, before they were not being run (eek) | Add a missing <TEST> to the test hints, before they were not being run (eek) | Haskell | bsd-3-clause | gibiansky/hlint,eigengrau/hlint,ndmitchell/hlint,mpickering/hlint,bitemyapp/hlint,ndmitchell/hlint |
2028f0c978fc854762bf35478f4c2c109291feef | 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.... | Increase the amount of simulations in tests | Increase the amount of simulations in tests
| Haskell | mit | nikita-volkov/hasql-th |
3d30aab2e8d39816fd895e0529bd8aaf85746cce | ZoomHub.hs | ZoomHub.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# 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 default handler type
type Handler a = EitherT ServantErr IO a
--... | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module ZoomHub where
import Control.Applicative
import Control.Monad.Trans.Either
import Data.Aeson as Aeson
import Data.Char
import GHC.Generics
import Network.Wai
import Servant
import System.Directory
import Types.Content
... | Read JSON from disk in `contentById` handler | Read JSON from disk in `contentById` handler
| Haskell | mit | zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub |
3d7881ca1ca8756e2dfa26dad6bc1b8be4fc07de | wallet-new/src/Cardano/Wallet/API/V1/Daedalus.hs | wallet-new/src/Cardano/Wallet/API/V1/Daedalus.hs | -- | This module contains the top level API definition for frontend-related
-- tasks. The API endpoints presented here are intended for use with the
-- Daedalus client, and aren't useful for wallets, exchanges, and other users.
module Cardano.Wallet.API.V1.Daedalus where
-- migrate everything except for import/export... | -- | This module contains the top level API definition for frontend-related
-- tasks. The API endpoints presented here are intended for use with the
-- Daedalus client, and aren't useful for wallets, exchanges, and other users.
module Cardano.Wallet.API.V1.Daedalus where
-- migrate everything except for import/export... | Add comments with request/response types | [CO-334] Add comments with request/response types
| 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/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype |
72a0ccf967ead4f1d85a90821993d420051a7d8d | src/Routes.hs | src/Routes.hs | {-# LANGUAGE OverloadedStrings #-}
module Routes(
routes
) where
import Web.Scotty
import Text.Blaze.Html5 (Html)
import Text.Blaze.Html.Renderer.Text (renderHtml)
import Routes.Sessions(sessionsRoutes)
import Views(homeV)
routes :: ScottyM ()
routes = do
get "/" homeH
get "/a... | {-# LANGUAGE OverloadedStrings #-}
module Routes(
routes
) where
import Web.Scotty.Trans
import Text.Blaze.Html5 (Html)
import Text.Blaze.Html.Renderer.Text (renderHtml)
import Config
import Routes.Sessions(sessionsRoutes)
import Views(homeV)
routes :: App
routes = do
get "/" homeH
... | Change type signature of actions | Change type signature of actions
| Haskell | mit | parsonsmatt/QuickLift |
7e0486888a66651aa407b88176026319b5c6ddd6 | src/Oczor/Syntax/Errors.hs | src/Oczor/Syntax/Errors.hs | module Oczor.Syntax.Errors where
import Oczor.Syntax.Ast
--import Oczor.Syntax.AstF
import ClassyPrelude hiding (TVar)
type Error = (ErrorType, AstPosition)
data ErrorType =
ParserError String |
UnificationFail TypeExpr TypeExpr |
InfiniteType String TypeExpr |
TextError String |
CircularDependency [ModuleN... | module Oczor.Syntax.Errors where
import Oczor.Syntax.Ast
import ClassyPrelude hiding (TVar)
type Error = (ErrorType, AstPosition)
data ErrorType =
ParserError String |
UnificationFail TypeExpr TypeExpr |
InfiniteType String TypeExpr |
TextError String |
CircularDependency [ModuleName] |
NoInstance TypeExp... | Refactor - Remove unused includes in Oczor.Syntax.Ast | Refactor - Remove unused includes in Oczor.Syntax.Ast
| Haskell | mit | ptol/oczor,ptol/oczor |
52015154967479d19e9aa7edbc0992984ec7af84 | Gamgine/Zipper.hs | Gamgine/Zipper.hs |
module Gamgine.Zipper where
import qualified Data.List as L
import qualified Data.List.Zipper as LZ
-- | splits the zipper into the elements before the current element,
-- the current element and the elements after the current element
split :: LZ.Zipper a -> ([a], Maybe a, [a])
split (LZ.Zip ls []) = (ls, Nothi... |
module Gamgine.Zipper where
import qualified Data.List as L
import qualified Data.List.Zipper as LZ
-- | splits the zipper into the elements before the current element,
-- the current element and the elements after the current element
split :: LZ.Zipper a -> ([a], Maybe a, [a])
split (LZ.Zip ls []) = (L.reverse... | Fix order of before elements | Fix order of before elements
| Haskell | bsd-3-clause | dan-t/layers |
15b4c3a5e08ae4cc790e264c36babc1c64e0a93d | src/Boids.hs | src/Boids.hs | module Boids where
------------------------------------------------------------------------------
import Linear.V3
------------------------------------------------------------------------------
type Vector = V3 Float
type Point = V3 Float
type Radius = Float
data Boid = Boid { position :: !Point
... | module Boids where
------------------------------------------------------------------------------
import Linear.V3
------------------------------------------------------------------------------
type Vector = V3 Float
type Point = V3 Float
type Radius = Float
data Boid = Boid { position :: !Point
... | Rename Boid behavior value functions | Rename Boid behavior value functions
| Haskell | mit | cs383-final/cs383-finalproject |
6b217a3f1d1f5c7f4c3fe171cb14936b512f7564 | includes/Common-Include.hs | includes/Common-Include.hs | cursorUp, cursorDown, cursorForward, cursorBackward :: Int -- ^ Number of lines or characters to move
-> IO ()
nextLine, previousLine :: Int -- ^ Number of lines to move
-> IO ()
setColumn :: Int -- ^ 1-based column to move to
-> IO ... | cursorUp, cursorDown, cursorForward, cursorBackward :: Int -- ^ Number of lines or characters to move
-> IO ()
nextLine, previousLine :: Int -- ^ Number of lines to move
-> IO ()
setColumn :: Int -- ^ 0-based column to move to
-> IO ... | Change documentation to reflect 0-based indexes | Change documentation to reflect 0-based indexes
| Haskell | bsd-3-clause | coreyoconnor/ansi-terminal,batterseapower/ansi-terminal,ekmett/ansi-terminal |
86ad0cf318158c3176a48a7904c078a7f0cceb52 | src/Stack/Sig.hs | src/Stack/Sig.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-|
Module : Stack.Sig
Description : GPG Signatures for Stack
Copyright : (c) FPComplete.com, 2015
License : BSD3
Maintainer : Tim Dysinger <tim@fpcomplete.com>
Stability : experimental
Portability : ... | {-|
Module : Stack.Sig
Description : GPG Signatures for Stack
Copyright : (c) FPComplete.com, 2015
License : BSD3
Maintainer : Tim Dysinger <tim@fpcomplete.com>
Stability : experimental
Portability : POSIX
-}
module Stack.Sig (module Sig) where
import Stack.Sig.GPG as Sig
import Stack.Sig.Sign as Sig
| Remove redundant options (moved to Main) | Remove redundant options (moved to Main)
| Haskell | bsd-3-clause | martin-kolinek/stack,AndreasPK/stack,anton-dessiatov/stack,sjakobi/stack,phadej/stack,martin-kolinek/stack,Heather/stack,AndrewRademacher/stack,Fuuzetsu/stack,phadej/stack,Blaisorblade/stack,juhp/stack,sjakobi/stack,deech/stack,anton-dessiatov/stack,Heather/stack,mrkkrp/stack,MichielDerhaeg/stack,MichielDerhaeg/stack,j... |
aaf137df9fe5141f6491c6ecf6d7f2e2256f025d | test/InfoSpec.hs | test/InfoSpec.hs | module InfoSpec where
import CabalApi
import Cradle
import Expectation
import Info
import Test.Hspec
import Types
spec :: Spec
spec = do
describe "typeExpr" $ do
it "shows types of the expression and its outers" $ do
withDirectory_ "test/data/ghc-mod-check" $ do
(strVer,_) <- g... | module InfoSpec where
import CabalApi
import Cradle
import Data.List (isPrefixOf)
import Expectation
import Info
import Test.Hspec
import Types
spec :: Spec
spec = do
describe "typeExpr" $ do
it "shows types of the expression and its outers" $ do
withDirectory_ "test/data/ghc-mod-check" $ do
... | Add test cases for type and info about TH check | Add test cases for type and info about TH check
| Haskell | bsd-3-clause | cabrera/ghc-mod,phaazon/ghc-mod |
f94b366a915e84b45c0c2eb5cd648e991bf1ae06 | src/Test/Util.hs | src/Test/Util.hs | {-# LANGUAGE PatternGuards, ScopedTypeVariables, RecordWildCards, ViewPatterns #-}
module Test.Util(
withTests, tested, passed, failed, progress
) where
import Data.IORef
import System.IO.Unsafe
import Control.Monad
data Result = Result {failures :: Int, total :: Int} deriving Show
{-# NOINLINE ref #-}
ref ::... | {-# LANGUAGE PatternGuards, ScopedTypeVariables, RecordWildCards, ViewPatterns #-}
module Test.Util(
withTests, tested, passed, failed, progress
) where
import Data.IORef
import System.IO.Unsafe
import Control.Monad
data Result = Result {failures :: Int, total :: Int} deriving Show
{-# NOINLINE ref #-}
ref... | Replace a tab with spaces | Replace a tab with spaces
| Haskell | bsd-3-clause | eigengrau/hlint,mpickering/hlint,gibiansky/hlint,ndmitchell/hlint,ndmitchell/hlint,bitemyapp/hlint |
25408cf63494201208440e82d7df11867c427fb2 | src/WebService.hs | src/WebService.hs | module WebService ( stdQueries
, wikiRequest
) where
import Network.URI (URI(..), URIAuth(..))
import Network.HTTP (simpleHTTP)
import Network.HTTP.Base (Request(..), RequestMethod(..), rspBody, urlEncodeVars)
import Network.HTTP.Headers (mkHeader, Header, HeaderName(..))
type Quer... | module WebService ( stdQueries
, wikiRequest
) where
import Network.URI (URI(..), URIAuth(..))
import Network.HTTP (simpleHTTP)
import Network.HTTP.Base (Request(..), RequestMethod(..), rspBody, urlEncodeVars)
import Network.HTTP.Headers (mkHeader, Header, HeaderName(..))
type Quer... | Change User-Agent header to custom value | Change User-Agent header to custom value
| Haskell | mit | guoguo12/aether |
c1bff90149e9d35329ad5c661a92d12a7c9a571a | .xmonad/xmonad.hs | .xmonad/xmonad.hs | import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLa... | import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLa... | Update kill and chromium hotkeys. | Update kill and chromium hotkeys.
| Haskell | mit | bamos/dotfiles,bamos/dotfiles,bamos/dotfiles |
90d5b56d459ddabeae6ef786faaa43b25f495187 | 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 | Haskell | bsd-3-clause | xmonad/xmonad-contrib,0/xmonad-contrib,f1u77y/xmonad-contrib,ohlus/xmonad-contrib,CaptainPatate/xmonad-contrib,pjones/xmonad-test,0/xmonad-contrib,ohlus/xmonad-contrib,mathstuf/xmonad-contrib,xmonad/xmonad-contrib,CaptainPatate/xmonad-contrib,0/xmonad-contrib,mathstuf/xmonad-contrib,ohlus/xmonad-contrib,f1u77y/xmonad-c... |
18970109a56963d3891ed47e2b8cead757bc28c2 | src/Duffer/Unified.hs | src/Duffer/Unified.hs | module Duffer.Unified where
import Data.Bool (bool)
import Duffer.Loose
import Duffer.Loose.Objects (Ref, GitObject)
import Duffer.Pack
import Duffer.WithRepo
readObject :: Ref -> WithRepo (Maybe GitObject)
readObject ref = hasLooseObject ref >>= bool
(readPackObject ref)
(readLooseObject ref)
writeObject ... | module Duffer.Unified where
import Data.Bool (bool)
import Duffer.Loose
import Duffer.Loose.Objects (Ref, GitObject)
import Duffer.Pack
import Duffer.WithRepo
readObject :: Ref -> WithRepo (Maybe GitObject)
readObject ref = hasLooseObject ref >>= bool
(readPackObject ref)
(readLooseObject ref)
writeObject ... | Correct order of bool parameters. | Correct order of bool parameters.
| Haskell | bsd-3-clause | vaibhavsagar/duffer.hs,vaibhavsagar/duffer |
6b4f7a9c6c01e16e2a777962b7a1f5c3536ced25 | Data/Aeson/Encode/Functions.hs | Data/Aeson/Encode/Functions.hs | module Data.Aeson.Encode.Functions
(
brackets
, builder
, char7
, foldable
, list
, pairs
) where
import Data.Aeson.Encode.Builder
import Data.Aeson.Types.Class
import Data.Aeson.Types.Internal
import Data.ByteString.Builder (Builder, char7)
import Data.ByteString.Builder.Prim (primBo... | module Data.Aeson.Encode.Functions
(
brackets
, builder
, char7
, foldable
, list
, pairs
) where
import Data.Aeson.Encode.Builder
import Data.Aeson.Types.Class
import Data.Aeson.Types.Internal
import Data.ByteString.Builder (Builder, char7)
import Data.ByteString.Builder.Prim (primBo... | Correct the definition of pairs | Correct the definition of pairs
| Haskell | bsd-3-clause | bwo/aeson,nurpax/aeson,neobrain/aeson,roelvandijk/aeson,23Skidoo/aeson,aelve/json-x,sol/aeson,roelvandijk/aeson,abbradar/aeson,lykahb/aeson,SeanRBurton/aeson,sol/aeson,dmjio/aeson,sol/aeson,neobrain/aeson,timmytofu/aeson,jkarni/aeson |
aa1d548507a614433ce420469bfadf10f2692d7d | tests/Spec/GHC/StackSpec.hs | tests/Spec/GHC/StackSpec.hs | {-# LANGUAGE CPP #-}
{-|
Module: Spec.GHC.StackSpec
Copyright: (C) 2014-2016 Ryan Scott
License: BSD-style (see the file LICENSE)
Maintainer: Ryan Scott
Stability: Provisional
Portability: GHC
@hspec@ tests for 'CallStack' and 'SrcLoc'.
-}
module Spec.GHC.StackSpec (main, spec) where
import Instances.G... | {-# LANGUAGE CPP #-}
{-|
Module: Spec.GHC.StackSpec
Copyright: (C) 2014-2016 Ryan Scott
License: BSD-style (see the file LICENSE)
Maintainer: Ryan Scott
Stability: Provisional
Portability: GHC
@hspec@ tests for 'CallStack' and 'SrcLoc'.
-}
module Spec.GHC.StackSpec (main, spec) where
import Instances.G... | Fix the build on older GHCs, pt. 4 | Fix the build on older GHCs, pt. 4
| Haskell | bsd-3-clause | RyanGlScott/text-show |
bcf891d742d80fb4f2b881b4d31e14aa901ba06f | Paper/WordCount.hs | Paper/WordCount.hs |
module Paper.WordCount(wordCount) where
import Data.Char
import Data.List
-- Do not follow \include{} links
wordCount :: FilePath -> IO Int
wordCount file = return . sum . map countLine . dropComments . lines =<< readFile file
dropComments :: [String] -> [String]
dropComments (x:xs) | isBeginComment x = drop 1 $ d... |
module Paper.WordCount(wordCount) where
import Data.Char
import Data.List
-- Do not follow \include{} links
wordCount :: FilePath -> IO Int
wordCount file = return . sum . map countLine . dropComments . lines =<< readFile file
dropComments :: [String] -> [String]
dropComments (x:xs) | isBeginComment x = drop 1 $ d... | Drop % comments which don't start at the beginning of a line | Drop % comments which don't start at the beginning of a line | Haskell | bsd-3-clause | Daniel-Diaz/neil,saep/neil |
22ce97907c5907e67785af36460652aebf76bd90 | Angel/Files.hs | Angel/Files.hs | module Angel.Files (getFile, startFileManager) where
import Control.Concurrent.STM
import Control.Concurrent.STM.TChan (readTChan, writeTChan, TChan, newTChan, newTChanIO)
import Control.Monad (forever)
import System.IO (Handle, hClose, openFile, IOMode(..), hIsClosed)
import GHC.IO.Handle (hDuplicate)
import Debug.Tr... | module Angel.Files (getFile, startFileManager) where
import Control.Exception (try, SomeException)
import Control.Concurrent.STM
import Control.Concurrent.STM.TChan (readTChan, writeTChan, TChan, newTChan, newTChanIO)
import Control.Monad (forever)
import System.IO (Handle, hClose, openFile, IOMode(..), hIsClosed)
imp... | Use try instead of catch from Prelude | Use try instead of catch from Prelude
This both lets Angel be compatible with GHC 7.6.1 as well as making sure we catch a large classe of exceptions
| Haskell | bsd-3-clause | zalora/Angel |
c0a9eff20b657733a6c1dc104068be2b1b406f2b | E02/A3.hs | E02/A3.hs | module A3
( Tree
, tree1
, countLeaf
, leafsToList
) where
data Tree = Leaf Int | Branch Tree Tree deriving Show
-- a
tree1 = Branch ( Branch (Leaf 1) (Leaf 2)) (Branch (Branch (Leaf 3) (Leaf 4)) (Leaf 5))
--b
-- the patterns are now the different type constructors.
-- We have to do brackets around to say that it i... | module A3
( Tree
, tree1
, countLeaf
, leafsToList
) where
data Tree = Leaf Int | Branch Tree Tree deriving Show
-- a
tree1 = Branch ( Branch (Leaf 1) (Leaf 2)) (Branch (Branch (Leaf 3) (Leaf 4)) (Leaf 5))
--b
-- the patterns are now the different type constructors.
countLeaf :: Tree -> Int
countLeaf (Leaf a) ... | Remove false statement about parentheses | E02: Remove false statement about parentheses
| Haskell | mit | sebschrader/programmierung-ss2015 |
b46b10021d26ae6ca8f5c5bdc86073358bc4ecc5 | Control/Monad/UnsafeIO.hs | Control/Monad/UnsafeIO.hs | -- | Just like MonadIO, but codifying /unsafe/ IO execution. Exists for safety.
module Control.Monad.UnsafeIO where
import qualified Control.Monad.ST as S
import qualified Control.Monad.ST.Lazy as L
import Control.Monad.Trans.Reader
import Control.Monad.Trans.Writer
import Control.Monad.Trans
import Data.Monoid
class... | -- | Just like MonadIO, but codifying /unsafe/ IO execution. Exists for safety.
module Control.Monad.UnsafeIO where
import qualified Control.Monad.ST as S
import qualified Control.Monad.ST.Unsafe as SU
import qualified Control.Monad.ST.Lazy as L
import qualified Control.Monad.ST.Lazy.Unsafe as LU
import Control.Monad.... | Use unsafeIOToST explicitly from Unsafe modules | Use unsafeIOToST explicitly from Unsafe modules
| Haskell | bsd-3-clause | Baughn/AES |
5034404e731c9bb2ae872be674e7e2cbde073240 | System/Console/Haskeline/Encoding.hs | System/Console/Haskeline/Encoding.hs | {- |
This module exposes the console Unicode API which is used by the functions
in "System.Console.Haskeline". On POSIX systems, it uses @iconv@ plus the
console\'s locale; on Windows it uses the console's current code page.
Characters or bytes which cannot be encoded/decoded (for example, not belonging
to the outpu... | {- |
This module exposes the console Unicode API which is used by the functions
in "System.Console.Haskeline". On POSIX systems, it uses @iconv@ plus the
console\'s locale; on Windows it uses the console's current code page.
Characters or bytes which cannot be encoded/decoded (for example, not belonging
to the outpu... | Add encoding/decoding String -> String convenience functions. | Add encoding/decoding String -> String convenience functions. | Haskell | bsd-3-clause | ghc/packages-haskeline,judah/haskeline,ghc/packages-haskeline,leroux/packages-haskeline,judah/haskeline |
e2d88f940f57b3bf87fab6719f1d4ca0f62562a9 | src/L1Tox64/Main.hs | src/L1Tox64/Main.hs | module Main where
import Control.Monad
import System.Environment
import System.Exit (exitFailure)
import System.Directory (doesFileExist)
import System.Cmd (rawSystem)
import L1_64.ParL1
import L1_64.ErrM
import L1Tox64.Compile
main :: IO ()
main = do
args <- getArgs
when (length args /= 1) $ do
pu... | module Main where
import Control.Monad
import System.Environment
import System.Cmd
import System.Exit
import System.Directory
import L1_64.ParL1
import L1_64.ErrM
import L1Tox64.Compile
main :: IO ()
main = do
args <- getArgs
when (length args /= 1) $ do
putStrLn "usage: filename"
exitFailu... | Abort compilation if a system command fails | Abort compilation if a system command fails
| Haskell | bsd-3-clause | mhuesch/scheme_compiler,mhuesch/scheme_compiler |
baa8f39348abfb0540c1b4421ec02414e5e61d6b | src/Main.hs | src/Main.hs | import qualified Parser
import qualified Beautifier
import qualified GeneratorM as Generator
import qualified Serializer
import qualified Optimizer
import qualified Text.Show.Pretty as Pr
import Control.Monad.Writer
runEvalWith input = do
let syntax_tree = Parser.parse input
putStrLn $ "Syntax tree:\n" ++ Pr.ppSh... | import qualified Parser
import qualified Beautifier
import qualified GeneratorM as Generator
import qualified Serializer
import qualified Optimizer
import qualified Text.Show.Pretty as Pr
import Control.Monad.Writer
runEvalWith input = do
let syntax_tree = Parser.parse input
putStrLn $ "Syntax tree:\n" ++ Pr.ppSh... | Print compiler messages in asm source | Print compiler messages in asm source
| Haskell | mit | aleksanb/hdc |
38e7f23b52466c4d604888ac6cd7cb6b1637cda1 | hackerrank/DiagonalDifference.hs | hackerrank/DiagonalDifference.hs | -- https://www.hackerrank.com/challenges/diagonal-difference/problem
import Control.Monad(replicateM)
import Data.List.Split(splitOn)
nestedMap :: (a -> b) -> [[a]] -> [[b]]
nestedMap = map . map
getIntSquareMatrix :: Int -> IO([[Int]])
getIntSquareMatrix rows = do
matrix <- replicateM rows getLine
let intMatrix ... | -- https://www.hackerrank.com/challenges/diagonal-difference/problem
import Control.Monad(replicateM)
import Data.List.Split(splitOn)
nestedMap :: (a -> b) -> [[a]] -> [[b]]
nestedMap = map . map
getIntSquareMatrix :: Int -> IO([[Int]])
getIntSquareMatrix rows = do
matrix <- replicateM rows getLine
let intMatrix ... | Rename function from getDiagonalElement to getListElement. | Rename function from getDiagonalElement to getListElement.
| Haskell | mit | julianespinel/training,julianespinel/training,julianespinel/trainning,julianespinel/trainning,julianespinel/training,julianespinel/training |
0f8eafc7f289a763ebd26a5c765930dda9f4d494 | migrator/app/Main.hs | migrator/app/Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (forkIO)
import Control.Monad.Logger (runStdoutLoggingT)
import Database.Persist.Postgresql (createPostgresqlPool, runSqlPool)
import Network.Socket hiding (send, recv)
import Network.Socket.ByteString (send)
import Models (connStr, runMi... | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (forkIO)
import Control.Monad.Logger (runStdoutLoggingT)
import Database.Persist.Postgresql (createPostgresqlPool, runSqlPool)
import Network.Socket hiding (send, recv)
import Network.Socket.ByteString (send)
import Models (connStr, runMi... | Refactor TCP part of migrator | Refactor TCP part of migrator
| Haskell | mit | houli/distributed-file-system |
5eff548fead30faeb16f7228f2ad6cf0adbfdc31 | Examples/Test/Assume.hs | Examples/Test/Assume.hs |
module Examples.Test.Assume(main) where
import Development.Shake
import Examples.Util
import Control.Monad
import Development.Shake.FilePath
main = shaken test $ \args obj -> do
want $ map obj args
obj "*.out" *> \out -> do
cs <- mapM (readFile' . obj . (:".src")) $ takeBaseName out
writeFil... |
module Examples.Test.Assume(main) where
import Development.Shake
import Examples.Util
import Control.Monad
import Development.Shake.FilePath
main = shaken test $ \args obj -> do
want $ map obj args
obj "*.out" *> \out -> do
cs <- mapM (readFile' . obj . (:".src")) $ takeBaseName out
writeFil... | Add more tests for the assume functionality | Add more tests for the assume functionality
| Haskell | bsd-3-clause | nh2/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,nh2/shake,ndmitchell/shake,ndmitchell/shake,nh2/shake,ndmitchell/shake |
90f5cff061e11a06d3f37fdd5424b49678a2b07d | src/Propellor/PrivData/Paths.hs | src/Propellor/PrivData/Paths.hs | module Propellor.PrivData.Paths where
import System.FilePath
privDataDir :: FilePath
privDataDir = "privdata.joey"
privDataFile :: FilePath
privDataFile = privDataDir </> "privdata.gpg"
privDataLocal :: FilePath
privDataLocal = privDataDir </> "local"
| module Propellor.PrivData.Paths where
import System.FilePath
privDataDir :: FilePath
privDataDir = "privdata"
privDataFile :: FilePath
privDataFile = privDataDir </> "privdata.gpg"
privDataLocal :: FilePath
privDataLocal = privDataDir </> "local"
| Revert "moving privdata to privdata.joey (for joeyconfig branch only)" | Revert "moving privdata to privdata.joey (for joeyconfig branch only)"
This reverts commit 269996e25d8f5481024f472a57debfd51dfcc703.
| Haskell | bsd-2-clause | abailly/infra-test,ArchiveTeam/glowing-computing-machine |
8811b2ae35d29c33dbc4eba4475f1edcda3f6b21 | src/Development/Duplo/Styles.hs | src/Development/Duplo/Styles.hs | module Development.Duplo.Styles
( build
) where
import Development.Duplo.Utilities
( getDirectoryFilesInOrder
, logAction
, expandPaths
, compile
)
import Development.Shake
import Development.Shake.FilePath ((</>))
import qualified Development.Duplo.Config as C
import C... | module Development.Duplo.Styles
( build
) where
import Development.Duplo.Utilities
( getDirectoryFilesInOrder
, logAction
, expandPaths
, compile
)
import Development.Shake
import Development.Shake.FilePath ((</>))
import qualified Development.Duplo.Config as C
import C... | Include all stylus files at the lowest priority | Include all stylus files at the lowest priority
| Haskell | mit | pixbi/duplo,pixbi/duplo,pixbi/duplo |
c9b2b7633dea28eb1e5e0f6001f9cc12b34c8584 | src/Main.hs | src/Main.hs | module Main (main) where
import Development.Shake
import qualified Base
import CmdLineFlag
import qualified Rules
import qualified Rules.Cabal
import qualified Rules.Config
import qualified Rules.Generate
import qualified Rules.Gmp
import qualified Rules.Libffi
import qualified Rules.Oracles
import qualifie... | module Main (main) where
import Development.Shake
import qualified Base
import CmdLineFlag
import qualified Rules
import qualified Rules.Cabal
import qualified Rules.Config
import qualified Rules.Generate
import qualified Rules.Gmp
import qualified Rules.Libffi
import qualified Rules.Oracles
import qualifie... | Switch on ChangeModtimeAndDigest by default. | Switch on ChangeModtimeAndDigest by default.
| Haskell | bsd-3-clause | sdiehl/ghc,sdiehl/ghc,bgamari/shaking-up-ghc,snowleopard/hadrian,sdiehl/ghc,izgzhen/hadrian,sdiehl/ghc,sdiehl/ghc,snowleopard/shaking-up-ghc,sdiehl/ghc,sdiehl/ghc |
6ceb535297dcfd6f44e77ed315e4695ec9ac25be | src/Main.hs | src/Main.hs | -- | The docvim executable.
module Main (main) where
import Options.Applicative
data Options = Options
{ directory :: String
, debug :: Bool }
options :: Parser Options
options = Options
<$> strOption
( long "directory"
<> short 'c'
<> metavar "DIRECTORY"
<> help "Change to ... | -- | The docvim executable.
module Main (main) where
import Options.Applicative
data Options = Options
{ debug :: Bool
, directory :: String }
parseDebug :: Parser Bool
parseDebug = switch
$ long "debug"
<> short 'd'
<> help "Print debug information during processing"
parseDirectory :: Parser String
parse... | Split out option parsing functions | Split out option parsing functions
This might make things a little more readable.
| Haskell | mit | wincent/docvim |
41fbfd14389981f42739c6e0754488daf7df3ad8 | 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, CPP, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Integer.Type
-- Copyright : (c) Ian Lynagh 2007-2008
-- License : BSD3
--
-- Maintainer : igloo@earth.li
-- Stability : internal
-- Portability : no... | Add extensions to LANGUAGE pragma | Add extensions to LANGUAGE pragma | Haskell | bsd-3-clause | haskell-suite/integer-simple |
539f2190c7cda28969676ad33f709da626fee9e5 | tests/TestHelpers/Assertions.hs | tests/TestHelpers/Assertions.hs | module TestHelpers.Assertions
( assertBool
, assertEqual'
, bodyEquals'
) where
import Yesod.Test
import Control.Monad.IO.Class (liftIO)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BS
import qualified Test.HUnit as HUnit
-- | Assert a value is true.
--
-- ... | module TestHelpers.Assertions
( assertBool
, assertEqual'
, bodyEquals'
) where
import Yesod.Test
import Control.Monad.IO.Class (liftIO)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BS
import qualified Test.HUnit as HUnit
-- | Assert a value is true.
--
-- ... | Fix incorrect doc string for test helper | Fix incorrect doc string for test helper
| Haskell | mit | thoughtbot/carnival,vaporware/carnival,peterwang/carnival |
9119e561991de06d7e2da0b5d72da037c7da2850 | src/Protonic/Render.hs | src/Protonic/Render.hs | module Protonic.Render where
import Control.Exception (bracket)
import Control.Monad.Managed (managed, runManaged)
import Control.Monad.Reader
import Data.Word (Word8)
import Linear.Affine (Point (..))
import Linear.V2
import ... | module Protonic.Render where
import Control.Exception (bracket)
import Control.Monad.Managed (managed, runManaged)
import Control.Monad.Reader
import Data.Word (Word8)
import Linear.Affine (Point (..))
import Linear.V2
import ... | Change type of testText's pos | Change type of testText's pos
| Haskell | bsd-3-clause | masatoko/protonic,masatoko/protonic |
974d3fe8a5c849b729c78f4a22992d4dff8da08e | Databrary/Controller/API.hs | Databrary/Controller/API.hs | {-# LANGUAGE OverloadedStrings #-}
module Databrary.Controller.API
( viewSwagger
) where
import Databrary.Has
import Databrary.HTTP.Path.Parser
import Databrary.Action.Types
import Databrary.Action
import Databrary.Routes.API (swagger)
viewSwagger :: ActionRoute API
viewSwagger = action GET (pathAPI </< "swagger"... | {-# LANGUAGE OverloadedStrings #-}
module Databrary.Controller.API
( viewSwagger
) where
import Databrary.Has
import Databrary.HTTP.Path.Parser
import Databrary.Action.Types
import Databrary.Action
import Databrary.Routes.API (swagger)
viewSwagger :: ActionRoute API
viewSwagger = action GET (pathAPI </< "swagger"... | Add Access-Control-Allow-Origin: * to /api/swagger.json | Add Access-Control-Allow-Origin: * to /api/swagger.json
| Haskell | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
484372cbcbc11635dab317b06485ae0badb12787 | haskell/greek-grammar/executables/Perseus.hs | haskell/greek-grammar/executables/Perseus.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import qualified Data.Text.Format.Strict as Format
import qualified Text.Greek.IO.Paths as Paths
import qualified Text.Greek.Source.PerseusInventory as Inventory
import qualified Text.Greek.Xm... | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import qualified Data.Text.Format.Strict as Format
import qualified Text.Greek.IO.Paths as Paths
import qualified Text.Greek.Source.PerseusInventory as Inventory
import qualified Text.Greek.Xm... | Print works with edition count. | Print works with edition count.
| Haskell | mit | scott-fleischman/greek-grammar,scott-fleischman/greek-grammar |
35c44955f3fc1079cf88119dffa3f7a8480616a3 | Control/Concurrent/STM/TVar.hs | Control/Concurrent/STM/TVar.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.STM.TVar
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : experiment... | -----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.STM.TVar
-- Copyright : (c) The University of Glasgow 2004
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : experiment... | Make it compile with base<4.2 | Make it compile with base<4.2 | Haskell | bsd-3-clause | gridaphobe/packages-stm |
1963a9d34d97751ea6b7162f276604e7d9d03278 | Main.hs | Main.hs | import Network.Wai
import Network.Wai.Handler.Warp
import qualified ZoomHub.API as ZoomHub
main :: IO ()
main = run 8000 ZoomHub.app
| import qualified Network.Wai.Handler.Warp as Warp
import qualified ZoomHub.API as ZoomHub
main :: IO ()
main = Warp.run 8000 ZoomHub.app
| Use qualified import for `Warp` | Use qualified import for `Warp`
| Haskell | mit | zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.