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
ekr/tamarin-prover
lib/utils/src/Text/Dot.hs
gpl-3.0
-- | 'attribute' gives a attribute to the current scope. attribute :: (String,String) -> Dot () attribute (name,val) = Dot (\ uq -> ( [ GraphAttribute name val ],uq,()))
170
attribute :: (String,String) -> Dot () attribute (name,val) = Dot (\ uq -> ( [ GraphAttribute name val ],uq,()))
113
attribute (name,val) = Dot (\ uq -> ( [ GraphAttribute name val ],uq,()))
74
true
true
0
10
29
66
37
29
null
null
fjarri/wigner
test/TestTransformations.hs
bsd-3-clause
test_nonlinear = fpe @?= nonlinear_low_order + nonlinear_high_order where hamiltonian = dagger psi_j * dagger psi_k' * psi_j' * psi_k fpe = transform $ commutator hamiltonian rho
186
test_nonlinear = fpe @?= nonlinear_low_order + nonlinear_high_order where hamiltonian = dagger psi_j * dagger psi_k' * psi_j' * psi_k fpe = transform $ commutator hamiltonian rho
186
test_nonlinear = fpe @?= nonlinear_low_order + nonlinear_high_order where hamiltonian = dagger psi_j * dagger psi_k' * psi_j' * psi_k fpe = transform $ commutator hamiltonian rho
186
false
false
0
10
33
53
26
27
null
null
jparyani/capnproto-boostpython
compiler/src/Semantics.hs
bsd-2-clause
descAnnotations (DescInterface d) = interfaceAnnotations d
58
descAnnotations (DescInterface d) = interfaceAnnotations d
58
descAnnotations (DescInterface d) = interfaceAnnotations d
58
false
false
0
6
5
19
8
11
null
null
phadej/boolean-normal-forms
tests/FreeBoolean.hs
mit
freeBooleanHeight :: FreeBoolean a -> Int freeBooleanHeight FBTrue = 0
70
freeBooleanHeight :: FreeBoolean a -> Int freeBooleanHeight FBTrue = 0
70
freeBooleanHeight FBTrue = 0
28
false
true
0
6
9
25
11
14
null
null
kajigor/uKanren_transformations
src/Unfold.hs
bsd-3-clause
-- let result = length unfolded < maxBranches in -- trace (printf "\nGoal: %s\nNot maximum branches: %s\nUnfoldComplexity: %s\nUnfolded: %s\nMaxBranches: %s\n" (show goal) (show result) (show $ length $ filter (not . null . fst) unfolded) (show $ length unfolded) (show maxBranches)) $ -- result notMaximumBranch...
336
notMaximumBranches _ _ _ = False
32
notMaximumBranches _ _ _ = False
32
true
false
0
5
57
16
9
7
null
null
HIPERFIT/futhark
src/Language/Futhark/TypeChecker/Match.hs
isc
pprMatch :: Int -> Match -> Doc pprMatch _ MatchWild {} = "_"
61
pprMatch :: Int -> Match -> Doc pprMatch _ MatchWild {} = "_"
61
pprMatch _ MatchWild {} = "_"
29
false
true
2
5
12
29
15
14
null
null
sethfowler/pygmalion
src/Pygmalion/RPC/Server.hs
bsd-3-clause
doGetCommandInfo :: SourceFile -> RPCServer (Maybe ByteString) doGetCommandInfo !sf = do logDebug $ "Looking up command info for " ++ show sf ctx <- ask mayCI <- lift $ atomically $ getCommandInfoMetadata (rsIndexStream ctx) sf case mayCI of Just ci -> do logDebug $ "Lookup successful: " ++ show ci ...
495
doGetCommandInfo :: SourceFile -> RPCServer (Maybe ByteString) doGetCommandInfo !sf = do logDebug $ "Looking up command info for " ++ show sf ctx <- ask mayCI <- lift $ atomically $ getCommandInfoMetadata (rsIndexStream ctx) sf case mayCI of Just ci -> do logDebug $ "Lookup successful: " ++ show ci ...
495
doGetCommandInfo !sf = do logDebug $ "Looking up command info for " ++ show sf ctx <- ask mayCI <- lift $ atomically $ getCommandInfoMetadata (rsIndexStream ctx) sf case mayCI of Just ci -> do logDebug $ "Lookup successful: " ++ show ci return . Just $! encode (RPCOK $ Just ci) Nothing...
432
false
true
0
17
126
170
77
93
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x1E7D' = "\x0076\x0303"
39
decomposeChar '\x1E7D' = "\x0076\x0303"
39
decomposeChar '\x1E7D' = "\x0076\x0303"
39
false
false
0
5
3
9
4
5
null
null
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/VertexArrays.hs
gpl-2.0
-------------------------------------------------------------------------------- -- We almost could use makeStateVarMaybe below, but, alas, this is client state. primitiveRestartIndexNV :: StateVar (Maybe ArrayIndex) primitiveRestartIndexNV = makeStateVar getPrimitiveRestartIndexNV setPrimitiveRestartIndexNV
314
primitiveRestartIndexNV :: StateVar (Maybe ArrayIndex) primitiveRestartIndexNV = makeStateVar getPrimitiveRestartIndexNV setPrimitiveRestartIndexNV
150
primitiveRestartIndexNV = makeStateVar getPrimitiveRestartIndexNV setPrimitiveRestartIndexNV
95
true
true
0
7
28
27
14
13
null
null
TomMD/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
ltDataConId, eqDataConId, gtDataConId :: Id ltDataConId = dataConWorkId ltDataCon
81
ltDataConId, eqDataConId, gtDataConId :: Id ltDataConId = dataConWorkId ltDataCon
81
ltDataConId = dataConWorkId ltDataCon
37
false
true
0
5
8
18
11
7
null
null
pasaunders/code-katas
fusc.hs
mit
fusc 1 = 1
10
fusc 1 = 1
10
fusc 1 = 1
10
false
false
1
5
3
13
4
9
null
null
mydaum/cabal
Cabal/Distribution/Simple/LHC.hs
bsd-3-clause
hcPkgInfo :: ProgramDb -> HcPkg.HcPkgInfo hcPkgInfo progdb = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = lhcPkgProg , HcPkg.noPkgDbStack = False , HcPkg.noVerboseFlag = False , HcPkg.flagPackageConf = False ...
773
hcPkgInfo :: ProgramDb -> HcPkg.HcPkgInfo hcPkgInfo progdb = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = lhcPkgProg , HcPkg.noPkgDbStack = False , HcPkg.noVerboseFlag = False , HcPkg.flagPackageConf = False ...
773
hcPkgInfo progdb = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = lhcPkgProg , HcPkg.noPkgDbStack = False , HcPkg.noVerboseFlag = False , HcPkg.flagPackageConf = False , HcPkg.supp...
731
false
true
0
6
390
115
66
49
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/Util/List.hs
mit
snocNEL :: NonEmpty a -> a -> NonEmpty a snocNEL = (|>)
55
snocNEL :: NonEmpty a -> a -> NonEmpty a snocNEL = (|>)
55
snocNEL = (|>)
14
false
true
0
7
11
27
14
13
null
null
ahushh/Monaba
monaba/src/Import.hs
mit
getAllHiddenThreads :: Handler [(Text, [(Int,Int)])] getAllHiddenThreads = do ht <- lookupSession "hidden-threads" case ht of Just xs -> return $ read $ unpack xs Nothing -> setSession "hidden-threads" "[]" >> return []
229
getAllHiddenThreads :: Handler [(Text, [(Int,Int)])] getAllHiddenThreads = do ht <- lookupSession "hidden-threads" case ht of Just xs -> return $ read $ unpack xs Nothing -> setSession "hidden-threads" "[]" >> return []
229
getAllHiddenThreads = do ht <- lookupSession "hidden-threads" case ht of Just xs -> return $ read $ unpack xs Nothing -> setSession "hidden-threads" "[]" >> return []
176
false
true
0
12
41
89
44
45
null
null
trbauer/stquery
Stats/Version.hs
mit
-- The version table -- * 0.1.0.1 added version -- * 0.1.0.2 added -l option -- pre cabal above -- (vERSION,vERSION_DATE) = ("1.0.0.0","02/14/2015")
157
(vERSION,vERSION_DATE) = ("1.0.0.0","02/14/2015")
49
(vERSION,vERSION_DATE) = ("1.0.0.0","02/14/2015")
49
true
false
0
5
31
24
16
8
null
null
randen/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
checkLibrary :: PackageDescription -> Library -> [PackageCheck] checkLibrary pkg lib = catMaybes [ check (not (null moduleDuplicates)) $ PackageBuildImpossible $ "Duplicate modules in library: " ++ commaSep (map display moduleDuplicates) -- check use of required-signatures/expose...
1,149
checkLibrary :: PackageDescription -> Library -> [PackageCheck] checkLibrary pkg lib = catMaybes [ check (not (null moduleDuplicates)) $ PackageBuildImpossible $ "Duplicate modules in library: " ++ commaSep (map display moduleDuplicates) -- check use of required-signatures/expose...
1,149
checkLibrary pkg lib = catMaybes [ check (not (null moduleDuplicates)) $ PackageBuildImpossible $ "Duplicate modules in library: " ++ commaSep (map display moduleDuplicates) -- check use of required-signatures/exposed-signatures sections , checkVersion [1,21] (not (null (requir...
1,085
false
true
1
15
318
267
131
136
null
null
edsko/cabal
Cabal/src/Distribution/Simple/GHC.hs
bsd-3-clause
-- | Filter the "-threaded" flag when profiling as it does not -- work with ghc-6.8 and older. hackThreadedFlag :: Verbosity -> Compiler -> Bool -> BuildInfo -> IO BuildInfo hackThreadedFlag verbosity comp prof bi | not mustFilterThreaded = return bi | otherwise = do warn verbosity $ "The ghc fla...
906
hackThreadedFlag :: Verbosity -> Compiler -> Bool -> BuildInfo -> IO BuildInfo hackThreadedFlag verbosity comp prof bi | not mustFilterThreaded = return bi | otherwise = do warn verbosity $ "The ghc flag '-threaded' is not compatible with " ++ "profiling in ghc-6.8 and older. It w...
809
hackThreadedFlag verbosity comp prof bi | not mustFilterThreaded = return bi | otherwise = do warn verbosity $ "The ghc flag '-threaded' is not compatible with " ++ "profiling in ghc-6.8 and older. It will be disabled." return bi { options = filterHcOptions (/= "-threaded") (o...
730
true
true
1
12
237
204
105
99
null
null
mishun/tangles
src/Math/Topology/KnotTh/Algebra/Homology.hs
lgpl-3.0
gradedCohomology :: (Integral a, Ord g) => V.Vector (V.Vector g) -> V.Vector (Matrix.Matrix a) -> V.Vector [((g, a), Int)] gradedCohomology grad chain | V.length grad /= 1 + V.length chain = error "size conflict" | otherwise = let cohomology im ker = ...
746
gradedCohomology :: (Integral a, Ord g) => V.Vector (V.Vector g) -> V.Vector (Matrix.Matrix a) -> V.Vector [((g, a), Int)] gradedCohomology grad chain | V.length grad /= 1 + V.length chain = error "size conflict" | otherwise = let cohomology im ker = ...
746
gradedCohomology grad chain | V.length grad /= 1 + V.length chain = error "size conflict" | otherwise = let cohomology im ker = let image = concatMap (\ (deg, tor) -> ((deg, 1), -1) : [((deg, tor), 1) | tor /= 1]) $ V.toList im kern...
623
false
true
0
21
233
356
184
172
null
null
yiannist/ganeti
src/Ganeti/HTools/Cluster.hs
bsd-2-clause
-- | Compute the delta between two cluster state. -- -- This is used when doing allocations, to understand better the -- available cluster resources. The return value is a triple of the -- current used values, the delta that was still allocated, and what -- was left unallocated. computeAllocationDelta :: CStats -> CSta...
1,837
computeAllocationDelta :: CStats -> CStats -> AllocStats computeAllocationDelta cini cfin = let CStats {csImem = i_imem, csIdsk = i_idsk, csIcpu = i_icpu, csNcpu = i_ncpu, csIspn = i_ispn } = cini CStats {csImem = f_imem, csIdsk = f_idsk, csIcpu = f_icpu, csTmem = t_mem, csTdsk = t_d...
1,557
computeAllocationDelta cini cfin = let CStats {csImem = i_imem, csIdsk = i_idsk, csIcpu = i_icpu, csNcpu = i_ncpu, csIspn = i_ispn } = cini CStats {csImem = f_imem, csIdsk = f_idsk, csIcpu = f_icpu, csTmem = t_mem, csTdsk = t_dsk, csVcpu = f_vcpu, csNcpu = f_ncpu, csTcp...
1,500
true
true
0
13
668
364
211
153
null
null
snoyberg/ghc
compiler/stgSyn/StgLint.hs
bsd-3-clause
addInScopeVars :: [Id] -> LintM a -> LintM a addInScopeVars ids m = LintM $ \loc scope errs -> let new_set = mkVarSet ids in unLintM m loc (scope `unionVarSet` new_set) errs
186
addInScopeVars :: [Id] -> LintM a -> LintM a addInScopeVars ids m = LintM $ \loc scope errs -> let new_set = mkVarSet ids in unLintM m loc (scope `unionVarSet` new_set) errs
186
addInScopeVars ids m = LintM $ \loc scope errs -> let new_set = mkVarSet ids in unLintM m loc (scope `unionVarSet` new_set) errs
141
false
true
0
11
44
85
40
45
null
null
QuickChick/Luck
luck/src/Core/Semantics.hs
mit
--rename vars idx (Fresh _ _ _) = error "Should not happen" rename vars idx (Inst e (x,m)) = Inst (rename vars idx e) (x, m + idx)
130
rename vars idx (Inst e (x,m)) = Inst (rename vars idx e) (x, m + idx)
70
rename vars idx (Inst e (x,m)) = Inst (rename vars idx e) (x, m + idx)
70
true
false
0
8
27
53
28
25
null
null
beala/twitter-bot
src/main/Main.hs
bsd-3-clause
main :: IO () main = do (conf, _) <- autoReload autoConfig [Required "$(HOME)/twitter.cfg"] myOAuth <- loadOAuth conf myCreds <- loadCreds conf runTwitterT myOAuth myCreds "" $ do tweet "Hello from Haskell." liftIO $ putStrLn "Done" --manager <- newManager tlsManagerSettings --creds <- credsInteract...
355
main :: IO () main = do (conf, _) <- autoReload autoConfig [Required "$(HOME)/twitter.cfg"] myOAuth <- loadOAuth conf myCreds <- loadCreds conf runTwitterT myOAuth myCreds "" $ do tweet "Hello from Haskell." liftIO $ putStrLn "Done" --manager <- newManager tlsManagerSettings --creds <- credsInteract...
355
main = do (conf, _) <- autoReload autoConfig [Required "$(HOME)/twitter.cfg"] myOAuth <- loadOAuth conf myCreds <- loadCreds conf runTwitterT myOAuth myCreds "" $ do tweet "Hello from Haskell." liftIO $ putStrLn "Done" --manager <- newManager tlsManagerSettings --creds <- credsInteraction myOAuth ma...
341
false
true
0
11
68
93
43
50
null
null
vincenthz/hs-cryptohash
Crypto/Hash/MD2.hs
bsd-3-clause
-- | updates a context with multiples bytestring updates :: Ctx -> [ByteString] -> Ctx updates (Ctx ctx) d = Ctx $ H.hashUpdates ctx d
138
updates :: Ctx -> [ByteString] -> Ctx updates (Ctx ctx) d = Ctx $ H.hashUpdates ctx d
89
updates (Ctx ctx) d = Ctx $ H.hashUpdates ctx d
51
true
true
2
10
28
51
24
27
null
null
Bodigrim/arithmoi
Math/NumberTheory/Powers/Modular.hs
mit
-- | @powMod@ @b@ @e@ @m@ computes (@b^e@) \`mod\` @m@ in effective way. -- An exponent @e@ must be non-negative, a modulo @m@ must be positive. -- Otherwise the behaviour of @powMod@ is undefined. -- -- >>> powMod 2 3 5 -- 3 -- >>> powMod 3 12345678901234567890 1001 -- 1 -- -- See also 'Math.NumberTheory.Moduli.Class....
1,230
powMod :: (Integral a, Integral b) => a -> b -> a -> a powMod x y m | m <= 0 = error "powModInt: non-positive modulo" | y < 0 = error "powModInt: negative exponent" | otherwise = f (x `rem` m) y 1 `mod` m where f _ 0 acc = acc f b e acc = f (b * b `rem` m) (e `quot` 2) (if odd e then b * ac...
341
powMod x y m | m <= 0 = error "powModInt: non-positive modulo" | y < 0 = error "powModInt: negative exponent" | otherwise = f (x `rem` m) y 1 `mod` m where f _ 0 acc = acc f b e acc = f (b * b `rem` m) (e `quot` 2) (if odd e then b * acc `rem` m else acc)
286
true
true
2
10
256
227
122
105
null
null
brendanhay/gogol
gogol-vision/gen/Network/Google/Vision/Types/Product.hs
mpl-2.0
-- | Object name, expressed in its \`language_code\` language. loaName :: Lens' LocalizedObjectAnnotation (Maybe Text) loaName = lens _loaName (\ s a -> s{_loaName = a})
169
loaName :: Lens' LocalizedObjectAnnotation (Maybe Text) loaName = lens _loaName (\ s a -> s{_loaName = a})
106
loaName = lens _loaName (\ s a -> s{_loaName = a})
50
true
true
1
9
25
51
25
26
null
null
acharal/wam
src/WAM/Compile.hs
gpl-2.0
wamCompileAlters (l:ls) i = do c <- wamCompileClause l case ls of [] -> do return $ (TrustMe,[]):c _ -> do let j = i + length c + 1 let c' = (RetryMeElse j,[]):c alters <- wamCompileAlters ls j return $ c' ++ alters -- ...
388
wamCompileAlters (l:ls) i = do c <- wamCompileClause l case ls of [] -> do return $ (TrustMe,[]):c _ -> do let j = i + length c + 1 let c' = (RetryMeElse j,[]):c alters <- wamCompileAlters ls j return $ c' ++ alters -- ...
388
wamCompileAlters (l:ls) i = do c <- wamCompileClause l case ls of [] -> do return $ (TrustMe,[]):c _ -> do let j = i + length c + 1 let c' = (RetryMeElse j,[]):c alters <- wamCompileAlters ls j return $ c' ++ alters -- ...
388
false
false
1
17
157
141
65
76
null
null
vikraman/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
toc = regSingle 2
21
toc = regSingle 2
21
toc = regSingle 2
21
false
false
1
5
7
13
4
9
null
null
isomorphism/csound-expression
src/Csound/Tab.hs
bsd-3-clause
fromMp3Chn :: Mp3Chn -> Int fromMp3Chn x = case x of Mp3Mono -> 1 Mp3Stereo -> 2 Mp3Left -> 3 Mp3Right -> 4 Mp3All -> 0
157
fromMp3Chn :: Mp3Chn -> Int fromMp3Chn x = case x of Mp3Mono -> 1 Mp3Stereo -> 2 Mp3Left -> 3 Mp3Right -> 4 Mp3All -> 0
157
fromMp3Chn x = case x of Mp3Mono -> 1 Mp3Stereo -> 2 Mp3Left -> 3 Mp3Right -> 4 Mp3All -> 0
129
false
true
0
8
63
58
27
31
null
null
spacekitteh/smcghc
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
newLabelC :: FCode BlockId newLabelC = do { u <- newUnique ; return $ mkBlockId u }
98
newLabelC :: FCode BlockId newLabelC = do { u <- newUnique ; return $ mkBlockId u }
98
newLabelC = do { u <- newUnique ; return $ mkBlockId u }
71
false
true
0
8
31
34
17
17
null
null
fpco/stackage-server
src/Stackage/Database/Query.hs
mit
insertSnapshotName :: GetStackageDatabase env m => SnapshotId -> SnapName -> m () insertSnapshotName snapKey snapName = run $ case snapName of SNLts major minor -> void $ insertUnique $ Lts snapKey major minor SNNightly day -> void $ insertUnique $ Nightly snapKey day -- | Add a map of all ...
449
insertSnapshotName :: GetStackageDatabase env m => SnapshotId -> SnapName -> m () insertSnapshotName snapKey snapName = run $ case snapName of SNLts major minor -> void $ insertUnique $ Lts snapKey major minor SNNightly day -> void $ insertUnique $ Nightly snapKey day -- | Add a map of all ...
449
insertSnapshotName snapKey snapName = run $ case snapName of SNLts major minor -> void $ insertUnique $ Lts snapKey major minor SNNightly day -> void $ insertUnique $ Nightly snapKey day -- | Add a map of all dependencies for the package together with version bounds. Returns a set of -- all...
367
false
true
9
9
100
75
38
37
null
null
lukemaurer/sequent-core
src/Language/SequentCore/Syntax.hs
bsd-3-clause
-- | Put a command into a "flat" representation, as a list of bindings followed -- by either ('Left') a term, some frames, and an end comprising a computation -- to evaluate; or ('Right') some arguments and a join id to jump to. flattenCommand :: Command b -> ([Bind b], Either (Term b, [Frame b], End b) ([Arg b], JoinI...
860
flattenCommand :: Command b -> ([Bind b], Either (Term b, [Frame b], End b) ([Arg b], JoinId)) flattenCommand = go [] where go binds (Let bind comm) = go (bind:binds) comm go binds (Eval term frames end) = (reverse binds, Left (term, frames, end)) go binds (Jump args j) = (reverse binds, R...
631
flattenCommand = go [] where go binds (Let bind comm) = go (bind:binds) comm go binds (Eval term frames end) = (reverse binds, Left (term, frames, end)) go binds (Jump args j) = (reverse binds, Right (args, j)) -- TODO Since this function has to look at the end of a list that could be lon...
536
true
true
2
10
188
190
103
87
null
null
mauriciofierrom/cis194-homework
homework11/src/AParser.hs
mit
inParser :: ((String -> Maybe (a, String)) -> String -> Maybe (b, String)) -> Parser a -> Parser b inParser f = Parser . f . runParser
140
inParser :: ((String -> Maybe (a, String)) -> String -> Maybe (b, String)) -> Parser a -> Parser b inParser f = Parser . f . runParser
140
inParser f = Parser . f . runParser
35
false
true
2
12
32
79
38
41
null
null
clux/tournament.hs
Test.hs
mit
upd :: [T.Score] -> GameId -> State Tournament () upd sc id = do t <- get put $ T.score id sc t return ()
111
upd :: [T.Score] -> GameId -> State Tournament () upd sc id = do t <- get put $ T.score id sc t return ()
111
upd sc id = do t <- get put $ T.score id sc t return ()
61
false
true
0
10
30
72
32
40
null
null
phadej/Earley
bench/BenchAll.hs
bsd-3-clause
parsecBench :: (String, [Token]) -> Benchmark parsecBench (name, input) = bench name $ nf parseParsec input
107
parsecBench :: (String, [Token]) -> Benchmark parsecBench (name, input) = bench name $ nf parseParsec input
107
parsecBench (name, input) = bench name $ nf parseParsec input
61
false
true
0
7
15
49
25
24
null
null
ckaestne/CIDE
CIDE_Language_Haskell/test/WSP/Webserver/ConfigParser.hs
gpl-3.0
p_logFormat = do { p_lit_or_string; p_lit_or_string; return id}
89
p_logFormat = do { p_lit_or_string; p_lit_or_string; return id}
89
p_logFormat = do { p_lit_or_string; p_lit_or_string; return id}
89
false
false
1
8
33
26
11
15
null
null
maruks/haskell-book
src/Chapter5_types.hs
gpl-3.0
-- :t g 0 'c' "foo" h :: (Num a, Num b) => a -> b -> b ; h = undefined
71
h :: (Num a, Num b) => a -> b -> b h = undefined
48
h = undefined
13
true
true
0
7
22
40
21
19
null
null
egonSchiele/rdioh
src/rdioh.hs
mit
-- | Requires authentication OR use @getPlaylists'@ and pass in a user key. getPlaylists :: Rdio (Either String UserPlaylists) getPlaylists = getPlaylists' Nothing [] Nothing
174
getPlaylists :: Rdio (Either String UserPlaylists) getPlaylists = getPlaylists' Nothing [] Nothing
98
getPlaylists = getPlaylists' Nothing [] Nothing
47
true
true
0
7
24
32
16
16
null
null
urbanslug/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
isLFReEntrant :: LambdaFormInfo -> Bool isLFReEntrant (LFReEntrant {}) = True
77
isLFReEntrant :: LambdaFormInfo -> Bool isLFReEntrant (LFReEntrant {}) = True
77
isLFReEntrant (LFReEntrant {}) = True
37
false
true
0
6
9
30
14
16
null
null
johntyree/Hascheme
Main.hs
bsd-3-clause
parseBinaryNumber :: Parser LispVal parseBinaryNumber = parseRadixNumber "01" readBin where readBin = readInt 2 (`elem` "01") (read . return)
147
parseBinaryNumber :: Parser LispVal parseBinaryNumber = parseRadixNumber "01" readBin where readBin = readInt 2 (`elem` "01") (read . return)
147
parseBinaryNumber = parseRadixNumber "01" readBin where readBin = readInt 2 (`elem` "01") (read . return)
111
false
true
0
7
24
47
25
22
null
null
peterbecich/haskell-programming-first-principles
src/Chapter22.hs
bsd-3-clause
-- without reader getDog :: Person -> Dog getDog p = Dog (dogName p) (address p)
80
getDog :: Person -> Dog getDog p = Dog (dogName p) (address p)
62
getDog p = Dog (dogName p) (address p)
38
true
true
0
7
15
36
18
18
null
null
emhoracek/explora
test-suite/InputSpec.hs
gpl-2.0
spec = do describe "isADirection" $ it "says whether the input is a direction" $ isADirection "south" sampleDefinitions `shouldBe` True describe "toDirection" $ it "changes the string to input" $ toDirection "south" sampleDefinitions `shouldBe` Right ("go...
1,683
spec = do describe "isADirection" $ it "says whether the input is a direction" $ isADirection "south" sampleDefinitions `shouldBe` True describe "toDirection" $ it "changes the string to input" $ toDirection "south" sampleDefinitions `shouldBe` Right ("go...
1,683
spec = do describe "isADirection" $ it "says whether the input is a direction" $ isADirection "south" sampleDefinitions `shouldBe` True describe "toDirection" $ it "changes the string to input" $ toDirection "south" sampleDefinitions `shouldBe` Right ("go...
1,683
false
false
0
15
627
317
150
167
null
null
fffej/haskellprojects
traffic/TrafficVis.hs
bsd-2-clause
drawRoutes :: Route -> IO () drawRoutes route = mapM_ (\((l1,l2),speed) -> drawRoute l1 l2 speed) (M.toList route)
114
drawRoutes :: Route -> IO () drawRoutes route = mapM_ (\((l1,l2),speed) -> drawRoute l1 l2 speed) (M.toList route)
114
drawRoutes route = mapM_ (\((l1,l2),speed) -> drawRoute l1 l2 speed) (M.toList route)
85
false
true
0
9
17
68
34
34
null
null
gibiansky/IHaskell
src/IHaskell/Eval/Hoogle.hs
mit
render HTML = renderHtml
25
render HTML = renderHtml
25
render HTML = renderHtml
25
false
false
0
5
4
9
4
5
null
null
damianfral/clay
src/Clay/Transition.hs
bsd-3-clause
stepsStop s = other ("steps(" <> value s <> ", end)")
54
stepsStop s = other ("steps(" <> value s <> ", end)")
54
stepsStop s = other ("steps(" <> value s <> ", end)")
54
false
false
0
9
11
26
12
14
null
null
reiddraper/cauterize
src/Cauterize/Dynamic/Common.hs
bsd-3-clause
isNameOf "u16" (BDu16 _) = True
31
isNameOf "u16" (BDu16 _) = True
31
isNameOf "u16" (BDu16 _) = True
31
false
false
0
6
5
19
8
11
null
null
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/CreateMultipartUpload.hs
mpl-2.0
-- | Allows grantee to read the object ACL. cmuGrantReadACP :: Lens' CreateMultipartUpload (Maybe Text) cmuGrantReadACP = lens _cmuGrantReadACP (\ s a -> s{_cmuGrantReadACP = a})
178
cmuGrantReadACP :: Lens' CreateMultipartUpload (Maybe Text) cmuGrantReadACP = lens _cmuGrantReadACP (\ s a -> s{_cmuGrantReadACP = a})
134
cmuGrantReadACP = lens _cmuGrantReadACP (\ s a -> s{_cmuGrantReadACP = a})
74
true
true
0
9
25
46
25
21
null
null
DougBurke/swish
src/Swish/VarBinding.hs
lgpl-2.1
-- |Make a variable binding modifier from a variable binding filter value. makeVarFilterModify :: VarBindingFilter a b -> VarBindingModify a b makeVarFilterModify vbf = VarBindingModify { vbmName = vbfName vbf , vbmApply = filter (vbfTest vbf) , vbmVocab = vbfVocab vbf , vbmUsage = [[]] }
314
makeVarFilterModify :: VarBindingFilter a b -> VarBindingModify a b makeVarFilterModify vbf = VarBindingModify { vbmName = vbfName vbf , vbmApply = filter (vbfTest vbf) , vbmVocab = vbfVocab vbf , vbmUsage = [[]] }
239
makeVarFilterModify vbf = VarBindingModify { vbmName = vbfName vbf , vbmApply = filter (vbfTest vbf) , vbmVocab = vbfVocab vbf , vbmUsage = [[]] }
171
true
true
0
9
70
75
40
35
null
null
chrisbarrett/haskell-docs
src/Haskell/Docs/Index.hs
bsd-3-clause
generateFlatFile :: [String] -> IO [(String, String, String)] generateFlatFile flags = do packages <- withInitializedPackages flags (do df <- getSessionDynFlags return (fromMaybe [] (pkgDatabase df))) fmap (concat . map explode . concat) (for...
1,034
generateFlatFile :: [String] -> IO [(String, String, String)] generateFlatFile flags = do packages <- withInitializedPackages flags (do df <- getSessionDynFlags return (fromMaybe [] (pkgDatabase df))) fmap (concat . map explode . concat) (for...
1,034
generateFlatFile flags = do packages <- withInitializedPackages flags (do df <- getSessionDynFlags return (fromMaybe [] (pkgDatabase df))) fmap (concat . map explode . concat) (forM packages (\package -> do ...
972
false
true
0
25
503
250
123
127
null
null
tranma/big-oh
example/codensity.hs
bsd-3-clause
improve :: Functor f => (forall m. FreeLike f m => m a) -> Free f a improve m = abs m
85
improve :: Functor f => (forall m. FreeLike f m => m a) -> Free f a improve m = abs m
85
improve m = abs m
17
false
true
0
11
21
58
26
32
null
null
GaloisInc/saw-script
crux-mir-comp/src/Mir/Compositional/Override.hs
bsd-3-clause
runSpec :: forall sym p t st fs args ret rtp. (IsSymInterface sym, sym ~ W4.ExprBuilder t st fs) => CollectionState -> FnHandle args ret -> MIRMethodSpec -> OverrideSim (p sym) sym MIR rtp args ret (RegValue sym ret) runSpec cs mh ms = ovrWithBackend $ \bak -> do let col = cs ^. collection sym <- getSy...
10,626
runSpec :: forall sym p t st fs args ret rtp. (IsSymInterface sym, sym ~ W4.ExprBuilder t st fs) => CollectionState -> FnHandle args ret -> MIRMethodSpec -> OverrideSim (p sym) sym MIR rtp args ret (RegValue sym ret) runSpec cs mh ms = ovrWithBackend $ \bak -> do let col = cs ^. collection sym <- getSy...
10,626
runSpec cs mh ms = ovrWithBackend $ \bak -> do let col = cs ^. collection sym <- getSymInterface RegMap argVals <- getOverrideArgs let argVals' = Map.fromList $ zip [0..] $ MS.assignmentToList argVals loc <- liftIO $ W4.getCurrentProgramLoc sym let freeVars = Set.fromList $ ms ^.. MS.c...
10,397
false
true
0
33
3,034
2,565
1,243
1,322
null
null
flocc-net/flocc
v0.1/Compiler/Front/Common.hs
apache-2.0
xor False a = a
15
xor False a = a
15
xor False a = a
15
false
false
0
5
4
11
5
6
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/TestCases/List.hs
mpl-2.0
-- | Creates a value of 'ProjectsLocationsAgentsTestCasesList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'platclParent' -- -- * 'platclXgafv' -- -- * 'platclUploadProtocol' -- -- * 'platclAccessToken' -- -- * 'platclUploadType' -...
926
projectsLocationsAgentsTestCasesList :: Text -- ^ 'platclParent' -> ProjectsLocationsAgentsTestCasesList projectsLocationsAgentsTestCasesList pPlatclParent_ = ProjectsLocationsAgentsTestCasesList' { _platclParent = pPlatclParent_ , _platclXgafv = Nothing , _platclUploadProtocol = Nothing , _pl...
510
projectsLocationsAgentsTestCasesList pPlatclParent_ = ProjectsLocationsAgentsTestCasesList' { _platclParent = pPlatclParent_ , _platclXgafv = Nothing , _platclUploadProtocol = Nothing , _platclAccessToken = Nothing , _platclUploadType = Nothing , _platclView = Nothing , _platclPageToken = ...
397
true
true
0
6
164
96
68
28
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxPENSTYLE_LONG_DASH :: Int wxPENSTYLE_LONG_DASH = wxLONG_DASH
62
wxPENSTYLE_LONG_DASH :: Int wxPENSTYLE_LONG_DASH = wxLONG_DASH
62
wxPENSTYLE_LONG_DASH = wxLONG_DASH
34
false
true
0
4
5
11
6
5
null
null
ben-schulz/Idris-dev
src/Idris/Parser/Helpers.hs
bsd-3-clause
collect (POpenInterfaces f ns ps : ds) = POpenInterfaces f ns (collect ps) : collect ds
87
collect (POpenInterfaces f ns ps : ds) = POpenInterfaces f ns (collect ps) : collect ds
87
collect (POpenInterfaces f ns ps : ds) = POpenInterfaces f ns (collect ps) : collect ds
87
false
false
0
8
15
44
20
24
null
null
peterokagey/haskellOEIS
src/HypercubeColorings/A333333.hs
apache-2.0
a333333 :: Int -> Int a333333 n = a333333_list !! (n - 1)
57
a333333 :: Int -> Int a333333 n = a333333_list !! (n - 1)
57
a333333 n = a333333_list !! (n - 1)
35
false
true
0
7
12
29
15
14
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_BAAN_OPERATOR :: Int wxSTC_BAAN_OPERATOR = 7
50
wxSTC_BAAN_OPERATOR :: Int wxSTC_BAAN_OPERATOR = 7
50
wxSTC_BAAN_OPERATOR = 7
23
false
true
0
6
5
18
7
11
null
null
pa-ba/equivalence
testsuite/tests/Data/Equivalence/Monad_Test.hs
bsd-3-clause
prop_equateOverlap x y z = runInt $ do equate x y equate y z equivalent x z
81
prop_equateOverlap x y z = runInt $ do equate x y equate y z equivalent x z
81
prop_equateOverlap x y z = runInt $ do equate x y equate y z equivalent x z
81
false
false
0
8
22
41
17
24
null
null
seinokatsuhiro/koshu-java-tool
koshu-java-class.hs
bsd-3-clause
dumpPool (i, J.CMethod c (J.NameType n m)) = judge "POOL-METHOD" xs where J.MethodSignature args ret = m xs = [ term "index" $ K.pWord16 i , term "class" $ pClass c , term "method" $ pBytes n , term "args-type" $ pArgsType args , term "ret-type" $ pRet ret ]
314
dumpPool (i, J.CMethod c (J.NameType n m)) = judge "POOL-METHOD" xs where J.MethodSignature args ret = m xs = [ term "index" $ K.pWord16 i , term "class" $ pClass c , term "method" $ pBytes n , term "args-type" $ pArgsType args , term "ret-type" $ pRet ret ]
314
dumpPool (i, J.CMethod c (J.NameType n m)) = judge "POOL-METHOD" xs where J.MethodSignature args ret = m xs = [ term "index" $ K.pWord16 i , term "class" $ pClass c , term "method" $ pBytes n , term "args-type" $ pArgsType args , term "ret-type" $ pRet ret ]
314
false
false
0
10
105
124
59
65
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Fresh.hs
bsd-3-clause
trueRef (RProp s t) = RProp s <$> trueRefType t
47
trueRef (RProp s t) = RProp s <$> trueRefType t
47
trueRef (RProp s t) = RProp s <$> trueRefType t
47
false
false
0
7
9
27
12
15
null
null
diagrams/diagrams-contrib
src/Diagrams/Color/XKCD.hs
bsd-3-clause
lightAquamarine = fromJust $ readHexColor "#7bfdc7"
57
lightAquamarine = fromJust $ readHexColor "#7bfdc7"
57
lightAquamarine = fromJust $ readHexColor "#7bfdc7"
57
false
false
0
6
11
13
6
7
null
null
bjpop/berp
libs/src/Berp/Base/Prims.hs
bsd-3-clause
callSpecialMethod :: Object -> Hashed String -> [Object] -> Eval Object callSpecialMethod object ident args = do proc <- lookupSpecialAttribute object ident proc @@ args
175
callSpecialMethod :: Object -> Hashed String -> [Object] -> Eval Object callSpecialMethod object ident args = do proc <- lookupSpecialAttribute object ident proc @@ args
175
callSpecialMethod object ident args = do proc <- lookupSpecialAttribute object ident proc @@ args
103
false
true
0
8
30
58
27
31
null
null
vincenthz/cryptonite
Crypto/PubKey/EdDSA.hs
bsd-3-clause
encodeSignature :: EllipticCurveEdDSA curve => proxy curve -> (Bytes, Point curve, Scalar curve) -> Signature curve hash encodeSignature prx (bsR, _, sS) = Signature $ buildAndFreeze $ bytes bsR <> bytes bsS <> zero len0 where bsS = encodeScalarLE prx sS :: Byt...
381
encodeSignature :: EllipticCurveEdDSA curve => proxy curve -> (Bytes, Point curve, Scalar curve) -> Signature curve hash encodeSignature prx (bsR, _, sS) = Signature $ buildAndFreeze $ bytes bsR <> bytes bsS <> zero len0 where bsS = encodeScalarLE prx sS :: Byt...
381
encodeSignature prx (bsR, _, sS) = Signature $ buildAndFreeze $ bytes bsR <> bytes bsS <> zero len0 where bsS = encodeScalarLE prx sS :: Bytes len0 = signatureSize prx - B.length bsR - B.length bsS
212
false
true
3
10
115
141
65
76
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/BasicTypes.hs
bsd-3-clause
succeeded Failed = False
27
succeeded Failed = False
27
succeeded Failed = False
27
false
false
1
5
6
13
4
9
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
infatuatedly = id
17
infatuatedly = id
17
infatuatedly = id
17
false
false
0
4
2
6
3
3
null
null
idontgetoutmuch/StochVol
LinRegSingle.hs
bsd-3-clause
prices' :: [(Double,Double)] prices' = V.toList $ V.zip (testXs nSamples) (testYs nSamples)
91
prices' :: [(Double,Double)] prices' = V.toList $ V.zip (testXs nSamples) (testYs nSamples)
91
prices' = V.toList $ V.zip (testXs nSamples) (testYs nSamples)
62
false
true
0
8
11
45
24
21
null
null
JohnLato/iteratee
tests/testIteratee.hs
bsd-3-clause
prop_dropWhileB f xs (Positive n) = runner1 (enumSpecial xs n (Iter.dropWhileB f >> stream2list)) == case P.span f xs of (_,[]) -> [] ([],t) -> t (h,t) -> P.last h : t where types = (xs :: [Int], f :: Int -> Bool)
240
prop_dropWhileB f xs (Positive n) = runner1 (enumSpecial xs n (Iter.dropWhileB f >> stream2list)) == case P.span f xs of (_,[]) -> [] ([],t) -> t (h,t) -> P.last h : t where types = (xs :: [Int], f :: Int -> Bool)
240
prop_dropWhileB f xs (Positive n) = runner1 (enumSpecial xs n (Iter.dropWhileB f >> stream2list)) == case P.span f xs of (_,[]) -> [] ([],t) -> t (h,t) -> P.last h : t where types = (xs :: [Int], f :: Int -> Bool)
240
false
false
5
11
69
136
70
66
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSQL_DATA_AT_EXEC :: Int wxSQL_DATA_AT_EXEC = (-2)
51
wxSQL_DATA_AT_EXEC :: Int wxSQL_DATA_AT_EXEC = (-2)
51
wxSQL_DATA_AT_EXEC = (-2)
25
false
true
0
6
5
16
9
7
null
null
polux/hgom
app/Gom.hs
gpl-3.0
hgomChain :: Config -> Module -> IO () hgomChain conf = generateFileHierarchy (compact conf) . flip st2java conf . completeVariadics . ast2st
196
hgomChain :: Config -> Module -> IO () hgomChain conf = generateFileHierarchy (compact conf) . flip st2java conf . completeVariadics . ast2st
196
hgomChain conf = generateFileHierarchy (compact conf) . flip st2java conf . completeVariadics . ast2st
157
false
true
0
10
76
53
25
28
null
null
tolysz/hiccup
RToken.hs
lgpl-2.1
rtokenTests = TestList [compTests, compTokenTests] where compTests = "compile" ~: TestList [ "x -> x" ~: "x" `compiles_to` (lit "x") ,"$x -> VarRef x" ~: "$x" `compiles_to` (varref "x") ,"x(G) -> ArrRef x G" ~: "$x(G)" `compiles_to` (arrref "x" (lit "G")) ,"CatLst" ~: "$x$y" `compiles_t...
1,363
rtokenTests = TestList [compTests, compTokenTests] where compTests = "compile" ~: TestList [ "x -> x" ~: "x" `compiles_to` (lit "x") ,"$x -> VarRef x" ~: "$x" `compiles_to` (varref "x") ,"x(G) -> ArrRef x G" ~: "$x(G)" `compiles_to` (arrref "x" (lit "G")) ,"CatLst" ~: "$x$y" `compiles_t...
1,363
rtokenTests = TestList [compTests, compTokenTests] where compTests = "compile" ~: TestList [ "x -> x" ~: "x" `compiles_to` (lit "x") ,"$x -> VarRef x" ~: "$x" `compiles_to` (varref "x") ,"x(G) -> ArrRef x G" ~: "$x(G)" `compiles_to` (arrref "x" (lit "G")) ,"CatLst" ~: "$x$y" `compiles_t...
1,363
false
false
0
16
374
578
298
280
null
null
purcell/adventofcodeteam
app/TwentyTwo.hs
bsd-3-clause
newPlayer :: Player newPlayer = ((50, 500, 0, 0), [], [])
57
newPlayer :: Player newPlayer = ((50, 500, 0, 0), [], [])
57
newPlayer = ((50, 500, 0, 0), [], [])
37
false
true
0
7
10
43
23
20
null
null
sjakobi/stack
src/Stack/Types/StackT.hs
bsd-3-clause
timestampLength :: Int timestampLength = length (formatTime defaultTimeLocale "%F %T.000000" (UTCTime (ModifiedJulianDay 0) 0))
129
timestampLength :: Int timestampLength = length (formatTime defaultTimeLocale "%F %T.000000" (UTCTime (ModifiedJulianDay 0) 0))
129
timestampLength = length (formatTime defaultTimeLocale "%F %T.000000" (UTCTime (ModifiedJulianDay 0) 0))
106
false
true
0
11
15
38
19
19
null
null
brendanhay/gogol
gogol-appstate/gen/Network/Google/Resource/AppState/States/Update.hs
mpl-2.0
-- | The key for the data to be retrieved. suStateKey :: Lens' StatesUpdate Int32 suStateKey = lens _suStateKey (\ s a -> s{_suStateKey = a}) . _Coerce
159
suStateKey :: Lens' StatesUpdate Int32 suStateKey = lens _suStateKey (\ s a -> s{_suStateKey = a}) . _Coerce
116
suStateKey = lens _suStateKey (\ s a -> s{_suStateKey = a}) . _Coerce
77
true
true
0
10
35
46
24
22
null
null
cutsea110/Kestrel
Handler/Profile.hs
bsd-3-clause
putProfileR :: UserId -> Handler () putProfileR uid = do (Entity uid' _) <- requireAuth msgShow <- getMessageRender unless (uid' == uid) $ do permissionDenied $ msgShow MsgCouldntAccessAnotherUserProfile nn <- runInputPost $ ireq textField "nickname" runDB $ update uid [UserNickname =. Just nn] setPNoti...
413
putProfileR :: UserId -> Handler () putProfileR uid = do (Entity uid' _) <- requireAuth msgShow <- getMessageRender unless (uid' == uid) $ do permissionDenied $ msgShow MsgCouldntAccessAnotherUserProfile nn <- runInputPost $ ireq textField "nickname" runDB $ update uid [UserNickname =. Just nn] setPNoti...
413
putProfileR uid = do (Entity uid' _) <- requireAuth msgShow <- getMessageRender unless (uid' == uid) $ do permissionDenied $ msgShow MsgCouldntAccessAnotherUserProfile nn <- runInputPost $ ireq textField "nickname" runDB $ update uid [UserNickname =. Just nn] setPNotify $ PNotify JqueryUI Success "Updat...
377
false
true
0
11
73
141
63
78
null
null
tjunier/mlgsc
src/TaxoParser.hs
mit
tn = foldl addTaxoLine (Node ST.empty []) taxolines
51
tn = foldl addTaxoLine (Node ST.empty []) taxolines
51
tn = foldl addTaxoLine (Node ST.empty []) taxolines
51
false
false
1
8
7
30
12
18
null
null
carbolymer/blockchain
blockchain-ui/src/Blockchain/UI/Core.hs
apache-2.0
getNodesFromList :: AppState -> [Blockchain.Node.Core.Node] -> IO [NodeDto] getNodesFromList app nodes = do -- infoL "Fetching nodes list from all nodes" let requests = map (\node -> NodeRequest node (getNodes $ restClient app)) nodes result <- runRequests requests mapM_ (warnL . show) (lefts result) -- uniqu...
450
getNodesFromList :: AppState -> [Blockchain.Node.Core.Node] -> IO [NodeDto] getNodesFromList app nodes = do -- infoL "Fetching nodes list from all nodes" let requests = map (\node -> NodeRequest node (getNodes $ restClient app)) nodes result <- runRequests requests mapM_ (warnL . show) (lefts result) -- uniqu...
450
getNodesFromList app nodes = do -- infoL "Fetching nodes list from all nodes" let requests = map (\node -> NodeRequest node (getNodes $ restClient app)) nodes result <- runRequests requests mapM_ (warnL . show) (lefts result) -- unique list let nodesList = S.toList $ S.fromList $ concat $ rights result ca...
374
false
true
0
16
77
153
75
78
null
null
da-x/lamdu
bottlelib/Graphics/UI/GLFW/Events.hs
gpl-3.0
translate (RawKeyEvent key scanCode keyState modKeys : RawCharEvent char : xs) = EventKey (KeyEvent key scanCode keyState modKeys (fromChar char)) : translate xs
169
translate (RawKeyEvent key scanCode keyState modKeys : RawCharEvent char : xs) = EventKey (KeyEvent key scanCode keyState modKeys (fromChar char)) : translate xs
169
translate (RawKeyEvent key scanCode keyState modKeys : RawCharEvent char : xs) = EventKey (KeyEvent key scanCode keyState modKeys (fromChar char)) : translate xs
169
false
false
0
10
30
62
29
33
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1beta1PodDisruptionBudgetStatus' Lens v1beta1PodDisruptionBudgetStatusL :: Lens_' V1beta1PodDisruptionBudget (Maybe V1beta1PodDisruptionBudgetStatus) v1beta1PodDisruptionBudgetStatusL f V1beta1PodDisruptionBudget{..} = (\v1beta1PodDisruptionBudgetStatus -> V1beta1PodDisruptionBudget { v1beta1PodDisruptionBudgetS...
371
v1beta1PodDisruptionBudgetStatusL :: Lens_' V1beta1PodDisruptionBudget (Maybe V1beta1PodDisruptionBudgetStatus) v1beta1PodDisruptionBudgetStatusL f V1beta1PodDisruptionBudget{..} = (\v1beta1PodDisruptionBudgetStatus -> V1beta1PodDisruptionBudget { v1beta1PodDisruptionBudgetStatus, ..} ) <$> f v1beta1PodDisruptionBudget...
326
v1beta1PodDisruptionBudgetStatusL f V1beta1PodDisruptionBudget{..} = (\v1beta1PodDisruptionBudgetStatus -> V1beta1PodDisruptionBudget { v1beta1PodDisruptionBudgetStatus, ..} ) <$> f v1beta1PodDisruptionBudgetStatus
214
true
true
0
8
23
57
30
27
null
null
p12nGH/miss
src/MIPS_I.hs
bsd-3-clause
evalI (I 0x24 rs rt imm) = ((+) imm) <$> rr rs >>= \a -> fromIntegral <$> readMem8 a >>= wr rt
94
evalI (I 0x24 rs rt imm) = ((+) imm) <$> rr rs >>= \a -> fromIntegral <$> readMem8 a >>= wr rt
94
evalI (I 0x24 rs rt imm) = ((+) imm) <$> rr rs >>= \a -> fromIntegral <$> readMem8 a >>= wr rt
94
false
false
0
9
21
60
29
31
null
null
GaloisInc/ivory
ivory/src/Ivory/Language/BitData/Bits.hs
bsd-3-clause
-- | Convert an Ivory value to a bit value. If the input value -- contains out of range bits, they will be ignored. repToBits :: forall n. (ANat n, IvoryRep (BitRep n)) => BitRep n -> Bits n repToBits x = Bits (x .& mask) where mask = fromIntegral (2 ^ fromTypeNat (aNat :: NatType n) - 1 :: Integer) -- | ...
358
repToBits :: forall n. (ANat n, IvoryRep (BitRep n)) => BitRep n -> Bits n repToBits x = Bits (x .& mask) where mask = fromIntegral (2 ^ fromTypeNat (aNat :: NatType n) - 1 :: Integer) -- | Convert a bit value to an Ivory value.
241
repToBits x = Bits (x .& mask) where mask = fromIntegral (2 ^ fromTypeNat (aNat :: NatType n) - 1 :: Integer) -- | Convert a bit value to an Ivory value.
156
true
true
1
11
84
108
53
55
null
null
rodrigofegui/UnB
2017.2/Linguagens de Programação/Trab 2_Ver 2/Tst_F6LAE.hs
gpl-3.0
ret_6 = NumV 49
15
ret_6 = NumV 49
15
ret_6 = NumV 49
15
false
false
1
5
3
13
4
9
null
null
brendanhay/gogol
gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Instances/Clusters/PartialUpdateCluster.hs
mpl-2.0
-- | Creates a value of 'ProjectsInstancesClustersPartialUpdateCluster' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'picpucXgafv' -- -- * 'picpucUploadProtocol' -- -- * 'picpucUpdateMask' -- -- * 'picpucAccessToken' -- -- * 'picpuc...
972
projectsInstancesClustersPartialUpdateCluster :: Cluster -- ^ 'picpucPayload' -> Text -- ^ 'picpucName' -> ProjectsInstancesClustersPartialUpdateCluster projectsInstancesClustersPartialUpdateCluster pPicpucPayload_ pPicpucName_ = ProjectsInstancesClustersPartialUpdateCluster' { _picpucXgafv = Nothing ...
570
projectsInstancesClustersPartialUpdateCluster pPicpucPayload_ pPicpucName_ = ProjectsInstancesClustersPartialUpdateCluster' { _picpucXgafv = Nothing , _picpucUploadProtocol = Nothing , _picpucUpdateMask = Nothing , _picpucAccessToken = Nothing , _picpucUploadType = Nothing , _picpucPayload = p...
405
true
true
0
8
162
104
68
36
null
null
snoyberg/cookie
Web/Cookie.hs
mit
defaultSetCookie :: SetCookie defaultSetCookie = SetCookie { setCookieName = "name" , setCookieValue = "value" , setCookiePath = Nothing , setCookieExpires = Nothing , setCookieMaxAge = Nothing , setCookieDomain = Nothing , setCookieHttpOnly = False , setCookieSecure = ...
365
defaultSetCookie :: SetCookie defaultSetCookie = SetCookie { setCookieName = "name" , setCookieValue = "value" , setCookiePath = Nothing , setCookieExpires = Nothing , setCookieMaxAge = Nothing , setCookieDomain = Nothing , setCookieHttpOnly = False , setCookieSecure = ...
365
defaultSetCookie = SetCookie { setCookieName = "name" , setCookieValue = "value" , setCookiePath = Nothing , setCookieExpires = Nothing , setCookieMaxAge = Nothing , setCookieDomain = Nothing , setCookieHttpOnly = False , setCookieSecure = False , setCookieSameSite ...
335
false
true
0
7
100
77
45
32
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/EXT/index_material.txt EXT_index_material> extension supported? glGetEXTIndexMaterial :: MonadIO m => m Bool glGetEXTIndexMaterial = getExtensions >>= (return . member "GL_EXT_index_material")
243
glGetEXTIndexMaterial :: MonadIO m => m Bool glGetEXTIndexMaterial = getExtensions >>= (return . member "GL_EXT_index_material")
128
glGetEXTIndexMaterial = getExtensions >>= (return . member "GL_EXT_index_material")
83
true
true
0
8
22
36
18
18
null
null
netom/hamloghs
src/HlLog.hs
mit
isEOH :: Tag -> Bool isEOH = isTagName "EOH"
44
isEOH :: Tag -> Bool isEOH = isTagName "EOH"
44
isEOH = isTagName "EOH"
23
false
true
0
5
8
18
9
9
null
null
jaapweel/piffle
src/Syntax/PPrint.hs
gpl-2.0
-- | The document (char c) contains the literal character c. The -- character shouldn't be a newline ('\n'), the function line should -- be used for line breaks. char :: Char -> Doc char '\n' = line
204
char :: Char -> Doc char '\n' = line
42
char '\n' = line
22
true
true
0
5
43
21
12
9
null
null
robdockins/edison
edison-core/src/Data/Edison/Concrete/FingerTree.hs
mit
sizeDigit f (Two x y) = f x + f y
38
sizeDigit f (Two x y) = f x + f y
38
sizeDigit f (Two x y) = f x + f y
38
false
false
2
6
15
32
13
19
null
null
factisresearch/influx
src/Database/Influx/API.hs
bsd-3-clause
-- | Queries a specified database (the given database overrides the one in the config) -- with a given query and returns parsed table data. getQuery :: FromInfluxPoint t => Config -> Maybe DatabaseName -> Query -> IO (ParsedTable t) getQuery config mDatabase query = do let params = defaultQueryP...
1,022
getQuery :: FromInfluxPoint t => Config -> Maybe DatabaseName -> Query -> IO (ParsedTable t) getQuery config mDatabase query = do let params = defaultQueryParams { qp_database = mDatabase } queryRes <- getQueryRaw config params query case queryRes of QueryResult results ->...
882
getQuery config mDatabase query = do let params = defaultQueryParams { qp_database = mDatabase } queryRes <- getQueryRaw config params query case queryRes of QueryResult results -> parseResults results QueryFailed err -> throw err where parseResults results = case ...
769
true
true
1
16
371
253
118
135
null
null
gridaphobe/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (LDFAR _ _ _) = panic "PPC.Ppr.pprInstr LDFAR: no match"
68
pprInstr (LDFAR _ _ _) = panic "PPC.Ppr.pprInstr LDFAR: no match"
68
pprInstr (LDFAR _ _ _) = panic "PPC.Ppr.pprInstr LDFAR: no match"
68
false
false
0
7
13
22
10
12
null
null
ibabushkin/morgue
src/Data/Morgue/Agenda/Render.hs
bsd-3-clause
dispatchTemplate format Todo = todoTemplate format
50
dispatchTemplate format Todo = todoTemplate format
50
dispatchTemplate format Todo = todoTemplate format
50
false
false
0
5
5
16
6
10
null
null
piyush-kurur/shakespeare
hamlet/Text/Hamlet.hs
bsd-2-clause
contentToExp _ hr scope (ContentAttrs d) = do html <- [|attrsToHtml . toAttributes|] return $ hrFromHtml hr `AppE` (html `AppE` derefToExp scope d)
155
contentToExp _ hr scope (ContentAttrs d) = do html <- [|attrsToHtml . toAttributes|] return $ hrFromHtml hr `AppE` (html `AppE` derefToExp scope d)
155
contentToExp _ hr scope (ContentAttrs d) = do html <- [|attrsToHtml . toAttributes|] return $ hrFromHtml hr `AppE` (html `AppE` derefToExp scope d)
155
false
false
0
10
30
61
32
29
null
null
tomob/euler
011/011.hs
bsd-3-clause
gridT :: [[Int]] gridT = transpose grid
39
gridT :: [[Int]] gridT = transpose grid
39
gridT = transpose grid
22
false
true
0
6
6
20
11
9
null
null
ndmitchell/hogle-dead
src/Output/Types.hs
bsd-3-clause
unpackAlias :: Decl -> Maybe (String, ([String], Type)) unpackAlias (TypeDecl _ name bind rhs) = Just (fromName name, (map (fromName . fromTyVarBind) bind, rhs))
161
unpackAlias :: Decl -> Maybe (String, ([String], Type)) unpackAlias (TypeDecl _ name bind rhs) = Just (fromName name, (map (fromName . fromTyVarBind) bind, rhs))
161
unpackAlias (TypeDecl _ name bind rhs) = Just (fromName name, (map (fromName . fromTyVarBind) bind, rhs))
105
false
true
0
10
23
83
43
40
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
inhospitably = id
17
inhospitably = id
17
inhospitably = id
17
false
false
0
4
2
6
3
3
null
null
grnet/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pTempHvParams :: Field pTempHvParams = withDoc "Temporary hypervisor parameters, hypervisor-dependent" . renameField "TempHvParams" . defaultField [| toJSObject [] |] $ simpleField "hvparams" [t| JSObject JSValue |]
223
pTempHvParams :: Field pTempHvParams = withDoc "Temporary hypervisor parameters, hypervisor-dependent" . renameField "TempHvParams" . defaultField [| toJSObject [] |] $ simpleField "hvparams" [t| JSObject JSValue |]
223
pTempHvParams = withDoc "Temporary hypervisor parameters, hypervisor-dependent" . renameField "TempHvParams" . defaultField [| toJSObject [] |] $ simpleField "hvparams" [t| JSObject JSValue |]
200
false
true
0
8
33
44
24
20
null
null
vladfi1/hs-misc
GrammarNN.hs
mit
getReprNP' (Flip e :* es) = Flip (getRepr e) :* getReprNP' es
61
getReprNP' (Flip e :* es) = Flip (getRepr e) :* getReprNP' es
61
getReprNP' (Flip e :* es) = Flip (getRepr e) :* getReprNP' es
61
false
false
0
8
11
35
16
19
null
null
eccstartup/HeyJude
HeyJude.hs
bsd-3-clause
m2 n = case n of 1 -> "refrain" 2 -> "begin"
61
m2 n = case n of 1 -> "refrain" 2 -> "begin"
61
m2 n = case n of 1 -> "refrain" 2 -> "begin"
61
false
false
1
8
28
29
12
17
null
null
shlevy/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
_ `regClashesWithOp` _ = False
43
_ `regClashesWithOp` _ = False
43
_ `regClashesWithOp` _ = False
43
false
false
0
5
17
14
7
7
null
null
ntc2/haskell-call-trace
experiments/proof-trees/Test.hs
mpl-2.0
infer' (TmVar x) = maybe err pure . lookup x =<< ask where err = throwError $ "Variable " ++ x ++ " not in context!"
118
infer' (TmVar x) = maybe err pure . lookup x =<< ask where err = throwError $ "Variable " ++ x ++ " not in context!"
118
infer' (TmVar x) = maybe err pure . lookup x =<< ask where err = throwError $ "Variable " ++ x ++ " not in context!"
118
false
false
0
9
27
51
24
27
null
null
ideas-edu/ideas
src/Ideas/Utils/StringRef.hs
apache-2.0
extractHash :: Int -> Int extractHash i = i `mod` 4096
55
extractHash :: Int -> Int extractHash i = i `mod` 4096
54
extractHash i = i `mod` 4096
28
false
true
0
7
11
32
15
17
null
null
kazu-yamamoto/word8
Data/Word8.hs
bsd-3-clause
_e = 0x65
9
_e = 0x65
9
_e = 0x65
9
false
false
1
5
2
10
3
7
null
null