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
junjihashimoto/mathflow
test/MathFlow/PyStringSpec.hs
bsd-3-clause
testConvNet1 :: forall s. (SingI s) => Tensor '[s,IMAGE_SIZE_2,IMAGE_SIZE_2,64] Float PyString -> Tensor '[s,IMAGE_SIZE_4,IMAGE_SIZE_4,64] Float PyString testConvNet1 x1 = let k1 = Tensor "" :: Tensor '[5,5,64,64] Float PyString b1 = Tensor "" :: Tensor '[64] Float PyString y1' = (TConv2d x1 k1) :: Tenso...
588
testConvNet1 :: forall s. (SingI s) => Tensor '[s,IMAGE_SIZE_2,IMAGE_SIZE_2,64] Float PyString -> Tensor '[s,IMAGE_SIZE_4,IMAGE_SIZE_4,64] Float PyString testConvNet1 x1 = let k1 = Tensor "" :: Tensor '[5,5,64,64] Float PyString b1 = Tensor "" :: Tensor '[64] Float PyString y1' = (TConv2d x1 k1) :: Tenso...
588
testConvNet1 x1 = let k1 = Tensor "" :: Tensor '[5,5,64,64] Float PyString b1 = Tensor "" :: Tensor '[64] Float PyString y1' = (TConv2d x1 k1) :: Tensor '[s,IMAGE_SIZE_2,IMAGE_SIZE_2,64] Float PyString y1 = TNorm (TReLu y1') :: Tensor '[s,IMAGE_SIZE_2,IMAGE_SIZE_2,64] Float PyString opt = sin...
434
false
true
0
11
110
269
149
120
null
null
M42/mikrokosmos
source/Lambda.hs
gpl-3.0
showReduction (App (Lambda f) x) = betaColor (App (Lambda f) x)
63
showReduction (App (Lambda f) x) = betaColor (App (Lambda f) x)
63
showReduction (App (Lambda f) x) = betaColor (App (Lambda f) x)
63
false
false
0
9
10
40
19
21
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - Gains for the roll PID controller.When <see cref="M:SpaceCenter.AutoPilot.AutoTune" /> is true, these values are updated automatically, which will overwrite any manual changes. -} getAutoPilotRollPIDGains :: KRPCHS.SpaceCenter.AutoPilot -> RPCContext ((Double, Double, Double)) getAutoPilotRollPIDGains thisArg = ...
463
getAutoPilotRollPIDGains :: KRPCHS.SpaceCenter.AutoPilot -> RPCContext ((Double, Double, Double)) getAutoPilotRollPIDGains thisArg = do let r = makeRequest "SpaceCenter" "AutoPilot_get_RollPIDGains" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
276
getAutoPilotRollPIDGains thisArg = do let r = makeRequest "SpaceCenter" "AutoPilot_get_RollPIDGains" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
178
true
true
0
13
65
82
39
43
null
null
sol/aeson
benchmarks/Compare/JsonBench.hs
bsd-3-clause
eyeColorTable :: [(Text, EyeColor)] eyeColorTable = [("brown", Brown), ("green", Green), ("blue", Blue)]
104
eyeColorTable :: [(Text, EyeColor)] eyeColorTable = [("brown", Brown), ("green", Green), ("blue", Blue)]
104
eyeColorTable = [("brown", Brown), ("green", Green), ("blue", Blue)]
68
false
true
0
6
11
47
30
17
null
null
paul-rouse/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
runMongoDBPipePool :: MonadUnliftIO m => DB.AccessMode -> Database -> DB.Action m a -> PipePool -> m a runMongoDBPipePool accessMode db action pool = withRunInIO $ \run -> Pool.withResource pool $ \pipe -> run $ DB.access pipe accessMode db action
253
runMongoDBPipePool :: MonadUnliftIO m => DB.AccessMode -> Database -> DB.Action m a -> PipePool -> m a runMongoDBPipePool accessMode db action pool = withRunInIO $ \run -> Pool.withResource pool $ \pipe -> run $ DB.access pipe accessMode db action
253
runMongoDBPipePool accessMode db action pool = withRunInIO $ \run -> Pool.withResource pool $ \pipe -> run $ DB.access pipe accessMode db action
150
false
true
0
11
44
93
45
48
null
null
vincenthz/hs-cryptohash
Crypto/Hash/Internal.hs
bsd-3-clause
digestToByteStringWitness :: HashAlgorithm h => h -> Digest h -> ByteString digestToByteStringWitness _ = convert
113
digestToByteStringWitness :: HashAlgorithm h => h -> Digest h -> ByteString digestToByteStringWitness _ = convert
113
digestToByteStringWitness _ = convert
37
false
true
0
8
14
32
15
17
null
null
nushio3/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
isFixityLSig _ = False
38
isFixityLSig _ = False
38
isFixityLSig _ = False
38
false
false
0
4
19
10
4
6
null
null
hot-leaf-juice/gotta-go-fast
src/Main.hs
bsd-3-clause
-- wordWeights.txt is taken from -- https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists#TV_and_movie_scripts -- (and cleaned up a little with some throwaway sed) wordWeights :: [(String, Int)] wordWeights = map ((\[w, f] -> (w, read f)) . words) . lines $ $(embedStringFile "wordWeights.txt")
302
wordWeights :: [(String, Int)] wordWeights = map ((\[w, f] -> (w, read f)) . words) . lines $ $(embedStringFile "wordWeights.txt")
134
wordWeights = map ((\[w, f] -> (w, read f)) . words) . lines $ $(embedStringFile "wordWeights.txt")
103
true
true
0
13
40
71
41
30
null
null
ulricha/dsh-tpc-h
Queries/TPCH/BuildingBlocks.hs
bsd-3-clause
-- | All orders of one particular customer custOrders :: Q Customer -> Q [Order] custOrders c = [ o | o <- orders, o_custkeyQ o == c_custkeyQ c ]
145
custOrders :: Q Customer -> Q [Order] custOrders c = [ o | o <- orders, o_custkeyQ o == c_custkeyQ c ]
102
custOrders c = [ o | o <- orders, o_custkeyQ o == c_custkeyQ c ]
64
true
true
0
8
29
53
26
27
null
null
cchalmers/pgf-system
src/Graphics/Rendering/PGFSystem.hs
bsd-3-clause
dash' :: [Double] -> Double -> Put dash' ds ph = ln $ do bracers . commaIntersperse $ map mm ds bracers $ mm ph
115
dash' :: [Double] -> Double -> Put dash' ds ph = ln $ do bracers . commaIntersperse $ map mm ds bracers $ mm ph
115
dash' ds ph = ln $ do bracers . commaIntersperse $ map mm ds bracers $ mm ph
80
false
true
2
9
28
64
28
36
null
null
quyse/flaw
flaw-ffmpeg/Flaw/Media/FFmpeg.hs
mit
ffmpegGetStreamIndex :: FFmpegAVStream -> IO Int ffmpegGetStreamIndex (FFmpegAVStream streamPtr) = fromIntegral <$> flaw_ffmpeg_getStreamIndex streamPtr
152
ffmpegGetStreamIndex :: FFmpegAVStream -> IO Int ffmpegGetStreamIndex (FFmpegAVStream streamPtr) = fromIntegral <$> flaw_ffmpeg_getStreamIndex streamPtr
152
ffmpegGetStreamIndex (FFmpegAVStream streamPtr) = fromIntegral <$> flaw_ffmpeg_getStreamIndex streamPtr
103
false
true
0
7
13
34
16
18
null
null
thulishuang/Compiler
src/Parser.hs
bsd-3-clause
morParser :: Parser Expr morParser = do lexeme $ Data.Attoparsec.Text.char '(' lexeme $ Data.Attoparsec.Text.char '>' expr1 <- exprParser expr2 <- exprParser lexeme $ Data.Attoparsec.Text.char ')' return (Gt expr1 expr2)
245
morParser :: Parser Expr morParser = do lexeme $ Data.Attoparsec.Text.char '(' lexeme $ Data.Attoparsec.Text.char '>' expr1 <- exprParser expr2 <- exprParser lexeme $ Data.Attoparsec.Text.char ')' return (Gt expr1 expr2)
245
morParser = do lexeme $ Data.Attoparsec.Text.char '(' lexeme $ Data.Attoparsec.Text.char '>' expr1 <- exprParser expr2 <- exprParser lexeme $ Data.Attoparsec.Text.char ')' return (Gt expr1 expr2)
220
false
true
0
9
53
84
40
44
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Experiment' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'expParentLink' -- -- * 'expEqualWeighting' -- -- * 'expStatus' -- -- * 'expWebPropertyId' -- -- * 'expStartTime' -- -- * 'expSnippet' -- -- * 'expKin...
1,910
experiment :: Experiment experiment = Experiment' { _expParentLink = Nothing , _expEqualWeighting = Nothing , _expStatus = Nothing , _expWebPropertyId = Nothing , _expStartTime = Nothing , _expSnippet = Nothing , _expKind = "analytics#experiment" , _expCreated = Nothing , _expR...
1,010
experiment = Experiment' { _expParentLink = Nothing , _expEqualWeighting = Nothing , _expStatus = Nothing , _expWebPropertyId = Nothing , _expStartTime = Nothing , _expSnippet = Nothing , _expKind = "analytics#experiment" , _expCreated = Nothing , _expReasonExperimentEnded = Nothin...
981
true
true
1
7
382
247
179
68
null
null
yuga/ghc-mod
test/BrowseSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "browseModule" $ do it "lists up symbols in the module" $ do cradle <- findCradle syms <- lines <$> browseModule defaultOptions cradle "Data.Map" syms `shouldContain` ["differenceWithKey"] describe "browseModule -d" $ do it "li...
1,160
spec :: Spec spec = do describe "browseModule" $ do it "lists up symbols in the module" $ do cradle <- findCradle syms <- lines <$> browseModule defaultOptions cradle "Data.Map" syms `shouldContain` ["differenceWithKey"] describe "browseModule -d" $ do it "li...
1,160
spec = do describe "browseModule" $ do it "lists up symbols in the module" $ do cradle <- findCradle syms <- lines <$> browseModule defaultOptions cradle "Data.Map" syms `shouldContain` ["differenceWithKey"] describe "browseModule -d" $ do it "lists up symbol...
1,147
false
true
0
32
366
259
120
139
null
null
DataStewardshipPortal/ds-wizard
src/Actions.hs
apache-2.0
fieldEdit :: JQuery -> Int -> String -> String -> (String -> JQuery -> IO JQuery) -> String -> IO () fieldEdit jq planId editor editorHtml setValueFn url = do inp <- findSelector editor jq len <- jqLength inp when (len == 0) $ do val <- getText jq _ <- removeClass "editable" jq >>= addClass "editing" ...
1,131
fieldEdit :: JQuery -> Int -> String -> String -> (String -> JQuery -> IO JQuery) -> String -> IO () fieldEdit jq planId editor editorHtml setValueFn url = do inp <- findSelector editor jq len <- jqLength inp when (len == 0) $ do val <- getText jq _ <- removeClass "editable" jq >>= addClass "editing" ...
1,131
fieldEdit jq planId editor editorHtml setValueFn url = do inp <- findSelector editor jq len <- jqLength inp when (len == 0) $ do val <- getText jq _ <- removeClass "editable" jq >>= addClass "editing" _ <- setHtml editorHtml jq >>= inside >>= setValueFn val >>= onKeypress (\ev ->...
1,030
false
true
1
21
391
422
195
227
null
null
wando-hs/H-99
src/Problem39.hs
gpl-3.0
primesR :: Int -> Int -> [Int] primesR x y = filter isPrime [x..y]
66
primesR :: Int -> Int -> [Int] primesR x y = filter isPrime [x..y]
66
primesR x y = filter isPrime [x..y]
35
false
true
0
9
13
44
20
24
null
null
Jugendhackt/haskell-ricochet
src/Demo/Server.hs
gpl-3.0
handler con = forever $ do p <- nextPacket con liftIO $ print p
73
handler con = forever $ do p <- nextPacket con liftIO $ print p
73
handler con = forever $ do p <- nextPacket con liftIO $ print p
73
false
false
0
9
23
33
14
19
null
null
danr/hipspec
examples/old-examples/hip/Integers.hs
gpl-3.0
S m -. S n = m -. n
19
S m -. S n = m -. n
19
S m -. S n = m -. n
19
false
false
3
5
8
29
11
18
null
null
dec9ue/jhc_copygc
src/Grin/Grin.hs
gpl-2.0
tagUnfunction _ = fail "Tag does not represent function"
56
tagUnfunction _ = fail "Tag does not represent function"
56
tagUnfunction _ = fail "Tag does not represent function"
56
false
false
0
5
8
12
5
7
null
null
DestructHub/ProjectEuler
Problem097/Haskell/solution_1.hs
mit
main :: IO () main = putStrLn . reverse . take 10 . reverse $ x where x = show (28433 * 2^7830457 + 1)
106
main :: IO () main = putStrLn . reverse . take 10 . reverse $ x where x = show (28433 * 2^7830457 + 1)
106
main = putStrLn . reverse . take 10 . reverse $ x where x = show (28433 * 2^7830457 + 1)
92
false
true
3
9
28
72
31
41
null
null
spechub/Hets
Temporal/ModalCasl.hs
gpl-2.0
showPathFormula (XPast phi) outer = "~X " ++ showPathFormula phi False
70
showPathFormula (XPast phi) outer = "~X " ++ showPathFormula phi False
70
showPathFormula (XPast phi) outer = "~X " ++ showPathFormula phi False
70
false
false
0
7
10
26
12
14
null
null
benjamin-wagon/homeworld
Types.hs
agpl-3.0
intMapList m = IntMap.findMax m & \case (k,_) → flip IntMap.lookup m <$> [0..k]
94
intMapList m = IntMap.findMax m & \case (k,_) → flip IntMap.lookup m <$> [0..k]
94
intMapList m = IntMap.findMax m & \case (k,_) → flip IntMap.lookup m <$> [0..k]
94
false
false
1
11
28
52
24
28
null
null
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/MultiMap.hs
mit
---------------------------------------------------------------- -- | O(n) pruneWith :: MultiMap v -> ((FilePath,v) -> IO Bool) -> IO (MultiMap v) pruneWith (MultiMap mm) action = I.foldrWithKey go (pure . MultiMap) mm I.empty where go h s cont acc = do rs <- filterM action s ca...
513
pruneWith :: MultiMap v -> ((FilePath,v) -> IO Bool) -> IO (MultiMap v) pruneWith (MultiMap mm) action = I.foldrWithKey go (pure . MultiMap) mm I.empty where go h s cont acc = do rs <- filterM action s case rs of [] -> cont acc _ -> cont $! I.insert h rs acc ---...
437
pruneWith (MultiMap mm) action = I.foldrWithKey go (pure . MultiMap) mm I.empty where go h s cont acc = do rs <- filterM action s case rs of [] -> cont acc _ -> cont $! I.insert h rs acc ---------------------------------------------------------------- -- O(n + m) where N is the si...
345
true
true
0
12
130
148
73
75
null
null
dmvianna/haskellbook
src/Ch24-Fractions-parsers.hs
unlicense
alsoBad :: IsString s => s alsoBad = "10"
41
alsoBad :: IsString s => s alsoBad = "10"
41
alsoBad = "10"
14
false
true
0
7
8
25
10
15
null
null
spechub/Hets
Common/Doc.hs
gpl-2.0
lbrack = text "["
17
lbrack = text "["
17
lbrack = text "["
17
false
false
1
5
3
12
4
8
null
null
mmisamore/directed-cubical
Math/Topology/CubeCmplx/DirCubeCmplx.hs
bsd-3-clause
-- | Get coordinates for upper vertex in coordinate span. vsSndList :: VertSpan -> [T] vsSndList = vertexToList . vsSnd
119
vsSndList :: VertSpan -> [T] vsSndList = vertexToList . vsSnd
61
vsSndList = vertexToList . vsSnd
32
true
true
0
6
19
23
13
10
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- LATIN SMALL LETTER L WITH CEDILLA switch 'L' '<' = '\x013D'
62
switch 'L' '<' = '\x013D'
25
switch 'L' '<' = '\x013D'
25
true
false
0
5
11
12
6
6
null
null
kylcarte/threepenny-extras
src/Foundation/Common.hs
bsd-3-clause
divClasses :: [String] -> IO Element divClasses cs = UI.div # set classes cs
76
divClasses :: [String] -> IO Element divClasses cs = UI.div # set classes cs
76
divClasses cs = UI.div # set classes cs
39
false
true
0
6
13
35
17
18
null
null
snoyberg/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
isPatSynRecordSelector id = case Var.idDetails id of RecSelId {sel_tycon = RecSelPatSyn _} -> True _ -> False
171
isPatSynRecordSelector id = case Var.idDetails id of RecSelId {sel_tycon = RecSelPatSyn _} -> True _ -> False
171
isPatSynRecordSelector id = case Var.idDetails id of RecSelId {sel_tycon = RecSelPatSyn _} -> True _ -> False
171
false
false
0
11
78
42
20
22
null
null
Frefreak/hnem
src/UI.hs
bsd-3-clause
updateSong :: St -> EventM n (Next St) updateSong st = case st ^. stmplayer of Nothing -> error "this should not happend!!!!" Just mp -> do fn <- liftIO (getFileName mp) case fn of Nothing -> continue st Just fn' -> continue $ st & stcurrentSong .~ lookup fn' (st^.stfilen...
327
updateSong :: St -> EventM n (Next St) updateSong st = case st ^. stmplayer of Nothing -> error "this should not happend!!!!" Just mp -> do fn <- liftIO (getFileName mp) case fn of Nothing -> continue st Just fn' -> continue $ st & stcurrentSong .~ lookup fn' (st^.stfilen...
327
updateSong st = case st ^. stmplayer of Nothing -> error "this should not happend!!!!" Just mp -> do fn <- liftIO (getFileName mp) case fn of Nothing -> continue st Just fn' -> continue $ st & stcurrentSong .~ lookup fn' (st^.stfilenameMap)
288
false
true
0
16
98
120
56
64
null
null
brendanhay/gogol
gogol-cloudfunctions/gen/Network/Google/Resource/CloudFunctions/Projects/Locations/Functions/Delete.hs
mpl-2.0
-- | OAuth access token. plfdAccessToken :: Lens' ProjectsLocationsFunctionsDelete (Maybe Text) plfdAccessToken = lens _plfdAccessToken (\ s a -> s{_plfdAccessToken = a})
178
plfdAccessToken :: Lens' ProjectsLocationsFunctionsDelete (Maybe Text) plfdAccessToken = lens _plfdAccessToken (\ s a -> s{_plfdAccessToken = a})
153
plfdAccessToken = lens _plfdAccessToken (\ s a -> s{_plfdAccessToken = a})
82
true
true
0
9
29
48
25
23
null
null
uwap/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
extractPTermNames (PInferRef _ _ n) = [n]
42
extractPTermNames (PInferRef _ _ n) = [n]
42
extractPTermNames (PInferRef _ _ n) = [n]
42
false
false
0
7
7
22
11
11
null
null
diegospd/pol
app/Main.hs
gpl-3.0
operationMode :: Config -> IO () operationMode conf = do greet conf runTheApp conf
86
operationMode :: Config -> IO () operationMode conf = do greet conf runTheApp conf
86
operationMode conf = do greet conf runTheApp conf
53
false
true
0
7
17
35
15
20
null
null
JanAhrens/xing-api-haskell
lib/Web/XING/API/Error.hs
bsd-3-clause
mapError (XINGError "INSUFFICIENT_PRIVILEGES" _) = OAuthError "Required permission missing"
98
mapError (XINGError "INSUFFICIENT_PRIVILEGES" _) = OAuthError "Required permission missing"
98
mapError (XINGError "INSUFFICIENT_PRIVILEGES" _) = OAuthError "Required permission missing"
98
false
false
0
7
15
20
9
11
null
null
phadej/stack
src/Stack/Types/Config.hs
bsd-3-clause
packageDatabaseLocal :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir) packageDatabaseLocal = do root <- installationRootLocal return $ root </> $(mkRelDir "pkgdb") -- | Extra package databases
227
packageDatabaseLocal :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir) packageDatabaseLocal = do root <- installationRootLocal return $ root </> $(mkRelDir "pkgdb") -- | Extra package databases
227
packageDatabaseLocal = do root <- installationRootLocal return $ root </> $(mkRelDir "pkgdb") -- | Extra package databases
131
false
true
0
10
39
71
35
36
null
null
lpsmith/blaze-builder-compat
src/Blaze/ByteString/Builder/Compat/Write.hs
bsd-3-clause
writePrimBounded :: BoundedPrim a -> a -> Write writePrimBounded be a = Write (sizeBound be) (Poke wio) where wio = runB be a
127
writePrimBounded :: BoundedPrim a -> a -> Write writePrimBounded be a = Write (sizeBound be) (Poke wio) where wio = runB be a
127
writePrimBounded be a = Write (sizeBound be) (Poke wio) where wio = runB be a
79
false
true
0
7
24
57
27
30
null
null
nimia/bottle
bottlelib/Graphics/UI/Bottle/EventMap.hs
gpl-3.0
filterByKey :: Ord k => (k -> Bool) -> Map k v -> Map k v filterByKey p = Map.filterWithKey (const . p)
103
filterByKey :: Ord k => (k -> Bool) -> Map k v -> Map k v filterByKey p = Map.filterWithKey (const . p)
103
filterByKey p = Map.filterWithKey (const . p)
45
false
true
0
9
22
62
29
33
null
null
alexander-at-github/eta
compiler/ETA/SimplCore/SimplEnv.hs
bsd-3-clause
mapFloats :: SimplEnv -> ((Id,CoreExpr) -> (Id,CoreExpr)) -> SimplEnv mapFloats env@SimplEnv { seFloats = Floats fs ff } fun = env { seFloats = Floats (mapOL app fs) ff } where app (NonRec b e) = case fun (b,e) of (b',e') -> NonRec b' e' app (Rec bs) = Rec (map fun bs) {- ****************************...
1,224
mapFloats :: SimplEnv -> ((Id,CoreExpr) -> (Id,CoreExpr)) -> SimplEnv mapFloats env@SimplEnv { seFloats = Floats fs ff } fun = env { seFloats = Floats (mapOL app fs) ff } where app (NonRec b e) = case fun (b,e) of (b',e') -> NonRec b' e' app (Rec bs) = Rec (map fun bs) {- ****************************...
1,224
mapFloats env@SimplEnv { seFloats = Floats fs ff } fun = env { seFloats = Floats (mapOL app fs) ff } where app (NonRec b e) = case fun (b,e) of (b',e') -> NonRec b' e' app (Rec bs) = Rec (map fun bs) {- ************************************************************************ * ...
1,154
false
true
0
10
383
156
82
74
null
null
shangaslammi/haskeroids-frp
Haskeroids/Initialize.hs
mit
initializeOpenGL = do -- Disable depth checking as we won't be needing it in 2D depthMask $= Disabled -- Nicer line drawing lineSmooth $= Enabled blend $= Enabled blendFunc $= (SrcAlpha,OneMinusSrcAlpha) lineWidth $= 2.0 -- Set up viewport viewport $= (Position 0 0, Si...
629
initializeOpenGL = do -- Disable depth checking as we won't be needing it in 2D depthMask $= Disabled -- Nicer line drawing lineSmooth $= Enabled blend $= Enabled blendFunc $= (SrcAlpha,OneMinusSrcAlpha) lineWidth $= 2.0 -- Set up viewport viewport $= (Position 0 0, Si...
629
initializeOpenGL = do -- Disable depth checking as we won't be needing it in 2D depthMask $= Disabled -- Nicer line drawing lineSmooth $= Enabled blend $= Enabled blendFunc $= (SrcAlpha,OneMinusSrcAlpha) lineWidth $= 2.0 -- Set up viewport viewport $= (Position 0 0, Si...
629
false
false
1
10
177
140
65
75
null
null
ImsungChoi/haskell-test
src/HW05Tests.hs
bsd-3-clause
-- All Tests ------------------------------------------- allTests :: [Test] allTests = ex1Tests
97
allTests :: [Test] allTests = ex1Tests
39
allTests = ex1Tests
20
true
true
0
7
11
22
10
12
null
null
Toxaris/nomyx-rules
src/Bank.hs
bsd-3-clause
handleBankAction AskForYourBalance src = do Just balance <- getValueOfPlayer src accounts when (balance > 1) $ do modifyValueOfPlayer src accounts (subtract 1) output "Our fee for asking is 1." src Just balance <- getValueOfPlayer src accounts output ("Your account balance is " ++ show balance ++ ".") ...
323
handleBankAction AskForYourBalance src = do Just balance <- getValueOfPlayer src accounts when (balance > 1) $ do modifyValueOfPlayer src accounts (subtract 1) output "Our fee for asking is 1." src Just balance <- getValueOfPlayer src accounts output ("Your account balance is " ++ show balance ++ ".") ...
323
handleBankAction AskForYourBalance src = do Just balance <- getValueOfPlayer src accounts when (balance > 1) $ do modifyValueOfPlayer src accounts (subtract 1) output "Our fee for asking is 1." src Just balance <- getValueOfPlayer src accounts output ("Your account balance is " ++ show balance ++ ".") ...
323
false
false
0
12
64
106
45
61
null
null
mortum5/programming
haskell/usefull/parser/errorcheck.hs
mit
showError (BadSpecialForm message form) = message ++ ": " ++ show form
70
showError (BadSpecialForm message form) = message ++ ": " ++ show form
70
showError (BadSpecialForm message form) = message ++ ": " ++ show form
70
false
false
0
6
11
29
13
16
null
null
ghc-android/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQ classD ctxt cls tvs fds decs = do decs1 <- sequence decs ctxt1 <- ctxt return $ ClassD ctxt1 cls tvs fds decs1
192
classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQ classD ctxt cls tvs fds decs = do decs1 <- sequence decs ctxt1 <- ctxt return $ ClassD ctxt1 cls tvs fds decs1
192
classD ctxt cls tvs fds decs = do decs1 <- sequence decs ctxt1 <- ctxt return $ ClassD ctxt1 cls tvs fds decs1
124
false
true
0
11
49
92
43
49
null
null
robeverest/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalOpenExp (Var idx) env _ = prjElt idx env
46
evalOpenExp (Var idx) env _ = prjElt idx env
46
evalOpenExp (Var idx) env _ = prjElt idx env
46
false
false
0
7
10
24
11
13
null
null
ocharles/virtual-dom
src/VirtualDom/HTML.hs
bsd-3-clause
button_ :: (Term arg result) => arg -> result button_ = term "button"
69
button_ :: (Term arg result) => arg -> result button_ = term "button"
69
button_ = term "button"
23
false
true
0
8
12
36
16
20
null
null
JeremyLWright/haskellbook
src/Reverse.hs
isc
taker :: String -> String -> [String] -> [String] taker (s:ss) acc list | ss == [] = packToFrontOfList accumulate | s == ' ' = taker ss "" (packToFrontOfList acc) | otherwise = taker ss accumulate list where accumulate = acc ++ [s] packToFrontOfList a = a : list
279
taker :: String -> String -> [String] -> [String] taker (s:ss) acc list | ss == [] = packToFrontOfList accumulate | s == ' ' = taker ss "" (packToFrontOfList acc) | otherwise = taker ss accumulate list where accumulate = acc ++ [s] packToFrontOfList a = a : list
279
taker (s:ss) acc list | ss == [] = packToFrontOfList accumulate | s == ' ' = taker ss "" (packToFrontOfList acc) | otherwise = taker ss accumulate list where accumulate = acc ++ [s] packToFrontOfList a = a : list
229
false
true
3
9
66
127
62
65
null
null
pellagic-puffbomb/simpleservantblog
src/Api/Admin/MediaAdmin.hs
bsd-3-clause
createMediaWithLoc :: T.Text -> FilePath -> Connection -> IO Int64 createMediaWithLoc name path conn = do let q = "insert into media (name, location, url) values (?, ?, ?)" execute conn q (name, urlFromFileLoc path, path)
225
createMediaWithLoc :: T.Text -> FilePath -> Connection -> IO Int64 createMediaWithLoc name path conn = do let q = "insert into media (name, location, url) values (?, ?, ?)" execute conn q (name, urlFromFileLoc path, path)
225
createMediaWithLoc name path conn = do let q = "insert into media (name, location, url) values (?, ?, ?)" execute conn q (name, urlFromFileLoc path, path)
158
false
true
0
10
39
72
33
39
null
null
mbakke/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
dtBlock :: String dtBlock = Types.diskTemplateToRaw DTBlock
59
dtBlock :: String dtBlock = Types.diskTemplateToRaw DTBlock
59
dtBlock = Types.diskTemplateToRaw DTBlock
41
false
true
0
6
6
16
8
8
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Advertisers/List.hs
mpl-2.0
-- | Select only advertisers with the specified status. allStatus :: Lens' AdvertisersList (Maybe AdvertisersListStatus) allStatus = lens _allStatus (\ s a -> s{_allStatus = a})
179
allStatus :: Lens' AdvertisersList (Maybe AdvertisersListStatus) allStatus = lens _allStatus (\ s a -> s{_allStatus = a})
123
allStatus = lens _allStatus (\ s a -> s{_allStatus = a})
58
true
true
0
9
27
48
25
23
null
null
sheganinans/plugins
src/System/Plugins/Parser.hs
lgpl-2.1
remove_spaces :: String -> String remove_spaces = reverse . dropWhile isSpace . reverse . dropWhile isSpace
107
remove_spaces :: String -> String remove_spaces = reverse . dropWhile isSpace . reverse . dropWhile isSpace
107
remove_spaces = reverse . dropWhile isSpace . reverse . dropWhile isSpace
73
false
true
0
8
15
33
16
17
null
null
tnrangwi/grill
src/Data/Sheet.hs
mit
changeCell :: L.Address -- ^ Cell address -> T.FormulaTree -- ^ Tree to add into cell -> Sheet -- ^ Sheet to update -> Sheet -- ^ Updated sheet -- FIXME: Set max updater for row and / or column to id, if nothing to do. -- Insert is quite more expensive then id and id will be sufficint i...
785
changeCell :: L.Address -- ^ Cell address -> T.FormulaTree -- ^ Tree to add into cell -> Sheet -- ^ Sheet to update -> Sheet changeCell a t s = RSheet $ rawsheet { sCells = Map.insert a t (sCells rawsheet) , sNrows = max (r + 1) (sNrows rawsheet) ...
609
changeCell a t s = RSheet $ rawsheet { sCells = Map.insert a t (sCells rawsheet) , sNrows = max (r + 1) (sNrows rawsheet) , sNcols = Map.insert r (max (c + 1) $ Map.findWithDefault 0 r nCols) nCols } where...
451
true
true
3
13
305
172
91
81
null
null
stla/jsonxlsx
src/ReadXLSX/SheetToDataframe.hs
bsd-3-clause
cellFormatter :: StyleSheet -> (Cell -> Value) cellFormatter stylesheet cell = if isDate cell stylesheet then case _cellValue cell of Just (CellDouble x) -> String (intToDate $ round x) Nothing -> Null _ -> String "anomalous date detected!" -- pb file Wa...
360
cellFormatter :: StyleSheet -> (Cell -> Value) cellFormatter stylesheet cell = if isDate cell stylesheet then case _cellValue cell of Just (CellDouble x) -> String (intToDate $ round x) Nothing -> Null _ -> String "anomalous date detected!" -- pb file Wa...
360
cellFormatter stylesheet cell = if isDate cell stylesheet then case _cellValue cell of Just (CellDouble x) -> String (intToDate $ round x) Nothing -> Null _ -> String "anomalous date detected!" -- pb file Walter else cellToCellValue cell
313
false
true
0
12
120
94
46
48
null
null
petertseng/adventofcode-hs
bin/09_hamiltonian.hs
apache-2.0
distances :: [Distance] -> DistanceMap distances = Map.fromList . concatMap pairs where pairs (a, b, d) = [((a, b), d), ((b, a), d)]
134
distances :: [Distance] -> DistanceMap distances = Map.fromList . concatMap pairs where pairs (a, b, d) = [((a, b), d), ((b, a), d)]
134
distances = Map.fromList . concatMap pairs where pairs (a, b, d) = [((a, b), d), ((b, a), d)]
95
false
true
0
7
24
76
45
31
null
null
phischu/pipes-gremlin
src/Database/PipesGremlin/Internal.hs
bsd-3-clause
previous :: (Monad m) => Node -> PG m Node previous = inEdge >=> source
71
previous :: (Monad m) => Node -> PG m Node previous = inEdge >=> source
71
previous = inEdge >=> source
28
false
true
2
8
14
41
19
22
null
null
fpco/hlint
data/Default.hs
bsd-3-clause
error = foldl (||) False ==> or where note = IncreasesLaziness
63
error = foldl (||) False ==> or where note = IncreasesLaziness
63
error = foldl (||) False ==> or where note = IncreasesLaziness
63
false
false
0
6
11
24
13
11
null
null
edsko/hackage-server
Distribution/Server/Prelude.hs
bsd-3-clause
-- | See "Data.List" starting with @base-4.8.0.0@ sortOn :: Ord b => (a -> b) -> [a] -> [a] sortOn f = map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x))
179
sortOn :: Ord b => (a -> b) -> [a] -> [a] sortOn f = map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x))
129
sortOn f = map snd . sortBy (comparing fst) . map (\x -> let y = f x in y `seq` (y, x))
87
true
true
1
13
41
106
53
53
null
null
NightRa/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
bcc i (ASSIGNCONST l c) = indent i ++ creg l ++ " = " ++ mkConst c ++ ";\n" where mkConst (I i) = "MKINT(" ++ show i ++ ")" mkConst (BI i) | i < (2^30) = "MKINT(" ++ show i ++ ")" | otherwise = "MKBIGC(vm,\"" ++ show i ++ "\")" mkConst (Fl f) = "MKFLOAT(vm, " ++ show f ++ ")" mk...
996
bcc i (ASSIGNCONST l c) = indent i ++ creg l ++ " = " ++ mkConst c ++ ";\n" where mkConst (I i) = "MKINT(" ++ show i ++ ")" mkConst (BI i) | i < (2^30) = "MKINT(" ++ show i ++ ")" | otherwise = "MKBIGC(vm,\"" ++ show i ++ "\")" mkConst (Fl f) = "MKFLOAT(vm, " ++ show f ++ ")" mk...
996
bcc i (ASSIGNCONST l c) = indent i ++ creg l ++ " = " ++ mkConst c ++ ";\n" where mkConst (I i) = "MKINT(" ++ show i ++ ")" mkConst (BI i) | i < (2^30) = "MKINT(" ++ show i ++ ")" | otherwise = "MKBIGC(vm,\"" ++ show i ++ "\")" mkConst (Fl f) = "MKFLOAT(vm, " ++ show f ++ ")" mk...
996
false
false
0
10
268
359
170
189
null
null
zachsully/hakaru
haskell/Language/Hakaru/Pretty/Maple.hs
bsd-3-clause
parens :: ShowS -> ShowS parens a = showChar '(' . a . showChar ')'
67
parens :: ShowS -> ShowS parens a = showChar '(' . a . showChar ')'
67
parens a = showChar '(' . a . showChar ')'
42
false
true
0
7
14
32
15
17
null
null
younggi/books
haskellbook/practices/learn.hs
mit
-- First, we declare the name of our module so -- it can be imported by name in a project. -- We won't be doing a project of this size -- for a while yet. x = 10 * 5 + y
173
x = 10 * 5 + y
14
x = 10 * 5 + y
14
true
false
4
5
45
24
11
13
null
null
ml9951/ghc
compiler/main/DynFlags.hs
bsd-3-clause
optIntSuffixM :: (Maybe Int -> DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags) optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))
156
optIntSuffixM :: (Maybe Int -> DynFlags -> DynP DynFlags) -> OptKind (CmdLineP DynFlags) optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))
156
optIntSuffixM fn = OptIntSuffix (\mi -> updM (fn mi))
53
false
true
0
10
35
68
32
36
null
null
zaxtax/hakaru
haskell/Tests/TestTools.hs
bsd-3-clause
ignore :: a -> Assertion ignore _ = assertFailure "ignored"
59
ignore :: a -> Assertion ignore _ = assertFailure "ignored"
59
ignore _ = assertFailure "ignored"
34
false
true
0
5
9
21
10
11
null
null
michaelt/text-pipes
Pipes/Text.hs
bsd-3-clause
-- | Apply a transformation to each 'Char' in the stream -- >>> let margaret = ["Margaret, are you grieving\nOver Golde","ngrove unleaving?":: Text] -- >>> TL.putStrLn . toLazy $ each margaret >-> map Data.Char.toUpper -- MARGARET, ARE YOU GRIEVING -- OVER GOLDENGROVE UNLEAVING? map :: (Monad m) => (Char -> Char) -> ...
362
map :: (Monad m) => (Char -> Char) -> Pipe Text Text m r map f = P.map (T.map f)
80
map f = P.map (T.map f)
23
true
true
0
8
64
64
34
30
null
null
mariefarrell/Hets
Maude/PreComorphism.hs
gpl-2.0
getVarsTerm (CAS.Mixfix_parenthesized ts _) = foldr (Map.unionWith Set.union . getVarsTerm) Map.empty ts
108
getVarsTerm (CAS.Mixfix_parenthesized ts _) = foldr (Map.unionWith Set.union . getVarsTerm) Map.empty ts
108
getVarsTerm (CAS.Mixfix_parenthesized ts _) = foldr (Map.unionWith Set.union . getVarsTerm) Map.empty ts
108
false
false
0
9
15
44
20
24
null
null
Heather/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
-- | Helper function for extractPTermNames extractPArg :: PArg -> [Name] extractPArg (PImp {pname=n, getTm=p}) = n : extract p
126
extractPArg :: PArg -> [Name] extractPArg (PImp {pname=n, getTm=p}) = n : extract p
83
extractPArg (PImp {pname=n, getTm=p}) = n : extract p
53
true
true
5
8
19
55
27
28
null
null
hephaestus-pl/hephaestus
alexandre/feature-modeling/trouble-deps/funsat-0.6.2/tests/Properties.hs
mit
anyA :: (IArray a e, Ix i) => (e -> Bool) -> a i e -> Bool anyA p a = any (p . (a !)) (range . bounds $ a)
106
anyA :: (IArray a e, Ix i) => (e -> Bool) -> a i e -> Bool anyA p a = any (p . (a !)) (range . bounds $ a)
106
anyA p a = any (p . (a !)) (range . bounds $ a)
47
false
true
0
8
30
80
42
38
null
null
yliu120/K3
examples/algorithms/kmeans/gen_k3_data.hs
apache-2.0
main :: IO () main = do floats <- parse_floats <$> readFile filename collections <- return $ map gen_k3_vector floats mapM_ putStrLn collections
155
main :: IO () main = do floats <- parse_floats <$> readFile filename collections <- return $ map gen_k3_vector floats mapM_ putStrLn collections
155
main = do floats <- parse_floats <$> readFile filename collections <- return $ map gen_k3_vector floats mapM_ putStrLn collections
141
false
true
0
9
33
54
24
30
null
null
Teaspot-Studio/gore-and-ash-network
src/Game/GoreAndAsh/Network/Backend/TCP.hs
bsd-3-clause
-- | Request remains from previous receive requestRemains :: BackendRegistry -> ConnectionId -> IO ByteString requestRemains BackendRegistry{..} cid = do m <- readIORef serverRemainder return $ fromMaybe mempty $ M.lookup cid m -- | Store remains from read for peer
270
requestRemains :: BackendRegistry -> ConnectionId -> IO ByteString requestRemains BackendRegistry{..} cid = do m <- readIORef serverRemainder return $ fromMaybe mempty $ M.lookup cid m -- | Store remains from read for peer
227
requestRemains BackendRegistry{..} cid = do m <- readIORef serverRemainder return $ fromMaybe mempty $ M.lookup cid m -- | Store remains from read for peer
160
true
true
0
9
44
66
31
35
null
null
palf/free-driver
apps/test/Test/Drive/Basics03.hs
bsd-3-clause
assertSimpleAndComplexGiveSameResult :: IO () assertSimpleAndComplexGiveSameResult = do x <- runSimple 4 triple y <- runComplex 4 (multiply 3) x @=? y
156
assertSimpleAndComplexGiveSameResult :: IO () assertSimpleAndComplexGiveSameResult = do x <- runSimple 4 triple y <- runComplex 4 (multiply 3) x @=? y
156
assertSimpleAndComplexGiveSameResult = do x <- runSimple 4 triple y <- runComplex 4 (multiply 3) x @=? y
110
false
true
0
10
26
53
24
29
null
null
roman/ai-class-haskell
src/Lesson2/BFS/Parser.hs
mit
comma = char ','
16
comma = char ','
16
comma = char ','
16
false
false
1
5
3
13
4
9
null
null
wtanaka/haskell
NinetyNine.hs
gpl-3.0
myLast (x : []) = x
19
myLast (x : []) = x
19
myLast (x : []) = x
19
false
false
0
8
5
18
9
9
null
null
mietek/stack
src/Stack/Types/BuildPlan.hs
bsd-3-clause
renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d
58
renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d
58
renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d
58
false
false
0
7
9
28
13
15
null
null
jml/haskell-spake2
src/Crypto/Spake2/Groups/Ed25519.hs
apache-2.0
{- Note: [Extended coordinates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jml only partly understands these. Here's that understanding. The underlying elliptic curve is two-dimensional. These are the AffinePoints. We project that curve into a 4-dimensional space, i.e. to the ExtendedPoints. Doing so makes some of the arithmetic ...
1,264
affineToExtended :: AffinePoint -> ExtendedPoint 'Unknown affineToExtended AffinePoint{x, y} = ExtendedPoint { x = x `mod` q , y = y `mod` q , z = 1 , t = (x * y) `mod` q }
184
affineToExtended AffinePoint{x, y} = ExtendedPoint { x = x `mod` q , y = y `mod` q , z = 1 , t = (x * y) `mod` q }
126
true
true
14
9
215
108
53
55
null
null
sinelaw/lamdu
Lamdu/Data/Expression/Lens.hs
gpl-3.0
exprGetVariable :: Lens.Traversal' (Expression def a) (VariableRef def) exprGetVariable = eBody . bodyGetVariable
115
exprGetVariable :: Lens.Traversal' (Expression def a) (VariableRef def) exprGetVariable = eBody . bodyGetVariable
115
exprGetVariable = eBody . bodyGetVariable
41
false
true
1
8
14
43
19
24
null
null
rueshyna/gogol
gogol-admin-reports/gen/Network/Google/Reports/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Channel' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cResourceURI' -- -- * 'cResourceId' -- -- * 'cKind' -- -- * 'cExpiration' -- -- * 'cToken' -- -- * 'cAddress' -- -- * 'cPayload' -- -- * 'cParams' -- --...
658
channel :: Channel channel = Channel' { _cResourceURI = Nothing , _cResourceId = Nothing , _cKind = "api#channel" , _cExpiration = Nothing , _cToken = Nothing , _cAddress = Nothing , _cPayload = Nothing , _cParams = Nothing , _cId = Nothing , _cType = Nothing }
313
channel = Channel' { _cResourceURI = Nothing , _cResourceId = Nothing , _cKind = "api#channel" , _cExpiration = Nothing , _cToken = Nothing , _cAddress = Nothing , _cPayload = Nothing , _cParams = Nothing , _cId = Nothing , _cType = Nothing }
290
true
true
0
7
168
106
72
34
null
null
NorfairKing/super-user-spark
test/SuperUserSpark/DiagnoseSpec.hs
mit
instanceSpec :: Spec instanceSpec = do eqSpec @CheckSettings genValidSpec @CheckSettings eqSpec @Diagnostics genValidSpec @Diagnostics eqSpec @DiagnosedFp genValidSpec @DiagnosedFp eqSpec @DiagnosedDeployment genValidSpec @DiagnosedDeployment
274
instanceSpec :: Spec instanceSpec = do eqSpec @CheckSettings genValidSpec @CheckSettings eqSpec @Diagnostics genValidSpec @Diagnostics eqSpec @DiagnosedFp genValidSpec @DiagnosedFp eqSpec @DiagnosedDeployment genValidSpec @DiagnosedDeployment
274
instanceSpec = do eqSpec @CheckSettings genValidSpec @CheckSettings eqSpec @Diagnostics genValidSpec @Diagnostics eqSpec @DiagnosedFp genValidSpec @DiagnosedFp eqSpec @DiagnosedDeployment genValidSpec @DiagnosedDeployment
253
false
true
0
8
53
75
30
45
null
null
zaquest/redflare
src/Network/RedEclipse/RedFlare.hs
mit
listOf :: [a] -> Parser [a] listOf xs = map fst . filter snd . zip xs . bits <$> reInt
86
listOf :: [a] -> Parser [a] listOf xs = map fst . filter snd . zip xs . bits <$> reInt
86
listOf xs = map fst . filter snd . zip xs . bits <$> reInt
58
false
true
0
9
20
52
25
27
null
null
mcmaniac/hs-jquery
src/Language/JQuery/Functions.hs
bsd-3-clause
-- | The typical jQuery chain operator: -- -- > jQuery ".button" $ setCSS "display" "block" -- > ~> setHTML (toHtml "Click me!") -- > ~> addClass "visible" (~>) :: JQueryStmts a -> JQueryStmts b -> JQueryStmts b (~>) = JQSs_chain
261
(~>) :: JQueryStmts a -> JQueryStmts b -> JQueryStmts b (~>) = JQSs_chain
73
(~>) = JQSs_chain
17
true
true
0
8
72
43
23
20
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp IndexByteArrayOp_Word8 = _ILIT(193)
48
tagOf_PrimOp IndexByteArrayOp_Word8 = _ILIT(193)
48
tagOf_PrimOp IndexByteArrayOp_Word8 = _ILIT(193)
48
false
false
0
6
3
16
7
9
null
null
aleator/bindings-dc1394
Examples/HelloWorld.hs
bsd-3-clause
saveClip c = enumCamera c $$ (E.isolate 10 =$ save)
51
saveClip c = enumCamera c $$ (E.isolate 10 =$ save)
51
saveClip c = enumCamera c $$ (E.isolate 10 =$ save)
51
false
false
0
9
9
28
13
15
null
null
holmisen/hrunner
src/hrunner.hs
gpl-3.0
tryPaths (p:ps) = do putStrLn ("Trying " ++ p) ifM (doesFileExist p `andM` (executable <$> getPermissions p)) (return $ Just p) (tryPaths ps)
157
tryPaths (p:ps) = do putStrLn ("Trying " ++ p) ifM (doesFileExist p `andM` (executable <$> getPermissions p)) (return $ Just p) (tryPaths ps)
157
tryPaths (p:ps) = do putStrLn ("Trying " ++ p) ifM (doesFileExist p `andM` (executable <$> getPermissions p)) (return $ Just p) (tryPaths ps)
157
false
false
0
12
38
78
38
40
null
null
markusle/archy
src/DisplayFunctions.hs
gpl-3.0
show_updates (x:xs) = do print_package_name (name x) if installedVersion x /= availableVersion x then do putColorStrLn Red outOfDateMsg show_updates xs else do putColorStrLn Green uptoDateMsg show_updates xs where print_package_name :: String -> IO () p...
746
show_updates (x:xs) = do print_package_name (name x) if installedVersion x /= availableVersion x then do putColorStrLn Red outOfDateMsg show_updates xs else do putColorStrLn Green uptoDateMsg show_updates xs where print_package_name :: String -> IO () p...
746
show_updates (x:xs) = do print_package_name (name x) if installedVersion x /= availableVersion x then do putColorStrLn Red outOfDateMsg show_updates xs else do putColorStrLn Green uptoDateMsg show_updates xs where print_package_name :: String -> IO () p...
746
false
false
4
12
224
200
93
107
null
null
dmcclean/HaTeX
Text/LaTeX/Packages/Babel.hs
bsd-3-clause
-- | The function 'foreignlanguage' takes two arguments; the second argument is a -- phrase to be typeset according to the rules of the language named in its first -- argument. foreignlanguage :: LaTeXC l => Language -> l -> l foreignlanguage ln = liftL $ \l -> TeXComm "foreignlanguage" [OptArg $ texy ln, FixArg l]
320
foreignlanguage :: LaTeXC l => Language -> l -> l foreignlanguage ln = liftL $ \l -> TeXComm "foreignlanguage" [OptArg $ texy ln, FixArg l]
139
foreignlanguage ln = liftL $ \l -> TeXComm "foreignlanguage" [OptArg $ texy ln, FixArg l]
89
true
true
0
10
59
62
32
30
null
null
cabrera/elerea
FRP/Elerea/Experimental.hs
bsd-3-clause
-- | Point-wise OR of two boolean signals. (||@) :: Signal p Bool -> Signal p Bool -> Signal p Bool s1 ||@ s2 = s1 >>= \b -> if b then return True else s2
154
(||@) :: Signal p Bool -> Signal p Bool -> Signal p Bool s1 ||@ s2 = s1 >>= \b -> if b then return True else s2
111
s1 ||@ s2 = s1 >>= \b -> if b then return True else s2
54
true
true
0
8
35
63
32
31
null
null
kumasento/accelerate
Data/Array/Accelerate/Trafo/Algebra.hs
bsd-3-clause
evalGt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = eval2 (>)
89
evalGt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = eval2 (>)
89
evalGt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = eval2 (>)
89
false
false
0
9
29
33
15
18
null
null
nfjinjing/bench-euler
src/Math/QQ.hs
bsd-3-clause
-- reduce to lowest terms - assumes y > 0 toQ' x y = Q (x `quot` d) (y `quot` d) where d = gcd x y
101
toQ' x y = Q (x `quot` d) (y `quot` d) where d = gcd x y
58
toQ' x y = Q (x `quot` d) (y `quot` d) where d = gcd x y
58
true
false
0
7
29
48
26
22
null
null
d-day/relation
include/pointfree-style/pointfree-1.0.4.3/Plugin/Pl/Rules.hs
bsd-3-clause
hasHole (Quote _) _ = False
29
hasHole (Quote _) _ = False
29
hasHole (Quote _) _ = False
29
false
false
0
7
7
17
8
9
null
null
gencer/bond
compiler/src/Language/Bond/Codegen/Util.hs
mit
-- | Separates elements of a list with new lines, beginning with a new line. -- Starts new lines at the specified indentation level. newlineBeginSep = sepBeginBy . newLine
171
newlineBeginSep = sepBeginBy . newLine
38
newlineBeginSep = sepBeginBy . newLine
38
true
false
0
5
28
12
7
5
null
null
traeger/fol-solver
Folsolver/Normalform/OperatorNF.hs
gpl-3.0
onlyCDN (:&:) left right = left .&. right
44
onlyCDN (:&:) left right = left .&. right
44
onlyCDN (:&:) left right = left .&. right
44
false
false
1
5
10
24
10
14
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 2630257 = 3911
34
getValueFromProduct 2630257 = 3911
34
getValueFromProduct 2630257 = 3911
34
false
false
0
5
3
9
4
5
null
null
coreyoconnor/ansi-terminal
System/Console/ANSI/Windows/Foreign.hs
bsd-3-clause
charToWCHAR :: Char -> WCHAR charToWCHAR char = fromIntegral (ord char)
71
charToWCHAR :: Char -> WCHAR charToWCHAR char = fromIntegral (ord char)
71
charToWCHAR char = fromIntegral (ord char)
42
false
true
0
7
10
27
13
14
null
null
kim/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateLayer.hs
mpl-2.0
-- | Whether to install operating system and package updates when the instance -- boots. The default value is 'true'. To control when updates are installed, set -- this value to 'false'. You must then update your instances manually by using 'CreateDeployment' to run the 'update_dependencies' stack command or manually r...
685
clInstallUpdatesOnBoot :: Lens' CreateLayer (Maybe Bool) clInstallUpdatesOnBoot = lens _clInstallUpdatesOnBoot (\s a -> s { _clInstallUpdatesOnBoot = a })
158
clInstallUpdatesOnBoot = lens _clInstallUpdatesOnBoot (\s a -> s { _clInstallUpdatesOnBoot = a })
101
true
true
0
9
107
54
33
21
null
null
nukisman/elm-format-short
src/ElmFormat/Filesystem.hs
bsd-3-clause
doesDirectoryExist :: FileStore f => FilePath -> Free f Bool doesDirectoryExist path = do fileType <- stat path case fileType of IsDirectory -> return True _ -> return False
217
doesDirectoryExist :: FileStore f => FilePath -> Free f Bool doesDirectoryExist path = do fileType <- stat path case fileType of IsDirectory -> return True _ -> return False
217
doesDirectoryExist path = do fileType <- stat path case fileType of IsDirectory -> return True _ -> return False
156
false
true
0
10
72
65
29
36
null
null
scslab/hails
Hails/Web/Responses.hs
mit
badRequest :: Response badRequest = mkHtmlResponse status400 [] html where html = L8.concat [L8.pack "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\ \<HTML><HEAD>\n\ \<TITLE>400 Bad Request</TITLE>\n\ \</HEAD><BODY>\n\ \<H1>Ba...
553
badRequest :: Response badRequest = mkHtmlResponse status400 [] html where html = L8.concat [L8.pack "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\ \<HTML><HEAD>\n\ \<TITLE>400 Bad Request</TITLE>\n\ \</HEAD><BODY>\n\ \<H1>Ba...
553
badRequest = mkHtmlResponse status400 [] html where html = L8.concat [L8.pack "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\ \<HTML><HEAD>\n\ \<TITLE>400 Bad Request</TITLE>\n\ \</HEAD><BODY>\n\ \<H1>Bad Request</H1>\n\ ...
530
false
true
0
8
172
43
22
21
null
null
smunix/shared-buffer
tests/Writer.hs
bsd-3-clause
main :: IO () main = do wb <- createBuffer "/abuf" "/abuf" 4 384 :: IO (WriteBuffer Int) mapM_ (putBuffer wb) [1..16] removeBuffer wb
145
main :: IO () main = do wb <- createBuffer "/abuf" "/abuf" 4 384 :: IO (WriteBuffer Int) mapM_ (putBuffer wb) [1..16] removeBuffer wb
145
main = do wb <- createBuffer "/abuf" "/abuf" 4 384 :: IO (WriteBuffer Int) mapM_ (putBuffer wb) [1..16] removeBuffer wb
131
false
true
0
11
35
75
33
42
null
null
Happy0/snowdrift
Model/User.hs
agpl-3.0
userUnwatchProjectDB :: UserId -> ProjectId -> DB () userUnwatchProjectDB user_id project_id = do delete_watching delete_comment_views delete_wiki_edit_views where delete_watching = deleteBy (UniqueUserWatchingProject user_id project_id) delete_comment_views = delete_wiki_page_comment_views ...
765
userUnwatchProjectDB :: UserId -> ProjectId -> DB () userUnwatchProjectDB user_id project_id = do delete_watching delete_comment_views delete_wiki_edit_views where delete_watching = deleteBy (UniqueUserWatchingProject user_id project_id) delete_comment_views = delete_wiki_page_comment_views ...
765
userUnwatchProjectDB user_id project_id = do delete_watching delete_comment_views delete_wiki_edit_views where delete_watching = deleteBy (UniqueUserWatchingProject user_id project_id) delete_comment_views = delete_wiki_page_comment_views delete_wiki_page_comment_views = fetchProjectDiscussi...
712
false
true
0
15
161
191
97
94
null
null
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer/Comments.hs
mit
readBlock' ('\n':xs) row _ comment = readBlock' xs (row + 1) 1 (comment "\n" ++)
85
readBlock' ('\n':xs) row _ comment = readBlock' xs (row + 1) 1 (comment "\n" ++)
85
readBlock' ('\n':xs) row _ comment = readBlock' xs (row + 1) 1 (comment "\n" ++)
85
false
false
0
7
19
45
23
22
null
null
tmcdonell/accelerate-cuda
Data/Array/Accelerate/CUDA/Context.hs
bsd-3-clause
deviceInfo :: CUDA.Device -> CUDA.DeviceProperties -> String deviceInfo dev prp = render $ reset <> devID <> colon <+> vcat [ name <+> parens compute , processors <+> at <+> text clock <+> parens cores <> comma <+> memory ] where name = text (CUDA.devic...
1,052
deviceInfo :: CUDA.Device -> CUDA.DeviceProperties -> String deviceInfo dev prp = render $ reset <> devID <> colon <+> vcat [ name <+> parens compute , processors <+> at <+> text clock <+> parens cores <> comma <+> memory ] where name = text (CUDA.devic...
1,052
deviceInfo dev prp = render $ reset <> devID <> colon <+> vcat [ name <+> parens compute , processors <+> at <+> text clock <+> parens cores <> comma <+> memory ] where name = text (CUDA.deviceName prp) compute = text "compute capatability" <+> ...
991
false
true
9
14
325
319
157
162
null
null
linzhp/Language-GLSL
src/Language/C/Syntax/Constants.hs
bsd-3-clause
_showWideFlag :: Bool -> ShowS _showWideFlag flag = if flag then showString "L" else id
87
_showWideFlag :: Bool -> ShowS _showWideFlag flag = if flag then showString "L" else id
87
_showWideFlag flag = if flag then showString "L" else id
56
false
true
0
6
14
29
15
14
null
null
anniecherk/pyschocnf
src/Testers.hs
bsd-3-clause
--------- Testing ! ------------------------------------------------------------ testHalfAdderDIMACS :: [String] testHalfAdderDIMACS = map (`showDIMACS` 4) testHalfAdderConstraints where testHalfAdderConstraints :: [CNF] testHalfAdderConstraints = map (\x-> adderConstraints ++ andCNF [head x] ++ andCNF [(he...
515
testHalfAdderDIMACS :: [String] testHalfAdderDIMACS = map (`showDIMACS` 4) testHalfAdderConstraints where testHalfAdderConstraints :: [CNF] testHalfAdderConstraints = map (\x-> adderConstraints ++ andCNF [head x] ++ andCNF [(head . tail) x]) allInputs where adderConstraints = snd $ execState (halfAd...
432
testHalfAdderDIMACS = map (`showDIMACS` 4) testHalfAdderConstraints where testHalfAdderConstraints :: [CNF] testHalfAdderConstraints = map (\x-> adderConstraints ++ andCNF [head x] ++ andCNF [(head . tail) x]) allInputs where adderConstraints = snd $ execState (halfAdder 1 2) $ initState 2 ...
400
true
true
1
13
98
152
84
68
null
null
AndreasVoellmy/nettle-openflow
src/Network/Data/OpenFlow/Switch.hs
bsd-3-clause
showSwID :: SwitchID -> String showSwID sid = "0x" ++ showHex sid ""
68
showSwID :: SwitchID -> String showSwID sid = "0x" ++ showHex sid ""
68
showSwID sid = "0x" ++ showHex sid ""
37
false
true
2
7
12
33
14
19
null
null