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
kRITZCREEK/psc-ide
test/PureScript/Ide/FilterSpec.hs
mit
runPrefix s = runFilter (prefixFilter s) modules
48
runPrefix s = runFilter (prefixFilter s) modules
48
runPrefix s = runFilter (prefixFilter s) modules
48
false
false
0
7
6
20
9
11
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/EnumSet.hs
mit
moduleName :: String moduleName = "Data.Edison.Coll.EnumSet"
60
moduleName :: String moduleName = "Data.Edison.Coll.EnumSet"
60
moduleName = "Data.Edison.Coll.EnumSet"
39
false
true
0
4
5
11
6
5
null
null
jgoerzen/testpack
src/Test/QuickCheck/Tools.hs
lgpl-2.1
{- | Compare two values. If same, the test passes. If different, the result indicates what was expected and what was received as part of the error. -} (@=?) :: (Eq a, Show a) => a -> a -> Result expected @=? actual = MkResult {ok = Just (expected == actual), #if MIN_VERSION_QuickCheck(2,7,0) ...
566
(@=?) :: (Eq a, Show a) => a -> a -> Result expected @=? actual = MkResult {ok = Just (expected == actual), #if MIN_VERSION_QuickCheck(2,7,0) expect = True, theException = Nothing, #else expect = True, interrupted = False, #endif reason = "Result: expected...
413
expected @=? actual = MkResult {ok = Just (expected == actual), #if MIN_VERSION_QuickCheck(2,7,0) expect = True, theException = Nothing, #else expect = True, interrupted = False, #endif reason = "Result: expected " ++ show expected ++ ", got " ++ show actu...
369
true
true
0
11
171
124
68
56
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Regions/List.hs
mpl-2.0
-- | Creates a value of 'RegionsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'regeXgafv' -- -- * 'regeMerchantId' -- -- * 'regeUploadProtocol' -- -- * 'regeAccessToken' -- -- * 'regeUploadType' -- -- * 'regePageToken' -- -- * ...
745
regionsList :: Int64 -- ^ 'regeMerchantId' -> RegionsList regionsList pRegeMerchantId_ = RegionsList' { _regeXgafv = Nothing , _regeMerchantId = _Coerce # pRegeMerchantId_ , _regeUploadProtocol = Nothing , _regeAccessToken = Nothing , _regeUploadType = Nothing , _regePageToken = Nothin...
387
regionsList pRegeMerchantId_ = RegionsList' { _regeXgafv = Nothing , _regeMerchantId = _Coerce # pRegeMerchantId_ , _regeUploadProtocol = Nothing , _regeAccessToken = Nothing , _regeUploadType = Nothing , _regePageToken = Nothing , _regePageSize = Nothing , _regeCallback = Nothing ...
321
true
true
0
8
154
101
66
35
null
null
FranklinChen/brick
programs/LayerDemo.hs
bsd-3-clause
appEvent st (V.EvKey V.KUp []) = M.continue $ st & topLayerLocation.rowL %~ (subtract 1)
91
appEvent st (V.EvKey V.KUp []) = M.continue $ st & topLayerLocation.rowL %~ (subtract 1)
91
appEvent st (V.EvKey V.KUp []) = M.continue $ st & topLayerLocation.rowL %~ (subtract 1)
91
false
false
0
8
16
47
23
24
null
null
DougBurke/swish
src/Swish/GraphPartition.hs
lgpl-2.1
partitionShowP pref (PartSub sb (pr :| prs)) = pref++"("++ show sb ++ " " ++ showpr pr ++ concatMap (((pref++" ; ")++).showpr) prs ++ ")" where showpr (a,b) = show a ++ " " ++ partitionShowP (pref++" ") b ------------------------------------------------------------ -- Creating partitioned graphs ---...
1,934
partitionShowP pref (PartSub sb (pr :| prs)) = pref++"("++ show sb ++ " " ++ showpr pr ++ concatMap (((pref++" ; ")++).showpr) prs ++ ")" where showpr (a,b) = show a ++ " " ++ partitionShowP (pref++" ") b ------------------------------------------------------------ -- Creating partitioned graphs ---...
1,934
partitionShowP pref (PartSub sb (pr :| prs)) = pref++"("++ show sb ++ " " ++ showpr pr ++ concatMap (((pref++" ; ")++).showpr) prs ++ ")" where showpr (a,b) = show a ++ " " ++ partitionShowP (pref++" ") b ------------------------------------------------------------ -- Creating partitioned graphs ---...
1,934
false
false
10
12
391
172
104
68
null
null
Peaker/vty-keyboard
src/Data/UI/Input/Keyboard/Vty.hs
bsd-3-clause
toVty :: ModKey -> Maybe ([Vty.Modifier], Vty.Key) toVty = uncurry (liftA2 (,)) . (modsToVty *** keyToVty) . unModKey
117
toVty :: ModKey -> Maybe ([Vty.Modifier], Vty.Key) toVty = uncurry (liftA2 (,)) . (modsToVty *** keyToVty) . unModKey
117
toVty = uncurry (liftA2 (,)) . (modsToVty *** keyToVty) . unModKey
66
false
true
0
10
17
58
31
27
null
null
wavewave/lhc-analysis-collection
lib/HEP/Physics/Analysis/ATLAS/Exotic/Leptoquark.hs
gpl-3.0
findSTfromEvJJ :: EvJJEv -> Double findSTfromEvJJ EvJJEv {..} = (pt.snd) evjj_e1 + (pt.snd) evjj_j1 + (pt.snd) evjj_j2 + (snd. phiptmet . met) evjj_rev
151
findSTfromEvJJ :: EvJJEv -> Double findSTfromEvJJ EvJJEv {..} = (pt.snd) evjj_e1 + (pt.snd) evjj_j1 + (pt.snd) evjj_j2 + (snd. phiptmet . met) evjj_rev
151
findSTfromEvJJ EvJJEv {..} = (pt.snd) evjj_e1 + (pt.snd) evjj_j1 + (pt.snd) evjj_j2 + (snd. phiptmet . met) evjj_rev
116
false
true
1
10
22
81
39
42
null
null
ezyang/ghc
compiler/vectorise/Vectorise/Builtins/Base.hs
bsd-3-clause
replicatePD_PrimVar :: TyCon -> Builtins -> Var replicatePD_PrimVar tc bi = lookupEnvBuiltin "replicatePD_PrimVar" (replicatePD_PrimVars bi) (tyConName tc)
157
replicatePD_PrimVar :: TyCon -> Builtins -> Var replicatePD_PrimVar tc bi = lookupEnvBuiltin "replicatePD_PrimVar" (replicatePD_PrimVars bi) (tyConName tc)
157
replicatePD_PrimVar tc bi = lookupEnvBuiltin "replicatePD_PrimVar" (replicatePD_PrimVars bi) (tyConName tc)
109
false
true
0
7
18
43
21
22
null
null
prashant007/AMPL
myAMPL/src/MyParser/InterpretAMPL.hs
mit
compile_process sym stack chs ((AC_RECORD cs):rest) = (AMC_REC (map (compile_process sym stack chs) cs)):(compile_process sym stack chs rest)
144
compile_process sym stack chs ((AC_RECORD cs):rest) = (AMC_REC (map (compile_process sym stack chs) cs)):(compile_process sym stack chs rest)
144
compile_process sym stack chs ((AC_RECORD cs):rest) = (AMC_REC (map (compile_process sym stack chs) cs)):(compile_process sym stack chs rest)
144
false
false
0
11
20
68
34
34
null
null
doctau/garbagehat
GarbageHat/Parser.hs
epl-1.0
parseSerialNew t = do char '[' optionMaybe $ string "Full" -- old JVM emit this incorrectly string "GC" young <- parseDefNew combined <- surroundedBy (char ' ') parseRegion (string ", ") dur <- parseDuration string "]" timing <- optionMaybe (char ' ' >> parseTimesBlock) many (char ' ') return $ mkSe...
360
parseSerialNew t = do char '[' optionMaybe $ string "Full" -- old JVM emit this incorrectly string "GC" young <- parseDefNew combined <- surroundedBy (char ' ') parseRegion (string ", ") dur <- parseDuration string "]" timing <- optionMaybe (char ' ' >> parseTimesBlock) many (char ' ') return $ mkSe...
360
parseSerialNew t = do char '[' optionMaybe $ string "Full" -- old JVM emit this incorrectly string "GC" young <- parseDefNew combined <- surroundedBy (char ' ') parseRegion (string ", ") dur <- parseDuration string "]" timing <- optionMaybe (char ' ' >> parseTimesBlock) many (char ' ') return $ mkSe...
360
false
false
1
12
75
132
55
77
null
null
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_device_group.hs
bsd-3-clause
-- No documentation found for TopLevel "vkCmdDispatchBaseKHR" cmdDispatchBaseKHR = cmdDispatchBase
98
cmdDispatchBaseKHR = cmdDispatchBase
36
cmdDispatchBaseKHR = cmdDispatchBase
36
true
false
0
4
9
7
4
3
null
null
PierreR/streaming
Streaming/Prelude.hs
bsd-3-clause
{-| Repeat an action several times, streaming the results. >>> S.print $ S.replicateM 2 getCurrentTime 2015-08-18 00:57:36.124508 UTC 2015-08-18 00:57:36.124785 UTC -} replicateM :: Monad m => Int -> m a -> Stream (Of a) m () replicateM n ma = loop n where loop 0 = Return () loop n = Delay $ do a <- ma ...
353
replicateM :: Monad m => Int -> m a -> Stream (Of a) m () replicateM n ma = loop n where loop 0 = Return () loop n = Delay $ do a <- ma return (Step $ a :> loop (n-1))
183
replicateM n ma = loop n where loop 0 = Return () loop n = Delay $ do a <- ma return (Step $ a :> loop (n-1))
125
true
true
0
15
82
114
54
60
null
null
beni55/haste-compiler
libraries/time/lib/Data/Time/Format/Parse.hs
bsd-3-clause
parseValue :: TimeLocale -> Maybe Padding -> Char -> ReadP String parseValue l mpad c = case c of -- century 'C' -> digits SpacePadding 2 'f' -> digits SpacePadding 2 -- year 'Y' -> digits SpacePadding 4 'G' -> digits SpacePadding 4 -- year of century 'y' -> digits ...
2,463
parseValue :: TimeLocale -> Maybe Padding -> Char -> ReadP String parseValue l mpad c = case c of -- century 'C' -> digits SpacePadding 2 'f' -> digits SpacePadding 2 -- year 'Y' -> digits SpacePadding 4 'G' -> digits SpacePadding 4 -- year of century 'y' -> digits ...
2,463
parseValue l mpad c = case c of -- century 'C' -> digits SpacePadding 2 'f' -> digits SpacePadding 2 -- year 'Y' -> digits SpacePadding 4 'G' -> digits SpacePadding 4 -- year of century 'y' -> digits ZeroPadding 2 'g' -> digits ZeroPadding 2 -- month of...
2,397
false
true
0
14
833
795
390
405
null
null
jahaynes/fsa
src/Data/FSA/Internal/NodeState.hs
bsd-3-clause
terminalBit :: Int terminalBit = 0
34
terminalBit :: Int terminalBit = 0
34
terminalBit = 0
15
false
true
0
4
5
11
6
5
null
null
DanielSchuessler/th-build
Language/Haskell/TH/Build/Wrappers.hs
bsd-3-clause
-- | Argument-converting wrapper for 'sectionR'. sectionR' :: (Convertible expQ ExpQ, Convertible expQ' ExpQ) => expQ -> expQ' -> ExpQ sectionR' = preconvert2 sectionR
167
sectionR' :: (Convertible expQ ExpQ, Convertible expQ' ExpQ) => expQ -> expQ' -> ExpQ sectionR' = preconvert2 sectionR
118
sectionR' = preconvert2 sectionR
32
true
true
0
7
23
42
22
20
null
null
benkolera/haskell-opaleye
src/Opaleye/Internal/HaskellDB/Sql/Default.hs
bsd-3-clause
showBinOp OpGtEq = ">="
30
showBinOp OpGtEq = ">="
30
showBinOp OpGtEq = ">="
30
false
false
0
4
10
10
4
6
null
null
adarqui/DevUtils-Parser
src/System/DevUtils/Parser.hs
gpl-3.0
parseUrlRedisOptionsKey :: St Cmd parseUrlRedisOptionsKey = do _ <- string "key=" (UrlRedis s) <- getState rkey <- redisKey return $ UrlRedis s { R._key = Just rkey }
170
parseUrlRedisOptionsKey :: St Cmd parseUrlRedisOptionsKey = do _ <- string "key=" (UrlRedis s) <- getState rkey <- redisKey return $ UrlRedis s { R._key = Just rkey }
170
parseUrlRedisOptionsKey = do _ <- string "key=" (UrlRedis s) <- getState rkey <- redisKey return $ UrlRedis s { R._key = Just rkey }
136
false
true
0
11
31
67
31
36
null
null
kishoredbn/barrelfish
tools/flounder/THCBackend.hs
mit
-- Name of the type of a receive-any function rx_any_sig_type :: String -> String -> String rx_any_sig_type ifn receiver = idscope ifn "recv_any" "thc_" ++ receiver ++ "_t"
172
rx_any_sig_type :: String -> String -> String rx_any_sig_type ifn receiver = idscope ifn "recv_any" "thc_" ++ receiver ++ "_t"
126
rx_any_sig_type ifn receiver = idscope ifn "recv_any" "thc_" ++ receiver ++ "_t"
80
true
true
0
7
27
40
20
20
null
null
jean-edouard/manager
rpc-proxy/Bouncer.hs
gpl-2.0
runTransform (Transform f) = runMaybeT . f
42
runTransform (Transform f) = runMaybeT . f
42
runTransform (Transform f) = runMaybeT . f
42
false
false
0
7
6
19
9
10
null
null
CarstenKoenig/AdventOfCode2016
Day5/Main.hs
mit
main :: IO () main = do print $ password input _ <- decode input putStrLn "all done"
90
main :: IO () main = do print $ password input _ <- decode input putStrLn "all done"
90
main = do print $ password input _ <- decode input putStrLn "all done"
76
false
true
0
9
23
48
19
29
null
null
deech/fltkhs-demos
src/Examples/arc.hs
mit
drawArc :: IORef [Double] -> Ref Widget -> IO () drawArc myArgsRef widget = do myArgs <- readIORef myArgsRef rectangle' <- getRectangle widget let (x',y',w',h') = fromRectangle rectangle' flcPushClip rectangle' flcSetColor dark3Color flcRectf rectangle' flcPushMatrix if (myArgs !! 5 > 0) then do ...
1,350
drawArc :: IORef [Double] -> Ref Widget -> IO () drawArc myArgsRef widget = do myArgs <- readIORef myArgsRef rectangle' <- getRectangle widget let (x',y',w',h') = fromRectangle rectangle' flcPushClip rectangle' flcSetColor dark3Color flcRectf rectangle' flcPushMatrix if (myArgs !! 5 > 0) then do ...
1,350
drawArc myArgsRef widget = do myArgs <- readIORef myArgsRef rectangle' <- getRectangle widget let (x',y',w',h') = fromRectangle rectangle' flcPushClip rectangle' flcSetColor dark3Color flcRectf rectangle' flcPushMatrix if (myArgs !! 5 > 0) then do flcTranslate (ByXY (ByX ((fromInteg...
1,301
false
true
0
21
289
575
279
296
null
null
christiaanb/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
8
21
49
24
25
null
null
alexander-at-github/eta
compiler/ETA/SimplCore/LiberateCase.hs
bsd-3-clause
libCase env (Cast e co) = Cast (libCase env e) co
57
libCase env (Cast e co) = Cast (libCase env e) co
57
libCase env (Cast e co) = Cast (libCase env e) co
57
false
false
0
7
18
32
15
17
null
null
SamirTalwar/advent-of-code
2016/AOC_23_2.hs
mit
complicate :: [Instruction] -> [Instruction] complicate (a@(Bump direction destination) : b@(Bump _ source) : c@(Jump (Indirect source') (Direct (-2))) : rest) | source == source' = complicate $ Add direction destination source : Copy (Direct 0) source : Skip : rest | otherwise = a : b :...
340
complicate :: [Instruction] -> [Instruction] complicate (a@(Bump direction destination) : b@(Bump _ source) : c@(Jump (Indirect source') (Direct (-2))) : rest) | source == source' = complicate $ Add direction destination source : Copy (Direct 0) source : Skip : rest | otherwise = a : b :...
340
complicate (a@(Bump direction destination) : b@(Bump _ source) : c@(Jump (Indirect source') (Direct (-2))) : rest) | source == source' = complicate $ Add direction destination source : Copy (Direct 0) source : Skip : rest | otherwise = a : b : c : complicate rest
295
false
true
1
16
83
155
79
76
null
null
kawamuray/ganeti
src/Ganeti/WConfd/ConfigWriter.hs
gpl-2.0
distMCsAsyncTask :: RuntimeEnts -> FilePath -- ^ Path to the config file -> IO ConfigState -- ^ An action to read the current config -> ResultG (AsyncWorker ()) distMCsAsyncTask ents cpath cdRef = lift . mkStatelessAsyncTask ERROR "Can't distribute the configuration\...
1,089
distMCsAsyncTask :: RuntimeEnts -> FilePath -- ^ Path to the config file -> IO ConfigState -- ^ An action to read the current config -> ResultG (AsyncWorker ()) distMCsAsyncTask ents cpath cdRef = lift . mkStatelessAsyncTask ERROR "Can't distribute the configuration\...
1,089
distMCsAsyncTask ents cpath cdRef = lift . mkStatelessAsyncTask ERROR "Can't distribute the configuration\ \ to master candidates" $ do cd <- liftBase (csConfigData <$> cdRef) :: ResultG ConfigData logDebug $ "Distributing the configuration to master cand...
877
false
true
3
12
302
146
68
78
null
null
tonyday567/pipes-extended
src/Pipes/Extended.hs
mit
parseFileP :: AC.Parser a -> FilePath -> Producer (Either String a) (SafeT IO) () parseFileP parser file = readFile file >-> parseP parser
138
parseFileP :: AC.Parser a -> FilePath -> Producer (Either String a) (SafeT IO) () parseFileP parser file = readFile file >-> parseP parser
138
parseFileP parser file = readFile file >-> parseP parser
56
false
true
0
9
22
62
29
33
null
null
keithodulaigh/Hets
Common/IRI.hs
gpl-2.0
iriToStringFull :: (String -> String) -> IRI -> ShowS iriToStringFull iuserinfomap (IRI { iriScheme = scheme , iriAuthority = authority , iriPath = path , iriQuery = query , iriFragmen...
569
iriToStringFull :: (String -> String) -> IRI -> ShowS iriToStringFull iuserinfomap (IRI { iriScheme = scheme , iriAuthority = authority , iriPath = path , iriQuery = query , iriFragmen...
569
iriToStringFull iuserinfomap (IRI { iriScheme = scheme , iriAuthority = authority , iriPath = path , iriQuery = query , iriFragment = fragment , hasAn...
515
false
true
8
9
276
142
76
66
null
null
eigengrau/haskell-unicode-symbols
src/Data/Vector/Unicode/SR.hs
gpl-3.0
(⊲) ∷ Vector α → α → Vector α (⊲) = Vector.snoc
47
(⊲) ∷ Vector α → α → Vector α (⊲) = Vector.snoc
47
(⊲) = Vector.snoc
17
false
true
0
8
11
37
18
19
null
null
vikraman/ghc
compiler/utils/FastStringEnv.hs
bsd-3-clause
unitFsEnv x y = unitUFM x y
39
unitFsEnv x y = unitUFM x y
39
unitFsEnv x y = unitUFM x y
39
false
false
0
5
18
16
7
9
null
null
zachsully/hakaru
haskell/Tests/TestTools.hs
bsd-3-clause
testSS1 :: (ABT Term abt) => String -> abt '[] a -- | Expected -> abt '[] a -- | To simplify -> Assertion testSS1 = testSS1WithOpts defaultMapleOptions
171
testSS1 :: (ABT Term abt) => String -> abt '[] a -- | Expected -> abt '[] a -- | To simplify -> Assertion testSS1 = testSS1WithOpts defaultMapleOptions
171
testSS1 = testSS1WithOpts defaultMapleOptions
45
false
true
0
12
47
63
30
33
null
null
miguelpagano/equ
Equ/Proof/Zipper.hs
gpl-3.0
goTop' :: ProofFocus' ctxTy relTy proofTy exprTy -> ProofFocus' ctxTy relTy proofTy exprTy goTop' (p,Top) = (p,Top)
115
goTop' :: ProofFocus' ctxTy relTy proofTy exprTy -> ProofFocus' ctxTy relTy proofTy exprTy goTop' (p,Top) = (p,Top)
115
goTop' (p,Top) = (p,Top)
24
false
true
0
6
16
48
25
23
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Expr.hs
bsd-3-clause
evalExprI32 :: Expr Int32 -> Int32 evalExprI32 (LitI32 v) = v
61
evalExprI32 :: Expr Int32 -> Int32 evalExprI32 (LitI32 v) = v
61
evalExprI32 (LitI32 v) = v
26
false
true
0
7
10
27
13
14
null
null
tdox/hcholmod
lib/Numeric/LinearAlgebra/CHOLMOD/CholmodXFaceLow.hs
mit
xtReal :: XType xtReal = XType 1
39
xtReal :: XType xtReal = XType 1
39
xtReal = XType 1
20
false
true
0
5
13
14
7
7
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
77
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
77
pureAName = varQual gHC_BASE (fsLit "pure") pureAClassOpKey
77
false
false
0
7
24
19
9
10
null
null
taktoa/TSBot
test-suite/Web/TSBot/ClientQuery/Command/QuoteSpec.hs
mit
spec :: Spec spec = it "is" pending
35
spec :: Spec spec = it "is" pending
35
spec = it "is" pending
22
false
true
0
6
7
24
9
15
null
null
alexander-at-github/eta
compiler/ETA/Types/Class.hs
bsd-3-clause
{- Note [Associated type tyvar names] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The TyCon of an associated type should use the same variable names as its parent class. Thus class C a b where type F b x a :: * We make F use the same Name for 'a' as C does, and similary 'b'. The reason for this is when checking insta...
1,127
classArity :: Class -> Arity classArity clas = length (classTyVars clas)
72
classArity clas = length (classTyVars clas)
43
true
true
0
7
310
28
14
14
null
null
travitch/dalvik
src/Dalvik/SSA/Types.hs
bsd-3-clause
classInstanceFields :: Class -> [(AccessFlags, Field)] classInstanceFields = V.toList . _classInstanceFields
108
classInstanceFields :: Class -> [(AccessFlags, Field)] classInstanceFields = V.toList . _classInstanceFields
108
classInstanceFields = V.toList . _classInstanceFields
53
false
true
0
7
10
30
17
13
null
null
sdiehl/ghc
compiler/prelude/THNames.hs
bsd-3-clause
sourceLazyName = libFun (fsLit "sourceLazy") sourceLazyKey
74
sourceLazyName = libFun (fsLit "sourceLazy") sourceLazyKey
74
sourceLazyName = libFun (fsLit "sourceLazy") sourceLazyKey
74
false
false
0
7
21
17
8
9
null
null
klpn/highlighting-kate
Text/Highlighting/Kate/Format/LaTeX.hs
gpl-2.0
tokenToLaTeX :: Bool -> Token -> String tokenToLaTeX inline (NormalTok, txt) | all isSpace txt = escapeLaTeX inline txt
119
tokenToLaTeX :: Bool -> Token -> String tokenToLaTeX inline (NormalTok, txt) | all isSpace txt = escapeLaTeX inline txt
119
tokenToLaTeX inline (NormalTok, txt) | all isSpace txt = escapeLaTeX inline txt
79
false
true
0
9
18
51
23
28
null
null
spechub/Hets
HasCASL/InteractiveTests.hs
gpl-2.0
findMatch :: (MatchResult -> Bool) -> DefinitionStore -> DGNav -> String -> String -> IO MatchResult findMatch p def dgnav patN cN = let err = error "findMatch: no candidates found." err' = error "findMatch: no match satisfies predicate." g [] = err' g l ...
530
findMatch :: (MatchResult -> Bool) -> DefinitionStore -> DGNav -> String -> String -> IO MatchResult findMatch p def dgnav patN cN = let err = error "findMatch: no candidates found." err' = error "findMatch: no match satisfies predicate." g [] = err' g l ...
530
findMatch p def dgnav patN cN = let err = error "findMatch: no candidates found." err' = error "findMatch: no match satisfies predicate." g [] = err' g l = do (res, l') <- matchCandidates def l case res of Right mr -> if p mr then return mr else g l' _ -> err' i...
384
false
true
0
15
185
171
82
89
null
null
green-haskell/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
schemeE d s p e@(AnnCoercion {}) = returnUnboxedAtom d s p e V
62
schemeE d s p e@(AnnCoercion {}) = returnUnboxedAtom d s p e V
62
schemeE d s p e@(AnnCoercion {}) = returnUnboxedAtom d s p e V
62
false
false
0
8
12
36
18
18
null
null
nevrenato/HetsAlloy
Maude/Maude2DG.hs
gpl-2.0
incPredImpME (RenamingModExp me _) pdg up = incPredImpME me pdg up
66
incPredImpME (RenamingModExp me _) pdg up = incPredImpME me pdg up
66
incPredImpME (RenamingModExp me _) pdg up = incPredImpME me pdg up
66
false
false
1
7
10
30
13
17
null
null
juliagoda/givenfind
src/GivenFind/Geography.hs
bsd-3-clause
getHours (Just (_:xs)) = getHours $ Just xs
43
getHours (Just (_:xs)) = getHours $ Just xs
43
getHours (Just (_:xs)) = getHours $ Just xs
43
false
false
0
9
7
29
14
15
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprInstr (SETCC cond op) = pprCondInstr (sLit "set") cond (pprOperand II8 op)
77
pprInstr (SETCC cond op) = pprCondInstr (sLit "set") cond (pprOperand II8 op)
77
pprInstr (SETCC cond op) = pprCondInstr (sLit "set") cond (pprOperand II8 op)
77
false
false
0
7
11
38
18
20
null
null
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Gen2/Object.hs
mit
getEnum :: Enum a => GetS a getEnum = toEnum <$> getIW16
56
getEnum :: Enum a => GetS a getEnum = toEnum <$> getIW16
56
getEnum = toEnum <$> getIW16
28
false
true
0
7
11
31
13
18
null
null
waldheinz/ads
src/lib/Freenet.hs
gpl-3.0
shutdownFreenet :: Freenet a -> IO () shutdownFreenet fn = do shutdownStore $ fnChkStore fn shutdownStore $ fnSskStore fn {- -- | initializes Freenet subsystem initFn :: CFG.Config -> IO (Freenet a) initFn cfg = do chkIncoming <- newBroadcastTChanIO sskIncoming <- newBroadcastTChanIO let fn = FN Noth...
635
shutdownFreenet :: Freenet a -> IO () shutdownFreenet fn = do shutdownStore $ fnChkStore fn shutdownStore $ fnSskStore fn {- -- | initializes Freenet subsystem initFn :: CFG.Config -> IO (Freenet a) initFn cfg = do chkIncoming <- newBroadcastTChanIO sskIncoming <- newBroadcastTChanIO let fn = FN Noth...
635
shutdownFreenet fn = do shutdownStore $ fnChkStore fn shutdownStore $ fnSskStore fn {- -- | initializes Freenet subsystem initFn :: CFG.Config -> IO (Freenet a) initFn cfg = do chkIncoming <- newBroadcastTChanIO sskIncoming <- newBroadcastTChanIO let fn = FN Nothing chkIncoming sskIncoming -- comp...
597
false
true
0
9
145
52
22
30
null
null
robeverest/accelerate
Data/Array/Accelerate/Trafo/Fusion.hs
bsd-3-clause
-- | Fuse a unary function over array computations -- fuseAfun :: Afun f -> Afun f fuseAfun = until matchOpenAfun fuseOpenAfun
126
fuseAfun :: Afun f -> Afun f fuseAfun = until matchOpenAfun fuseOpenAfun
72
fuseAfun = until matchOpenAfun fuseOpenAfun
43
true
true
0
7
21
34
15
19
null
null
Lepovirta/Crystallize
app/Web/Server.hs
bsd-3-clause
-- Path for static files like .js and .css. staticPath :: String staticPath = "web/static"
90
staticPath :: String staticPath = "web/static"
46
staticPath = "web/static"
25
true
true
0
6
14
19
8
11
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1NodeSelectorRequirementValues' Lens v1NodeSelectorRequirementValuesL :: Lens_' V1NodeSelectorRequirement (Maybe [Text]) v1NodeSelectorRequirementValuesL f V1NodeSelectorRequirement{..} = (\v1NodeSelectorRequirementValues -> V1NodeSelectorRequirement { v1NodeSelectorRequirementValues, ..} ) <$> f v1NodeSelectorR...
336
v1NodeSelectorRequirementValuesL :: Lens_' V1NodeSelectorRequirement (Maybe [Text]) v1NodeSelectorRequirementValuesL f V1NodeSelectorRequirement{..} = (\v1NodeSelectorRequirementValues -> V1NodeSelectorRequirement { v1NodeSelectorRequirementValues, ..} ) <$> f v1NodeSelectorRequirementValues
292
v1NodeSelectorRequirementValuesL f V1NodeSelectorRequirement{..} = (\v1NodeSelectorRequirementValues -> V1NodeSelectorRequirement { v1NodeSelectorRequirementValues, ..} ) <$> f v1NodeSelectorRequirementValues
208
true
true
0
8
23
60
32
28
null
null
lukexi/ghc-7.8-arm64
compiler/cmm/CmmLive.hs
bsd-3-clause
removeDeadAssignments :: DynFlags -> CmmGraph -> UniqSM (CmmGraph, BlockEnv CmmLocalLive) removeDeadAssignments dflags g = dataflowPassBwd g [] $ analRewBwd liveLattice (xferLive dflags) rewrites where rewrites = mkBRewrite3 nothing middle nothing -- SDM: no need for deepBwdRw here,...
1,139
removeDeadAssignments :: DynFlags -> CmmGraph -> UniqSM (CmmGraph, BlockEnv CmmLocalLive) removeDeadAssignments dflags g = dataflowPassBwd g [] $ analRewBwd liveLattice (xferLive dflags) rewrites where rewrites = mkBRewrite3 nothing middle nothing -- SDM: no need for deepBwdRw here,...
1,139
removeDeadAssignments dflags g = dataflowPassBwd g [] $ analRewBwd liveLattice (xferLive dflags) rewrites where rewrites = mkBRewrite3 nothing middle nothing -- SDM: no need for deepBwdRw here, we only rewrite to empty -- Beware: deepBwdRw with one polymorphic function seems more -- rea...
1,027
false
true
4
12
362
313
145
168
null
null
agocorona/Workflow
Control/Workflow/Stat.old.hs
bsd-3-clause
keyRunning= "Running"
21
keyRunning= "Running"
21
keyRunning= "Running"
21
false
false
0
4
1
6
3
3
null
null
oldmanmike/sdl2
src/SDL/Video/Renderer.hs
bsd-3-clause
-- | Copy an existing surface into a new one that is optimized for blitting to a surface of a specified pixel format. -- -- This function is used to optimize images for faster repeat blitting. This is accomplished by converting the original and storing the result as a new surface. The new, optimized surface can then be...
879
convertSurface :: (Functor m,MonadIO m) => Surface -- ^ The 'Surface' to convert -> SurfacePixelFormat -- ^ The pixel format that the new surface is optimized for -> m Surface convertSurface (Surface s _) (SurfacePixelFormat fmt) = fmap unmanagedSurface $ throwIfNull "SD...
404
convertSurface (Surface s _) (SurfacePixelFormat fmt) = fmap unmanagedSurface $ throwIfNull "SDL.Video.Renderer.convertSurface" "SDL_ConvertSurface" $ Raw.convertSurface s fmt 0
183
true
true
0
8
174
88
46
42
null
null
FranklinChen/elm-lang.org
src/backend/Init/Examples.hs
bsd-3-clause
isElm :: String -> Maybe String isElm fileName = case splitExtension fileName of (name, ".elm") -> Just name _ -> Nothing -- INIT EDITOR FILES
154
isElm :: String -> Maybe String isElm fileName = case splitExtension fileName of (name, ".elm") -> Just name _ -> Nothing -- INIT EDITOR FILES
154
isElm fileName = case splitExtension fileName of (name, ".elm") -> Just name _ -> Nothing -- INIT EDITOR FILES
122
false
true
0
8
36
55
26
29
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_TRIANGULAR_NV :: GLenum gl_TRIANGULAR_NV = 0x90A5
52
gl_TRIANGULAR_NV :: GLenum gl_TRIANGULAR_NV = 0x90A5
52
gl_TRIANGULAR_NV = 0x90A5
25
false
true
0
4
5
11
6
5
null
null
rzil/honours
LeavittPathAlgebras/GraphMonoid.hs
mit
solve :: Ord v => Graph e v -> [v] solve graph = solve' (vertexForm graph) (startState graph) where check state = assert (all (>= 0) (M.elems state)) solve' mapping (transformations,state) | found transformations = [] | otherwise = check state (let (v,next) = step mapping (transformations,state) in v : solve...
335
solve :: Ord v => Graph e v -> [v] solve graph = solve' (vertexForm graph) (startState graph) where check state = assert (all (>= 0) (M.elems state)) solve' mapping (transformations,state) | found transformations = [] | otherwise = check state (let (v,next) = step mapping (transformations,state) in v : solve...
335
solve graph = solve' (vertexForm graph) (startState graph) where check state = assert (all (>= 0) (M.elems state)) solve' mapping (transformations,state) | found transformations = [] | otherwise = check state (let (v,next) = step mapping (transformations,state) in v : solve' mapping next)
300
false
true
1
12
63
180
83
97
null
null
travisbrady/haskell-tyrant
Setup.hs
bsd-2-clause
main :: IO () main = defaultMainWithHooks defaultUserHooks
59
main :: IO () main = defaultMainWithHooks defaultUserHooks
58
main = defaultMainWithHooks defaultUserHooks
44
false
true
0
6
8
19
9
10
null
null
nevrenato/HetsAlloy
utils/DrIFT-src/ParseLib2.hs
gpl-2.0
junk :: Parser () junk = do _ <- setenv (0, -1) (many (spaces +++ comment)) return ()
89
junk :: Parser () junk = do _ <- setenv (0, -1) (many (spaces +++ comment)) return ()
89
junk = do _ <- setenv (0, -1) (many (spaces +++ comment)) return ()
71
false
true
0
13
21
63
29
34
null
null
lukexi/cabal
cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs
bsd-3-clause
testEmptyMonitor :: Assertion testEmptyMonitor = withFileMonitor $ \root monitor -> do touch root "a" updateMonitor root monitor [] () () touch root "b" (res, files) <- expectMonitorUnchanged root monitor () res @?= () files @?= [] -- monitor a file that is expected to exist
304
testEmptyMonitor :: Assertion testEmptyMonitor = withFileMonitor $ \root monitor -> do touch root "a" updateMonitor root monitor [] () () touch root "b" (res, files) <- expectMonitorUnchanged root monitor () res @?= () files @?= [] -- monitor a file that is expected to exist
304
testEmptyMonitor = withFileMonitor $ \root monitor -> do touch root "a" updateMonitor root monitor [] () () touch root "b" (res, files) <- expectMonitorUnchanged root monitor () res @?= () files @?= [] -- monitor a file that is expected to exist
274
false
true
0
11
73
99
47
52
null
null
ku-fpg/kansas-amber
tests/ExprTests/ExprInt8.hs
bsd-3-clause
prop_from16 :: ArduinoConnection -> RemoteRef Int8 -> Word16 -> Property prop_from16 c r x = monadicIO $ do let local = fromIntegral x remote <- run $ send c $ do writeRemoteRefE r $ fromIntegralB (lit x) v <- readRemoteRefE r return v assert (local == litEval8 remote)
305
prop_from16 :: ArduinoConnection -> RemoteRef Int8 -> Word16 -> Property prop_from16 c r x = monadicIO $ do let local = fromIntegral x remote <- run $ send c $ do writeRemoteRefE r $ fromIntegralB (lit x) v <- readRemoteRefE r return v assert (local == litEval8 remote)
305
prop_from16 c r x = monadicIO $ do let local = fromIntegral x remote <- run $ send c $ do writeRemoteRefE r $ fromIntegralB (lit x) v <- readRemoteRefE r return v assert (local == litEval8 remote)
232
false
true
0
15
83
118
52
66
null
null
cjenkins-mersive/local-monitoring-service
app/Main.hs
mit
startSecureWebsocket tailFilePath = do let host = "192.168.2.7" let port = 8443 let path = "/produce" let options = WS.defaultConnectionOptions let headers = [] let tlsSettings = C.TLSSettingsSimple { settingDisableCertificateValidation = True, settingDisableSession = False, settingU...
923
startSecureWebsocket tailFilePath = do let host = "192.168.2.7" let port = 8443 let path = "/produce" let options = WS.defaultConnectionOptions let headers = [] let tlsSettings = C.TLSSettingsSimple { settingDisableCertificateValidation = True, settingDisableSession = False, settingU...
923
startSecureWebsocket tailFilePath = do let host = "192.168.2.7" let port = 8443 let path = "/produce" let options = WS.defaultConnectionOptions let headers = [] let tlsSettings = C.TLSSettingsSimple { settingDisableCertificateValidation = True, settingDisableSession = False, settingU...
923
false
false
1
14
205
256
124
132
null
null
erikd/hs-socks
Network/Socks5/Command.hs
bsd-3-clause
sendSerialized :: Serialize a => Socket -> a -> IO () sendSerialized sock a = sendAll sock $ encode a
101
sendSerialized :: Serialize a => Socket -> a -> IO () sendSerialized sock a = sendAll sock $ encode a
101
sendSerialized sock a = sendAll sock $ encode a
47
false
true
0
10
19
50
22
28
null
null
GaloisInc/halvm-ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | An internal helper to check whether to use unicode syntax for output. -- -- Note: You should very likely be using 'Outputable.unicodeSyntax' instead -- of this function. useUnicodeSyntax :: DynFlags -> Bool useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
258
useUnicodeSyntax :: DynFlags -> Bool useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
83
useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax
46
true
true
0
5
37
22
13
9
null
null
nlim/haskell-playground
main/Euler89Main.hs
mit
replaceLine :: String -> String replaceLine s = case (fmap (minimalNumerals . sum . (map numeralValue)) $ parseNumerals s) of Just ns -> concatMap show ns Nothing -> s
203
replaceLine :: String -> String replaceLine s = case (fmap (minimalNumerals . sum . (map numeralValue)) $ parseNumerals s) of Just ns -> concatMap show ns Nothing -> s
203
replaceLine s = case (fmap (minimalNumerals . sum . (map numeralValue)) $ parseNumerals s) of Just ns -> concatMap show ns Nothing -> s
171
false
true
0
12
64
72
35
37
null
null
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Operations/List.hs
mpl-2.0
-- | OAuth access token. piolAccessToken :: Lens' ProjectsInstancesOperationsList (Maybe Text) piolAccessToken = lens _piolAccessToken (\ s a -> s{_piolAccessToken = a})
177
piolAccessToken :: Lens' ProjectsInstancesOperationsList (Maybe Text) piolAccessToken = lens _piolAccessToken (\ s a -> s{_piolAccessToken = a})
152
piolAccessToken = lens _piolAccessToken (\ s a -> s{_piolAccessToken = a})
82
true
true
0
8
29
49
25
24
null
null
shlevy/arithmoi
Math/NumberTheory/Primes/Factorisation/Certified.hs
mit
mergeAll (xs:ys:zss) = merge (merge xs ys) (mergeAll zss)
57
mergeAll (xs:ys:zss) = merge (merge xs ys) (mergeAll zss)
57
mergeAll (xs:ys:zss) = merge (merge xs ys) (mergeAll zss)
57
false
false
0
8
8
39
19
20
null
null
mitochon/hexercise
src/haskellbook/ch13/src/Main.hs
mit
maxWordLength :: Int maxWordLength = 9
38
maxWordLength :: Int maxWordLength = 9
38
maxWordLength = 9
17
false
true
0
4
5
11
6
5
null
null
fatho/kos-c
src/KOSC/Language/Parser.hs
bsd-3-clause
stmtOnP :: KOSCParser (Stmt RawName) stmtOnP = SOn <$ reserved "on" <*> parens exprP <*> stmtsP
95
stmtOnP :: KOSCParser (Stmt RawName) stmtOnP = SOn <$ reserved "on" <*> parens exprP <*> stmtsP
95
stmtOnP = SOn <$ reserved "on" <*> parens exprP <*> stmtsP
58
false
true
0
8
15
38
18
20
null
null
suhailshergill/GenAlg
tests/QuickCheckTests.hs
gpl-3.0
defaultConfig :: Maybe (GenAlgConfig (Dom NaiveDigitsStrategy) NaiveDigitsStrategy) defaultConfig = mkGenAlgConfig (MinLength 5) (MaxLength 5) (PopSize 100) (CrossoverRate 0.7) (MutationRate 0.1) -- works better for smaller number of iterat...
374
defaultConfig :: Maybe (GenAlgConfig (Dom NaiveDigitsStrategy) NaiveDigitsStrategy) defaultConfig = mkGenAlgConfig (MinLength 5) (MaxLength 5) (PopSize 100) (CrossoverRate 0.7) (MutationRate 0.1) -- works better for smaller number of iterat...
374
defaultConfig = mkGenAlgConfig (MinLength 5) (MaxLength 5) (PopSize 100) (CrossoverRate 0.7) (MutationRate 0.1) -- works better for smaller number of iterations 300 (const $ 1%1)
290
false
true
2
8
143
98
43
55
null
null
AlexanderPankiv/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
par1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Par1")
59
par1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Par1")
59
par1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Par1")
59
false
false
0
7
6
17
8
9
null
null
deyaaeldeen/GTLC
test/Test.hs
gpl-3.0
-- | Generates application expressions. genSExpApp :: Type -> TsMonad SExp genSExpApp t = asks tsSize >>= \s -> lift genType >>= \t1' -> liftM2 App (updtMSize (s `div` 2) (genSExp $ return $ Fun t1' t)) (updtMSize (s `div` 2) (genSExp $ genConsistentType t1'))
260
genSExpApp :: Type -> TsMonad SExp genSExpApp t = asks tsSize >>= \s -> lift genType >>= \t1' -> liftM2 App (updtMSize (s `div` 2) (genSExp $ return $ Fun t1' t)) (updtMSize (s `div` 2) (genSExp $ genConsistentType t1'))
220
genSExpApp t = asks tsSize >>= \s -> lift genType >>= \t1' -> liftM2 App (updtMSize (s `div` 2) (genSExp $ return $ Fun t1' t)) (updtMSize (s `div` 2) (genSExp $ genConsistentType t1'))
185
true
true
0
14
44
113
59
54
null
null
input-output-hk/rscoin-haskell
src/RSCoin/Explorer/Web/Sockets/App.hs
gpl-3.0
finishSession :: MonadState ConnectionsState m => SessionId -> m () finishSession i = whenJustM (use $ csClients . at i) finishSessionDo where finishSessionDo _ = do csClients . at i .= Nothing unsubscribeHBlocks i unsubscribeAddr i
262
finishSession :: MonadState ConnectionsState m => SessionId -> m () finishSession i = whenJustM (use $ csClients . at i) finishSessionDo where finishSessionDo _ = do csClients . at i .= Nothing unsubscribeHBlocks i unsubscribeAddr i
262
finishSession i = whenJustM (use $ csClients . at i) finishSessionDo where finishSessionDo _ = do csClients . at i .= Nothing unsubscribeHBlocks i unsubscribeAddr i
194
false
true
0
9
65
88
39
49
null
null
headprogrammingczar/cabal
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
bsd-3-clause
prop_roundtrip_legacytypes_shared :: ProjectConfigShared -> Bool prop_roundtrip_legacytypes_shared config = roundtrip_legacytypes mempty { projectConfigShared = config }
179
prop_roundtrip_legacytypes_shared :: ProjectConfigShared -> Bool prop_roundtrip_legacytypes_shared config = roundtrip_legacytypes mempty { projectConfigShared = config }
179
prop_roundtrip_legacytypes_shared config = roundtrip_legacytypes mempty { projectConfigShared = config }
114
false
true
0
7
24
33
16
17
null
null
nh2/WashNGo
WASH/HTML/HTMLMonad.hs
bsd-3-clause
q_T = mkElement_T "q"
21
q_T = mkElement_T "q"
21
q_T = mkElement_T "q"
21
false
false
0
5
3
9
4
5
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VS.update_' vs_update_ = VS.update_
40
vs_update_ = VS.update_
23
vs_update_ = VS.update_
23
true
false
0
5
4
9
5
4
null
null
nh2/WashNGo
WASH/HTML/HTMLMonadAttrs.hs
bsd-3-clause
frame :: Monad m => String -> WithHTML x m () frame = attr "frame"
67
frame :: Monad m => String -> WithHTML x m () frame = attr "frame"
67
frame = attr "frame"
21
false
true
0
8
15
34
16
18
null
null
mettekou/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
litIsTrivial (LitInteger {}) = False
37
litIsTrivial (LitInteger {}) = False
37
litIsTrivial (LitInteger {}) = False
37
false
false
0
7
5
16
8
8
null
null
jwiegley/ghc-release
compiler/cmm/PprC.hs
gpl-3.0
machRep_U_CType :: Width -> SDoc machRep_U_CType w = sdocWithDynFlags $ \dflags -> case w of _ | w == wordWidth dflags -> ptext (sLit "W_") W8 -> ptext (sLit "StgWord8") W16 -> ptext (sLit "StgWord16") W32 -> ptext (sLit "StgWord32") W64 -> ptext (sLit "StgWord64") _ -> panic "machRep_U_CType"
319
machRep_U_CType :: Width -> SDoc machRep_U_CType w = sdocWithDynFlags $ \dflags -> case w of _ | w == wordWidth dflags -> ptext (sLit "W_") W8 -> ptext (sLit "StgWord8") W16 -> ptext (sLit "StgWord16") W32 -> ptext (sLit "StgWord32") W64 -> ptext (sLit "StgWord64") _ -> panic "machRep_U_CType"
319
machRep_U_CType w = sdocWithDynFlags $ \dflags -> case w of _ | w == wordWidth dflags -> ptext (sLit "W_") W8 -> ptext (sLit "StgWord8") W16 -> ptext (sLit "StgWord16") W32 -> ptext (sLit "StgWord32") W64 -> ptext (sLit "StgWord64") _ -> panic "machRep_U_CType"
286
false
true
0
14
73
128
60
68
null
null
fferreira/hnh
CodeGenHelper.hs
gpl-3.0
desc (HaltK i)= comment $ pretty "HaltK" <+> pretty i
53
desc (HaltK i)= comment $ pretty "HaltK" <+> pretty i
53
desc (HaltK i)= comment $ pretty "HaltK" <+> pretty i
53
false
false
0
7
9
29
13
16
null
null
uduki/hsQt
Qtc/Enums/Gui/QStyleOption.hs
bsd-2-clause
eSO_ToolBar :: OptionType eSO_ToolBar = ieOptionType $ 16
59
eSO_ToolBar :: OptionType eSO_ToolBar = ieOptionType $ 16
59
eSO_ToolBar = ieOptionType $ 16
33
false
true
2
6
9
23
9
14
null
null
ConsensusResearch/ForgingSimulation
blockchain.hs
gpl-2.0
-- hitTime :: Account -> Block -> LocalView -> Timestamp -- hitTime acct prevBl view = (blockTimestamp prevBl) + (calculateHit prevBl acct)*(effectiveBalance view acct) `div` (baseTarget prevBl) verifyHit :: Integer -> Block -> Timestamp -> Int -> Bool verifyHit hit prevBlock timestamp effBalance = (eta > 0) && hit <...
573
verifyHit :: Integer -> Block -> Timestamp -> Int -> Bool verifyHit hit prevBlock timestamp effBalance = (eta > 0) && hit < target -- && hit >= prevTarget) - after block 215000 where eta = timestamp - blockTimestamp prevBlock effbt = (toInteger effBalance)*(baseTarget prevBlock) target = effbt*(...
376
verifyHit hit prevBlock timestamp effBalance = (eta > 0) && hit < target -- && hit >= prevTarget) - after block 215000 where eta = timestamp - blockTimestamp prevBlock effbt = (toInteger effBalance)*(baseTarget prevBlock) target = effbt*(toInteger eta) -- prevTarget = effbt * (eta-1)
318
true
true
2
10
117
109
56
53
null
null
phischu/fragnix
benchmarks/containers/Data.IntSet.Base.hs
bsd-3-clause
lookupGE :: Key -> IntSet -> Maybe Key lookupGE x t = x `seq` case t of Bin _ m l r | m < 0 -> if x >= 0 then go Nil l else go l r _ -> go Nil t where go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMin l else unsafeFindMin def | zero x m = go r l ...
770
lookupGE :: Key -> IntSet -> Maybe Key lookupGE x t = x `seq` case t of Bin _ m l r | m < 0 -> if x >= 0 then go Nil l else go l r _ -> go Nil t where go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMin l else unsafeFindMin def | zero x m = go r l ...
770
lookupGE x t = x `seq` case t of Bin _ m l r | m < 0 -> if x >= 0 then go Nil l else go l r _ -> go Nil t where go def (Bin p m l r) | nomatch x p m = if x < p then unsafeFindMin l else unsafeFindMin def | zero x m = go r l | otherwise = go def r go d...
731
false
true
3
11
300
311
146
165
null
null
AlexanderPankiv/ghc
compiler/main/TidyPgm.hs
bsd-3-clause
getTyConImplicitBinds :: TyCon -> [CoreBind] getTyConImplicitBinds tc = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc))
134
getTyConImplicitBinds :: TyCon -> [CoreBind] getTyConImplicitBinds tc = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc))
134
getTyConImplicitBinds tc = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc))
89
false
true
0
9
13
40
20
20
null
null
emc2/HUnit-Plus
src/Test/HUnitPlus/Terminal.hs
bsd-3-clause
ta f bs as (c:cs) | not (isPrint c) = error "invalid nonprinting character" | null as = ta f (c:bs) "" cs | otherwise = ta f (c:bs) (tail as) cs
157
ta f bs as (c:cs) | not (isPrint c) = error "invalid nonprinting character" | null as = ta f (c:bs) "" cs | otherwise = ta f (c:bs) (tail as) cs
157
ta f bs as (c:cs) | not (isPrint c) = error "invalid nonprinting character" | null as = ta f (c:bs) "" cs | otherwise = ta f (c:bs) (tail as) cs
157
false
false
0
10
44
107
48
59
null
null
jimcrayne/jhc
src/E/Values.hs
mit
isFullyConst _ = False
22
isFullyConst _ = False
22
isFullyConst _ = False
22
false
false
0
4
3
10
4
6
null
null
izgzhen/region
src/Rust/Pretty.hs
mit
pPrim :: PrimTy -> Doc pPrim IntTy = text "i32"
51
pPrim :: PrimTy -> Doc pPrim IntTy = text "i32"
51
pPrim IntTy = text "i32"
28
false
true
0
5
13
21
10
11
null
null
diku-kmc/regexps-syntax
KMC/Syntax/Parser.hs
mit
-- | Parse a dot, returning a constructor representing the "wildcard symbol". -- This must be added to the datatype Regex before it can be used. wildcardP :: Parser ParsedRegex wildcardP = Dot <$ char '.'
206
wildcardP :: Parser ParsedRegex wildcardP = Dot <$ char '.'
59
wildcardP = Dot <$ char '.'
27
true
true
0
6
37
23
12
11
null
null
fmapfmapfmap/amazonka
amazonka-emr/gen/Network/AWS/EMR/Types/Product.hs
mpl-2.0
-- | A user-defined key, which is the minimum required information for a -- valid tag. For more information, see -- <http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/emr-plan-tags.html Tagging Amazon EMR Resources>. tagKey :: Lens' Tag (Maybe Text) tagKey = lens _tagKey (\ s a -> s{_tagKey = a})
313
tagKey :: Lens' Tag (Maybe Text) tagKey = lens _tagKey (\ s a -> s{_tagKey = a})
80
tagKey = lens _tagKey (\ s a -> s{_tagKey = a})
47
true
true
2
9
42
57
27
30
null
null
google/codeworld
codeworld-api/src/CodeWorld/Parameter.hs
apache-2.0
-- | Adjusts the output of a parameter by passing it through a conversion -- function. Built-in parameters usually range from 0 to 1, and conversions -- can be used to rescale the output to a different range. converted :: (Double -> Double) -> Parameter -> Parameter converted c (Parameter name val pic bounds handle) =...
379
converted :: (Double -> Double) -> Parameter -> Parameter converted c (Parameter name val pic bounds handle) = Parameter name (c val) pic bounds (converted c . handle)
169
converted c (Parameter name val pic bounds handle) = Parameter name (c val) pic bounds (converted c . handle)
111
true
true
0
8
68
75
39
36
null
null
ezyang/ghc
testsuite/tests/numeric/should_run/arith011.hs
bsd-3-clause
testNatural = do let zero = 0 :: Natural putStrLn $ "--------------------------------" putStrLn $ "--Testing Natural" putStrLn $ "--------------------------------" testEnum zero testReadShow zero testEq zero testOrd zero testNum zero testReal zero testIntegral zero testB...
425
testNatural = do let zero = 0 :: Natural putStrLn $ "--------------------------------" putStrLn $ "--Testing Natural" putStrLn $ "--------------------------------" testEnum zero testReadShow zero testEq zero testOrd zero testNum zero testReal zero testIntegral zero testB...
425
testNatural = do let zero = 0 :: Natural putStrLn $ "--------------------------------" putStrLn $ "--Testing Natural" putStrLn $ "--------------------------------" testEnum zero testReadShow zero testEq zero testOrd zero testNum zero testReal zero testIntegral zero testB...
425
false
false
1
10
107
95
37
58
null
null
matonix/pfds
src/PFDS/Sec9/Ex16.hs
bsd-3-clause
delete :: Ord a => a -> Heap a -> Heap a delete x (p, n) = invariant (p, H.insert x n)
86
delete :: Ord a => a -> Heap a -> Heap a delete x (p, n) = invariant (p, H.insert x n)
86
delete x (p, n) = invariant (p, H.insert x n)
45
false
true
0
8
21
59
29
30
null
null
cshung/MiscLab
Haskell99/q07.test.hs
mit
main = runTestTT $ TestList [test1,test2,test3,test4]
53
main = runTestTT $ TestList [test1,test2,test3,test4]
53
main = runTestTT $ TestList [test1,test2,test3,test4]
53
false
false
0
7
5
25
14
11
null
null
ihc/futhark
src/Futhark/Analysis/HORepresentation/SOAC.hs
isc
identityTransform _ = False
27
identityTransform _ = False
27
identityTransform _ = False
27
false
false
0
5
3
9
4
5
null
null
Michaelt293/fatty-acid-biosynthesis
test/Spec.hs
bsd-3-clause
main :: IO () main = hspec $ do describe "elongase" . it "should add two carbons to carboxylic end" $ elongase ala `shouldBe` FA 20 [11, 14, 17] describe "betaOxidation" . it "should remove two carbons from carboxylic end" $ betaOxidation ala `shouldBe` FA 16 [7, 10, 13] describe "delt...
1,023
main :: IO () main = hspec $ do describe "elongase" . it "should add two carbons to carboxylic end" $ elongase ala `shouldBe` FA 20 [11, 14, 17] describe "betaOxidation" . it "should remove two carbons from carboxylic end" $ betaOxidation ala `shouldBe` FA 16 [7, 10, 13] describe "delt...
1,023
main = hspec $ do describe "elongase" . it "should add two carbons to carboxylic end" $ elongase ala `shouldBe` FA 20 [11, 14, 17] describe "betaOxidation" . it "should remove two carbons from carboxylic end" $ betaOxidation ala `shouldBe` FA 16 [7, 10, 13] describe "delta5Desaturase" ...
1,009
false
true
0
12
312
397
218
179
null
null
yjwen/hada
test/TestTopoGraph.hs
lgpl-3.0
loop = edge 0 0
15
loop = edge 0 0
15
loop = edge 0 0
15
false
false
0
5
4
11
5
6
null
null
pseudonom/persistent
persistent-test/src/DataTypeTest.hs
mit
asIO :: IO a -> IO a asIO = id
30
asIO :: IO a -> IO a asIO = id
30
asIO = id
9
false
true
0
6
9
21
10
11
null
null
sighingnow/hindent
src/main/Test.hs
bsd-3-clause
skipEmptyLines other = other
28
skipEmptyLines other = other
28
skipEmptyLines other = other
28
false
false
0
5
3
9
4
5
null
null
tcoenraad/functioneel-programmeren
2012/opg2a.hs
mit
evalB :: ExprB -> Bool evalB (OpB EQu expr1 expr2) = evalA expr1 == evalA expr2
79
evalB :: ExprB -> Bool evalB (OpB EQu expr1 expr2) = evalA expr1 == evalA expr2
79
evalB (OpB EQu expr1 expr2) = evalA expr1 == evalA expr2
56
false
true
0
7
15
38
18
20
null
null
duplode/threepenny-gui
src/Graphics/UI/Threepenny/Attributes.hs
bsd-3-clause
border = intAttr "border"
40
border = intAttr "border"
40
border = intAttr "border"
40
false
false
1
5
18
12
4
8
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Constants.hs
bsd-2-clause
qlangOpEqual :: String qlangOpEqual = "=="
42
qlangOpEqual :: String qlangOpEqual = "=="
42
qlangOpEqual = "=="
19
false
true
0
4
5
11
6
5
null
null