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
conal/hermit-extras
src/HERMIT/Extras.hs
bsd-3-clause
externC :: Injection a Core => ExternalName -> RewriteH a -> String -> External externC name rew help = external name (promoteR rew :: ReCore) [help]
162
externC :: Injection a Core => ExternalName -> RewriteH a -> String -> External externC name rew help = external name (promoteR rew :: ReCore) [help]
162
externC name rew help = external name (promoteR rew :: ReCore) [help]
71
false
true
0
8
38
68
31
37
null
null
ownclo/alohas
src/Signals.hs
bsd-3-clause
toDb :: Double -> Double toDb x = 10 * logBase 10 x
51
toDb :: Double -> Double toDb x = 10 * logBase 10 x
51
toDb x = 10 * logBase 10 x
26
false
true
0
6
12
27
13
14
null
null
Chobbes/BatchMTLR
BatchMTLR/Main.hs
mit
proc' = proc
12
proc' = proc
12
proc' = proc
12
false
false
1
5
2
10
3
7
null
null
glennrfisher/cis194-haskell
04 Higher Order Programming/homework4.hs
mit
-- Reimplement `fun2` using wholemeal programming. fun2 :: Integer -> Integer fun2 1 = 0
89
fun2 :: Integer -> Integer fun2 1 = 0
37
fun2 1 = 0
10
true
true
0
7
15
25
11
14
null
null
lukexi/ghc-7.8-arm64
includes/CodeGen.Platform.hs
bsd-3-clause
globalRegMaybe (VanillaReg 9 _) = Just (RealRegSingle REG_R9)
69
globalRegMaybe (VanillaReg 9 _) = Just (RealRegSingle REG_R9)
69
globalRegMaybe (VanillaReg 9 _) = Just (RealRegSingle REG_R9)
69
false
false
0
7
15
26
12
14
null
null
brendanhay/gogol
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs
mpl-2.0
-- | Token that can be passed to \`ListServices\` to resume a paginated -- query. lsrNextPageToken :: Lens' ListServicesResponse (Maybe Text) lsrNextPageToken = lens _lsrNextPageToken (\ s a -> s{_lsrNextPageToken = a})
227
lsrNextPageToken :: Lens' ListServicesResponse (Maybe Text) lsrNextPageToken = lens _lsrNextPageToken (\ s a -> s{_lsrNextPageToken = a})
145
lsrNextPageToken = lens _lsrNextPageToken (\ s a -> s{_lsrNextPageToken = a})
85
true
true
0
9
39
49
26
23
null
null
gridaphobe/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
tcIdSigBndrName (PartialSig { sig_name = n }) = n
49
tcIdSigBndrName (PartialSig { sig_name = n }) = n
49
tcIdSigBndrName (PartialSig { sig_name = n }) = n
49
false
false
0
9
8
21
11
10
null
null
haskell-faceted/haskell-faceted
Faceted/Pure.hs
apache-2.0
-- | < k ? x : bottom > ====> makePrivate k x makePrivate :: Label -> a -> Faceted a makePrivate k x = Faceted k (Raw x) (bottom)
133
makePrivate :: Label -> a -> Faceted a makePrivate k x = Faceted k (Raw x) (bottom)
83
makePrivate k x = Faceted k (Raw x) (bottom)
44
true
true
0
7
33
44
22
22
null
null
fmapfmapfmap/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/ExitStandby.hs
mpl-2.0
-- | The response status code. esrsResponseStatus :: Lens' ExitStandbyResponse Int esrsResponseStatus = lens _esrsResponseStatus (\ s a -> s{_esrsResponseStatus = a})
166
esrsResponseStatus :: Lens' ExitStandbyResponse Int esrsResponseStatus = lens _esrsResponseStatus (\ s a -> s{_esrsResponseStatus = a})
135
esrsResponseStatus = lens _esrsResponseStatus (\ s a -> s{_esrsResponseStatus = a})
83
true
true
0
9
21
40
22
18
null
null
vincenthz/hs-crypto-pubkey
Tests/Tests.hs
bsd-2-clause
assertEq (Right got) (Right exp) = if got == exp then True else error ("got: " ++ show got ++ "\nexp: " ++ show exp)
116
assertEq (Right got) (Right exp) = if got == exp then True else error ("got: " ++ show got ++ "\nexp: " ++ show exp)
116
assertEq (Right got) (Right exp) = if got == exp then True else error ("got: " ++ show got ++ "\nexp: " ++ show exp)
116
false
false
0
11
24
61
29
32
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Get.hs
mpl-2.0
-- | Creates a value of 'ManagedConfigurationsforDeviceGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'mcdgXgafv' -- -- * 'mcdgUploadProtocol' -- -- * 'mcdgEnterpriseId' -- -- * 'mcdgAccessToken' -- -- * 'mcdgUploadType' -- -- * ...
1,180
managedConfigurationsforDeviceGet :: Text -- ^ 'mcdgEnterpriseId' -> Text -- ^ 'mcdgUserId' -> Text -- ^ 'mcdgDeviceId' -> Text -- ^ 'mcdgManagedConfigurationForDeviceId' -> ManagedConfigurationsforDeviceGet managedConfigurationsforDeviceGet pMcdgEnterpriseId_ pMcdgUserId_ pMcdgDeviceId_ pMcdgManage...
755
managedConfigurationsforDeviceGet pMcdgEnterpriseId_ pMcdgUserId_ pMcdgDeviceId_ pMcdgManagedConfigurationForDeviceId_ = ManagedConfigurationsforDeviceGet' { _mcdgXgafv = Nothing , _mcdgUploadProtocol = Nothing , _mcdgEnterpriseId = pMcdgEnterpriseId_ , _mcdgAccessToken = Nothing , _mcdgUploadType...
527
true
true
0
10
202
126
82
44
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ClearValuesResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cvrClearedRange' -- -- * 'cvrSpreadsheetId' clearValuesResponse :: ClearValuesResponse clearValuesResponse = ClearValuesResponse' {_cv...
373
clearValuesResponse :: ClearValuesResponse clearValuesResponse = ClearValuesResponse' {_cvrClearedRange = Nothing, _cvrSpreadsheetId = Nothing}
149
clearValuesResponse = ClearValuesResponse' {_cvrClearedRange = Nothing, _cvrSpreadsheetId = Nothing}
102
true
true
0
7
55
42
24
18
null
null
bitemyapp/varying
src/Example.hs
mit
-- Our time signal. time :: Var IO a Float time = deltaUTC
58
time :: Var IO a Float time = deltaUTC
38
time = deltaUTC
15
true
true
0
6
12
25
11
14
null
null
pellagic-puffbomb/simpleservantblog
app/Main.hs
bsd-3-clause
main :: IO () main = do port' <- lookupEnv "SERVER_PORT" port <- case port' of Nothing -> pure 9005 Just p -> pure $ read p environ <- lookupEnv "ENVIRONMENT" environment <- case environ of Nothing -> pure Production Just env -> pure (read env :: Environment) rs <- mkRandomSource drgNew 1000...
1,491
main :: IO () main = do port' <- lookupEnv "SERVER_PORT" port <- case port' of Nothing -> pure 9005 Just p -> pure $ read p environ <- lookupEnv "ENVIRONMENT" environment <- case environ of Nothing -> pure Production Just env -> pure (read env :: Environment) rs <- mkRandomSource drgNew 1000...
1,491
main = do port' <- lookupEnv "SERVER_PORT" port <- case port' of Nothing -> pure 9005 Just p -> pure $ read p environ <- lookupEnv "ENVIRONMENT" environment <- case environ of Nothing -> pure Production Just env -> pure (read env :: Environment) rs <- mkRandomSource drgNew 1000 sk <- gene...
1,477
false
true
0
14
409
401
192
209
null
null
ComputationWithBoundedResources/tct-core
src/Tct/Core/Data/Declaration.hs
bsd-3-clause
declare :: (ToHList a, HListOf a ~ args, Uncurry (ArgsType args :-> Ret (ArgsType args) f) ~ f) => String -- ^ name/identifuer -> [String] -- ^ description -> a -- ^ heterogenous list of arguments -> f -- ^ function -> Declaration (args :-> Ret (ArgsType args) f) declare n desc ...
353
declare :: (ToHList a, HListOf a ~ args, Uncurry (ArgsType args :-> Ret (ArgsType args) f) ~ f) => String -- ^ name/identifuer -> [String] -- ^ description -> a -- ^ heterogenous list of arguments -> f -- ^ function -> Declaration (args :-> Ret (ArgsType args) f) declare n desc ...
353
declare n desc as p = Decl n desc p (toHList as)
48
false
true
0
15
101
131
66
65
null
null
ailiev/faerieplay-compiler
Faerieplay/HoistStms.hs
bsd-3-clause
flatAss :: Stm -> [Stm] flatAss s@(SAss lval val) = let val_h = hoist val in case val_h of (ESeq stms e) -> stms ++ [(SAss lval e)] _ -> [s]
255
flatAss :: Stm -> [Stm] flatAss s@(SAss lval val) = let val_h = hoist val in case val_h of (ESeq stms e) -> stms ++ [(SAss lval e)] _ -> [s]
255
flatAss s@(SAss lval val) = let val_h = hoist val in case val_h of (ESeq stms e) -> stms ++ [(SAss lval e)] _ -> [s]
231
false
true
0
13
145
88
45
43
null
null
sordina/uniqhash
Text/UniqhashLazyIO.hs
mit
blank (' ':xs) = blank xs
25
blank (' ':xs) = blank xs
25
blank (' ':xs) = blank xs
25
false
false
0
7
5
19
9
10
null
null
mpickering/slack-api
example/ReactionBot.hs
mit
reactionBot :: SlackHandle -> IO () reactionBot h = forever $ do getNextEvent h >>= \case (Message cid _ _ ts _ _) -> void . runExceptT $ addReaction h cid "thumbsup" ts _ -> return ()
214
reactionBot :: SlackHandle -> IO () reactionBot h = forever $ do getNextEvent h >>= \case (Message cid _ _ ts _ _) -> void . runExceptT $ addReaction h cid "thumbsup" ts _ -> return ()
214
reactionBot h = forever $ do getNextEvent h >>= \case (Message cid _ _ ts _ _) -> void . runExceptT $ addReaction h cid "thumbsup" ts _ -> return ()
178
false
true
0
13
66
89
42
47
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Layout/PerWorkspace.hs
bsd-2-clause
-- | Specify a layout modifier to apply to a particular workspace; layouts -- on all other workspaces will remain unmodified. modWorkspace :: (LayoutClass l1 a, LayoutClass l2 a) => WorkspaceId -- ^ tag of the workspace to match -> (l2 a -> l1 a) -- ^ the modifier to apply on the matchin...
461
modWorkspace :: (LayoutClass l1 a, LayoutClass l2 a) => WorkspaceId -- ^ tag of the workspace to match -> (l2 a -> l1 a) -- ^ the modifier to apply on the matching workspace -> l2 a -- ^ the base layout -> PerWorkspace l1 l2 a modWorkspace wsId = modWork...
333
modWorkspace wsId = modWorkspaces [wsId]
40
true
true
0
10
140
79
41
38
null
null
3of8/heap
Test/Heap.hs
bsd-2-clause
splitAtProperty :: (HeapItem pol item, Ord (Val pol item)) => Int -> Heap pol item -> Bool splitAtProperty n heap = let (before, after) = splitAt n heap in n < 0 || length before == n || isEmpty after && heap == fromAscList before `union` after
264
splitAtProperty :: (HeapItem pol item, Ord (Val pol item)) => Int -> Heap pol item -> Bool splitAtProperty n heap = let (before, after) = splitAt n heap in n < 0 || length before == n || isEmpty after && heap == fromAscList before `union` after
264
splitAtProperty n heap = let (before, after) = splitAt n heap in n < 0 || length before == n || isEmpty after && heap == fromAscList before `union` after
169
false
true
0
13
66
116
57
59
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_REBOL_FILE :: Int wxSTC_REBOL_FILE = 15
45
wxSTC_REBOL_FILE :: Int wxSTC_REBOL_FILE = 15
45
wxSTC_REBOL_FILE = 15
21
false
true
0
6
5
18
7
11
null
null
ml9951/ghc
compiler/nativeGen/SPARC/CodeGen.hs
bsd-3-clause
genJump :: CmmExpr{-the branch target-} -> NatM InstrBlock genJump (CmmLit (CmmLabel lbl)) = return (toOL [CALL (Left target) 0 True, NOP]) where target = ImmCLbl lbl
175
genJump :: CmmExpr{-the branch target-} -> NatM InstrBlock genJump (CmmLit (CmmLabel lbl)) = return (toOL [CALL (Left target) 0 True, NOP]) where target = ImmCLbl lbl
174
genJump (CmmLit (CmmLabel lbl)) = return (toOL [CALL (Left target) 0 True, NOP]) where target = ImmCLbl lbl
115
false
true
0
11
34
73
36
37
null
null
mettekou/ghc
compiler/ghci/GHCi.hs
bsd-3-clause
-- | loadDLL loads a dynamic library using the OS's native linker -- (i.e. dlopen() on Unix, LoadLibrary() on Windows). It takes either -- an absolute pathname to the file, or a relative filename -- (e.g. "libfoo.so" or "foo.dll"). In the latter case, loadDLL -- searches the standard locations for the appropriate lib...
499
loadDLL :: HscEnv -> String -> IO (Maybe String) loadDLL hsc_env str = iservCmd hsc_env (LoadDLL str)
101
loadDLL hsc_env str = iservCmd hsc_env (LoadDLL str)
52
true
true
0
9
89
54
31
23
null
null
urv/fixhs
src/Data/FIX/Spec/FIX42.hs
lgpl-2.1
mSettlementInstructions :: FIXMessageSpec mSettlementInstructions = FMSpec { msName = "SettlementInstructions" , msType = C.pack "T" , msHeader = headerFIX42 , msBody = mSettlementInstructionsBody , msTrailer = trailerFIX42 } where mSettlementInstructionsBody = LT.insert (tnum tSettlInstID) ...
2,504
mSettlementInstructions :: FIXMessageSpec mSettlementInstructions = FMSpec { msName = "SettlementInstructions" , msType = C.pack "T" , msHeader = headerFIX42 , msBody = mSettlementInstructionsBody , msTrailer = trailerFIX42 } where mSettlementInstructionsBody = LT.insert (tnum tSettlInstID) ...
2,504
mSettlementInstructions = FMSpec { msName = "SettlementInstructions" , msType = C.pack "T" , msHeader = headerFIX42 , msBody = mSettlementInstructionsBody , msTrailer = trailerFIX42 } where mSettlementInstructionsBody = LT.insert (tnum tSettlInstID) tSettlInstID $ LT.insert (tnum tSett...
2,462
false
true
0
44
454
667
321
346
null
null
facebookincubator/duckling
tests/Duckling/Duration/GA/Tests.hs
bsd-3-clause
tests :: TestTree tests = testGroup "GA Tests" [ makeCorpusTest [Seal Duration] corpus ]
92
tests :: TestTree tests = testGroup "GA Tests" [ makeCorpusTest [Seal Duration] corpus ]
92
tests = testGroup "GA Tests" [ makeCorpusTest [Seal Duration] corpus ]
74
false
true
0
8
17
31
15
16
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/PlayLists/List.hs
mpl-2.0
-- | Return the playlists with the given IDs for Stubby or Apiary. pllId :: Lens' PlayListsList [Text] pllId = lens _pllId (\ s a -> s{_pllId = a}) . _Default . _Coerce
176
pllId :: Lens' PlayListsList [Text] pllId = lens _pllId (\ s a -> s{_pllId = a}) . _Default . _Coerce
109
pllId = lens _pllId (\ s a -> s{_pllId = a}) . _Default . _Coerce
73
true
true
0
11
40
53
28
25
null
null
meiersi-11ce/stack
src/Stack/Docker.hs
bsd-3-clause
-- | Subdirectories of the home directory to sandbox between GHC/Stackage versions. sandboxedHomeSubdirectories :: [Path Rel Dir] sandboxedHomeSubdirectories = [$(mkRelDir ".ghc/") ,$(mkRelDir ".cabal/") ,$(mkRelDir ".ghcjs/")]
233
sandboxedHomeSubdirectories :: [Path Rel Dir] sandboxedHomeSubdirectories = [$(mkRelDir ".ghc/") ,$(mkRelDir ".cabal/") ,$(mkRelDir ".ghcjs/")]
149
sandboxedHomeSubdirectories = [$(mkRelDir ".ghc/") ,$(mkRelDir ".cabal/") ,$(mkRelDir ".ghcjs/")]
103
true
true
0
8
30
50
26
24
null
null
phaul/chess
Chess/UCI.hs
bsd-3-clause
execute CmdStop st = do s <- readIORef st atomically $ writeTVar (s^.aborted) True
96
execute CmdStop st = do s <- readIORef st atomically $ writeTVar (s^.aborted) True
96
execute CmdStop st = do s <- readIORef st atomically $ writeTVar (s^.aborted) True
96
false
false
0
10
27
42
18
24
null
null
greydot/dns
Network/DNS/Decode.hs
bsd-3-clause
getResourceRecords :: Int -> SGet [ResourceRecord] getResourceRecords n = replicateM n getResourceRecord
104
getResourceRecords :: Int -> SGet [ResourceRecord] getResourceRecords n = replicateM n getResourceRecord
104
getResourceRecords n = replicateM n getResourceRecord
53
false
true
0
7
11
29
14
15
null
null
snapframework/snap-server
src/Snap/Internal/Http/Server/Socket.hs
bsd-3-clause
sendFileFunc sock !_ builder fPath offset nbytes = bracket acquire closeFd go where acquire = openFd fPath ReadOnly Nothing defaultFileFlags #if MIN_VERSION_network(3,0,0) go fileFd = do sockFd <- Fd `fmap` fdSocket sock sendHeaders builder sockFd sendFile sockFd fileFd...
1,197
sendFileFunc sock !_ builder fPath offset nbytes = bracket acquire closeFd go where acquire = openFd fPath ReadOnly Nothing defaultFileFlags #if MIN_VERSION_network(3,0,0) go fileFd = do sockFd <- Fd `fmap` fdSocket sock sendHeaders builder sockFd sendFile sockFd fileFd...
1,197
sendFileFunc sock !_ builder fPath offset nbytes = bracket acquire closeFd go where acquire = openFd fPath ReadOnly Nothing defaultFileFlags #if MIN_VERSION_network(3,0,0) go fileFd = do sockFd <- Fd `fmap` fdSocket sock sendHeaders builder sockFd sendFile sockFd fileFd...
1,197
false
false
0
9
355
92
44
48
null
null
cgag/selecth
src/Score.hs
mit
-- penalize longer choice strings -- TODO: matchlenghts could probably be a fold over the chars -- instead of using tails score :: Text -> Text -> Double score q choice | T.null q = 1 | T.null choice = 0 | otherwise = let minLength = minMatchLength q choice in normalizeScore minLeng...
1,224
score :: Text -> Text -> Double score q choice | T.null q = 1 | T.null choice = 0 | otherwise = let minLength = minMatchLength q choice in normalizeScore minLength q choice where minMatchLength :: Text -> Text -> Int minMatchLength (T.uncons -> Nothing) _ = 1 minMatchL...
1,100
score q choice | T.null q = 1 | T.null choice = 0 | otherwise = let minLength = minMatchLength q choice in normalizeScore minLength q choice where minMatchLength :: Text -> Text -> Int minMatchLength (T.uncons -> Nothing) _ = 1 minMatchLength _ (T.uncons -> Nothing) =...
1,068
true
true
1
19
460
411
208
203
null
null
nullobject/flatland-haskell
src/Collision.hs
bsd-3-clause
newBody :: Body newBody = Body { bodyPosition = zeroV , bodyVelocity = zeroV , bodyRotation = 0.0 , bodyInverseMass = 1.0 , bodyExtents = (0.5, 0.5) }
238
newBody :: Body newBody = Body { bodyPosition = zeroV , bodyVelocity = zeroV , bodyRotation = 0.0 , bodyInverseMass = 1.0 , bodyExtents = (0.5, 0.5) }
238
newBody = Body { bodyPosition = zeroV , bodyVelocity = zeroV , bodyRotation = 0.0 , bodyInverseMass = 1.0 , bodyExtents = (0.5, 0.5) }
222
false
true
0
8
115
59
33
26
null
null
IreneKnapp/Faction
faction/Distribution/Client/Dependency/Modular/Dependency.hs
bsd-3-clause
goalReasonsToVars :: Ord qpn => GoalReasons qpn -> ConflictSet qpn goalReasonsToVars = S.unions . L.map goalReasonToVars
120
goalReasonsToVars :: Ord qpn => GoalReasons qpn -> ConflictSet qpn goalReasonsToVars = S.unions . L.map goalReasonToVars
120
goalReasonsToVars = S.unions . L.map goalReasonToVars
53
false
true
0
7
15
39
18
21
null
null
davmre/matrizer
web/Application.hs
gpl-2.0
shutdownApp :: App -> IO () shutdownApp _ = return ()
53
shutdownApp :: App -> IO () shutdownApp _ = return ()
53
shutdownApp _ = return ()
25
false
true
0
8
10
32
14
18
null
null
zcourts/Stasis
src/Control/Unsafe/Stasis.hs
bsd-3-clause
stasis :: a -> Pod a stasis v = let p = unsafePerformIO $ newIORef M.empty c = unsafePerformIO $ newIORef Content { contentVal = v, stasisVersion = 1} in Stasis{val = c, frozenVersions = p }
244
stasis :: a -> Pod a stasis v = let p = unsafePerformIO $ newIORef M.empty c = unsafePerformIO $ newIORef Content { contentVal = v, stasisVersion = 1} in Stasis{val = c, frozenVersions = p }
244
stasis v = let p = unsafePerformIO $ newIORef M.empty c = unsafePerformIO $ newIORef Content { contentVal = v, stasisVersion = 1} in Stasis{val = c, frozenVersions = p }
223
false
true
0
12
90
90
45
45
null
null
bgamari/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
getParaProps :: Bool -> WS [Element] getParaProps displayMathPara = do props <- gets stParaProperties listLevel <- gets stListLevel numid <- gets stListNumId let listPr = if listLevel >= 0 && not displayMathPara then [ mknode "w:numPr" [] [ mknode "w:numId" [("w:val",s...
565
getParaProps :: Bool -> WS [Element] getParaProps displayMathPara = do props <- gets stParaProperties listLevel <- gets stListLevel numid <- gets stListNumId let listPr = if listLevel >= 0 && not displayMathPara then [ mknode "w:numPr" [] [ mknode "w:numId" [("w:val",s...
565
getParaProps displayMathPara = do props <- gets stParaProperties listLevel <- gets stListLevel numid <- gets stListNumId let listPr = if listLevel >= 0 && not displayMathPara then [ mknode "w:numPr" [] [ mknode "w:numId" [("w:val",show numid)] () ...
528
false
true
0
17
219
187
92
95
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/Item.hs
bsd-3-clause
strongestSlot :: DiscoveryBenefit -> Ability.EqpSlot -> [(ItemId, ItemFullKit)] -> [(Int, (ItemId, ItemFullKit))] strongestSlot discoBenefit eqpSlot is = let f (iid, (itemFull, kit)) = let Benefit{benInEqp, benPickup, benMelee} = discoBenefit EM.! iid in if not benInEqp then N...
1,605
strongestSlot :: DiscoveryBenefit -> Ability.EqpSlot -> [(ItemId, ItemFullKit)] -> [(Int, (ItemId, ItemFullKit))] strongestSlot discoBenefit eqpSlot is = let f (iid, (itemFull, kit)) = let Benefit{benInEqp, benPickup, benMelee} = discoBenefit EM.! iid in if not benInEqp then N...
1,605
strongestSlot discoBenefit eqpSlot is = let f (iid, (itemFull, kit)) = let Benefit{benInEqp, benPickup, benMelee} = discoBenefit EM.! iid in if not benInEqp then Nothing else Just $ let ben = case eqpSlot of EqpSlotWeaponFast -> ...
1,477
false
true
0
22
652
296
158
138
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_ASN1_SCALAR :: Int wxSTC_ASN1_SCALAR = 5
46
wxSTC_ASN1_SCALAR :: Int wxSTC_ASN1_SCALAR = 5
46
wxSTC_ASN1_SCALAR = 5
21
false
true
0
6
5
18
7
11
null
null
andir/ganeti
src/Ganeti/THH/HsRPC.hs
bsd-2-clause
mkRpcCall :: Name -> Q [Dec] mkRpcCall name = do let bname = nameBase name fname = mkName bname -- the name of the generated function (args, rtype) <- funArgs <$> typeOfFun name rarg <- argumentType rtype let ftype = foldr (\a t -> AppT (AppT ArrowT a) t) (AppT (ConT ''RpcClientMonad)...
601
mkRpcCall :: Name -> Q [Dec] mkRpcCall name = do let bname = nameBase name fname = mkName bname -- the name of the generated function (args, rtype) <- funArgs <$> typeOfFun name rarg <- argumentType rtype let ftype = foldr (\a t -> AppT (AppT ArrowT a) t) (AppT (ConT ''RpcClientMonad)...
601
mkRpcCall name = do let bname = nameBase name fname = mkName bname -- the name of the generated function (args, rtype) <- funArgs <$> typeOfFun name rarg <- argumentType rtype let ftype = foldr (\a t -> AppT (AppT ArrowT a) t) (AppT (ConT ''RpcClientMonad) rarg) args body <- [| $(cu...
572
false
true
0
16
154
187
92
95
null
null
diagrams/diagrams-contrib
src/Diagrams/Color/XKCD.hs
bsd-3-clause
clayBrown = fromJust $ readHexColor "#b2713d"
57
clayBrown = fromJust $ readHexColor "#b2713d"
57
clayBrown = fromJust $ readHexColor "#b2713d"
57
false
false
0
6
17
13
6
7
null
null
simonmichael/hledger
hledger-lib/Text/Megaparsec/Custom.hs
gpl-3.0
-- | Like megaparsec's 'customFailure', but as a "final" parse error. finalCustomFailure :: (MonadParsec e s m, MonadError (FinalParseError' e) m) => e -> m a finalCustomFailure = finalFancyFailure . S.singleton . ErrorCustom
228
finalCustomFailure :: (MonadParsec e s m, MonadError (FinalParseError' e) m) => e -> m a finalCustomFailure = finalFancyFailure . S.singleton . ErrorCustom
157
finalCustomFailure = finalFancyFailure . S.singleton . ErrorCustom
66
true
true
0
8
35
60
30
30
null
null
HIPERFIT/futhark
src/Futhark/CLI/Bench.hs
isc
initialBenchOptions :: BenchOptions initialBenchOptions = BenchOptions "c" Nothing "" 10 [] [] Nothing (-1) False ["nobench", "disable"] [] Nothing (Just "tuning") Nothing 0 Nothing
247
initialBenchOptions :: BenchOptions initialBenchOptions = BenchOptions "c" Nothing "" 10 [] [] Nothing (-1) False ["nobench", "disable"] [] Nothing (Just "tuning") Nothing 0 Nothing
247
initialBenchOptions = BenchOptions "c" Nothing "" 10 [] [] Nothing (-1) False ["nobench", "disable"] [] Nothing (Just "tuning") Nothing 0 Nothing
211
false
true
0
6
89
89
36
53
null
null
urbanslug/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
conT :: Name -> TypeQ conT = return . ConT
42
conT :: Name -> TypeQ conT = return . ConT
42
conT = return . ConT
20
false
true
0
5
9
19
10
9
null
null
creichert/wai
wai/Network/Wai.hs
mit
mapResponseHeaders f (ResponseBuilder s h b) = ResponseBuilder s (f h) b
72
mapResponseHeaders f (ResponseBuilder s h b) = ResponseBuilder s (f h) b
72
mapResponseHeaders f (ResponseBuilder s h b) = ResponseBuilder s (f h) b
72
false
false
0
7
11
36
16
20
null
null
jeffchao/hedgewars-accessible
gameServer/RoomsAndClients.hs
gpl-2.0
lobbyId :: RoomIndex lobbyId = RoomIndex firstIndex
51
lobbyId :: RoomIndex lobbyId = RoomIndex firstIndex
51
lobbyId = RoomIndex firstIndex
30
false
true
0
6
6
21
8
13
null
null
ninedotnine/bugfree-computing-machine
src/ObjParser.hs
gpl-3.0
-- FIXME : this discards the name of the entry. is that okay? entry :: MyParser () entry = do ent <- string "ENTRY " *> label *> skipSpaces *> readNum <* skipToEOL info <- getState when (getEntry info /= Nothing) $ fail "multiple ENTRY" putState $ setEntry (Just ent) info
290
entry :: MyParser () entry = do ent <- string "ENTRY " *> label *> skipSpaces *> readNum <* skipToEOL info <- getState when (getEntry info /= Nothing) $ fail "multiple ENTRY" putState $ setEntry (Just ent) info
227
entry = do ent <- string "ENTRY " *> label *> skipSpaces *> readNum <* skipToEOL info <- getState when (getEntry info /= Nothing) $ fail "multiple ENTRY" putState $ setEntry (Just ent) info
206
true
true
0
13
68
97
43
54
null
null
R-Morgan/NGramCrackers
src/NGramCrackers/Ops/Pretty.hs
agpl-3.0
typeTokenRatio :: T.Text -> T.Text typeTokenRatio string = typeStr <#> ps types <#> tokStr <#> ps tokens <#> ttrStr <#> ratio where types = (fromIntegral . length . nub . T.words) string tokens = (fromIntegral . length . T.words) strin...
615
typeTokenRatio :: T.Text -> T.Text typeTokenRatio string = typeStr <#> ps types <#> tokStr <#> ps tokens <#> ttrStr <#> ratio where types = (fromIntegral . length . nub . T.words) string tokens = (fromIntegral . length . T.words) strin...
615
typeTokenRatio string = typeStr <#> ps types <#> tokStr <#> ps tokens <#> ttrStr <#> ratio where types = (fromIntegral . length . nub . T.words) string tokens = (fromIntegral . length . T.words) string ratio...
579
false
true
0
11
307
159
81
78
null
null
brendanhay/gogol
gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Insert.hs
mpl-2.0
-- | Parent task identifier. If the task is created at the top level, this -- parameter is omitted. Optional. tiParent :: Lens' TasksInsert (Maybe Text) tiParent = lens _tiParent (\ s a -> s{_tiParent = a})
206
tiParent :: Lens' TasksInsert (Maybe Text) tiParent = lens _tiParent (\ s a -> s{_tiParent = a})
96
tiParent = lens _tiParent (\ s a -> s{_tiParent = a})
53
true
true
0
9
36
47
26
21
null
null
letsbreelhere/egg
src/Unification/TyContext.hs
bsd-3-clause
addContext :: (String, Scheme) -> TyContext -> TyContext addContext (x, t) (TyContext env) = TyContext $ Map.insert x t env
123
addContext :: (String, Scheme) -> TyContext -> TyContext addContext (x, t) (TyContext env) = TyContext $ Map.insert x t env
123
addContext (x, t) (TyContext env) = TyContext $ Map.insert x t env
66
false
true
0
7
19
60
30
30
null
null
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Zones/Revert.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). acwzrUploadType :: Lens' AccountsContainersWorkspacesZonesRevert (Maybe Text) acwzrUploadType = lens _acwzrUploadType (\ s a -> s{_acwzrUploadType = a})
231
acwzrUploadType :: Lens' AccountsContainersWorkspacesZonesRevert (Maybe Text) acwzrUploadType = lens _acwzrUploadType (\ s a -> s{_acwzrUploadType = a})
160
acwzrUploadType = lens _acwzrUploadType (\ s a -> s{_acwzrUploadType = a})
82
true
true
0
9
34
48
25
23
null
null
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Solver/Monad.hs
bsd-3-clause
progIter :: Bool -> SolveM () progIter newScc = lift $ when newScc progressTick
79
progIter :: Bool -> SolveM () progIter newScc = lift $ when newScc progressTick
79
progIter newScc = lift $ when newScc progressTick
49
false
true
0
7
13
32
15
17
null
null
diku-dk/futhark
src/Futhark/Analysis/MemAlias.hs
isc
analyzeHostOp m (SegOp (SegRed _ _ _ _ kbody)) = analyzeStms (kernelBodyStms kbody) m
87
analyzeHostOp m (SegOp (SegRed _ _ _ _ kbody)) = analyzeStms (kernelBodyStms kbody) m
87
analyzeHostOp m (SegOp (SegRed _ _ _ _ kbody)) = analyzeStms (kernelBodyStms kbody) m
87
false
false
0
9
15
42
20
22
null
null
stain/jdk8u
src/macosx/native/jobjc/src/core/PrimitiveCoder.hs
gpl-2.0
ffitypeVal nt = archExpr (ffitype2js $ ffitype W32 nt) (ffitype2js $ ffitype W64 nt)
109
ffitypeVal nt = archExpr (ffitype2js $ ffitype W32 nt) (ffitype2js $ ffitype W64 nt)
109
ffitypeVal nt = archExpr (ffitype2js $ ffitype W32 nt) (ffitype2js $ ffitype W64 nt)
109
false
false
1
8
38
43
18
25
null
null
nevrenato/HetsAlloy
CMDL/Utils.hs
gpl-2.0
safeTail :: [a] -> [a] safeTail = drop 1
40
safeTail :: [a] -> [a] safeTail = drop 1
40
safeTail = drop 1
17
false
true
0
6
8
24
13
11
null
null
ekmett/ansi-terminal
System/Console/ANSI/Unix.hs
bsd-3-clause
-- | Thanks to Brandon S. Allbery and Curt Sampson for pointing me in the right direction on xterm title setting on haskell-cafe. -- The "0" signifies that both the title and "icon" text should be set: i.e. the text for the window in the Start bar (or similar) -- as well as that in the actual window title. This is cho...
445
setTitleCode title = "\ESC]0;" ++ filter (/= '\007') title ++ "\007"
68
setTitleCode title = "\ESC]0;" ++ filter (/= '\007') title ++ "\007"
68
true
false
1
8
80
33
16
17
null
null
mgeorgoulopoulos/TetrisHaskellWeekend
Logic.hs
mit
canPieceBeAt :: Piece -> (Int, Int) -> Well -> Bool canPieceBeAt piece coord well = insidePlayfield && (not colliding) where insidePlayfield = validPos coord piece colliding = pieceCollides piece coord well -- Moves the current piece one cell down
264
canPieceBeAt :: Piece -> (Int, Int) -> Well -> Bool canPieceBeAt piece coord well = insidePlayfield && (not colliding) where insidePlayfield = validPos coord piece colliding = pieceCollides piece coord well -- Moves the current piece one cell down
263
canPieceBeAt piece coord well = insidePlayfield && (not colliding) where insidePlayfield = validPos coord piece colliding = pieceCollides piece coord well -- Moves the current piece one cell down
211
false
true
1
7
55
72
37
35
null
null
swamp-agr/carbuyer-advisor
Handler/Search.hs
mit
choosePriceAdvice :: Score -> Text choosePriceAdvice OutLeft = "9"
67
choosePriceAdvice :: Score -> Text choosePriceAdvice OutLeft = "9"
67
choosePriceAdvice OutLeft = "9"
32
false
true
0
5
9
18
9
9
null
null
himura/ghc-mod
Gap.hs
bsd-3-clause
getSrcSpan _ = Nothing
22
getSrcSpan _ = Nothing
22
getSrcSpan _ = Nothing
22
false
false
0
5
3
9
4
5
null
null
prb/perpubplat
src/Blog/Widgets/StreamOfConsciousness/RssUtilities.hs
bsd-3-clause
rss1_pfx :: Maybe String rss1_pfx = Just "rss"
46
rss1_pfx :: Maybe String rss1_pfx = Just "rss"
46
rss1_pfx = Just "rss"
21
false
true
0
6
7
23
9
14
null
null
Mathnerd314/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/FlyNav.hs
gpl-3.0
cap :: Size -> Vector2 Widget.R -> Vector2 Widget.R cap size = liftA2 max 0 . liftA2 min size
93
cap :: Size -> Vector2 Widget.R -> Vector2 Widget.R cap size = liftA2 max 0 . liftA2 min size
93
cap size = liftA2 max 0 . liftA2 min size
41
false
true
1
9
18
53
22
31
null
null
egaburov/funstuff
Haskell/parsec/PutJSON.hs
apache-2.0
renderJValue (JNumber n) = show n
35
renderJValue (JNumber n) = show n
35
renderJValue (JNumber n) = show n
35
false
false
0
6
7
19
8
11
null
null
trbauer/hrun
HRun.hs
mit
defaultArgs = Args False False False "" []
42
defaultArgs = Args False False False "" []
42
defaultArgs = Args False False False "" []
42
false
false
1
6
7
23
9
14
null
null
mietek/experiment-floyd-warshall
src/RegExp.hs
mit
eval _ (RegExp Empty) = one
33
eval _ (RegExp Empty) = one
33
eval _ (RegExp Empty) = one
33
false
false
0
7
11
17
8
9
null
null
atsukotakahashi/wi
src/library/Yi/Keymap/Vim/Ex/Commands/Cabal.hs
gpl-2.0
-- TODO: Either hack Text into these parsec parsers or use Attoparsec. -- Attoparsec is faster anyway and backtracks by default so we may -- want to use that anyway. parse :: EventString -> Maybe ExCommand parse = Common.parse $ do void $ P.try (P.string "cabal build") <|> P.try (P.string "cabal") args <- Comm...
481
parse :: EventString -> Maybe ExCommand parse = Common.parse $ do void $ P.try (P.string "cabal build") <|> P.try (P.string "cabal") args <- Common.commandArgs return $ Common.impureExCommand { cmdShow = T.pack "cabal build" , cmdAction = YiA $ cabalBuildE $ CommandArguments args }
314
parse = Common.parse $ do void $ P.try (P.string "cabal build") <|> P.try (P.string "cabal") args <- Common.commandArgs return $ Common.impureExCommand { cmdShow = T.pack "cabal build" , cmdAction = YiA $ cabalBuildE $ CommandArguments args }
274
true
true
0
13
105
112
56
56
null
null
tomahawkins/powerpc
Language/PowerPC/Simulator.hs
bsd-3-clause
step :: Memory a => a -> Word32 -> Machine -> IO Machine step memory instr m = do (m, env) <- evalStmt (m, []) $ snd $ rtl (pc m) instr return m { pc = fromInteger $ lookup' "NIA" env } where evalStmt :: (Machine, [(String, Integer)]) -> Stmt -> IO (Machine, [(String, Integer)]) evalStmt (m, env) a = case a...
7,797
step :: Memory a => a -> Word32 -> Machine -> IO Machine step memory instr m = do (m, env) <- evalStmt (m, []) $ snd $ rtl (pc m) instr return m { pc = fromInteger $ lookup' "NIA" env } where evalStmt :: (Machine, [(String, Integer)]) -> Stmt -> IO (Machine, [(String, Integer)]) evalStmt (m, env) a = case a...
7,797
step memory instr m = do (m, env) <- evalStmt (m, []) $ snd $ rtl (pc m) instr return m { pc = fromInteger $ lookup' "NIA" env } where evalStmt :: (Machine, [(String, Integer)]) -> Stmt -> IO (Machine, [(String, Integer)]) evalStmt (m, env) a = case a of Seq a -> foldM evalStmt (m, env) a If a b c -...
7,740
false
true
0
28
2,833
3,679
1,841
1,838
null
null
li-zhirui/EoplLangs
src/ImplicitRefs/Data.hs
bsd-3-clause
initEnvironment :: [(String, DenotedValue)] -> Environment initEnvironment = M.fromList
87
initEnvironment :: [(String, DenotedValue)] -> Environment initEnvironment = M.fromList
87
initEnvironment = M.fromList
28
false
true
0
7
8
26
15
11
null
null
seizans/ppl
Handler/Tag.hs
bsd-2-clause
putTagR :: TagId -> Handler () putTagR tagid = do param1 <- lookupPostParams "name" param2 <- lookupPostParams "location" liftIO $ do print param1 print param2 sendResponse ()
207
putTagR :: TagId -> Handler () putTagR tagid = do param1 <- lookupPostParams "name" param2 <- lookupPostParams "location" liftIO $ do print param1 print param2 sendResponse ()
207
putTagR tagid = do param1 <- lookupPostParams "name" param2 <- lookupPostParams "location" liftIO $ do print param1 print param2 sendResponse ()
176
false
true
0
10
58
70
29
41
null
null
teleshoes/taffybar
src/System/Taffybar/Widget/FreedesktopNotifications.hs
bsd-3-clause
startTimeoutThread :: NotifyState -> Notification -> IO () startTimeoutThread s Notification {..} = case noteExpireTimeout of Nothing -> return () Just timeout -> void $ forkIO $ do threadDelay (fromIntegral timeout * 10^(3 :: Int)) notePurge s noteId wakeupDisplayThread s -----------------------------...
371
startTimeoutThread :: NotifyState -> Notification -> IO () startTimeoutThread s Notification {..} = case noteExpireTimeout of Nothing -> return () Just timeout -> void $ forkIO $ do threadDelay (fromIntegral timeout * 10^(3 :: Int)) notePurge s noteId wakeupDisplayThread s -----------------------------...
371
startTimeoutThread s Notification {..} = case noteExpireTimeout of Nothing -> return () Just timeout -> void $ forkIO $ do threadDelay (fromIntegral timeout * 10^(3 :: Int)) notePurge s noteId wakeupDisplayThread s --------------------------------------------------------------------------------
312
false
true
4
12
57
111
51
60
null
null
TomMD/irc-core
driver/Main.hs
bsd-3-clause
doKnock :: Identifier {- ^ channel -} -> ClientState -> IO ClientState doKnock chan st | not available || not isChannel || inChannel = return st | otherwise = do clientSend (knockCmd chan) st return (clearInput st) where conn = view (clientServer0 . ccConnection) st available = view co...
418
doKnock :: Identifier {- ^ channel -} -> ClientState -> IO ClientState doKnock chan st | not available || not isChannel || inChannel = return st | otherwise = do clientSend (knockCmd chan) st return (clearInput st) where conn = view (clientServer0 . ccConnection) st available = view co...
418
doKnock chan st | not available || not isChannel || inChannel = return st | otherwise = do clientSend (knockCmd chan) st return (clearInput st) where conn = view (clientServer0 . ccConnection) st available = view connKnock conn inChannel = has (connChannels . ix chan) conn isChannel = i...
342
false
true
1
10
100
144
68
76
null
null
osa1/chsc
Core/Prettify.hs
bsd-3-clause
prettifyTerm :: IdSupply -> InlineEnv -> In FVedTerm -> (OccursEnv, Out FVedTerm) prettifyTerm ids inline (rn, e) = second fvedTerm $ prettifyTerm' ids inline (rn, fvee e)
171
prettifyTerm :: IdSupply -> InlineEnv -> In FVedTerm -> (OccursEnv, Out FVedTerm) prettifyTerm ids inline (rn, e) = second fvedTerm $ prettifyTerm' ids inline (rn, fvee e)
171
prettifyTerm ids inline (rn, e) = second fvedTerm $ prettifyTerm' ids inline (rn, fvee e)
89
false
true
0
9
26
71
36
35
null
null
anttisalonen/freekick2
src/Match/State/MatchState.hs
gpl-3.0
homeplayers :: MatchState -> PlayerMap homeplayers = players . hometeam
71
homeplayers :: MatchState -> PlayerMap homeplayers = players . hometeam
71
homeplayers = players . hometeam
32
false
true
0
5
9
19
10
9
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | List of detected click tags for assets. This is a read-only, -- auto-generated field. This field is empty for a rich media asset. camaClickTags :: Lens' CreativeAssetMetadata [ClickTag] camaClickTags = lens _camaClickTags (\ s a -> s{_camaClickTags = a}) . _Default . _Coerce
300
camaClickTags :: Lens' CreativeAssetMetadata [ClickTag] camaClickTags = lens _camaClickTags (\ s a -> s{_camaClickTags = a}) . _Default . _Coerce
165
camaClickTags = lens _camaClickTags (\ s a -> s{_camaClickTags = a}) . _Default . _Coerce
109
true
true
0
11
64
52
29
23
null
null
alephcloud/hs-connectivity-test
src/Network/ConnectivityTest.hs
mit
-- -------------------------------------------------------------------------- -- -- Connectivity Test -- TCP checkConnection ∷ ConnectionParams → EitherT ConnectionFailure IO ConnectionResult checkConnection params@ConnectionParams{ cpTrace = True } = go mempty (Just 1) where go e ttl = catchT (run e ttl) $ \e0...
552
checkConnection ∷ ConnectionParams → EitherT ConnectionFailure IO ConnectionResult checkConnection params@ConnectionParams{ cpTrace = True } = go mempty (Just 1) where go e ttl = catchT (run e ttl) $ \e0 → if ttl == cpTtl params then left (e ⊕ e0) else go (e ⊕ e0) ((+ 1) <$> ttl) run e ttl = ...
441
checkConnection params@ConnectionParams{ cpTrace = True } = go mempty (Just 1) where go e ttl = catchT (run e ttl) $ \e0 → if ttl == cpTtl params then left (e ⊕ e0) else go (e ⊕ e0) ((+ 1) <$> ttl) run e ttl = do result ← checkConnection params { cpTtl = ttl , cpTrace = False } ...
358
true
true
3
11
129
200
97
103
null
null
luisnavarrodelangel/InnerEar
src/InnerEar/Exercises/OddEvenAll.hs
gpl-3.0
displayEval :: MonadWidget t m => Dynamic t (Map Answer Score) -> Dynamic t (MultipleChoiceStore Config Answer) -> m () displayEval e _ = displayMultipleChoiceEvaluationGraph ("scoreBarWrapperThreeBars","svgBarContainerThreeBars","svgFaintedLineThreeBars","xLabelThreeBars") "Session Performance" "" answers e
310
displayEval :: MonadWidget t m => Dynamic t (Map Answer Score) -> Dynamic t (MultipleChoiceStore Config Answer) -> m () displayEval e _ = displayMultipleChoiceEvaluationGraph ("scoreBarWrapperThreeBars","svgBarContainerThreeBars","svgFaintedLineThreeBars","xLabelThreeBars") "Session Performance" "" answers e
310
displayEval e _ = displayMultipleChoiceEvaluationGraph ("scoreBarWrapperThreeBars","svgBarContainerThreeBars","svgFaintedLineThreeBars","xLabelThreeBars") "Session Performance" "" answers e
190
false
true
0
10
31
87
43
44
null
null
energyflowanalysis/efa-2.1
src/EFA/Flow/EquationSystem.hs
bsd-3-clause
globalVariableFromResult :: (Verify.GlobalVar mode a (RecIdx.Record (Record.ToIndex rec) var), Sum a, Record rec, FormatValue var) => var -> rec (Result a) -> Writer mode s (SysRecord.Variable mode rec s a) globalVariableFromResult varIdx val = do var <- globalVariable varIdx tell (SysRecord.equalRes...
346
globalVariableFromResult :: (Verify.GlobalVar mode a (RecIdx.Record (Record.ToIndex rec) var), Sum a, Record rec, FormatValue var) => var -> rec (Result a) -> Writer mode s (SysRecord.Variable mode rec s a) globalVariableFromResult varIdx val = do var <- globalVariable varIdx tell (SysRecord.equalRes...
346
globalVariableFromResult varIdx val = do var <- globalVariable varIdx tell (SysRecord.equalResult var val) return var
126
false
true
0
11
66
137
65
72
null
null
olsner/ghc
compiler/cmm/PprC.hs
bsd-3-clause
isStrangeTypeReg (CmmGlobal g) = isStrangeTypeGlobal g
55
isStrangeTypeReg (CmmGlobal g) = isStrangeTypeGlobal g
55
isStrangeTypeReg (CmmGlobal g) = isStrangeTypeGlobal g
55
false
false
0
7
6
18
8
10
null
null
harendra-kumar/asyncly
test/Prop.hs
bsd-3-clause
singleton :: IsStream t => a -> t m a singleton a = a .: nil
60
singleton :: IsStream t => a -> t m a singleton a = a .: nil
60
singleton a = a .: nil
22
false
true
2
8
15
41
18
23
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
valDIdKey = mkPreludeMiscIdUnique 321
53
valDIdKey = mkPreludeMiscIdUnique 321
53
valDIdKey = mkPreludeMiscIdUnique 321
53
false
false
0
5
19
9
4
5
null
null
flocknroll/haskell_cis194
H12/Risk.hs
mit
battle :: Battlefield -> Rand StdGen Battlefield battle bf = do let atk = maxAtk bf def = maxDef bf rollsAtk <- makeRolls atk rollsDef <- makeRolls def let res = calcDiff rollsAtk rollsDef return $ bf `mappend` res ----------------...
362
battle :: Battlefield -> Rand StdGen Battlefield battle bf = do let atk = maxAtk bf def = maxDef bf rollsAtk <- makeRolls atk rollsDef <- makeRolls def let res = calcDiff rollsAtk rollsDef return $ bf `mappend` res ----------------...
362
battle bf = do let atk = maxAtk bf def = maxDef bf rollsAtk <- makeRolls atk rollsDef <- makeRolls def let res = calcDiff rollsAtk rollsDef return $ bf `mappend` res ----------------------------------------------------------
313
false
true
0
10
128
96
43
53
null
null
nomeata/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
isGcPtrLabel :: CLabel -> Bool isGcPtrLabel lbl = case labelType lbl of GcPtrLabel -> True _other -> False -- | Work out the general type of data at the address of this label -- whether it be code, data, or static GC object.
281
isGcPtrLabel :: CLabel -> Bool isGcPtrLabel lbl = case labelType lbl of GcPtrLabel -> True _other -> False -- | Work out the general type of data at the address of this label -- whether it be code, data, or static GC object.
281
isGcPtrLabel lbl = case labelType lbl of GcPtrLabel -> True _other -> False -- | Work out the general type of data at the address of this label -- whether it be code, data, or static GC object.
250
false
true
0
7
99
39
20
19
null
null
hargettp/courier
tests/TestUtils.hs
mit
newTCPAddress :: IO Name newTCPAddress = do NS.SockAddrInet p _ <- availablePort NS.AF_INET NS.Stream return $ Name $ "localhost:" ++ show p
144
newTCPAddress :: IO Name newTCPAddress = do NS.SockAddrInet p _ <- availablePort NS.AF_INET NS.Stream return $ Name $ "localhost:" ++ show p
144
newTCPAddress = do NS.SockAddrInet p _ <- availablePort NS.AF_INET NS.Stream return $ Name $ "localhost:" ++ show p
119
false
true
0
9
25
55
25
30
null
null
pranjaltale16/codeworld
codeworld-game-server/src/CodeWorld/GameServer.hs
apache-2.0
wsApp :: ServerState -> WS.ServerApp wsApp state pending = do conn <- WS.acceptRequest pending WS.forkPingThread conn 30 welcome conn state
151
wsApp :: ServerState -> WS.ServerApp wsApp state pending = do conn <- WS.acceptRequest pending WS.forkPingThread conn 30 welcome conn state
151
wsApp state pending = do conn <- WS.acceptRequest pending WS.forkPingThread conn 30 welcome conn state
114
false
true
0
10
31
58
24
34
null
null
beni55/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/Prim.hs
bsd-3-clause
-- | Reads vector; offset in scalar elements. readWord32OffAddrAsWord32X4# :: Addr# -> Int# -> State# s -> (# State# s,Word32X4# #) readWord32OffAddrAsWord32X4# = let x = x in x
179
readWord32OffAddrAsWord32X4# :: Addr# -> Int# -> State# s -> (# State# s,Word32X4# #) readWord32OffAddrAsWord32X4# = let x = x in x
131
readWord32OffAddrAsWord32X4# = let x = x in x
45
true
true
0
11
30
53
24
29
null
null
florianpilz/autotool
src/Rewriting/Check.hs
gpl-2.0
linear name t = do let vs = mehrfache_variablen t when ( not $ null vs ) $ reject $ vcat [ text "in diesem Term" <+> parens name , nest 4 $ toDoc t , text "kommen diese Variablen mehrfach vor:" , nest 4 $ toDoc vs ]
263
linear name t = do let vs = mehrfache_variablen t when ( not $ null vs ) $ reject $ vcat [ text "in diesem Term" <+> parens name , nest 4 $ toDoc t , text "kommen diese Variablen mehrfach vor:" , nest 4 $ toDoc vs ]
263
linear name t = do let vs = mehrfache_variablen t when ( not $ null vs ) $ reject $ vcat [ text "in diesem Term" <+> parens name , nest 4 $ toDoc t , text "kommen diese Variablen mehrfach vor:" , nest 4 $ toDoc vs ]
263
false
false
0
12
96
95
43
52
null
null
ryantm/ghc
compiler/main/DynFlags.hs
bsd-3-clause
noArg :: (DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags) noArg fn = NoArg (upd fn)
88
noArg :: (DynFlags -> DynFlags) -> OptKind (CmdLineP DynFlags) noArg fn = NoArg (upd fn)
88
noArg fn = NoArg (upd fn)
25
false
true
0
9
14
48
22
26
null
null
anton-k/language-css
src/Language/Css/Build/Idents.hs
bsd-3-clause
-- | margin-width marginWidth :: Idents a => a marginWidth = ident "margin-width"
81
marginWidth :: Idents a => a marginWidth = ident "margin-width"
63
marginWidth = ident "margin-width"
34
true
true
0
6
12
22
11
11
null
null
pascal-knodel/haskell-craft
_/links/E'6'23.hs
mit
------------ -- invertColour -- invertColour'R :: Picture'R -> Picture'R invertColour'R picture'R = map (map invert'R) picture'R
135
invertColour'R :: Picture'R -> Picture'R invertColour'R picture'R = map (map invert'R) picture'R
99
invertColour'R picture'R = map (map invert'R) picture'R
58
true
true
0
7
22
38
17
21
null
null
wei2912/counter
src/Data/Counter.hs
mit
union :: (Ord k, Num v) => Counter k v -- ^ First counter. -> Counter k v -- ^ Second counter. -> Counter k v -- ^ Union of both counters. union = M.unionWith (+)
178
union :: (Ord k, Num v) => Counter k v -- ^ First counter. -> Counter k v -- ^ Second counter. -> Counter k v union = M.unionWith (+)
149
union = M.unionWith (+)
23
true
true
0
9
51
61
31
30
null
null
melted/idris-java
src/IRTS/Java/JTypes.hs
bsd-3-clause
shortType :: J.Type shortType = PrimType ShortT
47
shortType :: J.Type shortType = PrimType ShortT
47
shortType = PrimType ShortT
27
false
true
0
7
6
23
9
14
null
null
keitax/lupo
src/Lupo/View.hs
lgpl-3.0
singleDayView :: E.Page -> N.Navigation (H.HeistT h h) -> E.Comment -> [T.Text] -> [T.Text] -> Getter (ViewFactory h) (View h) singleDayView p n c notice errs = to $ \self -> _singleDayView self p n c notice errs
214
singleDayView :: E.Page -> N.Navigation (H.HeistT h h) -> E.Comment -> [T.Text] -> [T.Text] -> Getter (ViewFactory h) (View h) singleDayView p n c notice errs = to $ \self -> _singleDayView self p n c notice errs
214
singleDayView p n c notice errs = to $ \self -> _singleDayView self p n c notice errs
87
false
true
0
12
39
110
55
55
null
null
bhamrick/HSS
HSS/Color.hs
mit
fireBrick = RGB 0xB2 0x22 0x22
44
fireBrick = RGB 0xB2 0x22 0x22
44
fireBrick = RGB 0xB2 0x22 0x22
44
false
false
0
5
19
13
6
7
null
null
davmre/matrizer
src/Matrizer/Derivatives.hs
gpl-2.0
reduceDifferential v (Branch2 MDiff a b) = let d1 = (reduceDifferential v a) d2 = (reduceDifferential v b) in case (d1, d2) of ( _, (ZeroLeaf _ _)) -> d1 ( (ZeroLeaf _ _), _) -> (Branch2 MScalarProduct (LiteralScalar ...
382
reduceDifferential v (Branch2 MDiff a b) = let d1 = (reduceDifferential v a) d2 = (reduceDifferential v b) in case (d1, d2) of ( _, (ZeroLeaf _ _)) -> d1 ( (ZeroLeaf _ _), _) -> (Branch2 MScalarProduct (LiteralScalar ...
382
reduceDifferential v (Branch2 MDiff a b) = let d1 = (reduceDifferential v a) d2 = (reduceDifferential v b) in case (d1, d2) of ( _, (ZeroLeaf _ _)) -> d1 ( (ZeroLeaf _ _), _) -> (Branch2 MScalarProduct (LiteralScalar ...
382
false
false
0
15
171
146
77
69
null
null
k16shikano/hpdft
hpdft.hs
mit
pageorder :: Int -> [PDFObj] -> PageTree pageorder parent objs = case findObjsByRef parent objs of Just os -> case findDictOfType "/Catalog" os of Just dict -> case findPages dict of Just pr -> pageorder pr objs Nothing -> Nop Nothing -> case findDictOfType "/Pages" os of Jus...
587
pageorder :: Int -> [PDFObj] -> PageTree pageorder parent objs = case findObjsByRef parent objs of Just os -> case findDictOfType "/Catalog" os of Just dict -> case findPages dict of Just pr -> pageorder pr objs Nothing -> Nop Nothing -> case findDictOfType "/Pages" os of Jus...
587
pageorder parent objs = case findObjsByRef parent objs of Just os -> case findDictOfType "/Catalog" os of Just dict -> case findPages dict of Just pr -> pageorder pr objs Nothing -> Nop Nothing -> case findDictOfType "/Pages" os of Just dict -> case findKids dict of ...
546
false
true
0
21
183
209
96
113
null
null
brendanhay/gogol
gogol-iap/gen/Network/Google/IAP/Types/Product.hs
mpl-2.0
-- | Creates a value of 'IapSettings' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'isApplicationSettings' -- -- * 'isAccessSettings' -- -- * 'isName' iapSettings :: IapSettings iapSettings = IapSettings' { _isApplicationS...
401
iapSettings :: IapSettings iapSettings = IapSettings' { _isApplicationSettings = Nothing , _isAccessSettings = Nothing , _isName = Nothing }
162
iapSettings = IapSettings' { _isApplicationSettings = Nothing , _isAccessSettings = Nothing , _isName = Nothing }
131
true
true
0
6
82
40
28
12
null
null
ku-fpg/html-kure
Text/HTML/KURE.hs
bsd-3-clause
--------------------------------------- -- | Flatten into singleton HTMLs. The opposite of mconcat. unconcatHTML :: HTML -> [HTML] unconcatHTML (HTML ts) = map (\ t -> HTML [t]) ts
181
unconcatHTML :: HTML -> [HTML] unconcatHTML (HTML ts) = map (\ t -> HTML [t]) ts
80
unconcatHTML (HTML ts) = map (\ t -> HTML [t]) ts
49
true
true
0
9
27
52
27
25
null
null
albertov/hs-mapnik
bindings/src/Mapnik/Bindings/Symbolizer.hs
bsd-3-clause
defFromName "PolygonPatternSymbolizer" = Just Mapnik.polygonPatternSym
70
defFromName "PolygonPatternSymbolizer" = Just Mapnik.polygonPatternSym
70
defFromName "PolygonPatternSymbolizer" = Just Mapnik.polygonPatternSym
70
false
false
0
6
4
15
6
9
null
null
facebookincubator/duckling
Duckling/Time/KA/Corpus.hs
bsd-3-clause
latentCorpus :: Corpus latentCorpus = (testContext {locale = makeLocale KA Nothing}, testOptions {withLatent = True}, xs) where xs = concat [ examples (datetime (2013, 2, 24, 0, 0, 0) Day) [ "24 თებერვალს" ] , examples (datetime (2013, 2, 12, 7, 0, 0) Hour) ...
470
latentCorpus :: Corpus latentCorpus = (testContext {locale = makeLocale KA Nothing}, testOptions {withLatent = True}, xs) where xs = concat [ examples (datetime (2013, 2, 24, 0, 0, 0) Day) [ "24 თებერვალს" ] , examples (datetime (2013, 2, 12, 7, 0, 0) Hour) ...
470
latentCorpus = (testContext {locale = makeLocale KA Nothing}, testOptions {withLatent = True}, xs) where xs = concat [ examples (datetime (2013, 2, 24, 0, 0, 0) Day) [ "24 თებერვალს" ] , examples (datetime (2013, 2, 12, 7, 0, 0) Hour) [ "7 საათზე" ...
447
false
true
0
10
195
163
95
68
null
null
castaway/pandoc
src/Text/Pandoc/Pretty.hs
gpl-2.0
char :: Char -> Doc char c = text [c]
37
char :: Char -> Doc char c = text [c]
37
char c = text [c]
17
false
true
0
7
9
29
13
16
null
null
gnn/Hets
Maude/Maude2DG.hs
gpl-2.0
{- | instantiate a sort Params: Parameterized sort -> Parameter to be replaced -> New name of the parameter -} instantiateSort :: ParamSort -> [Token] -> [Token] -> ParamSort instantiateSort sp@(Sort tok, tok_params) (p : ps) (v : vs) = if notElem p tok_params then instantiateSort sp ps vs else let tok' = mkSimpl...
429
instantiateSort :: ParamSort -> [Token] -> [Token] -> ParamSort instantiateSort sp@(Sort tok, tok_params) (p : ps) (v : vs) = if notElem p tok_params then instantiateSort sp ps vs else let tok' = mkSimpleId $ instantiateSortString (show tok) (show p) (show v) in instantiateSort (Sort tok', tok_params) ps vs
318
instantiateSort sp@(Sort tok, tok_params) (p : ps) (v : vs) = if notElem p tok_params then instantiateSort sp ps vs else let tok' = mkSimpleId $ instantiateSortString (show tok) (show p) (show v) in instantiateSort (Sort tok', tok_params) ps vs
254
true
true
1
13
78
149
73
76
null
null
cjp256/manager
xenmgr/Vm/React.hs
gpl-2.0
whenE :: VmEvent -> Vm () -> React whenE e f = mkReact $ \e' -> if (e == e') then f else return ()
100
whenE :: VmEvent -> Vm () -> React whenE e f = mkReact $ \e' -> if (e == e') then f else return ()
100
whenE e f = mkReact $ \e' -> if (e == e') then f else return ()
65
false
true
0
9
26
63
31
32
null
null