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
RoboNickBot/linked-list-web-demo
src/Demo/JS.hs
bsd-2-clause
printLowError = printError "lowError" "#c"
42
printLowError = printError "lowError" "#c"
42
printLowError = printError "lowError" "#c"
42
false
false
1
5
4
14
5
9
null
null
tabemann/amphibian
src/Network/IRC/Client/Amphibian/ServerReplies.hs
bsd-3-clause
rpl_USERS :: B.ByteString rpl_USERS = encodeUtf8 "393"
54
rpl_USERS :: B.ByteString rpl_USERS = encodeUtf8 "393"
54
rpl_USERS = encodeUtf8 "393"
28
false
true
0
5
6
16
8
8
null
null
akru/haste-compiler
libraries/haste-lib/src/Haste/DOM/Core.hs
bsd-3-clause
-- | Get the last of an element's children. getLastChild :: (IsElem e, MonadIO m) => e -> m (Maybe Elem) getLastChild e = liftIO $ fromPtr `fmap` jsGetLastChild (elemOf e)
171
getLastChild :: (IsElem e, MonadIO m) => e -> m (Maybe Elem) getLastChild e = liftIO $ fromPtr `fmap` jsGetLastChild (elemOf e)
127
getLastChild e = liftIO $ fromPtr `fmap` jsGetLastChild (elemOf e)
66
true
true
0
9
30
62
32
30
null
null
goldfirere/glambda
src/Language/Glambda/Type.hs
bsd-3-clause
unrefineTy SBoolTy = BoolTy
36
unrefineTy SBoolTy = BoolTy
36
unrefineTy SBoolTy = BoolTy
36
false
false
0
5
12
9
4
5
null
null
rahulmutt/ghcvm
compiler/Eta/CodeGen/Rts.hs
bsd-3-clause
stgArray = io "Array"
26
stgArray = io "Array"
26
stgArray = io "Array"
26
false
false
0
5
8
9
4
5
null
null
flowbox-public/ghcjs
src/Gen2/DynamicLinking.hs
mit
link' :: GhcjsSettings -> [FilePath] -- extra js files -> Bool -- building JavaScript -> DynFlags -- dynamic flags -> Bool -- attempt linking in batch mode? -> HomePackageTable -- what to link -> IO SuccessFlag ...
2,815
link' :: GhcjsSettings -> [FilePath] -- extra js files -> Bool -- building JavaScript -> DynFlags -- dynamic flags -> Bool -- attempt linking in batch mode? -> HomePackageTable -- what to link -> IO SuccessFlag ...
2,814
link' settings extraJs buildJs dflags batch_attempt_linking hpt | batch_attempt_linking = do let staticLink = case ghcLink dflags of LinkStaticLib -> True _ -> platformBinariesAreStaticLibs (targetPlatform dflags) home_mod_infos ...
2,494
false
true
0
23
985
573
271
302
null
null
vTurbine/ghc
compiler/types/Type.hs
bsd-3-clause
-- | Extract the RuntimeRep classifier of a type from its kind. -- For example, getRuntimeRepFromKind * = PtrRepLifted; -- getRuntimeRepFromKind # = PtrRepUnlifted. -- Panics if this is not possible. getRuntimeRepFromKind :: String -- ^ Printed in case of an error -> Type -> Type get...
636
getRuntimeRepFromKind :: String -- ^ Printed in case of an error -> Type -> Type getRuntimeRepFromKind err = go where go k | Just k' <- coreViewOneStarKind k = go k' go k | Just (tc, [arg]) <- splitTyConApp_maybe k , tc `hasKey` tYPETyConKey = arg go k = pprPanic "...
423
getRuntimeRepFromKind err = go where go k | Just k' <- coreViewOneStarKind k = go k' go k | Just (tc, [arg]) <- splitTyConApp_maybe k , tc `hasKey` tYPETyConKey = arg go k = pprPanic "getRuntimeRep" (text err $$ ppr k <+> dcolon <+> ppr (typeKind k))
319
true
true
1
11
197
141
70
71
null
null
Raveline/lambdacula
src/Lambdacula/Flow.hs
gpl-3.0
getPotentialAction :: String -- The main object -> Action -- The action -> Maybe String -- Potential interaction -> WorldAction getPotentialAction obj act comp = do objs <- localScope ...
523
getPotentialAction :: String -- The main object -> Action -- The action -> Maybe String -- Potential interaction -> WorldAction getPotentialAction obj act comp = do objs <- localScope ...
522
getPotentialAction obj act comp = do objs <- localScope case findObjectInteraction obj objs act comp of Left xs -> return xs Right trio -> processAction trio
309
false
true
0
11
283
89
40
49
null
null
google/hs-dependent-literals
dependent-literals-plugin/tests/WithNegativeLiterals.hs
apache-2.0
x2 :: Int32 x2 = -2147483648
28
x2 :: Int32 x2 = -2147483648
28
x2 = -2147483648
16
false
true
0
6
5
19
8
11
null
null
keithodulaigh/Hets
Common/AnnoParser.hs
gpl-2.0
dispSymb :: (Display_format, String) -> GenParser Char st (Display_format, String) dispSymb (dfSymb, symb) = do tryString (percentS ++ symb) << spaces str <- manyTill anyChar $ lookAhead $ charOrEof '%' return (dfSymb, trimRight str)
249
dispSymb :: (Display_format, String) -> GenParser Char st (Display_format, String) dispSymb (dfSymb, symb) = do tryString (percentS ++ symb) << spaces str <- manyTill anyChar $ lookAhead $ charOrEof '%' return (dfSymb, trimRight str)
249
dispSymb (dfSymb, symb) = do tryString (percentS ++ symb) << spaces str <- manyTill anyChar $ lookAhead $ charOrEof '%' return (dfSymb, trimRight str)
156
false
true
0
11
49
101
49
52
null
null
DataStewardshipPortal/ds-elixir-cz
Server/app/Model/Result.hs
apache-2.0
insertResult :: Respondent -> Text -> Maybe Text -> Maybe Text -> PG.Connection -> IO Int insertResult respondent name1 text1 value1 conn = do r <- PG.query conn "INSERT INTO \"Results\" (respondent_id, name, text, value) VALUES (?, ?, ?, ?) RETURNING id" (R.id respondent, name1, text1, value1) :: IO [PG.Onl...
437
insertResult :: Respondent -> Text -> Maybe Text -> Maybe Text -> PG.Connection -> IO Int insertResult respondent name1 text1 value1 conn = do r <- PG.query conn "INSERT INTO \"Results\" (respondent_id, name, text, value) VALUES (?, ?, ?, ?) RETURNING id" (R.id respondent, name1, text1, value1) :: IO [PG.Onl...
437
insertResult respondent name1 text1 value1 conn = do r <- PG.query conn "INSERT INTO \"Results\" (respondent_id, name, text, value) VALUES (?, ?, ?, ?) RETURNING id" (R.id respondent, name1, text1, value1) :: IO [PG.Only Int] let x = case r of (f:_) -> f [] -> PG.Only 0 let...
347
false
true
0
14
118
163
78
85
null
null
jmitchell/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
declared (PParams _ _ ds) = concatMap declared ds
49
declared (PParams _ _ ds) = concatMap declared ds
49
declared (PParams _ _ ds) = concatMap declared ds
49
false
false
0
7
8
24
11
13
null
null
termite2/tsl
Frontend/StatementOps.hs
bsd-3-clause
statFlatten' :: (?spec::Spec) => IID -> Scope -> Statement -> Statement statFlatten' iid s st = statFlatten'' iid s $ st{stLab = fmap (\l -> itreeFlattenName iid l) $ stLab st}
176
statFlatten' :: (?spec::Spec) => IID -> Scope -> Statement -> Statement statFlatten' iid s st = statFlatten'' iid s $ st{stLab = fmap (\l -> itreeFlattenName iid l) $ stLab st}
176
statFlatten' iid s st = statFlatten'' iid s $ st{stLab = fmap (\l -> itreeFlattenName iid l) $ stLab st}
104
false
true
0
12
30
79
41
38
null
null
yesodweb/yesod
yesod/Yesod/Default/Config2.hs
mit
-- | Location of the default config file. configSettingsYml :: FilePath configSettingsYml = "config/settings.yml"
113
configSettingsYml :: FilePath configSettingsYml = "config/settings.yml"
71
configSettingsYml = "config/settings.yml"
41
true
true
0
4
13
12
7
5
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_AU3_SPECIAL :: Int wxSTC_AU3_SPECIAL = 12
47
wxSTC_AU3_SPECIAL :: Int wxSTC_AU3_SPECIAL = 12
47
wxSTC_AU3_SPECIAL = 12
22
false
true
0
6
5
18
7
11
null
null
apyrgio/ganeti
src/Ganeti/Metad/WebServer.hs
bsd-2-clause
handleMetadata params GET "ganeti" "latest" "os/os-install-package" = do remoteAddr <- ByteString.unpack . rqRemoteAddr <$> getRequest instanceParams <- liftIO $ do Logging.logInfo $ "OS install package for " ++ show remoteAddr readMVar params serveOsPackage remoteAddr instanceParams "os-inst...
484
handleMetadata params GET "ganeti" "latest" "os/os-install-package" = do remoteAddr <- ByteString.unpack . rqRemoteAddr <$> getRequest instanceParams <- liftIO $ do Logging.logInfo $ "OS install package for " ++ show remoteAddr readMVar params serveOsPackage remoteAddr instanceParams "os-inst...
484
handleMetadata params GET "ganeti" "latest" "os/os-install-package" = do remoteAddr <- ByteString.unpack . rqRemoteAddr <$> getRequest instanceParams <- liftIO $ do Logging.logInfo $ "OS install package for " ++ show remoteAddr readMVar params serveOsPackage remoteAddr instanceParams "os-inst...
484
false
false
0
14
123
108
50
58
null
null
wxwxwwxxx/ghc
utils/describe-unexpected/describe-unexpected.hs
bsd-3-clause
breakTests :: [String] -> [[String]] breakTests xs = splitStarting ("=====> " `isPrefixOf`) -- Ignore lines telling us that we're running a .T file: $ filter (not . ("====> Running " `isPrefixOf`)) xs
230
breakTests :: [String] -> [[String]] breakTests xs = splitStarting ("=====> " `isPrefixOf`) -- Ignore lines telling us that we're running a .T file: $ filter (not . ("====> Running " `isPrefixOf`)) xs
230
breakTests xs = splitStarting ("=====> " `isPrefixOf`) -- Ignore lines telling us that we're running a .T file: $ filter (not . ("====> Running " `isPrefixOf`)) xs
193
false
true
2
9
61
66
36
30
null
null
massysett/cartel
cartel/tests/Cartel/Generators.hs
bsd-3-clause
genMainIs :: BuildsExe a => Gen a genMainIs = fmap mainIs genNonEmptyString
75
genMainIs :: BuildsExe a => Gen a genMainIs = fmap mainIs genNonEmptyString
75
genMainIs = fmap mainIs genNonEmptyString
41
false
true
0
7
11
33
13
20
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_VOLAPUK :: Int wxLANGUAGE_VOLAPUK = 222
50
wxLANGUAGE_VOLAPUK :: Int wxLANGUAGE_VOLAPUK = 222
50
wxLANGUAGE_VOLAPUK = 222
24
false
true
0
4
5
11
6
5
null
null
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/ListVirtualMFADevices.hs
mpl-2.0
-- | Creates a value of 'ListVirtualMFADevicesResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'lvmdrsMarker' -- -- * 'lvmdrsIsTruncated' -- -- * 'lvmdrsResponseStatus' -- -- * 'lvmdrsVirtualMFADevices' listVirtualMFADevicesRe...
644
listVirtualMFADevicesResponse :: Int -- ^ 'lvmdrsResponseStatus' -> ListVirtualMFADevicesResponse listVirtualMFADevicesResponse pResponseStatus_ = ListVirtualMFADevicesResponse' { _lvmdrsMarker = Nothing , _lvmdrsIsTruncated = Nothing , _lvmdrsResponseStatus = pResponseStatus_ , _lvmdrsVirtu...
347
listVirtualMFADevicesResponse pResponseStatus_ = ListVirtualMFADevicesResponse' { _lvmdrsMarker = Nothing , _lvmdrsIsTruncated = Nothing , _lvmdrsResponseStatus = pResponseStatus_ , _lvmdrsVirtualMFADevices = mempty }
241
true
true
0
6
106
56
38
18
null
null
termite2/bv
BV/Canonize.hs
bsd-3-clause
catomsSliceVars as (v:vs) = case eas' of Left b -> (Left b, (map (v,) ss)) Right _ -> (as'', (map (v,) ss) ++ vs') where (eas', ss) = catomsSliceVar as v (as'', vs') = catomsSliceVars (fromRight eas') vs
285
catomsSliceVars as (v:vs) = case eas' of Left b -> (Left b, (map (v,) ss)) Right _ -> (as'', (map (v,) ss) ++ vs') where (eas', ss) = catomsSliceVar as v (as'', vs') = catomsSliceVars (fromRight eas') vs
285
catomsSliceVars as (v:vs) = case eas' of Left b -> (Left b, (map (v,) ss)) Right _ -> (as'', (map (v,) ss) ++ vs') where (eas', ss) = catomsSliceVar as v (as'', vs') = catomsSliceVars (fromRight eas') vs
285
false
false
0
12
119
125
66
59
null
null
oldmanmike/ghc
compiler/codeGen/StgCmmEnv.hs
bsd-3-clause
lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo lneIdInfo dflags id regs = CgIdInfo { cg_id = id, cg_lf = lf , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) } where lf = mkLFLetNoEscape blk_id = mkBlockId (idUnique id)
260
lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo lneIdInfo dflags id regs = CgIdInfo { cg_id = id, cg_lf = lf , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) } where lf = mkLFLetNoEscape blk_id = mkBlockId (idUnique id)
260
lneIdInfo dflags id regs = CgIdInfo { cg_id = id, cg_lf = lf , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) } where lf = mkLFLetNoEscape blk_id = mkBlockId (idUnique id)
204
false
true
0
11
70
97
51
46
null
null
ksaveljev/chip-8-emulator
Chip8/Emulator.hs
mit
execute (LDRDT vx) = do v <- load $ Register DT store (Register vx) v
77
execute (LDRDT vx) = do v <- load $ Register DT store (Register vx) v
77
execute (LDRDT vx) = do v <- load $ Register DT store (Register vx) v
77
false
false
0
9
22
43
19
24
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readCaseClause4 = isOk readCaseClause "case foo\n in *) echo bar ;& bar) foo; esac"
88
prop_readCaseClause4 = isOk readCaseClause "case foo\n in *) echo bar ;& bar) foo; esac"
88
prop_readCaseClause4 = isOk readCaseClause "case foo\n in *) echo bar ;& bar) foo; esac"
88
false
false
1
5
13
14
5
9
null
null
ababkin/partial_inspector
src/Vim/Netbeans/Protocol.hs
mit
newDotAndMarkParser :: BufId -> Parser VimMessage newDotAndMarkParser bufId = do string "newDotAndMark=" seqNo <- parseNumber char ' ' off1 <- parseNumber char ' ' off2 <- parseNumber return $ EventMessage bufId seqNo $ NewDotAndMark off1 off2
271
newDotAndMarkParser :: BufId -> Parser VimMessage newDotAndMarkParser bufId = do string "newDotAndMark=" seqNo <- parseNumber char ' ' off1 <- parseNumber char ' ' off2 <- parseNumber return $ EventMessage bufId seqNo $ NewDotAndMark off1 off2
271
newDotAndMarkParser bufId = do string "newDotAndMark=" seqNo <- parseNumber char ' ' off1 <- parseNumber char ' ' off2 <- parseNumber return $ EventMessage bufId seqNo $ NewDotAndMark off1 off2
221
false
true
0
10
63
86
35
51
null
null
kaaveland/haskell-base85
tests/RunTests.hs
bsd-3-clause
rfc1924Tests :: Test rfc1924Tests = testGroup "rfc1924" [ testCase "length(TT)" $ assertEqual "length" 85 $ length rfc1924Alphabet , testCase "printable" $ assertBool "alphabet is not printable" (all isPrint rfc1924String) , testCase "ascii" $ assertBool "alphabet contains non-ascii chars" (all isAscii r...
334
rfc1924Tests :: Test rfc1924Tests = testGroup "rfc1924" [ testCase "length(TT)" $ assertEqual "length" 85 $ length rfc1924Alphabet , testCase "printable" $ assertBool "alphabet is not printable" (all isPrint rfc1924String) , testCase "ascii" $ assertBool "alphabet contains non-ascii chars" (all isAscii r...
334
rfc1924Tests = testGroup "rfc1924" [ testCase "length(TT)" $ assertEqual "length" 85 $ length rfc1924Alphabet , testCase "printable" $ assertBool "alphabet is not printable" (all isPrint rfc1924String) , testCase "ascii" $ assertBool "alphabet contains non-ascii chars" (all isAscii rfc1924String)]
313
false
true
0
9
55
85
40
45
null
null
pikajude/mono-traversable
src/Data/Sequences.hs
mit
-- | Sort a vector. vectorSort :: (VG.Vector v e, Ord e) => v e -> v e vectorSort = VG.modify VAM.sort
102
vectorSort :: (VG.Vector v e, Ord e) => v e -> v e vectorSort = VG.modify VAM.sort
82
vectorSort = VG.modify VAM.sort
31
true
true
0
7
21
48
24
24
null
null
tjakway/ghcjvm
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
typeArgRep :: Type -> ArgRep typeArgRep = toArgRep . typePrimRep
64
typeArgRep :: Type -> ArgRep typeArgRep = toArgRep . typePrimRep
64
typeArgRep = toArgRep . typePrimRep
35
false
true
0
5
9
19
10
9
null
null
byorgey/Idris-dev
src/Idris/ElabTerm.hs
bsd-3-clause
reifyRawApp :: Name -> [Term] -> ElabD Raw reifyRawApp t [n] | t == reflm "Var" = liftM Var (reifyTTName n)
119
reifyRawApp :: Name -> [Term] -> ElabD Raw reifyRawApp t [n] | t == reflm "Var" = liftM Var (reifyTTName n)
119
reifyRawApp t [n] | t == reflm "Var" = liftM Var (reifyTTName n)
76
false
true
0
9
32
57
27
30
null
null
mkloczko/derive-storable-plugin
src/Foreign/Storable/Generic/Plugin.hs
mit
setOpts flags opt = flags
43
setOpts flags opt = flags
43
setOpts flags opt = flags
43
false
false
0
5
22
11
5
6
null
null
wxwxwwxxx/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkWantedEvBind :: EvVar -> EvTerm -> EvBind mkWantedEvBind ev tm = EvBind { eb_is_given = False, eb_lhs = ev, eb_rhs = tm }
123
mkWantedEvBind :: EvVar -> EvTerm -> EvBind mkWantedEvBind ev tm = EvBind { eb_is_given = False, eb_lhs = ev, eb_rhs = tm }
123
mkWantedEvBind ev tm = EvBind { eb_is_given = False, eb_lhs = ev, eb_rhs = tm }
79
false
true
0
8
22
53
27
26
null
null
clample/lamdabtc
backend/src/BitcoinCore/BlockHeaders.hs
bsd-3-clause
nextHeader :: BlockHeader -> Gen BlockHeader nextHeader h = BlockHeader <$> arbitrary <*> pure (hashBlock h) <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
178
nextHeader :: BlockHeader -> Gen BlockHeader nextHeader h = BlockHeader <$> arbitrary <*> pure (hashBlock h) <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
178
nextHeader h = BlockHeader <$> arbitrary <*> pure (hashBlock h) <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
133
false
true
17
7
37
71
36
35
null
null
aelve/hslibs
src/Guide/State.hs
bsd-3-clause
restoreCategory :: Uid Category -> Int -> Acid.Update GlobalState (Either String ()) restoreCategory catId pos = do deleted <- use categoriesDeleted case find (hasUid catId) deleted of Nothing -> return (Left "category not found in deleted categories") Just category -> do categoriesDeleted %= deleteFi...
417
restoreCategory :: Uid Category -> Int -> Acid.Update GlobalState (Either String ()) restoreCategory catId pos = do deleted <- use categoriesDeleted case find (hasUid catId) deleted of Nothing -> return (Left "category not found in deleted categories") Just category -> do categoriesDeleted %= deleteFi...
417
restoreCategory catId pos = do deleted <- use categoriesDeleted case find (hasUid catId) deleted of Nothing -> return (Left "category not found in deleted categories") Just category -> do categoriesDeleted %= deleteFirst (hasUid catId) categories %= insertOrAppend pos category retur...
332
false
true
0
15
90
138
62
76
null
null
amccausl/Swish
Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs
lgpl-2.1
testVarModifyDivMod05 = testVmod4 "testVarModifyDivMod05" (getDTMod dmodXsdIntegerDivMod rdfDatatypeValXsdInteger) [makeBVI [("c","-7"),("d","-3")]] [makeBVI [("a","2"),("b","-1"),("c","-7"),("d","-3")]]
267
testVarModifyDivMod05 = testVmod4 "testVarModifyDivMod05" (getDTMod dmodXsdIntegerDivMod rdfDatatypeValXsdInteger) [makeBVI [("c","-7"),("d","-3")]] [makeBVI [("a","2"),("b","-1"),("c","-7"),("d","-3")]]
267
testVarModifyDivMod05 = testVmod4 "testVarModifyDivMod05" (getDTMod dmodXsdIntegerDivMod rdfDatatypeValXsdInteger) [makeBVI [("c","-7"),("d","-3")]] [makeBVI [("a","2"),("b","-1"),("c","-7"),("d","-3")]]
267
false
false
0
9
74
89
53
36
null
null
VDBWRAIR/Haskell-MAAPs
test/Spec.hs
bsd-3-clause
prop_stop_codons_are_toGened :: Codon -> Index -> Property prop_stop_codons_are_toGened c@(Codon nts) i = (toDegen c [Z] i) === (StopCodon Z i c [])
148
prop_stop_codons_are_toGened :: Codon -> Index -> Property prop_stop_codons_are_toGened c@(Codon nts) i = (toDegen c [Z] i) === (StopCodon Z i c [])
148
prop_stop_codons_are_toGened c@(Codon nts) i = (toDegen c [Z] i) === (StopCodon Z i c [])
89
false
true
0
8
21
64
33
31
null
null
ezyang/ghc
compiler/nativeGen/SPARC/CodeGen.hs
bsd-3-clause
genCCall (PrimTarget (MO_Prefetch_Data _)) _ _ = return $ nilOL
64
genCCall (PrimTarget (MO_Prefetch_Data _)) _ _ = return $ nilOL
64
genCCall (PrimTarget (MO_Prefetch_Data _)) _ _ = return $ nilOL
64
false
false
0
9
10
29
14
15
null
null
m4dc4p/haskelldb
test/TestCases.hs
bsd-3-clause
testBracketing1 = noDBTest "Testing that properly bracketed SQL is generated (1)." $ do let qryTxt = showSql $ do s <- table int_tbl restrict (((s ! TInt.f02 .==. s ! TInt.f02) .&&. (s ! TInt.f02 .==. s ! TInt.f02)) .||. ((s ! TInt.f02 .==. s ! TInt.f02) .&&...
637
testBracketing1 = noDBTest "Testing that properly bracketed SQL is generated (1)." $ do let qryTxt = showSql $ do s <- table int_tbl restrict (((s ! TInt.f02 .==. s ! TInt.f02) .&&. (s ! TInt.f02 .==. s ! TInt.f02)) .||. ((s ! TInt.f02 .==. s ! TInt.f02) .&&...
637
testBracketing1 = noDBTest "Testing that properly bracketed SQL is generated (1)." $ do let qryTxt = showSql $ do s <- table int_tbl restrict (((s ! TInt.f02 .==. s ! TInt.f02) .&&. (s ! TInt.f02 .==. s ! TInt.f02)) .||. ((s ! TInt.f02 .==. s ! TInt.f02) .&&...
637
false
false
0
23
213
176
88
88
null
null
hephaestus-pl/hephaestus
alexandre/feature-modeling/samples/newTypes/FMMobile.hs
mit
fMP3 = BasicFeature "mp3" "MP3" Optional Basic Green
60
fMP3 = BasicFeature "mp3" "MP3" Optional Basic Green
60
fMP3 = BasicFeature "mp3" "MP3" Optional Basic Green
60
false
false
0
5
15
17
8
9
null
null
ilyasergey/GHC-XAppFix
compiler/cmm/PprC.hs
bsd-3-clause
pprLit1 platform lit@(CmmLabelDiffOff _ _ _) = parens (pprLit platform lit)
75
pprLit1 platform lit@(CmmLabelDiffOff _ _ _) = parens (pprLit platform lit)
75
pprLit1 platform lit@(CmmLabelDiffOff _ _ _) = parens (pprLit platform lit)
75
false
false
0
8
10
35
17
18
null
null
frantisekfarka/ghc-dsi
utils/genprimopcode/Main.hs
bsd-3-clause
ppType (TyApp (TyCon "SmallArray#") [x]) = "mkSmallArrayPrimTy " ++ ppType x
83
ppType (TyApp (TyCon "SmallArray#") [x]) = "mkSmallArrayPrimTy " ++ ppType x
83
ppType (TyApp (TyCon "SmallArray#") [x]) = "mkSmallArrayPrimTy " ++ ppType x
83
false
false
0
8
17
34
16
18
null
null
santolucito/Euterpea_Projects
Parallel/flappy.hs
mit
-| Bootstrap the game. -} flap :: TVar Double -> IO () flap v = do run config $ render <~ stepper ~~ Window.dimensions where config = defaultConfig { windowTitle = "Helm - Flappy" } stepper = foldp step ([bird]++allObs++[score]) input --stepper = foldp step ([bird]++allObs++[score]++[VolChan v ()]) i...
325
flap :: TVar Double -> IO () flap v = do run config $ render <~ stepper ~~ Window.dimensions where config = defaultConfig { windowTitle = "Helm - Flappy" } stepper = foldp step ([bird]++allObs++[score]) input --stepper = foldp step ([bird]++allObs++[score]++[VolChan v ()]) input
298
flap v = do run config $ render <~ stepper ~~ Window.dimensions where config = defaultConfig { windowTitle = "Helm - Flappy" } stepper = foldp step ([bird]++allObs++[score]) input --stepper = foldp step ([bird]++allObs++[score]++[VolChan v ()]) input
269
true
true
5
11
68
116
55
61
null
null
gridaphobe/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
-- Used to generate the string for a *runtime* error message matchContextErrString :: Outputable id => HsMatchContext id -> SDoc matchContextErrString (FunRhs fun) = text "function" <+> ppr fun
201
matchContextErrString :: Outputable id => HsMatchContext id -> SDoc matchContextErrString (FunRhs fun) = text "function" <+> ppr fun
140
matchContextErrString (FunRhs fun) = text "function" <+> ppr fun
72
true
true
0
7
36
45
21
24
null
null
dysinger/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types.hs
mpl-2.0
-- | A unique namespace identifying the option's associated AWS resource. codNamespace :: Lens' ConfigurationOptionDescription (Maybe Text) codNamespace = lens _codNamespace (\s a -> s { _codNamespace = a })
207
codNamespace :: Lens' ConfigurationOptionDescription (Maybe Text) codNamespace = lens _codNamespace (\s a -> s { _codNamespace = a })
133
codNamespace = lens _codNamespace (\s a -> s { _codNamespace = a })
67
true
true
0
9
29
46
25
21
null
null
meiersi/psqueues-old
tests/Data/PSQ/Class/Tests.hs
bsd-3-clause
test_alter :: forall psq. (PSQ psq, TestKey (Key psq), Eq (psq Int Char), Show (psq Int Char)) => Tagged psq Assertion test_alter = Tagged $ do alter f 3 (empty :: psq Int Char) @?= ("Hello", singleton 3 100 'a') alter f 3 (singleton 3 100 'a' :: psq Int Char) @?= ("World", empty) ...
570
test_alter :: forall psq. (PSQ psq, TestKey (Key psq), Eq (psq Int Char), Show (psq Int Char)) => Tagged psq Assertion test_alter = Tagged $ do alter f 3 (empty :: psq Int Char) @?= ("Hello", singleton 3 100 'a') alter f 3 (singleton 3 100 'a' :: psq Int Char) @?= ("World", empty) ...
570
test_alter = Tagged $ do alter f 3 (empty :: psq Int Char) @?= ("Hello", singleton 3 100 'a') alter f 3 (singleton 3 100 'a' :: psq Int Char) @?= ("World", empty) alter f 3 (singleton 3 100 'b' :: psq Int Char) @?= ("Cats", singleton 3 101 'b') where f Nothing = ("Hello", Just (100, ...
423
false
true
3
10
175
288
144
144
null
null
frantisekfarka/ghc-dsi
utils/ghc-cabal/Main.hs
bsd-3-clause
fixupPackageId ipinfos (InstalledPackageId ipi) = case stripPrefix (reverse "-inplace") $ reverse ipi of Nothing -> error ("Installed package ID doesn't end in -inplace: " ++ show ipi) Just x -> let ipi' = reverse ('-' : x) f (ipinfo : ipinfos') = case Installed.installedPackageId ipinfo...
884
fixupPackageId ipinfos (InstalledPackageId ipi) = case stripPrefix (reverse "-inplace") $ reverse ipi of Nothing -> error ("Installed package ID doesn't end in -inplace: " ++ show ipi) Just x -> let ipi' = reverse ('-' : x) f (ipinfo : ipinfos') = case Installed.installedPackageId ipinfo...
884
fixupPackageId ipinfos (InstalledPackageId ipi) = case stripPrefix (reverse "-inplace") $ reverse ipi of Nothing -> error ("Installed package ID doesn't end in -inplace: " ++ show ipi) Just x -> let ipi' = reverse ('-' : x) f (ipinfo : ipinfos') = case Installed.installedPackageId ipinfo...
884
false
false
0
18
346
175
85
90
null
null
phischu/fragnix
builtins/integer-gmp/GHC.Integer.Type.hs
bsd-3-clause
timesInteger x@(S# _) y = timesInteger y x
47
timesInteger x@(S# _) y = timesInteger y x
47
timesInteger x@(S# _) y = timesInteger y x
47
false
false
0
8
12
25
12
13
null
null
abakst/liquidhaskell
tests/todo/fio.hs
bsd-3-clause
-------------------------- {-@ bind :: forall < pre :: World -> Prop , pre2 :: World -> Prop , p :: a -> Prop , post1 :: World -> a -> World -> Prop , post2 :: World -> b -> World -> Prop , post :: World -> b -> World -> Prop>. ...
696
bind :: FIO a -> (a -> FIO b) -> FIO b bind (FIO g) f = FIO (\x -> case g x of {(y, s) -> (runState (f y)) s})
110
bind (FIO g) f = FIO (\x -> case g x of {(y, s) -> (runState (f y)) s})
71
true
true
0
15
261
95
49
46
null
null
rueshyna/gogol
gogol-admin-reports/gen/Network/Google/Resource/Reports/CustomerUsageReports/Get.hs
mpl-2.0
-- | Token to specify next page. curgPageToken :: Lens' CustomerUsageReportsGet (Maybe Text) curgPageToken = lens _curgPageToken (\ s a -> s{_curgPageToken = a})
169
curgPageToken :: Lens' CustomerUsageReportsGet (Maybe Text) curgPageToken = lens _curgPageToken (\ s a -> s{_curgPageToken = a})
136
curgPageToken = lens _curgPageToken (\ s a -> s{_curgPageToken = a})
76
true
true
1
9
31
52
25
27
null
null
jvictor0/JoSQL
Utils/RuntimeUtils.hs
mit
isLeft _ = False
16
isLeft _ = False
16
isLeft _ = False
16
false
false
0
4
3
10
4
6
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F08.hs
bsd-3-clause
ptr_glFramebufferSamplePositionsfvAMD :: FunPtr (GLenum -> GLuint -> GLuint -> Ptr GLfloat -> IO ()) ptr_glFramebufferSamplePositionsfvAMD = unsafePerformIO $ getCommand "glFramebufferSamplePositionsfvAMD"
205
ptr_glFramebufferSamplePositionsfvAMD :: FunPtr (GLenum -> GLuint -> GLuint -> Ptr GLfloat -> IO ()) ptr_glFramebufferSamplePositionsfvAMD = unsafePerformIO $ getCommand "glFramebufferSamplePositionsfvAMD"
205
ptr_glFramebufferSamplePositionsfvAMD = unsafePerformIO $ getCommand "glFramebufferSamplePositionsfvAMD"
104
false
true
1
12
19
51
23
28
null
null
tpsinnem/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyReportPart x = Left . InternalMsg $ "could not reify " ++ show x
69
reifyReportPart x = Left . InternalMsg $ "could not reify " ++ show x
69
reifyReportPart x = Left . InternalMsg $ "could not reify " ++ show x
69
false
false
0
7
13
24
11
13
null
null
solidsnack/taskl
System/TaskL/CLI.hs
bsd-3-clause
modes :: [ByteString] :~ (Mode, [ByteString]) modes = mode' Normal where mode' m [ ] = return (m, []) mode' m (h:t) | "//" `ByteString.isPrefixOf` h = return (m, h:t) | h `List.elem` ["-h", "--help"] = mode' Help t | h `List.elem` ["-v", "--version"] = mode' Ve...
406
modes :: [ByteString] :~ (Mode, [ByteString]) modes = mode' Normal where mode' m [ ] = return (m, []) mode' m (h:t) | "//" `ByteString.isPrefixOf` h = return (m, h:t) | h `List.elem` ["-h", "--help"] = mode' Help t | h `List.elem` ["-v", "--version"] = mode' Ve...
406
modes = mode' Normal where mode' m [ ] = return (m, []) mode' m (h:t) | "//" `ByteString.isPrefixOf` h = return (m, h:t) | h `List.elem` ["-h", "--help"] = mode' Help t | h `List.elem` ["-v", "--version"] = mode' Version t | otherwise ...
360
false
true
7
11
157
164
88
76
null
null
dblia/nosql-ganeti
test/hs/Test/Ganeti/Types.hs
gpl-2.0
prop_NonNeg_fail :: QuickCheck.Positive Int -> Property prop_NonNeg_fail (QuickCheck.Positive i) = case mkNonNegative (negate i)::Result (Types.NonNegative Int) of Bad _ -> passTest Ok nn -> failTest $ "Built non-negative number '" ++ show nn ++ "' from negative value " ++ show i -- | Tests buil...
342
prop_NonNeg_fail :: QuickCheck.Positive Int -> Property prop_NonNeg_fail (QuickCheck.Positive i) = case mkNonNegative (negate i)::Result (Types.NonNegative Int) of Bad _ -> passTest Ok nn -> failTest $ "Built non-negative number '" ++ show nn ++ "' from negative value " ++ show i -- | Tests buil...
342
prop_NonNeg_fail (QuickCheck.Positive i) = case mkNonNegative (negate i)::Result (Types.NonNegative Int) of Bad _ -> passTest Ok nn -> failTest $ "Built non-negative number '" ++ show nn ++ "' from negative value " ++ show i -- | Tests building positive numbers.
286
false
true
0
11
71
99
47
52
null
null
ryantrinkle/ghcjs
Setup.hs
mit
dropPrefix (Flag (CopyTo pre)) s = error $ "dropPrefix - " ++ show pre ++ " not a prefix of " ++ show s
103
dropPrefix (Flag (CopyTo pre)) s = error $ "dropPrefix - " ++ show pre ++ " not a prefix of " ++ show s
103
dropPrefix (Flag (CopyTo pre)) s = error $ "dropPrefix - " ++ show pre ++ " not a prefix of " ++ show s
103
false
false
1
8
23
49
21
28
null
null
liwanwei/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
spanHtml :: MarkdownParser (F Inlines) spanHtml = try $ do guardEnabled Ext_native_spans (TagOpen _ attrs, _) <- htmlTag (~== TagOpen "span" []) contents <- mconcat <$> manyTill inline (htmlTag (~== TagClose "span")) let ident = fromMaybe "" $ lookup "id" attrs let classes = maybe [] words $ lookup "class" at...
687
spanHtml :: MarkdownParser (F Inlines) spanHtml = try $ do guardEnabled Ext_native_spans (TagOpen _ attrs, _) <- htmlTag (~== TagOpen "span" []) contents <- mconcat <$> manyTill inline (htmlTag (~== TagClose "span")) let ident = fromMaybe "" $ lookup "id" attrs let classes = maybe [] words $ lookup "class" at...
687
spanHtml = try $ do guardEnabled Ext_native_spans (TagOpen _ attrs, _) <- htmlTag (~== TagOpen "span" []) contents <- mconcat <$> manyTill inline (htmlTag (~== TagClose "span")) let ident = fromMaybe "" $ lookup "id" attrs let classes = maybe [] words $ lookup "class" attrs let keyvals = [(k,v) | (k,v) <- a...
648
false
true
0
19
170
287
140
147
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkConditionalAndOrs3 = verifyNot checkConditionalAndOrs "[[ foo || bar ]]"
82
prop_checkConditionalAndOrs3 = verifyNot checkConditionalAndOrs "[[ foo || bar ]]"
82
prop_checkConditionalAndOrs3 = verifyNot checkConditionalAndOrs "[[ foo || bar ]]"
82
false
false
1
5
8
14
5
9
null
null
alphaHeavy/hlint
src/HSE/Util.hs
gpl-2.0
--------------------------------------------------------------------- -- VECTOR APPLICATION apps :: [Exp_] -> Exp_ apps = foldl1 (App an)
139
apps :: [Exp_] -> Exp_ apps = foldl1 (App an)
45
apps = foldl1 (App an)
22
true
true
0
7
15
35
17
18
null
null
NightRa/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LZExt ITChar (ITFixed to)) [x] = doOp v (LZExt ITNative (ITFixed to)) [x]
85
doOp v (LZExt ITChar (ITFixed to)) [x] = doOp v (LZExt ITNative (ITFixed to)) [x]
85
doOp v (LZExt ITChar (ITFixed to)) [x] = doOp v (LZExt ITNative (ITFixed to)) [x]
85
false
false
0
9
18
54
27
27
null
null
kawu/walenty
src/NLP/Walenty/Parser.hs
bsd-2-clause
controlP :: Parser Control controlP = A.choice [ Controller2 <$ string "controller2" , Controllee2 <$ string "controllee2" , Controller <$ string "controller" , Controllee <$ string "controllee" ] <?> "controlP"
221
controlP :: Parser Control controlP = A.choice [ Controller2 <$ string "controller2" , Controllee2 <$ string "controllee2" , Controller <$ string "controller" , Controllee <$ string "controllee" ] <?> "controlP"
221
controlP = A.choice [ Controller2 <$ string "controller2" , Controllee2 <$ string "controllee2" , Controller <$ string "controller" , Controllee <$ string "controllee" ] <?> "controlP"
194
false
true
2
7
39
65
31
34
null
null
Zekka/whidgle
src/Main.hs
mit
trainingCmd :: Parser Cmd trainingCmd = Training <$> settings <*> optional (option (long "turns")) <*> pure Nothing
161
trainingCmd :: Parser Cmd trainingCmd = Training <$> settings <*> optional (option (long "turns")) <*> pure Nothing
161
trainingCmd = Training <$> settings <*> optional (option (long "turns")) <*> pure Nothing
135
false
true
0
11
62
44
21
23
null
null
seereason/ghcjs
src/Compiler/Program.hs
mit
mkPostLoadMode :: PostLoadMode -> Mode mkPostLoadMode = Right . Right
69
mkPostLoadMode :: PostLoadMode -> Mode mkPostLoadMode = Right . Right
69
mkPostLoadMode = Right . Right
30
false
true
0
7
9
26
11
15
null
null
tsiliakis/xmobar
src/Plugins/EWMH.hs
bsd-3-clause
clientHandlers = [ ("_NET_WM_NAME", updateName) , ("_NET_WM_DESKTOP", updateDesktop) ]
103
clientHandlers = [ ("_NET_WM_NAME", updateName) , ("_NET_WM_DESKTOP", updateDesktop) ]
103
clientHandlers = [ ("_NET_WM_NAME", updateName) , ("_NET_WM_DESKTOP", updateDesktop) ]
103
false
false
0
6
25
24
15
9
null
null
TrustNoOne/Euler
haskell/src/Euler004.hs
mit
isPalindrome :: Int -> Bool isPalindrome x = show x == reverse (show x)
71
isPalindrome :: Int -> Bool isPalindrome x = show x == reverse (show x)
71
isPalindrome x = show x == reverse (show x)
43
false
true
0
8
13
34
16
18
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/Patch.hs
mpl-2.0
-- | Resource name of the HL7v2 store, of the form -- \`projects\/{project_id}\/datasets\/{dataset_id}\/hl7V2Stores\/{hl7v2_store_id}\`. pldshvspName :: Lens' ProjectsLocationsDataSetsHl7V2StoresPatch Text pldshvspName = lens _pldshvspName (\ s a -> s{_pldshvspName = a})
273
pldshvspName :: Lens' ProjectsLocationsDataSetsHl7V2StoresPatch Text pldshvspName = lens _pldshvspName (\ s a -> s{_pldshvspName = a})
136
pldshvspName = lens _pldshvspName (\ s a -> s{_pldshvspName = a})
67
true
true
0
9
30
43
23
20
null
null
AlexanderPankiv/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseSRT _ (SRT {}) = panic "unariseSRT"
52
unariseSRT _ (SRT {}) = panic "unariseSRT"
52
unariseSRT _ (SRT {}) = panic "unariseSRT"
52
false
false
0
7
16
21
10
11
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
bootlessly = id
15
bootlessly = id
15
bootlessly = id
15
false
false
0
4
2
6
3
3
null
null
prashant007/AMPL
myAMPL/src/Syntax/ASTConverter.hs
mit
-- Haskell module generated by the BNF converter myLLexer = resolveLayout True . myLexer
92
myLLexer = resolveLayout True . myLexer
39
myLLexer = resolveLayout True . myLexer
39
true
false
0
6
17
14
7
7
null
null
quchen/HaskellEuler
src/Problem19.hs
bsd-3-clause
isLastDayOfMonth date@(Date _ _ d) = d == daysInMonth date
58
isLastDayOfMonth date@(Date _ _ d) = d == daysInMonth date
58
isLastDayOfMonth date@(Date _ _ d) = d == daysInMonth date
58
false
false
1
9
9
34
14
20
null
null
andorp/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
dataPageValue :: DataPage a -> a dataPageValue = dataPageCata (const id) -- getSubmission (const id) (const id)
117
dataPageValue :: DataPage a -> a dataPageValue = dataPageCata (const id) -- getSubmission (const id) (const id)
117
dataPageValue = dataPageCata (const id) -- getSubmission (const id) (const id)
84
false
true
0
7
22
53
23
30
null
null
rglew/cis194
src/Week6/Tests.hs
mit
falseVal = T.pack "N"
21
falseVal = T.pack "N"
21
falseVal = T.pack "N"
21
false
false
0
6
3
11
5
6
null
null
hooplab/hoopla-telepay-cruncher
src/Main.hs
mit
main :: IO () main = defaultMain $ with Help $ with ValidateFile $ initialize "Hoopla-telepay-cruncher 1.0"
107
main :: IO () main = defaultMain $ with Help $ with ValidateFile $ initialize "Hoopla-telepay-cruncher 1.0"
107
main = defaultMain $ with Help $ with ValidateFile $ initialize "Hoopla-telepay-cruncher 1.0"
93
false
true
1
8
16
40
17
23
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLOCALE_DECIMAL_POINT :: Int wxLOCALE_DECIMAL_POINT = 1
56
wxLOCALE_DECIMAL_POINT :: Int wxLOCALE_DECIMAL_POINT = 1
56
wxLOCALE_DECIMAL_POINT = 1
26
false
true
0
4
5
11
6
5
null
null
Gurkenglas/Djinn
src/LJT.hs
bsd-3-clause
--removeAtom :: Symbol -> AtomFs -> AtomFs --removeAtom s atoms = [ a | a@(AtomF _ s') <- atoms, s /= s' ] addAtom :: AtomF -> AtomFs -> AtomFs addAtom a as = if a `elem` as then as else a : as
194
addAtom :: AtomF -> AtomFs -> AtomFs addAtom a as = if a `elem` as then as else a : as
86
addAtom a as = if a `elem` as then as else a : as
49
true
true
0
6
44
44
25
19
null
null
hpacheco/HAAP
examples/plab/svn/2017li1g186/src/OracleT1.hs
mit
pontoToPosicao :: Ponto -> Posicao pontoToPosicao (x,y) = (floor x,floor y)
75
pontoToPosicao :: Ponto -> Posicao pontoToPosicao (x,y) = (floor x,floor y)
75
pontoToPosicao (x,y) = (floor x,floor y)
40
false
true
0
8
10
42
20
22
null
null
domoszlai/juicy-gcode
src/BiArc.hs
mit
pointAt :: BiArc -> Double -> V2 Double pointAt arc t | t <= s = CA.pointAt (_a1 arc) (t / s) | otherwise = CA.pointAt (_a2 arc) ((t - s) / (1 - s)) where s = CA.arcLength (_a1 arc) / (arcLength arc)
235
pointAt :: BiArc -> Double -> V2 Double pointAt arc t | t <= s = CA.pointAt (_a1 arc) (t / s) | otherwise = CA.pointAt (_a2 arc) ((t - s) / (1 - s)) where s = CA.arcLength (_a1 arc) / (arcLength arc)
235
pointAt arc t | t <= s = CA.pointAt (_a1 arc) (t / s) | otherwise = CA.pointAt (_a2 arc) ((t - s) / (1 - s)) where s = CA.arcLength (_a1 arc) / (arcLength arc)
195
false
true
0
10
79
128
63
65
null
null
ganeti/ganeti
src/Ganeti/OpCodes.hs
bsd-2-clause
opSummaryVal OpGroupRemove { opGroupName = s } = Just (fromNonEmpty s)
70
opSummaryVal OpGroupRemove { opGroupName = s } = Just (fromNonEmpty s)
70
opSummaryVal OpGroupRemove { opGroupName = s } = Just (fromNonEmpty s)
70
false
false
0
8
10
27
13
14
null
null
nomeata/nofib-analyse
Main.hs
bsd-3-clause
restrictRows (Just these) rows = filter keep_it rows where keep_it (TableRow (BoxString s: _)) = s `elem` these keep_it TableLine = True keep_it _ = False
172
restrictRows (Just these) rows = filter keep_it rows where keep_it (TableRow (BoxString s: _)) = s `elem` these keep_it TableLine = True keep_it _ = False
172
restrictRows (Just these) rows = filter keep_it rows where keep_it (TableRow (BoxString s: _)) = s `elem` these keep_it TableLine = True keep_it _ = False
172
false
false
1
10
43
74
35
39
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The video\'s rating in Venezuela. crResorteviolenciaRating :: Lens' ContentRating (Maybe ContentRatingResorteviolenciaRating) crResorteviolenciaRating = lens _crResorteviolenciaRating (\ s a -> s{_crResorteviolenciaRating = a})
240
crResorteviolenciaRating :: Lens' ContentRating (Maybe ContentRatingResorteviolenciaRating) crResorteviolenciaRating = lens _crResorteviolenciaRating (\ s a -> s{_crResorteviolenciaRating = a})
201
crResorteviolenciaRating = lens _crResorteviolenciaRating (\ s a -> s{_crResorteviolenciaRating = a})
109
true
true
0
9
31
48
25
23
null
null
benb/MetAl
src/Phylo/Alignment/DistSet.hs
gpl-3.0
genDist :: (ListAlignment -> [[(Int)]]) -> ListAlignment -> ListAlignment -> (Int,Int) genDist f = labDist (setPair []) setDist f
129
genDist :: (ListAlignment -> [[(Int)]]) -> ListAlignment -> ListAlignment -> (Int,Int) genDist f = labDist (setPair []) setDist f
129
genDist f = labDist (setPair []) setDist f
42
false
true
0
10
18
63
34
29
null
null
comonoidial/ALFIN
Alfin/Analysis.hs
mit
mergeUses :: [Map Variable VarUse] -> Map Variable VarUse mergeUses xss = fmap AltUses $ unionsWith (++) $ map (fmap (:[]) . flip union km) xss where km = fromList $ zip (S.toList $ S.unions $ map keysSet xss) (repeat Unused)
227
mergeUses :: [Map Variable VarUse] -> Map Variable VarUse mergeUses xss = fmap AltUses $ unionsWith (++) $ map (fmap (:[]) . flip union km) xss where km = fromList $ zip (S.toList $ S.unions $ map keysSet xss) (repeat Unused)
227
mergeUses xss = fmap AltUses $ unionsWith (++) $ map (fmap (:[]) . flip union km) xss where km = fromList $ zip (S.toList $ S.unions $ map keysSet xss) (repeat Unused)
169
false
true
5
11
42
125
58
67
null
null
sljrobin/dotfiles
xmonad/.xmonad/lib/Elements.hs
gpl-2.0
-- Active foreground -- Configuration myGridConfig :: t -> GSConfig Window myGridConfig colorizer = (buildDefaultGSConfig myGridColorizer) { gs_cellheight = 65 -- Cell height , gs_cellwidth = 120 -- Cell width , gs_cellpadding = 10 -- Cell padding , gs_font = myFntGrid...
335
myGridConfig :: t -> GSConfig Window myGridConfig colorizer = (buildDefaultGSConfig myGridColorizer) { gs_cellheight = 65 -- Cell height , gs_cellwidth = 120 -- Cell width , gs_cellpadding = 10 -- Cell padding , gs_font = myFntGrid -- Font }
296
myGridConfig colorizer = (buildDefaultGSConfig myGridColorizer) { gs_cellheight = 65 -- Cell height , gs_cellwidth = 120 -- Cell width , gs_cellpadding = 10 -- Cell padding , gs_font = myFntGrid -- Font }
259
true
true
0
7
99
67
38
29
null
null
Javran/misc
kc-sprite-tool/src/Spritesmith.hs
mit
outputImages :: FilePath -> M.Map T.Text Image -> IO () outputImages outputDir = mapM_ outputImage . M.toList where outputImage :: (T.Text, Image) -> IO () outputImage (name, img) = Img.writeImageExact Img.PNG [] outputFileName img where outputFileName = outputDir </> T.unpack name <.> "...
324
outputImages :: FilePath -> M.Map T.Text Image -> IO () outputImages outputDir = mapM_ outputImage . M.toList where outputImage :: (T.Text, Image) -> IO () outputImage (name, img) = Img.writeImageExact Img.PNG [] outputFileName img where outputFileName = outputDir </> T.unpack name <.> "...
324
outputImages outputDir = mapM_ outputImage . M.toList where outputImage :: (T.Text, Image) -> IO () outputImage (name, img) = Img.writeImageExact Img.PNG [] outputFileName img where outputFileName = outputDir </> T.unpack name <.> "png"
268
false
true
0
10
74
119
59
60
null
null
facebookincubator/duckling
Duckling/Ordinal/JA/Corpus.hs
bsd-3-clause
corpus :: Corpus corpus = (testContext {locale = makeLocale JA Nothing}, testOptions, allExamples)
98
corpus :: Corpus corpus = (testContext {locale = makeLocale JA Nothing}, testOptions, allExamples)
98
corpus = (testContext {locale = makeLocale JA Nothing}, testOptions, allExamples)
81
false
true
0
8
12
33
19
14
null
null
BartAdv/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTyDecl :: Term -> ElabD RTyDecl reifyTyDecl (App _ (App _ (App _ (P (DCon _ _ _) n _) tyN) args) ret) | n == tacN "Declare" = do tyN' <- reifyTTName tyN args' <- case unList args of Nothing -> fail $ "Couldn't reify " ++ show args ++ " as an arglist." Just xs -> mapM reify...
1,134
reifyTyDecl :: Term -> ElabD RTyDecl reifyTyDecl (App _ (App _ (App _ (P (DCon _ _ _) n _) tyN) args) ret) | n == tacN "Declare" = do tyN' <- reifyTTName tyN args' <- case unList args of Nothing -> fail $ "Couldn't reify " ++ show args ++ " as an arglist." Just xs -> mapM reify...
1,134
reifyTyDecl (App _ (App _ (App _ (P (DCon _ _ _) n _) tyN) args) ret) | n == tacN "Declare" = do tyN' <- reifyTTName tyN args' <- case unList args of Nothing -> fail $ "Couldn't reify " ++ show args ++ " as an arglist." Just xs -> mapM reifyRArg xs ret' <- reifyRaw ret ...
1,097
false
true
0
15
532
355
164
191
null
null
MaxDaten/yage-rendering
src/Yage/Rendering/Mesh.hs
mit
meshComponentsHash :: Getter (Mesh v) MeshHash meshComponentsHash = meshComponents.to compHashes where compHashes compMap = XH.xxHash . pack $ concatMap octets $ compMap^..traverse.componentHash
199
meshComponentsHash :: Getter (Mesh v) MeshHash meshComponentsHash = meshComponents.to compHashes where compHashes compMap = XH.xxHash . pack $ concatMap octets $ compMap^..traverse.componentHash
199
meshComponentsHash = meshComponents.to compHashes where compHashes compMap = XH.xxHash . pack $ concatMap octets $ compMap^..traverse.componentHash
152
false
true
0
9
26
59
29
30
null
null
karamellpelle/grid
source/OpenGL/ES2/Values.hs
gpl-3.0
gl_NEAREST_MIPMAP_LINEAR :: GLenum gl_NEAREST_MIPMAP_LINEAR = 0x2702
75
gl_NEAREST_MIPMAP_LINEAR :: GLenum gl_NEAREST_MIPMAP_LINEAR = 0x2702
75
gl_NEAREST_MIPMAP_LINEAR = 0x2702
40
false
true
0
4
12
11
6
5
null
null
Solumin/ScriptNScribe
src/BreveLang.hs
mit
-- We try to do something useful here: -- Lambdas are defined as a sequence of patterns followed by a body. -- The body is either a single expression or a sequence of assign statements -- terminated by a return statement. So our parser reflects that: it tries to -- parse several Assigns, stopping if it encounters a Ret...
862
parseLambda :: Parser Expr parseLambda = b_parens (Lambda <$> args <*> body) where args = b_resop "\\" *> manyTill parsePat (b_resop "->") body = try bodyStmt <|> bodyExpr bodyExpr = Return <$> parseExpr <* option "" b_semi -- sugar for e.g. (\ a b -> a + b) bodyStmt = do ...
491
parseLambda = b_parens (Lambda <$> args <*> body) where args = b_resop "\\" *> manyTill parsePat (b_resop "->") body = try bodyStmt <|> bodyExpr bodyExpr = Return <$> parseExpr <* option "" b_semi -- sugar for e.g. (\ a b -> a + b) bodyStmt = do bod <- manyTill (parseAssi...
464
true
true
0
14
213
167
85
82
null
null
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter4.hs
mit
vmult :: Base -> Vint -> Vint -> Vint vmult base xs ys = foldr1 shiftaddPsums (psums xs ys) where shiftaddPsums xs' ys' = vadd base (xs' ++ [0]) ys' psums xs' ys' = map (bmul base xs') ys'
213
vmult :: Base -> Vint -> Vint -> Vint vmult base xs ys = foldr1 shiftaddPsums (psums xs ys) where shiftaddPsums xs' ys' = vadd base (xs' ++ [0]) ys' psums xs' ys' = map (bmul base xs') ys'
213
vmult base xs ys = foldr1 shiftaddPsums (psums xs ys) where shiftaddPsums xs' ys' = vadd base (xs' ++ [0]) ys' psums xs' ys' = map (bmul base xs') ys'
175
false
true
1
8
63
94
47
47
null
null
hxw/conlecterm
src/SendControl.hs
bsd-2-clause
sym '}' = (X.shiftMask, X.stringToKeysym "braceright")
54
sym '}' = (X.shiftMask, X.stringToKeysym "braceright")
54
sym '}' = (X.shiftMask, X.stringToKeysym "braceright")
54
false
false
0
7
5
23
11
12
null
null
AgustinCB/hgen
src/Population.hs
gpl-2.0
randomPopulation :: Int -> Population a -> IO (Population a) randomPopulation size (Population _ chromosome) = do pop <- mapM (randomInd chromosome) [0..size-1] return (Population pop chromosome)
199
randomPopulation :: Int -> Population a -> IO (Population a) randomPopulation size (Population _ chromosome) = do pop <- mapM (randomInd chromosome) [0..size-1] return (Population pop chromosome)
199
randomPopulation size (Population _ chromosome) = do pop <- mapM (randomInd chromosome) [0..size-1] return (Population pop chromosome)
138
false
true
0
11
30
90
41
49
null
null
tjakway/ghcjvm
compiler/basicTypes/Literal.hs
bsd-3-clause
litValue (MachWord i) = i
27
litValue (MachWord i) = i
27
litValue (MachWord i) = i
27
false
false
0
6
6
16
7
9
null
null
codemac/yi-editor
src/Yi/Syntax/JavaScript.hs
gpl-2.0
normal :: TT -> Endo [Stroke] normal x = one tokenToStroke x
60
normal :: TT -> Endo [Stroke] normal x = one tokenToStroke x
60
normal x = one tokenToStroke x
30
false
true
0
7
11
29
14
15
null
null
mightymoose/liquidhaskell
tests/neg/SafePartialFunctions.hs
bsd-3-clause
-- USERS gotail xs = case xs of [] -> [] y : ys -> tail ys
85
gotail xs = case xs of [] -> [] y : ys -> tail ys
75
gotail xs = case xs of [] -> [] y : ys -> tail ys
75
true
false
0
8
43
37
18
19
null
null
aisamanra/matterhorn
src/Draw/Util.hs
bsd-3-clause
getTimeFormat :: ChatState -> Text getTimeFormat st = maybe defaultTimeFormat id (st^.csResources.crConfiguration.to configTimeFormat)
138
getTimeFormat :: ChatState -> Text getTimeFormat st = maybe defaultTimeFormat id (st^.csResources.crConfiguration.to configTimeFormat)
138
getTimeFormat st = maybe defaultTimeFormat id (st^.csResources.crConfiguration.to configTimeFormat)
103
false
true
0
10
16
40
19
21
null
null
haskell-distributed/distributed-process-registry
src/Control/Distributed/Process/Registry.hs
bsd-3-clause
-- | Await registration of a given key, but give up and return @AwaitTimeout@ -- if registration does not take place within the specified time period (@delay@). awaitTimeout :: forall k v. (Keyable k) => Registry k v -> Delay -> k -> Process (AwaitResult k) awaitTimeo...
1,585
awaitTimeout :: forall k v. (Keyable k) => Registry k v -> Delay -> k -> Process (AwaitResult k) awaitTimeout a d k = do p <- forceResolve a Just mRef <- PL.monitor p kRef <- monitor a (Key k KeyTypeAlias Nothing) (Just [OnKeyRegistered]) let matches' ...
1,424
awaitTimeout a d k = do p <- forceResolve a Just mRef <- PL.monitor p kRef <- monitor a (Key k KeyTypeAlias Nothing) (Just [OnKeyRegistered]) let matches' = matches mRef kRef k let recv = case d of Infinity -> receiveWait matches' >>= return . Just Delay t -> recei...
1,275
true
true
3
15
548
457
215
242
null
null
DNNX/hyphenation
src/Text/Hyphenation/Language.hs
bsd-3-clause
-- | the infix portion of the data file names used for this language languageAffix :: Language -> String languageAffix s = case s of Afrikaans -> "af" Basque -> "eu" Bengali -> "bn" Bulgarian -> "bg" Catalan -> "ca" Chinese -> "zh-latn-pinyin" Coptic -> "cop" Croatian -> "hr" Czech -> "cs" Danish ->...
1,809
languageAffix :: Language -> String languageAffix s = case s of Afrikaans -> "af" Basque -> "eu" Bengali -> "bn" Bulgarian -> "bg" Catalan -> "ca" Chinese -> "zh-latn-pinyin" Coptic -> "cop" Croatian -> "hr" Czech -> "cs" Danish -> "da" Dutch -> "nl" English_US -> "en-us" English_GB -> "en-gb"...
1,740
languageAffix s = case s of Afrikaans -> "af" Basque -> "eu" Bengali -> "bn" Bulgarian -> "bg" Catalan -> "ca" Chinese -> "zh-latn-pinyin" Coptic -> "cop" Croatian -> "hr" Czech -> "cs" Danish -> "da" Dutch -> "nl" English_US -> "en-us" English_GB -> "en-gb" Esperanto -> "eo" Estonian -> "...
1,704
true
true
0
7
404
455
231
224
null
null
sdiehl/ghc
compiler/typecheck/TcGenFunctor.hs
bsd-3-clause
f_RDR, z_RDR :: RdrName f_RDR = mkVarUnqual (fsLit "f")
55
f_RDR, z_RDR :: RdrName f_RDR = mkVarUnqual (fsLit "f")
55
f_RDR = mkVarUnqual (fsLit "f")
31
false
true
2
7
8
32
13
19
null
null
metabrainz/musicbrainz-data-service
src/MusicBrainz/API/Common.hs
gpl-2.0
-------------------------------------------------------------------------------- merge :: (MB.Merge a, MB.ResolveReference a, MB.ResolveReference (Revision a), RefSpec a ~ MBID a) => MBForm (RefObject (Revision a)) merge = fmap RefObject $ runApi $ MB.withEdit <$> edit <*> (MB.merge <$> edi...
402
merge :: (MB.Merge a, MB.ResolveReference a, MB.ResolveReference (Revision a), RefSpec a ~ MBID a) => MBForm (RefObject (Revision a)) merge = fmap RefObject $ runApi $ MB.withEdit <$> edit <*> (MB.merge <$> editor <*> "source" .: revisionRef <*> "target" .: coreRef...
321
merge = fmap RefObject $ runApi $ MB.withEdit <$> edit <*> (MB.merge <$> editor <*> "source" .: revisionRef <*> "target" .: coreRef)
187
true
true
7
12
96
131
63
68
null
null
yiannist/ganeti
src/Ganeti/Config.hs
bsd-2-clause
-- | Retrieves all nodes hosting a DRBD disk getDrbdDiskNodes :: ConfigData -> Disk -> [Node] getDrbdDiskNodes cfg disk = let retrieved = case diskLogicalId disk of Just (LIDDrbd8 nodeA nodeB _ _ _ _) -> justOk [getNode cfg nodeA, getNode cfg nodeB] _ ...
419
getDrbdDiskNodes :: ConfigData -> Disk -> [Node] getDrbdDiskNodes cfg disk = let retrieved = case diskLogicalId disk of Just (LIDDrbd8 nodeA nodeB _ _ _ _) -> justOk [getNode cfg nodeA, getNode cfg nodeB] _ -> [] in retrieved +...
374
getDrbdDiskNodes cfg disk = let retrieved = case diskLogicalId disk of Just (LIDDrbd8 nodeA nodeB _ _ _ _) -> justOk [getNode cfg nodeA, getNode cfg nodeB] _ -> [] in retrieved ++ concatMap (getDrbdDiskNodes cfg) (diskChildren ...
325
true
true
0
14
146
119
58
61
null
null
mightymoose/liquidhaskell
benchmarks/base-4.5.1.0/System/Posix/Internals.hs
bsd-3-clause
-- Note: echoing goes hand in hand with enabling 'line input' / raw-ness -- for Win32 consoles, hence setEcho ends up being the inverse of setCooked. setEcho :: FD -> Bool -> IO () setEcho fd on = do x <- set_console_echo fd (if on then 1 else 0) if (x /= 0) then ioError (ioe_unk_error "setEcho" "failed to set e...
346
setEcho :: FD -> Bool -> IO () setEcho fd on = do x <- set_console_echo fd (if on then 1 else 0) if (x /= 0) then ioError (ioe_unk_error "setEcho" "failed to set echoing") else return ()
196
setEcho fd on = do x <- set_console_echo fd (if on then 1 else 0) if (x /= 0) then ioError (ioe_unk_error "setEcho" "failed to set echoing") else return ()
165
true
true
0
11
73
93
46
47
null
null