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
ddssff/haskell-extra
Extra/CIO.hs
bsd-3-clause
-- |Verbosity controlled version of putStrLn vPutStrLn :: CIO m => Int -> String -> m () vPutStrLn = vHPutStrLn IO.stdout
121
vPutStrLn :: CIO m => Int -> String -> m () vPutStrLn = vHPutStrLn IO.stdout
76
vPutStrLn = vHPutStrLn IO.stdout
32
true
true
0
10
20
43
19
24
null
null
coghex/abridgefaraway
src/ABFA/Map.hs
bsd-3-clause
flattenGrid :: [[a]] -> [a] flattenGrid xs = (\z n -> foldr (\x y -> foldr z y x) n xs) (:) []
94
flattenGrid :: [[a]] -> [a] flattenGrid xs = (\z n -> foldr (\x y -> foldr z y x) n xs) (:) []
94
flattenGrid xs = (\z n -> foldr (\x y -> foldr z y x) n xs) (:) []
66
false
true
0
11
22
75
39
36
null
null
tibbe/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprInstr g@(GSIN sz l1 l2 src dst) = pprG g (pprTrigOp "fsin" False l1 l2 src dst sz)
88
pprInstr g@(GSIN sz l1 l2 src dst) = pprG g (pprTrigOp "fsin" False l1 l2 src dst sz)
88
pprInstr g@(GSIN sz l1 l2 src dst) = pprG g (pprTrigOp "fsin" False l1 l2 src dst sz)
88
false
false
0
8
20
49
24
25
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nrOffline :: String nrOffline = Types.nodeRoleToRaw NROffline
61
nrOffline :: String nrOffline = Types.nodeRoleToRaw NROffline
61
nrOffline = Types.nodeRoleToRaw NROffline
41
false
true
0
6
6
22
9
13
null
null
dom96/pb
Paste.hs
bsd-3-clause
genPastebinData pbInfo = let dat = [("paste_code", pbContents pbInfo), ("paste_format", getSyntax $ pbExt pbInfo)] in dat ++ private ++ expires where private = if pbPriv pbInfo then [("paste_private", "1")] else [] expires = if pbExpires pbInf...
446
genPastebinData pbInfo = let dat = [("paste_code", pbContents pbInfo), ("paste_format", getSyntax $ pbExt pbInfo)] in dat ++ private ++ expires where private = if pbPriv pbInfo then [("paste_private", "1")] else [] expires = if pbExpires pbInf...
446
genPastebinData pbInfo = let dat = [("paste_code", pbContents pbInfo), ("paste_format", getSyntax $ pbExt pbInfo)] in dat ++ private ++ expires where private = if pbPriv pbInfo then [("paste_private", "1")] else [] expires = if pbExpires pbInf...
446
false
false
1
12
163
127
69
58
null
null
olorin/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types/Product.hs
mpl-2.0
-- | Provides the status of the EC2 security group. Status can be -- \"authorizing\", \"authorized\", \"revoking\", and \"revoked\". esgStatus :: Lens' EC2SecurityGroup (Maybe Text) esgStatus = lens _esgStatus (\ s a -> s{_esgStatus = a})
238
esgStatus :: Lens' EC2SecurityGroup (Maybe Text) esgStatus = lens _esgStatus (\ s a -> s{_esgStatus = a})
105
esgStatus = lens _esgStatus (\ s a -> s{_esgStatus = a})
56
true
true
0
9
35
47
26
21
null
null
nevrenato/Hets_Fork
Static/CheckGlobalContext.hs
gpl-2.0
checkGMorphismInEdge :: DGraph -> DGLinkLab -> State Statistics () checkGMorphismInEdge dgraph (DGLink {dgl_morphism = dgmor}) = checkGMorphism dgmor dgraph
160
checkGMorphismInEdge :: DGraph -> DGLinkLab -> State Statistics () checkGMorphismInEdge dgraph (DGLink {dgl_morphism = dgmor}) = checkGMorphism dgmor dgraph
160
checkGMorphismInEdge dgraph (DGLink {dgl_morphism = dgmor}) = checkGMorphism dgmor dgraph
93
false
true
0
9
22
48
24
24
null
null
AlexanderPankiv/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- | Find out if HPC is used by this module or any of the modules -- it depends upon isHpcUsed :: HpcInfo -> AnyHpcUsage isHpcUsed (HpcInfo {}) = True
168
isHpcUsed :: HpcInfo -> AnyHpcUsage isHpcUsed (HpcInfo {}) = True
83
isHpcUsed (HpcInfo {}) = True
47
true
true
1
8
47
32
16
16
null
null
pparkkin/eta
compiler/ETA/Main/DynFlags.hs
bsd-3-clause
wayRTSOnly WayGran = False
30
wayRTSOnly WayGran = False
30
wayRTSOnly WayGran = False
30
false
false
0
5
7
9
4
5
null
null
hephaestus-pl/hephaestus
alexandre/feature-modeling/src/FeatureModel/Parsers/SPLOT/SkelSPLOT.hs
mit
transSPLOTModel :: SPLOTModel -> Result transSPLOTModel x = case x of SPLOT featuremodel -> failure x
104
transSPLOTModel :: SPLOTModel -> Result transSPLOTModel x = case x of SPLOT featuremodel -> failure x
104
transSPLOTModel x = case x of SPLOT featuremodel -> failure x
64
false
true
2
5
18
33
16
17
null
null
abakst/symmetry
checker/tests/pos/MapReduce00.hs
mit
mapperProcess :: (DSL repr) => repr (Pid RSing -> Pid RSing -> Process repr ()) mapperProcess = lam $ \masterPid -> lam $ \workQueuePid -> app (fixM (app (app fix_f masterPid) workQueuePid)) tt where fix_f = lam $ \mPid -> lam $ \wqPid -> lam $ \f -> lam $ \_-> do myPid <- self ...
619
mapperProcess :: (DSL repr) => repr (Pid RSing -> Pid RSing -> Process repr ()) mapperProcess = lam $ \masterPid -> lam $ \workQueuePid -> app (fixM (app (app fix_f masterPid) workQueuePid)) tt where fix_f = lam $ \mPid -> lam $ \wqPid -> lam $ \f -> lam $ \_-> do myPid <- self ...
619
mapperProcess = lam $ \masterPid -> lam $ \workQueuePid -> app (fixM (app (app fix_f masterPid) workQueuePid)) tt where fix_f = lam $ \mPid -> lam $ \wqPid -> lam $ \f -> lam $ \_-> do myPid <- self send wqPid myPid (v :: repr Sig...
539
false
true
0
23
310
220
109
111
null
null
NicolasDP/hit
Data/Git/Storage.hs
bsd-3-clause
findRepo :: IO FilePath findRepo = do menvDir <- E.catch (Just . decodeString posix_ghc704 <$> getEnv "GIT_DIR") (\(_:: SomeException) -> return Nothing) case menvDir of Nothing -> getWorkingDirectory >>= checkDir 0 Just envDir -> do e <- isRepo envDir when (not e) $ ...
761
findRepo :: IO FilePath findRepo = do menvDir <- E.catch (Just . decodeString posix_ghc704 <$> getEnv "GIT_DIR") (\(_:: SomeException) -> return Nothing) case menvDir of Nothing -> getWorkingDirectory >>= checkDir 0 Just envDir -> do e <- isRepo envDir when (not e) $ ...
761
findRepo = do menvDir <- E.catch (Just . decodeString posix_ghc704 <$> getEnv "GIT_DIR") (\(_:: SomeException) -> return Nothing) case menvDir of Nothing -> getWorkingDirectory >>= checkDir 0 Just envDir -> do e <- isRepo envDir when (not e) $ error "environment GIT_D...
737
false
true
4
15
236
239
113
126
null
null
sheganinans/UAO
src/UAO.hs
mit
-- From: http://www.brool.com/index.php/haskell-performance-lowercase lowercase :: B.ByteString -> B.ByteString lowercase = B.map (ctype_lower U.!)
148
lowercase :: B.ByteString -> B.ByteString lowercase = B.map (ctype_lower U.!)
77
lowercase = B.map (ctype_lower U.!)
35
true
true
0
8
13
38
18
20
null
null
polux/hgom
src/Gom/SymbolTable.hs
gpl-3.0
-- | checks that redundant information about constructor domains is consistent -- with the rest of the table propCodomConsistent :: SymbolTable -> Bool propCodomConsistent st = sort assocs == sort (M.toList $ codom st) where assocs = toAssoc (sctors st) ++ toAssoc (vctors st) toAssoc amap = [(c,s) | (s,l) <- ...
397
propCodomConsistent :: SymbolTable -> Bool propCodomConsistent st = sort assocs == sort (M.toList $ codom st) where assocs = toAssoc (sctors st) ++ toAssoc (vctors st) toAssoc amap = [(c,s) | (s,l) <- M.toList amap, c <- l] -- | checks that the base constructors actually exist
288
propCodomConsistent st = sort assocs == sort (M.toList $ codom st) where assocs = toAssoc (sctors st) ++ toAssoc (vctors st) toAssoc amap = [(c,s) | (s,l) <- M.toList amap, c <- l] -- | checks that the base constructors actually exist
245
true
true
2
10
75
129
61
68
null
null
blender/Rome
src/Utils.hs
mit
-- | Given an `InvertedRepositoryMap` and a list of `FrameworkVersion` produces -- | a list of __unique__ `ProjectNameAndVersion`s repoNamesAndVersionForFrameworkVersions :: InvertedRepositoryMap -> [FrameworkVersion] -> [ProjectNameAndVersion] repoNamesAndVersionForFrameworkVersions reverseRomeMap versions = nub $ ...
426
repoNamesAndVersionForFrameworkVersions :: InvertedRepositoryMap -> [FrameworkVersion] -> [ProjectNameAndVersion] repoNamesAndVersionForFrameworkVersions reverseRomeMap versions = nub $ zip (map (repoNameForFrameworkName reverseRomeMap . _framework) versions) (map _frameworkVersion versions)
294
repoNamesAndVersionForFrameworkVersions reverseRomeMap versions = nub $ zip (map (repoNameForFrameworkName reverseRomeMap . _framework) versions) (map _frameworkVersion versions)
180
true
true
2
10
43
69
35
34
null
null
keithodulaigh/Hets
RDF/StaticAnalysis.hs
gpl-2.0
resolveStatements :: Base -> RDFPrefixMap -> [Statement] -> [Statement] resolveStatements b pm ls = case ls of [] -> [] BaseStatement base : t -> let newBase = resolveBase b pm base in BaseStatement newBase : resolveStatements newBase pm t PrefixStatement pref : t -> let (newPref, newPrefMap) = ...
525
resolveStatements :: Base -> RDFPrefixMap -> [Statement] -> [Statement] resolveStatements b pm ls = case ls of [] -> [] BaseStatement base : t -> let newBase = resolveBase b pm base in BaseStatement newBase : resolveStatements newBase pm t PrefixStatement pref : t -> let (newPref, newPrefMap) = ...
525
resolveStatements b pm ls = case ls of [] -> [] BaseStatement base : t -> let newBase = resolveBase b pm base in BaseStatement newBase : resolveStatements newBase pm t PrefixStatement pref : t -> let (newPref, newPrefMap) = resolvePrefix b pm pref in PrefixStatement newPref : resolve...
453
false
true
6
9
127
159
78
81
null
null
armoredsoftware/protocol
tpm/mainline/src/TPM/Const.hs
bsd-3-clause
tpm_auth_getname auth = case lookup auth tpm_auth_names of Nothing -> "Unknown Authetication Requirements" Just x -> x ------------------------------------------------------------------------------- -- TPM key flags as defined by section 5.10 of the document: --...
435
tpm_auth_getname auth = case lookup auth tpm_auth_names of Nothing -> "Unknown Authetication Requirements" Just x -> x ------------------------------------------------------------------------------- -- TPM key flags as defined by section 5.10 of the document: --...
435
tpm_auth_getname auth = case lookup auth tpm_auth_names of Nothing -> "Unknown Authetication Requirements" Just x -> x ------------------------------------------------------------------------------- -- TPM key flags as defined by section 5.10 of the document: --...
435
false
false
0
8
97
37
19
18
null
null
anchor/marquise-haskell
src/System/Marquise.hs
bsd-3-clause
sendCounter :: [(B.ByteString, B.ByteString)] -> Word64 -> Marquise () sendCounter tag_pairs timestamp = withConnFieldsValuesLength "marquise_send_counter" tag_pairs $ rotate5 F.c_marquise_send_counter timestamp
223
sendCounter :: [(B.ByteString, B.ByteString)] -> Word64 -> Marquise () sendCounter tag_pairs timestamp = withConnFieldsValuesLength "marquise_send_counter" tag_pairs $ rotate5 F.c_marquise_send_counter timestamp
223
sendCounter tag_pairs timestamp = withConnFieldsValuesLength "marquise_send_counter" tag_pairs $ rotate5 F.c_marquise_send_counter timestamp
152
false
true
0
8
31
58
29
29
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | The default fixed timeout needed until the helper VM is finally -- shutdown, for example, after installing the OS. helperVmShutdown :: Int helperVmShutdown = 2 * 60 * 60
174
helperVmShutdown :: Int helperVmShutdown = 2 * 60 * 60
54
helperVmShutdown = 2 * 60 * 60
30
true
true
0
6
30
21
12
9
null
null
jepst/CloudHaskell
examples/kmeans/MakeData.hs
bsd-3-clause
val = getStdRandom (randomR (minValue,maxValue))
48
val = getStdRandom (randomR (minValue,maxValue))
48
val = getStdRandom (randomR (minValue,maxValue))
48
false
false
1
8
4
24
11
13
null
null
alanz/htelehash
src/Network/TeleHash/SwitchApi.hs
bsd-3-clause
chan_end :: Uid -> Maybe TxTelex -> TeleHash (Maybe TxTelex) chan_end chanId p = do logT $ "channel end " ++ show (chanId) chan <- getChan chanId let pret = case p of Nothing -> Nothing Just pkt -> Just (packet_set pkt "end" True) chan_dequeue chanId rmChanFromHn (chTo chan) (chU...
502
chan_end :: Uid -> Maybe TxTelex -> TeleHash (Maybe TxTelex) chan_end chanId p = do logT $ "channel end " ++ show (chanId) chan <- getChan chanId let pret = case p of Nothing -> Nothing Just pkt -> Just (packet_set pkt "end" True) chan_dequeue chanId rmChanFromHn (chTo chan) (chU...
502
chan_end chanId p = do logT $ "channel end " ++ show (chanId) chan <- getChan chanId let pret = case p of Nothing -> Nothing Just pkt -> Just (packet_set pkt "end" True) chan_dequeue chanId rmChanFromHn (chTo chan) (chUid chan) rmChan chanId return pret -- -----------------...
441
false
true
0
15
113
144
65
79
null
null
joom/Guguk
src/Guguk/Phonetics.hs
mit
turkishPhonemes :: [Phoneme] turkishPhonemes = [ -- Vowels VowelPhoneme "a" (Vowel "ɑ" Open Back Unrounded NormalLength) , VowelPhoneme "a" (Vowel "a" Open Front Unrounded NormalLength) , VowelPhoneme "e" (Vowel "e" CloseMid Front Unrounded NormalLength) , VowelPhoneme "e" (Vowel "ɛ" OpenMid Fron...
2,921
turkishPhonemes :: [Phoneme] turkishPhonemes = [ -- Vowels VowelPhoneme "a" (Vowel "ɑ" Open Back Unrounded NormalLength) , VowelPhoneme "a" (Vowel "a" Open Front Unrounded NormalLength) , VowelPhoneme "e" (Vowel "e" CloseMid Front Unrounded NormalLength) , VowelPhoneme "e" (Vowel "ɛ" OpenMid Fron...
2,921
turkishPhonemes = [ -- Vowels VowelPhoneme "a" (Vowel "ɑ" Open Back Unrounded NormalLength) , VowelPhoneme "a" (Vowel "a" Open Front Unrounded NormalLength) , VowelPhoneme "e" (Vowel "e" CloseMid Front Unrounded NormalLength) , VowelPhoneme "e" (Vowel "ɛ" OpenMid Front Unrounded NormalLength) , ...
2,892
false
true
0
8
694
805
405
400
null
null
skill-lang/skill
src/main/resources/haskell/Deserialize.hs
bsd-3-clause
-- strings, uTs, tDs createState :: String -> IO State createState filePath = initialize filePath >> readIORef state
120
createState :: String -> IO State createState filePath = initialize filePath >> readIORef state
95
createState filePath = initialize filePath >> readIORef state
61
true
true
0
6
21
32
15
17
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
mapIdKey, groupWithIdKey, dollarIdKey :: Unique mapIdKey = mkPreludeMiscIdUnique 121
97
mapIdKey, groupWithIdKey, dollarIdKey :: Unique mapIdKey = mkPreludeMiscIdUnique 121
97
mapIdKey = mkPreludeMiscIdUnique 121
49
false
true
0
5
21
18
11
7
null
null
MaxGabriel/hedis
src/Database/Redis/Commands.hs
bsd-3-clause
debugObject :: (RedisCtx m f) => ByteString -- ^ key -> m (f ByteString) debugObject key = sendRequest (["DEBUG","OBJECT"] ++ [encode key] )
152
debugObject :: (RedisCtx m f) => ByteString -- ^ key -> m (f ByteString) debugObject key = sendRequest (["DEBUG","OBJECT"] ++ [encode key] )
152
debugObject key = sendRequest (["DEBUG","OBJECT"] ++ [encode key] )
67
false
true
0
10
34
65
33
32
null
null
buildsome/buildsome
src/BMake/Base.hs
gpl-2.0
parseMetaVarChar '|' = AllOOInputs
34
parseMetaVarChar '|' = AllOOInputs
34
parseMetaVarChar '|' = AllOOInputs
34
false
false
0
5
3
9
4
5
null
null
fredmorcos/attic
projects/pet/archive/pet_haskell_early/archive/Parser.hs
isc
errorFromState :: ParserState -> ParserError errorFromState state = ParserError { peLine = psLine state , peCol = psCol state , peTok = psTok state , peStage = psStage state ,...
377
errorFromState :: ParserState -> ParserError errorFromState state = ParserError { peLine = psLine state , peCol = psCol state , peTok = psTok state , peStage = psStage state ,...
377
errorFromState state = ParserError { peLine = psLine state , peCol = psCol state , peTok = psTok state , peStage = psStage state , peError = Undefined ...
332
false
true
0
7
213
62
34
28
null
null
kylcarte/qclib
src/Bootstrap/Layout.hs
bsd-3-clause
colClasses12Cols :: Monad m => Maybe T.Text -> Maybe T.Text -> m [T.Text] colClasses12Cols mc mo = do mcols <- viewInt mc moff <- viewInt mo (width,offset) <- case (mcols,moff) of -- width=x offset=y (Just (c,ct),Just (o,ot)) -- offset is non-zero | and [c >= 0,o > 0,c + o <= 12] -> r...
1,179
colClasses12Cols :: Monad m => Maybe T.Text -> Maybe T.Text -> m [T.Text] colClasses12Cols mc mo = do mcols <- viewInt mc moff <- viewInt mo (width,offset) <- case (mcols,moff) of -- width=x offset=y (Just (c,ct),Just (o,ot)) -- offset is non-zero | and [c >= 0,o > 0,c + o <= 12] -> r...
1,179
colClasses12Cols mc mo = do mcols <- viewInt mc moff <- viewInt mo (width,offset) <- case (mcols,moff) of -- width=x offset=y (Just (c,ct),Just (o,ot)) -- offset is non-zero | and [c >= 0,o > 0,c + o <= 12] -> return (ct,Just ot) -- offset is zero | and [c >= 0,o == 0,c <=...
1,105
false
true
0
17
389
486
249
237
null
null
bennofs/hcltest
src/Test/HClTest/Monad.hs
bsd-3-clause
-- | This is a HClTest action that always fails. The first argument is the trace to leave. -- If you want to fail without leaving a trace, you can just use 'mzero'. failTest :: a -> HClTest a b failTest x = traceMsg x *> HClTest mzero
234
failTest :: a -> HClTest a b failTest x = traceMsg x *> HClTest mzero
69
failTest x = traceMsg x *> HClTest mzero
40
true
true
0
6
47
35
17
18
null
null
dsj36/dropray
src/Core/LinearAlgebra.hs
gpl-3.0
det3 :: Matrix4 -> DFloat det3 m = mat(0,0) * t1 - mat(0,1) * t2 + mat(0,2) * t3 where t1 = mat(1,1) * mat(2,2) - mat(1,2) * mat(2,1) t2 = mat(1,0) * mat(2,2) - mat(1,2) * mat(2,0) t3 = mat(1,0) * mat(2,1) - mat(1,1) * mat(2,0) mat (i,j) = getMatEntry i j m -- | Matrix product (uses '&' for m...
371
det3 :: Matrix4 -> DFloat det3 m = mat(0,0) * t1 - mat(0,1) * t2 + mat(0,2) * t3 where t1 = mat(1,1) * mat(2,2) - mat(1,2) * mat(2,1) t2 = mat(1,0) * mat(2,2) - mat(1,2) * mat(2,0) t3 = mat(1,0) * mat(2,1) - mat(1,1) * mat(2,0) mat (i,j) = getMatEntry i j m -- | Matrix product (uses '&' for m...
371
det3 m = mat(0,0) * t1 - mat(0,1) * t2 + mat(0,2) * t3 where t1 = mat(1,1) * mat(2,2) - mat(1,2) * mat(2,1) t2 = mat(1,0) * mat(2,2) - mat(1,2) * mat(2,0) t3 = mat(1,0) * mat(2,1) - mat(1,1) * mat(2,0) mat (i,j) = getMatEntry i j m -- | Matrix product (uses '&' for matrices -- see Core.Geomet...
345
false
true
9
8
94
229
133
96
null
null
maple-shaft/HaskellTetris
src/GlossUtilities.hs
mit
convert24BitTo32BitBMP :: Bool -> B.ByteString -> B.ByteString convert24BitTo32BitBMP isTransparent x | (not $ B.null x) && (B.head x == 0x00) = (convert24BitTo32BitBMP isTransparent $ B.tail x) | not $ B.null x = B.append (B.snoc (B.take 3 x) transparencyByte) (convert24BitTo32BitBMP isTransparent $ ...
521
convert24BitTo32BitBMP :: Bool -> B.ByteString -> B.ByteString convert24BitTo32BitBMP isTransparent x | (not $ B.null x) && (B.head x == 0x00) = (convert24BitTo32BitBMP isTransparent $ B.tail x) | not $ B.null x = B.append (B.snoc (B.take 3 x) transparencyByte) (convert24BitTo32BitBMP isTransparent $ ...
521
convert24BitTo32BitBMP isTransparent x | (not $ B.null x) && (B.head x == 0x00) = (convert24BitTo32BitBMP isTransparent $ B.tail x) | not $ B.null x = B.append (B.snoc (B.take 3 x) transparencyByte) (convert24BitTo32BitBMP isTransparent $ B.drop 3 x) | otherwise = B.empty where transparency...
458
false
true
0
12
108
167
81
86
null
null
facebookincubator/duckling
Duckling/Temperature/KO/Corpus.hs
bsd-3-clause
corpus :: Corpus corpus = (testContext {locale = makeLocale KO Nothing}, testOptions, allExamples)
98
corpus :: Corpus corpus = (testContext {locale = makeLocale KO Nothing}, testOptions, allExamples)
98
corpus = (testContext {locale = makeLocale KO Nothing}, testOptions, allExamples)
81
false
true
0
8
12
33
19
14
null
null
IMOKURI/fft-sample
src/Main.hs
mit
---------- lowCutoffFrequency :: Double lowCutoffFrequency = 40.0
66
lowCutoffFrequency :: Double lowCutoffFrequency = 40.0
54
lowCutoffFrequency = 40.0
25
true
true
0
6
7
19
8
11
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_PL_HERE_Q :: Int wxSTC_PL_HERE_Q = 23
43
wxSTC_PL_HERE_Q :: Int wxSTC_PL_HERE_Q = 23
43
wxSTC_PL_HERE_Q = 23
20
false
true
0
4
5
11
6
5
null
null
tmcdonell/vector-parallel
Data/Vector/Parallel.hs
bsd-3-clause
enumFromN :: Num a => a -> Int -> Vector a enumFromN = G.enumFromN
66
enumFromN :: Num a => a -> Int -> Vector a enumFromN = G.enumFromN
66
enumFromN = G.enumFromN
23
false
true
0
8
13
31
15
16
null
null
GaloisInc/gidl
src/Gidl/Schema.hs
bsd-3-clause
-- XXX eventaully add set rate? consumerMessages (attrname, (AttrMethod perm tr)) = [ setRequestMessage attrname tr | writable perm ] ++ [ getRequestMessage attrname tr | readable perm ]
190
consumerMessages (attrname, (AttrMethod perm tr)) = [ setRequestMessage attrname tr | writable perm ] ++ [ getRequestMessage attrname tr | readable perm ]
158
consumerMessages (attrname, (AttrMethod perm tr)) = [ setRequestMessage attrname tr | writable perm ] ++ [ getRequestMessage attrname tr | readable perm ]
158
true
false
0
8
32
58
29
29
null
null
sydow/ireal
applications/Plot.hs
bsd-3-clause
plotData :: [[String]] -> String -> String -> IO () plotData [] _ _ = clear
77
plotData :: [[String]] -> String -> String -> IO () plotData [] _ _ = clear
77
plotData [] _ _ = clear
25
false
true
0
10
17
48
23
25
null
null
input-output-hk/pos-haskell-prototype
core/src/Pos/Core/Util/LogSafe.hs
mit
logWarningSP = logMessageSP Warning
35
logWarningSP = logMessageSP Warning
35
logWarningSP = logMessageSP Warning
35
false
false
0
5
3
9
4
5
null
null
msakai/icfpc2014
ULambda.hs
bsd-3-clause
list :: [Expr] -> Expr list = foldr cons nil
44
list :: [Expr] -> Expr list = foldr cons nil
44
list = foldr cons nil
21
false
true
0
7
9
31
13
18
null
null
elieux/ghc
libraries/base/Data/OldList.hs
bsd-3-clause
genericLength [] = 0
28
genericLength [] = 0
28
genericLength [] = 0
28
false
false
0
6
11
11
5
6
null
null
brendanhay/gogol
gogol-kgsearch/gen/Network/Google/Resource/Kgsearch/Entities/Search.hs
mpl-2.0
-- | Enables prefix match against names and aliases of entities esPrefix :: Lens' EntitiesSearch (Maybe Bool) esPrefix = lens _esPrefix (\ s a -> s{_esPrefix = a})
163
esPrefix :: Lens' EntitiesSearch (Maybe Bool) esPrefix = lens _esPrefix (\ s a -> s{_esPrefix = a})
99
esPrefix = lens _esPrefix (\ s a -> s{_esPrefix = a})
53
true
true
0
9
27
46
25
21
null
null
ssaavedra/liquidhaskell
tests/pos/adt0.hs
bsd-3-clause
goo z = P z z
13
goo z = P z z
13
goo z = P z z
13
false
false
0
5
5
14
6
8
null
null
tjakway/ghcjvm
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
{- Ticked Expressions ------------------ The idea is that the "breakpoint<n,fvs> E" is really just an annotation on the code. When we find such a thing, we pull out the useful information, and then compile the code as if it was just the expression E. -} -- Compile code to do a tail call. Specifically, p...
3,298
schemeT :: Word -- Stack depth -> Sequel -- Sequel depth -> BCEnv -- stack env -> AnnExpr' Id DVarSet -> BcM BCInstrList schemeT d s p app -- | trace ("schemeT: env in = \n" ++ showSDocDebug (ppBCEnv p)) False -- = panic "schemeT ?!?!" -- | trace ("\nschemeT\...
2,104
schemeT d s p app -- | trace ("schemeT: env in = \n" ++ showSDocDebug (ppBCEnv p)) False -- = panic "schemeT ?!?!" -- | trace ("\nschemeT\n" ++ showSDoc (pprCoreExpr (deAnnotate' app)) ++ "\n") False -- = error "?!?!" -- Case 0 | Just (arg, constr_names) <- maybe_is_tagToEnum_call app = implement_ta...
1,930
true
true
0
14
900
420
220
200
null
null
4e6/sandbox
haskell/HackerRank/Mathematics/FillingJarsVect.hs
mit
main :: IO () main = do (n,m) <- U.readPair ops <- readOps m let avg = runST $ do jars <- UM.unsafeNew (n+1) runOps ops jars average n jars res = truncate avg :: Int print res
215
main :: IO () main = do (n,m) <- U.readPair ops <- readOps m let avg = runST $ do jars <- UM.unsafeNew (n+1) runOps ops jars average n jars res = truncate avg :: Int print res
215
main = do (n,m) <- U.readPair ops <- readOps m let avg = runST $ do jars <- UM.unsafeNew (n+1) runOps ops jars average n jars res = truncate avg :: Int print res
201
false
true
0
16
77
106
49
57
null
null
postgres-haskell/postgres-wire
src/Database/PostgreSQL/Driver/RawConnection.hs
mit
unixPathFilename :: B.ByteString unixPathFilename = ".s.PGSQL."
63
unixPathFilename :: B.ByteString unixPathFilename = ".s.PGSQL."
63
unixPathFilename = ".s.PGSQL."
30
false
true
0
5
5
13
7
6
null
null
Delapouite/dotfiles
link/.xmonad/xmonad.bepo.hs
mit
-- Window rules: -- Execute arbitrary actions and WindowSet manipulations when managing -- a new window. You can use this to, for example, always float a -- particular program, or have a client always appear on a particular -- workspace. -- -- To find the property name associated with a program, use -- > xprop | grep ...
825
myManageHook = composeAll [ className =? "MPlayer" --> doFloat , className =? "Firefox" --> doShift "2" , className =? "Chromium" --> doShift "3" , className =? "Deadbeef" --> doShift "9" , resource =? "desktop_window" --> doIgnore , resource =? "kdesktop" --> d...
329
myManageHook = composeAll [ className =? "MPlayer" --> doFloat , className =? "Firefox" --> doShift "2" , className =? "Chromium" --> doShift "3" , className =? "Deadbeef" --> doShift "9" , resource =? "desktop_window" --> doIgnore , resource =? "kdesktop" --> d...
329
true
false
0
7
191
96
55
41
null
null
mcschroeder/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
otherNameSpace TvName = TcClsName
33
otherNameSpace TvName = TcClsName
33
otherNameSpace TvName = TcClsName
33
false
false
0
5
3
9
4
5
null
null
kbiscanic/PUH
hw07/exercises.hs
mit
maxDiff :: [Int] -> Int maxDiff xs@(_:y) = maximum . map (abs . (uncurry (-))) $ zip xs y
89
maxDiff :: [Int] -> Int maxDiff xs@(_:y) = maximum . map (abs . (uncurry (-))) $ zip xs y
89
maxDiff xs@(_:y) = maximum . map (abs . (uncurry (-))) $ zip xs y
65
false
true
0
11
18
62
33
29
null
null
gcampax/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
staticPtrDataConKey :: Unique staticPtrDataConKey = mkPreludeDataConUnique 33
97
staticPtrDataConKey :: Unique staticPtrDataConKey = mkPreludeDataConUnique 33
97
staticPtrDataConKey = mkPreludeDataConUnique 33
67
false
true
0
5
26
14
7
7
null
null
typedrat/typedrat-site
app/Typedrat/Routes.hs
gpl-3.0
oauthRedirectR :: Path '[] Open oauthRedirectR = "auth" <//> "redirect"
71
oauthRedirectR :: Path '[] Open oauthRedirectR = "auth" <//> "redirect"
71
oauthRedirectR = "auth" <//> "redirect"
39
false
true
0
7
9
24
12
12
null
null
abailly/yate
src/Yate/Template.hs
bsd-3-clause
selectMult _ _ = []
50
selectMult _ _ = []
50
selectMult _ _ = []
50
false
false
1
6
35
14
6
8
null
null
brownsys/nettle-openflow
src/Nettle/IPv4/IPAddress.hs
bsd-3-clause
prefixOverlaps :: IPAddressPrefix -> IPAddressPrefix -> Bool prefixOverlaps p1@(IPAddress addr, len) p2@(IPAddress addr', len') | addr .&. mask == addr' .&. mask = True | otherwise = False where len'' = min len len' mask = foldl setBit (0 :: Word32) [(32 - fromIntegral len'...
327
prefixOverlaps :: IPAddressPrefix -> IPAddressPrefix -> Bool prefixOverlaps p1@(IPAddress addr, len) p2@(IPAddress addr', len') | addr .&. mask == addr' .&. mask = True | otherwise = False where len'' = min len len' mask = foldl setBit (0 :: Word32) [(32 - fromIntegral len'...
327
prefixOverlaps p1@(IPAddress addr, len) p2@(IPAddress addr', len') | addr .&. mask == addr' .&. mask = True | otherwise = False where len'' = min len len' mask = foldl setBit (0 :: Word32) [(32 - fromIntegral len'')..31]
266
false
true
2
10
90
119
62
57
null
null
philipturnbull/quenelle
src/Quenelle/Replace.hs
gpl-2.0
lookupExpressionBinding (ExpressionBinding ename e:bs) name | ename == name = Just e | otherwise = lookupExpressionBinding bs name
138
lookupExpressionBinding (ExpressionBinding ename e:bs) name | ename == name = Just e | otherwise = lookupExpressionBinding bs name
138
lookupExpressionBinding (ExpressionBinding ename e:bs) name | ename == name = Just e | otherwise = lookupExpressionBinding bs name
138
false
false
1
8
25
48
22
26
null
null
fmapfmapfmap/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/SetDesiredCapacity.hs
mpl-2.0
-- | Creates a value of 'SetDesiredCapacityResponse' with the minimum fields required to make a request. -- setDesiredCapacityResponse :: SetDesiredCapacityResponse setDesiredCapacityResponse = SetDesiredCapacityResponse'
225
setDesiredCapacityResponse :: SetDesiredCapacityResponse setDesiredCapacityResponse = SetDesiredCapacityResponse'
117
setDesiredCapacityResponse = SetDesiredCapacityResponse'
56
true
true
1
5
26
17
8
9
null
null
Copilot-Language/sbv-for-copilot
Data/SBV/BitVectors/Model.hs
bsd-3-clause
isConcreteOne (SBV (SVal KReal (Left (CW KReal (CWAlgReal v))))) = isExactRational v && v == 1
94
isConcreteOne (SBV (SVal KReal (Left (CW KReal (CWAlgReal v))))) = isExactRational v && v == 1
94
isConcreteOne (SBV (SVal KReal (Left (CW KReal (CWAlgReal v))))) = isExactRational v && v == 1
94
false
false
0
15
15
54
26
28
null
null
ejlilley/AbstractMusic
LilyParse.hs
gpl-3.0
sexpChars = validIdentifiers ++ ['0'..'9'] ++ [' ', '-', '\'', '\"', ':', '#']
78
sexpChars = validIdentifiers ++ ['0'..'9'] ++ [' ', '-', '\'', '\"', ':', '#']
78
sexpChars = validIdentifiers ++ ['0'..'9'] ++ [' ', '-', '\'', '\"', ':', '#']
78
false
false
0
7
12
37
22
15
null
null
xkollar/handy-haskell
other/pt-2012-03/sat/kwak.hs
gpl-3.0
-- "virtual" edge 0 from node 1 to "parent" between :: T -> T -> T -> Bool between l u x = l <= x && x <= u
108
between :: T -> T -> T -> Bool between l u x = l <= x && x <= u
63
between l u x = l <= x && x <= u
32
true
true
0
7
30
43
22
21
null
null
nickng/gong
StuffParams.hs
apache-2.0
twored = do t <- unfoldTop simpleEx unfoldTop t
51
twored = do t <- unfoldTop simpleEx unfoldTop t
51
twored = do t <- unfoldTop simpleEx unfoldTop t
51
false
false
0
8
12
22
9
13
null
null
gustavoramos00/tecnicas-topdown
S8_2.hs
mit
dfs8Tile :: [[Position]] dfs8Tile = map elems ls where ((BDS ls):_) = searchDfs succ8Tile goal8Tile (BDS [s8T]) -- Section 8.2.4
132
dfs8Tile :: [[Position]] dfs8Tile = map elems ls where ((BDS ls):_) = searchDfs succ8Tile goal8Tile (BDS [s8T]) -- Section 8.2.4
132
dfs8Tile = map elems ls where ((BDS ls):_) = searchDfs succ8Tile goal8Tile (BDS [s8T]) -- Section 8.2.4
106
false
true
0
9
23
60
32
28
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
-- intermediate only phaseInputExt (Hsc _) = "hspp"
63
phaseInputExt (Hsc _) = "hspp"
42
phaseInputExt (Hsc _) = "hspp"
42
true
false
0
7
19
16
8
8
null
null
crackleware/hscolour
Language/Haskell/HsColour/LaTeX.hs
gpl-2.0
latexColour Magenta = "magenta"
31
latexColour Magenta = "magenta"
31
latexColour Magenta = "magenta"
31
false
false
0
5
3
9
4
5
null
null
wxwxwwxxx/ghc
utils/hpc/HpcFlags.hs
bsd-3-clause
srcDirOpt = anArg "srcdir" "path to source directory of .hs files" "DIR" (\ a f -> f { srcDirs = srcDirs f ++ [a] }) . infoArg "multi-use of srcdir possible"
201
srcDirOpt = anArg "srcdir" "path to source directory of .hs files" "DIR" (\ a f -> f { srcDirs = srcDirs f ++ [a] }) . infoArg "multi-use of srcdir possible"
201
srcDirOpt = anArg "srcdir" "path to source directory of .hs files" "DIR" (\ a f -> f { srcDirs = srcDirs f ++ [a] }) . infoArg "multi-use of srcdir possible"
201
false
false
0
12
74
50
26
24
null
null
deech/fltkhs-fluid-examples
src/TreeCallbacks.hs
mit
reselectmode_chooser_callback :: Ref Tree -> Ref Choice -> IO () reselectmode_chooser_callback _ chooser = do deactivate chooser setTooltip chooser ("DISABLED.\n" `T.append` "Set FLTK_ABI_VERSION to 10301 (or higher)\n" `T.append` "to enable this feature")
260
reselectmode_chooser_callback :: Ref Tree -> Ref Choice -> IO () reselectmode_chooser_callback _ chooser = do deactivate chooser setTooltip chooser ("DISABLED.\n" `T.append` "Set FLTK_ABI_VERSION to 10301 (or higher)\n" `T.append` "to enable this feature")
260
reselectmode_chooser_callback _ chooser = do deactivate chooser setTooltip chooser ("DISABLED.\n" `T.append` "Set FLTK_ABI_VERSION to 10301 (or higher)\n" `T.append` "to enable this feature")
195
false
true
0
10
35
68
33
35
null
null
m00nlight/hackerrank
functional/memorization-dp/Bitter-Chocolate/main.hs
gpl-2.0
dp :: Int -> Int -> Int -> M.Map (Int, Int, Int) Bool dp r1 r2 r3 = foldl' (\ acc (x,y,z) -> M.insert (x, y, z) (isWin x y z acc) acc) M.empty [(x, y, z) | x <- [0..r1], y <- [0..r2], z <- [0..r3]] where fd = M.findWithDefault isWin 0 0 0 _ = True isWin ...
762
dp :: Int -> Int -> Int -> M.Map (Int, Int, Int) Bool dp r1 r2 r3 = foldl' (\ acc (x,y,z) -> M.insert (x, y, z) (isWin x y z acc) acc) M.empty [(x, y, z) | x <- [0..r1], y <- [0..r2], z <- [0..r3]] where fd = M.findWithDefault isWin 0 0 0 _ = True isWin ...
762
dp r1 r2 r3 = foldl' (\ acc (x,y,z) -> M.insert (x, y, z) (isWin x y z acc) acc) M.empty [(x, y, z) | x <- [0..r1], y <- [0..r2], z <- [0..r3]] where fd = M.findWithDefault isWin 0 0 0 _ = True isWin 1 0 0 _ = False isWin x y z acc = flag1 ||...
708
false
true
0
15
368
383
204
179
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ElasticLoadBalancingV2TargetGroup.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-targetgroupattributes elbvtgTargetGroupAttributes :: Lens' ElasticLoadBalancingV2TargetGroup (Maybe [ElasticLoadBalancingV2TargetGroupTargetGroupAttribute]) elbv...
482
elbvtgTargetGroupAttributes :: Lens' ElasticLoadBalancingV2TargetGroup (Maybe [ElasticLoadBalancingV2TargetGroupTargetGroupAttribute]) elbvtgTargetGroupAttributes = lens _elasticLoadBalancingV2TargetGroupTargetGroupAttributes (\s a -> s { _elasticLoadBalancingV2TargetGroupTargetGroupAttributes = a })
301
elbvtgTargetGroupAttributes = lens _elasticLoadBalancingV2TargetGroupTargetGroupAttributes (\s a -> s { _elasticLoadBalancingV2TargetGroupTargetGroupAttributes = a })
166
true
true
0
9
21
49
27
22
null
null
ethercrow/y
src/Y/Keymap/Toy.hs
bsd-3-clause
anyBigChar _ = NoMatch
22
anyBigChar _ = NoMatch
22
anyBigChar _ = NoMatch
22
false
false
0
5
3
9
4
5
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
r1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "R1")
58
r1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "R1")
58
r1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "R1")
58
false
false
0
7
9
17
8
9
null
null
stumped2/school
CS381/hw3/Hw3.hs
apache-2.0
semCmd (DUP) (x1:xs) = [x1,x1] ++ xs
36
semCmd (DUP) (x1:xs) = [x1,x1] ++ xs
36
semCmd (DUP) (x1:xs) = [x1,x1] ++ xs
36
false
false
0
7
6
31
17
14
null
null
conal/hermit
src/HERMIT/Kure.hs
bsd-2-clause
-- | Transform a coercion of the form: @SymCo@ 'Coercion' symCoT :: (ExtendPath c Crumb, Monad m) => Transform c m Coercion b -> Transform c m Coercion b symCoT t = transform $ \ c -> \case SymCo co -> applyT t (c @@ SymCo_Co) co _ -> fail "no...
345
symCoT :: (ExtendPath c Crumb, Monad m) => Transform c m Coercion b -> Transform c m Coercion b symCoT t = transform $ \ c -> \case SymCo co -> applyT t (c @@ SymCo_Co) co _ -> fail "not a symmetric coercion."
287
symCoT t = transform $ \ c -> \case SymCo co -> applyT t (c @@ SymCo_Co) co _ -> fail "not a symmetric coercion."
191
true
true
0
12
131
97
48
49
null
null
girving/duck
duck/TypeSet.hs
bsd-3-clause
intersect (TyFun f) (TyFun f') = return ( if f == f' then Just (TyFun f) else Nothing)
90
intersect (TyFun f) (TyFun f') = return ( if f == f' then Just (TyFun f) else Nothing)
90
intersect (TyFun f) (TyFun f') = return ( if f == f' then Just (TyFun f) else Nothing)
90
false
false
0
10
21
52
25
27
null
null
piyush-kurur/shakespeare
shakespeare-css/Text/Css.hs
bsd-2-clause
contentToBuilder r _ (ContentUrl u) = [|fromText|] `appE` (varE r `appE` return (derefToExp [] u) `appE` listE [])
126
contentToBuilder r _ (ContentUrl u) = [|fromText|] `appE` (varE r `appE` return (derefToExp [] u) `appE` listE [])
126
contentToBuilder r _ (ContentUrl u) = [|fromText|] `appE` (varE r `appE` return (derefToExp [] u) `appE` listE [])
126
false
false
1
13
29
71
36
35
null
null
xmonad/xmonad-contrib
XMonad/Hooks/DynamicIcons.hs
bsd-3-clause
-- | 'iconConfigFmt' that appends icons to the workspace name. -- -- First parameter specifies how to concatenate multiple icons. Useful values -- include: 'concat', 'unwords', 'wrapUnwords'. -- -- ==== __Examples__ -- -- >>> iconsFmtAppend concat "1" [] -- "1" -- -- >>> iconsFmtAppend concat "1" ["A", "B"] -- "1:AB" i...
494
iconsFmtAppend :: ([String] -> String) -> WorkspaceId -> [String] -> String iconsFmtAppend cat ws is | null is = ws | otherwise = ws ++ ':' : cat is
175
iconsFmtAppend cat ws is | null is = ws | otherwise = ws ++ ':' : cat is
99
true
true
0
8
105
84
47
37
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Coverage.hs
bsd-3-clause
isGoodTickSrcSpan :: SrcSpan -> TM Bool isGoodTickSrcSpan pos = do file_name <- getFileName tickish <- tickishType `liftM` getEnv let need_same_file = tickSameFileOnly tickish same_file = Just file_name == srcSpanFileName_maybe pos return (isGoodSrcSpan' pos && (not need_same_file || same_file))
315
isGoodTickSrcSpan :: SrcSpan -> TM Bool isGoodTickSrcSpan pos = do file_name <- getFileName tickish <- tickishType `liftM` getEnv let need_same_file = tickSameFileOnly tickish same_file = Just file_name == srcSpanFileName_maybe pos return (isGoodSrcSpan' pos && (not need_same_file || same_file))
315
isGoodTickSrcSpan pos = do file_name <- getFileName tickish <- tickishType `liftM` getEnv let need_same_file = tickSameFileOnly tickish same_file = Just file_name == srcSpanFileName_maybe pos return (isGoodSrcSpan' pos && (not need_same_file || same_file))
275
false
true
0
12
56
94
44
50
null
null
elliottt/hsopenid
src/Network/OpenID/Utils.hs
bsd-3-clause
-- MonadLib Helpers ------------------------------------------------------------ -- | Read inside of an Exception monad readM :: (ExceptionM m e, Read a) => e -> String -> m a readM e str = case reads str of [(x,"")] -> return x _ -> raise e -- | Lookup parameters inside an exception handling monad
313
readM :: (ExceptionM m e, Read a) => e -> String -> m a readM e str = case reads str of [(x,"")] -> return x _ -> raise e -- | Lookup parameters inside an exception handling monad
192
readM e str = case reads str of [(x,"")] -> return x _ -> raise e -- | Lookup parameters inside an exception handling monad
136
true
true
2
8
64
82
42
40
null
null
bergmark/hlint
data/Test.hs
bsd-3-clause
error = zip [1..length x] x ==> zipFrom 1 x
43
error = zip [1..length x] x ==> zipFrom 1 x
43
error = zip [1..length x] x ==> zipFrom 1 x
43
false
false
2
6
9
31
12
19
null
null
martinra/hlinear
src/HLinear/Hook/LeftTransformation/Column.hs
gpl-3.0
toVector :: Rng a => LeftTransformationColumn a -> Vector a toVector (LeftTransformationColumn o a v) = V.replicate o zero <> a' `V.cons` fmap (*a') v where a' = fromUnit a
186
toVector :: Rng a => LeftTransformationColumn a -> Vector a toVector (LeftTransformationColumn o a v) = V.replicate o zero <> a' `V.cons` fmap (*a') v where a' = fromUnit a
186
toVector (LeftTransformationColumn o a v) = V.replicate o zero <> a' `V.cons` fmap (*a') v where a' = fromUnit a
124
false
true
2
7
43
81
39
42
null
null
patperry/permutation
lib/Data/Permute/Base.hs
bsd-3-clause
unsafeSwapElemsSTPermute :: STPermute s -> Int -> Int -> ST s () unsafeSwapElemsSTPermute (STPermute marr) i j = ArrST.unsafeSwap marr i j
138
unsafeSwapElemsSTPermute :: STPermute s -> Int -> Int -> ST s () unsafeSwapElemsSTPermute (STPermute marr) i j = ArrST.unsafeSwap marr i j
138
unsafeSwapElemsSTPermute (STPermute marr) i j = ArrST.unsafeSwap marr i j
73
false
true
0
9
21
55
26
29
null
null
vikraman/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
-- |Create a localised variant of a name. -- -- If the name is external, encode the original's module name to disambiguate. -- SPJ says: this looks like a rather odd-looking function; but it seems to -- be used only during vectorisation, so I'm not going to worry mkLocalisedOccName :: Module -> (Maybe String ...
939
mkLocalisedOccName :: Module -> (Maybe String -> OccName -> OccName) -> Name -> OccName mkLocalisedOccName this_mod mk_occ name = mk_occ origin (nameOccName name) where origin | nameIsLocalOrFrom this_mod name = Nothing | otherwise = Just (moduleNameColons . moduleName . nameModu...
665
mkLocalisedOccName this_mod mk_occ name = mk_occ origin (nameOccName name) where origin | nameIsLocalOrFrom this_mod name = Nothing | otherwise = Just (moduleNameColons . moduleName . nameModule $ name) {- ************************************************************************ ...
577
true
true
0
10
289
107
54
53
null
null
MnO2/lazy-doc
src/Action/Server.hs
bsd-3-clause
server :: Server UserAPI server = return users
46
server :: Server UserAPI server = return users
46
server = return users
21
false
true
0
5
7
17
8
9
null
null
kosmoskatten/hats
src/Network/Nats/Message/Writer.hs
mit
-- | Server indication of a protocol, authorization, or other -- runtime connection error. writeMessage' (ERR pe) = byteString "-ERR " <> writePE pe <> "\r\n"
158
writeMessage' (ERR pe) = byteString "-ERR " <> writePE pe <> "\r\n"
67
writeMessage' (ERR pe) = byteString "-ERR " <> writePE pe <> "\r\n"
67
true
false
0
7
25
31
15
16
null
null
energyflowanalysis/efa-2.1
examples/elementary/optimisingStorage/Main.hs
bsd-3-clause
-- | Provide time of sec1 and inner resistance of battery given :: Double -> Double -> Double -> EqSys.EquationSystemIgnore Node s Double Double given y' p' nParam' = (stoinit =.= EqSys.constant 3) <> (p12 sec0 =.= p) <> (e12 sec0 =.= (1-y)*(t*p)) <> (e32 sec0 =.= e32 sec1) <> (n0...
667
given :: Double -> Double -> Double -> EqSys.EquationSystemIgnore Node s Double Double given y' p' nParam' = (stoinit =.= EqSys.constant 3) <> (p12 sec0 =.= p) <> (e12 sec0 =.= (1-y)*(t*p)) <> (e32 sec0 =.= e32 sec1) <> (n02 sec0 =.= fn02_p20 (p20 sec0)) <> (n21 sec0 =.= 1) <>...
609
given y' p' nParam' = (stoinit =.= EqSys.constant 3) <> (p12 sec0 =.= p) <> (e12 sec0 =.= (1-y)*(t*p)) <> (e32 sec0 =.= e32 sec1) <> (n02 sec0 =.= fn02_p20 (p20 sec0)) <> (n21 sec0 =.= 1) <> (n23 sec0 =.= (fn23_p32 nParam (p32 sec0))) <> (e12 sec1 =.= y*p) <> (p12 sec1 =.= p) <> (n21 sec1 =.= 1) ...
495
true
true
23
10
186
306
147
159
null
null
mlite/hLLVM
src/Llvm/Asm/Simplification.hs
bsd-3-clause
rnLabelId :: LabelId -> MS LabelId rnLabelId x = return x
57
rnLabelId :: LabelId -> MS LabelId rnLabelId x = return x
57
rnLabelId x = return x
22
false
true
0
7
10
29
12
17
null
null
bgamari/HTTP
Network/StreamSocket.hs
bsd-3-clause
myrecv :: Socket -> Int -> IO String myrecv sock len = let handler e = if isEOFError e then return [] else ioError e in catchIO (recv sock len) handler
163
myrecv :: Socket -> Int -> IO String myrecv sock len = let handler e = if isEOFError e then return [] else ioError e in catchIO (recv sock len) handler
163
myrecv sock len = let handler e = if isEOFError e then return [] else ioError e in catchIO (recv sock len) handler
126
false
true
0
11
42
78
35
43
null
null
snoyberg/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprImm (HA (ImmInteger i)) = pprImm (ImmInteger ha16) where ha16 = if lo16 >= 0x8000 then hi16+1 else hi16 hi16 = (i `shiftR` 16) lo16 = i .&. 0xffff
163
pprImm (HA (ImmInteger i)) = pprImm (ImmInteger ha16) where ha16 = if lo16 >= 0x8000 then hi16+1 else hi16 hi16 = (i `shiftR` 16) lo16 = i .&. 0xffff
163
pprImm (HA (ImmInteger i)) = pprImm (ImmInteger ha16) where ha16 = if lo16 >= 0x8000 then hi16+1 else hi16 hi16 = (i `shiftR` 16) lo16 = i .&. 0xffff
163
false
false
5
8
42
90
42
48
null
null
fmapfmapfmap/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/CreateCacheSecurityGroup.hs
mpl-2.0
-- | The response status code. ccsgrsResponseStatus :: Lens' CreateCacheSecurityGroupResponse Int ccsgrsResponseStatus = lens _ccsgrsResponseStatus (\ s a -> s{_ccsgrsResponseStatus = a})
187
ccsgrsResponseStatus :: Lens' CreateCacheSecurityGroupResponse Int ccsgrsResponseStatus = lens _ccsgrsResponseStatus (\ s a -> s{_ccsgrsResponseStatus = a})
156
ccsgrsResponseStatus = lens _ccsgrsResponseStatus (\ s a -> s{_ccsgrsResponseStatus = a})
89
true
true
0
9
21
40
22
18
null
null
forsyde/forsyde-shallow
src/ForSyDe/Shallow/Utility/Gaussian.hs
bsd-3-clause
uniform :: (Fractional a, System.Random.RandomGen g, System.Random.Random a) => g -> (a, g) uniform rGen = System.Random.randomR (0.0,1.0) rGen
146
uniform :: (Fractional a, System.Random.RandomGen g, System.Random.Random a) => g -> (a, g) uniform rGen = System.Random.randomR (0.0,1.0) rGen
146
uniform rGen = System.Random.randomR (0.0,1.0) rGen
51
false
true
0
9
21
70
37
33
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ImportImage.hs
mpl-2.0
-- | Information about the snapshots. irsSnapshotDetails :: Lens' ImportImageResponse [SnapshotDetail] irsSnapshotDetails = lens _irsSnapshotDetails (\ s a -> s{_irsSnapshotDetails = a}) . _Default . _Coerce
207
irsSnapshotDetails :: Lens' ImportImageResponse [SnapshotDetail] irsSnapshotDetails = lens _irsSnapshotDetails (\ s a -> s{_irsSnapshotDetails = a}) . _Default . _Coerce
169
irsSnapshotDetails = lens _irsSnapshotDetails (\ s a -> s{_irsSnapshotDetails = a}) . _Default . _Coerce
104
true
true
0
11
25
51
28
23
null
null
supki/libnotify
example/notify-send.hs
mit
parseOpts :: IO Options parseOpts = customExecParser (prefs showHelpOnError) (info (helper <*> parser) desc) where desc = fullDesc <> progDesc "Create a notification." <> header "notify-send - an example of the libnotify library" parser = do summary <- argument str (metavar "SUMMARY") body <- optiona...
2,429
parseOpts :: IO Options parseOpts = customExecParser (prefs showHelpOnError) (info (helper <*> parser) desc) where desc = fullDesc <> progDesc "Create a notification." <> header "notify-send - an example of the libnotify library" parser = do summary <- argument str (metavar "SUMMARY") body <- optiona...
2,429
parseOpts = customExecParser (prefs showHelpOnError) (info (helper <*> parser) desc) where desc = fullDesc <> progDesc "Create a notification." <> header "notify-send - an example of the libnotify library" parser = do summary <- argument str (metavar "SUMMARY") body <- optional (argument str (metavar...
2,405
false
true
16
20
836
853
393
460
null
null
locaweb/leela
src/warpdrive/src/Leela/Network/WarpServer.hs
apache-2.0
process _ _ srv (Fetch sig fh) flush = void $ forkIO $ do let channel = (sigUser sig, fh) notice (logger srv) (printf "FETCH %d" fh) withFD srv channel $ \mdev -> case mdev of Nothing -> flush $ Fail 404 $ Just "no such channel" Just dev -> qread dev >>= \msg -> case msg of ...
508
process _ _ srv (Fetch sig fh) flush = void $ forkIO $ do let channel = (sigUser sig, fh) notice (logger srv) (printf "FETCH %d" fh) withFD srv channel $ \mdev -> case mdev of Nothing -> flush $ Fail 404 $ Just "no such channel" Just dev -> qread dev >>= \msg -> case msg of ...
508
process _ _ srv (Fetch sig fh) flush = void $ forkIO $ do let channel = (sigUser sig, fh) notice (logger srv) (printf "FETCH %d" fh) withFD srv channel $ \mdev -> case mdev of Nothing -> flush $ Fail 404 $ Just "no such channel" Just dev -> qread dev >>= \msg -> case msg of ...
508
false
false
0
24
192
214
100
114
null
null
bgamari/text
tests/Tests/Properties.hs
bsd-2-clause
tl_scanr f z = L.scanr f z `eqP` (unpackS . TL.scanr f z)
64
tl_scanr f z = L.scanr f z `eqP` (unpackS . TL.scanr f z)
64
tl_scanr f z = L.scanr f z `eqP` (unpackS . TL.scanr f z)
64
false
false
0
9
19
38
19
19
null
null
elieux/ghc
compiler/main/DriverMkDepend.hs
bsd-3-clause
processDeps :: DynFlags -> HscEnv -> [ModuleName] -> FilePath -> Handle -- Write dependencies to here -> SCC ModSummary -> IO () -- Write suitable dependencies to handle -- Always: -- this.o : this.hs -- -- If the dep...
881
processDeps :: DynFlags -> HscEnv -> [ModuleName] -> FilePath -> Handle -- Write dependencies to here -> SCC ModSummary -> IO () processDeps dflags _ _ _ _ (CyclicSCC nodes) = -- There shouldn't be any cycles; report them throwG...
394
processDeps dflags _ _ _ _ (CyclicSCC nodes) = -- There shouldn't be any cycles; report them throwGhcExceptionIO (ProgramError (showSDoc dflags $ GHC.cyclicModuleErr nodes))
183
true
true
0
12
318
105
59
46
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/PackageDescription/PrettyPrint.hs
bsd-3-clause
ppSourceRepos :: [SourceRepo] -> Doc ppSourceRepos [] = empty
85
ppSourceRepos :: [SourceRepo] -> Doc ppSourceRepos [] = empty
85
ppSourceRepos [] = empty
48
false
true
0
6
32
23
12
11
null
null
asakamirai/experiment-concurrent-primitives-bench
app/Main.hs
bsd-3-clause
tryTakePutMVar :: MVar Int -> Int -> IO () tryTakePutMVar mv !c = do Just v <- MVar.tryTakeMVar mv M.void $ MVar.tryPutMVar mv c v `seq` return ()
158
tryTakePutMVar :: MVar Int -> Int -> IO () tryTakePutMVar mv !c = do Just v <- MVar.tryTakeMVar mv M.void $ MVar.tryPutMVar mv c v `seq` return ()
158
tryTakePutMVar mv !c = do Just v <- MVar.tryTakeMVar mv M.void $ MVar.tryPutMVar mv c v `seq` return ()
115
false
true
0
9
39
78
35
43
null
null
permeakra/safe-arithmetics-demo-library
tests/TestWord.hs
bsd-3-clause
word1 :: ArExp Word word1 = raiseArith 1
40
word1 :: ArExp Word word1 = raiseArith 1
40
word1 = raiseArith 1
20
false
true
0
6
7
23
9
14
null
null
tdfirth/lambda
src/Lambda/Primitives.hs
mit
unpackStr notString = throwError $ TypeMismatch "string" notString
67
unpackStr notString = throwError $ TypeMismatch "string" notString
67
unpackStr notString = throwError $ TypeMismatch "string" notString
67
false
false
0
6
8
18
8
10
null
null
LJKitchen/ljk-luv-fp-foss
Mapfl.hs
apache-2.0
mapfl _ [] = []
15
mapfl _ [] = []
15
mapfl _ [] = []
15
false
false
0
6
4
15
7
8
null
null
thomie/cabal
Cabal/Distribution/Simple.hs
bsd-3-clause
cleanAction :: UserHooks -> CleanFlags -> Args -> IO () cleanAction hooks flags args = do distPref <- findDistPrefOrDefault (cleanDistPref flags) let flags' = flags { cleanDistPref = toFlag distPref } pbi <- preClean hooks args flags' pdfile <- defaultPackageDesc verbosity ppd <- readPackageDescri...
736
cleanAction :: UserHooks -> CleanFlags -> Args -> IO () cleanAction hooks flags args = do distPref <- findDistPrefOrDefault (cleanDistPref flags) let flags' = flags { cleanDistPref = toFlag distPref } pbi <- preClean hooks args flags' pdfile <- defaultPackageDesc verbosity ppd <- readPackageDescri...
736
cleanAction hooks flags args = do distPref <- findDistPrefOrDefault (cleanDistPref flags) let flags' = flags { cleanDistPref = toFlag distPref } pbi <- preClean hooks args flags' pdfile <- defaultPackageDesc verbosity ppd <- readPackageDescription verbosity pdfile let pkg_descr0 = flattenPacka...
680
false
true
0
12
149
185
85
100
null
null
shayan-najd/HsParser
U/Pretty.hs
gpl-3.0
oneLiner (TextBeside s sl p) = textBeside_ s sl (oneLiner p)
60
oneLiner (TextBeside s sl p) = textBeside_ s sl (oneLiner p)
60
oneLiner (TextBeside s sl p) = textBeside_ s sl (oneLiner p)
60
false
false
0
7
10
32
15
17
null
null
ardumont/snake
deps/gloss/Graphics/Gloss/Internals/Interface/Simulate/Idle.hs
bsd-3-clause
untilM :: (Monad m) => (a -> Bool) -> (a -> m a) -> a -> m a untilM test op i = go i where go x | test x = return x | otherwise = op x >>= go
155
untilM :: (Monad m) => (a -> Bool) -> (a -> m a) -> a -> m a untilM test op i = go i where go x | test x = return x | otherwise = op x >>= go
155
untilM test op i = go i where go x | test x = return x | otherwise = op x >>= go
94
false
true
0
11
54
111
50
61
null
null
23Skidoo/xmlhtml
src/Text/XmlHtml/XML/Parse.hs
bsd-3-clause
------------------------------------------------------------------------------ misc :: Parser (Maybe Node) misc = comment <|> processingInstruction <|> (whiteSpace *> return Nothing)
182
misc :: Parser (Maybe Node) misc = comment <|> processingInstruction <|> (whiteSpace *> return Nothing)
103
misc = comment <|> processingInstruction <|> (whiteSpace *> return Nothing)
75
true
true
0
8
15
39
20
19
null
null