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
johnjcamilleri/Maltese-GF-Resource-Grammar
test/regression/tester.hs
lgpl-3.0
run :: (MonadIO m, MonadReader Env m, MonadState Summary m) => [String] -> m () run lines = do results :: [Result] <- mapM line lines mapM (\(ln,res) -> do -- Output liftIO $ putStr $ printf "%3d " (ln :: Int) case res of Ok s -> ok $ s Warning s -> ...
756
run :: (MonadIO m, MonadReader Env m, MonadState Summary m) => [String] -> m () run lines = do results :: [Result] <- mapM line lines mapM (\(ln,res) -> do -- Output liftIO $ putStr $ printf "%3d " (ln :: Int) case res of Ok s -> ok $ s Warning s -> ...
756
run lines = do results :: [Result] <- mapM line lines mapM (\(ln,res) -> do -- Output liftIO $ putStr $ printf "%3d " (ln :: Int) case res of Ok s -> ok $ s Warning s -> warn $ s Error s -> err $ s _ -> liftIO $ p...
676
false
true
0
17
260
311
159
152
null
null
beni55/text
Data/Text/Lazy.hs
bsd-2-clause
-- | /O(1)/ Returns the first character and rest of a 'Text', or -- 'Nothing' if empty. Subject to fusion. uncons :: Text -> Maybe (Char, Text) uncons Empty = Nothing
173
uncons :: Text -> Maybe (Char, Text) uncons Empty = Nothing
66
uncons Empty = Nothing
29
true
true
0
7
37
29
16
13
null
null
shnarazk/satter
Satter/Player.hs
gpl-3.0
-- | better function for determining the next position from 'pos' 'dir' and v newGeometrics :: TwoD -> TwoD -> Double -> Geometrics newGeometrics (x, y) (dx, dy) v = Geometrics (x + dx * v * simulationScale, y + dy * v * simulationScale) (dx, dy) v
248
newGeometrics :: TwoD -> TwoD -> Double -> Geometrics newGeometrics (x, y) (dx, dy) v = Geometrics (x + dx * v * simulationScale, y + dy * v * simulationScale) (dx, dy) v
170
newGeometrics (x, y) (dx, dy) v = Geometrics (x + dx * v * simulationScale, y + dy * v * simulationScale) (dx, dy) v
116
true
true
0
9
47
86
47
39
null
null
lunaris/hindent
src/HIndent/Pretty.hs
bsd-3-clause
decl x = pretty' x
18
decl x = pretty' x
18
decl x = pretty' x
18
false
false
0
5
4
12
5
7
null
null
peterson/lets-haskell
src/Lets/Cellular.hs
bsd-3-clause
test = rtest rule 20
20
test = rtest rule 20
20
test = rtest rule 20
20
false
false
1
5
4
16
5
11
null
null
tuturto/space-privateers
GameDefinition/Main.hs
bsd-3-clause
-- | Tie the LambdaHack engine client, server and frontend code -- with the game-specific content definitions, and run the game. main :: IO () main = do args <- getArgs tieKnot args
185
main :: IO () main = do args <- getArgs tieKnot args
56
main = do args <- getArgs tieKnot args
42
true
true
0
7
36
31
15
16
null
null
mbakke/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
beAutoBalance :: String beAutoBalance = "auto_balance"
54
beAutoBalance :: String beAutoBalance = "auto_balance"
54
beAutoBalance = "auto_balance"
30
false
true
0
4
5
11
6
5
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkSudoRedirect5 = verifyNot checkSudoRedirect "sudo cmd 2>&1"
69
prop_checkSudoRedirect5 = verifyNot checkSudoRedirect "sudo cmd 2>&1"
69
prop_checkSudoRedirect5 = verifyNot checkSudoRedirect "sudo cmd 2>&1"
69
false
false
0
5
6
11
5
6
null
null
deadfoxygrandpa/Elm
compiler/Transform/Declaration.hs
bsd-3-clause
combineAnnotations :: [ParseDeclaration] -> Either String [Declaration] combineAnnotations = go where msg x = "Syntax Error: The type annotation for '" ++ x ++ "' must be directly above its definition." exprCombineAnnotations = Expr.crawlLet Def.combineAnnotations go decls = ...
2,033
combineAnnotations :: [ParseDeclaration] -> Either String [Declaration] combineAnnotations = go where msg x = "Syntax Error: The type annotation for '" ++ x ++ "' must be directly above its definition." exprCombineAnnotations = Expr.crawlLet Def.combineAnnotations go decls = ...
2,033
combineAnnotations = go where msg x = "Syntax Error: The type annotation for '" ++ x ++ "' must be directly above its definition." exprCombineAnnotations = Expr.crawlLet Def.combineAnnotations go decls = case decls of -- simple cases, pass them through with no...
1,961
false
true
2
24
911
570
272
298
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The allocation ID. niaAllocationId :: Lens' NetworkInterfaceAssociation (Maybe Text) niaAllocationId = lens _niaAllocationId (\s a -> s { _niaAllocationId = a })
166
niaAllocationId :: Lens' NetworkInterfaceAssociation (Maybe Text) niaAllocationId = lens _niaAllocationId (\s a -> s { _niaAllocationId = a })
142
niaAllocationId = lens _niaAllocationId (\s a -> s { _niaAllocationId = a })
76
true
true
1
9
23
52
25
27
null
null
mariefarrell/Hets
CASL/CompositionTable/ModelChecker.hs
gpl-2.0
calculateTerm :: Assignment -> Table2 -> Term -> BSet calculateTerm ass t trm = case trm of Var var -> getBaseRelForVariable var ass Appl opSymb terms -> applyOperation opSymb terms t ass Cond t1 fo t2 -> on (\ a b -> if calculateFormula t ass fo then a else b) (calculateTerm ass t) t1 t2
307
calculateTerm :: Assignment -> Table2 -> Term -> BSet calculateTerm ass t trm = case trm of Var var -> getBaseRelForVariable var ass Appl opSymb terms -> applyOperation opSymb terms t ass Cond t1 fo t2 -> on (\ a b -> if calculateFormula t ass fo then a else b) (calculateTerm ass t) t1 t2
307
calculateTerm ass t trm = case trm of Var var -> getBaseRelForVariable var ass Appl opSymb terms -> applyOperation opSymb terms t ass Cond t1 fo t2 -> on (\ a b -> if calculateFormula t ass fo then a else b) (calculateTerm ass t) t1 t2
253
false
true
0
12
73
123
60
63
null
null
smaximov/lordown
app/Main.hs
bsd-3-clause
abort :: [String] -> IO () abort args = die $ "illegal invokation: lordown " ++ intercalate " " args ++ "\n" ++ usage
117
abort :: [String] -> IO () abort args = die $ "illegal invokation: lordown " ++ intercalate " " args ++ "\n" ++ usage
117
abort args = die $ "illegal invokation: lordown " ++ intercalate " " args ++ "\n" ++ usage
90
false
true
0
8
23
51
24
27
null
null
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/GetBucketLifecycle.hs
mpl-2.0
-- | Creates a value of 'GetBucketLifecycleResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gblrsRules' -- -- * 'gblrsResponseStatus' getBucketLifecycleResponse :: Int -- ^ 'gblrsResponseStatus' -> GetBucketLifecycleR...
485
getBucketLifecycleResponse :: Int -- ^ 'gblrsResponseStatus' -> GetBucketLifecycleResponse getBucketLifecycleResponse pResponseStatus_ = GetBucketLifecycleResponse' { _gblrsRules = Nothing , _gblrsResponseStatus = pResponseStatus_ }
256
getBucketLifecycleResponse pResponseStatus_ = GetBucketLifecycleResponse' { _gblrsRules = Nothing , _gblrsResponseStatus = pResponseStatus_ }
157
true
true
0
7
82
49
28
21
null
null
joshuaclayton/timeline
src/Timeline/Parser.hs
mit
graphAndAggregatesParser :: Parser [Graph] graphAndAggregatesParser = do initial <- graphParser additional <- many $ choice [smaParser initial, semaParser initial, demaParser initial] return (initial : additional)
226
graphAndAggregatesParser :: Parser [Graph] graphAndAggregatesParser = do initial <- graphParser additional <- many $ choice [smaParser initial, semaParser initial, demaParser initial] return (initial : additional)
226
graphAndAggregatesParser = do initial <- graphParser additional <- many $ choice [smaParser initial, semaParser initial, demaParser initial] return (initial : additional)
183
false
true
1
12
37
73
33
40
null
null
fffej/codekatas
99Problems/1-20/Problems.hs
mit
flatten (List []) = []
26
flatten (List []) = []
26
flatten (List []) = []
26
false
false
0
8
8
19
9
10
null
null
diagrams/diagrams-contrib
src/Diagrams/TwoD/Layout/Constrained.hs
bsd-3-clause
constrainWith :: (Hashable n, RealFrac n, Floating n, Monoid' m) => -- (forall a. (...) => [a] -> a) ([[Located (Envelope V2 n)]] -> [Located (Envelope V2 n)]) -> [DiaID s] -> Constrained s b n m () constrainWith _ [] = return ()
242
constrainWith :: (Hashable n, RealFrac n, Floating n, Monoid' m) => -- (forall a. (...) => [a] -> a) ([[Located (Envelope V2 n)]] -> [Located (Envelope V2 n)]) -> [DiaID s] -> Constrained s b n m () constrainWith _ [] = return ()
242
constrainWith _ [] = return ()
30
false
true
0
14
56
120
60
60
null
null
bitemyapp/json-stream
benchmarks/AesonParse.hs
bsd-3-clause
main :: IO () main = do (bs:cnt:args) <- getArgs let count = read cnt :: Int blkSize = read bs forM_ args $ \arg -> bracket (openFile arg ReadMode) hClose $ \h -> do putStrLn $ arg ++ ":" start <- getCurrentTime let loop !good !bad | good+bad >= count = return (good, bad) ...
844
main :: IO () main = do (bs:cnt:args) <- getArgs let count = read cnt :: Int blkSize = read bs forM_ args $ \arg -> bracket (openFile arg ReadMode) hClose $ \h -> do putStrLn $ arg ++ ":" start <- getCurrentTime let loop !good !bad | good+bad >= count = return (good, bad) ...
844
main = do (bs:cnt:args) <- getArgs let count = read cnt :: Int blkSize = read bs forM_ args $ \arg -> bracket (openFile arg ReadMode) hClose $ \h -> do putStrLn $ arg ++ ":" start <- getCurrentTime let loop !good !bad | good+bad >= count = return (good, bad) | otherwise =...
830
false
true
0
24
282
366
169
197
null
null
olsner/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
cafRefsEs :: CafRefEnv -> [Expr a] -> Bool cafRefsEs _ [] = False
69
cafRefsEs :: CafRefEnv -> [Expr a] -> Bool cafRefsEs _ [] = False
69
cafRefsEs _ [] = False
26
false
true
0
9
16
38
17
21
null
null
purebred-mua/purebred
test/TestMail.hs
agpl-3.0
testFindsMatchingWords :: TestTree testFindsMatchingWords = testCase "finds matching words" $ expected @=? actual where expected = MailBody mempty [Paragraph [Line [Match 9 3 1] 1 "Purebred finds matching words"]] actual = findMatchingWords "fin" $ MailBody mempty [Paragraph [Line []...
356
testFindsMatchingWords :: TestTree testFindsMatchingWords = testCase "finds matching words" $ expected @=? actual where expected = MailBody mempty [Paragraph [Line [Match 9 3 1] 1 "Purebred finds matching words"]] actual = findMatchingWords "fin" $ MailBody mempty [Paragraph [Line []...
356
testFindsMatchingWords = testCase "finds matching words" $ expected @=? actual where expected = MailBody mempty [Paragraph [Line [Match 9 3 1] 1 "Purebred finds matching words"]] actual = findMatchingWords "fin" $ MailBody mempty [Paragraph [Line [] 1 "Purebred finds matching words"]...
321
false
true
1
11
79
100
47
53
null
null
lhuang7/mysql
Database/MySQL/Base.hs
bsd-3-clause
-- | Return the value generated for an @AUTO_INCREMENT@ column by the -- previous @INSERT@ or @UPDATE@ statement. -- -- See <http://dev.mysql.com/doc/refman/5.5/en/mysql-insert-id.html> insertID :: Connection -> IO Word64 insertID conn = fromIntegral <$> (withConn conn $ mysql_insert_id)
288
insertID :: Connection -> IO Word64 insertID conn = fromIntegral <$> (withConn conn $ mysql_insert_id)
102
insertID conn = fromIntegral <$> (withConn conn $ mysql_insert_id)
66
true
true
0
8
36
39
21
18
null
null
yuanchuan/fractal-div
src/koch-curve/generator.hs
mit
build :: Int -> ([Char] -> [Char]) -> [Char] build order generator = apply order (cell "") generator where apply order seed generator | order <= 0 = seed | otherwise = apply (order - 1) (generator seed) generator -- | base structure -- -- <div> -- <div></div> -- <div></div> -...
368
build :: Int -> ([Char] -> [Char]) -> [Char] build order generator = apply order (cell "") generator where apply order seed generator | order <= 0 = seed | otherwise = apply (order - 1) (generator seed) generator -- | base structure -- -- <div> -- <div></div> -- <div></div> -...
368
build order generator = apply order (cell "") generator where apply order seed generator | order <= 0 = seed | otherwise = apply (order - 1) (generator seed) generator -- | base structure -- -- <div> -- <div></div> -- <div></div> -- <div></div> -- <div></div> -- </div>...
323
false
true
0
10
107
132
65
67
null
null
jaalonso/I1M-Cod-Temas
src/Tema_7.hs
gpl-2.0
-- (separaOctetos bs) es la lista obtenida separando la lista de bits bs -- en listas de 8 elementos. Por ejemplo, -- λ> separaOctetos [1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0] -- [[1,0,0,0,0,1,1,0],[0,1,0,0,0,1,1,0]] separaOctetos :: [Bit] -> [[Bit]] separaOctetos [] = []
271
separaOctetos :: [Bit] -> [[Bit]] separaOctetos [] = []
55
separaOctetos [] = []
21
true
true
0
7
41
35
21
14
null
null
raymoo/lh-vfa-stuff
BST.hs
bsd-3-clause
{-@ updateShadow :: k:_ -> v1:_ -> v2:_ -> m:_ -> k':_ -> {update k v2 (update k v1 m) k' = update k v2 m k'} @-} updateShadow :: Eq k => k -> v -> v -> TotalMap k v -> k -> Proof updateShadow k v1 v2 m k' | k == k' = update k v2 (update k v1 m) k' ==. v2 ==. update k v2 m k ...
531
updateShadow :: Eq k => k -> v -> v -> TotalMap k v -> k -> Proof updateShadow k v1 v2 m k' | k == k' = update k v2 (update k v1 m) k' ==. v2 ==. update k v2 m k *** QED | otherwise = update k v2 (update k v1 m) k' ==. update k v1 m k' ∵ updateNeq k k' v...
415
updateShadow k v1 v2 m k' | k == k' = update k v2 (update k v1 m) k' ==. v2 ==. update k v2 m k *** QED | otherwise = update k v2 (update k v1 m) k' ==. update k v1 m k' ∵ updateNeq k k' v2 (update k v1 m) ==. m k' ==. update k v2 m k' ∵ upda...
349
true
true
1
13
203
205
97
108
null
null
TimoFreiberg/hanabi
src/Hanabi/Game.hs
mit
dealCards :: Int -> IO ([[Card]], [Card]) dealCards playerCount = do cards <- shuffleM sortedGame let (hands', dk) = splitAt (playerCount * handSize playerCount) cards let hands = inGroupsOf (handSize playerCount) hands' return (hands, dk)
247
dealCards :: Int -> IO ([[Card]], [Card]) dealCards playerCount = do cards <- shuffleM sortedGame let (hands', dk) = splitAt (playerCount * handSize playerCount) cards let hands = inGroupsOf (handSize playerCount) hands' return (hands, dk)
247
dealCards playerCount = do cards <- shuffleM sortedGame let (hands', dk) = splitAt (playerCount * handSize playerCount) cards let hands = inGroupsOf (handSize playerCount) hands' return (hands, dk)
205
false
true
0
13
42
109
54
55
null
null
harendra-kumar/asyncly
benchmark/StreamKOps.hs
bsd-3-clause
toNullApNestedList :: [Int] -> [Int] toNullApNestedList s = (+) <$> s <*> s
75
toNullApNestedList :: [Int] -> [Int] toNullApNestedList s = (+) <$> s <*> s
75
toNullApNestedList s = (+) <$> s <*> s
38
false
true
0
6
12
34
19
15
null
null
s9gf4ult/hdbi
testsrc/dummydriver.hs
bsd-3-clause
inTransactionExceptions :: Assertion inTransactionExceptions = do c <- ConnWrapper <$> newConnection True (withTransaction c $ do intr <- inTransaction c intr `shouldBe` True stmt <- prepare c "throw" -- cause an exception throwing execute stmt () ) `shouldThrow` (\(_ :: SqlError) -> Tr...
431
inTransactionExceptions :: Assertion inTransactionExceptions = do c <- ConnWrapper <$> newConnection True (withTransaction c $ do intr <- inTransaction c intr `shouldBe` True stmt <- prepare c "throw" -- cause an exception throwing execute stmt () ) `shouldThrow` (\(_ :: SqlError) -> Tr...
431
inTransactionExceptions = do c <- ConnWrapper <$> newConnection True (withTransaction c $ do intr <- inTransaction c intr `shouldBe` True stmt <- prepare c "throw" -- cause an exception throwing execute stmt () ) `shouldThrow` (\(_ :: SqlError) -> True) intr <- inTransaction c intr ...
394
false
true
0
13
104
122
61
61
null
null
proycon/HasCL
TextStatistics.hs
gpl-3.0
freqlist (token:xs) = HashMap.insert token ((count (freqlist xs) token) + 1) $ freqlist xs
90
freqlist (token:xs) = HashMap.insert token ((count (freqlist xs) token) + 1) $ freqlist xs
90
freqlist (token:xs) = HashMap.insert token ((count (freqlist xs) token) + 1) $ freqlist xs
90
false
false
0
12
13
51
25
26
null
null
databrary/databrary
src/Model/SQL/Select.hs
agpl-3.0
makeQuery :: QueryFlags -> (String -> String) -> SelectOutput -> TH.ExpQ makeQuery flags sql output = do _ <- useTDB nl <- mapM (TH.newName . ('v':) . colVar) cols (parse, []) <- runStateT (outputParser output) nl TH.AppE (TH.VarE 'fmap `TH.AppE` TH.LamE [TH.TupP $ map TH.VarP nl] parse) <$> makePGQuery fla...
475
makeQuery :: QueryFlags -> (String -> String) -> SelectOutput -> TH.ExpQ makeQuery flags sql output = do _ <- useTDB nl <- mapM (TH.newName . ('v':) . colVar) cols (parse, []) <- runStateT (outputParser output) nl TH.AppE (TH.VarE 'fmap `TH.AppE` TH.LamE [TH.TupP $ map TH.VarP nl] parse) <$> makePGQuery fla...
475
makeQuery flags sql output = do _ <- useTDB nl <- mapM (TH.newName . ('v':) . colVar) cols (parse, []) <- runStateT (outputParser output) nl TH.AppE (TH.VarE 'fmap `TH.AppE` TH.LamE [TH.TupP $ map TH.VarP nl] parse) <$> makePGQuery flags (sql $ intercalate "," cols) where colVar s = case takeWhileEnd is...
402
false
true
2
15
102
238
113
125
null
null
ku00/deep-learning-practice
src/LossFunction.hs
bsd-3-clause
meanSquaredError :: (Container c b, Num (c b), Floating b) => c b -> c b -> b meanSquaredError x y = (*0.5) . sumElements $ (x-y)^2
131
meanSquaredError :: (Container c b, Num (c b), Floating b) => c b -> c b -> b meanSquaredError x y = (*0.5) . sumElements $ (x-y)^2
131
meanSquaredError x y = (*0.5) . sumElements $ (x-y)^2
53
false
true
0
9
26
88
43
45
null
null
gabesoft/kapi
src/Persistence/Common.hs
bsd-3-clause
-- ^ -- Create a definition for a required field mkReqDef :: Val a => Label -> a -> (Label, FieldDefinition) mkReqDef name v = mkFieldDef name True False False (Just v)
168
mkReqDef :: Val a => Label -> a -> (Label, FieldDefinition) mkReqDef name v = mkFieldDef name True False False (Just v)
119
mkReqDef name v = mkFieldDef name True False False (Just v)
59
true
true
0
8
31
56
29
27
null
null
martin-kolinek/some-board-game-rules
src/Resources.hs
mit
getFoodAmount :: Resources -> Int getFoodAmount = _foodAmount
61
getFoodAmount :: Resources -> Int getFoodAmount = _foodAmount
61
getFoodAmount = _foodAmount
27
false
true
0
5
7
15
8
7
null
null
jsofra/hflock
src/Main.hs
gpl-2.0
avgP :: [Gloss.Point] -> Gloss.Point avgP ps = let v = foldl (+) (0.0, 0.0) ps in mulSV (1.0 / fromIntegral (length ps)) v
133
avgP :: [Gloss.Point] -> Gloss.Point avgP ps = let v = foldl (+) (0.0, 0.0) ps in mulSV (1.0 / fromIntegral (length ps)) v
133
avgP ps = let v = foldl (+) (0.0, 0.0) ps in mulSV (1.0 / fromIntegral (length ps)) v
96
false
true
0
12
34
72
37
35
null
null
zaxtax/hakaru
haskell/Tests/RoundTrip.hs
bsd-3-clause
-- this comes from {Tests.Lazy,Examples.EasierRoadmap}.easierRoadmapProg1. It is the -- program post-disintegrate, as passed to Maple to simplify rmProg1 :: (ABT Term abt) => abt '[] (HUnit ':-> HPair 'HReal 'HReal ':-> 'HMeasure (HPair 'HProb 'HProb)) rmProg1 = lam $ \_ -> lam $ \x1 -> x1 `unp...
3,060
rmProg1 :: (ABT Term abt) => abt '[] (HUnit ':-> HPair 'HReal 'HReal ':-> 'HMeasure (HPair 'HProb 'HProb)) rmProg1 = lam $ \_ -> lam $ \x1 -> x1 `unpair` \x2 x3 -> withWeight one $ withWeight one $ unsafeSuperpose [(one, withWeight one $ lebesgue >>= \...
2,913
rmProg1 = lam $ \_ -> lam $ \x1 -> x1 `unpair` \x2 x3 -> withWeight one $ withWeight one $ unsafeSuperpose [(one, withWeight one $ lebesgue >>= \x4 -> unsafeSuperpose [(one, withWeight one $ lebes...
2,794
true
true
8
39
1,667
952
484
468
null
null
Athas/banko
barc/Barc/Parser.hs
bsd-2-clause
lexeme :: Parser a -> Parser a lexeme p = p <* spaceAndComments
63
lexeme :: Parser a -> Parser a lexeme p = p <* spaceAndComments
63
lexeme p = p <* spaceAndComments
32
false
true
0
6
12
28
13
15
null
null
bitemyapp/ruby-marshal
src/Data/Ruby/Marshal/Internal/Int.hs
mit
-- | Read an Int16. getInt16le :: Get Int16 getInt16le = fromIntegral <$> getWord16le
85
getInt16le :: Get Int16 getInt16le = fromIntegral <$> getWord16le
65
getInt16le = fromIntegral <$> getWord16le
41
true
true
0
5
13
19
10
9
null
null
matthew-eads/agpl
Quote.hs
isc
agpl_f :: QuasiQuoter agpl_f = quoteFile agpl
45
agpl_f :: QuasiQuoter agpl_f = quoteFile agpl
45
agpl_f = quoteFile agpl
23
false
true
0
5
6
14
7
7
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/Key.hs
bsd-3-clause
keyTranslate "End" = End
34
keyTranslate "End" = End
34
keyTranslate "End" = End
34
false
false
0
5
13
9
4
5
null
null
maximilianhuber/maximilian-huber.de
src/Css.hs
bsd-3-clause
toVisible = do visibility visible opacity 1 transitionDelay (T.sec 0)
75
toVisible = do visibility visible opacity 1 transitionDelay (T.sec 0)
75
toVisible = do visibility visible opacity 1 transitionDelay (T.sec 0)
75
false
false
0
10
15
32
13
19
null
null
gwright83/Wheeler
src/Math/Symbolic/Wheeler/TensorUtilities.hs
bsd-3-clause
tensorManifold :: Expr -> Manifold tensorManifold (Symbol (Tensor t)) = manifold t
82
tensorManifold :: Expr -> Manifold tensorManifold (Symbol (Tensor t)) = manifold t
82
tensorManifold (Symbol (Tensor t)) = manifold t
47
false
true
0
9
11
33
16
17
null
null
hvr/cassava
src/Data/Csv/Util.hs
bsd-3-clause
-- | Match either a single newline character @\'\\n\'@, or a carriage -- return followed by a newline character @\"\\r\\n\"@, or a single -- carriage return @\'\\r\'@. endOfLine :: Parser () endOfLine = (A.word8 newline *> return ()) <|> (string "\r\n" *> return ()) <|> (A.word8 cr *> return ())
296
endOfLine :: Parser () endOfLine = (A.word8 newline *> return ()) <|> (string "\r\n" *> return ()) <|> (A.word8 cr *> return ())
128
endOfLine = (A.word8 newline *> return ()) <|> (string "\r\n" *> return ()) <|> (A.word8 cr *> return ())
105
true
true
0
10
49
76
38
38
null
null
bergmark/hlint
data/Default.hs
bsd-3-clause
error = maybe x id ==> Data.Maybe.fromMaybe x
45
error = maybe x id ==> Data.Maybe.fromMaybe x
45
error = maybe x id ==> Data.Maybe.fromMaybe x
45
false
false
2
4
7
22
9
13
null
null
nh2/shake
Development/Shake/Util.hs
bsd-3-clause
pack_ :: BS.ByteString -> BS pack_ = BS
39
pack_ :: BS.ByteString -> BS pack_ = BS
39
pack_ = BS
10
false
true
0
6
7
17
9
8
null
null
abakst/liquidhaskell
benchmarks/text-0.11.2.3/Data/Text/Fusion/Size.hs
bsd-3-clause
mulSize (Exact m) (Max n) = Max (mul m n)
45
mulSize (Exact m) (Max n) = Max (mul m n)
45
mulSize (Exact m) (Max n) = Max (mul m n)
45
false
false
0
7
13
34
16
18
null
null
ward/halendar
src/Time.hs
gpl-3.0
repeatRange :: (Integer -> UTCTime -> UTCTime) -> (UTCTime, UTCTime) -> [(UTCTime, UTCTime)] repeatRange f range = zipWith fTuple [0..] $ repeat range where fTuple :: Integer -> (UTCTime, UTCTime) -> (UTCTime, UTCTime) fTuple i (start, end) = (f i start, f i end)
283
repeatRange :: (Integer -> UTCTime -> UTCTime) -> (UTCTime, UTCTime) -> [(UTCTime, UTCTime)] repeatRange f range = zipWith fTuple [0..] $ repeat range where fTuple :: Integer -> (UTCTime, UTCTime) -> (UTCTime, UTCTime) fTuple i (start, end) = (f i start, f i end)
283
repeatRange f range = zipWith fTuple [0..] $ repeat range where fTuple :: Integer -> (UTCTime, UTCTime) -> (UTCTime, UTCTime) fTuple i (start, end) = (f i start, f i end)
190
false
true
3
8
63
125
68
57
null
null
cmoresid/lightning-haskell
src/Web/Lightning/Plots/Line.hs
bsd-3-clause
linePlot :: Monad m => LinePlot -- ^ Line plot to create. -> LightningT m Visualization -- ^ Transformer stack with created visualization. linePlot linePlt = do url <- ask viz <- sendPlot "line" linePlt R.plot return $ viz { vizBaseUrl = Just url }
320
linePlot :: Monad m => LinePlot -- ^ Line plot to create. -> LightningT m Visualization linePlot linePlt = do url <- ask viz <- sendPlot "line" linePlt R.plot return $ viz { vizBaseUrl = Just url }
246
linePlot linePlt = do url <- ask viz <- sendPlot "line" linePlt R.plot return $ viz { vizBaseUrl = Just url }
115
true
true
0
10
116
73
35
38
null
null
ideas-edu/ideas
src/Ideas/Common/Exercise.hs
apache-2.0
lookupProperty :: IsId n => n -> Exercise a -> Maybe (Dynamic a) lookupProperty key = M.lookup (newId key) . properties
120
lookupProperty :: IsId n => n -> Exercise a -> Maybe (Dynamic a) lookupProperty key = M.lookup (newId key) . properties
119
lookupProperty key = M.lookup (newId key) . properties
54
false
true
0
10
21
60
27
33
null
null
shlevy/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprLit _ (StringL s) = pprString s
38
pprLit _ (StringL s) = pprString s
38
pprLit _ (StringL s) = pprString s
38
false
false
0
7
10
20
9
11
null
null
vdweegen/UvA-Software_Testing
Lab6/Bauke/Lecture6.hs
gpl-3.0
rsaEncode :: (Integer,Integer) -> Integer -> Integer rsaEncode (e,n) m = exM m e n
83
rsaEncode :: (Integer,Integer) -> Integer -> Integer rsaEncode (e,n) m = exM m e n
83
rsaEncode (e,n) m = exM m e n
30
false
true
0
6
15
43
23
20
null
null
juhp/stack
test/integration/tests/proper-rebuilds/Main.hs
bsd-3-clause
main :: IO () main = do let expectRecompilation stderr = unless ("> build" `isInfixOf` stderr) $ error "package recompilation was expected" expectNoRecompilation stderr = when ("> build" `isInfixOf` stderr) $ error "package recompilation was not expected" copyFile...
743
main :: IO () main = do let expectRecompilation stderr = unless ("> build" `isInfixOf` stderr) $ error "package recompilation was expected" expectNoRecompilation stderr = when ("> build" `isInfixOf` stderr) $ error "package recompilation was not expected" copyFile...
743
main = do let expectRecompilation stderr = unless ("> build" `isInfixOf` stderr) $ error "package recompilation was expected" expectNoRecompilation stderr = when ("> build" `isInfixOf` stderr) $ error "package recompilation was not expected" copyFile "src/Lib.hs.v...
729
false
true
0
13
154
155
75
80
null
null
spockwangs/scheme.in.haskell
list9.hs
unlicense
eqv [_, _] = return $ Bool False
32
eqv [_, _] = return $ Bool False
32
eqv [_, _] = return $ Bool False
32
false
false
2
5
7
24
11
13
null
null
ulricha/dsh-example-queries
Queries/TPCH/NonStandard/Flat.hs
bsd-3-clause
nf2Qd :: Q [(Integer, Decimal, Decimal)] nf2Qd = [ tup3 ok m1 m2 | (view -> (ok, m1)) <- groupAggr o_custkeyQ o_totalpriceQ maximum orders , (view -> (ok', m2)) <- groupAggr o_custkeyQ o_totalpriceQ minimum orders , ok == ok' ]
259
nf2Qd :: Q [(Integer, Decimal, Decimal)] nf2Qd = [ tup3 ok m1 m2 | (view -> (ok, m1)) <- groupAggr o_custkeyQ o_totalpriceQ maximum orders , (view -> (ok', m2)) <- groupAggr o_custkeyQ o_totalpriceQ minimum orders , ok == ok' ]
259
nf2Qd = [ tup3 ok m1 m2 | (view -> (ok, m1)) <- groupAggr o_custkeyQ o_totalpriceQ maximum orders , (view -> (ok', m2)) <- groupAggr o_custkeyQ o_totalpriceQ minimum orders , ok == ok' ]
218
false
true
0
11
71
110
57
53
null
null
bitemyapp/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayOptc _ WayProf = ["-DPROFILING"]
41
wayOptc _ WayProf = ["-DPROFILING"]
41
wayOptc _ WayProf = ["-DPROFILING"]
41
false
false
1
6
10
16
7
9
null
null
brendanhay/gogol
gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Reports/Saved/List.hs
mpl-2.0
-- | Required. The account which owns the collection of reports. Format: -- accounts\/{account} arslParent :: Lens' AccountsReportsSavedList Text arslParent = lens _arslParent (\ s a -> s{_arslParent = a})
207
arslParent :: Lens' AccountsReportsSavedList Text arslParent = lens _arslParent (\ s a -> s{_arslParent = a})
111
arslParent = lens _arslParent (\ s a -> s{_arslParent = a})
61
true
true
0
9
31
43
23
20
null
null
gafiatulin/codewars
src/2 kyu/ApplicativeParser.hs
mit
(@>) :: Parser a -> Parser b -> Parser b pa @> pb = (flip const <#> pa) <@> pb
78
(@>) :: Parser a -> Parser b -> Parser b pa @> pb = (flip const <#> pa) <@> pb
78
pa @> pb = (flip const <#> pa) <@> pb
37
false
true
0
8
19
50
24
26
null
null
lobachevzky/pathtracer
app/Web.hs
bsd-3-clause
getHomeR :: Handler Html getHomeR = do WS.webSockets $ zipSources WS.sourceWS imageSource $$ (Data.Conduit.List.map $ formatAsImgSrc) =$ WS.sinkWSText defaultLayout $ do toWidget $(hamletFile "templates/home.hamlet") toWidget $(juliusFile "templates/home.julius")
287
getHomeR :: Handler Html getHomeR = do WS.webSockets $ zipSources WS.sourceWS imageSource $$ (Data.Conduit.List.map $ formatAsImgSrc) =$ WS.sinkWSText defaultLayout $ do toWidget $(hamletFile "templates/home.hamlet") toWidget $(juliusFile "templates/home.julius")
287
getHomeR = do WS.webSockets $ zipSources WS.sourceWS imageSource $$ (Data.Conduit.List.map $ formatAsImgSrc) =$ WS.sinkWSText defaultLayout $ do toWidget $(hamletFile "templates/home.hamlet") toWidget $(juliusFile "templates/home.julius")
262
false
true
0
14
50
90
40
50
null
null
locaweb/leela
src/warpdrive/src/Leela/Logger.hs
apache-2.0
info :: Logger -> String -> IO () info DevNull _ = return ()
60
info :: Logger -> String -> IO () info DevNull _ = return ()
60
info DevNull _ = return ()
26
false
true
0
8
13
34
16
18
null
null
SavinaRoja/SavinaRoja.github.io
assets/centraldogma_algebraic.hs
mit
geneticCode (Codon Adenine Cytosine Cytosine ) = Threonine
61
geneticCode (Codon Adenine Cytosine Cytosine ) = Threonine
61
geneticCode (Codon Adenine Cytosine Cytosine ) = Threonine
61
false
false
0
7
10
19
9
10
null
null
kcharter/erl
Erl/Test/MonadTests.hs
bsd-2-clause
checkErl :: ErlState d -> Erl d Bool -> Bool checkErl s erl = either (const False) id $ evalErl erl s
103
checkErl :: ErlState d -> Erl d Bool -> Bool checkErl s erl = either (const False) id $ evalErl erl s
103
checkErl s erl = either (const False) id $ evalErl erl s
58
false
true
0
8
23
52
24
28
null
null
keithodulaigh/Hets
Common/Lexer.hs
gpl-2.0
valueCheck :: Int -> String -> Bool valueCheck b s = let n = length s m = ord maxBound in n >= digits b 255 && n <= digits b m && value b s <= m
150
valueCheck :: Int -> String -> Bool valueCheck b s = let n = length s m = ord maxBound in n >= digits b 255 && n <= digits b m && value b s <= m
150
valueCheck b s = let n = length s m = ord maxBound in n >= digits b 255 && n <= digits b m && value b s <= m
114
false
true
0
12
43
81
38
43
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Prim.hs
bsd-3-clause
bvsge _ x y = signed x >= signed y
34
bvsge _ x y = signed x >= signed y
34
bvsge _ x y = signed x >= signed y
34
false
false
1
6
9
21
9
12
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
specialAttr :: MarkdownParser (Attr -> Attr) specialAttr = do char '-' return $ \(id',cs,kvs) -> (id',cs ++ ["unnumbered"],kvs)
131
specialAttr :: MarkdownParser (Attr -> Attr) specialAttr = do char '-' return $ \(id',cs,kvs) -> (id',cs ++ ["unnumbered"],kvs)
131
specialAttr = do char '-' return $ \(id',cs,kvs) -> (id',cs ++ ["unnumbered"],kvs)
86
false
true
0
11
21
64
35
29
null
null
jfischoff/simple-c-type-th
src/Language/C/Simple/CType/Build/TH.hs
bsd-3-clause
convert_type typs c@(ConT x) = c
32
convert_type typs c@(ConT x) = c
32
convert_type typs c@(ConT x) = c
32
false
false
0
8
5
20
10
10
null
null
chessai/silvi
src/Silvi/Random.hs
bsd-3-clause
randLogExplicit :: Rec SingField rs -> Silvi rs randLogExplicit = Topaz.traverse rand
85
randLogExplicit :: Rec SingField rs -> Silvi rs randLogExplicit = Topaz.traverse rand
85
randLogExplicit = Topaz.traverse rand
37
false
true
0
7
11
34
14
20
null
null
douglas-larocca/contracts
Haskell/Contract/Transform.hs
mit
-- if e known, iff will shorten elimBrs env (CheckWithin e 0 c1 c2) = elimBrs env (If e c1 c2)
94
elimBrs env (CheckWithin e 0 c1 c2) = elimBrs env (If e c1 c2)
62
elimBrs env (CheckWithin e 0 c1 c2) = elimBrs env (If e c1 c2)
62
true
false
0
7
20
39
19
20
null
null
skill-lang/skill
src/main/resources/haskell/Deserialize.hs
bsd-3-clause
b'fDs_v2 ((e1,e2,e3, _) : r_fDs_v1) (data' : r_data') = (e1,e2,e3, data') : b'fDs_v2 r_fDs_v1 r_data'
101
b'fDs_v2 ((e1,e2,e3, _) : r_fDs_v1) (data' : r_data') = (e1,e2,e3, data') : b'fDs_v2 r_fDs_v1 r_data'
101
b'fDs_v2 ((e1,e2,e3, _) : r_fDs_v1) (data' : r_data') = (e1,e2,e3, data') : b'fDs_v2 r_fDs_v1 r_data'
101
false
false
0
8
14
58
33
25
null
null
AlexanderPankiv/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseIds :: UnariseEnv -> [Id] -> [Id] unariseIds rho = concatMap (unariseId rho)
83
unariseIds :: UnariseEnv -> [Id] -> [Id] unariseIds rho = concatMap (unariseId rho)
83
unariseIds rho = concatMap (unariseId rho)
42
false
true
0
7
12
37
19
18
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Check.hs
bsd-3-clause
tidy_lit_pat :: HsLit -> Pat Id -- Unpack string patterns fully, so we can see when they -- overlap with each other, or even explicit lists of Chars. tidy_lit_pat lit | HsString src s <- lit = unLoc $ foldr (\c pat -> mkPrefixConPat consDataCon [mkCharLitPat src c, pat] ...
433
tidy_lit_pat :: HsLit -> Pat Id tidy_lit_pat lit | HsString src s <- lit = unLoc $ foldr (\c pat -> mkPrefixConPat consDataCon [mkCharLitPat src c, pat] [charTy]) (mkPrefixConPat nilDataCon [] [charTy]) (unpackFS s) | otherwise = tidyLitPat lit
315
tidy_lit_pat lit | HsString src s <- lit = unLoc $ foldr (\c pat -> mkPrefixConPat consDataCon [mkCharLitPat src c, pat] [charTy]) (mkPrefixConPat nilDataCon [] [charTy]) (unpackFS s) | otherwise = tidyLitPat lit
283
true
true
0
12
131
115
57
58
null
null
alanz/htelehash
src/Network/TeleHash/Paths.hs
bsd-3-clause
showPathJson :: PathJson -> String showPathJson (PIPv4 (PathIPv4 ip port)) = "{ type: 'ipv4', ip: '" ++ show ip ++ "', port: " ++ show port ++ "}"
146
showPathJson :: PathJson -> String showPathJson (PIPv4 (PathIPv4 ip port)) = "{ type: 'ipv4', ip: '" ++ show ip ++ "', port: " ++ show port ++ "}"
146
showPathJson (PIPv4 (PathIPv4 ip port)) = "{ type: 'ipv4', ip: '" ++ show ip ++ "', port: " ++ show port ++ "}"
111
false
true
0
9
27
54
26
28
null
null
three/codeworld
codeworld-compiler/src/Compile.hs
apache-2.0
hasOldStyleMain :: FilePath -> IO Bool hasOldStyleMain fname = do contents <- B.readFile fname return (matches contents "(^|\\n)main[ \\t]*=")
150
hasOldStyleMain :: FilePath -> IO Bool hasOldStyleMain fname = do contents <- B.readFile fname return (matches contents "(^|\\n)main[ \\t]*=")
150
hasOldStyleMain fname = do contents <- B.readFile fname return (matches contents "(^|\\n)main[ \\t]*=")
111
false
true
0
9
26
47
21
26
null
null
DavidAlphaFox/darcs
src/Darcs/Util/ByteString.hs
gpl-2.0
{- QuickCheck property: testUnlines = deepCheck (\x -> (unlinesPS x == unlinesPSOld x)) unlinesPSOld ss = BC.concat $ intersperse_newlines ss where intersperse_newlines (a:b:s) = a : newline : intersperse_newlines (b:s) intersperse_newlines s = s newline = BC.pack "\n" -} -- ------------------...
3,107
gzDecompress :: Maybe Int -> BL.ByteString -> ([B.ByteString], Bool) gzDecompress mbufsize = -- This is what the code would be without the bad CRC recovery logic: -- return . BL.toChunks . GZ.decompressWith decompressParams #if MIN_VERSION_zlib(0,6,0) decompressWarn (ZI.decompressST ZI.gzipFormat decompress...
2,409
gzDecompress mbufsize = -- This is what the code would be without the bad CRC recovery logic: -- return . BL.toChunks . GZ.decompressWith decompressParams #if MIN_VERSION_zlib(0,6,0) decompressWarn (ZI.decompressST ZI.gzipFormat decompressParams) #else toListWarn . ZI.decompressWithErrors ZI.gzipFormat ...
2,340
true
true
4
11
935
273
155
118
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\xF97E' = "\x91CF"
33
decomposeChar '\xF97E' = "\x91CF"
33
decomposeChar '\xF97E' = "\x91CF"
33
false
false
0
5
3
9
4
5
null
null
olsner/ghc
compiler/codeGen/StgCmmEnv.hs
bsd-3-clause
cgLookupPanic :: Id -> FCode a cgLookupPanic id = do local_binds <- getBinds pprPanic "StgCmmEnv: variable not found" (vcat [ppr id, text "local binds for:", pprUFM local_binds $ \infos -> vcat [ ppr (cg_id info) | info <- infos ] ...
347
cgLookupPanic :: Id -> FCode a cgLookupPanic id = do local_binds <- getBinds pprPanic "StgCmmEnv: variable not found" (vcat [ppr id, text "local binds for:", pprUFM local_binds $ \infos -> vcat [ ppr (cg_id info) | info <- infos ] ...
347
cgLookupPanic id = do local_binds <- getBinds pprPanic "StgCmmEnv: variable not found" (vcat [ppr id, text "local binds for:", pprUFM local_binds $ \infos -> vcat [ ppr (cg_id info) | info <- infos ] ]) --------------------
316
false
true
0
17
134
93
45
48
null
null
seni/copilot-libraries
src/Copilot/Library/RegExp.hs
bsd-3-clause
star = char '*'
17
star = char '*'
17
star = char '*'
17
false
false
0
5
5
9
4
5
null
null
ekarayel/HTF
Test/Framework/TestManager.hs
lgpl-2.1
-- | Extend a 'TestSuite' with a list of 'Test' values addToTestSuite :: TestSuite -> [Test] -> TestSuite addToTestSuite (TestSuite id ts) ts' = TestSuite id (ts ++ ts')
169
addToTestSuite :: TestSuite -> [Test] -> TestSuite addToTestSuite (TestSuite id ts) ts' = TestSuite id (ts ++ ts')
114
addToTestSuite (TestSuite id ts) ts' = TestSuite id (ts ++ ts')
63
true
true
0
7
28
48
25
23
null
null
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Node/Bloom.hs
unlicense
-- 20,000 items with fp rate < 0.1% or 10,000 items and <0.0001% maxBloomSize :: Int maxBloomSize = 36000
105
maxBloomSize :: Int maxBloomSize = 36000
40
maxBloomSize = 36000
20
true
true
0
4
18
12
7
5
null
null
ikuehne/craeft-hs
lib/Craeft/Scope.hs
gpl-3.0
-- | Execute the given action in a fresh scope using the given scope accessor. -- -- Exception-safe: if the action throws, the scope will still be popped. We -- expose this as the only way to nest scopes because we want to ensure that -- every @push@ has a corresponding @pop@. nested :: (Scope a () -> CraeftMonad s ()...
424
nested :: (Scope a () -> CraeftMonad s ()) -> CraeftMonad s r -> CraeftMonad s r nested scope action = scope push >> bracketed (scope pop) action
145
nested scope action = scope push >> bracketed (scope pop) action
64
true
true
0
9
80
78
39
39
null
null
iqsf/HFitUI
src/WebUI/Widgets/UIWidget.hs
bsd-3-clause
margin :: CSizeable a => (a, a, a, a) -> WidgetUI -> UI WidgetUI margin (l, t, r, b) widget = applyStyleToWidget widget ("margin-left:" ++ (showSize l) ++ ";margin-top:" ++ (showSize t) ++ ";margin-right:" ++ (showSize r) ++ ";margin-bottom:" ++ (showSize b) ++ ";")
270
margin :: CSizeable a => (a, a, a, a) -> WidgetUI -> UI WidgetUI margin (l, t, r, b) widget = applyStyleToWidget widget ("margin-left:" ++ (showSize l) ++ ";margin-top:" ++ (showSize t) ++ ";margin-right:" ++ (showSize r) ++ ";margin-bottom:" ++ (showSize b) ++ ";")
270
margin (l, t, r, b) widget = applyStyleToWidget widget ("margin-left:" ++ (showSize l) ++ ";margin-top:" ++ (showSize t) ++ ";margin-right:" ++ (showSize r) ++ ";margin-bottom:" ++ (showSize b) ++ ";")
205
false
true
0
16
47
128
65
63
null
null
BJTerry/matfile
Data/MatFile.hs
bsd-3-clause
promoteArrayValues 12 dataType = promoteTo32Int dataType
56
promoteArrayValues 12 dataType = promoteTo32Int dataType
56
promoteArrayValues 12 dataType = promoteTo32Int dataType
56
false
false
0
5
5
14
6
8
null
null
rueshyna/gogol
gogol-dns/gen/Network/Google/Resource/DNS/ManagedZones/Patch.hs
mpl-2.0
-- | Creates a value of 'ManagedZonesPatch' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'mzpProject' -- -- * 'mzpPayload' -- -- * 'mzpManagedZone' -- -- * 'mzpClientOperationId' managedZonesPatch :: Text -- ^ 'mzpProject' -...
647
managedZonesPatch :: Text -- ^ 'mzpProject' -> ManagedZone -- ^ 'mzpPayload' -> Text -- ^ 'mzpManagedZone' -> ManagedZonesPatch managedZonesPatch pMzpProject_ pMzpPayload_ pMzpManagedZone_ = ManagedZonesPatch' { _mzpProject = pMzpProject_ , _mzpPayload = pMzpPayload_ , _mzpManagedZone = ...
380
managedZonesPatch pMzpProject_ pMzpPayload_ pMzpManagedZone_ = ManagedZonesPatch' { _mzpProject = pMzpProject_ , _mzpPayload = pMzpPayload_ , _mzpManagedZone = pMzpManagedZone_ , _mzpClientOperationId = Nothing }
236
true
true
0
9
126
79
48
31
null
null
shadwstalkr/phase-zero
Render.hs
bsd-3-clause
renderTemplates :: FilePath -> Variables -> IO () renderTemplates templatePath vars = E.run_ $ EL.unfoldM listFiles [base] $$ EL.mapM (runKleisli $ makePath &&& renderFile) =$ EL.mapM (runKleisli . first . Kleisli $ makeDir) =$ EL.mapM_ writeTemplate where base = templat...
429
renderTemplates :: FilePath -> Variables -> IO () renderTemplates templatePath vars = E.run_ $ EL.unfoldM listFiles [base] $$ EL.mapM (runKleisli $ makePath &&& renderFile) =$ EL.mapM (runKleisli . first . Kleisli $ makeDir) =$ EL.mapM_ writeTemplate where base = templat...
429
renderTemplates templatePath vars = E.run_ $ EL.unfoldM listFiles [base] $$ EL.mapM (runKleisli $ makePath &&& renderFile) =$ EL.mapM (runKleisli . first . Kleisli $ makeDir) =$ EL.mapM_ writeTemplate where base = templatePath </> "src" makePath = arr (replacePath ...
379
false
true
0
11
113
139
69
70
null
null
AubreyEAnderson/shellcheck
ShellCheck/ASTLib.hs
gpl-3.0
getCommandName t = case t of T_Redirecting _ _ w -> getCommandName w T_SimpleCommand _ _ (w:_) -> getLiteralString w T_Annotation _ _ t -> getCommandName t otherwise -> Nothing -- Get the basename of a token representing a command
267
getCommandName t = case t of T_Redirecting _ _ w -> getCommandName w T_SimpleCommand _ _ (w:_) -> getLiteralString w T_Annotation _ _ t -> getCommandName t otherwise -> Nothing -- Get the basename of a token representing a command
267
getCommandName t = case t of T_Redirecting _ _ w -> getCommandName w T_SimpleCommand _ _ (w:_) -> getLiteralString w T_Annotation _ _ t -> getCommandName t otherwise -> Nothing -- Get the basename of a token representing a command
267
false
false
0
10
76
75
35
40
null
null
brendanhay/gogol
gogol-ml/gen/Network/Google/MachineLearning/Types/Product.hs
mpl-2.0
-- | The AI Platform runtime version that includes a TensorFlow version -- matching the one used in the custom container. This field is required if -- the replica is a TPU worker that uses a custom container. Otherwise, do -- not specify this field. This must be a [runtime version that currently -- supports training wi...
996
gcmvrcTpuTfVersion :: Lens' GoogleCloudMlV1__ReplicaConfig (Maybe Text) gcmvrcTpuTfVersion = lens _gcmvrcTpuTfVersion (\ s a -> s{_gcmvrcTpuTfVersion = a})
163
gcmvrcTpuTfVersion = lens _gcmvrcTpuTfVersion (\ s a -> s{_gcmvrcTpuTfVersion = a})
91
true
true
0
9
142
60
37
23
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Misc.hs
bsd-3-clause
safeUncons _ (x:xs) = (x, xs)
29
safeUncons _ (x:xs) = (x, xs)
29
safeUncons _ (x:xs) = (x, xs)
29
false
false
1
6
5
27
13
14
null
null
ublubu/shapes-demo
src/Geometry.hs
mit
joinTrans :: (Num a) => Transform a -> Transform a -> Transform a joinTrans (Transform scale origin) (Transform scale' origin') = Transform (scale * scale') (origin * scale' + origin')
186
joinTrans :: (Num a) => Transform a -> Transform a -> Transform a joinTrans (Transform scale origin) (Transform scale' origin') = Transform (scale * scale') (origin * scale' + origin')
186
joinTrans (Transform scale origin) (Transform scale' origin') = Transform (scale * scale') (origin * scale' + origin')
120
false
true
0
8
31
81
40
41
null
null
frozencemetery/haskey
src/Prompts.hs
gpl-3.0
newPasswordPrompt = Prompt { message = "New password" , alert = "Please enter the a new password to encrypt the keychain." }
130
newPasswordPrompt = Prompt { message = "New password" , alert = "Please enter the a new password to encrypt the keychain." }
130
newPasswordPrompt = Prompt { message = "New password" , alert = "Please enter the a new password to encrypt the keychain." }
130
false
false
0
7
27
24
13
11
null
null
termite2/tsl
Solver/SMTLib2.hs
bsd-3-clause
mkTypeMap :: (?spec::Spec) => [Var] -> (M.Map Type String, Doc) mkTypeMap vs = foldl' mkTypeMap' (M.empty, empty) alltypes where -- sort all types occurring in the spec in dependency order alltypes = sortBy (\t1 t2 -> if' (elem t1 $ subtypesRec t2) LT $ if' (elem t2 ...
447
mkTypeMap :: (?spec::Spec) => [Var] -> (M.Map Type String, Doc) mkTypeMap vs = foldl' mkTypeMap' (M.empty, empty) alltypes where -- sort all types occurring in the spec in dependency order alltypes = sortBy (\t1 t2 -> if' (elem t1 $ subtypesRec t2) LT $ if' (elem t2 ...
447
mkTypeMap vs = foldl' mkTypeMap' (M.empty, empty) alltypes where -- sort all types occurring in the spec in dependency order alltypes = sortBy (\t1 t2 -> if' (elem t1 $ subtypesRec t2) LT $ if' (elem t2 $ subtypesRec t1) GT $ EQ...
383
false
true
3
13
173
154
75
79
null
null
Purview/purview
src/Graphics/Forensics/Analyser.hs
gpl-3.0
-- | Fully evaluates the argument, ensuring that it is evaluated -- before the next monad action. evaluate :: (NFData a) => a -> Analysis a evaluate a = a `deepseq` return a
173
evaluate :: (NFData a) => a -> Analysis a evaluate a = a `deepseq` return a
75
evaluate a = a `deepseq` return a
33
true
true
0
8
32
45
23
22
null
null
lukexi/vr-pal
src/Graphics/VR/Pal/SDLUtils.hs
bsd-3-clause
fakeTextInputEventFromChar char = fakeEvent . TextInputEvent $ TextInputEventData { textInputEventWindow = Window nullPtr , textInputEventText = Text.pack [char] }
191
fakeTextInputEventFromChar char = fakeEvent . TextInputEvent $ TextInputEventData { textInputEventWindow = Window nullPtr , textInputEventText = Text.pack [char] }
191
fakeTextInputEventFromChar char = fakeEvent . TextInputEvent $ TextInputEventData { textInputEventWindow = Window nullPtr , textInputEventText = Text.pack [char] }
191
false
false
0
9
46
42
22
20
null
null
brendanhay/gogol
gogol-docs/gen/Network/Google/Docs/Types/Product.hs
mpl-2.0
-- | The red component of the color, from 0.0 to 1.0. rcRed :: Lens' RgbColor (Maybe Double) rcRed = lens _rcRed (\ s a -> s{_rcRed = a}) . mapping _Coerce
163
rcRed :: Lens' RgbColor (Maybe Double) rcRed = lens _rcRed (\ s a -> s{_rcRed = a}) . mapping _Coerce
109
rcRed = lens _rcRed (\ s a -> s{_rcRed = a}) . mapping _Coerce
70
true
true
0
10
39
55
28
27
null
null
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/ListGateways.hs
mpl-2.0
-- | 'ListGateways' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'lgLimit' @::@ 'Maybe' 'Natural' -- -- * 'lgMarker' @::@ 'Maybe' 'Text' -- listGateways :: ListGateways listGateways = ListGateways { _lgMarker = Nothing , _lgLimit = Nothing }
292
listGateways :: ListGateways listGateways = ListGateways { _lgMarker = Nothing , _lgLimit = Nothing }
114
listGateways = ListGateways { _lgMarker = Nothing , _lgLimit = Nothing }
85
true
true
0
7
55
43
25
18
null
null
kovach/ecstatic
Development/Ecstatic/CallGraph.hs
bsd-2-clause
-- Prints CallGraph, using ANSI color codes ppCallGraph :: CallGraph -> String ppCallGraph = ppCallGraph' ""
108
ppCallGraph :: CallGraph -> String ppCallGraph = ppCallGraph' ""
64
ppCallGraph = ppCallGraph' ""
29
true
true
0
5
15
19
10
9
null
null
mlitchard/haks
src/Haks/Tibetan/Uchen/Particulator.hs
isc
shad :: String shad = ['།','༑']
31
shad :: String shad = ['།','༑']
31
shad = ['།','༑']
16
false
true
0
6
5
24
11
13
null
null
diku-dk/futhark
src/Futhark/IR/Primitive.hs
isc
doConvOp (UIToFP _ to) (IntValue v) = Just $ FloatValue $ doUIToFP v to
71
doConvOp (UIToFP _ to) (IntValue v) = Just $ FloatValue $ doUIToFP v to
71
doConvOp (UIToFP _ to) (IntValue v) = Just $ FloatValue $ doUIToFP v to
71
false
false
0
7
13
38
18
20
null
null
markuspf/Idris-dev
src/Idris/Options.hs
bsd-3-clause
getBC :: Opt -> Maybe String getBC (BCAsm s) = Just s
53
getBC :: Opt -> Maybe String getBC (BCAsm s) = Just s
53
getBC (BCAsm s) = Just s
24
false
true
0
7
11
30
14
16
null
null
amccausl/Swish
Swish/HaskellRDF/Proof.hs
lgpl-2.1
showNames (n1:ns) = showName n1 ++ ", " ++ showNames ns
55
showNames (n1:ns) = showName n1 ++ ", " ++ showNames ns
55
showNames (n1:ns) = showName n1 ++ ", " ++ showNames ns
55
false
false
0
7
10
30
14
16
null
null
RefactoringTools/HaRe
test/testdata/Renaming/ConstructorIn3.hs
bsd-3-clause
insert val tree@(T tval left right) | val > tval = T tval left (insert val right) | otherwise = T tval (insert val left) right
132
insert val tree@(T tval left right) | val > tval = T tval left (insert val right) | otherwise = T tval (insert val left) right
132
insert val tree@(T tval left right) | val > tval = T tval left (insert val right) | otherwise = T tval (insert val left) right
132
false
false
1
8
31
71
34
37
null
null
brendanhay/gogol
gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/Reports/Request.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). rrUploadType :: Lens' ReportsRequest (Maybe Text) rrUploadType = lens _rrUploadType (\ s a -> s{_rrUploadType = a})
188
rrUploadType :: Lens' ReportsRequest (Maybe Text) rrUploadType = lens _rrUploadType (\ s a -> s{_rrUploadType = a})
117
rrUploadType = lens _rrUploadType (\ s a -> s{_rrUploadType = a})
67
true
true
1
9
28
52
25
27
null
null
databrary/databrary
test/Store/ProbeTest.hs
agpl-3.0
mkZTime :: Day -> Integer -> ZonedTime mkZTime d secs = utcToZonedTime utc (UTCTime d (secondsToDiffTime secs))
111
mkZTime :: Day -> Integer -> ZonedTime mkZTime d secs = utcToZonedTime utc (UTCTime d (secondsToDiffTime secs))
111
mkZTime d secs = utcToZonedTime utc (UTCTime d (secondsToDiffTime secs))
72
false
true
0
9
16
43
21
22
null
null
todays-mitsui/discussion
test/UnitParser.hs
mit
case_parse_reduct_2 = Discussion.parse [Symbol ":", Number 123, Word "x", EOS] @?= Right (Reduct (Just 123) (VarT (Var "x")))
131
case_parse_reduct_2 = Discussion.parse [Symbol ":", Number 123, Word "x", EOS] @?= Right (Reduct (Just 123) (VarT (Var "x")))
131
case_parse_reduct_2 = Discussion.parse [Symbol ":", Number 123, Word "x", EOS] @?= Right (Reduct (Just 123) (VarT (Var "x")))
131
false
false
1
10
23
68
32
36
null
null
juhp/leksah
src/IDE/Workspaces.hs
gpl-2.0
workspaceNewHere :: FilePath -> IDEAction workspaceNewHere filePath = let realPath = if takeExtension filePath == leksahWorkspaceFileExtension then filePath else addExtension filePath leksahWorkspaceFileExtension in do dir <- liftIO $ myCanonicaliz...
686
workspaceNewHere :: FilePath -> IDEAction workspaceNewHere filePath = let realPath = if takeExtension filePath == leksahWorkspaceFileExtension then filePath else addExtension filePath leksahWorkspaceFileExtension in do dir <- liftIO $ myCanonicaliz...
686
workspaceNewHere filePath = let realPath = if takeExtension filePath == leksahWorkspaceFileExtension then filePath else addExtension filePath leksahWorkspaceFileExtension in do dir <- liftIO $ myCanonicalizePath $ dropFileName realPath let ...
644
false
true
0
16
235
153
72
81
null
null