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
ttuegel/loops
src/Control/Monad/Loop/Internal.hs
bsd-3-clause
continue = return
17
continue = return
17
continue = return
17
false
false
1
5
2
10
3
7
null
null
teleshoes/taffybar
src/System/Taffybar/Widget/WttrIn.hs
bsd-3-clause
logException :: HttpException -> IO (Bool, ByteString) logException e = do let errmsg = show e logM "System.Taffybar.Widget.WttrIn" ERROR $ ("Warning: Couldn't call wttr.in. \n" ++ errmsg) return $ (False, "✨")
220
logException :: HttpException -> IO (Bool, ByteString) logException e = do let errmsg = show e logM "System.Taffybar.Widget.WttrIn" ERROR $ ("Warning: Couldn't call wttr.in. \n" ++ errmsg) return $ (False, "✨")
220
logException e = do let errmsg = show e logM "System.Taffybar.Widget.WttrIn" ERROR $ ("Warning: Couldn't call wttr.in. \n" ++ errmsg) return $ (False, "✨")
165
false
true
0
10
40
71
35
36
null
null
mrakgr/futhark
src/Futhark/CodeGen/ImpGen/Kernels.hs
bsd-3-clause
compileKernelResult constants dest (ThreadsReturn AllThreads what) = ImpGen.copyDWIMDest dest [ImpGen.varIndex $ kernelGlobalThreadId constants] what []
154
compileKernelResult constants dest (ThreadsReturn AllThreads what) = ImpGen.copyDWIMDest dest [ImpGen.varIndex $ kernelGlobalThreadId constants] what []
154
compileKernelResult constants dest (ThreadsReturn AllThreads what) = ImpGen.copyDWIMDest dest [ImpGen.varIndex $ kernelGlobalThreadId constants] what []
154
false
false
0
8
16
51
22
29
null
null
ihc/futhark
src/Futhark/Analysis/ScalExp.hs
isc
scalExpType (SQuot e _) = scalExpType e
39
scalExpType (SQuot e _) = scalExpType e
39
scalExpType (SQuot e _) = scalExpType e
39
false
false
0
6
6
21
9
12
null
null
hvr/lens
examples/Pong.hs
bsd-3-clause
-- The main program action main = do v:vs <- startingSpeeds let world = ballSpeed .~ v $ vectors .~ vs $ initial play display backColor fps world draw handle update where display = InWindow "Pong!" (windowWidth, windowHeight) (200, 200) backColor = white fps = 120 -- Generate the random l...
342
main = do v:vs <- startingSpeeds let world = ballSpeed .~ v $ vectors .~ vs $ initial play display backColor fps world draw handle update where display = InWindow "Pong!" (windowWidth, windowHeight) (200, 200) backColor = white fps = 120 -- Generate the random list of starting speeds
314
main = do v:vs <- startingSpeeds let world = ballSpeed .~ v $ vectors .~ vs $ initial play display backColor fps world draw handle update where display = InWindow "Pong!" (windowWidth, windowHeight) (200, 200) backColor = white fps = 120 -- Generate the random list of starting speeds
314
true
false
3
13
84
109
51
58
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | All of the following values are quite arbitrary - there are no -- "good" defaults, these must be customised per-site ispecsMinmaxDefaults :: Map String (Map String Int) ispecsMinmaxDefaults = Map.fromList [(ispecsMin, Map.fromList [(ConstantUtils.ispecMemSize, Types.iSpecMemorySize Types.defMinISpec), ...
1,193
ispecsMinmaxDefaults :: Map String (Map String Int) ispecsMinmaxDefaults = Map.fromList [(ispecsMin, Map.fromList [(ConstantUtils.ispecMemSize, Types.iSpecMemorySize Types.defMinISpec), (ConstantUtils.ispecCpuCount, Types.iSpecCpuCount Types.defMinISpec), (ConstantUtils.ispecDiskCount, Types.iSpec...
1,071
ispecsMinmaxDefaults = Map.fromList [(ispecsMin, Map.fromList [(ConstantUtils.ispecMemSize, Types.iSpecMemorySize Types.defMinISpec), (ConstantUtils.ispecCpuCount, Types.iSpecCpuCount Types.defMinISpec), (ConstantUtils.ispecDiskCount, Types.iSpecDiskCount Types.defMinISpec), (ConstantUtils.is...
1,019
true
true
1
12
144
280
152
128
null
null
gridaphobe/ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
mkCoLetMatchResult :: CoreBind -> MatchResult -> MatchResult mkCoLetMatchResult bind = adjustMatchResult (mkCoreLet bind)
121
mkCoLetMatchResult :: CoreBind -> MatchResult -> MatchResult mkCoLetMatchResult bind = adjustMatchResult (mkCoreLet bind)
121
mkCoLetMatchResult bind = adjustMatchResult (mkCoreLet bind)
60
false
true
0
8
12
37
16
21
null
null
rrnewton/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalSub :: NumType a -> ((a, a) -> a) evalSub (IntegralNumType ty) | IntegralDict <- integralDict ty = uncurry (-)
114
evalSub :: NumType a -> ((a, a) -> a) evalSub (IntegralNumType ty) | IntegralDict <- integralDict ty = uncurry (-)
114
evalSub (IntegralNumType ty) | IntegralDict <- integralDict ty = uncurry (-)
76
false
true
0
9
19
62
30
32
null
null
sdiehl/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
genMachOp_slow _ (MO_VF_Extract l w) [val, idx] = runExprData $ do vval <- exprToVarW val vidx <- exprToVarW idx vval' <- singletonPanic "genMachOp_slow" <$> castVarsW Signed [(vval, LMVector l ty)] doExprW ty $ Extract vval' vidx where ty = widthToLlvmFloat w -- Element insertion
317
genMachOp_slow _ (MO_VF_Extract l w) [val, idx] = runExprData $ do vval <- exprToVarW val vidx <- exprToVarW idx vval' <- singletonPanic "genMachOp_slow" <$> castVarsW Signed [(vval, LMVector l ty)] doExprW ty $ Extract vval' vidx where ty = widthToLlvmFloat w -- Element insertion
317
genMachOp_slow _ (MO_VF_Extract l w) [val, idx] = runExprData $ do vval <- exprToVarW val vidx <- exprToVarW idx vval' <- singletonPanic "genMachOp_slow" <$> castVarsW Signed [(vval, LMVector l ty)] doExprW ty $ Extract vval' vidx where ty = widthToLlvmFloat w -- Element insertion
317
false
false
0
13
79
111
52
59
null
null
fatho/ninja
src/Graphics/Ninja/GL/VertexAttrib.hs
mit
storableVertexLayout :: Storable a => GLenum -> Int -> Int -> a -> VertexLayout storableVertexLayout dataType width num x = VertexLayout (sizeOf x) [ VertexAttribInfo "" width $ VertexAttribLayout num dataType False (sizeOf x) 0 ]
232
storableVertexLayout :: Storable a => GLenum -> Int -> Int -> a -> VertexLayout storableVertexLayout dataType width num x = VertexLayout (sizeOf x) [ VertexAttribInfo "" width $ VertexAttribLayout num dataType False (sizeOf x) 0 ]
232
storableVertexLayout dataType width num x = VertexLayout (sizeOf x) [ VertexAttribInfo "" width $ VertexAttribLayout num dataType False (sizeOf x) 0 ]
152
false
true
0
9
37
84
40
44
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Text/Parser/Sapic.hs
gpl-3.0
-- used for debugging -- println :: String -> ParsecT String u Identity () -- println str = traceShowM str -- parse a process definition (let block) processDef :: OpenTheory -> Parser ProcessDef processDef thy= do letIdentifier i <- BC.pack <$> identifier equalSign ...
599
processDef :: OpenTheory -> Parser ProcessDef processDef thy= do letIdentifier i <- BC.pack <$> identifier equalSign p <- process thy return (ProcessDef (BC.unpack i) p ) -- | Parse a single sapic action, i.e., a thing that can appear befo...
449
processDef thy= do letIdentifier i <- BC.pack <$> identifier equalSign p <- process thy return (ProcessDef (BC.unpack i) p ) -- | Parse a single sapic action, i.e., a thing that can appear before the ";" -- (This includes almost all items ...
403
true
true
0
12
170
79
39
40
null
null
lspitzner/brittany
data/Test397.hs
agpl-3.0
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func = f where {-# INLINE f #-} f = id
157
func = f where {-# INLINE f #-} f = id
43
func = f where {-# INLINE f #-} f = id
43
true
false
2
5
26
23
9
14
null
null
rethab/habi
test/TestUtil.hs
mit
mock_decr_async = BS.map safePred
33
mock_decr_async = BS.map safePred
33
mock_decr_async = BS.map safePred
33
false
false
0
6
3
11
5
6
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/TromboneMuted.hs
bsd-3-clause
note6 :: Note note6 = Note (Pitch 116.541 34 "a#2") 7 (Range (NoteRange (NoteRangeAmplitude 7342.08 63 4.0e-2) (NoteRangeHarmonicFreq 1 116.54)) (NoteRange (NoteRangeAmplitude 582.7 5 4128.0) (NoteRangeHarmonicFreq 85 9905.98))) [Harmonic 1...
2,833
note6 :: Note note6 = Note (Pitch 116.541 34 "a#2") 7 (Range (NoteRange (NoteRangeAmplitude 7342.08 63 4.0e-2) (NoteRangeHarmonicFreq 1 116.54)) (NoteRange (NoteRangeAmplitude 582.7 5 4128.0) (NoteRangeHarmonicFreq 85 9905.98))) [Harmonic 1...
2,833
note6 = Note (Pitch 116.541 34 "a#2") 7 (Range (NoteRange (NoteRangeAmplitude 7342.08 63 4.0e-2) (NoteRangeHarmonicFreq 1 116.54)) (NoteRange (NoteRangeAmplitude 582.7 5 4128.0) (NoteRangeHarmonicFreq 85 9905.98))) [Harmonic 1 2.964 184.67 ...
2,819
false
true
0
11
783
1,145
593
552
null
null
eunmin/fpis-hs
src/Ch4.hs
bsd-3-clause
optionFilter f (Some x) = if (f x) then Some x else None
112
optionFilter f (Some x) = if (f x) then Some x else None
112
optionFilter f (Some x) = if (f x) then Some x else None
112
false
false
0
7
68
34
17
17
null
null
anuraags/hs2048
src/Game.hs
bsd-3-clause
getColumnTile :: [Tile] -> ColType -> Maybe Tile getColumnTile (x:xs) 0 = Just x
82
getColumnTile :: [Tile] -> ColType -> Maybe Tile getColumnTile (x:xs) 0 = Just x
82
getColumnTile (x:xs) 0 = Just x
33
false
true
0
10
15
45
21
24
null
null
glguy/ssh-hans
src/Network/SSH/State.hs
bsd-3-clause
-- | Select our value from client and server values according to 'Role'. -- -- Mnemonic: argument order is the same as the function name: client -- and then server. clientAndServer2usAndThem :: Role -> a {- ^ client value -} -> a {- ^ server value -} -> (a, a) clientAndServer2usAndThem ClientRole c s = (c, s)
312
clientAndServer2usAndThem :: Role -> a {- ^ client value -} -> a {- ^ server value -} -> (a, a) clientAndServer2usAndThem ClientRole c s = (c, s)
147
clientAndServer2usAndThem ClientRole c s = (c, s)
49
true
true
0
10
58
54
30
24
null
null
siddhanathan/ghc
compiler/prelude/THNames.hs
bsd-3-clause
predQTyConKey = mkPreludeTyConUnique 224
50
predQTyConKey = mkPreludeTyConUnique 224
50
predQTyConKey = mkPreludeTyConUnique 224
50
false
false
0
5
13
9
4
5
null
null
dcreager/cabal
Distribution/Simple/Utils.hs
bsd-3-clause
readUTF8File :: FilePath -> IO String readUTF8File f = fmap fromUTF8 . hGetContents =<< openBinaryFile f ReadMode
113
readUTF8File :: FilePath -> IO String readUTF8File f = fmap fromUTF8 . hGetContents =<< openBinaryFile f ReadMode
113
readUTF8File f = fmap fromUTF8 . hGetContents =<< openBinaryFile f ReadMode
75
false
true
0
7
16
37
17
20
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
stRados :: String stRados = Types.storageTypeToRaw StorageRados
63
stRados :: String stRados = Types.storageTypeToRaw StorageRados
63
stRados = Types.storageTypeToRaw StorageRados
45
false
true
0
6
6
16
8
8
null
null
np/ling
Ling/Norm.hs
bsd-3-clause
int0, int1 :: Term int0 = Lit (LInteger 0)
42
int0, int1 :: Term int0 = Lit (LInteger 0)
42
int0 = Lit (LInteger 0)
23
false
true
0
7
8
22
12
10
null
null
mightymoose/liquidhaskell
docs/slides/NEU14/00_Refinements.hs
bsd-3-clause
foldr f acc N = acc
26
foldr f acc N = acc
26
foldr f acc N = acc
26
false
false
1
5
12
19
6
13
null
null
seckcoder/vector
Data/Vector/Unboxed.hs
bsd-3-clause
elemIndex = G.elemIndex
23
elemIndex = G.elemIndex
23
elemIndex = G.elemIndex
23
false
false
0
5
2
8
4
4
null
null
Cahu/krpc-hs
src/KRPCHS/KerbalAlarmClock.hs
gpl-3.0
{- - The vessel that the alarm is attached to. -} getAlarmVessel :: KRPCHS.KerbalAlarmClock.Alarm -> RPCContext (KRPCHS.SpaceCenter.Vessel) getAlarmVessel thisArg = do let r = makeRequest "KerbalAlarmClock" "Alarm_get_Vessel" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
305
getAlarmVessel :: KRPCHS.KerbalAlarmClock.Alarm -> RPCContext (KRPCHS.SpaceCenter.Vessel) getAlarmVessel thisArg = do let r = makeRequest "KerbalAlarmClock" "Alarm_get_Vessel" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
253
getAlarmVessel thisArg = do let r = makeRequest "KerbalAlarmClock" "Alarm_get_Vessel" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
163
true
true
0
13
49
76
35
41
null
null
ezyang/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
diffExpr top env (Lam b1 e1) (Lam b2 e2) | eqTypeX env (varType b1) (varType b2) -- False for Id/TyVar combination = diffExpr top (rnBndr2 env b1 b2) e1 e2
162
diffExpr top env (Lam b1 e1) (Lam b2 e2) | eqTypeX env (varType b1) (varType b2) -- False for Id/TyVar combination = diffExpr top (rnBndr2 env b1 b2) e1 e2
162
diffExpr top env (Lam b1 e1) (Lam b2 e2) | eqTypeX env (varType b1) (varType b2) -- False for Id/TyVar combination = diffExpr top (rnBndr2 env b1 b2) e1 e2
162
false
false
0
10
36
76
36
40
null
null
paolino/book-a-visit
common/Status.hs
bsd-3-clause
{- type ModTP (f :: Presence Role -> * -> * ) (g :: Role -> * -> * ) a = forall u. f (Present u) a -> g u a onBothP :: ModTP f g a -> PresenceRoled f a -> Roled g a onBothP s = bimap s s -} throughP :: (forall u . SummaryC u a => Transaction s u a -> b) -> PresenceRoled (Transaction s) a -> b throughP f (E...
334
throughP :: (forall u . SummaryC u a => Transaction s u a -> b) -> PresenceRoled (Transaction s) a -> b throughP f (EGiver x) = f x
144
throughP f (EGiver x) = f x
27
true
true
0
10
94
73
36
37
null
null
demhydraz/waffle
src/Backend/Lua/Lua.hs
bsd-3-clause
makeOp e "or" x = Op e Or x
28
makeOp e "or" x = Op e Or x
28
makeOp e "or" x = Op e Or x
28
false
false
0
5
9
20
9
11
null
null
DATX02-17-26/DATX02-17-26
libsrc/Norm/SumsOfProducts.hs
gpl-2.0
stage :: Int stage = 5
22
stage :: Int stage = 5
22
stage = 5
9
false
true
0
6
5
18
7
11
null
null
sdiehl/ghc
compiler/main/DynFlags.hs
bsd-3-clause
addWay' :: Way -> DynFlags -> DynFlags addWay' w dflags0 = let platform = targetPlatform dflags0 dflags1 = dflags0 { ways = w : ways dflags0 } dflags2 = foldr setGeneralFlag' dflags1 (wayGeneralFlags platform w) ...
470
addWay' :: Way -> DynFlags -> DynFlags addWay' w dflags0 = let platform = targetPlatform dflags0 dflags1 = dflags0 { ways = w : ways dflags0 } dflags2 = foldr setGeneralFlag' dflags1 (wayGeneralFlags platform w) ...
470
addWay' w dflags0 = let platform = targetPlatform dflags0 dflags1 = dflags0 { ways = w : ways dflags0 } dflags2 = foldr setGeneralFlag' dflags1 (wayGeneralFlags platform w) dflags3 = foldr unSetGeneralFlag' d...
431
false
true
0
12
216
103
50
53
null
null
thoughtpolice/vacuum
src/GHC/Vacuum/Q.hs
lgpl-3.0
getQContents :: Q a -> IO [a] getQContents q = do a <- takeQ q as <- unsafeInterleaveIO (getQContents q) return (a:as)
124
getQContents :: Q a -> IO [a] getQContents q = do a <- takeQ q as <- unsafeInterleaveIO (getQContents q) return (a:as)
124
getQContents q = do a <- takeQ q as <- unsafeInterleaveIO (getQContents q) return (a:as)
94
false
true
0
10
27
66
30
36
null
null
maggy96/haskell
cis194/06-Lazy_Evaluation/HW06.hs
mit
sInterleave :: Stream a -> Stream a -> Stream a sInterleave (Cons x xs) b = Cons x $ sInterleave b xs
101
sInterleave :: Stream a -> Stream a -> Stream a sInterleave (Cons x xs) b = Cons x $ sInterleave b xs
101
sInterleave (Cons x xs) b = Cons x $ sInterleave b xs
53
false
true
0
7
21
53
24
29
null
null
ideas-edu/ideas
src/Ideas/Main/CGI.hs
apache-2.0
cleanupVarName "SCRIPT_NAME" = "CGI-Script-Name"
48
cleanupVarName "SCRIPT_NAME" = "CGI-Script-Name"
48
cleanupVarName "SCRIPT_NAME" = "CGI-Script-Name"
48
false
false
0
5
3
9
4
5
null
null
8l/beri
cherilibs/trunk/tools/debug/CheriCTL.hs
apache-2.0
pc :: TestIO Integer pc = do (ec,s1,s2) <- lift $ readProcessWithExitCode "./cherictl" ["pc"] "" let pPC = do string "DEBUG MIPS PC 0x" (l, b) <- number 4 16 hexDigit return b case (ec == ExitSuccess, runIdentity $ runPT (pPC) () "PC" s1) of (True, Right rv) -> return $ rv (T...
459
pc :: TestIO Integer pc = do (ec,s1,s2) <- lift $ readProcessWithExitCode "./cherictl" ["pc"] "" let pPC = do string "DEBUG MIPS PC 0x" (l, b) <- number 4 16 hexDigit return b case (ec == ExitSuccess, runIdentity $ runPT (pPC) () "PC" s1) of (True, Right rv) -> return $ rv (T...
459
pc = do (ec,s1,s2) <- lift $ readProcessWithExitCode "./cherictl" ["pc"] "" let pPC = do string "DEBUG MIPS PC 0x" (l, b) <- number 4 16 hexDigit return b case (ec == ExitSuccess, runIdentity $ runPT (pPC) () "PC" s1) of (True, Right rv) -> return $ rv (True, Left err) -> thr...
438
false
true
0
14
137
197
96
101
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_RED :: GLenum gl_RED = 0x1903
32
gl_RED :: GLenum gl_RED = 0x1903
32
gl_RED = 0x1903
15
false
true
0
4
5
11
6
5
null
null
FranklinChen/hugs98-plus-Sep2006
packages/OpenAL/Sound/OpenAL/Constants.hs
bsd-3-clause
al_EXPONENT_DISTANCE = CONST_AL_EXPONENT_DISTANCE
64
al_EXPONENT_DISTANCE = CONST_AL_EXPONENT_DISTANCE
64
al_EXPONENT_DISTANCE = CONST_AL_EXPONENT_DISTANCE
64
false
false
0
4
17
6
3
3
null
null
sdiehl/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isLocalRule :: CoreRule -> Bool isLocalRule = ru_local
54
isLocalRule :: CoreRule -> Bool isLocalRule = ru_local
54
isLocalRule = ru_local
22
false
true
0
7
7
22
9
13
null
null
jstolarek/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
caseE :: ExpQ -> [MatchQ] -> ExpQ caseE e ms = do { e1 <- e; ms1 <- sequence ms; return (CaseE e1 ms1) }
104
caseE :: ExpQ -> [MatchQ] -> ExpQ caseE e ms = do { e1 <- e; ms1 <- sequence ms; return (CaseE e1 ms1) }
104
caseE e ms = do { e1 <- e; ms1 <- sequence ms; return (CaseE e1 ms1) }
70
false
true
0
10
24
67
32
35
null
null
chjp2046/fbthrift
thrift/lib/hs/tests/PrettyJSONTests.hs
apache-2.0
main :: IO Counts main = runTestTT tests
40
main :: IO Counts main = runTestTT tests
40
main = runTestTT tests
22
false
true
0
5
7
17
8
9
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Asps/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). alUploadType :: Lens' AspsList (Maybe Text) alUploadType = lens _alUploadType (\ s a -> s{_alUploadType = a})
182
alUploadType :: Lens' AspsList (Maybe Text) alUploadType = lens _alUploadType (\ s a -> s{_alUploadType = a})
111
alUploadType = lens _alUploadType (\ s a -> s{_alUploadType = a})
67
true
true
0
9
28
48
25
23
null
null
haskell-works/conduit-succinct-json
src/Data/Succinct.hs
bsd-3-clause
stringToBits :: String -> [Bool] stringToBits [] = []
53
stringToBits :: String -> [Bool] stringToBits [] = []
53
stringToBits [] = []
20
false
true
0
6
8
25
13
12
null
null
NorfairKing/the-notes
src/Computability/RegularExpressions.hs
gpl-2.0
regularExpressionsOverAlphabet :: Note regularExpressionsOverAlphabet = de $ do s [the, set, " of ", regularExpression, "s over an ", alphabet, " ", m alph_, " is denoted as ", m reoa_]
191
regularExpressionsOverAlphabet :: Note regularExpressionsOverAlphabet = de $ do s [the, set, " of ", regularExpression, "s over an ", alphabet, " ", m alph_, " is denoted as ", m reoa_]
191
regularExpressionsOverAlphabet = de $ do s [the, set, " of ", regularExpression, "s over an ", alphabet, " ", m alph_, " is denoted as ", m reoa_]
152
false
true
0
10
36
57
32
25
null
null
pliosoft/toml-parse
src/Text/Toml/Query.hs
bsd-3-clause
-- | Index a path at current path indexArray :: Int -> TomlPath indexArray i = TomlPath [ArrayLookup i]
103
indexArray :: Int -> TomlPath indexArray i = TomlPath [ArrayLookup i]
69
indexArray i = TomlPath [ArrayLookup i]
39
true
true
0
7
18
28
14
14
null
null
cchalmers/geometry
src/Geometry/ThreeD/Combinators.hs
bsd-3-clause
-- | Translate the object along @unitX@ so that all points have -- positive x-values. alignXMin :: (InSpace v n a, R1 v, Enveloped a, HasOrigin a) => a -> a alignXMin = align unit_X
183
alignXMin :: (InSpace v n a, R1 v, Enveloped a, HasOrigin a) => a -> a alignXMin = align unit_X
95
alignXMin = align unit_X
24
true
true
0
6
36
51
27
24
null
null
kairuku/stack
src/Stack/Types/Config.hs
bsd-3-clause
-- | Directory containing the project's stack.yaml file bcRoot :: BuildConfig -> Path Abs Dir bcRoot = parent . bcStackYaml
123
bcRoot :: BuildConfig -> Path Abs Dir bcRoot = parent . bcStackYaml
67
bcRoot = parent . bcStackYaml
29
true
true
1
7
19
32
14
18
null
null
petertseng/adventofcode-hs
lib/AdventOfCode/Password.hs
apache-2.0
nextPair s = error ("not enough chars in password " ++ s)
57
nextPair s = error ("not enough chars in password " ++ s)
57
nextPair s = error ("not enough chars in password " ++ s)
57
false
false
0
7
11
19
9
10
null
null
brendanhay/gogol
gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Empty' with the minimum fields required to make a request. -- empty :: Empty empty = Empty'
120
empty :: Empty empty = Empty'
33
empty = Empty'
14
true
true
0
4
26
13
8
5
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
fromFlag NoFlag = error "fromFlag NoFlag. Use fromFlagOrDefault"
66
fromFlag NoFlag = error "fromFlag NoFlag. Use fromFlagOrDefault"
66
fromFlag NoFlag = error "fromFlag NoFlag. Use fromFlagOrDefault"
66
false
false
0
5
9
12
5
7
null
null
el-devo/SAT
SAT.hs
bsd-3-clause
isUIP :: State -> Bool isUIP = (== 1) . cNum . conflict
55
isUIP :: State -> Bool isUIP = (== 1) . cNum . conflict
55
isUIP = (== 1) . cNum . conflict
32
false
true
0
7
12
34
16
18
null
null
msullivan/advent-of-code
2016/A20a.hs
mit
-------- matches k (lo,hi) = k >= lo && k <= hi
48
matches k (lo,hi) = k >= lo && k <= hi
38
matches k (lo,hi) = k >= lo && k <= hi
38
true
false
0
7
12
30
16
14
null
null
matthewscottgordon/funk
test/Test/Scope.hs
apache-2.0
bar2 = UnresolvedName "bar"
27
bar2 = UnresolvedName "bar"
27
bar2 = UnresolvedName "bar"
27
false
false
0
5
3
9
4
5
null
null
tensor5/tensor
src/Data/Tensor.hs
bsd-3-clause
-- | Transform a one-row matrix into a vector. rowVector2Vector ∷ IsTensor t ⇒ t '[ 'One, i] e → t '[i] e rowVector2Vector = unT1
129
rowVector2Vector ∷ IsTensor t ⇒ t '[ 'One, i] e → t '[i] e rowVector2Vector = unT1
82
rowVector2Vector = unT1
23
true
true
0
10
25
48
25
23
null
null
nbloomf/carl
test/Tests/Lib/Struct/Matrix.hs
gpl-3.0
testDagBipRingoidMat :: (Ringoid t, Arbitrary t, Show t, RingoidArb t) => t -> TestTree testDagBipRingoidMat t = testDagBipRingoid (mCell t)
140
testDagBipRingoidMat :: (Ringoid t, Arbitrary t, Show t, RingoidArb t) => t -> TestTree testDagBipRingoidMat t = testDagBipRingoid (mCell t)
140
testDagBipRingoidMat t = testDagBipRingoid (mCell t)
52
false
true
0
7
19
54
27
27
null
null
phischu/fragnix
builtins/integer-gmp/GHC.Integer.Type.hs
bsd-3-clause
remInteger (Jn# n) (Jn# d) = bigNatToNegInteger (remBigNat n d)
65
remInteger (Jn# n) (Jn# d) = bigNatToNegInteger (remBigNat n d)
65
remInteger (Jn# n) (Jn# d) = bigNatToNegInteger (remBigNat n d)
65
false
false
0
7
11
34
16
18
null
null
keera-studios/hsQt
Qtc/Enums/Network/QFtp.hs
bsd-2-clause
ePassive :: TransferMode ePassive = ieTransferMode $ 1
56
ePassive :: TransferMode ePassive = ieTransferMode $ 1
56
ePassive = ieTransferMode $ 1
31
false
true
0
6
9
18
8
10
null
null
christiaanb/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
getLibOrExec :: InitFlags -> IO InitFlags getLibOrExec flags = do isLib <- return (flagToMaybe $ packageType flags) ?>> maybePrompt flags (either (const Library) id `fmap` promptList "What does the package build" [Library, Executable...
864
getLibOrExec :: InitFlags -> IO InitFlags getLibOrExec flags = do isLib <- return (flagToMaybe $ packageType flags) ?>> maybePrompt flags (either (const Library) id `fmap` promptList "What does the package build" [Library, Executable...
864
getLibOrExec flags = do isLib <- return (flagToMaybe $ packageType flags) ?>> maybePrompt flags (either (const Library) id `fmap` promptList "What does the package build" [Library, Executable] Nothi...
822
false
true
0
15
300
158
79
79
null
null
olorin/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types.hs
mpl-2.0
-- | The supplied value is not a valid DB cluster snapshot state. _InvalidDBClusterSnapshotStateFault :: AsError a => Getting (First ServiceError) a ServiceError _InvalidDBClusterSnapshotStateFault = _ServiceError . hasStatus 400 . hasCode "InvalidDBClusterSnapshotStateFault"
284
_InvalidDBClusterSnapshotStateFault :: AsError a => Getting (First ServiceError) a ServiceError _InvalidDBClusterSnapshotStateFault = _ServiceError . hasStatus 400 . hasCode "InvalidDBClusterSnapshotStateFault"
218
_InvalidDBClusterSnapshotStateFault = _ServiceError . hasStatus 400 . hasCode "InvalidDBClusterSnapshotStateFault"
122
true
true
0
8
39
46
22
24
null
null
jgm/blaze-html
Text/Blaze/Renderer/String.hs
bsd-3-clause
fromChoiceString :: ChoiceString -- ^ String to render -> String -- ^ String to append -> String -- ^ Resulting string fromChoiceString (Static s) = getString s
213
fromChoiceString :: ChoiceString -- ^ String to render -> String -- ^ String to append -> String fromChoiceString (Static s) = getString s
184
fromChoiceString (Static s) = getString s
45
true
true
0
7
79
34
18
16
null
null
Kheldar/hw-koans
solution/Koan/Start.hs
bsd-3-clause
enrolled :: Bool enrolled = True
32
enrolled :: Bool enrolled = True
32
enrolled = True
15
false
true
0
4
5
11
6
5
null
null
jstolarek/slicer
lib/Language/Slicer/Parser.hs
gpl-3.0
strDouble = "double"
27
strDouble = "double"
27
strDouble = "double"
27
false
false
1
5
9
10
3
7
null
null
dorchard/gram_lang
frontend/src/Language/Granule/Context.hs
bsd-3-clause
replace (x : ctxt) name v = x : replace ctxt name v
53
replace (x : ctxt) name v = x : replace ctxt name v
53
replace (x : ctxt) name v = x : replace ctxt name v
53
false
false
0
7
14
31
15
16
null
null
tanimoto/iteratee
tests/bench_strings.hs
bsd-3-clause
main :: IO () main = defaultMain [ bench "Vanilla String" bench_string , bench "Vanilla ByteString" bench_byte , bench "Vanilla Lazy ByteString" bench_byte_lazy , bench "Iteratee String" bench_iter_string , bench "Iteratee ByteString" bench_iter_byte ]
290
main :: IO () main = defaultMain [ bench "Vanilla String" bench_string , bench "Vanilla ByteString" bench_byte , bench "Vanilla Lazy ByteString" bench_byte_lazy , bench "Iteratee String" bench_iter_string , bench "Iteratee ByteString" bench_iter_byte ]
290
main = defaultMain [ bench "Vanilla String" bench_string , bench "Vanilla ByteString" bench_byte , bench "Vanilla Lazy ByteString" bench_byte_lazy , bench "Iteratee String" bench_iter_string , bench "Iteratee ByteString" bench_iter_byte ]
276
false
true
0
6
71
59
29
30
null
null
SKA-ScienceDataProcessor/RC
MS3/Sketches/GPU_Gridders/GPUGridder.hs
apache-2.0
normalizeAndExtractPolarization :: Int -> CUDA.CxDoubleDevPtr -> Grid -> IO () normalizeAndExtractPolarization pol polp (Grid _ gridp) = -- 128 * 32 = 4096 CUDA.launchKernel normalizeAndExtractPolarization_c (128, 128, 1) (32, 32, 1) 0 Nothing $ mapArgs polp gridp (fromIntegral pol :: Int32)
296
normalizeAndExtractPolarization :: Int -> CUDA.CxDoubleDevPtr -> Grid -> IO () normalizeAndExtractPolarization pol polp (Grid _ gridp) = -- 128 * 32 = 4096 CUDA.launchKernel normalizeAndExtractPolarization_c (128, 128, 1) (32, 32, 1) 0 Nothing $ mapArgs polp gridp (fromIntegral pol :: Int32)
296
normalizeAndExtractPolarization pol polp (Grid _ gridp) = -- 128 * 32 = 4096 CUDA.launchKernel normalizeAndExtractPolarization_c (128, 128, 1) (32, 32, 1) 0 Nothing $ mapArgs polp gridp (fromIntegral pol :: Int32)
217
false
true
0
9
44
97
51
46
null
null
apyrgio/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
inicParams :: FrozenSet String inicParams = ConstantUtils.mkSet (Map.keys inicParamsTypes)
90
inicParams :: FrozenSet String inicParams = ConstantUtils.mkSet (Map.keys inicParamsTypes)
90
inicParams = ConstantUtils.mkSet (Map.keys inicParamsTypes)
59
false
true
0
8
8
27
13
14
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionBackendServices/Update.hs
mpl-2.0
-- | Name of the region scoping this request. rbsuRegion :: Lens' RegionBackendServicesUpdate Text rbsuRegion = lens _rbsuRegion (\ s a -> s{_rbsuRegion = a})
160
rbsuRegion :: Lens' RegionBackendServicesUpdate Text rbsuRegion = lens _rbsuRegion (\ s a -> s{_rbsuRegion = a})
114
rbsuRegion = lens _rbsuRegion (\ s a -> s{_rbsuRegion = a})
61
true
true
1
9
26
46
22
24
null
null
energyflowanalysis/efa-2.1
src/EFA/Flow/Draw.hs
bsd-3-clause
dotFromPartGraph :: (Part part, Node.C node) => part -> (String, Graph node Graph.EitherEdge Unicode TopologyEdgeLabel) -> DotSubGraph T.Text dotFromPartGraph current (subtitle, gr) = DotSG True (Just $ Str $ T.pack $ dotIdentFromPart current) $ let (nodes, edges) = dotNodesEdgesFromPartGraph gr ...
489
dotFromPartGraph :: (Part part, Node.C node) => part -> (String, Graph node Graph.EitherEdge Unicode TopologyEdgeLabel) -> DotSubGraph T.Text dotFromPartGraph current (subtitle, gr) = DotSG True (Just $ Str $ T.pack $ dotIdentFromPart current) $ let (nodes, edges) = dotNodesEdgesFromPartGraph gr ...
489
dotFromPartGraph current (subtitle, gr) = DotSG True (Just $ Str $ T.pack $ dotIdentFromPart current) $ let (nodes, edges) = dotNodesEdgesFromPartGraph gr in DotStmts [GraphAttrs [labelFromString subtitle]] [] (map (dotNodeInPart current) nodes) (map (dotEdgeInPart curr...
331
false
true
0
12
119
170
85
85
null
null
brendanhay/gogol
gogol-digitalassetlinks/gen/Network/Google/Resource/DigitalAssetLinks/Statements/List.hs
mpl-2.0
-- | Web assets are identified by a URL that contains only the scheme, -- hostname and port parts. The format is http[s]:\/\/[:] Hostnames must be -- fully qualified: they must end in a single period (\"\`.\`\"). Only the -- schemes \"http\" and \"https\" are currently allowed. Port numbers are -- given as a decimal nu...
1,287
slSourceWebSite :: Lens' StatementsList (Maybe Text) slSourceWebSite = lens _slSourceWebSite (\ s a -> s{_slSourceWebSite = a})
135
slSourceWebSite = lens _slSourceWebSite (\ s a -> s{_slSourceWebSite = a})
82
true
true
1
9
191
67
41
26
null
null
joranvar/GoogleCodeJam
Y2015/Q/DTest.hs
gpl-3.0
runsolve = unlines . showSolutions . map (show . solve) . parse . tail . lines where showSolutions = zipWith (++) ["Case #" ++ show i ++ ": " | i <- [1::Int ..]]
165
runsolve = unlines . showSolutions . map (show . solve) . parse . tail . lines where showSolutions = zipWith (++) ["Case #" ++ show i ++ ": " | i <- [1::Int ..]]
165
runsolve = unlines . showSolutions . map (show . solve) . parse . tail . lines where showSolutions = zipWith (++) ["Case #" ++ show i ++ ": " | i <- [1::Int ..]]
165
false
false
0
11
37
79
42
37
null
null
philopon/best-haskell
src/best-haskell.hs
mit
rankingFilter :: Day -> [T.Text] -> [T.Text] -> Maybe T.Text -> [T.Text] -> Bool -> Bool -> Maybe CabalType -> M.Document rankingFilter end cats ms lcs pkg actv new typ = (if null cats then id else (:) ("$and" M.=: map (\c -> ["category" M.=: c]) cats)) $ (if null ms then id else (:) ("maintainers" M.=: ["...
886
rankingFilter :: Day -> [T.Text] -> [T.Text] -> Maybe T.Text -> [T.Text] -> Bool -> Bool -> Maybe CabalType -> M.Document rankingFilter end cats ms lcs pkg actv new typ = (if null cats then id else (:) ("$and" M.=: map (\c -> ["category" M.=: c]) cats)) $ (if null ms then id else (:) ("maintainers" M.=: ["...
886
rankingFilter end cats ms lcs pkg actv new typ = (if null cats then id else (:) ("$and" M.=: map (\c -> ["category" M.=: c]) cats)) $ (if null ms then id else (:) ("maintainers" M.=: ["$in" M.=: ms])) $ (case lcs of {Nothing -> id; Just l -> (("license" M.=: l):)}) $ (if null pkg then id else (:) (...
764
false
true
0
20
221
471
254
217
null
null
HIPERFIT/futhark
src/Futhark/CodeGen/ImpGen.hs
isc
compileAlloc pat _ _ = error $ "compileAlloc: Invalid pattern: " ++ pretty pat
80
compileAlloc pat _ _ = error $ "compileAlloc: Invalid pattern: " ++ pretty pat
80
compileAlloc pat _ _ = error $ "compileAlloc: Invalid pattern: " ++ pretty pat
80
false
false
0
6
15
24
11
13
null
null
mdsteele/fallback
src/Fallback/State/Action.hs
gpl-3.0
coneTarget :: Double -> Int -> TargetKind (Position, [Position]) coneTarget degrees maxRange = AreaTarget fn maxRange where fn :: (AreaState a) => a -> CharacterNumber -> Position -> [Position] fn ars charNum target = if target == origin then [] else let fov = arsVisibleForCharacter charNum ars vecTo po...
641
coneTarget :: Double -> Int -> TargetKind (Position, [Position]) coneTarget degrees maxRange = AreaTarget fn maxRange where fn :: (AreaState a) => a -> CharacterNumber -> Position -> [Position] fn ars charNum target = if target == origin then [] else let fov = arsVisibleForCharacter charNum ars vecTo po...
641
coneTarget degrees maxRange = AreaTarget fn maxRange where fn :: (AreaState a) => a -> CharacterNumber -> Position -> [Position] fn ars charNum target = if target == origin then [] else let fov = arsVisibleForCharacter charNum ars vecTo pos = fmap fromIntegral $ pos `pSub` origin canHit pos = po...
576
false
true
0
16
149
226
114
112
null
null
trskop/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
buildLib, replLib :: Verbosity -> Cabal.Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO () buildLib = buildOrReplLib False
231
buildLib, replLib :: Verbosity -> Cabal.Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO () buildLib = buildOrReplLib False
231
buildLib = buildOrReplLib False
31
false
true
0
12
78
56
28
28
null
null
merc1031/haskell-sonos-http-api
externals/test-preproc/Main.hs
bsd-3-clause
noExts :: String -> String noExts = dropExtension
49
noExts :: String -> String noExts = dropExtension
49
noExts = dropExtension
22
false
true
0
5
7
15
8
7
null
null
diku-dk/futhark
src/Futhark/Pass/ExpandAllocations.hs
isc
transformStm :: Stm GPUMem -> ExpandM (Stms GPUMem) -- It is possible that we are unable to expand allocations in some -- code versions. If so, we can remove the offending branch. Only if -- both versions fail do we propagate the error. transformStm (Let pat aux (If cond tbranch fbranch (IfDec ts IfEquiv))) = do tb...
1,010
transformStm :: Stm GPUMem -> ExpandM (Stms GPUMem) transformStm (Let pat aux (If cond tbranch fbranch (IfDec ts IfEquiv))) = do tbranch' <- (Right <$> transformBody tbranch) `catchError` (pure . Left) fbranch' <- (Right <$> transformBody fbranch) `catchError` (pure . Left) case (tbranch', fbranch') of (Left ...
823
transformStm (Let pat aux (If cond tbranch fbranch (IfDec ts IfEquiv))) = do tbranch' <- (Right <$> transformBody tbranch) `catchError` (pure . Left) fbranch' <- (Right <$> transformBody fbranch) `catchError` (pure . Left) case (tbranch', fbranch') of (Left _, Right fbranch'') -> pure $ useBranch fbranc...
771
true
true
5
13
235
370
178
192
null
null
ekmett/containers
Data/Set/Base.hs
bsd-3-clause
trim (JustS lx) (JustS hx) t = middle lx hx t where middle lo hi (Bin _ x _ r) | x <= lo = middle lo hi r middle lo hi (Bin _ x l _) | x >= hi = middle lo hi l middle _ _ t' = t' #if __GLASGOW_HASKELL__ >= 700
319
trim (JustS lx) (JustS hx) t = middle lx hx t where middle lo hi (Bin _ x _ r) | x <= lo = middle lo hi r middle lo hi (Bin _ x l _) | x >= hi = middle lo hi l middle _ _ t' = t' #if __GLASGOW_HASKELL__ >= 700
319
trim (JustS lx) (JustS hx) t = middle lx hx t where middle lo hi (Bin _ x _ r) | x <= lo = middle lo hi r middle lo hi (Bin _ x l _) | x >= hi = middle lo hi l middle _ _ t' = t' #if __GLASGOW_HASKELL__ >= 700
319
false
false
6
9
165
128
61
67
null
null
Charlesetc/haskell-parsing
src/Pear/Operator/Concrete.hs
bsd-3-clause
parseAlgebra :: (PAlgebra a) -> Parser a parseAlgebra alg = evalTree <$> (shuntingYard alg)
91
parseAlgebra :: (PAlgebra a) -> Parser a parseAlgebra alg = evalTree <$> (shuntingYard alg)
91
parseAlgebra alg = evalTree <$> (shuntingYard alg)
50
false
true
0
7
13
37
18
19
null
null
rueshyna/gogol
gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/Activities/Insert.hs
mpl-2.0
-- | Multipart request metadata. aiPayload :: Lens' ActivitiesInsert Activity aiPayload = lens _aiPayload (\ s a -> s{_aiPayload = a})
136
aiPayload :: Lens' ActivitiesInsert Activity aiPayload = lens _aiPayload (\ s a -> s{_aiPayload = a})
103
aiPayload = lens _aiPayload (\ s a -> s{_aiPayload = a})
58
true
true
0
9
22
47
23
24
null
null
geocurnoff/nikki
src/Physics/Chipmunk/Types.hs
lgpl-3.0
initChipmunk space as@BodyAttributes{} shapeTypes baryCenterOffset = do body <- mkBody as spaceAdd space body let chip = Chipmunk space body [] [] baryCenterOffset addInitShape chip shapeTypes
208
initChipmunk space as@BodyAttributes{} shapeTypes baryCenterOffset = do body <- mkBody as spaceAdd space body let chip = Chipmunk space body [] [] baryCenterOffset addInitShape chip shapeTypes
208
initChipmunk space as@BodyAttributes{} shapeTypes baryCenterOffset = do body <- mkBody as spaceAdd space body let chip = Chipmunk space body [] [] baryCenterOffset addInitShape chip shapeTypes
208
false
false
1
12
41
79
33
46
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
recklessly = id
15
recklessly = id
15
recklessly = id
15
false
false
0
4
2
6
3
3
null
null
rueshyna/gogol
gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/SetIAMPolicy.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pssipUploadProtocol :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Text) pssipUploadProtocol = lens _pssipUploadProtocol (\ s a -> s{_pssipUploadProtocol = a})
232
pssipUploadProtocol :: Lens' ProjectsSubscriptionsSetIAMPolicy (Maybe Text) pssipUploadProtocol = lens _pssipUploadProtocol (\ s a -> s{_pssipUploadProtocol = a})
170
pssipUploadProtocol = lens _pssipUploadProtocol (\ s a -> s{_pssipUploadProtocol = a})
94
true
true
0
9
33
48
25
23
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeTapeArchives.hs
mpl-2.0
-- | Creates a value of 'DescribeTapeArchivesResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dtarsTapeArchives' -- -- * 'dtarsMarker' -- -- * 'dtarsResponseStatus' describeTapeArchivesResponse :: Int -- ^ 'dtarsResponseS...
560
describeTapeArchivesResponse :: Int -- ^ 'dtarsResponseStatus' -> DescribeTapeArchivesResponse describeTapeArchivesResponse pResponseStatus_ = DescribeTapeArchivesResponse' { _dtarsTapeArchives = Nothing , _dtarsMarker = Nothing , _dtarsResponseStatus = pResponseStatus_ }
300
describeTapeArchivesResponse pResponseStatus_ = DescribeTapeArchivesResponse' { _dtarsTapeArchives = Nothing , _dtarsMarker = Nothing , _dtarsResponseStatus = pResponseStatus_ }
197
true
true
0
7
94
57
34
23
null
null
acowley/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
traversableClassKey = mkPreludeClassUnique 36
49
traversableClassKey = mkPreludeClassUnique 36
49
traversableClassKey = mkPreludeClassUnique 36
49
false
false
0
5
7
9
4
5
null
null
nevrenato/Hets_Fork
LF/Analysis.hs
gpl-2.0
gen :: String gen = "gen_"
26
gen :: String gen = "gen_"
26
gen = "gen_"
12
false
true
0
6
5
18
7
11
null
null
gsdlab/clafer
src/Language/Clafer/Generator/Html.hs
mit
printPosIdentRef (PosIdent (_, "ref")) _ html = printDeprecated "ref" "Use `dref` instead." html
98
printPosIdentRef (PosIdent (_, "ref")) _ html = printDeprecated "ref" "Use `dref` instead." html
98
printPosIdentRef (PosIdent (_, "ref")) _ html = printDeprecated "ref" "Use `dref` instead." html
98
false
false
0
8
14
32
16
16
null
null
sigrlami/pollock
app-reflex/app/Main.hs
mit
-------------------------------------------------------------------------- rmdups :: Ord a => [a] -> [a] rmdups = rmdups' Set.empty where rmdups' _ [] = [] rmdups' a (b : c) = if Set.member b a then rmdups' a c else b : rmdups' (Set.insert b a) c
258
rmdups :: Ord a => [a] -> [a] rmdups = rmdups' Set.empty where rmdups' _ [] = [] rmdups' a (b : c) = if Set.member b a then rmdups' a c else b : rmdups' (Set.insert b a) c
183
rmdups = rmdups' Set.empty where rmdups' _ [] = [] rmdups' a (b : c) = if Set.member b a then rmdups' a c else b : rmdups' (Set.insert b a) c
153
true
true
2
9
52
119
56
63
null
null
icyfork/shellcheck
ShellCheck/AST.hs
gpl-3.0
analyze :: Monad m => (Token -> m ()) -> (Token -> m ()) -> (Token -> Token) -> Token -> m Token analyze f g i = round where round t = do f t newT <- delve t g t return . i $ newT roundAll = mapM round roundMaybe Nothing = return Nothing roundMaybe (Just v) = do ...
4,873
analyze :: Monad m => (Token -> m ()) -> (Token -> m ()) -> (Token -> Token) -> Token -> m Token analyze f g i = round where round t = do f t newT <- delve t g t return . i $ newT roundAll = mapM round roundMaybe Nothing = return Nothing roundMaybe (Just v) = do ...
4,873
analyze f g i = round where round t = do f t newT <- delve t g t return . i $ newT roundAll = mapM round roundMaybe Nothing = return Nothing roundMaybe (Just v) = do s <- round v return (Just s) dl l v = do x <- roundAll l retur...
4,776
false
true
61
57
1,642
2,144
1,012
1,132
null
null
sgillespie/ghc
compiler/types/CoAxiom.hs
bsd-3-clause
coAxiomName :: CoAxiom br -> Name coAxiomName = co_ax_name
58
coAxiomName :: CoAxiom br -> Name coAxiomName = co_ax_name
58
coAxiomName = co_ax_name
24
false
true
0
6
8
18
9
9
null
null
shicks/shsh
System/Console/ShSh/Builtins/Diff.hs
bsd-3-clause
prune_matches (_:cs) ([]:ms) = prune_matches cs ms
50
prune_matches (_:cs) ([]:ms) = prune_matches cs ms
50
prune_matches (_:cs) ([]:ms) = prune_matches cs ms
50
false
false
0
8
6
32
16
16
null
null
rueshyna/gogol
gogol-drive/gen/Network/Google/Drive/Types/Product.hs
mpl-2.0
-- | The white balance mode used to create the photo. fimmWhiteBalance :: Lens' FileImageMediaMetadata (Maybe Text) fimmWhiteBalance = lens _fimmWhiteBalance (\ s a -> s{_fimmWhiteBalance = a})
201
fimmWhiteBalance :: Lens' FileImageMediaMetadata (Maybe Text) fimmWhiteBalance = lens _fimmWhiteBalance (\ s a -> s{_fimmWhiteBalance = a})
147
fimmWhiteBalance = lens _fimmWhiteBalance (\ s a -> s{_fimmWhiteBalance = a})
85
true
true
0
8
35
49
25
24
null
null
nevrenato/Hets_Fork
Isabelle/MarkSimp.hs
gpl-2.0
includePrefixes :: [String] includePrefixes = [ "ga_comm_" , "ga_assoc_" , "ga_left_comm_"]
103
includePrefixes :: [String] includePrefixes = [ "ga_comm_" , "ga_assoc_" , "ga_left_comm_"]
103
includePrefixes = [ "ga_comm_" , "ga_assoc_" , "ga_left_comm_"]
75
false
true
0
7
22
30
15
15
null
null
scolobb/fgl
test/Data/Graph/Inductive/Graph/Properties.hs
bsd-3-clause
-- | Check that having an edge in a graph is equivalent to -- 'hasNeighbor' reporting that the edge is there. test_hasNeighbor :: (Graph gr, Eq b) => gr a b -> Node -> Node -> Bool test_hasNeighbor gr v w = ( any (`elem` [ (v,w), (w,v) ]) $ edges gr ) == (hasNeighbor gr v w && hasNeighbor gr w v)
299
test_hasNeighbor :: (Graph gr, Eq b) => gr a b -> Node -> Node -> Bool test_hasNeighbor gr v w = ( any (`elem` [ (v,w), (w,v) ]) $ edges gr ) == (hasNeighbor gr v w && hasNeighbor gr w v)
189
test_hasNeighbor gr v w = ( any (`elem` [ (v,w), (w,v) ]) $ edges gr ) == (hasNeighbor gr v w && hasNeighbor gr w v)
118
true
true
0
11
64
114
62
52
null
null
ndmitchell/extra
src/Control/Monad/Extra.hs
bsd-3-clause
-- | A version of 'all' lifted to a monad. Retains the short-circuiting behaviour. -- -- > allM Just [True,False,undefined] == Just False -- > allM Just [True,True ,undefined] == undefined -- > \(f :: Int -> Maybe Bool) xs -> anyM f xs == orM (map f xs) allM :: Monad m => (a -> m Bool) -> [a] -> m Bool allM p = foldr (...
342
allM :: Monad m => (a -> m Bool) -> [a] -> m Bool allM p = foldr ((&&^) . p) (pure True)
88
allM p = foldr ((&&^) . p) (pure True)
38
true
true
0
9
71
70
38
32
null
null
michalt/ghc-comparisons-plugin
GhcPlugins/Comparisons/Pass.hs
bsd-3-clause
evalVarLit :: NumEnv -> Var -> RelOp -> Literal -> Maybe Bool evalVarLit env var relop lit | Just i <- litToInteger lit = do intr <- lookupIntr env var cmpIntrWith relop intr (BetweenEq i i) | Just r <- litToRational lit = do intr <- lookupIntr env var cmpIntrWith relop intr (BetweenEq r r) | ot...
337
evalVarLit :: NumEnv -> Var -> RelOp -> Literal -> Maybe Bool evalVarLit env var relop lit | Just i <- litToInteger lit = do intr <- lookupIntr env var cmpIntrWith relop intr (BetweenEq i i) | Just r <- litToRational lit = do intr <- lookupIntr env var cmpIntrWith relop intr (BetweenEq r r) | ot...
337
evalVarLit env var relop lit | Just i <- litToInteger lit = do intr <- lookupIntr env var cmpIntrWith relop intr (BetweenEq i i) | Just r <- litToRational lit = do intr <- lookupIntr env var cmpIntrWith relop intr (BetweenEq r r) | otherwise = Nothing
275
false
true
0
11
82
154
66
88
null
null
olorin/amazonka
gen/src/Gen/AST/Data/Syntax.hs
mpl-2.0
fromJSOND :: Protocol -> Id -> [Field] -> Decl fromJSOND p n fs = instD1 "FromJSON" n with where with = funD "parseJSON" $ app (app (var "withObject") (str (typeId n))) (lamE noLoc [pvar "x"] es) es = ctorE n $ map (parseJSONE p pJ pJMay pJDef) fs
278
fromJSOND :: Protocol -> Id -> [Field] -> Decl fromJSOND p n fs = instD1 "FromJSON" n with where with = funD "parseJSON" $ app (app (var "withObject") (str (typeId n))) (lamE noLoc [pvar "x"] es) es = ctorE n $ map (parseJSONE p pJ pJMay pJDef) fs
278
fromJSOND p n fs = instD1 "FromJSON" n with where with = funD "parseJSON" $ app (app (var "withObject") (str (typeId n))) (lamE noLoc [pvar "x"] es) es = ctorE n $ map (parseJSONE p pJ pJMay pJDef) fs
231
false
true
2
12
78
141
65
76
null
null
ghcjs/ghcjs
lib/ghc/includes/GHCConstantsHaskellWrappers.hs
mit
oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int oFFSET_StgRegTable_rCurrentNursery dflags = pc_OFFSET_StgRegTable_rCurrentNursery (sPlatformConstants (settings dflags))
174
oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int oFFSET_StgRegTable_rCurrentNursery dflags = pc_OFFSET_StgRegTable_rCurrentNursery (sPlatformConstants (settings dflags))
174
oFFSET_StgRegTable_rCurrentNursery dflags = pc_OFFSET_StgRegTable_rCurrentNursery (sPlatformConstants (settings dflags))
120
false
true
0
9
11
33
16
17
null
null
snoyberg/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprFFormat _ = panic "PPC.Ppr.pprFFormat: no match"
58
pprFFormat _ = panic "PPC.Ppr.pprFFormat: no match"
58
pprFFormat _ = panic "PPC.Ppr.pprFFormat: no match"
58
false
false
0
5
13
13
5
8
null
null
seckcoder/lang-learn
haskell/lambda-calculus/src/MT/Cont.hs
unlicense
cont :: ((a -> r) -> r) -> Cont r a cont f = ContT $ \k -> Identity (f (runIdentity . k ))
94
cont :: ((a -> r) -> r) -> Cont r a cont f = ContT $ \k -> Identity (f (runIdentity . k ))
90
cont f = ContT $ \k -> Identity (f (runIdentity . k ))
54
false
true
0
11
27
63
32
31
null
null
reiddraper/cauterize
src/Cauterize/Dynamic/Pretty.hs
bsd-3-clause
prettyBuiltIn (BDbool v) = bool v
33
prettyBuiltIn (BDbool v) = bool v
33
prettyBuiltIn (BDbool v) = bool v
33
false
false
0
7
5
18
8
10
null
null
rueshyna/sdl2-examples
src/Lesson11.hs
mit
lesson11 :: IO () lesson11 = do -- initialize SDL SDL.initialize [SDL.InitVideo] -- create window window <- SDL.createWindow "Lesson11" Config.winConfig renderer <- SDL.createRenderer window (-1) Config.rdrConfig SDL.HintRenderScaleQuality SDL.$= SDL.ScaleLinear SDL.rendererDrawColor renderer SDL....
1,618
lesson11 :: IO () lesson11 = do -- initialize SDL SDL.initialize [SDL.InitVideo] -- create window window <- SDL.createWindow "Lesson11" Config.winConfig renderer <- SDL.createRenderer window (-1) Config.rdrConfig SDL.HintRenderScaleQuality SDL.$= SDL.ScaleLinear SDL.rendererDrawColor renderer SDL....
1,618
lesson11 = do -- initialize SDL SDL.initialize [SDL.InitVideo] -- create window window <- SDL.createWindow "Lesson11" Config.winConfig renderer <- SDL.createRenderer window (-1) Config.rdrConfig SDL.HintRenderScaleQuality SDL.$= SDL.ScaleLinear SDL.rendererDrawColor renderer SDL.$= V4 maxBou...
1,600
false
true
0
18
449
423
200
223
null
null
5outh/BeFun
src/FunctionProcesses.hs
mit
dup, swap, strMode :: BefungeState -> Either String BefungeState dup (BefungeState is (x:xs) loc dir m r) = Right $ BefungeState is (x:x:xs) loc dir m r
152
dup, swap, strMode :: BefungeState -> Either String BefungeState dup (BefungeState is (x:xs) loc dir m r) = Right $ BefungeState is (x:x:xs) loc dir m r
152
dup (BefungeState is (x:xs) loc dir m r) = Right $ BefungeState is (x:x:xs) loc dir m r
87
false
true
0
9
26
78
41
37
null
null
jonathanknowles/haskell-calculator
source/library/Reflex/Dom/Extras.hs
bsd-3-clause
tr = el "tr"
16
tr = el "tr"
16
tr = el "tr"
16
false
false
0
5
7
9
4
5
null
null