Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
snowleopard/hadrian | src/Rules/Gmp.hs | mit | gmpRules :: Rules ()
gmpRules = do
-- Copy appropriate GMP header and object files
root <- buildRootRules
root <//> gmpLibraryH %> \header -> do
windows <- windowsHost
configMk <- readFile' =<< (buildPath gmpContext <&> (-/- "config.mk"))
if not windows && -- TODO: We don't use syst... | 3,604 | gmpRules :: Rules ()
gmpRules = do
-- Copy appropriate GMP header and object files
root <- buildRootRules
root <//> gmpLibraryH %> \header -> do
windows <- windowsHost
configMk <- readFile' =<< (buildPath gmpContext <&> (-/- "config.mk"))
if not windows && -- TODO: We don't use syst... | 3,604 | gmpRules = do
-- Copy appropriate GMP header and object files
root <- buildRootRules
root <//> gmpLibraryH %> \header -> do
windows <- windowsHost
configMk <- readFile' =<< (buildPath gmpContext <&> (-/- "config.mk"))
if not windows && -- TODO: We don't use system GMP on Windows. Fi... | 3,583 | false | true | 0 | 23 | 1,067 | 727 | 352 | 375 | null | null |
frontrowed/stratosphere | gen/src/Gen/Render/RenderLenses.hs | mit | renderLens :: Module -> Property -> Text
renderLens Module{..} property@Property{..} =
[st|#{renderDocstring propertyDocumentation}
#{lensName} :: Lens' #{moduleName} #{wrapType}
#{lensName} = lens #{fieldName} (\s a -> s { #{fieldName} = a })|]
where
lensName = moduleLensPrefix <> propertyName
typeText = r... | 654 | renderLens :: Module -> Property -> Text
renderLens Module{..} property@Property{..} =
[st|#{renderDocstring propertyDocumentation}
#{lensName} :: Lens' #{moduleName} #{wrapType}
#{lensName} = lens #{fieldName} (\s a -> s { #{fieldName} = a })|]
where
lensName = moduleLensPrefix <> propertyName
typeText = r... | 654 | renderLens Module{..} property@Property{..} =
[st|#{renderDocstring propertyDocumentation}
#{lensName} :: Lens' #{moduleName} #{wrapType}
#{lensName} = lens #{fieldName} (\s a -> s { #{fieldName} = a })|]
where
lensName = moduleLensPrefix <> propertyName
typeText = renderPropertyType property
wrapType =... | 613 | false | true | 0 | 11 | 193 | 137 | 74 | 63 | null | null |
cbowdon/TweetFilter | Tweet/Test/Store.hs | gpl-3.0 | testToken :: IO ()
testToken = withConnection $ \conn -> do
quickCheck (prop_parseTest :: Token -> Bool)
quickCheck (prop insertTest conn :: Token -> Property)
quickCheck (prop selectTest conn :: Token -> Property)
-- | Check saving and loading users | 263 | testToken :: IO ()
testToken = withConnection $ \conn -> do
quickCheck (prop_parseTest :: Token -> Bool)
quickCheck (prop insertTest conn :: Token -> Property)
quickCheck (prop selectTest conn :: Token -> Property)
-- | Check saving and loading users | 263 | testToken = withConnection $ \conn -> do
quickCheck (prop_parseTest :: Token -> Bool)
quickCheck (prop insertTest conn :: Token -> Property)
quickCheck (prop selectTest conn :: Token -> Property)
-- | Check saving and loading users | 244 | false | true | 0 | 11 | 52 | 84 | 42 | 42 | null | null |
plow-technologies/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | mongoFilterToDoc :: PersistEntity record => MongoFilter record -> DB.Document
mongoFilterToDoc (NestedFilter field op) = mongoFilterToBSON (nestedFieldName field) op | 167 | mongoFilterToDoc :: PersistEntity record => MongoFilter record -> DB.Document
mongoFilterToDoc (NestedFilter field op) = mongoFilterToBSON (nestedFieldName field) op | 167 | mongoFilterToDoc (NestedFilter field op) = mongoFilterToBSON (nestedFieldName field) op | 89 | false | true | 0 | 7 | 19 | 53 | 24 | 29 | null | null |
Jon0/status | src/File.hs | gpl-3.0 | contentSize :: FilePath -> IO (Maybe FileOffset)
contentSize filename =
handle (nothingError) $ do
stat <- getFileStatus filename
return $ Just (fileSize stat)
-- replace with unix stat type | 204 | contentSize :: FilePath -> IO (Maybe FileOffset)
contentSize filename =
handle (nothingError) $ do
stat <- getFileStatus filename
return $ Just (fileSize stat)
-- replace with unix stat type | 204 | contentSize filename =
handle (nothingError) $ do
stat <- getFileStatus filename
return $ Just (fileSize stat)
-- replace with unix stat type | 155 | false | true | 0 | 11 | 42 | 64 | 30 | 34 | null | null |
gridaphobe/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | greQualModName :: GlobalRdrElt -> ModuleName
-- Get a suitable module qualifier for the GRE
-- (used in mkPrintUnqualified)
-- Prerecondition: the gre_name is always External
greQualModName gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss })
| lcl, Just mod <- nameModule_maybe name = moduleName mod
| (is:_) <... | 451 | greQualModName :: GlobalRdrElt -> ModuleName
greQualModName gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss })
| lcl, Just mod <- nameModule_maybe name = moduleName mod
| (is:_) <- iss = is_as (is_decl is)
| otherwise = pprPanic "greQualModName" (ppr gre... | 321 | greQualModName gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss })
| lcl, Just mod <- nameModule_maybe name = moduleName mod
| (is:_) <- iss = is_as (is_decl is)
| otherwise = pprPanic "greQualModName" (ppr gre) | 276 | true | true | 1 | 10 | 119 | 120 | 62 | 58 | null | null |
glguy/Yinsh | Yinsh.hs | bsd-3-clause | isPreflip _ = False | 39 | isPreflip _ = False | 39 | isPreflip _ = False | 39 | false | false | 0 | 4 | 23 | 10 | 4 | 6 | null | null |
ditto/ditto | src/Ditto/Monad.hs | gpl-3.0 | getClausess :: TCM Clausess
getClausess = clausess <$> get | 58 | getClausess :: TCM Clausess
getClausess = clausess <$> get | 58 | getClausess = clausess <$> get | 30 | false | true | 2 | 6 | 8 | 25 | 10 | 15 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon.hs | bsd-3-clause | compile :: [Flag] -- ^ The flags specified as arguments to the compiler
-> String -- ^ Path to the .para file to compile (relative or absolute)
-> IO (String, [Error]) -- ^ Name of compiled file and found errors
compile flags filePath = do
-- Initialization: Set up environment and read file... | 1,309 | compile :: [Flag] -- ^ The flags specified as arguments to the compiler
-> String -- ^ Path to the .para file to compile (relative or absolute)
-> IO (String, [Error])
compile flags filePath = do
-- Initialization: Set up environment and read file
debugPrint $ "Filepath: " ++ filePath
pD... | 1,264 | compile flags filePath = do
-- Initialization: Set up environment and read file
debugPrint $ "Filepath: " ++ filePath
pDirs <- buildPiPath flags filePath
fc <- readFile filePath
-- Compilation
res <- runBaseM . withDefaultErrCtxt $ compilationStages pDirs fc
return $ (filePath, either id (\_ -> []) res... | 1,070 | true | true | 1 | 12 | 331 | 265 | 125 | 140 | null | null |
andrewaguiar/s99-haskell | tfidf/tf-idf.hs | mit | tfIdfDocument _ _ "" = [] | 25 | tfIdfDocument _ _ "" = [] | 25 | tfIdfDocument _ _ "" = [] | 25 | false | false | 0 | 5 | 5 | 15 | 7 | 8 | null | null |
mikeizbicki/HLearn | test/BashTests.hs | bsd-3-clause | runBashTest :: String -> IO ()
runBashTest cmd = do
putStr $ cmd ++ "..."
ExitSuccess <- system cmd
return () | 121 | runBashTest :: String -> IO ()
runBashTest cmd = do
putStr $ cmd ++ "..."
ExitSuccess <- system cmd
return () | 121 | runBashTest cmd = do
putStr $ cmd ++ "..."
ExitSuccess <- system cmd
return () | 90 | false | true | 0 | 8 | 32 | 52 | 23 | 29 | null | null |
elieux/ghc | compiler/prelude/PrelInfo.hs | bsd-3-clause | maybeIntLikeCon con = con `hasKey` intDataConKey | 49 | maybeIntLikeCon con = con `hasKey` intDataConKey | 49 | maybeIntLikeCon con = con `hasKey` intDataConKey | 49 | false | false | 1 | 5 | 6 | 18 | 8 | 10 | null | null |
sol/markdown | Text/Markdown/Block.hs | bsd-3-clause | toBlocks :: Monad m => Conduit Text m (Block Text)
toBlocks =
mapOutput fixWS CT.lines =$= toBlocksLines
where
fixWS = T.pack . go 0 . T.unpack
go _ [] = []
go i ('\r':cs) = go i cs
go i ('\t':cs) =
(replicate j ' ') ++ go (i + j) cs
where
j = 4 - (i `mod` 4)
go i (c:cs)... | 340 | toBlocks :: Monad m => Conduit Text m (Block Text)
toBlocks =
mapOutput fixWS CT.lines =$= toBlocksLines
where
fixWS = T.pack . go 0 . T.unpack
go _ [] = []
go i ('\r':cs) = go i cs
go i ('\t':cs) =
(replicate j ' ') ++ go (i + j) cs
where
j = 4 - (i `mod` 4)
go i (c:cs)... | 340 | toBlocks =
mapOutput fixWS CT.lines =$= toBlocksLines
where
fixWS = T.pack . go 0 . T.unpack
go _ [] = []
go i ('\r':cs) = go i cs
go i ('\t':cs) =
(replicate j ' ') ++ go (i + j) cs
where
j = 4 - (i `mod` 4)
go i (c:cs) = c : go (i + 1) cs | 289 | false | true | 0 | 9 | 119 | 195 | 99 | 96 | null | null |
guillep19/uulib | src/UU/Parsing/Examples.hs | bsd-3-clause | c = pSym 'c' | 12 | c = pSym 'c' | 12 | c = pSym 'c' | 12 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
solatis/dissent | src/Dissent/Crypto/Rsa.hs | mit | -- Our cipher key length
cipherBits :: Int
cipherBits = 256 | 59 | cipherBits :: Int
cipherBits = 256 | 34 | cipherBits = 256 | 16 | true | true | 0 | 4 | 10 | 12 | 7 | 5 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Update.hs | mpl-2.0 | -- | User profile ID associated with this request.
fcuProFileId :: Lens' FloodlightConfigurationsUpdate Int64
fcuProFileId
= lens _fcuProFileId (\ s a -> s{_fcuProFileId = a})
. _Coerce | 193 | fcuProFileId :: Lens' FloodlightConfigurationsUpdate Int64
fcuProFileId
= lens _fcuProFileId (\ s a -> s{_fcuProFileId = a})
. _Coerce | 142 | fcuProFileId
= lens _fcuProFileId (\ s a -> s{_fcuProFileId = a})
. _Coerce | 83 | true | true | 0 | 10 | 34 | 46 | 24 | 22 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/LT_1.hs | mit | esEsOrdering GT GT = MyTrue | 27 | esEsOrdering GT GT = MyTrue | 27 | esEsOrdering GT GT = MyTrue | 27 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
shayan-najd/Haskell-Desugar-Generic | Language/Haskell/Exts/Desugar/Generic/Others.hs | bsd-3-clause | desugarFieldPun = noDesugaring | 30 | desugarFieldPun = noDesugaring | 30 | desugarFieldPun = noDesugaring | 30 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ndsParameterTitles :: Map String String
ndsParameterTitles =
Map.fromList
[(ndExclusiveStorage, "ExclusiveStorage"),
(ndOobProgram, "OutOfBandProgram"),
(ndOvs, "OpenvSwitch"),
(ndOvsLink, "OpenvSwitchLink"),
(ndOvsName, "OpenvSwitchName"),
(ndSpindleCount, "SpindleCount")] | 293 | ndsParameterTitles :: Map String String
ndsParameterTitles =
Map.fromList
[(ndExclusiveStorage, "ExclusiveStorage"),
(ndOobProgram, "OutOfBandProgram"),
(ndOvs, "OpenvSwitch"),
(ndOvsLink, "OpenvSwitchLink"),
(ndOvsName, "OpenvSwitchName"),
(ndSpindleCount, "SpindleCount")] | 293 | ndsParameterTitles =
Map.fromList
[(ndExclusiveStorage, "ExclusiveStorage"),
(ndOobProgram, "OutOfBandProgram"),
(ndOvs, "OpenvSwitch"),
(ndOvsLink, "OpenvSwitchLink"),
(ndOvsName, "OpenvSwitchName"),
(ndSpindleCount, "SpindleCount")] | 253 | false | true | 1 | 6 | 38 | 78 | 46 | 32 | null | null |
nevrenato/Hets_Fork | CASL/Freeness.hs | gpl-2.0 | -- | generates the name of the phi variable of a concrete predicate
psiName :: Id -> Id
psiName s = mkId [mkSimpleId $ "Psi_" ++ show s] | 136 | psiName :: Id -> Id
psiName s = mkId [mkSimpleId $ "Psi_" ++ show s] | 68 | psiName s = mkId [mkSimpleId $ "Psi_" ++ show s] | 48 | true | true | 0 | 8 | 27 | 36 | 18 | 18 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT14.hs | gpl-3.0 | exp x (S n) = x * exp x n | 25 | exp x (S n) = x * exp x n | 25 | exp x (S n) = x * exp x n | 25 | false | false | 1 | 6 | 9 | 31 | 12 | 19 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/List.hs | mpl-2.0 | -- | OAuth bearer token.
fslBearerToken :: Lens' FoldersSinksList (Maybe Text)
fslBearerToken
= lens _fslBearerToken
(\ s a -> s{_fslBearerToken = a}) | 158 | fslBearerToken :: Lens' FoldersSinksList (Maybe Text)
fslBearerToken
= lens _fslBearerToken
(\ s a -> s{_fslBearerToken = a}) | 133 | fslBearerToken
= lens _fslBearerToken
(\ s a -> s{_fslBearerToken = a}) | 79 | true | true | 1 | 9 | 29 | 52 | 25 | 27 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/mapTvCrash.hs | bsd-3-clause | foo :: FinalizerPtr a -> a
foo = undefined | 42 | foo :: FinalizerPtr a -> a
foo = undefined | 42 | foo = undefined | 15 | false | true | 0 | 7 | 8 | 25 | 10 | 15 | null | null |
BlackBrane/microsoft-translator | src/Microsoft/Translator.hs | mit | -- | If a token contained in a 'TransData' is expired or about to expire, refresh it.
checkAuthIO :: TransData -> IO (Either TranslatorException AuthData)
checkAuthIO = runExceptT . checkAuth | 191 | checkAuthIO :: TransData -> IO (Either TranslatorException AuthData)
checkAuthIO = runExceptT . checkAuth | 105 | checkAuthIO = runExceptT . checkAuth | 36 | true | true | 0 | 8 | 29 | 31 | 16 | 15 | null | null |
nickbart1980/pandoc | src/Text/Pandoc.hs | gpl-2.0 | markdown :: ReaderOptions -> String -> IO Pandoc
markdown o s = do
let (doc, warnings) = readMarkdownWithWarnings o s
mapM_ warn warnings
return doc
-- | Association list of formats and readers. | 201 | markdown :: ReaderOptions -> String -> IO Pandoc
markdown o s = do
let (doc, warnings) = readMarkdownWithWarnings o s
mapM_ warn warnings
return doc
-- | Association list of formats and readers. | 201 | markdown o s = do
let (doc, warnings) = readMarkdownWithWarnings o s
mapM_ warn warnings
return doc
-- | Association list of formats and readers. | 152 | false | true | 0 | 10 | 39 | 63 | 29 | 34 | null | null |
artems/blockbattle | src/Main.hs | mit | edges :: Block -> GameContext (Int, Int)
edges block = do
let blockM = blockMatrix block
blockL = length blockM
width <- gets _fieldWidth
return (0, width - blockL) | 184 | edges :: Block -> GameContext (Int, Int)
edges block = do
let blockM = blockMatrix block
blockL = length blockM
width <- gets _fieldWidth
return (0, width - blockL) | 184 | edges block = do
let blockM = blockMatrix block
blockL = length blockM
width <- gets _fieldWidth
return (0, width - blockL) | 143 | false | true | 0 | 10 | 48 | 73 | 35 | 38 | null | null |
rubik/stack | src/System/Process/Read.hs | bsd-3-clause | -- | Augment the PATH environment variable with the given extra paths.
augmentPath :: [FilePath] -> Maybe Text -> Text
augmentPath dirs mpath =
T.intercalate (T.singleton FP.searchPathSeparator)
$ map (T.pack . FP.dropTrailingPathSeparator) dirs
++ maybe [] return mpath | 281 | augmentPath :: [FilePath] -> Maybe Text -> Text
augmentPath dirs mpath =
T.intercalate (T.singleton FP.searchPathSeparator)
$ map (T.pack . FP.dropTrailingPathSeparator) dirs
++ maybe [] return mpath | 210 | augmentPath dirs mpath =
T.intercalate (T.singleton FP.searchPathSeparator)
$ map (T.pack . FP.dropTrailingPathSeparator) dirs
++ maybe [] return mpath | 162 | true | true | 0 | 10 | 48 | 79 | 39 | 40 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | race ProtossTemplarArchives = Protoss | 37 | race ProtossTemplarArchives = Protoss | 37 | race ProtossTemplarArchives = Protoss | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Zolomon/edan40-functional-parsing | Expr.hs | mit | value (Sub lhs rhs) d = value lhs d - value rhs d | 49 | value (Sub lhs rhs) d = value lhs d - value rhs d | 49 | value (Sub lhs rhs) d = value lhs d - value rhs d | 49 | false | false | 1 | 6 | 12 | 38 | 15 | 23 | null | null |
drakedevel/wcc | SimMain.hs | bsd-3-clause | numSeq n = Hash : f n
where
f 0 = [Hash]
f n = (if mod n 2 == 0 then Zero else One) : f (div n 2) | 107 | numSeq n = Hash : f n
where
f 0 = [Hash]
f n = (if mod n 2 == 0 then Zero else One) : f (div n 2) | 107 | numSeq n = Hash : f n
where
f 0 = [Hash]
f n = (if mod n 2 == 0 then Zero else One) : f (div n 2) | 107 | false | false | 1 | 10 | 39 | 73 | 36 | 37 | null | null |
kmate/zeldspar | src/Ziria.hs | bsd-3-clause | liftIn' f (Emit x p) k = Emit x (liftIn' f p k) | 48 | liftIn' f (Emit x p) k = Emit x (liftIn' f p k) | 48 | liftIn' f (Emit x p) k = Emit x (liftIn' f p k) | 48 | false | false | 0 | 7 | 13 | 36 | 17 | 19 | null | null |
DavidAlphaFox/ghc | compiler/simplCore/SimplUtils.hs | bsd-3-clause | -------------------
contIsDupable :: SimplCont -> Bool
contIsDupable (Stop {}) = True | 109 | contIsDupable :: SimplCont -> Bool
contIsDupable (Stop {}) = True | 89 | contIsDupable (Stop {}) = True | 54 | true | true | 0 | 7 | 34 | 26 | 14 | 12 | null | null |
valderman/kagamin | Kagamin/Modules/Dice.hs | mit | kagaDice :: IO KagaModule
kagaDice = return $ defaultModule {kagaMsgHook = handleKagaMsg} | 89 | kagaDice :: IO KagaModule
kagaDice = return $ defaultModule {kagaMsgHook = handleKagaMsg} | 89 | kagaDice = return $ defaultModule {kagaMsgHook = handleKagaMsg} | 63 | false | true | 0 | 7 | 11 | 26 | 14 | 12 | null | null |
dmbarbour/awelon | hsrc_util/ABCGraph.hs | bsd-3-clause | boolCopyable (Prod a b) =
boolCopyable a >>= \ copyableA ->
boolCopyable b >>= \ copyableB ->
boolAnd copyableA copyableB | 134 | boolCopyable (Prod a b) =
boolCopyable a >>= \ copyableA ->
boolCopyable b >>= \ copyableB ->
boolAnd copyableA copyableB | 134 | boolCopyable (Prod a b) =
boolCopyable a >>= \ copyableA ->
boolCopyable b >>= \ copyableB ->
boolAnd copyableA copyableB | 134 | false | false | 4 | 6 | 32 | 53 | 24 | 29 | null | null |
fizruk/dots-game | src/Dots.hs | bsd-3-clause | -- | A list of different 'DotColor's.
defaultDotColors :: [DotColor]
defaultDotColors = map DotColor [blue, green, red, white, yellow, cyan, magenta, rose, violet, azure, aquamarine, chartreuse, orange] | 202 | defaultDotColors :: [DotColor]
defaultDotColors = map DotColor [blue, green, red, white, yellow, cyan, magenta, rose, violet, azure, aquamarine, chartreuse, orange] | 164 | defaultDotColors = map DotColor [blue, green, red, white, yellow, cyan, magenta, rose, violet, azure, aquamarine, chartreuse, orange] | 133 | true | true | 0 | 6 | 26 | 59 | 37 | 22 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/array/Data/Array/IO.hs | bsd-3-clause | -- ---------------------------------------------------------------------------
-- Internal Utils
illegalBufferSize :: Handle -> String -> Int -> IO a
illegalBufferSize handle fn sz =
ioException (ioeSetErrorString
(mkIOError InvalidArgument fn (Just handle) Nothing)
("... | 371 | illegalBufferSize :: Handle -> String -> Int -> IO a
illegalBufferSize handle fn sz =
ioException (ioeSetErrorString
(mkIOError InvalidArgument fn (Just handle) Nothing)
("illegal buffer size " ++ showsPrec 9 (sz::Int) [])) | 273 | illegalBufferSize handle fn sz =
ioException (ioeSetErrorString
(mkIOError InvalidArgument fn (Just handle) Nothing)
("illegal buffer size " ++ showsPrec 9 (sz::Int) [])) | 220 | true | true | 0 | 11 | 87 | 92 | 45 | 47 | null | null |
andorp/bead | test/Test/Property/Persistence.hs | bsd-3-clause | unevaluatedScoresTests = test $ testCase "Unevaluated scores" $ do
reinitPersistence
us <- users 50
cs <- courses 100
gs <- groups 200 cs
as <- courseAndGroupAssessments 300 300 cs gs
scs <- scores 500 us as
quick 1000 $ do
s <- pick $ elements scs
-- All the saved scores should have an assessment... | 1,057 | unevaluatedScoresTests = test $ testCase "Unevaluated scores" $ do
reinitPersistence
us <- users 50
cs <- courses 100
gs <- groups 200 cs
as <- courseAndGroupAssessments 300 300 cs gs
scs <- scores 500 us as
quick 1000 $ do
s <- pick $ elements scs
-- All the saved scores should have an assessment... | 1,057 | unevaluatedScoresTests = test $ testCase "Unevaluated scores" $ do
reinitPersistence
us <- users 50
cs <- courses 100
gs <- groups 200 cs
as <- courseAndGroupAssessments 300 300 cs gs
scs <- scores 500 us as
quick 1000 $ do
s <- pick $ elements scs
-- All the saved scores should have an assessment... | 1,057 | false | false | 3 | 15 | 249 | 248 | 108 | 140 | null | null |
mstksg/hledger | hledger-lib/Hledger/Data/Posting.hs | gpl-3.0 | -- Get the other postings from this posting's transaction.
relatedPostings :: Posting -> [Posting]
relatedPostings p@Posting{ptransaction=Just t} = filter (/= p) $ tpostings t | 175 | relatedPostings :: Posting -> [Posting]
relatedPostings p@Posting{ptransaction=Just t} = filter (/= p) $ tpostings t | 116 | relatedPostings p@Posting{ptransaction=Just t} = filter (/= p) $ tpostings t | 76 | true | true | 1 | 9 | 23 | 57 | 28 | 29 | null | null |
Docteur-Lalla/HsSHAUN | src/Shaun/Data/Sweeper.hs | bsd-3-clause | computePath :: Object -> String -> Either Error Object
computePath t@(TreeObj _) path =
case makeLexer path of
Left e -> Left (LexicalError e)
Right (_, lexer) -> getValue t lexer | 197 | computePath :: Object -> String -> Either Error Object
computePath t@(TreeObj _) path =
case makeLexer path of
Left e -> Left (LexicalError e)
Right (_, lexer) -> getValue t lexer | 195 | computePath t@(TreeObj _) path =
case makeLexer path of
Left e -> Left (LexicalError e)
Right (_, lexer) -> getValue t lexer | 140 | false | true | 1 | 10 | 48 | 92 | 41 | 51 | null | null |
hmgibson23/kwikup | BowerNpm.hs | apache-2.0 | getStdOut :: (a, b, c) -> b
getStdOut (_, a, _) = a | 51 | getStdOut :: (a, b, c) -> b
getStdOut (_, a, _) = a | 51 | getStdOut (_, a, _) = a | 23 | false | true | 0 | 6 | 12 | 36 | 21 | 15 | null | null |
nicuveo/HCM | src/Filters.hs | mit | keep :: PredicateGen a => a -> CardMap -> CardMap
keep = M.filter . genPred | 75 | keep :: PredicateGen a => a -> CardMap -> CardMap
keep = M.filter . genPred | 75 | keep = M.filter . genPred | 25 | false | true | 0 | 9 | 14 | 39 | 17 | 22 | null | null |
uduki/hsQt | Qtc/Enums/Core/QDir.hs | bsd-2-clause | eExecutable :: Filter
eExecutable
= ieFilter $ 64 | 51 | eExecutable :: Filter
eExecutable
= ieFilter $ 64 | 51 | eExecutable
= ieFilter $ 64 | 29 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
CulpaBS/wbBach | src/Futhark/Representation/AST/Traversals.hs | bsd-3-clause | mapExpM tv (PrimOp (Partition cs n flags arr)) =
PrimOp <$> (pure Partition <*> mapOnCertificates tv cs <*>
pure n <*>
mapOnVName tv flags <*>
mapM (mapOnVName tv) arr) | 212 | mapExpM tv (PrimOp (Partition cs n flags arr)) =
PrimOp <$> (pure Partition <*> mapOnCertificates tv cs <*>
pure n <*>
mapOnVName tv flags <*>
mapM (mapOnVName tv) arr) | 212 | mapExpM tv (PrimOp (Partition cs n flags arr)) =
PrimOp <$> (pure Partition <*> mapOnCertificates tv cs <*>
pure n <*>
mapOnVName tv flags <*>
mapM (mapOnVName tv) arr) | 212 | false | false | 0 | 11 | 72 | 79 | 37 | 42 | null | null |
yi-editor/yi-rope | src/Yi/Rope.hs | gpl-2.0 | (-|) :: YiChunk -> FingerTree Size YiChunk -> FingerTree Size YiChunk
b -| t | chunkSize b == 0 = t
| otherwise = b <| t | 134 | (-|) :: YiChunk -> FingerTree Size YiChunk -> FingerTree Size YiChunk
b -| t | chunkSize b == 0 = t
| otherwise = b <| t | 134 | b -| t | chunkSize b == 0 = t
| otherwise = b <| t | 64 | false | true | 0 | 9 | 40 | 69 | 31 | 38 | null | null |
hBPF/hBPF | HBPF/Internal.hs | bsd-3-clause | printBPFInstr (ISub a) = "sub " ++ toString a | 52 | printBPFInstr (ISub a) = "sub " ++ toString a | 52 | printBPFInstr (ISub a) = "sub " ++ toString a | 52 | false | false | 0 | 7 | 15 | 22 | 10 | 12 | null | null |
z0isch/lambda-hive | src/LambdaHive/Types.hs | bsd-3-clause | getMoveString (FirstMove pm) = getCannonicalId pm <> " ." | 57 | getMoveString (FirstMove pm) = getCannonicalId pm <> " ." | 57 | getMoveString (FirstMove pm) = getCannonicalId pm <> " ." | 57 | false | false | 0 | 7 | 8 | 22 | 10 | 12 | null | null |
icendoan/Fun | haskell/turing.hs | gpl-2.0 | -- Runs the TM, showing the tape and state label at each stage
showTM :: TransitionFunc -> Tape -> IO ()
showTM f t = showTM' f (Q "START") t 0 | 143 | showTM :: TransitionFunc -> Tape -> IO ()
showTM f t = showTM' f (Q "START") t 0 | 80 | showTM f t = showTM' f (Q "START") t 0 | 38 | true | true | 0 | 9 | 30 | 51 | 23 | 28 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_382 (48#) = happyGoto action_191 | 39 | action_382 (48#) = happyGoto action_191 | 39 | action_382 (48#) = happyGoto action_191 | 39 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
anton-k/language-css | src/Language/Css/Build/Idents.hs | bsd-3-clause | -- | square
square :: Idents a => a
square = ident "square" | 59 | square :: Idents a => a
square = ident "square" | 47 | square = ident "square" | 23 | true | true | 0 | 7 | 12 | 28 | 12 | 16 | null | null |
spacekitteh/smcghc | libraries/base/Numeric.hs | bsd-3-clause | -- | Read an unsigned number in decimal notation.
readDec :: (Eq a, Num a) => ReadS a
readDec = readP_to_S L.readDecP | 117 | readDec :: (Eq a, Num a) => ReadS a
readDec = readP_to_S L.readDecP | 67 | readDec = readP_to_S L.readDecP | 31 | true | true | 0 | 7 | 21 | 40 | 19 | 21 | null | null |
mrmonday/Idris-dev | src/Idris/Core/ProofTerm.hs | bsd-3-clause | -- | Given a list of solved holes, fill out the solutions in a
-- term. Return whether updates were performed, to facilitate sharing
-- when there are no updates.
updateSolvedTerm' :: [(Name, Term)] -> Term -> (Term, Bool)
updateSolvedTerm' [] x = (x, False) | 258 | updateSolvedTerm' :: [(Name, Term)] -> Term -> (Term, Bool)
updateSolvedTerm' [] x = (x, False) | 95 | updateSolvedTerm' [] x = (x, False) | 35 | true | true | 0 | 7 | 44 | 50 | 30 | 20 | null | null |
danstiner/infix-string-calculator | src/Lexer.hs | bsd-3-clause | printToken (Plus : ts) = "+" ++ printToken ts | 45 | printToken (Plus : ts) = "+" ++ printToken ts | 45 | printToken (Plus : ts) = "+" ++ printToken ts | 45 | false | false | 0 | 6 | 8 | 24 | 11 | 13 | null | null |
snoyberg/ghc | compiler/nativeGen/PPC/Regs.hs | bsd-3-clause | -- narrow to the width: a CmmInt might be out of
-- range, but we assume that ImmInteger only contains
-- in-range values. A signed value should be fine here.
litToImm (CmmFloat f W32) = ImmFloat f | 233 | litToImm (CmmFloat f W32) = ImmFloat f | 41 | litToImm (CmmFloat f W32) = ImmFloat f | 41 | true | false | 0 | 7 | 72 | 23 | 12 | 11 | null | null |
MarcosPividori/GSoC-push-notify | test/testAPNS/My-server/exampleAPNS.hs | mit | example1 :: IO ()
example1 = do
cert <- fileReadCertificate "public-cert.pem"
key <- fileReadPrivateKey "private-key.pem"
let confg = def{
apnsCertificate = cert
, apnsPrivateKey = key
, environm... | 1,018 | example1 :: IO ()
example1 = do
cert <- fileReadCertificate "public-cert.pem"
key <- fileReadPrivateKey "private-key.pem"
let confg = def{
apnsCertificate = cert
, apnsPrivateKey = key
, environm... | 1,018 | example1 = do
cert <- fileReadCertificate "public-cert.pem"
key <- fileReadPrivateKey "private-key.pem"
let confg = def{
apnsCertificate = cert
, apnsPrivateKey = key
, environment = Local }
... | 1,000 | false | true | 0 | 14 | 455 | 218 | 97 | 121 | null | null |
evancz/builder | src/Elm/PerUserCache.hs | bsd-3-clause | getReplRoot :: IO FilePath
getReplRoot =
getRoot "repl" | 57 | getReplRoot :: IO FilePath
getReplRoot =
getRoot "repl" | 57 | getReplRoot =
getRoot "repl" | 30 | false | true | 0 | 5 | 9 | 17 | 8 | 9 | null | null |
alexander-at-github/eta | compiler/ETA/Core/TrieMap.hs | bsd-3-clause | emptyTyLitMap :: TyLitMap a
emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = Map.empty } | 98 | emptyTyLitMap :: TyLitMap a
emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = Map.empty } | 98 | emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = Map.empty } | 70 | false | true | 0 | 8 | 14 | 41 | 20 | 21 | null | null |
MarcusWalz/hgit | Lib/HGit/Readers.hs | bsd-3-clause | revList :: CommitID -> GitReader [CommitID]
revList c = runGitBatch $ revList' c | 80 | revList :: CommitID -> GitReader [CommitID]
revList c = runGitBatch $ revList' c | 80 | revList c = runGitBatch $ revList' c | 36 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
ownclo/jpeg-on-steroids | vendor/Haskell/stb-image-0.2.1/example/viewer.hs | bsd-3-clause | - keyboard callback
keyboard key keyState mod pos =
case key of
Char '\ESC' -> exitWith ExitSuccess
_ -> return ()
--------------------------------------------------------------------------------
-- glVertex2d / glTexCoord2d, convenient because the OpenGL vertex / texCoord functions are too polymo... | 326 | keyboard key keyState mod pos =
case key of
Char '\ESC' -> exitWith ExitSuccess
_ -> return ()
--------------------------------------------------------------------------------
-- glVertex2d / glTexCoord2d, convenient because the OpenGL vertex / texCoord functions are too polymorphic | 305 | keyboard key keyState mod pos =
case key of
Char '\ESC' -> exitWith ExitSuccess
_ -> return ()
--------------------------------------------------------------------------------
-- glVertex2d / glTexCoord2d, convenient because the OpenGL vertex / texCoord functions are too polymorphic | 305 | true | false | 1 | 9 | 59 | 58 | 24 | 34 | null | null |
chrisbanks/cpiwb | CPi/Parser.hs | gpl-3.0 | identifier = P.identifier lexer | 31 | identifier = P.identifier lexer | 31 | identifier = P.identifier lexer | 31 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Attrs/Globals.hs | bsd-3-clause | lang :: AttrHasLang a => Text -> a -> a
lang t = attrSetLang (Lang t) | 69 | lang :: AttrHasLang a => Text -> a -> a
lang t = attrSetLang (Lang t) | 69 | lang t = attrSetLang (Lang t) | 29 | false | true | 0 | 7 | 15 | 38 | 18 | 20 | null | null |
markuspf/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LASHR ITNative) [l, r] = v ++ "INTOP(>>," ++ creg l ++ ", " ++ creg r ++ ")" | 84 | doOp v (LASHR ITNative) [l, r] = v ++ "INTOP(>>," ++ creg l ++ ", " ++ creg r ++ ")" | 84 | doOp v (LASHR ITNative) [l, r] = v ++ "INTOP(>>," ++ creg l ++ ", " ++ creg r ++ ")" | 84 | false | false | 1 | 12 | 20 | 56 | 25 | 31 | null | null |
olsner/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | -- | Is a type 'String'?
isStringTy :: Type -> Bool
isStringTy ty
= case tcSplitTyConApp_maybe ty of
Just (tc, [arg_ty]) -> tc == listTyCon && isCharTy arg_ty
_ -> False
-- | Is a type a 'CallStack'? | 232 | isStringTy :: Type -> Bool
isStringTy ty
= case tcSplitTyConApp_maybe ty of
Just (tc, [arg_ty]) -> tc == listTyCon && isCharTy arg_ty
_ -> False
-- | Is a type a 'CallStack'? | 207 | isStringTy ty
= case tcSplitTyConApp_maybe ty of
Just (tc, [arg_ty]) -> tc == listTyCon && isCharTy arg_ty
_ -> False
-- | Is a type a 'CallStack'? | 180 | true | true | 0 | 10 | 70 | 68 | 33 | 35 | null | null |
Noeda/caramia | src/Graphics/Caramia/Query.hs | mit | -- | Same as `withNumericQuery` but throws away the result of the action
-- itself.
withNumericQuery' :: (MonadIO m, MonadMask m)
=> NumericQueryType
-> m a
-> m (Query Int64)
withNumericQuery' qt action = do
(x, _) <- withNumericQuery qt action
return x
--... | 422 | withNumericQuery' :: (MonadIO m, MonadMask m)
=> NumericQueryType
-> m a
-> m (Query Int64)
withNumericQuery' qt action = do
(x, _) <- withNumericQuery qt action
return x
-- | Same as `withNumericQuery`, but uses boolean queries, whose results is
-- either ... | 338 | withNumericQuery' qt action = do
(x, _) <- withNumericQuery qt action
return x
-- | Same as `withNumericQuery`, but uses boolean queries, whose results is
-- either `True` or `False`. | 192 | true | true | 0 | 11 | 122 | 84 | 41 | 43 | null | null |
ddssff/pandoc | pandoc.hs | gpl-2.0 | -- | A list of functions, each transforming the options data structure
-- in response to a command-line option.
options :: [OptDescr (Opt -> IO Opt)]
options =
[ Option "fr" ["from","read"]
(ReqArg
(\arg opt -> return opt { optReader = arg })
"FORMAT")
... | 25,981 | options :: [OptDescr (Opt -> IO Opt)]
options =
[ Option "fr" ["from","read"]
(ReqArg
(\arg opt -> return opt { optReader = arg })
"FORMAT")
""
, Option "tw" ["to","write"]
(ReqArg
(\arg opt -> return opt {... | 25,867 | options =
[ Option "fr" ["from","read"]
(ReqArg
(\arg opt -> return opt { optReader = arg })
"FORMAT")
""
, Option "tw" ["to","write"]
(ReqArg
(\arg opt -> return opt { optWriter = arg })
... | 25,829 | true | true | 0 | 21 | 13,151 | 5,195 | 2,743 | 2,452 | null | null |
the-phule/code_blocks | haskell/test.hs | gpl-3.0 | double x = x + x | 16 | double x = x + x | 16 | double x = x + x | 16 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Static/Tiles.hs | mit | s4 = mkSeason Winter | 20 | s4 = mkSeason Winter | 20 | s4 = mkSeason Winter | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
david-caro/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkForInCat1a= verify checkForInCat "for f in `cat foo`; do stuff; done" | 79 | prop_checkForInCat1a= verify checkForInCat "for f in `cat foo`; do stuff; done" | 79 | prop_checkForInCat1a= verify checkForInCat "for f in `cat foo`; do stuff; done" | 79 | false | false | 0 | 5 | 10 | 11 | 5 | 6 | null | null |
mfilmer/haskBMP | mandelbrot.hs | gpl-3.0 | imData = BMP columns rows 24 300 300 pixels | 43 | imData = BMP columns rows 24 300 300 pixels | 43 | imData = BMP columns rows 24 300 300 pixels | 43 | false | false | 1 | 5 | 8 | 27 | 9 | 18 | null | null |
alexander-at-github/eta | libraries/base/System/Mem/Weak.hs | bsd-3-clause | -- | A specialised version of 'mkWeak', where the key and the value are
-- the same object:
--
-- > mkWeakPtr key finalizer = mkWeak key key finalizer
--
mkWeakPtr :: k -> Maybe (IO ()) -> IO (Weak k)
mkWeakPtr key finalizer = mkWeak key key finalizer | 251 | mkWeakPtr :: k -> Maybe (IO ()) -> IO (Weak k)
mkWeakPtr key finalizer = mkWeak key key finalizer | 97 | mkWeakPtr key finalizer = mkWeak key key finalizer | 50 | true | true | 0 | 11 | 48 | 60 | 30 | 30 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1755 = 1754 | 11 | 1755 = 1754 | 11 | 1755 = 1754 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
infotroph/pandoc | src/Text/Pandoc/Writers/DokuWiki.hs | gpl-2.0 | blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
let at = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp",
"autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm",
"cpp", "cpp-qt", "csharp", "css", "d"... | 1,156 | blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
let at = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp",
"autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm",
"cpp", "cpp-qt", "csharp", "css", "d"... | 1,156 | blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
let at = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp",
"autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm",
"cpp", "cpp-qt", "csharp", "css", "d"... | 1,156 | false | false | 1 | 15 | 362 | 341 | 211 | 130 | null | null |
notcome/indescript | src/Language/Indescript/Parser.hs | bsd-3-clause | -- ### Combinators
paren p = lparen *> p <* rparen | 51 | paren p = lparen *> p <* rparen | 31 | paren p = lparen *> p <* rparen | 31 | true | false | 1 | 6 | 11 | 22 | 9 | 13 | null | null |
khibino/haskell-hdbc-tool.201303 | src/Database/HDBC/TH.hs | bsd-3-clause | sqlEq :: String -> String -> String
sqlEq a b = sqlCat [a, "=", b] | 66 | sqlEq :: String -> String -> String
sqlEq a b = sqlCat [a, "=", b] | 66 | sqlEq a b = sqlCat [a, "=", b] | 30 | false | true | 0 | 6 | 14 | 36 | 19 | 17 | null | null |
faylang/fay-jquery | src/JQuery.hs | bsd-3-clause | -- deriving (Show)
onKeycode :: (KeyCode -> Fay Bool) -> JQuery -> Fay JQuery
onKeycode callback el = do
_onKeycode (\code -> callback (case code of
38 -> KeyUp
40 -> KeyDown
37 -> KeyLeft
... | 467 | onKeycode :: (KeyCode -> Fay Bool) -> JQuery -> Fay JQuery
onKeycode callback el = do
_onKeycode (\code -> callback (case code of
38 -> KeyUp
40 -> KeyDown
37 -> KeyLeft
39 -> Ke... | 446 | onKeycode callback el = do
_onKeycode (\code -> callback (case code of
38 -> KeyUp
40 -> KeyDown
37 -> KeyLeft
39 -> KeyRight
13 -> KeyRet
... | 387 | true | true | 0 | 16 | 273 | 108 | 52 | 56 | null | null |
brendanhay/khan | khan/Khan/Internal/Options.hs | mpl-2.0 | pathOption :: String
-> Mod OptionFields FilePath
-> String
-> Parser FilePath
pathOption key = customOption key "PATH" (Right . Path.decodeString) | 180 | pathOption :: String
-> Mod OptionFields FilePath
-> String
-> Parser FilePath
pathOption key = customOption key "PATH" (Right . Path.decodeString) | 180 | pathOption key = customOption key "PATH" (Right . Path.decodeString) | 68 | false | true | 0 | 8 | 53 | 50 | 24 | 26 | null | null |
dehun/bce | src/Bce/DbFs.hs | mit | getNextDifficulity :: Db -> IO Difficulity
getNextDifficulity db = Lock.with (dbLock db) $ do
blocks <- lastNBlocks db difficulityRecalculationBlocks
return $ nextDifficulity $ map verifiedBlock blocks | 205 | getNextDifficulity :: Db -> IO Difficulity
getNextDifficulity db = Lock.with (dbLock db) $ do
blocks <- lastNBlocks db difficulityRecalculationBlocks
return $ nextDifficulity $ map verifiedBlock blocks | 205 | getNextDifficulity db = Lock.with (dbLock db) $ do
blocks <- lastNBlocks db difficulityRecalculationBlocks
return $ nextDifficulity $ map verifiedBlock blocks | 162 | false | true | 0 | 9 | 29 | 64 | 29 | 35 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getContractSeenStream :: KRPCHS.SpaceCenter.Contract -> RPCContext (KRPCStream (Bool))
getContractSeenStream thisArg = requestStream $ getContractSeenStreamReq thisArg | 167 | getContractSeenStream :: KRPCHS.SpaceCenter.Contract -> RPCContext (KRPCStream (Bool))
getContractSeenStream thisArg = requestStream $ getContractSeenStreamReq thisArg | 167 | getContractSeenStream thisArg = requestStream $ getContractSeenStreamReq thisArg | 80 | false | true | 0 | 10 | 13 | 44 | 21 | 23 | null | null |
fferreira/hnh | CodeGen.hs | gpl-3.0 | getCVar :: Identifier -> State CodeGenSt CVar
getCVar i =
do CodeGenSt _ dict _<- get
case lookup i dict of
Nothing -> error ("CodeGen Error: " ++ show i ++ " not found!")
Just v -> return v | 213 | getCVar :: Identifier -> State CodeGenSt CVar
getCVar i =
do CodeGenSt _ dict _<- get
case lookup i dict of
Nothing -> error ("CodeGen Error: " ++ show i ++ " not found!")
Just v -> return v | 213 | getCVar i =
do CodeGenSt _ dict _<- get
case lookup i dict of
Nothing -> error ("CodeGen Error: " ++ show i ++ " not found!")
Just v -> return v | 167 | false | true | 0 | 14 | 61 | 84 | 38 | 46 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2016/M12/D13/Solution.hs | mit | sorter :: Ord b => (a,b) -> (a,b) -> Ordering
sorter = compare `on` Down . snd | 78 | sorter :: Ord b => (a,b) -> (a,b) -> Ordering
sorter = compare `on` Down . snd | 78 | sorter = compare `on` Down . snd | 32 | false | true | 0 | 8 | 16 | 48 | 27 | 21 | null | null |
sfultong/stand-in-language | src/SIL/TypeChecker.hs | apache-2.0 | associateVar :: PartialType -> PartialType -> AnnotateState ()
associateVar a b = state $ \(env, typeMap, v, err)
-> case (checkOrAssociate a b Set.empty typeMap, err) of
(Right tm, _) -> traceAssociate a b $ ((), (env, tm, v, err))
(Left err1, Just err2) | err1 < err2 -> ((), (env, typeMap, v, err))
... | 1,044 | associateVar :: PartialType -> PartialType -> AnnotateState ()
associateVar a b = state $ \(env, typeMap, v, err)
-> case (checkOrAssociate a b Set.empty typeMap, err) of
(Right tm, _) -> traceAssociate a b $ ((), (env, tm, v, err))
(Left err1, Just err2) | err1 < err2 -> ((), (env, typeMap, v, err))
... | 1,044 | associateVar a b = state $ \(env, typeMap, v, err)
-> case (checkOrAssociate a b Set.empty typeMap, err) of
(Right tm, _) -> traceAssociate a b $ ((), (env, tm, v, err))
(Left err1, Just err2) | err1 < err2 -> ((), (env, typeMap, v, err))
(Left te, _) -> traceAssociate a b $ ((), (env, typeMap, v... | 981 | false | true | 0 | 14 | 212 | 217 | 118 | 99 | null | null |
thekafkaf/brolang | src/Lexer.hs | mit | reservedOp = Tok.reservedOp lexer | 33 | reservedOp = Tok.reservedOp lexer | 33 | reservedOp = Tok.reservedOp lexer | 33 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
tsahyt/clingo-haskell | src/Clingo/Internal/Types.hs | mit | negateTruth TruthTrue = TruthFalse | 34 | negateTruth TruthTrue = TruthFalse | 34 | negateTruth TruthTrue = TruthFalse | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
individkid/sidegeo | src/AffTopo/Naive.hs | gpl-3.0 | placeToSpace :: Place -> Space
placeToSpace = range | 51 | placeToSpace :: Place -> Space
placeToSpace = range | 51 | placeToSpace = range | 20 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
christiaanb/ghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | label_default join_lbl (Just code)
= do lbl <- label_code join_lbl code
return (Just lbl)
-------------- | 114 | label_default join_lbl (Just code)
= do lbl <- label_code join_lbl code
return (Just lbl)
-------------- | 114 | label_default join_lbl (Just code)
= do lbl <- label_code join_lbl code
return (Just lbl)
-------------- | 114 | false | false | 0 | 9 | 24 | 43 | 19 | 24 | null | null |
dylanmann/CurriersOfCatan | src/Actions.hs | gpl-3.0 | movePendingCards :: MyState ()
movePendingCards = do
g@Game{..} <- S.get
let newPs = updPlayer
(\p -> p {cards = cards p ++ pendingCards}) currentPlayer players
S.put(g {players = newPs, pendingCards = []})
-- | buys a card and places it in the player's pending cards | 304 | movePendingCards :: MyState ()
movePendingCards = do
g@Game{..} <- S.get
let newPs = updPlayer
(\p -> p {cards = cards p ++ pendingCards}) currentPlayer players
S.put(g {players = newPs, pendingCards = []})
-- | buys a card and places it in the player's pending cards | 303 | movePendingCards = do
g@Game{..} <- S.get
let newPs = updPlayer
(\p -> p {cards = cards p ++ pendingCards}) currentPlayer players
S.put(g {players = newPs, pendingCards = []})
-- | buys a card and places it in the player's pending cards | 272 | false | true | 0 | 16 | 81 | 101 | 53 | 48 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/Types.hs | apache-2.0 | jobject = ObjectType jlObject | 29 | jobject = ObjectType jlObject | 29 | jobject = ObjectType jlObject | 29 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
vladfi1/hs-misc | JavaTH.hs | mit | searchInfo info = fail (show info) | 34 | searchInfo info = fail (show info) | 34 | searchInfo info = fail (show info) | 34 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsBinds.hs | bsd-3-clause | hsSigDoc (FixSig {}) = ptext (sLit "fixity declaration") | 67 | hsSigDoc (FixSig {}) = ptext (sLit "fixity declaration") | 67 | hsSigDoc (FixSig {}) = ptext (sLit "fixity declaration") | 67 | false | false | 0 | 7 | 18 | 25 | 12 | 13 | null | null |
frankhucek/Todo | app/Types.hs | bsd-3-clause | quickItemSort (x:xs) = quickItemSort [ a | a <- xs, priority a <= priority x ] -- <=
++ [x]
++ quickItemSort [a | a <- xs, priority a > priority x] | 193 | quickItemSort (x:xs) = quickItemSort [ a | a <- xs, priority a <= priority x ] -- <=
++ [x]
++ quickItemSort [a | a <- xs, priority a > priority x] | 193 | quickItemSort (x:xs) = quickItemSort [ a | a <- xs, priority a <= priority x ] -- <=
++ [x]
++ quickItemSort [a | a <- xs, priority a > priority x] | 193 | false | false | 0 | 11 | 77 | 84 | 41 | 43 | null | null |
spechub/Hets | Common/Doc.hs | gpl-2.0 | -- | add global annotations for proper mixfix printing
changeGlobalAnnos :: (GlobalAnnos -> GlobalAnnos) -> Doc -> Doc
changeGlobalAnnos = ChangeGlobalAnnos | 156 | changeGlobalAnnos :: (GlobalAnnos -> GlobalAnnos) -> Doc -> Doc
changeGlobalAnnos = ChangeGlobalAnnos | 101 | changeGlobalAnnos = ChangeGlobalAnnos | 37 | true | true | 0 | 8 | 20 | 34 | 16 | 18 | null | null |
brendanhay/gogol | gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/List.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
olUploadType :: Lens' OperationsList (Maybe Text)
olUploadType
= lens _olUploadType (\ s a -> s{_olUploadType = a}) | 188 | olUploadType :: Lens' OperationsList (Maybe Text)
olUploadType
= lens _olUploadType (\ s a -> s{_olUploadType = a}) | 117 | olUploadType
= lens _olUploadType (\ s a -> s{_olUploadType = a}) | 67 | true | true | 1 | 9 | 28 | 52 | 25 | 27 | null | null |
ddssff/pretty-listlike | src/Text/PrettyPrint/HughesPJ.hs | bsd-3-clause | txtPrinter (Str s1) s2 = LL.fromListLike s1 `mappend` s2 | 57 | txtPrinter (Str s1) s2 = LL.fromListLike s1 `mappend` s2 | 57 | txtPrinter (Str s1) s2 = LL.fromListLike s1 `mappend` s2 | 57 | false | false | 0 | 7 | 9 | 28 | 14 | 14 | null | null |
ulricha/algebra-sql | src/Database/Algebra/SQL/Query/Substitution.hs | bsd-3-clause | replaceReferencesAggrExpr :: SubstitutionFunction
-> Q.AggrExpr
-> Q.AggrExpr
replaceReferencesAggrExpr r (Q.AEBase v) =
Q.AEBase $ replaceReferencesValueExprTemplate replaceReferencesAggrExpr
r
... | 359 | replaceReferencesAggrExpr :: SubstitutionFunction
-> Q.AggrExpr
-> Q.AggrExpr
replaceReferencesAggrExpr r (Q.AEBase v) =
Q.AEBase $ replaceReferencesValueExprTemplate replaceReferencesAggrExpr
r
... | 359 | replaceReferencesAggrExpr r (Q.AEBase v) =
Q.AEBase $ replaceReferencesValueExprTemplate replaceReferencesAggrExpr
r
v | 229 | false | true | 2 | 11 | 180 | 55 | 25 | 30 | null | null |
ghcjs/ghcjs | src/Gen2/GHC/Digraph.hs | mit | ransposeG :: Graph node -> Graph node
transposeG graph = Graph (G.transposeG (gr_int_graph graph))
(gr_vertex_to_node graph)
(gr_node_to_vertex graph)
| 201 | transposeG :: Graph node -> Graph node
transposeG graph = Graph (G.transposeG (gr_int_graph graph))
(gr_vertex_to_node graph)
(gr_node_to_vertex graph) | 201 | transposeG graph = Graph (G.transposeG (gr_int_graph graph))
(gr_vertex_to_node graph)
(gr_node_to_vertex graph) | 162 | false | true | 0 | 9 | 68 | 57 | 27 | 30 | null | null |
facebook/fbthrift | thrift/lib/hs/Thrift/Protocol/Binary.hs | apache-2.0 | parseBinaryValue T_FLOAT = TFloat . bsToFloating byteSwap32 <$> P.take 4 | 72 | parseBinaryValue T_FLOAT = TFloat . bsToFloating byteSwap32 <$> P.take 4 | 72 | parseBinaryValue T_FLOAT = TFloat . bsToFloating byteSwap32 <$> P.take 4 | 72 | false | false | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
danr/hipspec | testsuite/prod/Properties.hs | gpl-3.0 | prop_T38 :: Nat -> [Nat] -> [Nat] -> Prop Bool
prop_T38 x y z = givenBool (x `elem` y)
( givenBool (x `elem` z)
( proveBool (x `elem` (y ++ z)))) | 175 | prop_T38 :: Nat -> [Nat] -> [Nat] -> Prop Bool
prop_T38 x y z = givenBool (x `elem` y)
( givenBool (x `elem` z)
( proveBool (x `elem` (y ++ z)))) | 175 | prop_T38 x y z = givenBool (x `elem` y)
( givenBool (x `elem` z)
( proveBool (x `elem` (y ++ z)))) | 128 | false | true | 0 | 13 | 60 | 98 | 52 | 46 | null | null |
brendanhay/gogol | gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/Operations/List.hs | mpl-2.0 | -- | The standard list filter.
pidolFilter :: Lens' ProjectsInstancesDatabasesOperationsList (Maybe Text)
pidolFilter
= lens _pidolFilter (\ s a -> s{_pidolFilter = a}) | 170 | pidolFilter :: Lens' ProjectsInstancesDatabasesOperationsList (Maybe Text)
pidolFilter
= lens _pidolFilter (\ s a -> s{_pidolFilter = a}) | 139 | pidolFilter
= lens _pidolFilter (\ s a -> s{_pidolFilter = a}) | 64 | true | true | 0 | 9 | 24 | 48 | 25 | 23 | null | null |
hvr/text | tests/Tests/Properties.hs | bsd-2-clause | tl_scanl f z = L.scanl f z `eqP` (unpackS . TL.scanl f z) | 64 | tl_scanl f z = L.scanl f z `eqP` (unpackS . TL.scanl f z) | 64 | tl_scanl f z = L.scanl f z `eqP` (unpackS . TL.scanl f z) | 64 | false | false | 0 | 9 | 19 | 38 | 19 | 19 | null | null |
meteogrid/mime-mail-parser | Network/Mail/Mime/Parser/Internal/Rfc2822.hs | bsd-3-clause | cfws :: Parser ByteString
cfws = do r <- many1 $ choice [ fws, comment ]
return (S.concat r)
-- ** Atom (section 3.2.4)
-- |Match any US-ASCII character except for control characters,
-- 'specials', or space. 'atom' and 'dot_atom' are made up of this. | 296 | cfws :: Parser ByteString
cfws = do r <- many1 $ choice [ fws, comment ]
return (S.concat r)
-- ** Atom (section 3.2.4)
-- |Match any US-ASCII character except for control characters,
-- 'specials', or space. 'atom' and 'dot_atom' are made up of this. | 296 | cfws = do r <- many1 $ choice [ fws, comment ]
return (S.concat r)
-- ** Atom (section 3.2.4)
-- |Match any US-ASCII character except for control characters,
-- 'specials', or space. 'atom' and 'dot_atom' are made up of this. | 259 | false | true | 0 | 10 | 89 | 51 | 26 | 25 | null | null |
timds/adjourn | tests/Adjrn/ParseSpec.hs | bsd-3-clause | stripSeconds :: LocalTime -> LocalTime
stripSeconds lt = lt {localTimeOfDay = (localTimeOfDay lt) {todSec=0}} | 109 | stripSeconds :: LocalTime -> LocalTime
stripSeconds lt = lt {localTimeOfDay = (localTimeOfDay lt) {todSec=0}} | 109 | stripSeconds lt = lt {localTimeOfDay = (localTimeOfDay lt) {todSec=0}} | 70 | false | true | 0 | 9 | 13 | 40 | 22 | 18 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.