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
neosam/esge
src/Esge/Base.hs
bsd-3-clause
-- | Get room where player is located currRoom :: EC.Ingame -> ER.Room currRoom ingame = roomOfIndividual (player ingame) ingame
128
currRoom :: EC.Ingame -> ER.Room currRoom ingame = roomOfIndividual (player ingame) ingame
90
currRoom ingame = roomOfIndividual (player ingame) ingame
57
true
true
0
8
19
39
18
21
null
null
zydeon/PeMo
src/IM.hs
bsd-3-clause
isConnected _ = False
29
isConnected _ = False
29
isConnected _ = False
29
false
false
0
4
11
10
4
6
null
null
markflorisson/hpack
testrepo/bytestring-0.9.1.9/Data/ByteString/Lazy.hs
bsd-3-clause
------------------------------------------------------------------------ {- -- | /O(n)/ Convert a '[a]' into a 'ByteString' using some -- conversion function packWith :: (a -> Word8) -> [a] -> ByteString packWith k str = LPS $ L.map (P.packWith k) (chunk defaultChunkSize str) {-# INLINE packWith #-} {-# SPECIALIZE pac...
843
null :: ByteString -> Bool null Empty = True
44
null Empty = True
17
true
true
0
5
127
23
14
9
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/GetPasswordData.hs
mpl-2.0
-- | The password of the instance. gpdrPasswordData :: Lens' GetPasswordDataResponse (Maybe Text) gpdrPasswordData = lens _gpdrPasswordData (\s a -> s { _gpdrPasswordData = a })
177
gpdrPasswordData :: Lens' GetPasswordDataResponse (Maybe Text) gpdrPasswordData = lens _gpdrPasswordData (\s a -> s { _gpdrPasswordData = a })
142
gpdrPasswordData = lens _gpdrPasswordData (\s a -> s { _gpdrPasswordData = a })
79
true
true
0
9
25
46
25
21
null
null
gorkinovich/Haskell
Checkers/src/Debug.hs
mit
-- ********************************************************************** -- Function: debugBoardRow -- Description: This function shows the content of a BoardRow value. -- ********************************************************************** debugBoardRow::BoardRow -> IO () debugBoardRow [x] = debugSquare x
310
debugBoardRow::BoardRow -> IO () debugBoardRow [x] = debugSquare x
66
debugBoardRow [x] = debugSquare x
33
true
true
0
7
26
33
18
15
null
null
SimSaladin/hajong
hajong-server/tests/tests.hs
mit
tests :: TestTree tests = testGroup "Hajong tests" [ Mentsu.tests , Yaku.tests , Mechanics.tests , Hand.tests --, PrettyPrint.tests --, Client.tests , Worker.tests ]
197
tests :: TestTree tests = testGroup "Hajong tests" [ Mentsu.tests , Yaku.tests , Mechanics.tests , Hand.tests --, PrettyPrint.tests --, Client.tests , Worker.tests ]
197
tests = testGroup "Hajong tests" [ Mentsu.tests , Yaku.tests , Mechanics.tests , Hand.tests --, PrettyPrint.tests --, Client.tests , Worker.tests ]
179
false
true
0
6
54
44
25
19
null
null
bitemyapp/hakaru
Language/Hakaru/Parser/Parser.hs
bsd-3-clause
gamma_ :: Parser Dist gamma_ = do reserved "gamma" Pair a (Pair b Unit) <- pairs return $ Gamma a b
108
gamma_ :: Parser Dist gamma_ = do reserved "gamma" Pair a (Pair b Unit) <- pairs return $ Gamma a b
108
gamma_ = do reserved "gamma" Pair a (Pair b Unit) <- pairs return $ Gamma a b
86
false
true
0
11
29
58
24
34
null
null
mathologist/CTYCrypto
Ciphers.hs
gpl-3.0
matrixToString :: String -> M.Matrix Rational -> String matrixToString alpha = intToAlpha alpha . map (\x -> (round x) `mod` (length alpha)) . concat . M.toList . M.transpose
175
matrixToString :: String -> M.Matrix Rational -> String matrixToString alpha = intToAlpha alpha . map (\x -> (round x) `mod` (length alpha)) . concat . M.toList . M.transpose
175
matrixToString alpha = intToAlpha alpha . map (\x -> (round x) `mod` (length alpha)) . concat . M.toList . M.transpose
119
false
true
0
14
28
79
40
39
null
null
sdiehl/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv delTidyOccEnvList = delListFromUFM
96
delTidyOccEnvList :: TidyOccEnv -> [FastString] -> TidyOccEnv delTidyOccEnvList = delListFromUFM
96
delTidyOccEnvList = delListFromUFM
34
false
true
0
7
9
22
12
10
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - A list of all existing waypoints. -} getWaypointManagerWaypoints :: KRPCHS.SpaceCenter.WaypointManager -> RPCContext ([KRPCHS.SpaceCenter.Waypoint]) getWaypointManagerWaypoints thisArg = do let r = makeRequest "SpaceCenter" "WaypointManager_get_Waypoints" [makeArgument 0 thisArg] res <- sendRequest r ...
340
getWaypointManagerWaypoints :: KRPCHS.SpaceCenter.WaypointManager -> RPCContext ([KRPCHS.SpaceCenter.Waypoint]) getWaypointManagerWaypoints thisArg = do let r = makeRequest "SpaceCenter" "WaypointManager_get_Waypoints" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
296
getWaypointManagerWaypoints thisArg = do let r = makeRequest "SpaceCenter" "WaypointManager_get_Waypoints" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
184
true
true
0
13
47
78
37
41
null
null
drhodes/jade2hdl
src/Jade/Module.hs
bsd-3-clause
testBenchName modname = mangleModName modname ++ "_tb"
54
testBenchName modname = mangleModName modname ++ "_tb"
54
testBenchName modname = mangleModName modname ++ "_tb"
54
false
false
1
6
6
20
7
13
null
null
brendanhay/gogol
gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/Sources/List.hs
mpl-2.0
-- | OAuth access token. oslAccessToken :: Lens' OrganizationsSourcesList (Maybe Text) oslAccessToken = lens _oslAccessToken (\ s a -> s{_oslAccessToken = a})
166
oslAccessToken :: Lens' OrganizationsSourcesList (Maybe Text) oslAccessToken = lens _oslAccessToken (\ s a -> s{_oslAccessToken = a})
141
oslAccessToken = lens _oslAccessToken (\ s a -> s{_oslAccessToken = a})
79
true
true
0
9
29
48
25
23
null
null
uduki/hsQt
Qtc/Enums/Gui/QAbstractItemView.hs
bsd-2-clause
eMoveHome :: CursorAction eMoveHome = ieCursorAction $ 4
58
eMoveHome :: CursorAction eMoveHome = ieCursorAction $ 4
58
eMoveHome = ieCursorAction $ 4
32
false
true
0
6
9
18
8
10
null
null
reedrosenbluth/othello
src/Game.hs
bsd-3-clause
findWinner :: Board -> Piece findWinner b | isOver b = case compare black white of GT -> Black LT -> White EQ -> Empty -- We use Empty to indicate a draw. | otherwise = error "The game is not over" where black = length $ filter (\s -> b ! s == Black) squares white = length $ filter (\s -...
345
findWinner :: Board -> Piece findWinner b | isOver b = case compare black white of GT -> Black LT -> White EQ -> Empty -- We use Empty to indicate a draw. | otherwise = error "The game is not over" where black = length $ filter (\s -> b ! s == Black) squares white = length $ filter (\s -...
345
findWinner b | isOver b = case compare black white of GT -> Black LT -> White EQ -> Empty -- We use Empty to indicate a draw. | otherwise = error "The game is not over" where black = length $ filter (\s -> b ! s == Black) squares white = length $ filter (\s -> b ! s == White) squares
316
false
true
1
10
100
130
64
66
null
null
sgillespie/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp _ DoubleNeOp = Just (MO_F_Ne W64)
54
translateOp _ DoubleNeOp = Just (MO_F_Ne W64)
54
translateOp _ DoubleNeOp = Just (MO_F_Ne W64)
54
false
false
0
7
15
20
9
11
null
null
chreekat/snowdrift
Model/Discussion.hs
agpl-3.0
fetchDiscussionsInternal :: [Language] -> [DiscussionId] -> DiscussionType -> DB (Map DiscussionId DiscussionOn) fetchDiscussionsInternal _ discussion_ids DiscussionTypeProject = fmap (foldr go mempty) $ select $ from $ \p -> do where_ $ p ^. ProjectDiscussion `in_` valList discussion_ids ...
540
fetchDiscussionsInternal :: [Language] -> [DiscussionId] -> DiscussionType -> DB (Map DiscussionId DiscussionOn) fetchDiscussionsInternal _ discussion_ids DiscussionTypeProject = fmap (foldr go mempty) $ select $ from $ \p -> do where_ $ p ^. ProjectDiscussion `in_` valList discussion_ids ...
540
fetchDiscussionsInternal _ discussion_ids DiscussionTypeProject = fmap (foldr go mempty) $ select $ from $ \p -> do where_ $ p ^. ProjectDiscussion `in_` valList discussion_ids return p where go :: Entity Project -> Map DiscussionId DiscussionOn -> Map DiscussionId DiscussionOn ...
411
false
true
6
11
128
168
83
85
null
null
dan-t/cabal-bounds
lib/CabalBounds/Args.hs
bsd-3-clause
dropArgs :: Args dropArgs = Drop { upper = def &= explicit &= name "upper" &= name "U" &= help "Only the upper bound is dropped, otherwise both - the lower and upper - bounds are dropped." , library = def &= explicit &= name "library" &= name "l" &= help "Only the bounds of the libra...
1,181
dropArgs :: Args dropArgs = Drop { upper = def &= explicit &= name "upper" &= name "U" &= help "Only the upper bound is dropped, otherwise both - the lower and upper - bounds are dropped." , library = def &= explicit &= name "library" &= name "l" &= help "Only the bounds of the libra...
1,181
dropArgs = Drop { upper = def &= explicit &= name "upper" &= name "U" &= help "Only the upper bound is dropped, otherwise both - the lower and upper - bounds are dropped." , library = def &= explicit &= name "library" &= name "l" &= help "Only the bounds of the library are modified."...
1,164
false
true
0
12
342
265
129
136
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
coarsebus :: Pattern Int -> Pattern Double -> ControlPattern coarsebus busid pat = (pF "coarse" pat) # (pI "^coarse" busid)
123
coarsebus :: Pattern Int -> Pattern Double -> ControlPattern coarsebus busid pat = (pF "coarse" pat) # (pI "^coarse" busid)
123
coarsebus busid pat = (pF "coarse" pat) # (pI "^coarse" busid)
62
false
true
2
8
19
57
25
32
null
null
julienschmaltz/madl
src/Madl/Network.hs
mit
prop net ([xIn], LoadBalancer{}, xs) = foldlAllMaybe balancing net xs where balancing :: XColoredNetwork c -> ChannelID -> Maybe (XColoredNetwork c) balancing net' xOut = updateType net' xOut (getColorSet net' xIn)
222
prop net ([xIn], LoadBalancer{}, xs) = foldlAllMaybe balancing net xs where balancing :: XColoredNetwork c -> ChannelID -> Maybe (XColoredNetwork c) balancing net' xOut = updateType net' xOut (getColorSet net' xIn)
222
prop net ([xIn], LoadBalancer{}, xs) = foldlAllMaybe balancing net xs where balancing :: XColoredNetwork c -> ChannelID -> Maybe (XColoredNetwork c) balancing net' xOut = updateType net' xOut (getColorSet net' xIn)
222
false
false
0
11
38
88
43
45
null
null
keithodulaigh/Hets
Common/XPath.hs
gpl-2.0
{- | a step starting with a single or double slash, the latter yielding two steps. -} slashStep :: Parser [Step] slashStep = do b <- doubleSlash s <- step return (if b then [descOrSelfStep, s] else [s]) <?> "slashStep"
231
slashStep :: Parser [Step] slashStep = do b <- doubleSlash s <- step return (if b then [descOrSelfStep, s] else [s]) <?> "slashStep"
140
slashStep = do b <- doubleSlash s <- step return (if b then [descOrSelfStep, s] else [s]) <?> "slashStep"
113
true
true
2
10
52
64
33
31
null
null
jbracker/supermonad-plugin
examples/monad/session-chat/supermonad/Utility.hs
bsd-3-clause
- | Check if the given username is valid. isValidUserName :: String -> Bool isValidUserName = all (\c -> isAscii c && (isAlpha c || isNumber c))
144
isValidUserName :: String -> Bool isValidUserName = all (\c -> isAscii c && (isAlpha c || isNumber c))
102
isValidUserName = all (\c -> isAscii c && (isAlpha c || isNumber c))
68
true
true
3
10
26
68
34
34
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VP.izipWith4' vp_izipWith4 = VP.izipWith4
46
vp_izipWith4 = VP.izipWith4
27
vp_izipWith4 = VP.izipWith4
27
true
false
0
5
4
9
5
4
null
null
mstksg/tensor-ops
src/Data/Vector/Sized.hs
bsd-3-clause
vecFunc :: KnownNat n => (a -> Vector n b) -> Vector n (a -> b) vecFunc f = generate (\i -> I $ (!! i) . f)
119
vecFunc :: KnownNat n => (a -> Vector n b) -> Vector n (a -> b) vecFunc f = generate (\i -> I $ (!! i) . f)
119
vecFunc f = generate (\i -> I $ (!! i) . f)
43
false
true
0
10
39
72
37
35
null
null
nushio3/ghc
libraries/base/Data/Data.hs
bsd-3-clause
word8Type :: DataType word8Type = mkIntType "Data.Word.Word8"
61
word8Type :: DataType word8Type = mkIntType "Data.Word.Word8"
61
word8Type = mkIntType "Data.Word.Word8"
39
false
true
0
6
6
21
8
13
null
null
HJvT/com
System/Win32/Com/Automation.hs
bsd-3-clause
methodID7 :: DISPID -> [VarIn] -> ArgOut a1 -> ArgOut a2 -> ArgOut a3 -> ArgOut a4 -> ArgOut a5 -> ArgOut a6 -> ArgOut a7 -> IDispatch i -> IO (a1,a2,a3,a4,a5,a6,a7) methodID7 dispid args (varin1,argres1) (varin2,argres2) (varin3,argres3...
613
methodID7 :: DISPID -> [VarIn] -> ArgOut a1 -> ArgOut a2 -> ArgOut a3 -> ArgOut a4 -> ArgOut a5 -> ArgOut a6 -> ArgOut a7 -> IDispatch i -> IO (a1,a2,a3,a4,a5,a6,a7) methodID7 dispid args (varin1,argres1) (varin2,argres2) (varin3,argres3...
613
methodID7 dispid args (varin1,argres1) (varin2,argres2) (varin3,argres3) (varin4,argres4) (varin5,argres5) (varin6,argres6) (varin7,argres7) obj = do p <- obj # invokeMethod dispid args [varin1,varin2,varin3,varin4,varin5,varin6,varin7] unmarshallV...
386
false
true
0
16
194
224
120
104
null
null
JeanJoskin/ObjectiveJLib
src/Language/ObjectiveJLib/Parser/Parser.hs
bsd-3-clause
pEString = EString . readQuotedString <$> pValToken TkString
60
pEString = EString . readQuotedString <$> pValToken TkString
60
pEString = EString . readQuotedString <$> pValToken TkString
60
false
false
1
6
7
20
8
12
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
typeErrorVAppendDataConName = dcQual gHC_TYPELITS (fsLit ":$$:") typeErrorVAppendDataConKey
93
typeErrorVAppendDataConName = dcQual gHC_TYPELITS (fsLit ":$$:") typeErrorVAppendDataConKey
93
typeErrorVAppendDataConName = dcQual gHC_TYPELITS (fsLit ":$$:") typeErrorVAppendDataConKey
93
false
false
0
7
8
19
9
10
null
null
giorgidze/HCodecs
src/Codec/ByteString/Parser.hs
bsd-3-clause
getLazyByteStringNul :: Parser L.ByteString getLazyByteStringNul = do S s ss bytes <- get let big = s `bsJoin` ss (consume, t) = L.break (== 0) big (h, rest) = L.splitAt 1 t when (L.null h) $ fail "too few bytes" put $ mkState rest (bytes + L.length consume + 1) return consume -- | ...
364
getLazyByteStringNul :: Parser L.ByteString getLazyByteStringNul = do S s ss bytes <- get let big = s `bsJoin` ss (consume, t) = L.break (== 0) big (h, rest) = L.splitAt 1 t when (L.null h) $ fail "too few bytes" put $ mkState rest (bytes + L.length consume + 1) return consume -- | ...
364
getLazyByteStringNul = do S s ss bytes <- get let big = s `bsJoin` ss (consume, t) = L.break (== 0) big (h, rest) = L.splitAt 1 t when (L.null h) $ fail "too few bytes" put $ mkState rest (bytes + L.length consume + 1) return consume -- | Get the remaining bytes as a lazy ByteString
320
false
true
0
14
98
149
71
78
null
null
nushio3/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
reOrderNodes :: Int -> VarSet -> VarSet -> [Node Details] -> [Binding] -> [Binding] -- Choose a loop breaker, mark it no-inline, -- do SCC analysis on the rest, and recursively sort them out reOrderNodes _ _ _ [] _ = panic "reOrderNodes"
246
reOrderNodes :: Int -> VarSet -> VarSet -> [Node Details] -> [Binding] -> [Binding] reOrderNodes _ _ _ [] _ = panic "reOrderNodes"
131
reOrderNodes _ _ _ [] _ = panic "reOrderNodes"
47
true
true
0
10
51
61
32
29
null
null
enolan/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTT t@(P _ n _) | n == reflm "Erased" = return Erased
65
reifyTT t@(P _ n _) | n == reflm "Erased" = return Erased
65
reifyTT t@(P _ n _) | n == reflm "Erased" = return Erased
65
false
false
0
9
20
43
18
25
null
null
noteed/mojito
Language/Mojito/Inference/SystemCT1999/SystemCT1999.hs
bsd-3-clause
inferTypes :: [Simple] -> Context -> String -> Expr [Simple] inferTypes ts g str = case readExpr str of Left err -> error err Right e -> case infer ts e g of ((Left err,_),_) -> error err ((Right _,_),i) -> giveTypes e (tiSubstitution i) (tiTypings i)
267
inferTypes :: [Simple] -> Context -> String -> Expr [Simple] inferTypes ts g str = case readExpr str of Left err -> error err Right e -> case infer ts e g of ((Left err,_),_) -> error err ((Right _,_),i) -> giveTypes e (tiSubstitution i) (tiTypings i)
267
inferTypes ts g str = case readExpr str of Left err -> error err Right e -> case infer ts e g of ((Left err,_),_) -> error err ((Right _,_),i) -> giveTypes e (tiSubstitution i) (tiTypings i)
206
false
true
2
10
62
140
71
69
null
null
et4te/zero
src/Zero/Account/Profile/Navigation.hs
bsd-3-clause
settingsLink :: MonadWidget t m => Route -> m (Event t ()) settingsLink SettingsRoute = do iconLinkClass "Settings" "active item" "configure"
143
settingsLink :: MonadWidget t m => Route -> m (Event t ()) settingsLink SettingsRoute = do iconLinkClass "Settings" "active item" "configure"
143
settingsLink SettingsRoute = do iconLinkClass "Settings" "active item" "configure"
84
false
true
0
10
22
50
23
27
null
null
kowey/hakyll-convert
src/Hakyll/Convert/OutputFormat.hs
bsd-3-clause
fmtDate :: String -> DistilledPost -> T.Text fmtDate format = T.pack . (formatTime defaultTimeLocale format) . dpDate
117
fmtDate :: String -> DistilledPost -> T.Text fmtDate format = T.pack . (formatTime defaultTimeLocale format) . dpDate
117
fmtDate format = T.pack . (formatTime defaultTimeLocale format) . dpDate
72
false
true
1
9
16
49
22
27
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Xtract/Lex.hs
gpl-3.0
selAny f p ('.':'!':'=':'.':ss) = emit (Symbol ".!=.") p: selAny f (addcol 4 p) ss
110
selAny f p ('.':'!':'=':'.':ss) = emit (Symbol ".!=.") p: selAny f (addcol 4 p) ss
110
selAny f p ('.':'!':'=':'.':ss) = emit (Symbol ".!=.") p: selAny f (addcol 4 p) ss
110
false
false
0
9
42
65
30
35
null
null
snoyberg/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
pprNameSpace TvName = text "type variable"
45
pprNameSpace TvName = text "type variable"
45
pprNameSpace TvName = text "type variable"
45
false
false
0
5
8
12
5
7
null
null
forste/haReFork
refactorer/RefacDupTrans.hs
bsd-3-clause
foldStmt' ss p e s1 _ = (False, s1)
35
foldStmt' ss p e s1 _ = (False, s1)
35
foldStmt' ss p e s1 _ = (False, s1)
35
false
false
0
5
8
28
12
16
null
null
cyclohexanamine/haskbot
src/Bot/Scripting/Laws.hs
bsd-3-clause
-- | Number of prior offences to allow before instakicking the offender. graceOffences = CacheKey 0 "LAWS" "graceOffences" :: PersistentKey Int
143
graceOffences = CacheKey 0 "LAWS" "graceOffences" :: PersistentKey Int
70
graceOffences = CacheKey 0 "LAWS" "graceOffences" :: PersistentKey Int
70
true
false
0
5
20
20
10
10
null
null
phylake/avm3
llvm/passes/abct.hs
mit
abcT1 {- 0x97 -} i u d s m (br, Abc.BitNot) = (br, [BitNot])
60
abcT1 {- 0x97 -} i u d s m (br, Abc.BitNot) = (br, [BitNot])
60
abcT1 {- 0x97 -} i u d s m (br, Abc.BitNot) = (br, [BitNot])
60
false
false
0
7
13
38
21
17
null
null
termite2/tsl
TSL2Boogie/Spec2Boogie.hs
bsd-3-clause
bvbopname Gt = "UGT"
26
bvbopname Gt = "UGT"
26
bvbopname Gt = "UGT"
26
false
false
1
5
9
13
4
9
null
null
brendanhay/gogol
gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Get.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). sgUploadType :: Lens' ServicesGet (Maybe Text) sgUploadType = lens _sgUploadType (\ s a -> s{_sgUploadType = a})
185
sgUploadType :: Lens' ServicesGet (Maybe Text) sgUploadType = lens _sgUploadType (\ s a -> s{_sgUploadType = a})
114
sgUploadType = lens _sgUploadType (\ s a -> s{_sgUploadType = a})
67
true
true
1
9
28
52
25
27
null
null
lemol/HaskellNet
src/Network/HaskellNet/SMTP.hs
bsd-3-clause
connectStream :: BSStream -> IO SMTPConnection connectStream st = do (code1, _) <- parseResponse st unless (code1 == 220) $ do bsClose st fail "cannot connect to the server" senderHost <- getHostName msg <- tryCommand (SMTPC st []) (EHLO senderHost) 3 250 r...
358
connectStream :: BSStream -> IO SMTPConnection connectStream st = do (code1, _) <- parseResponse st unless (code1 == 220) $ do bsClose st fail "cannot connect to the server" senderHost <- getHostName msg <- tryCommand (SMTPC st []) (EHLO senderHost) 3 250 r...
358
connectStream st = do (code1, _) <- parseResponse st unless (code1 == 220) $ do bsClose st fail "cannot connect to the server" senderHost <- getHostName msg <- tryCommand (SMTPC st []) (EHLO senderHost) 3 250 return (SMTPC st (tail $ BS.lines msg))
311
false
true
0
13
111
131
60
71
null
null
bjornbm/dimensional-dk
src/Numeric/Units/Dimensional/Float.hs
bsd-3-clause
-- | Return the minimum of two quantities; if one value is @NaN@, return the other. Prefer the first if both values are @NaN@. minNum :: RealFloat a => Quantity d a -> Quantity d a -> Quantity d a minNum = liftQ2 F.minNum
221
minNum :: RealFloat a => Quantity d a -> Quantity d a -> Quantity d a minNum = liftQ2 F.minNum
94
minNum = liftQ2 F.minNum
24
true
true
0
9
43
52
23
29
null
null
afronski/playground-fp
books/learn-you-a-haskell-for-great-good/for-a-few-monads-more/writer.hs
mit
result' = fst $ runWriter (gcd'' 8 3)
37
result' = fst $ runWriter (gcd'' 8 3)
37
result' = fst $ runWriter (gcd'' 8 3)
37
false
false
0
8
7
21
10
11
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/TeX/Print.hs
bsd-2-clause
pOps Cross = texSym "times"
30
pOps Cross = texSym "times"
30
pOps Cross = texSym "times"
30
false
false
1
5
7
15
5
10
null
null
termite2/tsl
Abstract/TSLAbsGame.hs
bsd-3-clause
varUpdateLoc :: (?spec::Spec, ?pred::[Predicate]) => String -> [((AbsVar, LogicOp, Expr), f)] -> Loc -> CFA -> TAST f e c varUpdateLoc trname vs loc cfa = {-acfaTraceFile acfa ("acfa_" ++ trname ++ "_" ++ vlst) $-} traceFile ("HAST for " ++ vlst ++ ":\n" ++ show ast') (trname ++ "-" ++ ...
647
varUpdateLoc :: (?spec::Spec, ?pred::[Predicate]) => String -> [((AbsVar, LogicOp, Expr), f)] -> Loc -> CFA -> TAST f e c varUpdateLoc trname vs loc cfa = {-acfaTraceFile acfa ("acfa_" ++ trname ++ "_" ++ vlst) $-} traceFile ("HAST for " ++ vlst ++ ":\n" ++ show ast') (trname ++ "-" ++ ...
647
varUpdateLoc trname vs loc cfa = {-acfaTraceFile acfa ("acfa_" ++ trname ++ "_" ++ vlst) $-} traceFile ("HAST for " ++ vlst ++ ":\n" ++ show ast') (trname ++ "-" ++ vlst ++ ".ast") ast where acfa = tranCFAToACFA (map fst vs) loc cfa avs = map (\((av,_,_),nxt) -> (av, nxt)) ...
525
false
true
0
12
173
288
156
132
null
null
rokob/wai-play
Application.hs
mit
homePage :: Application homePage _ respond = respond $ responseLBS status200 [("Content-Type", "text/plain")] "Hello World"
125
homePage :: Application homePage _ respond = respond $ responseLBS status200 [("Content-Type", "text/plain")] "Hello World"
125
homePage _ respond = respond $ responseLBS status200 [("Content-Type", "text/plain")] "Hello World"
101
false
true
0
8
16
36
19
17
null
null
jstolarek/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
pipeLoop :: PhasePlus -> FilePath -> CompPipeline (DynFlags, FilePath) pipeLoop phase input_fn = do env <- getPipeEnv dflags <- getDynFlags let happensBefore' = happensBefore dflags stopPhase = stop_phase env case phase of RealPhase realPhase | realPhase `eqPhase` stopPhase -- All done ...
2,470
pipeLoop :: PhasePlus -> FilePath -> CompPipeline (DynFlags, FilePath) pipeLoop phase input_fn = do env <- getPipeEnv dflags <- getDynFlags let happensBefore' = happensBefore dflags stopPhase = stop_phase env case phase of RealPhase realPhase | realPhase `eqPhase` stopPhase -- All done ...
2,470
pipeLoop phase input_fn = do env <- getPipeEnv dflags <- getDynFlags let happensBefore' = happensBefore dflags stopPhase = stop_phase env case phase of RealPhase realPhase | realPhase `eqPhase` stopPhase -- All done -> -- Sometimes, a compilation phase doesn't actually generate any outp...
2,399
false
true
0
26
912
461
222
239
null
null
Rotsor/wheeled-vehicle
bug.hs
bsd-3-clause
pl :: Scalar DTime pl = mul (1 *~ one) force
44
pl :: Scalar DTime pl = mul (1 *~ one) force
44
pl = mul (1 *~ one) force
25
false
true
0
6
10
33
14
19
null
null
GaloisInc/halvm-ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (ExplicitList _ _ exprs) = brackets (pprDeeperList fsep (punctuate comma (map ppr_lexpr exprs)))
107
ppr_expr (ExplicitList _ _ exprs) = brackets (pprDeeperList fsep (punctuate comma (map ppr_lexpr exprs)))
107
ppr_expr (ExplicitList _ _ exprs) = brackets (pprDeeperList fsep (punctuate comma (map ppr_lexpr exprs)))
107
false
false
0
11
15
46
22
24
null
null
oshyshko/adventofcode
test/TestUtil.hs
bsd-3-clause
spec :: Spec spec = it "size2humanSize" $ size2humanSize . fst <$> sizeHumanSizes `shouldBe` snd <$> sizeHumanSizes where sizeHumanSizes = [ ( 0, "0B") , ( 1, "1B") , ( 125, "125B") , ( ...
1,089
spec :: Spec spec = it "size2humanSize" $ size2humanSize . fst <$> sizeHumanSizes `shouldBe` snd <$> sizeHumanSizes where sizeHumanSizes = [ ( 0, "0B") , ( 1, "1B") , ( 125, "125B") , ( ...
1,089
spec = it "size2humanSize" $ size2humanSize . fst <$> sizeHumanSizes `shouldBe` snd <$> sizeHumanSizes where sizeHumanSizes = [ ( 0, "0B") , ( 1, "1B") , ( 125, "125B") , ( 999, "999B") ...
1,076
false
true
0
10
611
250
161
89
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
airDamage ProtossAssimilator = 0
32
airDamage ProtossAssimilator = 0
32
airDamage ProtossAssimilator = 0
32
false
false
0
5
3
9
4
5
null
null
randen/cabal
cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs
bsd-3-clause
showVar :: Var QPN -> String showVar (P qpn) = showQPN qpn
58
showVar :: Var QPN -> String showVar (P qpn) = showQPN qpn
58
showVar (P qpn) = showQPN qpn
29
false
true
0
7
11
30
14
16
null
null
michaelficarra/purescript
src/Language/PureScript/Sugar/TypeClasses/Deriving.hs
mit
-- | Takes a declaration, and if the declaration is a deriving TypeInstanceDeclaration, -- elaborates that into an instance declaration via code generation. deriveInstance :: (Functor m, MonadError MultipleErrors m, MonadSupply m) => ModuleName -> [Declaration] -> Declaration -> m Declaration deriveInstance mn ds (Type...
637
deriveInstance :: (Functor m, MonadError MultipleErrors m, MonadSupply m) => ModuleName -> [Declaration] -> Declaration -> m Declaration deriveInstance mn ds (TypeInstanceDeclaration nm deps className tys@[ty] DerivedInstance) | className == Qualified (Just dataGeneric) (ProperName C.generic) , Just (Qualified mn' ...
480
deriveInstance mn ds (TypeInstanceDeclaration nm deps className tys@[ty] DerivedInstance) | className == Qualified (Just dataGeneric) (ProperName C.generic) , Just (Qualified mn' tyCon) <- unwrapTypeConstructor ty , mn == fromMaybe mn mn' = TypeInstanceDeclaration nm deps className tys . ExplicitInstance <$> de...
343
true
true
0
12
92
169
83
86
null
null
beni55/HaskellNet
src/Network/HaskellNet/Auth.hs
bsd-3-clause
b64Encode :: String -> String b64Encode = map (toEnum.fromEnum) . B64.encode . map (toEnum.fromEnum)
100
b64Encode :: String -> String b64Encode = map (toEnum.fromEnum) . B64.encode . map (toEnum.fromEnum)
100
b64Encode = map (toEnum.fromEnum) . B64.encode . map (toEnum.fromEnum)
70
false
true
0
8
13
47
22
25
null
null
audetto/andsoft
haskell/Elves/Exp.hs
gpl-3.0
sinD (If c a b) = ifD c (sinD a) (sinD b)
59
sinD (If c a b) = ifD c (sinD a) (sinD b)
59
sinD (If c a b) = ifD c (sinD a) (sinD b)
59
false
false
0
7
29
39
18
21
null
null
SFML-haskell/SFML
src/SFML/Graphics/ConvexShape.hs
mit
checkNull :: ConvexShape -> Maybe ConvexShape checkNull cs@(ConvexShape ptr) = if ptr == nullPtr then Nothing else Just cs
122
checkNull :: ConvexShape -> Maybe ConvexShape checkNull cs@(ConvexShape ptr) = if ptr == nullPtr then Nothing else Just cs
122
checkNull cs@(ConvexShape ptr) = if ptr == nullPtr then Nothing else Just cs
76
false
true
4
7
18
50
25
25
null
null
lukexi/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
writeFileSafe :: InitFlags -> FilePath -> String -> IO () writeFileSafe flags fileName content = do moveExistingFile flags fileName writeFile fileName content -- | Create source directories, if they were given.
215
writeFileSafe :: InitFlags -> FilePath -> String -> IO () writeFileSafe flags fileName content = do moveExistingFile flags fileName writeFile fileName content -- | Create source directories, if they were given.
215
writeFileSafe flags fileName content = do moveExistingFile flags fileName writeFile fileName content -- | Create source directories, if they were given.
157
false
true
0
9
35
57
25
32
null
null
mruegenberg/Delaunay
Graphics/Triangulation/Delaunay.hs
bsd-3-clause
mkUPair :: (Ord a) => a -> a -> UPair a mkUPair a b = if a <= b then UPair a b else UPair b a
93
mkUPair :: (Ord a) => a -> a -> UPair a mkUPair a b = if a <= b then UPair a b else UPair b a
93
mkUPair a b = if a <= b then UPair a b else UPair b a
53
false
true
0
8
26
58
29
29
null
null
roldugin/LiveFusion
Data/LiveFusion/Loop/Label.hs
bsd-3-clause
nestLbl = Label nestNm
24
nestLbl = Label nestNm
24
nestLbl = Label nestNm
24
false
false
1
5
5
13
4
9
null
null
josefs/autosar
ARSim/arsim/AUTOSAR/ARSim.hs
bsd-3-clause
rteCallAsync rop a = singleton $ Call rop a
54
rteCallAsync rop a = singleton $ Call rop a
54
rteCallAsync rop a = singleton $ Call rop a
54
false
false
0
6
19
20
9
11
null
null
ademinn/JavaWithClasses
src/Native.hs
bsd-3-clause
writeInt :: Method writeInt = writeMethod "writeInt" TInt
57
writeInt :: Method writeInt = writeMethod "writeInt" TInt
57
writeInt = writeMethod "writeInt" TInt
38
false
true
0
6
7
23
9
14
null
null
medik/lang-hack
Haskell/haskell-tuts.hs
gpl-3.0
lastPrime = last morePrimes
27
lastPrime = last morePrimes
27
lastPrime = last morePrimes
27
false
false
0
5
3
9
4
5
null
null
io7m/jcamera
com.io7m.jcamera.documentation/src/main/resources/com/io7m/jcamera/documentation/haskell/SecondLawRewrite.hs
isc
a :: Float -> Float -> Float a f m = (1 / m) * f
48
a :: Float -> Float -> Float a f m = (1 / m) * f
48
a f m = (1 / m) * f
19
false
true
0
7
15
40
19
21
null
null
aldld/hasp
src/Semantics.hs
bsd-3-clause
boolAnd env (expr:exprs) = do (result, _) <- evalExpr env expr case result of HBool True -> boolAnd env exprs HBool False -> return (HBool False, env) _ -> throw $ errWrongType "and" "boolean" -- |Short-circuiting boolean `or` operation.
270
boolAnd env (expr:exprs) = do (result, _) <- evalExpr env expr case result of HBool True -> boolAnd env exprs HBool False -> return (HBool False, env) _ -> throw $ errWrongType "and" "boolean" -- |Short-circuiting boolean `or` operation.
270
boolAnd env (expr:exprs) = do (result, _) <- evalExpr env expr case result of HBool True -> boolAnd env exprs HBool False -> return (HBool False, env) _ -> throw $ errWrongType "and" "boolean" -- |Short-circuiting boolean `or` operation.
270
false
false
0
12
71
94
45
49
null
null
diku-dk/futhark
src/Futhark/Analysis/Metrics.hs
isc
progMetrics :: OpMetrics (Op rep) => Prog rep -> AstMetrics progMetrics prog = actualMetrics $ execWriter $ runMetricsM $ do mapM_ funDefMetrics $ progFuns prog mapM_ stmMetrics $ progConsts prog
223
progMetrics :: OpMetrics (Op rep) => Prog rep -> AstMetrics progMetrics prog = actualMetrics $ execWriter $ runMetricsM $ do mapM_ funDefMetrics $ progFuns prog mapM_ stmMetrics $ progConsts prog
223
progMetrics prog = actualMetrics $ execWriter $ runMetricsM $ do mapM_ funDefMetrics $ progFuns prog mapM_ stmMetrics $ progConsts prog
163
false
true
0
9
57
72
32
40
null
null
brodyberg/Notes
FindingSuccessAndFailure/validation-book/lib/Main_Original.hs
mit
requireAlphaNum' :: String -> Either String String requireAlphaNum' xs = case (all isAlphaNum xs) of True -> Right xs _ -> Left "Not all characters are alpha-numeric"
178
requireAlphaNum' :: String -> Either String String requireAlphaNum' xs = case (all isAlphaNum xs) of True -> Right xs _ -> Left "Not all characters are alpha-numeric"
178
requireAlphaNum' xs = case (all isAlphaNum xs) of True -> Right xs _ -> Left "Not all characters are alpha-numeric"
127
false
true
0
8
38
57
26
31
null
null
neongreen/megaparsec
tests/Expr.hs
bsd-2-clause
showNode n@(Pro x y) = showGT n x ++ " * " ++ showGE n y
56
showNode n@(Pro x y) = showGT n x ++ " * " ++ showGE n y
56
showNode n@(Pro x y) = showGT n x ++ " * " ++ showGE n y
56
false
false
1
7
15
43
18
25
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck.hs
bsd-3-clause
throttle :: Int -> Deltas -> Deltas -> (Precision, Deltas) throttle limit old@(MkDeltas old_ds) new@(MkDeltas new_ds) --- | pprTrace "PmCheck:throttle" (ppr (length old_ds) <+> ppr (length new_ds) <+> ppr limit) False = undefined | length new_ds > max limit (length old_ds) = (Approximate, old) | otherwise ...
365
throttle :: Int -> Deltas -> Deltas -> (Precision, Deltas) throttle limit old@(MkDeltas old_ds) new@(MkDeltas new_ds) --- | pprTrace "PmCheck:throttle" (ppr (length old_ds) <+> ppr (length new_ds) <+> ppr limit) False = undefined | length new_ds > max limit (length old_ds) = (Approximate, old) | otherwise ...
365
throttle limit old@(MkDeltas old_ds) new@(MkDeltas new_ds) --- | pprTrace "PmCheck:throttle" (ppr (length old_ds) <+> ppr (length new_ds) <+> ppr limit) False = undefined | length new_ds > max limit (length old_ds) = (Approximate, old) | otherwise = (Precise, new)
306
false
true
1
11
90
99
52
47
null
null
shlevy/ghc
compiler/types/Type.hs
bsd-3-clause
seqTypes (ty:tys) = seqType ty `seq` seqTypes tys
49
seqTypes (ty:tys) = seqType ty `seq` seqTypes tys
49
seqTypes (ty:tys) = seqType ty `seq` seqTypes tys
49
false
false
0
6
7
29
14
15
null
null
ornicar/haskant
src/Search.hs
mit
bfsTerritory w dist ants = (fst . fst) <$> filter snd (MemQ.getAll territory) where from = MemQ.fromList (fst . fst) (antExplore <$> ants) antExplore (p, o) = ((p, 0), o == Me) territory = expandTerritory from expandTerritory q = maybe q withTile $ MemQ.deque q where withTile (((p, d...
589
bfsTerritory w dist ants = (fst . fst) <$> filter snd (MemQ.getAll territory) where from = MemQ.fromList (fst . fst) (antExplore <$> ants) antExplore (p, o) = ((p, 0), o == Me) territory = expandTerritory from expandTerritory q = maybe q withTile $ MemQ.deque q where withTile (((p, d...
589
bfsTerritory w dist ants = (fst . fst) <$> filter snd (MemQ.getAll territory) where from = MemQ.fromList (fst . fst) (antExplore <$> ants) antExplore (p, o) = ((p, 0), o == Me) territory = expandTerritory from expandTerritory q = maybe q withTile $ MemQ.deque q where withTile (((p, d...
589
false
false
2
10
193
247
124
123
null
null
ulricha/dsh-example-queries
Queries/TPCH/NonStandard/Flat.hs
bsd-3-clause
sq7 :: Q [(Integer, Decimal)] sq7 = groupAggr s_nationkeyQ s_acctbalQ avg $ filter (\s -> s_acctbalQ s > 9900.0) suppliers
122
sq7 :: Q [(Integer, Decimal)] sq7 = groupAggr s_nationkeyQ s_acctbalQ avg $ filter (\s -> s_acctbalQ s > 9900.0) suppliers
122
sq7 = groupAggr s_nationkeyQ s_acctbalQ avg $ filter (\s -> s_acctbalQ s > 9900.0) suppliers
92
false
true
0
10
19
61
29
32
null
null
dsorokin/aivika-experiment-chart
examples/LinearArray/Experiment.hs
bsd-3-clause
m = resultByName "m"
20
m = resultByName "m"
20
m = resultByName "m"
20
false
false
1
5
3
13
4
9
null
null
brendanhay/gogol
gogol-binaryauthorization/gen/Network/Google/Resource/BinaryAuthorization/Projects/Attestors/SetIAMPolicy.hs
mpl-2.0
-- | V1 error format. pasipXgafv :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Xgafv) pasipXgafv = lens _pasipXgafv (\ s a -> s{_pasipXgafv = a})
147
pasipXgafv :: Lens' ProjectsAttestorsSetIAMPolicy (Maybe Xgafv) pasipXgafv = lens _pasipXgafv (\ s a -> s{_pasipXgafv = a})
125
pasipXgafv = lens _pasipXgafv (\ s a -> s{_pasipXgafv = a})
61
true
true
0
9
23
48
25
23
null
null
cpettitt/tamien
Tamien/Core/Language.hs
mit
-- | Extracts the right hand sides from a list of defitions rhssOf :: [(a, b)] -> [b] rhssOf = map snd
102
rhssOf :: [(a, b)] -> [b] rhssOf = map snd
42
rhssOf = map snd
16
true
true
0
7
21
31
18
13
null
null
olsner/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
mkForAllTy :: TyVar -> ArgFlag -> Type -> Type mkForAllTy tv vis ty = ForAllTy (TvBndr tv vis) ty
97
mkForAllTy :: TyVar -> ArgFlag -> Type -> Type mkForAllTy tv vis ty = ForAllTy (TvBndr tv vis) ty
97
mkForAllTy tv vis ty = ForAllTy (TvBndr tv vis) ty
50
false
true
0
7
18
43
21
22
null
null
saevarb/haskell-todo-example
src/Main.hs
mit
main :: IO () main = do runDb $ runMigration migrateAll S.scotty 3000 $ do S.get "/get/:id" $ do i <- S.param "id" r <- runDb $ selectList [TodoItemPriority ==. i] [] case r of [] -> S.json Null _ -> S.json . entityVal $ head r S.ge...
570
main :: IO () main = do runDb $ runMigration migrateAll S.scotty 3000 $ do S.get "/get/:id" $ do i <- S.param "id" r <- runDb $ selectList [TodoItemPriority ==. i] [] case r of [] -> S.json Null _ -> S.json . entityVal $ head r S.ge...
570
main = do runDb $ runMigration migrateAll S.scotty 3000 $ do S.get "/get/:id" $ do i <- S.param "id" r <- runDb $ selectList [TodoItemPriority ==. i] [] case r of [] -> S.json Null _ -> S.json . entityVal $ head r S.get "/all" $ do ...
556
false
true
0
18
234
221
99
122
null
null
abbradar/aeson
Data/Aeson/Encode/Builder.hs
bsd-3-clause
object :: HMS.HashMap T.Text Value -> Builder object m = case HMS.toList m of (x:xs) -> B.char8 '{' <> one x <> foldr withComma (B.char8 '}') xs _ -> emptyObject__ where withComma a z = B.char8 ',' <> one a <> z one (k,v) = text k <> B.char8 ':' <> encodeToBuilder v -- | Encode a JSON string...
321
object :: HMS.HashMap T.Text Value -> Builder object m = case HMS.toList m of (x:xs) -> B.char8 '{' <> one x <> foldr withComma (B.char8 '}') xs _ -> emptyObject__ where withComma a z = B.char8 ',' <> one a <> z one (k,v) = text k <> B.char8 ':' <> encodeToBuilder v -- | Encode a JSON string...
321
object m = case HMS.toList m of (x:xs) -> B.char8 '{' <> one x <> foldr withComma (B.char8 '}') xs _ -> emptyObject__ where withComma a z = B.char8 ',' <> one a <> z one (k,v) = text k <> B.char8 ':' <> encodeToBuilder v -- | Encode a JSON string.
275
false
true
1
12
86
148
71
77
null
null
angerman/data-bitcode-edsl
src/EDSL/Monad/Internal.hs
bsd-3-clause
instName (Inst.Cmp2 _ _ _ _) = "Cmp2"
40
instName (Inst.Cmp2 _ _ _ _) = "Cmp2"
40
instName (Inst.Cmp2 _ _ _ _) = "Cmp2"
40
false
false
0
8
10
23
11
12
null
null
YoshikuniJujo/forest
subprojects/xml/testConduit.hs
bsd-3-clause
main :: IO () main = do xml <- XML.readFile def "sample.xml" print xml
72
main :: IO () main = do xml <- XML.readFile def "sample.xml" print xml
72
main = do xml <- XML.readFile def "sample.xml" print xml
58
false
true
0
10
15
42
17
25
null
null
elieux/ghc
utils/deriveConstants/Main.hs
bsd-3-clause
closureFieldGcptr :: Where -> String -> String -> Wanteds closureFieldGcptr w theType theField = closureFieldOffset_ w nameBase theType theField ++ fieldTypeGcptr nameBase ++ closureFieldMacro nameBase where nameBase = theType ++ "_" ++ theField
259
closureFieldGcptr :: Where -> String -> String -> Wanteds closureFieldGcptr w theType theField = closureFieldOffset_ w nameBase theType theField ++ fieldTypeGcptr nameBase ++ closureFieldMacro nameBase where nameBase = theType ++ "_" ++ theField
259
closureFieldGcptr w theType theField = closureFieldOffset_ w nameBase theType theField ++ fieldTypeGcptr nameBase ++ closureFieldMacro nameBase where nameBase = theType ++ "_" ++ theField
201
false
true
4
7
46
72
33
39
null
null
CulpaBS/wbBach
src/Futhark/Analysis/AlgSimplify.hs
bsd-3-clause
simplifyScal (SRem e1o e2o) = SRem <$> simplifyScal e1o <*> simplifyScal e2o
80
simplifyScal (SRem e1o e2o) = SRem <$> simplifyScal e1o <*> simplifyScal e2o
80
simplifyScal (SRem e1o e2o) = SRem <$> simplifyScal e1o <*> simplifyScal e2o
80
false
false
0
7
15
31
14
17
null
null
gamelost/pcgen-rules
src/Common.hs
apache-2.0
parseWordAndNumber :: PParser String parseWordAndNumber = many1 $ satisfy $ inClass "-A-Za-z0-9"
96
parseWordAndNumber :: PParser String parseWordAndNumber = many1 $ satisfy $ inClass "-A-Za-z0-9"
96
parseWordAndNumber = many1 $ satisfy $ inClass "-A-Za-z0-9"
59
false
true
4
6
11
33
13
20
null
null
ekmett/ekg
examples/Basic.hs
bsd-3-clause
-- 'sum' is using a non-strict lazy fold and will blow the stack. sum' :: Num a => [a] -> a sum' = foldl' (+) 0
111
sum' :: Num a => [a] -> a sum' = foldl' (+) 0
45
sum' = foldl' (+) 0
19
true
true
0
7
25
33
18
15
null
null
fmthoma/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
nonStdGuardErr :: Outputable body => [LStmtLR Name Name body] -> SDoc nonStdGuardErr guards = hang (ptext (sLit "accepting non-standard pattern guards (use PatternGuards to suppress this message)")) 4 (interpp'SP guards)
229
nonStdGuardErr :: Outputable body => [LStmtLR Name Name body] -> SDoc nonStdGuardErr guards = hang (ptext (sLit "accepting non-standard pattern guards (use PatternGuards to suppress this message)")) 4 (interpp'SP guards)
229
nonStdGuardErr guards = hang (ptext (sLit "accepting non-standard pattern guards (use PatternGuards to suppress this message)")) 4 (interpp'SP guards)
159
false
true
0
8
38
62
29
33
null
null
spechub/Hets
Common/IRI.hs
gpl-2.0
isIprivate :: Char -> Bool isIprivate c = let n = ord c in (0xE000 <= n && n <= 0xF8FF) || (0xF000 <= n && n <= 0xFFFD) || (0x100000 <= n && n <= 0x10FFFD)
169
isIprivate :: Char -> Bool isIprivate c = let n = ord c in (0xE000 <= n && n <= 0xF8FF) || (0xF000 <= n && n <= 0xFFFD) || (0x100000 <= n && n <= 0x10FFFD)
169
isIprivate c = let n = ord c in (0xE000 <= n && n <= 0xF8FF) || (0xF000 <= n && n <= 0xFFFD) || (0x100000 <= n && n <= 0x10FFFD)
142
false
true
0
12
50
91
44
47
null
null
calebgregory/fp101x
wk3/drop.hs
mit
drop n (_:xs) = drop (n-1) xs
29
drop n (_:xs) = drop (n-1) xs
29
drop n (_:xs) = drop (n-1) xs
29
false
false
0
6
6
33
15
18
null
null
shimazing/haskell-study-fall2016
HW02/HW02.hs
bsd-3-clause
-- Exercise 5 ----------------------------------------- filterCodes :: Move -> [Code] -> [Code] filterCodes move codes = filter (isConsistent move) codes
154
filterCodes :: Move -> [Code] -> [Code] filterCodes move codes = filter (isConsistent move) codes
97
filterCodes move codes = filter (isConsistent move) codes
57
true
true
0
7
19
46
23
23
null
null
rethab/habi
test/CryptoTest.hs
mit
padded_lenght_longer :: Word8 -> BS.ByteString -> Property padded_lenght_longer len bytes = pad_guard len bytes ==> pad_len > BS.length bytes where pad_len = fromIntegral (BS.length $ pad len bytes)
204
padded_lenght_longer :: Word8 -> BS.ByteString -> Property padded_lenght_longer len bytes = pad_guard len bytes ==> pad_len > BS.length bytes where pad_len = fromIntegral (BS.length $ pad len bytes)
204
padded_lenght_longer len bytes = pad_guard len bytes ==> pad_len > BS.length bytes where pad_len = fromIntegral (BS.length $ pad len bytes)
145
false
true
0
8
33
69
33
36
null
null
leshchevds/ganeti
src/Ganeti/DataCollectors/InstStatus.hs
bsd-2-clause
-- | The kind of this data collector. dcKind :: DCKind dcKind = DCKStatus
73
dcKind :: DCKind dcKind = DCKStatus
35
dcKind = DCKStatus
18
true
true
0
4
13
12
7
5
null
null
RossOgilvie/MathPrelude
MathPrelude/Prelude/CorePrelude.hs
gpl-3.0
-- | > (++) = mappend (++) :: Semigroup w => w -> w -> w (++) = (<>)
68
(++) :: Semigroup w => w -> w -> w (++) = (<>)
46
(++) = (<>)
11
true
true
0
9
18
40
21
19
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Html/ParseLazy.hs
bsd-3-clause
element :: Name -> HParser (Stack,Element Posn) element ctx = do tok TokAnyOpen (ElemTag e avs) <- elemtag ( if e `closes` ctx then -- insert the missing close-tag, fail forward, and reparse. ( do debug ("/") unparse ([TokEndOpen, TokName ctx, TokAnyClose, ...
2,306
element :: Name -> HParser (Stack,Element Posn) element ctx = do tok TokAnyOpen (ElemTag e avs) <- elemtag ( if e `closes` ctx then -- insert the missing close-tag, fail forward, and reparse. ( do debug ("/") unparse ([TokEndOpen, TokName ctx, TokAnyClose, ...
2,306
element ctx = do tok TokAnyOpen (ElemTag e avs) <- elemtag ( if e `closes` ctx then -- insert the missing close-tag, fail forward, and reparse. ( do debug ("/") unparse ([TokEndOpen, TokName ctx, TokAnyClose, TokAnyOpen, TokName e] ++ reformatAttrs a...
2,258
false
true
0
28
1,017
620
315
305
null
null
dmbarbour/Sirea
src/Sirea/TimeTrigger.hs
bsd-3-clause
- tt1 - pending trigger tt1 :: T -> Seq (Maybe T) -> Seq (Maybe Bool) tt1 tT Done = Step tT (Just True) Done
109
tt1 :: T -> Seq (Maybe T) -> Seq (Maybe Bool) tt1 tT Done = Step tT (Just True) Done
84
tt1 tT Done = Step tT (Just True) Done
38
true
true
1
9
25
72
32
40
null
null
lukexi/extensible-ecs
src/Data/ECS/Component.hs
bsd-3-clause
entityHasComponent :: (MonadState s m, HasComponents s) => EntityID -> Key (EntityMap a) -> m Bool entityHasComponent entityID componentKey = isJust <$> getEntityComponent entityID componentKey
193
entityHasComponent :: (MonadState s m, HasComponents s) => EntityID -> Key (EntityMap a) -> m Bool entityHasComponent entityID componentKey = isJust <$> getEntityComponent entityID componentKey
193
entityHasComponent entityID componentKey = isJust <$> getEntityComponent entityID componentKey
94
false
true
0
10
24
62
30
32
null
null
oldmanmike/opensandbox
src/OpenSandbox/Data.hs
gpl-3.0
loadGameData :: IO (Either String GameData) loadGameData = do rawBiomes <- B.readFile "minecraft-data/data/pc/1.10/biomes.json" rawBlocks <- B.readFile "minecraft-data/data/pc/1.10/blocks.json" rawEffects <- B.readFile "minecraft-data/data/pc/1.10/effects.json" rawEntity <- B.readFile "minecraft-data/data/pc/1....
1,524
loadGameData :: IO (Either String GameData) loadGameData = do rawBiomes <- B.readFile "minecraft-data/data/pc/1.10/biomes.json" rawBlocks <- B.readFile "minecraft-data/data/pc/1.10/blocks.json" rawEffects <- B.readFile "minecraft-data/data/pc/1.10/effects.json" rawEntity <- B.readFile "minecraft-data/data/pc/1....
1,524
loadGameData = do rawBiomes <- B.readFile "minecraft-data/data/pc/1.10/biomes.json" rawBlocks <- B.readFile "minecraft-data/data/pc/1.10/blocks.json" rawEffects <- B.readFile "minecraft-data/data/pc/1.10/effects.json" rawEntity <- B.readFile "minecraft-data/data/pc/1.10/entities.json" rawInstruments <- B.read...
1,480
false
true
21
10
237
397
194
203
null
null
xmonad/xmonad-contrib
XMonad/Layout/DecorationMadness.hs
bsd-3-clause
-- | A 'Mirror Tall' layout with the xmonad default decoration, default -- theme and default shrinker, but with the possibility of moving -- windows with the mouse, and resize\/move them with the keyboard. -- -- Here you can find a screen shot: -- -- <http://code.haskell.org/~arossato/xmonadShots/mirrorTallSimpleDefaul...
671
mirrorTallSimpleDefaultResizable :: ModifiedLayout (Decoration DefaultDecoration DefaultShrinker) (ModifiedLayout MouseResize (ModifiedLayout WindowArranger (Mirror Tall))) Window mirrorTallSimpleDefaultResizable = decoration shrinkText def DefaultDecoration (mouseResize $ windowArra...
335
mirrorTallSimpleDefaultResizable = decoration shrinkText def DefaultDecoration (mouseResize $ windowArrange mirrorTall)
119
true
true
0
11
104
74
40
34
null
null
jonpetterbergman/wai-snap
src/Snap/Internal/Debug.hs
bsd-3-clause
debugErrno = let !x = unsafePerformIO $ do e <- try $ getEnv "DEBUG" !f <- either (\(_::SomeException) -> return debugErrnoIgnore) (\y0 -> let y = map toLower y0 ...
734
debugErrno = let !x = unsafePerformIO $ do e <- try $ getEnv "DEBUG" !f <- either (\(_::SomeException) -> return debugErrnoIgnore) (\y0 -> let y = map toLower y0 ...
734
debugErrno = let !x = unsafePerformIO $ do e <- try $ getEnv "DEBUG" !f <- either (\(_::SomeException) -> return debugErrnoIgnore) (\y0 -> let y = map toLower y0 ...
734
false
false
1
21
477
146
68
78
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Update.hs
mpl-2.0
-- | User profile ID associated with this request. cfvuProFileId :: Lens' CreativeFieldValuesUpdate Int64 cfvuProFileId = lens _cfvuProFileId (\ s a -> s{_cfvuProFileId = a}) . _Coerce
198
cfvuProFileId :: Lens' CreativeFieldValuesUpdate Int64 cfvuProFileId = lens _cfvuProFileId (\ s a -> s{_cfvuProFileId = a}) . _Coerce
147
cfvuProFileId = lens _cfvuProFileId (\ s a -> s{_cfvuProFileId = a}) . _Coerce
92
true
true
0
10
40
46
24
22
null
null
aznashwan/haskzure
tests/TestInstances.hs
apache-2.0
prop_AesonSymmetryNestedDatatype :: NestedData -> Bool prop_AesonSymmetryNestedDatatype d = ((fromJust . (decode :: BSL.ByteString -> Maybe NestedData) . encode) d) == d
173
prop_AesonSymmetryNestedDatatype :: NestedData -> Bool prop_AesonSymmetryNestedDatatype d = ((fromJust . (decode :: BSL.ByteString -> Maybe NestedData) . encode) d) == d
173
prop_AesonSymmetryNestedDatatype d = ((fromJust . (decode :: BSL.ByteString -> Maybe NestedData) . encode) d) == d
118
false
true
0
13
24
54
28
26
null
null
HIPERFIT/futhark
src/Futhark/TypeCheck.hs
isc
requireI :: Checkable rep => [Type] -> VName -> TypeM rep () requireI ts ident = require ts $ Var ident
103
requireI :: Checkable rep => [Type] -> VName -> TypeM rep () requireI ts ident = require ts $ Var ident
103
requireI ts ident = require ts $ Var ident
42
false
true
0
10
20
55
25
30
null
null
MasseR/xmonadcontrib
XMonad/Layout/StackTile.hs
bsd-3-clause
tile :: Rational -> Rectangle -> Int -> Int -> [Rectangle] tile f r nmaster n = if n <= nmaster || nmaster == 0 then splitHorizontally n r else splitHorizontally nmaster r1 ++ splitVertically (n-nmaster) r2 -- two columns where (r1,r2) = splitVerticallyBy f r
269
tile :: Rational -> Rectangle -> Int -> Int -> [Rectangle] tile f r nmaster n = if n <= nmaster || nmaster == 0 then splitHorizontally n r else splitHorizontally nmaster r1 ++ splitVertically (n-nmaster) r2 -- two columns where (r1,r2) = splitVerticallyBy f r
269
tile f r nmaster n = if n <= nmaster || nmaster == 0 then splitHorizontally n r else splitHorizontally nmaster r1 ++ splitVertically (n-nmaster) r2 -- two columns where (r1,r2) = splitVerticallyBy f r
210
false
true
0
9
55
112
55
57
null
null