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
apyrgio/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pIgnoreRemoveFailures :: Field pIgnoreRemoveFailures = withDoc "Whether to ignore failures while removing instances" $ defaultFalse "ignore_remove_failures"
160
pIgnoreRemoveFailures :: Field pIgnoreRemoveFailures = withDoc "Whether to ignore failures while removing instances" $ defaultFalse "ignore_remove_failures"
160
pIgnoreRemoveFailures = withDoc "Whether to ignore failures while removing instances" $ defaultFalse "ignore_remove_failures"
129
false
true
0
6
19
21
10
11
null
null
glguy/set-game
src/SetGame.hs
bsd-3-clause
setControl :: CurrentControl -> Interface -> Interface setControl x i = i { iControl = x }
90
setControl :: CurrentControl -> Interface -> Interface setControl x i = i { iControl = x }
90
setControl x i = i { iControl = x }
35
false
true
0
6
16
32
17
15
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | Output only. The \"resource name\" of the autoscaling policy, as -- described in https:\/\/cloud.google.com\/apis\/design\/resource_names. -- For projects.regions.autoscalingPolicies, the resource name of the -- policy has the following format: -- projects\/{project_id}\/regions\/{region}\/autoscalingPolicies\/{po...
614
apName :: Lens' AutoscalingPolicy (Maybe Text) apName = lens _apName (\ s a -> s{_apName = a})
94
apName = lens _apName (\ s a -> s{_apName = a})
47
true
true
0
9
64
53
32
21
null
null
johnpmayer/concurrent-rtree
Data/RTree/Internal/RTree.hs
agpl-3.0
insert :: R a => RConfig -> Bounded a (KeyT a) -> RTree n a -> STM (RInsert n a) insert cfg boundedTarget node = case node of Leaf vecVar -> do vec <- readTVar vecVar let jTarget = Bounded (getBounds boundedTarget) $ Just (getElem boundedTarget) smoosh = V.cons jTarget vec case ...
1,032
insert :: R a => RConfig -> Bounded a (KeyT a) -> RTree n a -> STM (RInsert n a) insert cfg boundedTarget node = case node of Leaf vecVar -> do vec <- readTVar vecVar let jTarget = Bounded (getBounds boundedTarget) $ Just (getElem boundedTarget) smoosh = V.cons jTarget vec case ...
1,032
insert cfg boundedTarget node = case node of Leaf vecVar -> do vec <- readTVar vecVar let jTarget = Bounded (getBounds boundedTarget) $ Just (getElem boundedTarget) smoosh = V.cons jTarget vec case checkInsertVec cfg smoosh of VecInsert newVec -> do writeTVar vecVar ...
945
false
true
0
20
314
343
158
185
null
null
erikd/hs-tls
core/Network/TLS/Crypto/IES.hs
bsd-3-clause
groupGetPubShared (GroupPub_X448 pub) = first GroupPub_X448 <$> deriveEncrypt x448 pub
90
groupGetPubShared (GroupPub_X448 pub) = first GroupPub_X448 <$> deriveEncrypt x448 pub
90
groupGetPubShared (GroupPub_X448 pub) = first GroupPub_X448 <$> deriveEncrypt x448 pub
90
false
false
0
7
13
27
12
15
null
null
voidlizard/emufat
src/FatGen.hs
bsd-3-clause
hex32 :: Word32 -> String hex32 x = printf "%08X" (fromIntegral x :: Int)
73
hex32 :: Word32 -> String hex32 x = printf "%08X" (fromIntegral x :: Int)
73
hex32 x = printf "%08X" (fromIntegral x :: Int)
47
false
true
0
7
13
32
16
16
null
null
apyrgio/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
bsd-2-clause
-- | Use Hbal's iterateDepth to simulate group rebalance. executeSimulation :: Options -> Cluster.Table -> Double -> Gdx -> Node.List -> Instance.List -> IO GroupInfo executeSimulation opts ini_tbl min_cv gidx nl il = do let imlen = maximum . map (length . Instance.alias) $ Contain...
734
executeSimulation :: Options -> Cluster.Table -> Double -> Gdx -> Node.List -> Instance.List -> IO GroupInfo executeSimulation opts ini_tbl min_cv gidx nl il = do let imlen = maximum . map (length . Instance.alias) $ Container.elems il nmlen = maximum . map (length . Node.ali...
676
executeSimulation opts ini_tbl min_cv gidx nl il = do let imlen = maximum . map (length . Instance.alias) $ Container.elems il nmlen = maximum . map (length . Node.alias) $ Container.elems nl (fin_tbl, _) <- Hbal.iterateDepth False (fromCLIOptions opts) ini_tbl (optMaxLeng...
531
true
true
0
15
218
211
105
106
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
pithily = id
12
pithily = id
12
pithily = id
12
false
false
0
4
2
6
3
3
null
null
kishoredbn/barrelfish
tools/flounder/THCBackend.hs
mit
call_ooo_signature :: String -> MessageDef -> C.Unit call_ooo_signature ifname m@(RPC s args _) = let name = call_ooo_sig_type ifname m binding = C.Param (C.Ptr $ C.TypeName $ intf_bind_type ifname "client") intf_bind_var params = [ binding ] ++ concat [ rpc_call_argdecl ifname a |...
436
call_ooo_signature :: String -> MessageDef -> C.Unit call_ooo_signature ifname m@(RPC s args _) = let name = call_ooo_sig_type ifname m binding = C.Param (C.Ptr $ C.TypeName $ intf_bind_type ifname "client") intf_bind_var params = [ binding ] ++ concat [ rpc_call_argdecl ifname a |...
436
call_ooo_signature ifname m@(RPC s args _) = let name = call_ooo_sig_type ifname m binding = C.Param (C.Ptr $ C.TypeName $ intf_bind_type ifname "client") intf_bind_var params = [ binding ] ++ concat [ rpc_call_argdecl ifname a | a <- (tail (tail args)) ] in C.TypeDef (C....
383
false
true
0
17
106
164
81
83
null
null
apyrgio/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
esScriptRemove :: String esScriptRemove = esActionRemove
56
esScriptRemove :: String esScriptRemove = esActionRemove
56
esScriptRemove = esActionRemove
31
false
true
0
4
5
11
6
5
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/GT_2.hs
mit
primMulNat Zero (Succ y) = Zero
31
primMulNat Zero (Succ y) = Zero
31
primMulNat Zero (Succ y) = Zero
31
false
false
0
6
5
19
8
11
null
null
ezyang/ghc
testsuite/tests/simplCore/should_run/T13429_2.hs
bsd-3-clause
arr2 :: Array D Int Int -> Array D Int Int arr2 arr = Array.map (*2) arr
72
arr2 :: Array D Int Int -> Array D Int Int arr2 arr = Array.map (*2) arr
72
arr2 arr = Array.map (*2) arr
29
false
true
0
6
16
43
21
22
null
null
Ofenhed/virt-start
xmonad.hs
mit
lockNowCmd = ["i3lock-dpms", "--color=000000", "--ignore-empty-password", "--show-failed-attempts"]
99
lockNowCmd = ["i3lock-dpms", "--color=000000", "--ignore-empty-password", "--show-failed-attempts"]
99
lockNowCmd = ["i3lock-dpms", "--color=000000", "--ignore-empty-password", "--show-failed-attempts"]
99
false
false
1
5
5
21
11
10
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x1FC8' = "\x0395\x0300"
39
decomposeChar '\x1FC8' = "\x0395\x0300"
39
decomposeChar '\x1FC8' = "\x0395\x0300"
39
false
false
0
5
3
9
4
5
null
null
zephyr-dev/flow-api
src/PivotalTracker/Label.hs
mit
updateLabelsOnStories :: World m => String -> [PivotalStory] -> ReaderT Environment m () updateLabelsOnStories label stories = mapM_ (updateLabels label) stories
163
updateLabelsOnStories :: World m => String -> [PivotalStory] -> ReaderT Environment m () updateLabelsOnStories label stories = mapM_ (updateLabels label) stories
161
updateLabelsOnStories label stories = mapM_ (updateLabels label) stories
72
false
true
0
9
22
58
27
31
null
null
PipocaQuemada/ermine
src/Ermine/Loader/Core.hs
bsd-2-clause
-- | A loader that only loads each value once, always telling the -- caller that the old value is fresh enough on each subsequent -- reload. permCachedLoader :: Applicative m => (a -> m b) -> Loader () m a b permCachedLoader f = Loader (fmap ((),) . f) (const . const $ pure Nothing)
311
permCachedLoader :: Applicative m => (a -> m b) -> Loader () m a b permCachedLoader f = Loader (fmap ((),) . f) (const . const $ pure Nothing)
170
permCachedLoader f = Loader (fmap ((),) . f) (const . const $ pure Nothing)
103
true
true
0
10
83
84
43
41
null
null
input-output-hk/daedalus
installers/DarwinLauncher.hs
apache-2.0
tt :: Turtle.FilePath -> Text tt = format fp
44
tt :: Turtle.FilePath -> Text tt = format fp
44
tt = format fp
14
false
true
0
7
8
27
11
16
null
null
bgamari/icalendar
Data/ICalendar/RRule.hs
bsd-3-clause
recurrencesStarting :: RRule -> CalendarTime -> [UTCTime] recurrencesStarting rr from = filterUntil $ filterCount $ r where period = case rFreq rr of Yearly -> yearly Monthly -> monthly Weekly -> weekly ...
1,263
recurrencesStarting :: RRule -> CalendarTime -> [UTCTime] recurrencesStarting rr from = filterUntil $ filterCount $ r where period = case rFreq rr of Yearly -> yearly Monthly -> monthly Weekly -> weekly ...
1,263
recurrencesStarting rr from = filterUntil $ filterCount $ r where period = case rFreq rr of Yearly -> yearly Monthly -> monthly Weekly -> weekly Daily -> daily ...
1,205
false
true
6
14
667
280
131
149
null
null
shicks/shsh
Language/Sh/Parser.hs
bsd-3-clause
expansion :: P Lexeme expansion = choice [do char '$' choice [try $ do n <- name return $ Expand $ SimpleExpansion n ,do char '{' choice [do char '#' n <- many $ noneOf "}" ...
3,094
expansion :: P Lexeme expansion = choice [do char '$' choice [try $ do n <- name return $ Expand $ SimpleExpansion n ,do char '{' choice [do char '#' n <- many $ noneOf "}" ...
3,094
expansion = choice [do char '$' choice [try $ do n <- name return $ Expand $ SimpleExpansion n ,do char '{' choice [do char '#' n <- many $ noneOf "}" ...
3,072
false
true
1
21
1,939
667
308
359
null
null
nfjinjing/moe
src/Text/HTML/Moe2/DSL/HTML.hs
bsd-3-clause
head = e "head"
21
head = e "head"
21
head = e "head"
21
false
false
0
5
9
9
4
5
null
null
shlevy/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
hashParens :: Doc -> Doc hashParens d = text "(# " <> d <> text " #)"
69
hashParens :: Doc -> Doc hashParens d = text "(# " <> d <> text " #)"
69
hashParens d = text "(# " <> d <> text " #)"
44
false
true
0
7
16
32
15
17
null
null
giorgidze/HCodecs
src/Codec/ByteString/Parser.hs
bsd-3-clause
getRemainingLazyByteString :: Parser L.ByteString getRemainingLazyByteString = do S s ss _ <- get return $! (s `bsJoin` ss) ------------------------------------------------------------------------ -- Helpers -- | Pull @n@ bytes from the input, as a strict ByteString.
277
getRemainingLazyByteString :: Parser L.ByteString getRemainingLazyByteString = do S s ss _ <- get return $! (s `bsJoin` ss) ------------------------------------------------------------------------ -- Helpers -- | Pull @n@ bytes from the input, as a strict ByteString.
277
getRemainingLazyByteString = do S s ss _ <- get return $! (s `bsJoin` ss) ------------------------------------------------------------------------ -- Helpers -- | Pull @n@ bytes from the input, as a strict ByteString.
227
false
true
0
10
42
55
27
28
null
null
dmbarbour/awelon
hsrc_util/ABCGraph.hs
bsd-3-clause
newVoid :: MkGraph Wire newBoolConst = return . Stat
53
newVoid :: MkGraph Wire newBoolConst = return . Stat
52
newBoolConst = return . Stat
28
false
true
1
6
9
25
10
15
null
null
HIPERFIT/futhark
src/Futhark/Construct.hs
isc
-- | Change that result where evaluation of the body would stop. Also -- change type annotations at branches. mapResult :: Buildable rep => (Result -> Body rep) -> Body rep -> Body rep mapResult f (Body _ stms res) = let Body _ stms2 newres = f res in mkBody (stms <> stms2) newres
295
mapResult :: Buildable rep => (Result -> Body rep) -> Body rep -> Body rep mapResult f (Body _ stms res) = let Body _ stms2 newres = f res in mkBody (stms <> stms2) newres
184
mapResult f (Body _ stms res) = let Body _ stms2 newres = f res in mkBody (stms <> stms2) newres
101
true
true
0
9
68
93
44
49
null
null
brownplt/ovid
src/Ovid/GraphNode.hs
bsd-2-clause
finalizeXHR r (ServerResponseNode (EqualOrd vals) cxt) = do return $ ResponseNode (EqualOrd $ map (flattenValue r) vals) cxt
126
finalizeXHR r (ServerResponseNode (EqualOrd vals) cxt) = do return $ ResponseNode (EqualOrd $ map (flattenValue r) vals) cxt
126
finalizeXHR r (ServerResponseNode (EqualOrd vals) cxt) = do return $ ResponseNode (EqualOrd $ map (flattenValue r) vals) cxt
126
false
false
0
13
19
55
26
29
null
null
qpliu/esolang
random/bfhs.hs
gpl-3.0
bf :: Bounded int => Brainfuck int () -> [int] -> [int] bf code input = let (_,output,_,_,_) = runbf code (input,repeat minBound,repeat minBound) in output
160
bf :: Bounded int => Brainfuck int () -> [int] -> [int] bf code input = let (_,output,_,_,_) = runbf code (input,repeat minBound,repeat minBound) in output
160
bf code input = let (_,output,_,_,_) = runbf code (input,repeat minBound,repeat minBound) in output
104
false
true
0
11
30
96
48
48
null
null
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Example.hs
gpl-3.0
clr528 = mkGraph [(1, 's'), (2, 'u'), (3, 'v'), (4, 'x'), (5, 'y')] [(1, 2, 10), (1, 4, 5), (2, 3, 1), (2, 4, 2), (3, 5, 4), (4, 2, 3), (4, 3, 9), (4, 5, 2), (5, 1, 7), (5, 3, 6)]
200
clr528 = mkGraph [(1, 's'), (2, 'u'), (3, 'v'), (4, 'x'), (5, 'y')] [(1, 2, 10), (1, 4, 5), (2, 3, 1), (2, 4, 2), (3, 5, 4), (4, 2, 3), (4, 3, 9), (4, 5, 2), (5, 1, 7), (5, 3, 6)]
200
clr528 = mkGraph [(1, 's'), (2, 'u'), (3, 'v'), (4, 'x'), (5, 'y')] [(1, 2, 10), (1, 4, 5), (2, 3, 1), (2, 4, 2), (3, 5, 4), (4, 2, 3), (4, 3, 9), (4, 5, 2), (5, 1, 7), (5, 3, 6)]
200
false
false
1
7
63
179
115
64
null
null
nevrenato/HetsAlloy
Common/Lib/Rel.hs
gpl-2.0
-- | test for 'empty' nullKeys :: Rel a -> Bool nullKeys (Rel m) = Map.null m
77
nullKeys :: Rel a -> Bool nullKeys (Rel m) = Map.null m
55
nullKeys (Rel m) = Map.null m
29
true
true
0
7
16
33
16
17
null
null
DaMSL/K3
test/Test.hs
apache-2.0
-- |The main for the K3 unit tests. We accept more options than the default -- test runner, so we have to bolt into the side of test-framework and parse -- its options. This is accomplished by building our own getOpt options (as -- a record structure of @Maybe@ values) and tupling it with the option -- structure ...
1,073
main :: IO () main = do args <- getArgs result <- parseOptions args case result of Left (msg,exitcode) -> do putStrLn msg exitWith exitcode Right (tfOpts,k3tOpts) -> do -- ## First, process K3 tester options -- Logger options first let loggerSettings = fromJust $ loggerInstru...
732
main = do args <- getArgs result <- parseOptions args case result of Left (msg,exitcode) -> do putStrLn msg exitWith exitcode Right (tfOpts,k3tOpts) -> do -- ## First, process K3 tester options -- Logger options first let loggerSettings = fromJust $ loggerInstructions k3tOpts...
718
true
true
0
19
271
185
86
99
null
null
TeensyPass/teensy_pass_haskell
Teensy.hs
gpl-2.0
{-| Show existing password and optionally put it on the clipboard. If put on the clipboard, it will be cleared in 45 seconds. -} showStore :: Bool -> PassName -> IO () showStore clip passName = undefined
207
showStore :: Bool -> PassName -> IO () showStore clip passName = undefined
74
showStore clip passName = undefined
35
true
true
0
8
40
30
15
15
null
null
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/Segregation/Renderer.hs
gpl-3.0
renderSegFrame :: SegRenderFrame renderSegFrame = renderFrameDisc2d (defaultAgentRendererDisc2d segAgentColor segCoord) voidEnvRendererDisc2d
182
renderSegFrame :: SegRenderFrame renderSegFrame = renderFrameDisc2d (defaultAgentRendererDisc2d segAgentColor segCoord) voidEnvRendererDisc2d
182
renderSegFrame = renderFrameDisc2d (defaultAgentRendererDisc2d segAgentColor segCoord) voidEnvRendererDisc2d
149
false
true
0
7
50
24
12
12
null
null
gorkinovich/Haskell
Problems/Problem0019.hs
mit
getYearFromInt :: Integer -> Integer getYearFromInt n | n < 0 = fndy' n (-1) 0 | otherwise = fndy n 0 0 where fndy m y c = if v < m then fndy m (y+1) v else y where v = c + getDaysByYear' y fndy' m y c = if v > m then fndy' m (y-1) v else y where v = c - getDaysByYe...
325
getYearFromInt :: Integer -> Integer getYearFromInt n | n < 0 = fndy' n (-1) 0 | otherwise = fndy n 0 0 where fndy m y c = if v < m then fndy m (y+1) v else y where v = c + getDaysByYear' y fndy' m y c = if v > m then fndy' m (y-1) v else y where v = c - getDaysByYe...
325
getYearFromInt n | n < 0 = fndy' n (-1) 0 | otherwise = fndy n 0 0 where fndy m y c = if v < m then fndy m (y+1) v else y where v = c + getDaysByYear' y fndy' m y c = if v > m then fndy' m (y-1) v else y where v = c - getDaysByYear' y
288
false
true
2
9
123
161
81
80
null
null
brendanhay/gogol
gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs
mpl-2.0
-- | The Android permission or group, e.g. android.permission.READ_CALENDAR -- or android.permission_group.CALENDAR. pgPermission :: Lens' PermissionGrant (Maybe Text) pgPermission = lens _pgPermission (\ s a -> s{_pgPermission = a})
235
pgPermission :: Lens' PermissionGrant (Maybe Text) pgPermission = lens _pgPermission (\ s a -> s{_pgPermission = a})
118
pgPermission = lens _pgPermission (\ s a -> s{_pgPermission = a})
67
true
true
1
9
30
51
26
25
null
null
adinapoli/xmonad-contrib
XMonad/Hooks/UrgencyHook.hs
bsd-3-clause
suppressibleWindows :: SuppressWhen -> X [Window] suppressibleWindows Visible = gets $ S.toList . mapped
105
suppressibleWindows :: SuppressWhen -> X [Window] suppressibleWindows Visible = gets $ S.toList . mapped
105
suppressibleWindows Visible = gets $ S.toList . mapped
55
false
true
0
7
14
34
17
17
null
null
keera-studios/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
withQGraphicsSceneContextMenuEventResult :: IO (Ptr (TQGraphicsSceneContextMenuEvent a)) -> IO (QGraphicsSceneContextMenuEvent a) withQGraphicsSceneContextMenuEventResult f = withObjectResult qtc_QGraphicsSceneContextMenuEvent_getFinalizer f
243
withQGraphicsSceneContextMenuEventResult :: IO (Ptr (TQGraphicsSceneContextMenuEvent a)) -> IO (QGraphicsSceneContextMenuEvent a) withQGraphicsSceneContextMenuEventResult f = withObjectResult qtc_QGraphicsSceneContextMenuEvent_getFinalizer f
243
withQGraphicsSceneContextMenuEventResult f = withObjectResult qtc_QGraphicsSceneContextMenuEvent_getFinalizer f
113
false
true
0
10
17
47
22
25
null
null
wangbj/leet
q451.hs
bsd-2-clause
fromList :: String -> IntMap Int fromList = IntMap.fromListWith (+) . flip zip (repeat 1) . map ord
99
fromList :: String -> IntMap Int fromList = IntMap.fromListWith (+) . flip zip (repeat 1) . map ord
99
fromList = IntMap.fromListWith (+) . flip zip (repeat 1) . map ord
66
false
true
0
9
17
47
23
24
null
null
kmate/HaRe
old/testing/demote/WhereIn6_AstOut.hs
bsd-3-clause
fun x y z = inc addthree where inc a = a + 1 addthree = (x + y) + z
85
fun x y z = inc addthree where inc a = a + 1 addthree = (x + y) + z
85
fun x y z = inc addthree where inc a = a + 1 addthree = (x + y) + z
85
false
false
1
9
38
50
23
27
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/show_2.hs
mit
primDivNatS Zero (Succ x) = Zero
32
primDivNatS Zero (Succ x) = Zero
32
primDivNatS Zero (Succ x) = Zero
32
false
false
0
6
5
19
8
11
null
null
ghc-android/ghc
testsuite/tests/perf/should_run/T3738.hs
bsd-3-clause
main = print (bar 2 !! 10000)
29
main = print (bar 2 !! 10000)
29
main = print (bar 2 !! 10000)
29
false
false
0
8
6
19
9
10
null
null
mreid/papersite
src/lib/Page.hs
mit
-------------------------------------------------------------------------------- -- Handle roman numerals in page numbers romanChars = "IVXLCDM"
144
romanChars = "IVXLCDM"
22
romanChars = "IVXLCDM"
22
true
false
0
4
10
8
5
3
null
null
fiigii/dataflow
ConstantPropagation.hs
mit
transfer :: Statement -> State -> State transfer (ExprStmt (AssignExpr OpAssign (LVar x) e) _) sigma = insert x (cpA e sigma) sigma
133
transfer :: Statement -> State -> State transfer (ExprStmt (AssignExpr OpAssign (LVar x) e) _) sigma = insert x (cpA e sigma) sigma
133
transfer (ExprStmt (AssignExpr OpAssign (LVar x) e) _) sigma = insert x (cpA e sigma) sigma
93
false
true
0
11
24
63
31
32
null
null
frosch03/frogblog
Page.hs
bsd-3-clause
renderSimpleAbstracts state v p f = do entrys <- getSomeEntrys v p f abstracts <- genAbstract entrys output $ renderHtml (simplePosts state abstracts)
175
renderSimpleAbstracts state v p f = do entrys <- getSomeEntrys v p f abstracts <- genAbstract entrys output $ renderHtml (simplePosts state abstracts)
175
renderSimpleAbstracts state v p f = do entrys <- getSomeEntrys v p f abstracts <- genAbstract entrys output $ renderHtml (simplePosts state abstracts)
175
false
false
0
10
47
57
25
32
null
null
energyflowanalysis/efa-2.1
src/EFA/Example/Topology/Tripod/State.hs
bsd-3-clause
flowGraph :: SeqFlow.Graph Node (Result a) (Result v) flowGraph = seqFlowGraphFromFlowTopos [state0, state3]
108
flowGraph :: SeqFlow.Graph Node (Result a) (Result v) flowGraph = seqFlowGraphFromFlowTopos [state0, state3]
108
flowGraph = seqFlowGraphFromFlowTopos [state0, state3]
54
false
true
0
7
12
41
21
20
null
null
SkemaPlatform/skema-common
src/Skema/Util.hs
agpl-3.0
-- | String representation of a binary amount. prettyBytes :: Integral a => a -> String prettyBytes = prettyBytes' prettySymbols . fromIntegral
143
prettyBytes :: Integral a => a -> String prettyBytes = prettyBytes' prettySymbols . fromIntegral
96
prettyBytes = prettyBytes' prettySymbols . fromIntegral
55
true
true
0
6
21
30
15
15
null
null
sramekj/lunchvote
Handler/ListMeals.hs
mit
getListMealsR :: Handler Html getListMealsR = do -- ip <- getIp -- putStrLn $ pack "Client list request from IP: " ++ ip menuList <- lift $ getData canVoteList <- filterM (\menuItem -> do canVote <- validateVoterIp $ Handler.Cache.id menuItem ...
518
getListMealsR :: Handler Html getListMealsR = do -- ip <- getIp -- putStrLn $ pack "Client list request from IP: " ++ ip menuList <- lift $ getData canVoteList <- filterM (\menuItem -> do canVote <- validateVoterIp $ Handler.Cache.id menuItem ...
518
getListMealsR = do -- ip <- getIp -- putStrLn $ pack "Client list request from IP: " ++ ip menuList <- lift $ getData canVoteList <- filterM (\menuItem -> do canVote <- validateVoterIp $ Handler.Cache.id menuItem retu...
488
false
true
0
16
203
121
56
65
null
null
Ofenhed/Steganography
src/EccKeys.hs
gpl-2.0
readSecretKey :: SecretKeyPath -> IO (Maybe SecretEccKey) readSecretKey (SecretKeyPath secKey) = do keyData <- C8.readFile secKey return $ decodeSecretKey keyData
166
readSecretKey :: SecretKeyPath -> IO (Maybe SecretEccKey) readSecretKey (SecretKeyPath secKey) = do keyData <- C8.readFile secKey return $ decodeSecretKey keyData
166
readSecretKey (SecretKeyPath secKey) = do keyData <- C8.readFile secKey return $ decodeSecretKey keyData
108
false
true
0
9
23
59
26
33
null
null
vigoos/Farrago-OS
aura-master/aura-master/src/Aura/Languages.hs
gpl-2.0
cleanStates_2 :: Int -> Language -> String cleanStates_2 (bt . show -> n) = \case Japanese -> n ++ "個のパッケージ状態記録だけが残される。その他削除?" Croatian -> n ++ " stanja paketa će biti zadržano. Ukloniti ostatak?" German -> n ++ " Paketzustände werden behalten. Den Rest entfernen?" Serbian -> n ++ " стања пак...
948
cleanStates_2 :: Int -> Language -> String cleanStates_2 (bt . show -> n) = \case Japanese -> n ++ "個のパッケージ状態記録だけが残される。その他削除?" Croatian -> n ++ " stanja paketa će biti zadržano. Ukloniti ostatak?" German -> n ++ " Paketzustände werden behalten. Den Rest entfernen?" Serbian -> n ++ " стања пак...
948
cleanStates_2 (bt . show -> n) = \case Japanese -> n ++ "個のパッケージ状態記録だけが残される。その他削除?" Croatian -> n ++ " stanja paketa će biti zadržano. Ukloniti ostatak?" German -> n ++ " Paketzustände werden behalten. Den Rest entfernen?" Serbian -> n ++ " стања пакета ће бити сачувано. Уклонити остатак?" ...
905
false
true
11
8
227
166
74
92
null
null
ekmett/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
phaseInputExt (Unlit ExtCoreFile) = "lhcr"
42
phaseInputExt (Unlit ExtCoreFile) = "lhcr"
42
phaseInputExt (Unlit ExtCoreFile) = "lhcr"
42
false
false
0
6
4
16
7
9
null
null
NightRa/FurnitureAI
src/Model.hs
mit
setPoint :: ID -> Point -> (Grid -> Maybe Grid) setPoint id p (Grid grid) = case Map.lookup p grid of Nothing -> Nothing Just WallBlock -> Nothing Just (FurnitureBlock _) -> Nothing Just FloorBlock -> Just $ Grid (Map.insert p (FurnitureBlock (Just id)...
409
setPoint :: ID -> Point -> (Grid -> Maybe Grid) setPoint id p (Grid grid) = case Map.lookup p grid of Nothing -> Nothing Just WallBlock -> Nothing Just (FurnitureBlock _) -> Nothing Just FloorBlock -> Just $ Grid (Map.insert p (FurnitureBlock (Just id)...
409
setPoint id p (Grid grid) = case Map.lookup p grid of Nothing -> Nothing Just WallBlock -> Nothing Just (FurnitureBlock _) -> Nothing Just FloorBlock -> Just $ Grid (Map.insert p (FurnitureBlock (Just id)) grid) -- Moves the origin to the upper left, ...
361
false
true
0
15
127
124
60
64
null
null
erikd/hs-tls
core/Tests/Certificate.hs
bsd-3-clause
normalizeDate :: Date -> Date normalizeDate d = timeConvert (timeConvert d :: Elapsed)
86
normalizeDate :: Date -> Date normalizeDate d = timeConvert (timeConvert d :: Elapsed)
86
normalizeDate d = timeConvert (timeConvert d :: Elapsed)
56
false
true
0
7
12
30
15
15
null
null
rvl/hsoz
test/Network/Hawk/Tests.hs
bsd-3-clause
testClientAuth01 = testCase "returns false on invalid header" $ do let r = mockResponse2 (Just "Hawk mac=\"abc\", bad=\"xyz\"") "" ok <- Client.authenticate r undefined undefined Nothing Client.ServerAuthorizationRequired isLeft ok @?= True -- fixme: better message for parse error -- ok @?= Left "Invalid Serv...
472
testClientAuth01 = testCase "returns false on invalid header" $ do let r = mockResponse2 (Just "Hawk mac=\"abc\", bad=\"xyz\"") "" ok <- Client.authenticate r undefined undefined Nothing Client.ServerAuthorizationRequired isLeft ok @?= True -- fixme: better message for parse error -- ok @?= Left "Invalid Serv...
472
testClientAuth01 = testCase "returns false on invalid header" $ do let r = mockResponse2 (Just "Hawk mac=\"abc\", bad=\"xyz\"") "" ok <- Client.authenticate r undefined undefined Nothing Client.ServerAuthorizationRequired isLeft ok @?= True -- fixme: better message for parse error -- ok @?= Left "Invalid Serv...
472
false
false
1
14
75
83
37
46
null
null
TomMD/ghc
compiler/prelude/THNames.hs
bsd-3-clause
listTIdKey = mkPreludeMiscIdUnique 386
47
listTIdKey = mkPreludeMiscIdUnique 386
47
listTIdKey = mkPreludeMiscIdUnique 386
47
false
false
0
5
12
9
4
5
null
null
siddhanathan/ghc
compiler/main/Hooks.hs
bsd-3-clause
lookupHook :: (Hooks -> Maybe a) -> a -> DynFlags -> a lookupHook hook def = fromMaybe def . hook . hooks
105
lookupHook :: (Hooks -> Maybe a) -> a -> DynFlags -> a lookupHook hook def = fromMaybe def . hook . hooks
105
lookupHook hook def = fromMaybe def . hook . hooks
50
false
true
0
9
21
55
25
30
null
null
kumasento/accelerate
Data/Array/Accelerate/Pretty/Print.hs
bsd-3-clause
prettyArray :: forall dim e. Array dim e -> Doc prettyArray arr@(Array sh _) = hang (text "Array") 2 $ sep [ parens . text $ showShape (toElt sh :: dim) , dataDoc] where showDoc :: forall a. Show a => a -> Doc showDoc = text . show l = toList arr dataDoc | length l <= 1000 = showDoc ...
495
prettyArray :: forall dim e. Array dim e -> Doc prettyArray arr@(Array sh _) = hang (text "Array") 2 $ sep [ parens . text $ showShape (toElt sh :: dim) , dataDoc] where showDoc :: forall a. Show a => a -> Doc showDoc = text . show l = toList arr dataDoc | length l <= 1000 = showDoc ...
495
prettyArray arr@(Array sh _) = hang (text "Array") 2 $ sep [ parens . text $ showShape (toElt sh :: dim) , dataDoc] where showDoc :: forall a. Show a => a -> Doc showDoc = text . show l = toList arr dataDoc | length l <= 1000 = showDoc l | otherwise = showDoc (take...
447
false
true
10
10
170
175
87
88
null
null
iemxblog/hpcb
src/Hpcb/Functions.hs
mit
polygon :: [V2 Float] -- ^ List of points of the path -> Circuit polygon xs = mconcat . map (uncurry line) $ l where l = zip xs (tail (cycle xs)) -- | Creates a rectangle, centered on the origin. -- It is centered on the origin of the footprint. -- It may be translated after with 'translate', or rot...
339
polygon :: [V2 Float] -- ^ List of points of the path -> Circuit polygon xs = mconcat . map (uncurry line) $ l where l = zip xs (tail (cycle xs)) -- | Creates a rectangle, centered on the origin. -- It is centered on the origin of the footprint. -- It may be translated after with 'translate', or rot...
339
polygon xs = mconcat . map (uncurry line) $ l where l = zip xs (tail (cycle xs)) -- | Creates a rectangle, centered on the origin. -- It is centered on the origin of the footprint. -- It may be translated after with 'translate', or rotated with 'rotate'.
261
false
true
0
9
82
70
36
34
null
null
chaosim/peasy
coffee/samples/latex.hs
mit
tilde 'a' = "ã"
15
tilde 'a' = "ã"
15
tilde 'a' = "ã"
15
false
false
1
5
3
13
4
9
null
null
ribag/ganeti-experiments
src/Ganeti/Locking/Waiting.hs
gpl-2.0
-- | Update locks as soon as possible. If the request cannot be fulfilled -- immediately add the request to the waiting queue. The first argument is -- the priority at which the owner is waiting, the remaining are as for -- updateLocks', and so is the output. updateLocksWaiting' :: (Lock a, Ord b, Ord c) ...
1,502
updateLocksWaiting' :: (Lock a, Ord b, Ord c) => c -> b -> [L.LockRequest a] -> LockWaiting a b c -> (LockWaiting a b c, (Result (S.Set b), S.Set b)) updateLocksWaiting' prio owner reqs state = let (state', (result, no...
1,242
updateLocksWaiting' prio owner reqs state = let (state', (result, notify)) = updateLocks' owner reqs state state'' = case result of Bad _ -> state' -- bad requests cannot be queued Ok empty | S.null empty -> state' Ok blocked -> let blocker = S.findMin blocked o...
992
true
true
0
20
673
335
171
164
null
null
rvion/ride
jetpack/src/Data/Text/Lazy/AsLt.hs
bsd-3-clause
-- lt_snoc :: Text -> Char -> Text lt_snoc = I.snoc
51
lt_snoc = I.snoc
16
lt_snoc = I.snoc
16
true
false
0
5
10
9
5
4
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Creatives/DealAssociations/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). acdalUploadType :: Lens' AccountsCreativesDealAssociationsList (Maybe Text) acdalUploadType = lens _acdalUploadType (\ s a -> s{_acdalUploadType = a})
229
acdalUploadType :: Lens' AccountsCreativesDealAssociationsList (Maybe Text) acdalUploadType = lens _acdalUploadType (\ s a -> s{_acdalUploadType = a})
158
acdalUploadType = lens _acdalUploadType (\ s a -> s{_acdalUploadType = a})
82
true
true
0
9
34
48
25
23
null
null
AndrewRademacher/coinbase-exchange
src/Coinbase/Exchange/Private.hs
mit
createTransfer :: (MonadResource m, MonadReader ExchangeConf m, MonadError ExchangeFailure m) => TransferToCoinbase -> m TransferToCoinbaseResponse createTransfer = coinbasePost True "/transfers" . Just
217
createTransfer :: (MonadResource m, MonadReader ExchangeConf m, MonadError ExchangeFailure m) => TransferToCoinbase -> m TransferToCoinbaseResponse createTransfer = coinbasePost True "/transfers" . Just
217
createTransfer = coinbasePost True "/transfers" . Just
54
false
true
0
7
36
52
26
26
null
null
aisamanra/matterhorn
src/Types.hs
bsd-3-clause
getMessageForPostId :: ChatState -> PostId -> Maybe Message getMessageForPostId st pId = st^.csPostMap.at(pId)
110
getMessageForPostId :: ChatState -> PostId -> Maybe Message getMessageForPostId st pId = st^.csPostMap.at(pId)
110
getMessageForPostId st pId = st^.csPostMap.at(pId)
50
false
true
0
7
12
43
20
23
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readIoNumberRedirect4 = isOk readIoNumberRedirect "&> lol"
63
prop_readIoNumberRedirect4 = isOk readIoNumberRedirect "&> lol"
63
prop_readIoNumberRedirect4 = isOk readIoNumberRedirect "&> lol"
63
false
false
0
5
5
11
5
6
null
null
patrickherrmann/advent2016
src/Day07.hs
bsd-3-clause
supportsSsl :: IpAddress -> Bool supportsSsl ip = any ((`elem` hypernetsAbas) . invertAba) supernetAbas where hypernetsAbas = nub $ ip >>= \case SupernetSequence _ -> [] HypernetSequence t -> findAbas t supernetAbas = nub $ ip >>= \case SupernetSequence t -> findAbas t HypernetSequence...
328
supportsSsl :: IpAddress -> Bool supportsSsl ip = any ((`elem` hypernetsAbas) . invertAba) supernetAbas where hypernetsAbas = nub $ ip >>= \case SupernetSequence _ -> [] HypernetSequence t -> findAbas t supernetAbas = nub $ ip >>= \case SupernetSequence t -> findAbas t HypernetSequence...
328
supportsSsl ip = any ((`elem` hypernetsAbas) . invertAba) supernetAbas where hypernetsAbas = nub $ ip >>= \case SupernetSequence _ -> [] HypernetSequence t -> findAbas t supernetAbas = nub $ ip >>= \case SupernetSequence t -> findAbas t HypernetSequence _ -> []
295
false
true
1
10
80
124
58
66
null
null
ulricha/algebra-dag
src/Database/Algebra/Dag/Build.hs
bsd-3-clause
insertNoShare :: (Dag.Operator alg, MonadState (BuildState alg) m) => alg -> m AlgNode insertNoShare op = do d <- gets dag let (n, d') = Dag.insertNoShare op d modify $ \s -> s { dag = d' } return n
214
insertNoShare :: (Dag.Operator alg, MonadState (BuildState alg) m) => alg -> m AlgNode insertNoShare op = do d <- gets dag let (n, d') = Dag.insertNoShare op d modify $ \s -> s { dag = d' } return n
214
insertNoShare op = do d <- gets dag let (n, d') = Dag.insertNoShare op d modify $ \s -> s { dag = d' } return n
127
false
true
0
12
55
110
52
58
null
null
ciderpunx/exercismo
src/Matrix.hs
gpl-3.0
fromString :: Read a => String -> Matrix a fromString s = fromList . map parse $ lines s where parse s = case reads s of [] -> [] (x,xs):_ -> x : parse xs
176
fromString :: Read a => String -> Matrix a fromString s = fromList . map parse $ lines s where parse s = case reads s of [] -> [] (x,xs):_ -> x : parse xs
176
fromString s = fromList . map parse $ lines s where parse s = case reads s of [] -> [] (x,xs):_ -> x : parse xs
133
false
true
2
9
57
101
45
56
null
null
DevJac/haskell-project-euler
src/Problem12.hs
mit
triangleNumbers :: [Int] triangleNumbers = scanl1 (+) [1..]
59
triangleNumbers :: [Int] triangleNumbers = scanl1 (+) [1..]
59
triangleNumbers = scanl1 (+) [1..]
34
false
true
0
6
7
24
14
10
null
null
phaazon/either
src/Data/Either/Combinators.hs
bsd-3-clause
-- --------------------------------------------------------------------------- -- Functions over Either -- |The 'isLeft' function returns 'True' iff its argument is of the form @'Left' _@. -- -- Using @Control.Lens@: -- -- @ -- 'isLeft' ≡ has _Left -- @ -- -- >>> isLeft (Left 12) -- True -- -- >>> isLeft (Right 12) --...
378
isLeft :: Either a b -> Bool isLeft (Left _) = True
51
isLeft (Left _) = True
22
true
true
0
9
63
50
30
20
null
null
brendanhay/chrononaut
src/Chrononaut/Log.hs
mpl-2.0
rollbackPath rev log = (tmplPath "rollback" log, filePath "down" rev log)
73
rollbackPath rev log = (tmplPath "rollback" log, filePath "down" rev log)
73
rollbackPath rev log = (tmplPath "rollback" log, filePath "down" rev log)
73
false
false
0
6
10
29
14
15
null
null
aloiscochard/bound
examples/Overkill.hs
bsd-3-clause
varp :: Eq a => a -> P a varp a = P VarP [a] (\v -> if a == v then Just V else Nothing)
87
varp :: Eq a => a -> P a varp a = P VarP [a] (\v -> if a == v then Just V else Nothing)
87
varp a = P VarP [a] (\v -> if a == v then Just V else Nothing)
62
false
true
0
9
25
64
32
32
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
gcrPrimePower _ = False
30
gcrPrimePower _ = False
30
gcrPrimePower _ = False
30
false
false
0
4
10
10
4
6
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxTreeItemIcon_SelectedExpanded :: Int wxTreeItemIcon_SelectedExpanded = 3
74
wxTreeItemIcon_SelectedExpanded :: Int wxTreeItemIcon_SelectedExpanded = 3
74
wxTreeItemIcon_SelectedExpanded = 3
35
false
true
0
4
5
11
6
5
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
mz2InfantryMachinegun9 = 34 :: Int
35
mz2InfantryMachinegun9 = 34 :: Int
35
mz2InfantryMachinegun9 = 34 :: Int
35
false
false
0
4
5
9
5
4
null
null
batterseapower/supercompilation-by-evaluation
Core/Prelude.hs
bsd-3-clause
nothingDataCon, justDataCon :: DataCon nothingDataCon = "Nothing"
65
nothingDataCon, justDataCon :: DataCon nothingDataCon = "Nothing"
65
nothingDataCon = "Nothing"
26
false
true
0
4
6
13
8
5
null
null
iteloo/tsuru-sample
iteratee-0.8.9.6/src/Data/Iteratee/IO.hs
bsd-3-clause
enumFile :: (MonadIO m, MonadMask m, NullPoint s, ReadableChunk s el) => Int -> FilePath -> Enumerator s m a enumFile = FD.enumFile
148
enumFile :: (MonadIO m, MonadMask m, NullPoint s, ReadableChunk s el) => Int -> FilePath -> Enumerator s m a enumFile = FD.enumFile
148
enumFile = FD.enumFile
22
false
true
0
9
39
63
30
33
null
null
duplode/stack
src/Stack/Build/Source.hs
bsd-3-clause
checkBuildCache :: MonadIO m => Map FilePath FileCacheInfo -- ^ old cache -> [FilePath] -- ^ files in package -> m (Bool, Map FilePath FileCacheInfo) checkBuildCache oldCache files = liftIO $ do (Any isDirty, m) <- fmap mconcat $ mapM go files return (isDirty, m) ...
2,103
checkBuildCache :: MonadIO m => Map FilePath FileCacheInfo -- ^ old cache -> [FilePath] -- ^ files in package -> m (Bool, Map FilePath FileCacheInfo) checkBuildCache oldCache files = liftIO $ do (Any isDirty, m) <- fmap mconcat $ mapM go files return (isDirty, m) ...
2,103
checkBuildCache oldCache files = liftIO $ do (Any isDirty, m) <- fmap mconcat $ mapM go files return (isDirty, m) where go fp = do mmodTime <- getModTimeMaybe fp case mmodTime of Nothing -> return (Any False, Map.empty) Just modTime' -> do (isDirty, ...
1,905
false
true
0
25
1,078
536
260
276
null
null
goalieca/haskelling
044.hs
gpl-3.0
-- TODO: make array if this doesn't need to scale large is_pentagonal n = n `member` (fromList pentagonals)
108
is_pentagonal n = n `member` (fromList pentagonals)
52
is_pentagonal n = n `member` (fromList pentagonals)
52
true
false
0
7
18
22
12
10
null
null
supki/liblastfm
src/Lastfm/Request.hs
mit
-- | Add language parameter language :: Text -> Request f Language language = add "lang"
88
language :: Text -> Request f Language language = add "lang"
60
language = add "lang"
21
true
true
0
7
15
30
13
17
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_UNIFORM_BLOCK_INDEX :: GLenum gl_UNIFORM_BLOCK_INDEX = 0x8A3A
64
gl_UNIFORM_BLOCK_INDEX :: GLenum gl_UNIFORM_BLOCK_INDEX = 0x8A3A
64
gl_UNIFORM_BLOCK_INDEX = 0x8A3A
31
false
true
0
4
5
11
6
5
null
null
leshchevds/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
valueNone :: String valueNone = "none"
38
valueNone :: String valueNone = "none"
38
valueNone = "none"
18
false
true
0
4
5
11
6
5
null
null
qnikst/distributed-process-extras
src/Control/Distributed/Process/Extras/Time.hs
bsd-3-clause
-- | Create a 'NominalDiffTime' from a number of microseconds. microsecondsToNominalDiffTime :: Integer -> NominalDiffTime microsecondsToNominalDiffTime x = fromRational (x % (fromIntegral microSecondsPerSecond))
212
microsecondsToNominalDiffTime :: Integer -> NominalDiffTime microsecondsToNominalDiffTime x = fromRational (x % (fromIntegral microSecondsPerSecond))
149
microsecondsToNominalDiffTime x = fromRational (x % (fromIntegral microSecondsPerSecond))
89
true
true
0
9
22
35
18
17
null
null
rgaiacs/pandoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
tableContentCell :: OrgParser (F Blocks) tableContentCell = try $ fmap B.plain . trimInlinesF . mconcat <$> many1Till inline endOfCell
136
tableContentCell :: OrgParser (F Blocks) tableContentCell = try $ fmap B.plain . trimInlinesF . mconcat <$> many1Till inline endOfCell
136
tableContentCell = try $ fmap B.plain . trimInlinesF . mconcat <$> many1Till inline endOfCell
95
false
true
0
10
20
46
22
24
null
null
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter20.hsproj/ChapterExercises206.hs
mit
filterF' :: (Applicative f, Foldable t, Monoid (f a)) => (a -> Bool) -> t a -> f a filterF' f xs = foldMap mapToApplicative xs where mapToApplicative x = if (f x) then (pure x) else mempty
194
filterF' :: (Applicative f, Foldable t, Monoid (f a)) => (a -> Bool) -> t a -> f a filterF' f xs = foldMap mapToApplicative xs where mapToApplicative x = if (f x) then (pure x) else mempty
194
filterF' f xs = foldMap mapToApplicative xs where mapToApplicative x = if (f x) then (pure x) else mempty
111
false
true
0
8
43
99
50
49
null
null
phischu/gtk2hs
cairo/demo/Clock.hs
lgpl-3.0
drawHourMarks = do save forM_ [1..12] $ \_ -> do rotate (pi/6) moveTo (4.5/6) 0 lineTo (5.0/6) 0 stroke restore
131
drawHourMarks = do save forM_ [1..12] $ \_ -> do rotate (pi/6) moveTo (4.5/6) 0 lineTo (5.0/6) 0 stroke restore
131
drawHourMarks = do save forM_ [1..12] $ \_ -> do rotate (pi/6) moveTo (4.5/6) 0 lineTo (5.0/6) 0 stroke restore
131
false
false
0
13
39
78
36
42
null
null
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Poly/Power/SizeReduction.hs
bsd-3-clause
reduceDegreeI :: PowPoly MPBall -> Integer -> PowPoly MPBall reduceDegreeI p = reduceDegree p (mpBall $ -1) (mpBall 1)
120
reduceDegreeI :: PowPoly MPBall -> Integer -> PowPoly MPBall reduceDegreeI p = reduceDegree p (mpBall $ -1) (mpBall 1)
120
reduceDegreeI p = reduceDegree p (mpBall $ -1) (mpBall 1)
59
false
true
0
8
20
50
24
26
null
null
scvalex/ltorrent
BitTorrent/Peer.hs
lgpl-3.0
newPeerSTM :: String -> Int -> STM Peer newPeerSTM ip port = do fs <- newTVar "Cc" pm <- newTVar Nothing gc <- newTVar "Not responding" return $ Peer ip port False fs pm gc -- | newPeerIO ip port returns a new Peer with specified ip and port.
251
newPeerSTM :: String -> Int -> STM Peer newPeerSTM ip port = do fs <- newTVar "Cc" pm <- newTVar Nothing gc <- newTVar "Not responding" return $ Peer ip port False fs pm gc -- | newPeerIO ip port returns a new Peer with specified ip and port.
251
newPeerSTM ip port = do fs <- newTVar "Cc" pm <- newTVar Nothing gc <- newTVar "Not responding" return $ Peer ip port False fs pm gc -- | newPeerIO ip port returns a new Peer with specified ip and port.
211
false
true
0
8
57
78
35
43
null
null
nanonaren/NanoUtils
NanoUtils/DoubleMap.hs
bsd-3-clause
empty = DM (M.empty,M.empty)
28
empty = DM (M.empty,M.empty)
28
empty = DM (M.empty,M.empty)
28
false
false
0
7
3
19
10
9
null
null
byorgey/Idris-dev
src/Idris/ElabTerm.hs
bsd-3-clause
reifyTTConstApp f (Constant c@(B32 _)) | f == reflm "B32" = return $ c
86
reifyTTConstApp f (Constant c@(B32 _)) | f == reflm "B32" = return $ c
86
reifyTTConstApp f (Constant c@(B32 _)) | f == reflm "B32" = return $ c
86
false
false
0
10
29
43
20
23
null
null
jkr/pandoc-citeproc
src/Text/CSL/Output/Pandoc.hs
bsd-3-clause
flipFlop' st (Quoted _ ils) = Quoted (if inOuterQuotes st then SingleQuote else DoubleQuote) $ map (flipFlop' st{ inOuterQuotes = not $ inOuterQuotes st }) ils
163
flipFlop' st (Quoted _ ils) = Quoted (if inOuterQuotes st then SingleQuote else DoubleQuote) $ map (flipFlop' st{ inOuterQuotes = not $ inOuterQuotes st }) ils
163
flipFlop' st (Quoted _ ils) = Quoted (if inOuterQuotes st then SingleQuote else DoubleQuote) $ map (flipFlop' st{ inOuterQuotes = not $ inOuterQuotes st }) ils
163
false
false
2
11
29
67
33
34
null
null
utdemir/wai
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs
mit
setStreamInfo :: StreamInfo -> Input -> IO () setStreamInfo (StreamInfo ref) inp = writeIORef ref $ Just inp
108
setStreamInfo :: StreamInfo -> Input -> IO () setStreamInfo (StreamInfo ref) inp = writeIORef ref $ Just inp
108
setStreamInfo (StreamInfo ref) inp = writeIORef ref $ Just inp
62
false
true
0
10
17
49
22
27
null
null
derekjw/scotty-playground
src/Handlers.hs
bsd-3-clause
personToHtml :: Entity Person -> Html personToHtml entity = p $ do span . toHtml $ personName person span . toHtml $ personAge person where person = entityVal entity
191
personToHtml :: Entity Person -> Html personToHtml entity = p $ do span . toHtml $ personName person span . toHtml $ personAge person where person = entityVal entity
191
personToHtml entity = p $ do span . toHtml $ personName person span . toHtml $ personAge person where person = entityVal entity
153
false
true
0
9
54
64
29
35
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
appAName = varQual aRROW (fsLit "app") appAIdKey
64
appAName = varQual aRROW (fsLit "app") appAIdKey
64
appAName = varQual aRROW (fsLit "app") appAIdKey
64
false
false
0
7
22
19
9
10
null
null
robdockins/edison
edison-core/src/Data/Edison/Seq/SimpleQueue.hs
mit
null _ = False
14
null _ = False
14
null _ = False
14
false
false
0
5
3
9
4
5
null
null
conal/shady-graphics
src/Shady/Lighting.hs
agpl-3.0
-- | Pure diffuse diffuse :: Lighter Color diffuse = illuminance (sided (lift surfN <.> dirL) *^ colorL)
104
diffuse :: Lighter Color diffuse = illuminance (sided (lift surfN <.> dirL) *^ colorL)
86
diffuse = illuminance (sided (lift surfN <.> dirL) *^ colorL)
61
true
true
0
11
17
44
20
24
null
null
ScrambledEggsOnToast/hi3status
lib-src/Hi3Status/StatusLine.hs
mit
runBlocks :: Blocks -> Chan BlockUpdate -> IO [(String, MVar UpdateSignal)] runBlocks bs c = mapM (\(n, BlocksEntry i b) -> do u <- newMVar UpdateSignal forkIO $ runBlockM (runBlock b) n u c return (i,u)) . zip [0..] $ bs
233
runBlocks :: Blocks -> Chan BlockUpdate -> IO [(String, MVar UpdateSignal)] runBlocks bs c = mapM (\(n, BlocksEntry i b) -> do u <- newMVar UpdateSignal forkIO $ runBlockM (runBlock b) n u c return (i,u)) . zip [0..] $ bs
233
runBlocks bs c = mapM (\(n, BlocksEntry i b) -> do u <- newMVar UpdateSignal forkIO $ runBlockM (runBlock b) n u c return (i,u)) . zip [0..] $ bs
157
false
true
0
15
52
122
60
62
null
null
creichert/linear-hs
src/Numeric/Vector.hs
bsd-2-clause
-- | Scalar multiplication with a vector. multScalar :: (Num a) => a -> Vector a -> Vector a multScalar n (Vector d xs) = Vector d (map (n*) xs)
144
multScalar :: (Num a) => a -> Vector a -> Vector a multScalar n (Vector d xs) = Vector d (map (n*) xs)
102
multScalar n (Vector d xs) = Vector d (map (n*) xs)
51
true
true
0
8
29
65
33
32
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/IO/Exception.hs
bsd-3-clause
blockedIndefinitelyOnSTM :: SomeException -- for the RTS blockedIndefinitelyOnSTM = toException BlockedIndefinitelyOnSTM
120
blockedIndefinitelyOnSTM :: SomeException blockedIndefinitelyOnSTM = toException BlockedIndefinitelyOnSTM
105
blockedIndefinitelyOnSTM = toException BlockedIndefinitelyOnSTM
63
true
true
0
6
10
22
9
13
null
null
k0001/gtk2hs
tools/c2hs/chs/CHS.hs
gpl-3.0
parseOptLock :: [CHSToken] -> CST s (Maybe String, [CHSToken]) parseOptLock (CHSTokLock _ : CHSTokEqual _ : CHSTokString _ str: toks) = return (Just str, toks)
224
parseOptLock :: [CHSToken] -> CST s (Maybe String, [CHSToken]) parseOptLock (CHSTokLock _ : CHSTokEqual _ : CHSTokString _ str: toks) = return (Just str, toks)
224
parseOptLock (CHSTokLock _ : CHSTokEqual _ : CHSTokString _ str: toks) = return (Just str, toks)
161
false
true
0
9
89
80
39
41
null
null
zhangjiji/real-world-haskell
ch8/highestClose.hs
mit
highestCloseFrom path = do content <- L.readFile path print (highestClose content)
86
highestCloseFrom path = do content <- L.readFile path print (highestClose content)
86
highestCloseFrom path = do content <- L.readFile path print (highestClose content)
86
false
false
1
10
14
37
14
23
null
null
mikeplus64/indices
src/Data/Index.hs
mit
tagStep :: Dim n => Proxy q -> Tagged (ToPeano q) n tagStep _ = Tagged zero
75
tagStep :: Dim n => Proxy q -> Tagged (ToPeano q) n tagStep _ = Tagged zero
75
tagStep _ = Tagged zero
23
false
true
0
10
16
46
20
26
null
null
Southern-Exposure-Seed-Exchange/southernexposure.com
server/src/Emails/PasswordReset.hs
gpl-3.0
renderSuccess :: L.Text renderSuccess = "Hello,\n\n" <> "The password for your [Southern Exposure][1] account has been changed by " <> "a password reset request. If you did not initiate this request, we recommend " <> "changing the password for both your email account & your Southern Exposure account, "...
541
renderSuccess :: L.Text renderSuccess = "Hello,\n\n" <> "The password for your [Southern Exposure][1] account has been changed by " <> "a password reset request. If you did not initiate this request, we recommend " <> "changing the password for both your email account & your Southern Exposure account, "...
541
renderSuccess = "Hello,\n\n" <> "The password for your [Southern Exposure][1] account has been changed by " <> "a password reset request. If you did not initiate this request, we recommend " <> "changing the password for both your email account & your Southern Exposure account, " <> "[contact our su...
517
false
true
0
11
107
41
21
20
null
null