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
diogob/postgrest
test/Feature/UpsertSpec.hs
mit
spec :: SpecWith Application spec = describe "UPSERT" $ do context "with POST" $ do context "when Prefer: resolution=merge-duplicates is specified" $ do it "INSERTs and UPDATEs rows on pk conflict" $ request methodPost "/tiobe_pls" [("Prefer", "return=representation"), ("Prefer", "resoluti...
16,168
spec :: SpecWith Application spec = describe "UPSERT" $ do context "with POST" $ do context "when Prefer: resolution=merge-duplicates is specified" $ do it "INSERTs and UPDATEs rows on pk conflict" $ request methodPost "/tiobe_pls" [("Prefer", "return=representation"), ("Prefer", "resoluti...
16,168
spec = describe "UPSERT" $ do context "with POST" $ do context "when Prefer: resolution=merge-duplicates is specified" $ do it "INSERTs and UPDATEs rows on pk conflict" $ request methodPost "/tiobe_pls" [("Prefer", "return=representation"), ("Prefer", "resolution=merge-duplicates")] ...
16,139
false
true
0
21
4,223
2,199
1,345
854
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
coercibleDataConKey = mkPreludeDataConUnique 32
67
coercibleDataConKey = mkPreludeDataConUnique 32
67
coercibleDataConKey = mkPreludeDataConUnique 32
67
false
false
0
5
23
9
4
5
null
null
thalerjonathan/phd
coding/prototyping/haskell/declarativeABM/haskell/SpatialGameSimple/src/SGModel.hs
gpl-3.0
payoffWith :: SGCell -> SGCell -> Double payoffWith cRef cOther = payoff (sgCurrState cRef) (sgCurrState cOther)
112
payoffWith :: SGCell -> SGCell -> Double payoffWith cRef cOther = payoff (sgCurrState cRef) (sgCurrState cOther)
112
payoffWith cRef cOther = payoff (sgCurrState cRef) (sgCurrState cOther)
71
false
true
0
8
15
46
21
25
null
null
josefs/autosar
oldARSim/AR.hs
bsd-3-clause
hasType (TStruct ts) (VStruct fs) = unique (dom fs) && dom ts `equal` dom fs && and [ hasTypeIn ts f v | (f,v) <- Map.assocs fs ]
176
hasType (TStruct ts) (VStruct fs) = unique (dom fs) && dom ts `equal` dom fs && and [ hasTypeIn ts f v | (f,v) <- Map.assocs fs ]
176
hasType (TStruct ts) (VStruct fs) = unique (dom fs) && dom ts `equal` dom fs && and [ hasTypeIn ts f v | (f,v) <- Map.assocs fs ]
176
false
false
0
11
74
84
41
43
null
null
rueshyna/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | [Required] The zone where the Google Compute Engine cluster will be -- located. Example: -- \`https:\/\/www.googleapis.com\/compute\/v1\/projects\/[project_id]\/zones\/[zone]\`. gccZoneURI :: Lens' GceClusterConfig (Maybe Text) gccZoneURI = lens _gccZoneURI (\ s a -> s{_gccZoneURI = a})
294
gccZoneURI :: Lens' GceClusterConfig (Maybe Text) gccZoneURI = lens _gccZoneURI (\ s a -> s{_gccZoneURI = a})
111
gccZoneURI = lens _gccZoneURI (\ s a -> s{_gccZoneURI = a})
61
true
true
0
9
36
50
27
23
null
null
nurpax/aeson
Data/Aeson/Types/Instances.hs
bsd-3-clause
tuple :: B.Builder -> Encoding tuple b = Encoding (B.char7 '[' <> b <> B.char7 ']')
83
tuple :: B.Builder -> Encoding tuple b = Encoding (B.char7 '[' <> b <> B.char7 ']')
83
tuple b = Encoding (B.char7 '[' <> b <> B.char7 ']')
52
false
true
0
10
15
44
21
23
null
null
CarstenKoenig/AdventOfCode2016
Day20/Main.hs
mit
interParser :: Parser Interval interParser = do l <- parseNumber parseChar (== '-') u <- parseNumber return $ Inter l u
127
interParser :: Parser Interval interParser = do l <- parseNumber parseChar (== '-') u <- parseNumber return $ Inter l u
127
interParser = do l <- parseNumber parseChar (== '-') u <- parseNumber return $ Inter l u
96
false
true
0
8
28
50
23
27
null
null
PackAssembler/PaCLI
PaCLI/Current.hs
gpl-3.0
findNewOrUpdated :: [Version] -> [BP.Mod] -> [UpdateAction] findNewOrUpdated vs = catMaybes . foldl (\acc x -> newOrUpdatedEntry vs x : acc) []
143
findNewOrUpdated :: [Version] -> [BP.Mod] -> [UpdateAction] findNewOrUpdated vs = catMaybes . foldl (\acc x -> newOrUpdatedEntry vs x : acc) []
143
findNewOrUpdated vs = catMaybes . foldl (\acc x -> newOrUpdatedEntry vs x : acc) []
83
false
true
0
10
21
63
33
30
null
null
paf31/Adventure
src/Game/Adventure/State.hs
bsd-3-clause
setLocation :: Location -> GameState item -> GameState item setLocation loc st = st { location = loc }
102
setLocation :: Location -> GameState item -> GameState item setLocation loc st = st { location = loc }
102
setLocation loc st = st { location = loc }
42
false
true
0
7
18
38
19
19
null
null
pauloborba/plc
src/DetalhesSobreListasERecursao.hs
cc0-1.0
creditar n v [] = []
20
creditar n v [] = []
20
creditar n v [] = []
20
false
false
0
6
5
17
8
9
null
null
cdxr/terminal
System/Console/Terminal/Term.hs
bsd-3-clause
runHaskeline :: (MonadIO m, MonadCatch m) => H.Settings IO -> (H.InputState -> m a) -> m a runHaskeline hs k = bracketOnError mkInputState cancelInputState $ \i -> do a <- k i liftIO $ H.closeInput i return a where mkInputState = liftIO $ H.initializeInput hs ...
362
runHaskeline :: (MonadIO m, MonadCatch m) => H.Settings IO -> (H.InputState -> m a) -> m a runHaskeline hs k = bracketOnError mkInputState cancelInputState $ \i -> do a <- k i liftIO $ H.closeInput i return a where mkInputState = liftIO $ H.initializeInput hs ...
362
runHaskeline hs k = bracketOnError mkInputState cancelInputState $ \i -> do a <- k i liftIO $ H.closeInput i return a where mkInputState = liftIO $ H.initializeInput hs cancelInputState = liftIO . H.cancelInput
232
false
true
2
11
110
140
62
78
null
null
alphalambda/k12math
contrib/MHills/GeometryLessons/code/student/lesson3e.hs
mit
myPicture points = drawPoints [a,b,c] & drawLabels [a,b,c] ["A","B","C"] & drawPoint a' & drawLabel a' "A'" & drawSegment (a,b) & drawSegment (b,c) & drawSegment (c,a) & messages [ "length BC = "++ show (dist b c) ,"length BA' = "++ show (dist b a') ,"length ...
424
myPicture points = drawPoints [a,b,c] & drawLabels [a,b,c] ["A","B","C"] & drawPoint a' & drawLabel a' "A'" & drawSegment (a,b) & drawSegment (b,c) & drawSegment (c,a) & messages [ "length BC = "++ show (dist b c) ,"length BA' = "++ show (dist b a') ,"length ...
424
myPicture points = drawPoints [a,b,c] & drawLabels [a,b,c] ["A","B","C"] & drawPoint a' & drawLabel a' "A'" & drawSegment (a,b) & drawSegment (b,c) & drawSegment (c,a) & messages [ "length BC = "++ show (dist b c) ,"length BA' = "++ show (dist b a') ,"length ...
424
false
false
0
13
152
196
102
94
null
null
YelaSeamless/cgrep
src/CGrep/Semantic/Cpp/Token.hs
gpl-2.0
tokenFilter filt (TokenHeaderName{}) = filtHeader filt
59
tokenFilter filt (TokenHeaderName{}) = filtHeader filt
59
tokenFilter filt (TokenHeaderName{}) = filtHeader filt
59
false
false
0
7
10
21
10
11
null
null
nomeata/ghc
compiler/main/GhcMake.hs
bsd-3-clause
upsweep :: GhcMonad m => HomePackageTable -- ^ HPT from last time round (pruned) -> ([ModuleName],[ModuleName]) -- ^ stable modules (see checkStability) -> (HscEnv -> IO ()) -- ^ How to clean up unwanted tmp files -> [SCC ModSummary] -- ^ Mods to do (the worklist) ...
3,182
upsweep :: GhcMonad m => HomePackageTable -- ^ HPT from last time round (pruned) -> ([ModuleName],[ModuleName]) -- ^ stable modules (see checkStability) -> (HscEnv -> IO ()) -- ^ How to clean up unwanted tmp files -> [SCC ModSummary] -- ^ Mods to do (the worklist) ...
2,968
upsweep old_hpt stable_mods cleanup sccs = do (res, done) <- upsweep' old_hpt [] sccs 1 (length sccs) return (res, reverse done) where upsweep' _old_hpt done [] _ _ = return (Succeeded, done) upsweep' _old_hpt done (CyclicSCC ms:_) _ _ = do dflags <- getSessionDynFlags liftIO $ fata...
2,604
true
true
0
20
1,211
557
279
278
null
null
ejconlon/notate
src/Notate/Interpret.hs
bsd-3-clause
say = putStrLn
14
say = putStrLn
14
say = putStrLn
14
false
false
1
5
2
10
3
7
null
null
unisonweb/platform
parser-typechecker/src/Unison/Runtime/Machine.hs
mit
cacheAdd :: [(Reference, SuperGroup Symbol)] -> CCache -> IO [Reference] cacheAdd l cc = do rtm <- readTVarIO (refTm cc) rty <- readTVarIO (refTy cc) let known = M.keysSet rtm <> S.fromList (fst <$> l) f b r | not b, S.notMember r known = (S.singleton r, mempty) | b, M.notMember r rty = (m...
580
cacheAdd :: [(Reference, SuperGroup Symbol)] -> CCache -> IO [Reference] cacheAdd l cc = do rtm <- readTVarIO (refTm cc) rty <- readTVarIO (refTy cc) let known = M.keysSet rtm <> S.fromList (fst <$> l) f b r | not b, S.notMember r known = (S.singleton r, mempty) | b, M.notMember r rty = (m...
580
cacheAdd l cc = do rtm <- readTVarIO (refTm cc) rty <- readTVarIO (refTy cc) let known = M.keysSet rtm <> S.fromList (fst <$> l) f b r | not b, S.notMember r known = (S.singleton r, mempty) | b, M.notMember r rty = (mempty, S.singleton r) | otherwise = (mempty, mempty) (missing...
501
false
true
4
15
156
298
142
156
null
null
xmonad/xmonad-contrib
XMonad/Util/PositionStore.hs
bsd-3-clause
posStoreInsert :: PositionStore -> Window -> Rectangle -> Rectangle -> PositionStore posStoreInsert (PS posStoreMap) w (Rectangle x y wh ht) (Rectangle srX srY srWh srHt) = let offsetX = x - srX offsetY = y - srY in PS $ M.insert w (PSRectangle (fromIntegral offsetX / fromIntegral srWh) ...
576
posStoreInsert :: PositionStore -> Window -> Rectangle -> Rectangle -> PositionStore posStoreInsert (PS posStoreMap) w (Rectangle x y wh ht) (Rectangle srX srY srWh srHt) = let offsetX = x - srX offsetY = y - srY in PS $ M.insert w (PSRectangle (fromIntegral offsetX / fromIntegral srWh) ...
576
posStoreInsert (PS posStoreMap) w (Rectangle x y wh ht) (Rectangle srX srY srWh srHt) = let offsetX = x - srX offsetY = y - srY in PS $ M.insert w (PSRectangle (fromIntegral offsetX / fromIntegral srWh) (fromIntegral offsetY / fromIntegral srHt) ...
491
false
true
2
12
220
173
82
91
null
null
DavidAlphaFox/ghc
libraries/bytestring/Data/ByteString/Lazy.hs
bsd-3-clause
-- | /O(n)/ 'reverse' @xs@ returns the elements of @xs@ in reverse order. reverse :: ByteString -> ByteString reverse cs0 = rev Empty cs0 where rev a Empty = a rev a (Chunk c cs) = rev (Chunk (S.reverse c) a) cs
229
reverse :: ByteString -> ByteString reverse cs0 = rev Empty cs0 where rev a Empty = a rev a (Chunk c cs) = rev (Chunk (S.reverse c) a) cs
155
reverse cs0 = rev Empty cs0 where rev a Empty = a rev a (Chunk c cs) = rev (Chunk (S.reverse c) a) cs
119
true
true
1
10
59
75
37
38
null
null
megantti/rtorrent-cli
Main.hs
mit
addPath :: String -> IO () addPath url = do path <- canonicalizePath url `catch` (\(_ :: IOException) -> return url) _ <- call $ loadStartTorrent path return ()
209
addPath :: String -> IO () addPath url = do path <- canonicalizePath url `catch` (\(_ :: IOException) -> return url) _ <- call $ loadStartTorrent path return ()
209
addPath url = do path <- canonicalizePath url `catch` (\(_ :: IOException) -> return url) _ <- call $ loadStartTorrent path return ()
182
false
true
0
13
77
84
39
45
null
null
garykl/Horg
Colors.hs
bsd-3-clause
-- | accept only a number in [0, 1] to2digitHex :: Float -> String to2digitHex n = let byte = round $ 255 * n::Int digit1 = hexDigits (byte `div` 16) digit2 = hexDigits (byte `mod` 16) in [digit1, digit2]
231
to2digitHex :: Float -> String to2digitHex n = let byte = round $ 255 * n::Int digit1 = hexDigits (byte `div` 16) digit2 = hexDigits (byte `mod` 16) in [digit1, digit2]
195
to2digitHex n = let byte = round $ 255 * n::Int digit1 = hexDigits (byte `div` 16) digit2 = hexDigits (byte `mod` 16) in [digit1, digit2]
164
true
true
0
11
66
81
45
36
null
null
gcross/habit-of-fate
sources/library/HabitOfFate/Quest.hs
agpl-3.0
random_stories_content_ ∷ Lens (Entry c1) (Entry c2) [c1] [c2] random_stories_content_ = lens random_stories_content (\x y → x{random_stories_content = y})
155
random_stories_content_ ∷ Lens (Entry c1) (Entry c2) [c1] [c2] random_stories_content_ = lens random_stories_content (\x y → x{random_stories_content = y})
155
random_stories_content_ = lens random_stories_content (\x y → x{random_stories_content = y})
92
false
true
0
9
18
61
33
28
null
null
utky/lycopene
backup/Action.hs
apache-2.0
runAction' :: ActionF a -> ActionResult a runAction' (FsAction f) = actionResult (fmap Right (FS.runFsAction f))
113
runAction' :: ActionF a -> ActionResult a runAction' (FsAction f) = actionResult (fmap Right (FS.runFsAction f))
113
runAction' (FsAction f) = actionResult (fmap Right (FS.runFsAction f))
70
false
true
0
10
16
53
24
29
null
null
Sword-Smith/hfasto
src/MipsRegAlloc.hs
mit
getSRegNames :: [] (S.Set Mips.Reg) -> [] (S.Set Mips.Reg) -> S.Set SymReg getSRegNames kls gls = S.filter filterDynamicRegs $ S.unions $ map (\(x,y) -> S.union x y) (zip kls gls)
180
getSRegNames :: [] (S.Set Mips.Reg) -> [] (S.Set Mips.Reg) -> S.Set SymReg getSRegNames kls gls = S.filter filterDynamicRegs $ S.unions $ map (\(x,y) -> S.union x y) (zip kls gls)
180
getSRegNames kls gls = S.filter filterDynamicRegs $ S.unions $ map (\(x,y) -> S.union x y) (zip kls gls)
105
false
true
0
10
30
108
53
55
null
null
glguy/advent2016
asmprog-final/Small.hs
isc
set B x = modify' $ \rs -> rs { registerB = x }
49
set B x = modify' $ \rs -> rs { registerB = x }
49
set B x = modify' $ \rs -> rs { registerB = x }
49
false
false
0
8
15
28
15
13
null
null
Kercoin/yummy
src/Store.hs
mit
replyResult :: Reply -> Either String a replyResult (SingleLine s) = Left (C.unpack s)
86
replyResult :: Reply -> Either String a replyResult (SingleLine s) = Left (C.unpack s)
86
replyResult (SingleLine s) = Left (C.unpack s)
46
false
true
0
8
13
40
19
21
null
null
violetkz/haskell_learning
fn.hs
gpl-2.0
n n = fn(n - 1) + fn(n -2)
27
fn n = fn(n - 1) + fn(n -2)
27
fn n = fn(n - 1) + fn(n -2)
27
false
false
0
8
9
33
16
17
null
null
andrewthad/yesod-bootstrap
src/Yesod/Form/Generic.hs
mit
gFormToForm :: (Monad m, HandlerSite m ~ site) => GForm w m a -> MForm m (FormResult a, w) gFormToForm (GForm gform) = do ints <- get (env, site, langs) <- ask (a, w, ints', enc) <- lift $ gform (site, langs) env ints put ints' tell enc return (a, w)
286
gFormToForm :: (Monad m, HandlerSite m ~ site) => GForm w m a -> MForm m (FormResult a, w) gFormToForm (GForm gform) = do ints <- get (env, site, langs) <- ask (a, w, ints', enc) <- lift $ gform (site, langs) env ints put ints' tell enc return (a, w)
286
gFormToForm (GForm gform) = do ints <- get (env, site, langs) <- ask (a, w, ints', enc) <- lift $ gform (site, langs) env ints put ints' tell enc return (a, w)
171
false
true
0
10
86
148
74
74
null
null
hrsrashid/nummet
src/Main.hs
bsd-3-clause
scalarMatrix = parseInput $ parseMatrix parseDecimal
52
scalarMatrix = parseInput $ parseMatrix parseDecimal
52
scalarMatrix = parseInput $ parseMatrix parseDecimal
52
false
false
0
6
5
13
6
7
null
null
nevrenato/Hets_Fork
CSL/Keywords.hs
gpl-2.0
asinhS :: String asinhS = "asinh"
33
asinhS :: String asinhS = "asinh"
33
asinhS = "asinh"
16
false
true
0
6
5
18
7
11
null
null
kawu/text-trie
Data/TextTrie.hs
bsd-2-clause
-- | Branch lookup. brLookup :: Int -> T.Text -> Trie a -> Maybe a brLookup code k (Branch brBit leftTrie rightTrie) = if testBit code brBit then brLookup code k rightTrie else brLookup code k leftTrie
221
brLookup :: Int -> T.Text -> Trie a -> Maybe a brLookup code k (Branch brBit leftTrie rightTrie) = if testBit code brBit then brLookup code k rightTrie else brLookup code k leftTrie
201
brLookup code k (Branch brBit leftTrie rightTrie) = if testBit code brBit then brLookup code k rightTrie else brLookup code k leftTrie
154
true
true
0
11
56
81
38
43
null
null
edwardwas/chatServer
src/Shared/Types.hs
mit
isMessage :: UserAction -> Bool isMessage (SendMessage _ _) = True
66
isMessage :: UserAction -> Bool isMessage (SendMessage _ _) = True
66
isMessage (SendMessage _ _) = True
34
false
true
0
7
10
26
13
13
null
null
Ornedan/dom4statusbot
src/Model/Dominions4.hs
bsd-3-clause
nationName 76 = "LA Utgård"
27
nationName 76 = "LA Utgård"
27
nationName 76 = "LA Utgård"
27
false
false
0
5
4
9
4
5
null
null
jecisc/TP_PF_L3
PF-TP5/src/PF-TP_Interprete_Fini_FerlicotDelbecque_Cyril/Main.hs
mit
estChiffre :: Char -> Bool estChiffre = flip elem ['0'..'9']
60
estChiffre :: Char -> Bool estChiffre = flip elem ['0'..'9']
60
estChiffre = flip elem ['0'..'9']
33
false
true
0
7
9
32
14
18
null
null
themoritz/cabal
cabal-install/Distribution/Client/SolverInstallPlan.hs
bsd-3-clause
valid :: IndependentGoals -> SolverPlanIndex -> Bool valid indepGoals index = null $ problems indepGoals index
126
valid :: IndependentGoals -> SolverPlanIndex -> Bool valid indepGoals index = null $ problems indepGoals index
126
valid indepGoals index = null $ problems indepGoals index
61
false
true
2
8
31
40
17
23
null
null
ssaavedra/liquidhaskell
tests/neg/Books.hs
bsd-3-clause
{-@ inline discount @-} discount :: Int -> Int discount bookCount = (bookCount - BOOK_THRESHOLD) * DISCOUNT_PERCENTAGE
118
discount :: Int -> Int discount bookCount = (bookCount - BOOK_THRESHOLD) * DISCOUNT_PERCENTAGE
94
discount bookCount = (bookCount - BOOK_THRESHOLD) * DISCOUNT_PERCENTAGE
71
true
true
0
7
16
30
16
14
null
null
silky/ImplicitCAD
Graphics/Implicit/ExtOpenScad/Primitives.hs
gpl-2.0
rotateExtrude :: ([Char], [OVal] -> ArgParser (IO [OVal])) rotateExtrude = moduleWithSuite "rotate_extrude" $ \children -> do example "rotate_extrude() translate(20) circle(10);" totalRot :: ℝ <- argument "a" `defaultTo` 360 `doc` "angle to sweep" r :: ℝ <- argument "r" `defaultTo` 0 ...
1,303
rotateExtrude :: ([Char], [OVal] -> ArgParser (IO [OVal])) rotateExtrude = moduleWithSuite "rotate_extrude" $ \children -> do example "rotate_extrude() translate(20) circle(10);" totalRot :: ℝ <- argument "a" `defaultTo` 360 `doc` "angle to sweep" r :: ℝ <- argument "r" `defaultTo` 0 ...
1,303
rotateExtrude = moduleWithSuite "rotate_extrude" $ \children -> do example "rotate_extrude() translate(20) circle(10);" totalRot :: ℝ <- argument "a" `defaultTo` 360 `doc` "angle to sweep" r :: ℝ <- argument "r" `defaultTo` 0 translateArg :: Either ℝ2 (ℝ -> ℝ2) <- argument "translat...
1,244
false
true
0
19
317
363
185
178
null
null
pcrama/message-compiler
test/Suite.hs
bsd-3-clause
testGetNextCandidates :: Assertion testGetNextCandidates = assertRightTrue TestCandSel.testGetNextCandidates
108
testGetNextCandidates :: Assertion testGetNextCandidates = assertRightTrue TestCandSel.testGetNextCandidates
108
testGetNextCandidates = assertRightTrue TestCandSel.testGetNextCandidates
73
false
true
0
6
6
16
8
8
null
null
HaskellZhangSong/derive-topdown
src/Data/Derive/TopDown/Lib.hs
mit
getTypeNames :: Type -> [Name] getTypeNames (ForallT tvbs cxt t) = getTypeNames t
81
getTypeNames :: Type -> [Name] getTypeNames (ForallT tvbs cxt t) = getTypeNames t
81
getTypeNames (ForallT tvbs cxt t) = getTypeNames t
50
false
true
0
6
12
38
18
20
null
null
tuura/fantasi
src/Tuura/Fantasi/VHDL/Internal/EnvironmentWriter.hs
mit
instantiateModules :: P.Pangraph -> String instantiateModules p = delayer_enable_vertexList ns ++ network ns ++ synchroniser ns ++ genericCounter ns ++ reg_counter ns ...
1,223
instantiateModules :: P.Pangraph -> String instantiateModules p = delayer_enable_vertexList ns ++ network ns ++ synchroniser ns ++ genericCounter ns ++ reg_counter ns ...
1,223
instantiateModules p = delayer_enable_vertexList ns ++ network ns ++ synchroniser ns ++ genericCounter ns ++ reg_counter ns ++ generic...
1,180
false
true
0
23
807
149
67
82
null
null
mcmaniac/ghc
distrib/compare/compare.hs
bsd-3-clause
compareTarLine :: TarLine -> TarLine -> [Change] compareTarLine tl1 tl2 = [ PermissionsChanged fn1 fn2 perms1 perms2 | perms1 /= perms2 ] ++ [ FileSizeChanged fn1 fn2 size1 size2 | sizeChanged ] where fn1 = tlFileName tl1 fn2 = tlFileName tl2 perms1 = tlPermissions tl1 perm...
598
compareTarLine :: TarLine -> TarLine -> [Change] compareTarLine tl1 tl2 = [ PermissionsChanged fn1 fn2 perms1 perms2 | perms1 /= perms2 ] ++ [ FileSizeChanged fn1 fn2 size1 size2 | sizeChanged ] where fn1 = tlFileName tl1 fn2 = tlFileName tl2 perms1 = tlPermissions tl1 perm...
598
compareTarLine tl1 tl2 = [ PermissionsChanged fn1 fn2 perms1 perms2 | perms1 /= perms2 ] ++ [ FileSizeChanged fn1 fn2 size1 size2 | sizeChanged ] where fn1 = tlFileName tl1 fn2 = tlFileName tl2 perms1 = tlPermissions tl1 perms2 = tlPermissions tl2 size1 = tlSize t...
549
false
true
8
14
202
190
99
91
null
null
bringert/haskell-tar
htar/htar.hs
bsd-3-clause
die :: [String] -> IO a die errs = do mapM_ (\e -> hPutStrLn stderr $ "htar: " ++ e) $ errs hPutStrLn stderr "Try `htar --help' for more information." exitFailure
190
die :: [String] -> IO a die errs = do mapM_ (\e -> hPutStrLn stderr $ "htar: " ++ e) $ errs hPutStrLn stderr "Try `htar --help' for more information." exitFailure
190
die errs = do mapM_ (\e -> hPutStrLn stderr $ "htar: " ++ e) $ errs hPutStrLn stderr "Try `htar --help' for more information." exitFailure
166
false
true
0
13
58
69
31
38
null
null
xenog/haskoin
src/Network/Haskoin/Network/Message.hs
unlicense
msgType (MHeaders _) = "headers"
36
msgType (MHeaders _) = "headers"
36
msgType (MHeaders _) = "headers"
36
false
false
0
6
8
16
7
9
null
null
abhin4v/ringo
ringo/src/Main.hs
mit
writeFiles :: FilePath -> Config -> IO () writeFiles outputDir config = do let Settings{..} = configSettings config forM_ (makeSQLs config dimTables factTables) $ \(sqlType, table, sql) -> do let dirName = outputDir </> map toLower (show sqlType) createDirectoryIfMissing True dirName writeFile (dirName...
1,106
writeFiles :: FilePath -> Config -> IO () writeFiles outputDir config = do let Settings{..} = configSettings config forM_ (makeSQLs config dimTables factTables) $ \(sqlType, table, sql) -> do let dirName = outputDir </> map toLower (show sqlType) createDirectoryIfMissing True dirName writeFile (dirName...
1,106
writeFiles outputDir config = do let Settings{..} = configSettings config forM_ (makeSQLs config dimTables factTables) $ \(sqlType, table, sql) -> do let dirName = outputDir </> map toLower (show sqlType) createDirectoryIfMissing True dirName writeFile (dirName </> Text.unpack table <.> "sql") sql B...
1,064
false
true
3
17
224
393
193
200
null
null
aloiscochard/bound
examples/Overkill.hs
bsd-3-clause
wildp :: P a wildp = P WildP [] (const Nothing)
47
wildp :: P a wildp = P WildP [] (const Nothing)
47
wildp = P WildP [] (const Nothing)
34
false
true
1
7
10
32
14
18
null
null
conal/shady-examples
src/RunUtils.hs
agpl-3.0
-- flatIm im = (intrinsic, view1, xyPlane , toColor . im) -- runU :: Sink [SurfB] -- runU [s] = runUI' animOut (s . pureD) -- runU _ = error "runU: only single SurfB" -- I've forgotten what this restriction to single-SurfB is about. -- Investigate. animOut :: Out (Sink R1) animOut = lambda (V.vec1 <$> i) renderOut...
361
animOut :: Out (Sink R1) animOut = lambda (V.vec1 <$> i) renderOut where i = -- clockIn fakeTime
107
animOut = lambda (V.vec1 <$> i) renderOut where i = -- clockIn fakeTime
82
true
true
0
8
79
49
28
21
null
null
brendanhay/gogol
gogol-datastore/gen/Network/Google/Resource/Datastore/Projects/ReserveIds.hs
mpl-2.0
-- | OAuth access token. priAccessToken :: Lens' ProjectsReserveIds (Maybe Text) priAccessToken = lens _priAccessToken (\ s a -> s{_priAccessToken = a})
160
priAccessToken :: Lens' ProjectsReserveIds (Maybe Text) priAccessToken = lens _priAccessToken (\ s a -> s{_priAccessToken = a})
135
priAccessToken = lens _priAccessToken (\ s a -> s{_priAccessToken = a})
79
true
true
0
9
29
48
25
23
null
null
mettekou/ghc
compiler/backpack/DriverBkp.hs
bsd-3-clause
{- ************************************************************************ * * Module graph construction * * ************************************************...
2,058
hsunitModuleGraph :: DynFlags -> HsUnit HsComponentId -> BkpM ModuleGraph hsunitModuleGraph dflags unit = do let decls = hsunitBody unit pn = hsPackageName (unLoc (hsunitName unit)) -- 1. Create a HsSrcFile/HsigFile summary for every -- explicitly mentioned module/signature. let get_decl (L _...
1,249
hsunitModuleGraph dflags unit = do let decls = hsunitBody unit pn = hsPackageName (unLoc (hsunitName unit)) -- 1. Create a HsSrcFile/HsigFile summary for every -- explicitly mentioned module/signature. let get_decl (L _ (DeclD dt lmodname mb_hsmod)) = do let hsc_src = case dt of ...
1,175
true
true
9
13
643
310
166
144
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/MediaWiki.hs
gpl-2.0
inlineToMediaWiki _ Space = return " "
38
inlineToMediaWiki _ Space = return " "
38
inlineToMediaWiki _ Space = return " "
38
false
false
1
5
6
15
6
9
null
null
jcberentsen/haskell
tensorflow-ops/src/TensorFlow/Gradient.hs
apache-2.0
-- | Lens that defaults Nothing to mempty. nonEmpty :: (Monoid (t v), Foldable t) => Lens' (Maybe (t v)) (t v) nonEmpty = anon mempty null
138
nonEmpty :: (Monoid (t v), Foldable t) => Lens' (Maybe (t v)) (t v) nonEmpty = anon mempty null
95
nonEmpty = anon mempty null
27
true
true
0
11
26
66
32
34
null
null
snoyberg/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
-- | Create a template local for a series of type, but start from a specified template local mkTemplateLocalsNum :: Int -> [Type] -> [Id] mkTemplateLocalsNum n tys = zipWith mkTemplateLocal [n..] tys
199
mkTemplateLocalsNum :: Int -> [Type] -> [Id] mkTemplateLocalsNum n tys = zipWith mkTemplateLocal [n..] tys
106
mkTemplateLocalsNum n tys = zipWith mkTemplateLocal [n..] tys
61
true
true
0
7
32
41
22
19
null
null
jacekm-git/HsPredictor
executable/Main.hs
gpl-3.0
initializeTable :: Ref Table -> IO () initializeTable table = do begin table setRows table maxRows setRowHeader table True setRowHeightAll table 20 setRowResize table False setCols table maxCols setColHeader table True setColWidthAll table 80 setColResize table True end table
296
initializeTable :: Ref Table -> IO () initializeTable table = do begin table setRows table maxRows setRowHeader table True setRowHeightAll table 20 setRowResize table False setCols table maxCols setColHeader table True setColWidthAll table 80 setColResize table True end table
296
initializeTable table = do begin table setRows table maxRows setRowHeader table True setRowHeightAll table 20 setRowResize table False setCols table maxCols setColHeader table True setColWidthAll table 80 setColResize table True end table
258
false
true
0
7
58
102
40
62
null
null
dmjio/miso
src/Miso/Svg/Attribute.hs
bsd-3-clause
-- | <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseProfile> baseProfile_ :: MisoString -> Attribute action baseProfile_ = attr "baseProfile"
159
baseProfile_ :: MisoString -> Attribute action baseProfile_ = attr "baseProfile"
81
baseProfile_ = attr "baseProfile"
33
true
true
0
6
13
22
11
11
null
null
KiNaudiz/bachelor
CN/Vector.hs
gpl-3.0
-- TODO: partitionVec (!) :: Vector a -> VKey -> a v ! i = (A.!) (vec v) i
75
(!) :: Vector a -> VKey -> a v ! i = (A.!) (vec v) i
52
v ! i = (A.!) (vec v) i
23
true
true
0
9
19
50
25
25
null
null
TomMD/crypto-api
Crypto/Util.hs
bsd-3-clause
-- |zipWith xor + Pack -- -- This is written intentionally to take advantage -- of the bytestring libraries 'zipWith'' rewrite rule but at the -- extra cost of the resulting lazy bytestring being more fragmented -- than either of the two inputs. zwp :: L.ByteString -> L.ByteString -> L.ByteString zwp a b = le...
737
zwp :: L.ByteString -> L.ByteString -> L.ByteString zwp a b = let as = L.toChunks a bs = L.toChunks b in L.fromChunks (go as bs) where go [] _ = [] go _ [] = [] go (a:as) (b:bs) = let l = min (B.length a) (B.length b) (a',ar) = B.splitAt l a (b',br) ...
491
zwp a b = let as = L.toChunks a bs = L.toChunks b in L.fromChunks (go as bs) where go [] _ = [] go _ [] = [] go (a:as) (b:bs) = let l = min (B.length a) (B.length b) (a',ar) = B.splitAt l a (b',br) = B.splitAt l b as' = if B.length ar == ...
439
true
true
2
12
237
281
139
142
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Dictionary.hs
gpl-3.0
queryretrievelevel :: String -> Element queryretrievelevel = cs $ tag (TagGroup 0x0008) (TagElement 0x0052)
107
queryretrievelevel :: String -> Element queryretrievelevel = cs $ tag (TagGroup 0x0008) (TagElement 0x0052)
107
queryretrievelevel = cs $ tag (TagGroup 0x0008) (TagElement 0x0052)
67
false
true
2
7
13
43
19
24
null
null
scsibug/hS3
examples/createBucket.hs
bsd-3-clause
main = do argv <- getArgs let bucket = head argv mConn <- amazonS3ConnectionFromEnv let conn = fromJust mConn putStrLn ("Creating bucket with name: " ++ bucket) res <- createBucketWithPrefix conn bucket either (putStrLn . prettyReqError) (\x -...
392
main = do argv <- getArgs let bucket = head argv mConn <- amazonS3ConnectionFromEnv let conn = fromJust mConn putStrLn ("Creating bucket with name: " ++ bucket) res <- createBucketWithPrefix conn bucket either (putStrLn . prettyReqError) (\x -...
392
main = do argv <- getArgs let bucket = head argv mConn <- amazonS3ConnectionFromEnv let conn = fromJust mConn putStrLn ("Creating bucket with name: " ++ bucket) res <- createBucketWithPrefix conn bucket either (putStrLn . prettyReqError) (\x -...
392
false
false
0
13
141
108
50
58
null
null
zenhack/haskell-capnp
cmd/capnpc-haskell/Trans/Stage1ToFlat.hs
mit
applyBrandType :: ApplyBrandFn C.Type applyBrandType = \case C.CompositeType t -> C.CompositeType $ applyBrandCompositeType t C.VoidType -> C.VoidType C.WordType t -> C.WordType t C.PtrType t -> C.PtrType $ applyBrandPtrType t
260
applyBrandType :: ApplyBrandFn C.Type applyBrandType = \case C.CompositeType t -> C.CompositeType $ applyBrandCompositeType t C.VoidType -> C.VoidType C.WordType t -> C.WordType t C.PtrType t -> C.PtrType $ applyBrandPtrType t
260
applyBrandType = \case C.CompositeType t -> C.CompositeType $ applyBrandCompositeType t C.VoidType -> C.VoidType C.WordType t -> C.WordType t C.PtrType t -> C.PtrType $ applyBrandPtrType t
222
false
true
0
9
62
84
39
45
null
null
pgj/bead
src/Bead/Controller/Pages.hs
bsd-3-clause
viewPageCata login logout home courseOverview evaluationTable viewAssignment submissionList userSubmissions administration courseAdmin p = case p of Login a -> login a Logout a -> logout a Home a -> home a CourseOverview ck a -> courseOverview ck a EvaluationTable a -> evaluati...
536
viewPageCata login logout home courseOverview evaluationTable viewAssignment submissionList userSubmissions administration courseAdmin p = case p of Login a -> login a Logout a -> logout a Home a -> home a CourseOverview ck a -> courseOverview ck a EvaluationTable a -> evaluati...
536
viewPageCata login logout home courseOverview evaluationTable viewAssignment submissionList userSubmissions administration courseAdmin p = case p of Login a -> login a Logout a -> logout a Home a -> home a CourseOverview ck a -> courseOverview ck a EvaluationTable a -> evaluati...
536
false
false
0
8
131
171
70
101
null
null
wavewave/devadmin
lib/Application/DevAdmin/Graph.hs
bsd-3-clause
makeProjDepOrderList :: BuildConfiguration -> ProjectConfiguration -> IO (DaughterMap,[String]) makeProjDepOrderList bc pc = do let projects = pc_projects pc let idnamemap = idprojmap projects nameidmap = projidmap projects -- let (p,w) = (,) <$> bc_srcbase <*> ...
1,040
makeProjDepOrderList :: BuildConfiguration -> ProjectConfiguration -> IO (DaughterMap,[String]) makeProjDepOrderList bc pc = do let projects = pc_projects pc let idnamemap = idprojmap projects nameidmap = projidmap projects -- let (p,w) = (,) <$> bc_srcbase <*> ...
1,040
makeProjDepOrderList bc pc = do let projects = pc_projects pc let idnamemap = idprojmap projects nameidmap = projidmap projects -- let (p,w) = (,) <$> bc_srcbase <*> bc_workspacebase $ bc p = bc_srcbase bc gdescs <- mapM (readPackageDescription normal . getCabalFileName p ) projects let deps ...
901
false
true
0
17
262
284
142
142
null
null
jml/haverer
lib/Haverer/Action.hs
apache-2.0
_validatePlay player Knight play@(Attack target) | player == target = throwError SelfTarget | otherwise = return play
121
_validatePlay player Knight play@(Attack target) | player == target = throwError SelfTarget | otherwise = return play
121
_validatePlay player Knight play@(Attack target) | player == target = throwError SelfTarget | otherwise = return play
121
false
false
0
8
20
57
23
34
null
null
smaccm/capDL-tool
CapDL/Model.hs
bsd-2-clause
tcbIPCBufferSlot :: Word tcbIPCBufferSlot = 4
45
tcbIPCBufferSlot :: Word tcbIPCBufferSlot = 4
45
tcbIPCBufferSlot = 4
20
false
true
0
6
5
18
7
11
null
null
akhileshs/stack
src/Path/IO.hs
bsd-3-clause
-- | Move a dir. Optimistically assumes it exists. If it doesn't, -- doesn't complain. moveDirIfExists :: MonadIO m => Path b1 Dir -> Path b2 Dir -> m () moveDirIfExists from to = ignoreDoesNotExist (moveDir from to)
216
moveDirIfExists :: MonadIO m => Path b1 Dir -> Path b2 Dir -> m () moveDirIfExists from to = ignoreDoesNotExist (moveDir from to)
129
moveDirIfExists from to = ignoreDoesNotExist (moveDir from to)
62
true
true
0
9
37
59
28
31
null
null
mmx1/tokenGen
src/Generator.hs
bsd-3-clause
getRandom :: IO Int getRandom = do g <- newGenIO :: IO CtrDRBG case (crandom g :: Either GenError (Int, CtrDRBG))of Left err -> (error $ show err) >> exitFailure Right (result, g2 ) -> return result
210
getRandom :: IO Int getRandom = do g <- newGenIO :: IO CtrDRBG case (crandom g :: Either GenError (Int, CtrDRBG))of Left err -> (error $ show err) >> exitFailure Right (result, g2 ) -> return result
210
getRandom = do g <- newGenIO :: IO CtrDRBG case (crandom g :: Either GenError (Int, CtrDRBG))of Left err -> (error $ show err) >> exitFailure Right (result, g2 ) -> return result
190
false
true
0
14
48
101
48
53
null
null
iljakuklic/eel-proto
src/Parser/Core.hs
bsd-3-clause
-- parse input between two string tokens psbet a b = between (pstok a) (pstok b)
80
psbet a b = between (pstok a) (pstok b)
39
psbet a b = between (pstok a) (pstok b)
39
true
false
1
7
15
33
14
19
null
null
mariefarrell/Hets
Framework/Analysis.hs
gpl-2.0
lookupMorph :: Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => lid -> MORPH_NAME -> DGraph -> Result morphism lookupMorph l n dg = do let extView = case lookupGlobalEnvDG n dg of Just (ViewOrStructEnt...
732
lookupMorph :: Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => lid -> MORPH_NAME -> DGraph -> Result morphism lookupMorph l n dg = do let extView = case lookupGlobalEnvDG n dg of Just (ViewOrStructEnt...
732
lookupMorph l n dg = do let extView = case lookupGlobalEnvDG n dg of Just (ViewOrStructEntry _ ev) -> ev _ -> error $ "The morphism " ++ show n ++ " could not be found." case extView of ExtViewSig _ (GMorphism c _ _ morph _) _ -> do let l'...
522
false
true
0
17
274
218
102
116
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_05/hello.hs
mit
eval val@(Ratio _ ) = return val
32
eval val@(Ratio _ ) = return val
32
eval val@(Ratio _ ) = return val
32
false
false
0
7
6
22
10
12
null
null
DominikDitoIvosevic/Uni
IRG/src/Irg/Lab3/Utility.hs
mit
-- import Irg.Lab3.Geometry.Shapes getWindowSize :: Num a => IO (a, a) getWindowSize = do GLUT.Size width height <- GLUT.get GLUT.windowSize return (fromIntegral width,fromIntegral height)
193
getWindowSize :: Num a => IO (a, a) getWindowSize = do GLUT.Size width height <- GLUT.get GLUT.windowSize return (fromIntegral width,fromIntegral height)
157
getWindowSize = do GLUT.Size width height <- GLUT.get GLUT.windowSize return (fromIntegral width,fromIntegral height)
121
true
true
0
10
28
73
33
40
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/show_4.hs
mit
primModInt vx vy = error
24
primModInt vx vy = error
24
primModInt vx vy = error
24
false
false
1
5
4
16
5
11
null
null
chrisbloecker/Hive
src/Hive/Data/Graph.hs
gpl-3.0
------------------------------------------------------------------------------- (<+>) :: (Applicative a, Num n) => a n -> a n -> a n m <+> n = (+) <$> m <*> n
159
(<+>) :: (Applicative a, Num n) => a n -> a n -> a n m <+> n = (+) <$> m <*> n
78
m <+> n = (+) <$> m <*> n
25
true
true
0
10
25
62
32
30
null
null
joelburget/haste-compiler
libraries/base-ghc-7.6/GHC/Float/RealFracMethods.hs
bsd-3-clause
float2Int :: Float -> Int float2Int (F# x) = I# (float2Int# x)
62
float2Int :: Float -> Int float2Int (F# x) = I# (float2Int# x)
62
float2Int (F# x) = I# (float2Int# x)
36
false
true
0
7
11
33
16
17
null
null
beni55/ghcjs
src/Compiler/JMacro/Util.hs
mit
jstr :: Text -> JExpr jstr = ValExpr P.. JStr
45
jstr :: Text -> JExpr jstr = ValExpr P.. JStr
45
jstr = ValExpr P.. JStr
23
false
true
1
7
9
29
12
17
null
null
cirquit/quizlearner
quizlearner/Handler/Quizcreator.hs
mit
toExamAttributes :: Text -> ExamAttributes toExamAttributes ((splitOn "($)") -> [a, b, c]) = let (Just passPercentage) = maybeDouble $ unpack b (Just questCount) = maybeInt $ unpack c title = (unwords . words...
423
toExamAttributes :: Text -> ExamAttributes toExamAttributes ((splitOn "($)") -> [a, b, c]) = let (Just passPercentage) = maybeDouble $ unpack b (Just questCount) = maybeInt $ unpack c title = (unwords . words...
423
toExamAttributes ((splitOn "($)") -> [a, b, c]) = let (Just passPercentage) = maybeDouble $ unpack b (Just questCount) = maybeInt $ unpack c title = (unwords . words) a in ...
380
false
true
0
11
200
111
54
57
null
null
sitewisely/zellige
src/Data/Geometry/Clip/Internal/LineNichollLeeNicholl.hs
apache-2.0
clipLine ::TypesGeography.BoundingBox -> TypesGeography.GeoStorableLine -> Maybe TypesGeography.GeoStorableLine clipLine r@(TypesGeography.BoundingBox left _ right _) l@(TypesGeography.GeoStorableLine (Geospatial.PointXY p1x _) _) | p1x < left = _p1Left r l | p1x > right = rotateLine180c <$> _p1Left (rotateRect180...
375
clipLine ::TypesGeography.BoundingBox -> TypesGeography.GeoStorableLine -> Maybe TypesGeography.GeoStorableLine clipLine r@(TypesGeography.BoundingBox left _ right _) l@(TypesGeography.GeoStorableLine (Geospatial.PointXY p1x _) _) | p1x < left = _p1Left r l | p1x > right = rotateLine180c <$> _p1Left (rotateRect180...
375
clipLine r@(TypesGeography.BoundingBox left _ right _) l@(TypesGeography.GeoStorableLine (Geospatial.PointXY p1x _) _) | p1x < left = _p1Left r l | p1x > right = rotateLine180c <$> _p1Left (rotateRect180c r) (rotateLine180c l) | otherwise = _p1Centre r l
263
false
true
15
10
52
133
66
67
null
null
danchoi/jsonconvhtml
Main.hs
mit
decodeWith :: (FromJSON a) => Parser Value -> BL.ByteString -> (Maybe a, BL.ByteString) decodeWith p s = case Atto.parse p s of Atto.Done r v -> f v r Atto.Fail _ _ _ -> (Nothing, mempty) where f v' r = (\x -> case x of Success a -> (Just a, r) _ -> (Nothin...
340
decodeWith :: (FromJSON a) => Parser Value -> BL.ByteString -> (Maybe a, BL.ByteString) decodeWith p s = case Atto.parse p s of Atto.Done r v -> f v r Atto.Fail _ _ _ -> (Nothing, mempty) where f v' r = (\x -> case x of Success a -> (Just a, r) _ -> (Nothin...
340
decodeWith p s = case Atto.parse p s of Atto.Done r v -> f v r Atto.Fail _ _ _ -> (Nothing, mempty) where f v' r = (\x -> case x of Success a -> (Just a, r) _ -> (Nothing, r)) $ fromJSON v'
252
false
true
0
12
121
160
81
79
null
null
rvion/lamdu
bottlelib/Graphics/DrawingCombinators/Utils.hs
gpl-3.0
textHeight :: Draw.R textHeight = 2
35
textHeight :: Draw.R textHeight = 2
35
textHeight = 2
14
false
true
0
7
5
20
8
12
null
null
SamirTalwar/advent-of-code
2021/AOC_09_1.hs
mit
main :: IO () main = do heightMap <- Grid.fromDigits <$> getContents let lowestPoints = findLowestPoints heightMap print $ sum $ map succ lowestPoints
156
main :: IO () main = do heightMap <- Grid.fromDigits <$> getContents let lowestPoints = findLowestPoints heightMap print $ sum $ map succ lowestPoints
156
main = do heightMap <- Grid.fromDigits <$> getContents let lowestPoints = findLowestPoints heightMap print $ sum $ map succ lowestPoints
142
false
true
0
10
29
57
26
31
null
null
bairyn/bitmaps
src/Data/Bitmap/Class.hs
bsd-3-clause
tryIBF_RGB32 :: (S.Stringy s, Bitmap bmp) => bmp -> s -> Either String bmp tryIBF_RGB32 metaBitmap s | S.length s < minLength = Left $ printf "Data.Bitmap.Class.tryIBF_RGB32: string is too small to contain the pixels of a bitmap with the dimensions of the passed bitmap, which are (%d, %d); the string is %d bytes lo...
1,224
tryIBF_RGB32 :: (S.Stringy s, Bitmap bmp) => bmp -> s -> Either String bmp tryIBF_RGB32 metaBitmap s | S.length s < minLength = Left $ printf "Data.Bitmap.Class.tryIBF_RGB32: string is too small to contain the pixels of a bitmap with the dimensions of the passed bitmap, which are (%d, %d); the string is %d bytes lo...
1,224
tryIBF_RGB32 metaBitmap s | S.length s < minLength = Left $ printf "Data.Bitmap.Class.tryIBF_RGB32: string is too small to contain the pixels of a bitmap with the dimensions of the passed bitmap, which are (%d, %d); the string is %d bytes long, but needs to be at least %d bytes long" (fromIntegral width :: Integer...
1,149
false
true
2
15
396
347
179
168
null
null
SAdams601/HaRe
old/testing/simplifyExpr/EitherIn1_TokOut.hs
bsd-3-clause
p x@(y:ys) = case x of [] -> 42 (z:zs) -> zs
70
p x@(y:ys) = case x of [] -> 42 (z:zs) -> zs
70
p x@(y:ys) = case x of [] -> 42 (z:zs) -> zs
70
false
false
1
10
37
50
23
27
null
null
patperry/lapack
tests/Orthogonal.hs
bsd-3-clause
prop_perm_doSSolveMatrix alpha (Nat2 (m,n)) = forAll (testPerm m) $ \p -> forAll (Test.matrix (m,n)) $ \(b :: M) -> forAll (Test.matrix (m,n)) $ \c -> monadicST $ do b' <- run $ unsafeThawMatrix b run $ doSSolveMatrix alpha p c b' assert $ b ~== p <\\> (alpha *> ...
322
prop_perm_doSSolveMatrix alpha (Nat2 (m,n)) = forAll (testPerm m) $ \p -> forAll (Test.matrix (m,n)) $ \(b :: M) -> forAll (Test.matrix (m,n)) $ \c -> monadicST $ do b' <- run $ unsafeThawMatrix b run $ doSSolveMatrix alpha p c b' assert $ b ~== p <\\> (alpha *> ...
322
prop_perm_doSSolveMatrix alpha (Nat2 (m,n)) = forAll (testPerm m) $ \p -> forAll (Test.matrix (m,n)) $ \(b :: M) -> forAll (Test.matrix (m,n)) $ \c -> monadicST $ do b' <- run $ unsafeThawMatrix b run $ doSSolveMatrix alpha p c b' assert $ b ~== p <\\> (alpha *> ...
322
false
false
0
16
106
156
79
77
null
null
rzetterberg/alven
src/lib/Plugin/Auth/Email.hs
mit
postLoginR :: YesodAuthEmail master => HandlerT Auth (HandlerT master IO) TypedContent postLoginR = do (identifier, pass) <- lift $ runInputPost $ (,) <$> ireq textField "email" <*> ireq textField "password" mecreds <- lift $ getEmailCreds identifier maid <- case ( mecreds >>= emailC...
1,292
postLoginR :: YesodAuthEmail master => HandlerT Auth (HandlerT master IO) TypedContent postLoginR = do (identifier, pass) <- lift $ runInputPost $ (,) <$> ireq textField "email" <*> ireq textField "password" mecreds <- lift $ getEmailCreds identifier maid <- case ( mecreds >>= emailC...
1,292
postLoginR = do (identifier, pass) <- lift $ runInputPost $ (,) <$> ireq textField "email" <*> ireq textField "password" mecreds <- lift $ getEmailCreds identifier maid <- case ( mecreds >>= emailCredsAuthId , emailCredsEmail <$> mecreds , emailCredsStatus <...
1,205
false
true
0
18
532
309
153
156
null
null
f1u77y/xmonad-contrib
XMonad/Layout/BinarySpacePartition.hs
bsd-3-clause
modifyParentVal :: (a -> a) -> Crumb a -> Crumb a modifyParentVal f (LeftCrumb s t) = LeftCrumb (f s) t
103
modifyParentVal :: (a -> a) -> Crumb a -> Crumb a modifyParentVal f (LeftCrumb s t) = LeftCrumb (f s) t
103
modifyParentVal f (LeftCrumb s t) = LeftCrumb (f s) t
53
false
true
0
7
20
60
28
32
null
null
plclub/cis670-16fa
projects/DynamicLang/src/Compiler.hs
mit
arrowUnify :: TypeRep a -> Maybe (ArrowRep a) arrowUnify tra = do (TR.App tra' tra2) <- splitApp tra (TR.App tr tra1) <- splitApp tra' Refl <- eqT tr (typeRep :: TypeRep (->)) return $ ArrowRep tra1 tra2 -- ======================================================================================= -- | Take a Type...
847
arrowUnify :: TypeRep a -> Maybe (ArrowRep a) arrowUnify tra = do (TR.App tra' tra2) <- splitApp tra (TR.App tr tra1) <- splitApp tra' Refl <- eqT tr (typeRep :: TypeRep (->)) return $ ArrowRep tra1 tra2 -- ======================================================================================= -- | Take a Type...
847
arrowUnify tra = do (TR.App tra' tra2) <- splitApp tra (TR.App tr tra1) <- splitApp tra' Refl <- eqT tr (typeRep :: TypeRep (->)) return $ ArrowRep tra1 tra2 -- ======================================================================================= -- | Take a TypeRep 'tr' and a StaticExp Dynamic 'he' and chec...
801
false
true
0
11
153
115
58
57
null
null
CBMM/CBaaS
cbaas-frontend/src/Frontend/Canvas.hs
bsd-3-clause
touchRelCoord x0 y0 tch = relativizedCoord x0 y0 <$> touchCoord tch
67
touchRelCoord x0 y0 tch = relativizedCoord x0 y0 <$> touchCoord tch
67
touchRelCoord x0 y0 tch = relativizedCoord x0 y0 <$> touchCoord tch
67
false
false
0
6
10
25
11
14
null
null
davidsundelius/JLC
src/TypeChecker.hs
mit
inferArray :: Ident -> Env -> Err Type inferArray i env = do t <- lookupVar i env (case t of TArray t' -> return t' _ -> fail $ "[inferArray] type of input expression is not array " ++ printTree i)
219
inferArray :: Ident -> Env -> Err Type inferArray i env = do t <- lookupVar i env (case t of TArray t' -> return t' _ -> fail $ "[inferArray] type of input expression is not array " ++ printTree i)
219
inferArray i env = do t <- lookupVar i env (case t of TArray t' -> return t' _ -> fail $ "[inferArray] type of input expression is not array " ++ printTree i)
180
false
true
0
12
63
78
36
42
null
null
DanielWaterworth/Idris-dev
src/Idris/IdeSlave.hs
bsd-3-clause
constTy _ = "Type"
18
constTy _ = "Type"
18
constTy _ = "Type"
18
false
false
0
5
3
9
4
5
null
null
emwap/feldspar-language
src/Feldspar/Core/Types.hs
bsd-3-clause
typeEq DoubleType DoubleType = Just TypeEq
42
typeEq DoubleType DoubleType = Just TypeEq
42
typeEq DoubleType DoubleType = Just TypeEq
42
false
false
0
5
5
14
6
8
null
null
nevrenato/Hets_Fork
Comorphisms/Hs2HOLCFaux.hs
gpl-2.0
mthFractional = ["/","recip","fromRational"]
44
mthFractional = ["/","recip","fromRational"]
44
mthFractional = ["/","recip","fromRational"]
44
false
false
0
5
2
15
9
6
null
null
gridaphobe/cabal
cabal-install/Distribution/Client/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
10
184
186
85
101
null
null
dcreager/cabal
Distribution/Simple/Setup.hs
bsd-3-clause
optionDistPref :: (flags -> Flag FilePath) -> (Flag FilePath -> flags -> flags) -> ShowOrParseArgs -> OptionField flags optionDistPref get set = \showOrParseArgs -> option "" (distPrefFlagName showOrParseArgs) ( "The directory where Cabal puts generated build files "...
525
optionDistPref :: (flags -> Flag FilePath) -> (Flag FilePath -> flags -> flags) -> ShowOrParseArgs -> OptionField flags optionDistPref get set = \showOrParseArgs -> option "" (distPrefFlagName showOrParseArgs) ( "The directory where Cabal puts generated build files "...
525
optionDistPref get set = \showOrParseArgs -> option "" (distPrefFlagName showOrParseArgs) ( "The directory where Cabal puts generated build files " ++ "(default " ++ defaultDistPref ++ ")") get set (reqArgFlag "DIR") where distPrefFlagName ShowArgs = ["builddir"] distPrefFlagName ParseAr...
360
false
true
0
9
136
135
67
68
null
null
afcady/servant-reflex
src/Servant/Common/Req.hs
bsd-3-clause
reqFailure (RequestFailure _ s) = Just s
43
reqFailure (RequestFailure _ s) = Just s
43
reqFailure (RequestFailure _ s) = Just s
43
false
false
0
7
9
20
9
11
null
null
agocorona/ghcjs-perch
src/Internal/Perch.hs
mit
param = nelem "param"
24
param = nelem "param"
24
param = nelem "param"
24
false
false
1
5
6
13
4
9
null
null
GaloisInc/galua
lib/macho/src/Data/Macho.hs
mit
-- | Throws 'MachoFailure' macho_magic :: Word32 -> MH_MAGIC macho_magic 0xfeedface = MH_MAGIC32
96
macho_magic :: Word32 -> MH_MAGIC macho_magic 0xfeedface = MH_MAGIC32
69
macho_magic 0xfeedface = MH_MAGIC32
35
true
true
0
7
12
25
11
14
null
null
hazel-el/hazel
Hazel/Parser/OWL/RFC3987.hs
gpl-3.0
iRegName :: Parser Text iRegName = T.concat <$> many' (singleton <$> iUnreserved <|> pctEncoded <|> singleton <$> subDelims)
186
iRegName :: Parser Text iRegName = T.concat <$> many' (singleton <$> iUnreserved <|> pctEncoded <|> singleton <$> subDelims)
186
iRegName = T.concat <$> many' (singleton <$> iUnreserved <|> pctEncoded <|> singleton <$> subDelims)
162
false
true
2
10
79
48
22
26
null
null
janschulz/pandoc
src/Text/Pandoc/UTF8.hs
gpl-2.0
filterCRs (x:xs) = x : filterCRs xs
35
filterCRs (x:xs) = x : filterCRs xs
35
filterCRs (x:xs) = x : filterCRs xs
35
false
false
2
6
6
25
11
14
null
null
johanjoensson/QuantumHaskell
FockState.hs
agpl-3.0
(0 :+ 0) *| _ = KetZero
25
(0 :+ 0) *| _ = KetZero
25
(0 :+ 0) *| _ = KetZero
25
false
false
0
7
8
19
9
10
null
null
wavewave/hoodle-core
src/Hoodle/Coroutine/Default.hs
gpl-3.0
menuEventProcess MenuFirstPage = changePage (const 0)
53
menuEventProcess MenuFirstPage = changePage (const 0)
53
menuEventProcess MenuFirstPage = changePage (const 0)
53
false
false
0
7
5
18
8
10
null
null
VictorCMiraldo/mmm
MMM/Core/Distributive.hs
mit
(.+) :: Float -> Float -> Lift Dist FreeMaybe Float (.+) m n = additionFaulty m n
81
(.+) :: Float -> Float -> Lift Dist FreeMaybe Float (.+) m n = additionFaulty m n
81
(.+) m n = additionFaulty m n
29
false
true
0
7
16
40
21
19
null
null
gatlin/psilo
src/Lib/Parser.hs
gpl-3.0
tau :: Parser Type tau = ty_sym <|> (parens compound)
53
tau :: Parser Type tau = ty_sym <|> (parens compound)
53
tau = ty_sym <|> (parens compound)
34
false
true
1
8
9
28
12
16
null
null
styx/gtc
Gt/Core.hs
gpl-3.0
-- Conversion of inner list with pos-term data pt :: (String, JSValue) -> Dict -> Dict pt (tclass, jval) s = case tclass of "pos" -> s { pos = pos_to_str jval } "terms" -> s { terms = nub_sort $ jlist_to_slist jval} _ -> s
269
pt :: (String, JSValue) -> Dict -> Dict pt (tclass, jval) s = case tclass of "pos" -> s { pos = pos_to_str jval } "terms" -> s { terms = nub_sort $ jlist_to_slist jval} _ -> s
222
pt (tclass, jval) s = case tclass of "pos" -> s { pos = pos_to_str jval } "terms" -> s { terms = nub_sort $ jlist_to_slist jval} _ -> s
182
true
true
0
11
92
91
47
44
null
null
sukhmel/algorithms.intro
part_1/chapter_2/BubbleSort.hs
mit
main :: IO () main = mapM_ (perform ((<),(>))) [ bubbleSortBy'' , bubbleSortBy' , bubbleSortBy ]
162
main :: IO () main = mapM_ (perform ((<),(>))) [ bubbleSortBy'' , bubbleSortBy' , bubbleSortBy ]
162
main = mapM_ (perform ((<),(>))) [ bubbleSortBy'' , bubbleSortBy' , bubbleSortBy ]
148
false
true
0
8
81
52
28
24
null
null