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
jamshidh/ethereum-query
src/State.hs
bsd-3-clause
isNecessary _ = True
20
isNecessary _ = True
20
isNecessary _ = True
20
false
false
0
4
3
10
4
6
null
null
1yefuwang1/haskell99problems
src/H99/Miscellaneous.hs
bsd-3-clause
{- Eight queens problem This is a classical problem in computer science. The objective is to place eight queens on a chessboard so that no two queens are attacking each other; i.e., no two queens are in the same row, the same column, or on the same diagonal. Hint: Represent the positions of the queens as a list of nu...
2,740
queens :: Int -> [[Int]] queens n = placeQueens n where placeQueens 0 = return [] placeQueens n' = do queen <- [1..n] queens' <- placeQueens (n'-1) guard $ isSafe queen queens' return $ queen : queens' isSafe :: Int -> [Int] -> Bool isSafe row qs = row `notElem` qs && all (not...
2,158
queens n = placeQueens n where placeQueens 0 = return [] placeQueens n' = do queen <- [1..n] queens' <- placeQueens (n'-1) guard $ isSafe queen queens' return $ queen : queens' isSafe :: Int -> [Int] -> Bool isSafe row qs = row `notElem` qs && all (notDiagonalWith row) (zip qs...
2,133
true
true
2
11
423
225
106
119
null
null
artuuge/IHaskell
ipython-kernel/src/IHaskell/IPython/Types.hs
mit
showMessageType CommCloseMessage = "comm_close"
47
showMessageType CommCloseMessage = "comm_close"
47
showMessageType CommCloseMessage = "comm_close"
47
false
false
0
5
3
9
4
5
null
null
foreverbell/project-euler-solutions
src/187.hs
bsd-3-clause
solve m | from > to = 0 | otherwise = fromJust (M.lookup to count) - fromJust (M.lookup (from - 1) count) where from = m to = n `div` m
153
solve m | from > to = 0 | otherwise = fromJust (M.lookup to count) - fromJust (M.lookup (from - 1) count) where from = m to = n `div` m
153
solve m | from > to = 0 | otherwise = fromJust (M.lookup to count) - fromJust (M.lookup (from - 1) count) where from = m to = n `div` m
153
false
false
0
11
48
84
41
43
null
null
asr/apia
test/Succeed/NonConjectures/Test.hs
mit
allNonConjecturesTests ∷ TestTree allNonConjecturesTests = testGroup "non-conjectures" [ dumpTypesOptionTest , helpOptionTest , interfaceTest , issue18Test , onlineATPTest , onlyFilesOptionTest , verboseOptionTest , unprovenConjectureNoErrorOptionTest ]
271
allNonConjecturesTests ∷ TestTree allNonConjecturesTests = testGroup "non-conjectures" [ dumpTypesOptionTest , helpOptionTest , interfaceTest , issue18Test , onlineATPTest , onlyFilesOptionTest , verboseOptionTest , unprovenConjectureNoErrorOptionTest ]
271
allNonConjecturesTests = testGroup "non-conjectures" [ dumpTypesOptionTest , helpOptionTest , interfaceTest , issue18Test , onlineATPTest , onlyFilesOptionTest , verboseOptionTest , unprovenConjectureNoErrorOptionTest ]
237
false
true
0
5
41
41
24
17
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F30.hs
bsd-3-clause
ptr_glVertexAttrib4NubARB :: FunPtr (GLuint -> GLubyte -> GLubyte -> GLubyte -> GLubyte -> IO ()) ptr_glVertexAttrib4NubARB = unsafePerformIO $ getCommand "glVertexAttrib4NubARB"
178
ptr_glVertexAttrib4NubARB :: FunPtr (GLuint -> GLubyte -> GLubyte -> GLubyte -> GLubyte -> IO ()) ptr_glVertexAttrib4NubARB = unsafePerformIO $ getCommand "glVertexAttrib4NubARB"
178
ptr_glVertexAttrib4NubARB = unsafePerformIO $ getCommand "glVertexAttrib4NubARB"
80
false
true
0
13
20
49
24
25
null
null
xenog/haskoin
src/Network/Haskoin/Script/Evaluator.hs
unlicense
-- | Checks the top of the stack for a minimal numeric representation -- if flagged to do so minimalStackValEnforcer :: StackOperation () minimalStackValEnforcer = do flgs <- ask s <- getStack let topStack = if null s then [] else head s when (MINIMALDATA `elem` flgs || null topStack) $ unless (...
571
minimalStackValEnforcer :: StackOperation () minimalStackValEnforcer = do flgs <- ask s <- getStack let topStack = if null s then [] else head s when (MINIMALDATA `elem` flgs || null topStack) $ unless (checkMinimalNumRep topStack) $ programError $ "Non-minimal stack value: " ++ show...
478
minimalStackValEnforcer = do flgs <- ask s <- getStack let topStack = if null s then [] else head s when (MINIMALDATA `elem` flgs || null topStack) $ unless (checkMinimalNumRep topStack) $ programError $ "Non-minimal stack value: " ++ show topStack -- | Checks if a stack value is th...
433
true
true
1
15
128
114
55
59
null
null
abakst/liquidhaskell
tests/neg/ex0-unsafe.hs
bsd-3-clause
count :: Int -> Int count m = foldN (\_ n -> n + 1) m 0
55
count :: Int -> Int count m = foldN (\_ n -> n + 1) m 0
55
count m = foldN (\_ n -> n + 1) m 0
35
false
true
0
8
16
45
21
24
null
null
hvr/vector
Data/Vector/Storable/Mutable.hs
bsd-3-clause
replicate = G.replicate
23
replicate = G.replicate
23
replicate = G.replicate
23
false
false
1
6
2
12
4
8
null
null
tdammers/resourcerer
src/Web/Resourcerer/Serve.hs
bsd-3-clause
jsonToText (JSON.Object xs) = concat . intersperse ", " $ [ k <> ": " <> jsonToText v | (k, v) <- pairs xs ]
124
jsonToText (JSON.Object xs) = concat . intersperse ", " $ [ k <> ": " <> jsonToText v | (k, v) <- pairs xs ]
124
jsonToText (JSON.Object xs) = concat . intersperse ", " $ [ k <> ": " <> jsonToText v | (k, v) <- pairs xs ]
124
false
false
0
9
40
59
29
30
null
null
sgillespie/ghc
compiler/utils/Outputable.hs
bsd-3-clause
-- This shows an SDoc, but on one line only. It's cheaper than a full -- showSDoc, designed for when we're getting results like "Foo.bar" -- and "foo{uniq strictness}" so we don't want fancy layout anyway. showSDocOneLine :: DynFlags -> SDoc -> String showSDocOneLine dflags d = let s = Pretty.style{ Pretty.mode = OneL...
471
showSDocOneLine :: DynFlags -> SDoc -> String showSDocOneLine dflags d = let s = Pretty.style{ Pretty.mode = OneLineMode, Pretty.lineLength = pprCols dflags } in Pretty.renderStyle s $ runSDoc d (initSDocContext dflags defaultUserStyle)
265
showSDocOneLine dflags d = let s = Pretty.style{ Pretty.mode = OneLineMode, Pretty.lineLength = pprCols dflags } in Pretty.renderStyle s $ runSDoc d (initSDocContext dflags defaultUserStyle)
219
true
true
0
11
96
83
43
40
null
null
carliros/Simple-San-Simon-Functional-Web-Browser
src/Process/CssBox.hs
bsd-3-clause
-- get the length of the external boxes (margin, border and padding area) of a css box as a tuple getExternalSizeBox props = let [mt,mr,mb,ml] = getMarginProperties props [bt,br,bb,bl] = getBorderProperties props [ppt,ppr,ppb,ppl] = getPaddingProperties props in (ml+bl+ppl+ppr+br+mr,mt+b...
336
getExternalSizeBox props = let [mt,mr,mb,ml] = getMarginProperties props [bt,br,bb,bl] = getBorderProperties props [ppt,ppr,ppb,ppl] = getPaddingProperties props in (ml+bl+ppl+ppr+br+mr,mt+bt+ppt+ppb+bb+mb)
238
getExternalSizeBox props = let [mt,mr,mb,ml] = getMarginProperties props [bt,br,bb,bl] = getBorderProperties props [ppt,ppr,ppb,ppl] = getPaddingProperties props in (ml+bl+ppl+ppr+br+mr,mt+bt+ppt+ppb+bb+mb)
238
true
false
0
12
69
125
67
58
null
null
myfreeweb/magicbane
library/Magicbane/Util.hs
unlicense
hPutStrLn ∷ MonadIO μ ⇒ System.IO.Handle → String → μ () hPutStrLn h s = liftIO $ System.IO.hPutStrLn h s
105
hPutStrLn ∷ MonadIO μ ⇒ System.IO.Handle → String → μ () hPutStrLn h s = liftIO $ System.IO.hPutStrLn h s
105
hPutStrLn h s = liftIO $ System.IO.hPutStrLn h s
48
false
true
0
9
19
51
25
26
null
null
haBuu/tfs-website
Application.hs
mit
-- | The @main@ function for an executable running this site. appMain :: IO () appMain = do -- Get the settings from all relevant sources settings <- loadYamlSettingsArgs -- fall back to compile-time values, set to [] to require values at runtime [configSettingsYmlValue] -- allow enviro...
822
appMain :: IO () appMain = do -- Get the settings from all relevant sources settings <- loadYamlSettingsArgs -- fall back to compile-time values, set to [] to require values at runtime [configSettingsYmlValue] -- allow environment variables to override useEnv -- Generate th...
760
appMain = do -- Get the settings from all relevant sources settings <- loadYamlSettingsArgs -- fall back to compile-time values, set to [] to require values at runtime [configSettingsYmlValue] -- allow environment variables to override useEnv -- Generate the foundation from...
743
true
true
0
9
167
75
39
36
null
null
epsilonhalbe/Algebra-Alchemy
Polynomial.hs
bsd-3-clause
norm1 :: Num a => Polynomial a -> a -- ^ the 1-Norm = $\sum_{i=1}^n |a_i|$ norm1 (Poly _ p) = sum $ map abs p
109
norm1 :: Num a => Polynomial a -> a norm1 (Poly _ p) = sum $ map abs p
70
norm1 (Poly _ p) = sum $ map abs p
34
true
true
2
10
25
52
23
29
null
null
naoto-ogawa/h-xproto-mysql
src/DataBase/MySQLX/Statement.hs
mit
resultFrom :: RowFrom a -> ResultSet -> [a] resultFrom from rs = foldr (\v acc -> (rowFrom from v) : acc) [] rs
111
resultFrom :: RowFrom a -> ResultSet -> [a] resultFrom from rs = foldr (\v acc -> (rowFrom from v) : acc) [] rs
111
resultFrom from rs = foldr (\v acc -> (rowFrom from v) : acc) [] rs
67
false
true
0
10
22
61
31
30
null
null
ryantrinkle/reflex
src/Reflex/Requester/Base.hs
bsd-3-clause
singletonRequesterData :: RequesterDataKey a -> f a -> RequesterData f singletonRequesterData rdk v = case rdk of RequesterDataKey_Single k -> RequesterData $ singletonTagMap k $ Entry v RequesterDataKey_Multi k k' k'' -> RequesterData $ singletonTagMap k $ Entry $ IntMap.singleton k' $ singletonRequesterData k'' v...
641
singletonRequesterData :: RequesterDataKey a -> f a -> RequesterData f singletonRequesterData rdk v = case rdk of RequesterDataKey_Single k -> RequesterData $ singletonTagMap k $ Entry v RequesterDataKey_Multi k k' k'' -> RequesterData $ singletonTagMap k $ Entry $ IntMap.singleton k' $ singletonRequesterData k'' v...
641
singletonRequesterData rdk v = case rdk of RequesterDataKey_Single k -> RequesterData $ singletonTagMap k $ Entry v RequesterDataKey_Multi k k' k'' -> RequesterData $ singletonTagMap k $ Entry $ IntMap.singleton k' $ singletonRequesterData k'' v RequesterDataKey_Multi2 k k' k'' k''' -> RequesterData $ singletonTa...
570
false
true
18
7
96
71
43
28
null
null
5outh/Bang
src/Bang/Interface/Drum.hs
mit
-- | Snare (alt) sn2 :: Music PercussionSound sn2 = snareDrum2
62
sn2 :: Music PercussionSound sn2 = snareDrum2
45
sn2 = snareDrum2
16
true
true
0
5
10
15
8
7
null
null
tonyday567/hdcharts
src/Chart/Bar.hs
mit
barRectScale :: BarConfig -> Element Double -> [D3Expr] barRectScale c e = toD3Expr $ [jmacroE| attr("x", function(d,i) { return c.xScale(i);}). attr('y', function(d) { return c.yScale(d);}). attr("width", function(d) { return `(barWidth c e)`;}). attr("height", function(d) { re...
357
barRectScale :: BarConfig -> Element Double -> [D3Expr] barRectScale c e = toD3Expr $ [jmacroE| attr("x", function(d,i) { return c.xScale(i);}). attr('y', function(d) { return c.yScale(d);}). attr("width", function(d) { return `(barWidth c e)`;}). attr("height", function(d) { re...
357
barRectScale c e = toD3Expr $ [jmacroE| attr("x", function(d,i) { return c.xScale(i);}). attr('y', function(d) { return c.yScale(d);}). attr("width", function(d) { return `(barWidth c e)`;}). attr("height", function(d) { return (c.height - c.yScale(d));}) |]
301
false
true
2
9
82
45
22
23
null
null
mrenaud92/Scheduling
testsuite/unittest/TestSuite.hs
bsd-3-clause
main :: IO () main = htfMain htf_importedTests
46
main :: IO () main = htfMain htf_importedTests
46
main = htfMain htf_importedTests
32
false
true
0
6
7
19
9
10
null
null
EarlGray/hasm
src/Language/HAsm/ELF.hs
mit
elf_magic :: B.ByteString elf_magic = B.pack $ take eiNIdent $ magic ++ repeat 0x00 where magic = (0x7f : map (int . ord) "ELF") ++ [num ElfClass32, num ElfDataLSB, num EVCurrrent, 0]
185
elf_magic :: B.ByteString elf_magic = B.pack $ take eiNIdent $ magic ++ repeat 0x00 where magic = (0x7f : map (int . ord) "ELF") ++ [num ElfClass32, num ElfDataLSB, num EVCurrrent, 0]
185
elf_magic = B.pack $ take eiNIdent $ magic ++ repeat 0x00 where magic = (0x7f : map (int . ord) "ELF") ++ [num ElfClass32, num ElfDataLSB, num EVCurrrent, 0]
159
false
true
0
10
33
85
43
42
null
null
karamellpelle/grid
designer/source/Game/Iteration.hs
gpl-3.0
localWorldA :: a -> Iteration a b -> Iteration a b localWorldA world iter = makeIteration $ \a b -> (iteration (modifyAfter iter (\_ b -> return (a, b)))) world b
207
localWorldA :: a -> Iteration a b -> Iteration a b localWorldA world iter = makeIteration $ \a b -> (iteration (modifyAfter iter (\_ b -> return (a, b)))) world b
207
localWorldA world iter = makeIteration $ \a b -> (iteration (modifyAfter iter (\_ b -> return (a, b)))) world b
124
false
true
2
14
75
88
43
45
null
null
nevrenato/HetsAlloy
Common/Lexer.hs
gpl-2.0
-- * skip whitespaces and nested comment out nestCommentOut :: CharParser st () nestCommentOut = forget $ nestedComment "%[" "]%"
130
nestCommentOut :: CharParser st () nestCommentOut = forget $ nestedComment "%[" "]%"
84
nestCommentOut = forget $ nestedComment "%[" "]%"
49
true
true
2
7
20
34
15
19
null
null
donnie4w/tim
protocols/gen-hs/ITim_Client.hs
apache-2.0
timPing (ip,op) arg_threadId = do send_timPing op arg_threadId
64
timPing (ip,op) arg_threadId = do send_timPing op arg_threadId
64
timPing (ip,op) arg_threadId = do send_timPing op arg_threadId
64
false
false
0
7
9
26
12
14
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VFM.trans' vfm_trans = VFM.trans
37
vfm_trans = VFM.trans
21
vfm_trans = VFM.trans
21
true
false
0
5
4
9
5
4
null
null
ribag/ganeti-experiments
src/Ganeti/UDSServer.hs
gpl-2.0
recvUpdate :: ConnectConfig -> Handle -> B.ByteString -> IO (B.ByteString, B.ByteString) recvUpdate conf handle obuf = do nbuf <- withTimeout (recvTmo conf) "reading a response" $ do _ <- hWaitForInput handle (-1) B.hGetNonBlocking handle 4096 let (msg, remaining) = B.break (eOM =...
517
recvUpdate :: ConnectConfig -> Handle -> B.ByteString -> IO (B.ByteString, B.ByteString) recvUpdate conf handle obuf = do nbuf <- withTimeout (recvTmo conf) "reading a response" $ do _ <- hWaitForInput handle (-1) B.hGetNonBlocking handle 4096 let (msg, remaining) = B.break (eOM =...
517
recvUpdate conf handle obuf = do nbuf <- withTimeout (recvTmo conf) "reading a response" $ do _ <- hWaitForInput handle (-1) B.hGetNonBlocking handle 4096 let (msg, remaining) = B.break (eOM ==) nbuf newbuf = B.append obuf msg if B.null remaining then recvUpdate conf handle newbu...
417
false
true
0
14
126
179
88
91
null
null
zhiyuanshi/fcore
frontend/simplify/SimplifyImpl.hs
bsd-2-clause
transExpr i j (FI.JNew c es) = JNew c . map (transExpr i j) $ es
78
transExpr i j (FI.JNew c es) = JNew c . map (transExpr i j) $ es
78
transExpr i j (FI.JNew c es) = JNew c . map (transExpr i j) $ es
78
false
false
0
9
29
45
21
24
null
null
csabahruska/q3demo
src/Q3Demo/Graphics/GLBackend.hs
bsd-3-clause
fromGLUniformType :: (GLenum,GLint) -> Maybe UniformType fromGLUniformType (t,1) | t == gl_FLOAT = Just UT_Float | t == gl_FLOAT_VEC2 = Just UT_Vec2 | t == gl_FLOAT_VEC3 = Just UT_Vec3 | t == gl_FLOAT_VEC4 = Just UT_Vec4 | t == gl_FLOAT_MAT2 = Just UT_Mat2 | t == gl_FLOAT_MAT...
536
fromGLUniformType :: (GLenum,GLint) -> Maybe UniformType fromGLUniformType (t,1) | t == gl_FLOAT = Just UT_Float | t == gl_FLOAT_VEC2 = Just UT_Vec2 | t == gl_FLOAT_VEC3 = Just UT_Vec3 | t == gl_FLOAT_VEC4 = Just UT_Vec4 | t == gl_FLOAT_MAT2 = Just UT_Mat2 | t == gl_FLOAT_MAT...
536
fromGLUniformType (t,1) | t == gl_FLOAT = Just UT_Float | t == gl_FLOAT_VEC2 = Just UT_Vec2 | t == gl_FLOAT_VEC3 = Just UT_Vec3 | t == gl_FLOAT_VEC4 = Just UT_Vec4 | t == gl_FLOAT_MAT2 = Just UT_Mat2 | t == gl_FLOAT_MAT3 = Just UT_Mat3 | t == gl_FLOAT_MAT4 = Just UT...
479
false
true
1
8
171
216
99
117
null
null
amirci/aoc2016-hs
src/Day4.hs
bsd-3-clause
parseRoom r = (readInt sectorId, init tokens, checksum) where tokens = splitOn "-" r [sectorId, checksum, _] = splitOneOf "[]" $ last tokens readInt = read :: String -> Int
186
parseRoom r = (readInt sectorId, init tokens, checksum) where tokens = splitOn "-" r [sectorId, checksum, _] = splitOneOf "[]" $ last tokens readInt = read :: String -> Int
186
parseRoom r = (readInt sectorId, init tokens, checksum) where tokens = splitOn "-" r [sectorId, checksum, _] = splitOneOf "[]" $ last tokens readInt = read :: String -> Int
186
false
false
0
6
43
74
38
36
null
null
rueshyna/gogol
gogol-drive/gen/Network/Google/Drive/Types/Product.hs
mpl-2.0
-- | The size of the file\'s content in bytes. This is only applicable to -- files with binary content in Drive. fSize :: Lens' File (Maybe Int64) fSize = lens _fSize (\ s a -> s{_fSize = a}) . mapping _Coerce
217
fSize :: Lens' File (Maybe Int64) fSize = lens _fSize (\ s a -> s{_fSize = a}) . mapping _Coerce
104
fSize = lens _fSize (\ s a -> s{_fSize = a}) . mapping _Coerce
70
true
true
1
10
49
57
29
28
null
null
tsahyt/clingo-haskell
src/Clingo/Internal/Inspection/Theory.hs
mit
theoryAtomsAtomGuard :: (MonadIO m, MonadThrow m) => TheoryAtoms s -> AtomId -> m (Text, TermId) theoryAtomsAtomGuard (TheoryAtoms h) (AtomId k) = bimap pack TermId <$> go where go = do (x,y) <- marshal2 $ Raw.theoryAtomsAtomGuard h k x' <- liftIO $ peekCString x ...
345
theoryAtomsAtomGuard :: (MonadIO m, MonadThrow m) => TheoryAtoms s -> AtomId -> m (Text, TermId) theoryAtomsAtomGuard (TheoryAtoms h) (AtomId k) = bimap pack TermId <$> go where go = do (x,y) <- marshal2 $ Raw.theoryAtomsAtomGuard h k x' <- liftIO $ peekCString x ...
345
theoryAtomsAtomGuard (TheoryAtoms h) (AtomId k) = bimap pack TermId <$> go where go = do (x,y) <- marshal2 $ Raw.theoryAtomsAtomGuard h k x' <- liftIO $ peekCString x return (x',y)
226
false
true
0
10
112
130
64
66
null
null
Palmik/wai-sockjs
src/Network/Sock/Handler.hs
bsd-3-clause
responseGreeting :: H.IsResponse res => res responseGreeting = H.response200 H.headerPlain "Welcome to SockJS!\n"
114
responseGreeting :: H.IsResponse res => res responseGreeting = H.response200 H.headerPlain "Welcome to SockJS!\n"
114
responseGreeting = H.response200 H.headerPlain "Welcome to SockJS!\n"
69
false
true
0
7
13
29
14
15
null
null
garetxe/cabal
Cabal/tests/UnitTests/Distribution/Version.hs
bsd-3-clause
prop_isNoVersion :: VersionRange -> Version -> Property prop_isNoVersion range version = isNoVersion range ==> not (withinRange version range)
144
prop_isNoVersion :: VersionRange -> Version -> Property prop_isNoVersion range version = isNoVersion range ==> not (withinRange version range)
144
prop_isNoVersion range version = isNoVersion range ==> not (withinRange version range)
88
false
true
0
8
19
42
20
22
null
null
abuiles/turbinado-blog
tmp/dependencies/hsx-0.4.5/src/HSX/Transform.hs
bsd-3-clause
-- foldComp = foldl (.) id, i.e. fold by composing foldCompFun :: HsExp foldCompFun = match_qual $ HsIdent "foldComp"
117
foldCompFun :: HsExp foldCompFun = match_qual $ HsIdent "foldComp"
66
foldCompFun = match_qual $ HsIdent "foldComp"
45
true
true
2
6
18
26
11
15
null
null
bixuanzju/SCore
src/Language.hs
gpl-3.0
flatten col ((INil, _):seqs) = flatten col seqs
47
flatten col ((INil, _):seqs) = flatten col seqs
47
flatten col ((INil, _):seqs) = flatten col seqs
47
false
false
0
8
7
29
15
14
null
null
ezyang/ghc
compiler/nativeGen/X86/Regs.hs
bsd-3-clause
rbx = regSingle 1
19
rbx = regSingle 1
19
rbx = regSingle 1
19
false
false
1
5
5
12
4
8
null
null
pierzchalski/cs3161a2
MinHS/TyInfer.hs
mit
primOpType Eq = Ty $ Base Int `Arrow` (Base Int `Arrow` Base Bool)
68
primOpType Eq = Ty $ Base Int `Arrow` (Base Int `Arrow` Base Bool)
68
primOpType Eq = Ty $ Base Int `Arrow` (Base Int `Arrow` Base Bool)
68
false
false
3
9
14
42
19
23
null
null
hguenther/nbis
MemoryModel/Typed.hs
agpl-3.0
typedLoad' :: Integer -> Integer -> [TypeDesc] -> [SMTExpr (BitVector BVUntyped)] -> [(Integer,SMTExpr (BitVector BVUntyped))] typedLoad' offset len ((TDStruct (Right (tps,_))):rest) banks = typedLoad' offset len (tps++rest) banks
230
typedLoad' :: Integer -> Integer -> [TypeDesc] -> [SMTExpr (BitVector BVUntyped)] -> [(Integer,SMTExpr (BitVector BVUntyped))] typedLoad' offset len ((TDStruct (Right (tps,_))):rest) banks = typedLoad' offset len (tps++rest) banks
230
typedLoad' offset len ((TDStruct (Right (tps,_))):rest) banks = typedLoad' offset len (tps++rest) banks
103
false
true
0
13
27
110
58
52
null
null
ksaveljev/hake-2
src/QCommon/FS.hs
bsd-3-clause
addGameDirectory :: B.ByteString -> Quake () addGameDirectory dir = do fsGlobals.fsGameDir .= dir -- add the directory to the search path -- ensure fs_userdir is first in searchpath let newSearchPath = newSearchPathT { _spFilename = dir } searchPaths <- use $ fsGlobals.fsSearchPaths case search...
1,499
addGameDirectory :: B.ByteString -> Quake () addGameDirectory dir = do fsGlobals.fsGameDir .= dir -- add the directory to the search path -- ensure fs_userdir is first in searchpath let newSearchPath = newSearchPathT { _spFilename = dir } searchPaths <- use $ fsGlobals.fsSearchPaths case search...
1,499
addGameDirectory dir = do fsGlobals.fsGameDir .= dir -- add the directory to the search path -- ensure fs_userdir is first in searchpath let newSearchPath = newSearchPathT { _spFilename = dir } searchPaths <- use $ fsGlobals.fsSearchPaths case searchPaths of [] -> fsGlobals.fsSearchPaths ...
1,454
false
true
3
17
384
342
173
169
null
null
Kinokkory/thorn
Data/Thorn/Functor.hs
bsd-3-clause
autofmap'' u (ListTx tx) = autofmap' u tx >>= \f -> return $ AppE (mkNameE "map") f
83
autofmap'' u (ListTx tx) = autofmap' u tx >>= \f -> return $ AppE (mkNameE "map") f
83
autofmap'' u (ListTx tx) = autofmap' u tx >>= \f -> return $ AppE (mkNameE "map") f
83
false
false
0
10
16
48
22
26
null
null
deviant-logic/props
src/Test/Properties.hs
bsd-3-clause
-- | @'symmetric' f a b@ implies @a == b@ -- -- prop> antisymmetric (-) :: Int -> Int -> Bool antisymmetric = antisymmetricBy id
128
antisymmetric = antisymmetricBy id
34
antisymmetric = antisymmetricBy id
34
true
false
1
5
24
15
7
8
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags res IndexByteArrayOp_Word16 args = doIndexByteArrayOp (Just (mo_u_16ToWord dflags)) b16 res args
127
emitPrimOp dflags res IndexByteArrayOp_Word16 args = doIndexByteArrayOp (Just (mo_u_16ToWord dflags)) b16 res args
127
emitPrimOp dflags res IndexByteArrayOp_Word16 args = doIndexByteArrayOp (Just (mo_u_16ToWord dflags)) b16 res args
127
false
false
0
9
25
40
17
23
null
null
DanielRS/marquee
src/Text/Marquee/SyntaxTrees/AST.hs
mit
plain :: MarkdownInline -> Text plain (Text x) = x
54
plain :: MarkdownInline -> Text plain (Text x) = x
54
plain (Text x) = x
22
false
true
0
7
13
24
12
12
null
null
chrisbouchard/bartender
src/BarTender/Util.hs
gpl-3.0
ifJust :: Bool -> a -> Maybe a ifJust b x = guard b >> Just x
61
ifJust :: Bool -> a -> Maybe a ifJust b x = guard b >> Just x
61
ifJust b x = guard b >> Just x
30
false
true
0
7
16
37
17
20
null
null
rebasar/follower
follower.hs
gpl-3.0
followAll :: State -> IO State followAll us = do results <- mapM (runTM nullAuthUser . getTweetsBy) us putDoc $ formatTweets $ filter notReply $ merge results return $ updateState us results where updateState :: State -> [[Status]] -> State updateState [] [] = [] update...
502
followAll :: State -> IO State followAll us = do results <- mapM (runTM nullAuthUser . getTweetsBy) us putDoc $ formatTweets $ filter notReply $ merge results return $ updateState us results where updateState :: State -> [[Status]] -> State updateState [] [] = [] update...
502
followAll us = do results <- mapM (runTM nullAuthUser . getTweetsBy) us putDoc $ formatTweets $ filter notReply $ merge results return $ updateState us results where updateState :: State -> [[Status]] -> State updateState [] [] = [] updateState (p:ps) (t:ts) = case t of...
471
false
true
0
11
143
218
108
110
null
null
ihc/futhark
src/futhark-doc.hs
isc
main :: IO () main = mainWithOptions initialDocConfig commandLineOptions f where f [dir] config = Just $ do res <- runFutharkM (m config dir) True case res of Left err -> liftIO $ do dumpError newFutharkConfig err exitWith $ ExitFailure 2 Right (...
1,133
main :: IO () main = mainWithOptions initialDocConfig commandLineOptions f where f [dir] config = Just $ do res <- runFutharkM (m config dir) True case res of Left err -> liftIO $ do dumpError newFutharkConfig err exitWith $ ExitFailure 2 Right (...
1,133
main = mainWithOptions initialDocConfig commandLineOptions f where f [dir] config = Just $ do res <- runFutharkM (m config dir) True case res of Left err -> liftIO $ do dumpError newFutharkConfig err exitWith $ ExitFailure 2 Right () -> ...
1,119
false
true
24
15
447
324
164
160
null
null
ucsd-progsys/nanomaly
src/NanoML/Misc.hs
bsd-3-clause
pairwiseNub [] = []
21
pairwiseNub [] = []
21
pairwiseNub [] = []
21
false
false
0
6
5
13
6
7
null
null
nilthehuman/cis194
Homework7.hs
unlicense
x +++ y = Append (tag x `mappend` tag y) x y
52
x +++ y = Append (tag x `mappend` tag y) x y
52
x +++ y = Append (tag x `mappend` tag y) x y
52
false
false
0
8
19
34
16
18
null
null
thomasathorne/h-chu
src/Main.hs
bsd-3-clause
main :: IO () main = do args <- getArgs case args of [] -> withSocketsDo $ do bracket (getSock defaultPort) (\s -> sClose s >> putStrLn "Socket closed.") useSock args -> withSocketsDo $ do let port = read (head args) bracket (getSock port) (\s -> sClose s >> putStrLn "Socket c...
523
main :: IO () main = do args <- getArgs case args of [] -> withSocketsDo $ do bracket (getSock defaultPort) (\s -> sClose s >> putStrLn "Socket closed.") useSock args -> withSocketsDo $ do let port = read (head args) bracket (getSock port) (\s -> sClose s >> putStrLn "Socket c...
523
main = do args <- getArgs case args of [] -> withSocketsDo $ do bracket (getSock defaultPort) (\s -> sClose s >> putStrLn "Socket closed.") useSock args -> withSocketsDo $ do let port = read (head args) bracket (getSock port) (\s -> sClose s >> putStrLn "Socket closed.") useSo...
509
false
true
3
18
156
200
91
109
null
null
bgamari/minir
MinIR/PostingList/Builder.hs
bsd-3-clause
mapMP :: Monad m => (a -> m b) -> Producer a m r -> Producer b m r mapMP f = go where go prod = do r <- lift $ next prod case r of Left a -> return a Right (x, prod') -> do lift (f x) >>= yield >> go prod'
261
mapMP :: Monad m => (a -> m b) -> Producer a m r -> Producer b m r mapMP f = go where go prod = do r <- lift $ next prod case r of Left a -> return a Right (x, prod') -> do lift (f x) >>= yield >> go prod'
261
mapMP f = go where go prod = do r <- lift $ next prod case r of Left a -> return a Right (x, prod') -> do lift (f x) >>= yield >> go prod'
194
false
true
0
16
110
134
62
72
null
null
rleshchinskiy/vector
Data/Vector/Unboxed.hs
bsd-3-clause
mapM_ = G.mapM_
15
mapM_ = G.mapM_
15
mapM_ = G.mapM_
15
false
false
0
5
2
8
4
4
null
null
fpco/wai-middleware-crowd
src/Network/Wai/Middleware/Crowd.hs
mit
-- | Default value for 'CrowdSettings'. -- -- Since 0.1.0 defaultCrowdSettings :: CrowdSettings defaultCrowdSettings = CrowdSettings { csGetKey = getDefaultKey , csCrowdRoot = "http://localhost:8095/openidserver" , csGetApproot = smartApproot , csGetManager = newManager tlsManagerSettings , csAge = ...
330
defaultCrowdSettings :: CrowdSettings defaultCrowdSettings = CrowdSettings { csGetKey = getDefaultKey , csCrowdRoot = "http://localhost:8095/openidserver" , csGetApproot = smartApproot , csGetManager = newManager tlsManagerSettings , csAge = 3600 }
272
defaultCrowdSettings = CrowdSettings { csGetKey = getDefaultKey , csCrowdRoot = "http://localhost:8095/openidserver" , csGetApproot = smartApproot , csGetManager = newManager tlsManagerSettings , csAge = 3600 }
234
true
true
0
8
61
53
32
21
null
null
Lupino/dispatch-article
src/Article/RawAPI.hs
bsd-3-clause
updateArticleExtra :: HasMySQL u => ID -> Value -> GenHaxl u w Int64 updateArticleExtra artId extra = uncachedRequest (UpdateArticleExtra artId extra)
150
updateArticleExtra :: HasMySQL u => ID -> Value -> GenHaxl u w Int64 updateArticleExtra artId extra = uncachedRequest (UpdateArticleExtra artId extra)
150
updateArticleExtra artId extra = uncachedRequest (UpdateArticleExtra artId extra)
81
false
true
0
8
20
49
23
26
null
null
fluffynukeit/FNIStash
src/FNIStash/File/Item.hs
bsd-3-clause
hasFilePath 0x8149 = True
25
hasFilePath 0x8149 = True
25
hasFilePath 0x8149 = True
25
false
false
1
5
3
13
4
9
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_ATOMIC_COUNTER_BUFFER_INDEX :: GLenum gl_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301
80
gl_ATOMIC_COUNTER_BUFFER_INDEX :: GLenum gl_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301
80
gl_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301
39
false
true
0
4
5
11
6
5
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'MapS.foldrWithKey' ms_foldrWithKey = MapS.foldrWithKey
59
ms_foldrWithKey = MapS.foldrWithKey
35
ms_foldrWithKey = MapS.foldrWithKey
35
true
false
0
5
4
9
5
4
null
null
anton-dessiatov/stack
src/Stack/Ghci.hs
bsd-3-clause
setScriptPerms _ = do return () #else setScriptPerms fp = do liftIO $ Posix.setFileMode fp $ foldl1 Posix.unionFileModes [ Posix.ownerReadMode , Posix.ownerWriteMode , Posix.groupReadMode , Posix.otherReadMode ] #endif
266
setScriptPerms _ = do return () #else setScriptPerms fp = do liftIO $ Posix.setFileMode fp $ foldl1 Posix.unionFileModes [ Posix.ownerReadMode , Posix.ownerWriteMode , Posix.groupReadMode , Posix.otherReadMode ] #endif
266
setScriptPerms _ = do return () #else setScriptPerms fp = do liftIO $ Posix.setFileMode fp $ foldl1 Posix.unionFileModes [ Posix.ownerReadMode , Posix.ownerWriteMode , Posix.groupReadMode , Posix.otherReadMode ] #endif
266
false
false
0
8
75
18
8
10
null
null
royopa/pandoc
src/Text/Pandoc/Writers/HTML.hs
gpl-2.0
toList :: (Html -> Html) -> WriterOptions -> ([Html] -> Html) toList listop opts items = do if (writerIncremental opts) then if (writerSlideVariant opts /= RevealJsSlides) then (listop $ mconcat items) ! A.class_ "incremental" else listop $ mconcat $ map (! A.class_ "fragment") ...
360
toList :: (Html -> Html) -> WriterOptions -> ([Html] -> Html) toList listop opts items = do if (writerIncremental opts) then if (writerSlideVariant opts /= RevealJsSlides) then (listop $ mconcat items) ! A.class_ "incremental" else listop $ mconcat $ map (! A.class_ "fragment") ...
360
toList listop opts items = do if (writerIncremental opts) then if (writerSlideVariant opts /= RevealJsSlides) then (listop $ mconcat items) ! A.class_ "incremental" else listop $ mconcat $ map (! A.class_ "fragment") items else listop $ mconcat items
298
false
true
0
14
96
132
66
66
null
null
alang9/deque
Data/Deque/NonCat.hs
bsd-3-clause
fixup2' (BigR (RX B0 (B2 n o)) (Y1 (B4 (P s t) (P u v) (P w x) (P y z))) LEmpty) = go10 s t u v w x y z n o
125
fixup2' (BigR (RX B0 (B2 n o)) (Y1 (B4 (P s t) (P u v) (P w x) (P y z))) LEmpty) = go10 s t u v w x y z n o
125
fixup2' (BigR (RX B0 (B2 n o)) (Y1 (B4 (P s t) (P u v) (P w x) (P y z))) LEmpty) = go10 s t u v w x y z n o
125
false
false
0
12
51
107
52
55
null
null
emacstheviking/hexwax-usb
Commands.hs
lgpl-3.0
asPort :: Word8 -> String asPort 0x01 = "PORTA"
47
asPort :: Word8 -> String asPort 0x01 = "PORTA"
47
asPort 0x01 = "PORTA"
21
false
true
0
5
8
18
9
9
null
null
kaizhang/BCMtools
app/BCMtools/Convert.hs
mit
convertOptions :: Parser Command convertOptions = fmap Convert $ ConvertOptions <$> strOption ( long "genome" <> short 'g' <> metavar "ASSEMBLY" <> help "e.g., hg19, or a file" ) <*> fmap (splitOn ",") (strOption ...
1,237
convertOptions :: Parser Command convertOptions = fmap Convert $ ConvertOptions <$> strOption ( long "genome" <> short 'g' <> metavar "ASSEMBLY" <> help "e.g., hg19, or a file" ) <*> fmap (splitOn ",") (strOption ...
1,237
convertOptions = fmap Convert $ ConvertOptions <$> strOption ( long "genome" <> short 'g' <> metavar "ASSEMBLY" <> help "e.g., hg19, or a file" ) <*> fmap (splitOn ",") (strOption ( long "rownames" ...
1,204
false
true
0
16
619
314
145
169
null
null
xmonad/xmonad-contrib
XMonad/Hooks/Minimize.hs
bsd-3-clause
minimizeEventHook _ = return (All True)
39
minimizeEventHook _ = return (All True)
39
minimizeEventHook _ = return (All True)
39
false
false
0
7
5
18
8
10
null
null
mikeizbicki/Classification
src/AI/MathTmp.hs
bsd-3-clause
-- mean x = fst $ foldl' (\(!m, !n) x -> (m+(x-m)/(n+1),n+1)) (0,0) x -- |Arbitrary quantile q of an unsorted list. The quantile /q/ of /N/ -- |data points is the point whose (zero-based) index in the sorted -- |data set is closest to /q(N-1)/. quantile :: (Fractional b, Ord b) => Double -> [b] -> b quantile q = ...
340
quantile :: (Fractional b, Ord b) => Double -> [b] -> b quantile q = quantileAsc q . sort
89
quantile q = quantileAsc q . sort
33
true
true
0
8
70
51
28
23
null
null
christetreault/dmp-photo-booth-prime
DMP/Photobooth/Module.hs
gpl-3.0
finalizeTrigger ms = runModuleT (TriggerResult) ms TriggerMod.finalize
82
finalizeTrigger ms = runModuleT (TriggerResult) ms TriggerMod.finalize
82
finalizeTrigger ms = runModuleT (TriggerResult) ms TriggerMod.finalize
82
false
false
1
6
18
27
10
17
null
null
neongreen/hat
src/JS.hs
bsd-3-clause
makeAdmin :: JSFunction a => a makeAdmin = makeJSFunction "makeAdmin" ["nick"] [text| $.post("/user/" + nick + "/make-admin") .done(function () { location.reload(); }); |]
199
makeAdmin :: JSFunction a => a makeAdmin = makeJSFunction "makeAdmin" ["nick"] [text| $.post("/user/" + nick + "/make-admin") .done(function () { location.reload(); }); |]
199
makeAdmin = makeJSFunction "makeAdmin" ["nick"] [text| $.post("/user/" + nick + "/make-admin") .done(function () { location.reload(); }); |]
168
false
true
0
6
50
33
18
15
null
null
AlexanderPankiv/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
kindConKey = mkPreludeTyConUnique 69
65
kindConKey = mkPreludeTyConUnique 69
65
kindConKey = mkPreludeTyConUnique 69
65
false
false
0
5
32
9
4
5
null
null
byorgey/Idris-dev
src/Idris/DataOpts.hs
bsd-3-clause
collapseCons :: Name -> [(Name, Type)] -> Idris () collapseCons ty cons = do i <- getIState let cons' = map (\ (n, t) -> (n, map snd (getArgTys t))) cons allFR <- mapM (forceRec i) cons' if and allFR then detaggable (map getRetTy (map snd cons)) else return () -- not c...
2,601
collapseCons :: Name -> [(Name, Type)] -> Idris () collapseCons ty cons = do i <- getIState let cons' = map (\ (n, t) -> (n, map snd (getArgTys t))) cons allFR <- mapM (forceRec i) cons' if and allFR then detaggable (map getRetTy (map snd cons)) else return () -- not c...
2,601
collapseCons ty cons = do i <- getIState let cons' = map (\ (n, t) -> (n, map snd (getArgTys t))) cons allFR <- mapM (forceRec i) cons' if and allFR then detaggable (map getRetTy (map snd cons)) else return () -- not collapsible as not detaggable where setCollaps...
2,550
false
true
3
17
1,021
1,003
485
518
null
null
frenetic-lang/nettle-openflow
src/Nettle/OpenFlow/Match.hs
bsd-3-clause
matches :: (PortID, EthernetFrame) -> Match -> Bool matches (inPort, frame) (m@Match { inPort=inPort', ipTypeOfService=ipTypeOfService',..}) = and [maybe True matchesInPort inPort', maybe True matchesSrcEthAddress srcEthAddress, maybe True matchesDstEthAddress dstEthAddress, ...
2,914
matches :: (PortID, EthernetFrame) -> Match -> Bool matches (inPort, frame) (m@Match { inPort=inPort', ipTypeOfService=ipTypeOfService',..}) = and [maybe True matchesInPort inPort', maybe True matchesSrcEthAddress srcEthAddress, maybe True matchesDstEthAddress dstEthAddress, ...
2,914
matches (inPort, frame) (m@Match { inPort=inPort', ipTypeOfService=ipTypeOfService',..}) = and [maybe True matchesInPort inPort', maybe True matchesSrcEthAddress srcEthAddress, maybe True matchesDstEthAddress dstEthAddress, maybe True matchesVLANID vLANID, ...
2,862
false
true
0
14
1,180
676
336
340
null
null
vincenthz/language-c
src/Language/C/Analysis/AstAnalysis.hs
bsd-3-clause
tStmt c (CSwitch e s ni) = tExpr c RValue e >>= checkIntegral' ni >> tStmt (SwitchCtx : c) s
104
tStmt c (CSwitch e s ni) = tExpr c RValue e >>= checkIntegral' ni >> tStmt (SwitchCtx : c) s
104
tStmt c (CSwitch e s ni) = tExpr c RValue e >>= checkIntegral' ni >> tStmt (SwitchCtx : c) s
104
false
false
0
8
31
51
24
27
null
null
diku-dk/futhark
src/Futhark/IR/Primitive.hs
isc
doFloatBinOp _ _ _ _ _ = Nothing
32
doFloatBinOp _ _ _ _ _ = Nothing
32
doFloatBinOp _ _ _ _ _ = Nothing
32
false
false
0
5
7
17
8
9
null
null
xmonad/xmonad-contrib
XMonad/Actions/CycleWS.hs
bsd-3-clause
-- $toggling -- | Toggle to the workspace displayed previously. toggleWS :: X () toggleWS = toggleWS' []
105
toggleWS :: X () toggleWS = toggleWS' []
40
toggleWS = toggleWS' []
23
true
true
0
6
18
23
12
11
null
null
mydaum/cabal
cabal-install/Distribution/Solver/Types/PackageIndex.hs
bsd-3-clause
invariant :: Package pkg => PackageIndex pkg -> Bool invariant (PackageIndex m) = all (uncurry goodBucket) (Map.toList m) where goodBucket _ [] = False goodBucket name (pkg0:pkgs0) = check (packageId pkg0) pkgs0 where check pkgid [] = packageName pkgid == name check pkgid (pk...
526
invariant :: Package pkg => PackageIndex pkg -> Bool invariant (PackageIndex m) = all (uncurry goodBucket) (Map.toList m) where goodBucket _ [] = False goodBucket name (pkg0:pkgs0) = check (packageId pkg0) pkgs0 where check pkgid [] = packageName pkgid == name check pkgid (pk...
526
invariant (PackageIndex m) = all (uncurry goodBucket) (Map.toList m) where goodBucket _ [] = False goodBucket name (pkg0:pkgs0) = check (packageId pkg0) pkgs0 where check pkgid [] = packageName pkgid == name check pkgid (pkg':pkgs) = packageName pkgid == name ...
473
false
true
1
11
184
170
84
86
null
null
stefan-j/ProjectEuler
q9.hs
mit
is_triple (a,b,c) | not ((a < b) && (b < c)) = False | a^2 + b^2 /= c^2 = False | a + b + c /= 1000 = False | otherwise = True
138
is_triple (a,b,c) | not ((a < b) && (b < c)) = False | a^2 + b^2 /= c^2 = False | a + b + c /= 1000 = False | otherwise = True
138
is_triple (a,b,c) | not ((a < b) && (b < c)) = False | a^2 + b^2 /= c^2 = False | a + b + c /= 1000 = False | otherwise = True
138
false
false
0
12
46
115
56
59
null
null
andreagenso/java2scala
src/J2s/Ast/Semantic.hs
apache-2.0
sem_PackageOrTypeName_NilPackageOrTypeName = NilPackageOrTypeName
65
sem_PackageOrTypeName_NilPackageOrTypeName = NilPackageOrTypeName
65
sem_PackageOrTypeName_NilPackageOrTypeName = NilPackageOrTypeName
65
false
false
0
4
2
6
3
3
null
null
Copilot-Language/sbv-for-copilot
Data/SBV.hs
bsd-3-clause
-- | Is the floating-point number 0? (Note that both +0 and -0 will satisfy this predicate.) isZeroFP :: (Floating a, SymWord a) => SBV a -> SBool isZeroFP = liftFPPredicate "fp.isZero" (== 0)
192
isZeroFP :: (Floating a, SymWord a) => SBV a -> SBool isZeroFP = liftFPPredicate "fp.isZero" (== 0)
99
isZeroFP = liftFPPredicate "fp.isZero" (== 0)
45
true
true
0
7
33
43
23
20
null
null
mit-plv/riscv-semantics
src/Spec/Decode.hs
bsd-3-clause
funct7_DIVU :: MachineInt; funct7_DIVU = 0b0000001
57
funct7_DIVU :: MachineInt funct7_DIVU = 0b0000001
53
funct7_DIVU = 0b0000001
25
false
true
1
5
12
16
7
9
null
null
tom-szczarkowski/matasano-crypto-puzzles-solutions
set6/DSA.hs
mit
sha1 :: [Word8] -> [Word8] sha1 s = let (SHA.Digest bs) = SHA.sha1 $ encode s in decode bs
90
sha1 :: [Word8] -> [Word8] sha1 s = let (SHA.Digest bs) = SHA.sha1 $ encode s in decode bs
90
sha1 s = let (SHA.Digest bs) = SHA.sha1 $ encode s in decode bs
63
false
true
0
11
18
56
27
29
null
null
syoyo/lucille
rnd/HaskellRSLCompiler/RSL/CodeGenLLVM.hs
bsd-3-clause
initLLVMState = LLVMState { globals = [] , n = 0 }
114
initLLVMState = LLVMState { globals = [] , n = 0 }
114
initLLVMState = LLVMState { globals = [] , n = 0 }
114
false
false
0
7
75
22
13
9
null
null
tjakway/ghcjvm
compiler/main/DynFlags.hs
bsd-3-clause
safeDirectImpsReq :: DynFlags -> Bool safeDirectImpsReq d = safeLanguageOn d
76
safeDirectImpsReq :: DynFlags -> Bool safeDirectImpsReq d = safeLanguageOn d
76
safeDirectImpsReq d = safeLanguageOn d
38
false
true
0
7
9
26
11
15
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Get.hs
mpl-2.0
-- | The ID of the managed configuration (a product ID), e.g. -- \"app:com.google.android.gm\". mcdgManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDeviceGet Text mcdgManagedConfigurationForDeviceId = lens _mcdgManagedConfigurationForDeviceId (\ s a -> s{_mcdgManagedConfigurationForDev...
331
mcdgManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDeviceGet Text mcdgManagedConfigurationForDeviceId = lens _mcdgManagedConfigurationForDeviceId (\ s a -> s{_mcdgManagedConfigurationForDeviceId = a})
235
mcdgManagedConfigurationForDeviceId = lens _mcdgManagedConfigurationForDeviceId (\ s a -> s{_mcdgManagedConfigurationForDeviceId = a})
151
true
true
0
9
46
43
23
20
null
null
tismith/tlisp
src/Primitives.hs
mit
anyNumListDiv badArgList = throwError $ NumArgs 1 badArgList
60
anyNumListDiv badArgList = throwError $ NumArgs 1 badArgList
60
anyNumListDiv badArgList = throwError $ NumArgs 1 badArgList
60
false
false
0
6
7
18
8
10
null
null
nablaa/hchesslib
src/Chess/Internal/Game.hs
gpl-2.0
updateWhiteCastlings (State _ _ castlings _ _ _ _) (Capture (Piece Black _) _ (7, 0)) = delete Long castlings
109
updateWhiteCastlings (State _ _ castlings _ _ _ _) (Capture (Piece Black _) _ (7, 0)) = delete Long castlings
109
updateWhiteCastlings (State _ _ castlings _ _ _ _) (Capture (Piece Black _) _ (7, 0)) = delete Long castlings
109
false
false
0
9
19
58
29
29
null
null
atupal/xmonad-mirror
xmonad/src/XMonad/Operations.hs
mit
-- | Set the layout of the currently viewed workspace setLayout :: Layout Window -> X () setLayout l = do ss@(W.StackSet { W.current = c@(W.Screen { W.workspace = ws })}) <- gets windowset handleMessage (W.layout ws) (SomeMessage ReleaseResources) windows $ const $ ss {W.current = c { W.workspace = ws { W.l...
483
setLayout :: Layout Window -> X () setLayout l = do ss@(W.StackSet { W.current = c@(W.Screen { W.workspace = ws })}) <- gets windowset handleMessage (W.layout ws) (SomeMessage ReleaseResources) windows $ const $ ss {W.current = c { W.workspace = ws { W.layout = l } } } -------------------------------------...
429
setLayout l = do ss@(W.StackSet { W.current = c@(W.Screen { W.workspace = ws })}) <- gets windowset handleMessage (W.layout ws) (SomeMessage ReleaseResources) windows $ const $ ss {W.current = c { W.workspace = ws { W.layout = l } } } ------------------------------------------------------------------------...
394
true
true
0
17
84
146
76
70
null
null
avh4/elm-format
elm-format-lib/src/Parse/Helpers.hs
bsd-3-clause
commaSep1 :: IParser (Comments -> Comments -> a) -> IParser (Comments -> Comments -> [a]) commaSep1 = spaceySepBy1'' comma
124
commaSep1 :: IParser (Comments -> Comments -> a) -> IParser (Comments -> Comments -> [a]) commaSep1 = spaceySepBy1'' comma
124
commaSep1 = spaceySepBy1'' comma
34
false
true
0
10
20
49
25
24
null
null
jtdaugherty/language-mixal
src/Language/MIXAL/Parser.hs
bsd-3-clause
parseBinOpExpr :: Parser S.Expr parseBinOpExpr = do e1 <- choice [ S.AtExpr <$> parseAtomicExpr , parseSignedExpr ] op1 <- parseBinOp e2 <- choice [ S.AtExpr <$> parseAtomicExpr , parseSignedExpr ] rest <- many $ do op <- parseBinOp ...
498
parseBinOpExpr :: Parser S.Expr parseBinOpExpr = do e1 <- choice [ S.AtExpr <$> parseAtomicExpr , parseSignedExpr ] op1 <- parseBinOp e2 <- choice [ S.AtExpr <$> parseAtomicExpr , parseSignedExpr ] rest <- many $ do op <- parseBinOp ...
498
parseBinOpExpr = do e1 <- choice [ S.AtExpr <$> parseAtomicExpr , parseSignedExpr ] op1 <- parseBinOp e2 <- choice [ S.AtExpr <$> parseAtomicExpr , parseSignedExpr ] rest <- many $ do op <- parseBinOp e <- choice [ S.AtExpr <$>...
466
false
true
0
15
213
137
66
71
null
null
leshchevds/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | The set of storage types for which node storage reporting is available -- | (as used by LUQueryNodeStorage) stsReportNodeStorage :: FrozenSet String stsReportNodeStorage = ConstantUtils.union stsReport $ ConstantUtils.mkSet [ stSharedFile ...
426
stsReportNodeStorage :: FrozenSet String stsReportNodeStorage = ConstantUtils.union stsReport $ ConstantUtils.mkSet [ stSharedFile , stGluster ]
313
stsReportNodeStorage = ConstantUtils.union stsReport $ ConstantUtils.mkSet [ stSharedFile , stGluster ]
272
true
true
0
7
203
36
19
17
null
null
aelve/ilist
bench/Functions.hs
bsd-3-clause
ifoldr_zip :: (Int -> a -> b -> b) -> b -> [a] -> b ifoldr_zip f a xs = foldr (\(i, x) acc -> f i x acc) a (zip [0..] xs)
121
ifoldr_zip :: (Int -> a -> b -> b) -> b -> [a] -> b ifoldr_zip f a xs = foldr (\(i, x) acc -> f i x acc) a (zip [0..] xs)
121
ifoldr_zip f a xs = foldr (\(i, x) acc -> f i x acc) a (zip [0..] xs)
69
false
true
0
9
32
89
47
42
null
null
gibiansky/hlint
src/Hint/Match.hs
bsd-3-clause
rebracket (Paren l e') (v, e) | e' == e = (v, Paren l e)
58
rebracket (Paren l e') (v, e) | e' == e = (v, Paren l e)
58
rebracket (Paren l e') (v, e) | e' == e = (v, Paren l e)
58
false
false
0
8
16
48
23
25
null
null
UBMLtonGroup/timberc
src/Kind.hs
bsd-3-clause
kiDecl env (i, DType vs t) = do env' <- newTScope env vs (cs1,k1) <- kiTExp env' (tAp' i vs) (cs2,k2) <- kiTExp env' t return ((k1,k2) : cs1 ++ cs2)
296
kiDecl env (i, DType vs t) = do env' <- newTScope env vs (cs1,k1) <- kiTExp env' (tAp' i vs) (cs2,k2) <- kiTExp env' t return ((k1,k2) : cs1 ++ cs2)
296
kiDecl env (i, DType vs t) = do env' <- newTScope env vs (cs1,k1) <- kiTExp env' (tAp' i vs) (cs2,k2) <- kiTExp env' t return ((k1,k2) : cs1 ++ cs2)
296
false
false
0
11
178
101
50
51
null
null
kawu/crf-chain2-tiers
src/Data/CRF/Chain2/Tiers/Inference.hs
bsd-2-clause
---------------------------------------------------- -- Potential ---------------------------------------------------- -- | Observation potential on a given position and a -- given label (identified by index). onWord :: Model -> Xs -> Int -> CbIx -> L.LogFloat onWord crf xs i u = product . map (phi crf) $ obFeats...
329
onWord :: Model -> Xs -> Int -> CbIx -> L.LogFloat onWord crf xs i u = product . map (phi crf) $ obFeatsOn xs i u
117
onWord crf xs i u = product . map (phi crf) $ obFeatsOn xs i u
66
true
true
0
9
52
67
35
32
null
null
uuhan/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSLe (ATInt ITBig)) [l, r] = v ++ "idris_bigLe(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
95
doOp v (LSLe (ATInt ITBig)) [l, r] = v ++ "idris_bigLe(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
95
doOp v (LSLe (ATInt ITBig)) [l, r] = v ++ "idris_bigLe(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
95
false
false
1
14
22
62
28
34
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Touch.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Touch.webkitForce Mozilla Touch.webkitForce documentation> getWebkitForce :: (MonadDOM m) => Touch -> m Float getWebkitForce self = liftDOM (realToFrac <$> ((self ^. js "webkitForce") >>= valToNumber))
265
getWebkitForce :: (MonadDOM m) => Touch -> m Float getWebkitForce self = liftDOM (realToFrac <$> ((self ^. js "webkitForce") >>= valToNumber))
150
getWebkitForce self = liftDOM (realToFrac <$> ((self ^. js "webkitForce") >>= valToNumber))
99
true
true
0
11
35
58
30
28
null
null
imh/plover
src/Language/Plover/Macros.hs
mit
blockMatrix (_ : dims) exprs = let size = product dims in let exprs' = map (blockMatrix dims) (split size exprs) in foldr1 (:#) (map Ptr exprs') where split _ [] = [] split n ds = take n ds : split n (drop n ds) -- Make a length 1 vector from x
263
blockMatrix (_ : dims) exprs = let size = product dims in let exprs' = map (blockMatrix dims) (split size exprs) in foldr1 (:#) (map Ptr exprs') where split _ [] = [] split n ds = take n ds : split n (drop n ds) -- Make a length 1 vector from x
263
blockMatrix (_ : dims) exprs = let size = product dims in let exprs' = map (blockMatrix dims) (split size exprs) in foldr1 (:#) (map Ptr exprs') where split _ [] = [] split n ds = take n ds : split n (drop n ds) -- Make a length 1 vector from x
263
false
false
1
13
72
126
61
65
null
null
danielcnorris/haskell-spelling-corrector
src/Correct/Core.hs
mit
deletes :: ByteString -> [ByteString] deletes w = if B.null w then [] else splits' w >>= \(first, second) -> return $ B.concat [first, B.tail second]
202
deletes :: ByteString -> [ByteString] deletes w = if B.null w then [] else splits' w >>= \(first, second) -> return $ B.concat [first, B.tail second]
202
deletes w = if B.null w then [] else splits' w >>= \(first, second) -> return $ B.concat [first, B.tail second]
164
false
true
0
12
78
74
39
35
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Texturing/Queries.hs
bsd-3-clause
textureIntensitySize :: QueryableTextureTarget t => TextureQuery t GLsizei textureIntensitySize t level = makeGettableStateVar $ getTexLevelParameteriNoProxy fromIntegral t level TextureIntensitySize
208
textureIntensitySize :: QueryableTextureTarget t => TextureQuery t GLsizei textureIntensitySize t level = makeGettableStateVar $ getTexLevelParameteriNoProxy fromIntegral t level TextureIntensitySize
208
textureIntensitySize t level = makeGettableStateVar $ getTexLevelParameteriNoProxy fromIntegral t level TextureIntensitySize
133
false
true
2
7
27
46
20
26
null
null
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Evaluators.hs
gpl-2.0
-------------------------------------------------------------------------------- peekControlPoints1 :: (ControlPoint c, Domain d) => MapDescriptor d -> Ptr d -> IO [c d] peekControlPoints1 descriptor ptr = mapM peekControlPoint (controlPointPtrs1 descriptor ptr)
269
peekControlPoints1 :: (ControlPoint c, Domain d) => MapDescriptor d -> Ptr d -> IO [c d] peekControlPoints1 descriptor ptr = mapM peekControlPoint (controlPointPtrs1 descriptor ptr)
187
peekControlPoints1 descriptor ptr = mapM peekControlPoint (controlPointPtrs1 descriptor ptr)
95
true
true
0
10
32
69
33
36
null
null
patperry/hs-linear-algebra
tests-old/Banded.hs
bsd-3-clause
prop_cols_len (a :: B) = length (cols a) == numCols a
57
prop_cols_len (a :: B) = length (cols a) == numCols a
57
prop_cols_len (a :: B) = length (cols a) == numCols a
57
false
false
0
8
14
32
15
17
null
null
christiaanb/Idris-dev
src/Core/ProofState.hs
bsd-3-clause
attack ctxt env _ = fail "Not an attackable hole"
49
attack ctxt env _ = fail "Not an attackable hole"
49
attack ctxt env _ = fail "Not an attackable hole"
49
false
false
0
4
9
19
7
12
null
null
ulricha/dsh
src/Database/DSH/Tests/DSHComprehensions.hs
bsd-3-clause
groupjoin_sum_guard :: Q ([Integer], [Integer]) -> Q [Integer] groupjoin_sum_guard (view -> (njxs, njys)) = [ x | x <- njxs , let ys = [ 2 * y | y <- njys, x == y ] , 5 < length ys ]
202
groupjoin_sum_guard :: Q ([Integer], [Integer]) -> Q [Integer] groupjoin_sum_guard (view -> (njxs, njys)) = [ x | x <- njxs , let ys = [ 2 * y | y <- njys, x == y ] , 5 < length ys ]
202
groupjoin_sum_guard (view -> (njxs, njys)) = [ x | x <- njxs , let ys = [ 2 * y | y <- njys, x == y ] , 5 < length ys ]
139
false
true
0
12
61
107
57
50
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_CSOUND_IRATE_VAR :: Int wxSTC_CSOUND_IRATE_VAR = 13
57
wxSTC_CSOUND_IRATE_VAR :: Int wxSTC_CSOUND_IRATE_VAR = 13
57
wxSTC_CSOUND_IRATE_VAR = 13
27
false
true
0
6
5
18
7
11
null
null