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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39aldo39/klfc | src/Ahk.hs | gpl-3.0 | printLetter blind _ (Redirect modifiers pos) = fmap (fromMaybe []) ∘ runMaybeT $ do
shortString ← modifiersToShortString modifiers
let scancode = fromMaybe "" $ printf "SC%03x" <$> lookup pos posAndScancode
case lookup pos posAndVkInt of
Just vk → pure ["Send " ⊕ blindToString blind ⊕ shortString ⊕ "{... | 440 | printLetter blind _ (Redirect modifiers pos) = fmap (fromMaybe []) ∘ runMaybeT $ do
shortString ← modifiersToShortString modifiers
let scancode = fromMaybe "" $ printf "SC%03x" <$> lookup pos posAndScancode
case lookup pos posAndVkInt of
Just vk → pure ["Send " ⊕ blindToString blind ⊕ shortString ⊕ "{... | 440 | printLetter blind _ (Redirect modifiers pos) = fmap (fromMaybe []) ∘ runMaybeT $ do
shortString ← modifiersToShortString modifiers
let scancode = fromMaybe "" $ printf "SC%03x" <$> lookup pos posAndScancode
case lookup pos posAndVkInt of
Just vk → pure ["Send " ⊕ blindToString blind ⊕ shortString ⊕ "{... | 440 | false | false | 0 | 18 | 93 | 156 | 71 | 85 | null | null |
hamishmack/haskell-gi | lib/Data/GI/CodeGen/Code.hs | lgpl-2.1 | -- | Return the ambient configuration for the code generator.
config :: CodeGen Config
config = hConfig <$> ask | 111 | config :: CodeGen Config
config = hConfig <$> ask | 49 | config = hConfig <$> ask | 24 | true | true | 0 | 5 | 18 | 19 | 10 | 9 | null | null |
bergmark/clay | src/Clay/Selector.hs | bsd-3-clause | -- | Named alias for `#`.
with :: Selector -> Refinement -> Selector
with (In (SelectorF (Refinement fs) e)) (Refinement ps) = In (SelectorF (Refinement (fs ++ ps)) e) | 168 | with :: Selector -> Refinement -> Selector
with (In (SelectorF (Refinement fs) e)) (Refinement ps) = In (SelectorF (Refinement (fs ++ ps)) e) | 141 | with (In (SelectorF (Refinement fs) e)) (Refinement ps) = In (SelectorF (Refinement (fs ++ ps)) e) | 98 | true | true | 0 | 14 | 29 | 80 | 39 | 41 | null | null |
michaelsproul/tpg-analyser | src/Data/TPG.hs | gpl-3.0 | createChargeInfo :: String -> String -> String -> ChargeInfo
createChargeInfo "SMS National" _ number = Sms number | 114 | createChargeInfo :: String -> String -> String -> ChargeInfo
createChargeInfo "SMS National" _ number = Sms number | 114 | createChargeInfo "SMS National" _ number = Sms number | 53 | false | true | 0 | 7 | 16 | 33 | 16 | 17 | null | null |
GaloisInc/halvm-ghc | compiler/cmm/PprC.hs | bsd-3-clause | -- ---------------------------------------------------------------------------
-- Initialising static objects with floating-point numbers. We can't
-- just emit the floating point number, because C will cast it to an int
-- by rounding it. We want the actual bit-representation of the float.
--
-- Consider a concrete ... | 1,170 | castFloatToWord32Array :: STUArray s Int Float -> ST s (STUArray s Int Word32)
castFloatToWord32Array = U.castSTUArray | 118 | castFloatToWord32Array = U.castSTUArray | 39 | true | true | 0 | 8 | 252 | 64 | 44 | 20 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | binfoFieldDescrs :: [FieldDescr BuildInfo]
binfoFieldDescrs =
[ boolField "buildable"
buildable (\val binfo -> binfo{buildable=val})
, commaListField "build-tools"
disp parseBuildTool
buildTools (\xs binfo -> binfo{buildTools=xs})
, commaListFieldWith... | 4,559 | binfoFieldDescrs :: [FieldDescr BuildInfo]
binfoFieldDescrs =
[ boolField "buildable"
buildable (\val binfo -> binfo{buildable=val})
, commaListField "build-tools"
disp parseBuildTool
buildTools (\xs binfo -> binfo{buildTools=xs})
, commaListFieldWith... | 4,559 | binfoFieldDescrs =
[ boolField "buildable"
buildable (\val binfo -> binfo{buildable=val})
, commaListField "build-tools"
disp parseBuildTool
buildTools (\xs binfo -> binfo{buildTools=xs})
, commaListFieldWithSep vcat "build-depends"
disp ... | 4,516 | false | true | 0 | 10 | 1,469 | 1,019 | 569 | 450 | null | null |
balangs/eTeak | aschem/Render.hs | bsd-3-clause | showPort (Cell pos OrientE (Port Output name)) = showPortSymbol (schematicScale pos) pi >>
showTextRight (-1) (schematicScale pos) name | 143 | showPort (Cell pos OrientE (Port Output name)) = showPortSymbol (schematicScale pos) pi >>
showTextRight (-1) (schematicScale pos) name | 143 | showPort (Cell pos OrientE (Port Output name)) = showPortSymbol (schematicScale pos) pi >>
showTextRight (-1) (schematicScale pos) name | 143 | false | false | 0 | 8 | 25 | 62 | 29 | 33 | null | null |
batterseapower/haskell-kata | ListMonads.hs | bsd-3-clause | mx `mplus` my = OmegaM $ unOmegaM mx ++ unOmegaM my | 51 | mx `mplus` my = OmegaM $ unOmegaM mx ++ unOmegaM my | 51 | mx `mplus` my = OmegaM $ unOmegaM mx ++ unOmegaM my | 51 | false | false | 0 | 7 | 10 | 31 | 14 | 17 | null | null |
jystic/pointfree | Plugin/Pl/Common.hs | mit | shift, minPrec, maxPrec :: Int
shift = 0 | 40 | shift, minPrec, maxPrec :: Int
shift = 0 | 40 | shift = 0 | 9 | false | true | 0 | 4 | 7 | 15 | 10 | 5 | null | null |
dsorokin/aivika-experiment-chart | examples/Financial/Experiment.hs | bsd-3-clause | npvIncome = resultByName npvIncomeName | 38 | npvIncome = resultByName npvIncomeName | 38 | npvIncome = resultByName npvIncomeName | 38 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
josefs/autosar | generics/Datatypes.hs | bsd-3-clause | ----------------
-- Example values
dataElem = DE | 49 | dataElem = DE | 13 | dataElem = DE | 13 | true | false | 0 | 4 | 7 | 8 | 5 | 3 | null | null |
spechub/Hets | OWL2/Print.hs | gpl-2.0 | printAnnotation :: AS.Annotation -> Doc
printAnnotation (AS.Annotation ans ap av) =
sep [printAnnotations ans, sep [pretty ap, pretty av]] | 142 | printAnnotation :: AS.Annotation -> Doc
printAnnotation (AS.Annotation ans ap av) =
sep [printAnnotations ans, sep [pretty ap, pretty av]] | 142 | printAnnotation (AS.Annotation ans ap av) =
sep [printAnnotations ans, sep [pretty ap, pretty av]] | 102 | false | true | 0 | 9 | 22 | 59 | 29 | 30 | null | null |
PhDP/Sphinx-AI | Faun/SetClause.hs | mit | parseRightWC :: Parser (SetClause (Predicate String), Double)
parseRightWC = do
c <- parseCl
n <- float
return (c, n) | 123 | parseRightWC :: Parser (SetClause (Predicate String), Double)
parseRightWC = do
c <- parseCl
n <- float
return (c, n) | 123 | parseRightWC = do
c <- parseCl
n <- float
return (c, n) | 61 | false | true | 0 | 9 | 24 | 55 | 27 | 28 | null | null |
iand675/bearcat | src/Attributes.hs | bsd-3-clause | -- | Defines the number of rows in a text area.
rows_ :: ValidAttr "rows" e => Int -> Attribute e
rows_ = attribute "rows" | 122 | rows_ :: ValidAttr "rows" e => Int -> Attribute e
rows_ = attribute "rows" | 74 | rows_ = attribute "rows" | 24 | true | true | 0 | 7 | 24 | 31 | 15 | 16 | null | null |
deech/stack | src/Stack/Init.hs | bsd-3-clause | getDefaultResolver
:: (StackM env m, HasConfig env, HasGHCVariant env)
=> WhichSolverCmd
-> Path Abs File -- ^ stack.yaml
-> InitOpts
-> Maybe AbstractResolver
-> Map PackageName (Path Abs File, C.GenericPackageDescription)
-- ^ Src package name: cabal dir, cabal package description
... | 1,334 | getDefaultResolver
:: (StackM env m, HasConfig env, HasGHCVariant env)
=> WhichSolverCmd
-> Path Abs File -- ^ stack.yaml
-> InitOpts
-> Maybe AbstractResolver
-> Map PackageName (Path Abs File, C.GenericPackageDescription)
-- ^ Src package name: cabal dir, cabal package description
... | 1,178 | getDefaultResolver whichCmd stackYaml initOpts mresolver bundle =
maybe selectSnapResolver makeConcreteResolver mresolver
>>= getWorkingResolverPlan whichCmd stackYaml initOpts bundle
where
-- TODO support selecting best across regular and custom snapshots
selectSnapResolver = do
... | 686 | true | true | 0 | 16 | 384 | 290 | 141 | 149 | null | null |
roberth/uu-helium | test/make/Hiding1.hs | gpl-3.0 | main :: (Int, String)
main = ( map [x,y,z] -- should be 307
, showX X -- show functions, types and constructors may not be hidden
) | 145 | main :: (Int, String)
main = ( map [x,y,z] -- should be 307
, showX X -- show functions, types and constructors may not be hidden
) | 145 | main = ( map [x,y,z] -- should be 307
, showX X -- show functions, types and constructors may not be hidden
) | 123 | false | true | 0 | 7 | 40 | 40 | 24 | 16 | null | null |
vinnymac/glot-www | Model/Snippet/Api.hs | mit | lookupQsParam param ((key, value):xs)
| param == decodeUtf8 key = Just $ decodeUtf8 value
| otherwise = lookupQsParam param xs | 134 | lookupQsParam param ((key, value):xs)
| param == decodeUtf8 key = Just $ decodeUtf8 value
| otherwise = lookupQsParam param xs | 134 | lookupQsParam param ((key, value):xs)
| param == decodeUtf8 key = Just $ decodeUtf8 value
| otherwise = lookupQsParam param xs | 134 | false | false | 0 | 9 | 27 | 58 | 27 | 31 | null | null |
michaxm/crawlchain | src/Text/HTML/CrawlChain/HtmlFiltering.hs | bsd-3-clause | findAllUrlsEndingWith :: String -> String -> [CrawlAction]
findAllUrlsEndingWith endMarker =
map GetRequest . filter (endMarker `isSuffixOf`) . filter ("http" `isPrefixOf`) . splitOneOfRetainingNonEmpty " \t\r\n\"\'" | 218 | findAllUrlsEndingWith :: String -> String -> [CrawlAction]
findAllUrlsEndingWith endMarker =
map GetRequest . filter (endMarker `isSuffixOf`) . filter ("http" `isPrefixOf`) . splitOneOfRetainingNonEmpty " \t\r\n\"\'" | 218 | findAllUrlsEndingWith endMarker =
map GetRequest . filter (endMarker `isSuffixOf`) . filter ("http" `isPrefixOf`) . splitOneOfRetainingNonEmpty " \t\r\n\"\'" | 159 | false | true | 0 | 9 | 25 | 61 | 33 | 28 | null | null |
hesselink/stack | src/Network/HTTP/Download/Verified.hs | bsd-3-clause | -- Show a ByteString that is known to be UTF8 encoded.
displayByteString :: ByteString -> String
displayByteString =
Text.unpack . Text.strip . Text.decodeUtf8 | 163 | displayByteString :: ByteString -> String
displayByteString =
Text.unpack . Text.strip . Text.decodeUtf8 | 108 | displayByteString =
Text.unpack . Text.strip . Text.decodeUtf8 | 66 | true | true | 1 | 7 | 26 | 38 | 17 | 21 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | opPrioHigh :: Int
opPrioHigh = Types.opSubmitPriorityToRaw OpPrioHigh | 69 | opPrioHigh :: Int
opPrioHigh = Types.opSubmitPriorityToRaw OpPrioHigh | 69 | opPrioHigh = Types.opSubmitPriorityToRaw OpPrioHigh | 51 | false | true | 0 | 6 | 6 | 22 | 9 | 13 | null | null |
gridaphobe/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | Return whether there are any argument types for this 'DataCon's runtime representation type
isNullaryRepDataCon :: DataCon -> Bool
isNullaryRepDataCon dc = dataConRepArity dc == 0 | 184 | isNullaryRepDataCon :: DataCon -> Bool
isNullaryRepDataCon dc = dataConRepArity dc == 0 | 87 | isNullaryRepDataCon dc = dataConRepArity dc == 0 | 48 | true | true | 0 | 6 | 26 | 26 | 13 | 13 | null | null |
outlikealambda/trustocracy | src/Zipper.hs | bsd-3-clause | unzipper :: Direction -> Zipper a -> Zipper a
unzipper k (t, crumbs) = (getBranch k t, (deleteBranch k t):crumbs) | 113 | unzipper :: Direction -> Zipper a -> Zipper a
unzipper k (t, crumbs) = (getBranch k t, (deleteBranch k t):crumbs) | 113 | unzipper k (t, crumbs) = (getBranch k t, (deleteBranch k t):crumbs) | 67 | false | true | 0 | 8 | 19 | 59 | 30 | 29 | null | null |
GaloisInc/ivory | ivory-eval/src/Ivory/Eval.hs | bsd-3-clause | numBinOp op (Sint64 x) (Sint64 y) = Sint64 (op x y) | 51 | numBinOp op (Sint64 x) (Sint64 y) = Sint64 (op x y) | 51 | numBinOp op (Sint64 x) (Sint64 y) = Sint64 (op x y) | 51 | false | false | 0 | 7 | 10 | 36 | 17 | 19 | null | null |
itchyny/py2bf.hs | Language/Brainfuck/Py2Bf/Bfprim.hs | mit | parse ('<':bf) = (BfPrev:) <$> parse bf | 39 | parse ('<':bf) = (BfPrev:) <$> parse bf | 39 | parse ('<':bf) = (BfPrev:) <$> parse bf | 39 | false | false | 0 | 7 | 6 | 27 | 14 | 13 | null | null |
TomMD/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | runPhase (RealPhase CmmCpp) input_fn dflags
= do
output_fn <- phaseOutputFilename Cmm
liftIO $ doCpp dflags False{-not raw-}
input_fn output_fn
return (RealPhase Cmm, output_fn) | 222 | runPhase (RealPhase CmmCpp) input_fn dflags
= do
output_fn <- phaseOutputFilename Cmm
liftIO $ doCpp dflags False{-not raw-}
input_fn output_fn
return (RealPhase Cmm, output_fn) | 222 | runPhase (RealPhase CmmCpp) input_fn dflags
= do
output_fn <- phaseOutputFilename Cmm
liftIO $ doCpp dflags False{-not raw-}
input_fn output_fn
return (RealPhase Cmm, output_fn) | 222 | false | false | 0 | 9 | 67 | 61 | 28 | 33 | null | null |
pikajude/src-watch | src/Watch/Options.hs | bsd-3-clause | opts = WatchOptions
<$> argument Just (metavar "ROOT")
<*> many (strOption
(short 'i'
<> long "ignore"
<> metavar "PATTERN"
<> help "Ignore a filepath. This follows gitignore syntax."))
<*> many (cppOption
(short 'D'
<> lon... | 574 | opts = WatchOptions
<$> argument Just (metavar "ROOT")
<*> many (strOption
(short 'i'
<> long "ignore"
<> metavar "PATTERN"
<> help "Ignore a filepath. This follows gitignore syntax."))
<*> many (cppOption
(short 'D'
<> lon... | 574 | opts = WatchOptions
<$> argument Just (metavar "ROOT")
<*> many (strOption
(short 'i'
<> long "ignore"
<> metavar "PATTERN"
<> help "Ignore a filepath. This follows gitignore syntax."))
<*> many (cppOption
(short 'D'
<> lon... | 574 | false | false | 11 | 12 | 219 | 139 | 65 | 74 | null | null |
jtapolczai/Scratchpad | src/WordCounter.hs | apache-2.0 | endsWith :: Eq a => [a] -> [a] -> Bool
endsWith suf xs = suf == (reverse $ take (length suf) $ reverse xs) | 106 | endsWith :: Eq a => [a] -> [a] -> Bool
endsWith suf xs = suf == (reverse $ take (length suf) $ reverse xs) | 106 | endsWith suf xs = suf == (reverse $ take (length suf) $ reverse xs) | 67 | false | true | 1 | 9 | 23 | 71 | 34 | 37 | null | null |
shlevy/ghc | compiler/iface/ToIface.hs | bsd-3-clause | toIfaceJoinInfo :: Maybe JoinArity -> IfaceJoinInfo
toIfaceJoinInfo (Just ar) = IfaceJoinPoint ar | 97 | toIfaceJoinInfo :: Maybe JoinArity -> IfaceJoinInfo
toIfaceJoinInfo (Just ar) = IfaceJoinPoint ar | 97 | toIfaceJoinInfo (Just ar) = IfaceJoinPoint ar | 45 | false | true | 0 | 9 | 11 | 35 | 15 | 20 | null | null |
mcmaniac/ghc | ghc/Main.hs | bsd-3-clause | isShowGhciUsageMode :: Mode -> Bool
isShowGhciUsageMode (Right (Left ShowGhciUsage)) = True | 91 | isShowGhciUsageMode :: Mode -> Bool
isShowGhciUsageMode (Right (Left ShowGhciUsage)) = True | 91 | isShowGhciUsageMode (Right (Left ShowGhciUsage)) = True | 55 | false | true | 0 | 11 | 10 | 36 | 16 | 20 | null | null |
mettekou/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | mulWithInf _ Infinity = Infinity | 39 | mulWithInf _ Infinity = Infinity | 39 | mulWithInf _ Infinity = Infinity | 39 | false | false | 1 | 5 | 11 | 13 | 5 | 8 | null | null |
DavidAlphaFox/darcs | containers-0.5.2.1/Darcs/Data/Map/Base.hs | gpl-2.0 | foldlFB :: (a -> k -> b -> a) -> a -> Map k b -> a
foldlFB = foldlWithKey | 73 | foldlFB :: (a -> k -> b -> a) -> a -> Map k b -> a
foldlFB = foldlWithKey | 73 | foldlFB = foldlWithKey | 22 | false | true | 0 | 10 | 19 | 50 | 23 | 27 | null | null |
vikraman/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprParendType ArrowT = parens (text "->") | 54 | pprParendType ArrowT = parens (text "->") | 54 | pprParendType ArrowT = parens (text "->") | 54 | false | false | 0 | 7 | 18 | 18 | 8 | 10 | null | null |
AKST/lisp.hs | src/Lisp/Spefication.hs | mit | boolError = Err "Expected boolean" | 34 | boolError = Err "Expected boolean" | 34 | boolError = Err "Expected boolean" | 34 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
forste/haReFork | tools/base/tests/HaskellLibraries/PreludeList.hs | bsd-3-clause | ipWith3 :: (a->b->c->d) -> [a]->[b]->[c]->[d]
zipWith3 z (a:as) (b:bs) (c:cs)
= z a b c : zipWith3 z as bs cs
| 136 | zipWith3 :: (a->b->c->d) -> [a]->[b]->[c]->[d]
zipWith3 z (a:as) (b:bs) (c:cs)
= z a b c : zipWith3 z as bs cs | 136 | zipWith3 z (a:as) (b:bs) (c:cs)
= z a b c : zipWith3 z as bs cs | 81 | false | true | 0 | 9 | 47 | 105 | 55 | 50 | null | null |
nomeata/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do
ChildCode64 code1 r1lo <- iselExpr64 e1
ChildCode64 code2 r2lo <- iselExpr64 e2
(rlo,rhi) <- getNewRegPairNat II32
let
r1hi = getHiVRegFromLo r1lo
r2hi = getHiVRegFromLo r2lo
code = code1 `appOL`
code2 `appOL`
... | 575 | iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do
ChildCode64 code1 r1lo <- iselExpr64 e1
ChildCode64 code2 r2lo <- iselExpr64 e2
(rlo,rhi) <- getNewRegPairNat II32
let
r1hi = getHiVRegFromLo r1lo
r2hi = getHiVRegFromLo r2lo
code = code1 `appOL`
code2 `appOL`
... | 575 | iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do
ChildCode64 code1 r1lo <- iselExpr64 e1
ChildCode64 code2 r2lo <- iselExpr64 e2
(rlo,rhi) <- getNewRegPairNat II32
let
r1hi = getHiVRegFromLo r1lo
r2hi = getHiVRegFromLo r2lo
code = code1 `appOL`
code2 `appOL`
... | 575 | false | false | 0 | 15 | 209 | 217 | 106 | 111 | null | null |
zsedem/gitcommander | modules/Control/Lens.hs | mit | suffixLenses :: TH.Name -> TH.DecsQ
suffixLenses = makeLensesWith $
lensRules & lensField .~ (\_ _ name -> [TopName $ TH.mkName $ TH.nameBase name ++ "L"]) | 157 | suffixLenses :: TH.Name -> TH.DecsQ
suffixLenses = makeLensesWith $
lensRules & lensField .~ (\_ _ name -> [TopName $ TH.mkName $ TH.nameBase name ++ "L"]) | 157 | suffixLenses = makeLensesWith $
lensRules & lensField .~ (\_ _ name -> [TopName $ TH.mkName $ TH.nameBase name ++ "L"]) | 121 | false | true | 0 | 12 | 26 | 65 | 34 | 31 | null | null |
amccausl/Swish | Swish/HaskellRDF/N3FormatterTest.hs | lgpl-2.1 | exoticN3Graph_x6 =
commonPrefixes ++
" base1:s1 :- (base1:o1 base2:o2 base3:o3 \"l1\") .\n" | 101 | exoticN3Graph_x6 =
commonPrefixes ++
" base1:s1 :- (base1:o1 base2:o2 base3:o3 \"l1\") .\n" | 101 | exoticN3Graph_x6 =
commonPrefixes ++
" base1:s1 :- (base1:o1 base2:o2 base3:o3 \"l1\") .\n" | 101 | false | false | 0 | 5 | 21 | 10 | 5 | 5 | null | null |
leshchevds/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pIAllocatorMode :: Field
pIAllocatorMode =
withDoc "IAllocator test mode" .
renameField "IAllocatorMode" $
simpleField "mode" [t| IAllocatorMode |] | 153 | pIAllocatorMode :: Field
pIAllocatorMode =
withDoc "IAllocator test mode" .
renameField "IAllocatorMode" $
simpleField "mode" [t| IAllocatorMode |] | 153 | pIAllocatorMode =
withDoc "IAllocator test mode" .
renameField "IAllocatorMode" $
simpleField "mode" [t| IAllocatorMode |] | 128 | false | true | 0 | 6 | 23 | 42 | 19 | 23 | null | null |
BenedictEggers/calculusbot | src/Calculusbot/Unparse.hs | gpl-3.0 | unparseun Sin = "sin" | 21 | unparseun Sin = "sin" | 21 | unparseun Sin = "sin" | 21 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
dmbarbour/Sirea | src/Sirea/BDeep.hs | bsd-3-clause | bonssff = bons . bonsff | 23 | bonssff = bons . bonsff | 23 | bonssff = bons . bonsff | 23 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
solvery/lang-features | haskell/function_6.hs | gpl-2.0 | zip' [] _ = [] | 14 | zip' [] _ = [] | 14 | zip' [] _ = [] | 14 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
kustomzone/plush | src/Plush/Run/Posix/IO.hs | apache-2.0 | setCloseOnExec :: Fd -> IO ()
setCloseOnExec fd = P.setFdOption fd P.CloseOnExec True | 85 | setCloseOnExec :: Fd -> IO ()
setCloseOnExec fd = P.setFdOption fd P.CloseOnExec True | 85 | setCloseOnExec fd = P.setFdOption fd P.CloseOnExec True | 55 | false | true | 0 | 7 | 12 | 34 | 16 | 18 | null | null |
iand675/hobjc | src/Language/ObjC/Runtime.hs | bsd-3-clause | -- | Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value.
selector
:: String
-> Selector
selector str = unsafeDupablePerformIO $ withCString str sel_registerName | 236 | selector
:: String
-> Selector
selector str = unsafeDupablePerformIO $ withCString str sel_registerName | 107 | selector str = unsafeDupablePerformIO $ withCString str sel_registerName | 72 | true | true | 0 | 7 | 38 | 33 | 15 | 18 | null | null |
choener/bimaps | lib/Data/Bijection/Class.hs | bsd-3-clause | findWithDefaultR :: DomCodCnt l r => Cod r -> Bimap l r -> Dom r -> Cod r
findWithDefaultR def = (maybe def id . ) . lookupR | 124 | findWithDefaultR :: DomCodCnt l r => Cod r -> Bimap l r -> Dom r -> Cod r
findWithDefaultR def = (maybe def id . ) . lookupR | 124 | findWithDefaultR def = (maybe def id . ) . lookupR | 50 | false | true | 0 | 9 | 27 | 62 | 29 | 33 | null | null |
ababkin/partial_inspector | src/Vim/Netbeans/Protocol.hs | mit | geometryParser :: BufId -> Parser VimMessage
geometryParser bufId = do
string "geometry="
seqN <- parseNumber
char ' '
cols <- parseNumber
char ' '
rows <- parseNumber
char ' '
x <- parseNumber
char ' '
y <- parseNumber
return $ EventMessage bufId seqN $ Geometry cols rows x ... | 321 | geometryParser :: BufId -> Parser VimMessage
geometryParser bufId = do
string "geometry="
seqN <- parseNumber
char ' '
cols <- parseNumber
char ' '
rows <- parseNumber
char ' '
x <- parseNumber
char ' '
y <- parseNumber
return $ EventMessage bufId seqN $ Geometry cols rows x ... | 321 | geometryParser bufId = do
string "geometry="
seqN <- parseNumber
char ' '
cols <- parseNumber
char ' '
rows <- parseNumber
char ' '
x <- parseNumber
char ' '
y <- parseNumber
return $ EventMessage bufId seqN $ Geometry cols rows x y | 276 | false | true | 0 | 10 | 93 | 116 | 47 | 69 | null | null |
alios/lambda-devs | Data/DEVS/Simulation/Simulator.hs | bsd-3-clause | simu _ _ (Done _) = fail $ "Simulator must not receive a Done Msg" | 66 | simu _ _ (Done _) = fail $ "Simulator must not receive a Done Msg" | 66 | simu _ _ (Done _) = fail $ "Simulator must not receive a Done Msg" | 66 | false | false | 0 | 7 | 14 | 23 | 11 | 12 | null | null |
fmthoma/ghc | compiler/main/HscTypes.hs | bsd-3-clause | shadowed_by :: [Id] -> TyThing -> Bool
shadowed_by ids = shadowed
where
shadowed id = getOccName id `elemOccSet` new_occs
new_occs = mkOccSet (map getOccName ids) | 172 | shadowed_by :: [Id] -> TyThing -> Bool
shadowed_by ids = shadowed
where
shadowed id = getOccName id `elemOccSet` new_occs
new_occs = mkOccSet (map getOccName ids) | 172 | shadowed_by ids = shadowed
where
shadowed id = getOccName id `elemOccSet` new_occs
new_occs = mkOccSet (map getOccName ids) | 133 | false | true | 2 | 8 | 34 | 73 | 32 | 41 | null | null |
rodrigofegui/UnB | 2017.2/Linguagens de Programação/Trab 2_Ver 2/Tst_F6LAE.hs | gpl-3.0 | tc_25 = TestCase (assertEqual "int: (*x -> x + 1) 51" ret_25 (inter ava_23)) | 76 | tc_25 = TestCase (assertEqual "int: (*x -> x + 1) 51" ret_25 (inter ava_23)) | 76 | tc_25 = TestCase (assertEqual "int: (*x -> x + 1) 51" ret_25 (inter ava_23)) | 76 | false | false | 1 | 9 | 13 | 29 | 12 | 17 | null | null |
nh2/darcs-fastconvert | Marks.hs | bsd-3-clause | lastMarkForBranch :: BS.ByteString -> Marks -> Maybe Int
lastMarkForBranch branchToFind marks = fst `fmap` branchEntry
where branchEntry = find isRightBranch . reverse . listMarks $ marks
isRightBranch (_, (_, branch, _)) = branch == branchToFind | 254 | lastMarkForBranch :: BS.ByteString -> Marks -> Maybe Int
lastMarkForBranch branchToFind marks = fst `fmap` branchEntry
where branchEntry = find isRightBranch . reverse . listMarks $ marks
isRightBranch (_, (_, branch, _)) = branch == branchToFind | 254 | lastMarkForBranch branchToFind marks = fst `fmap` branchEntry
where branchEntry = find isRightBranch . reverse . listMarks $ marks
isRightBranch (_, (_, branch, _)) = branch == branchToFind | 197 | false | true | 1 | 9 | 42 | 86 | 45 | 41 | null | null |
Noeda/dfterm3 | src/Dfterm3/CP437ToUnicode.hs | isc | cp437ToUnicode 154 = '\x00dc' | 29 | cp437ToUnicode 154 = '\x00dc' | 29 | cp437ToUnicode 154 = '\x00dc' | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
cchalmers/lens | src/Control/Lens/Fold.hs | bsd-3-clause | -- | Obtain 'FoldWithIndex' by lifting 'ifoldr' like function.
ifoldring :: (Indexable i p, Contravariant f, Applicative f) => ((i -> a -> f a -> f a) -> f a -> s -> f a) -> Over p f s t a b
ifoldring ifr f = coerce . ifr (\i a fa -> indexed f i a *> fa) noEffect | 263 | ifoldring :: (Indexable i p, Contravariant f, Applicative f) => ((i -> a -> f a -> f a) -> f a -> s -> f a) -> Over p f s t a b
ifoldring ifr f = coerce . ifr (\i a fa -> indexed f i a *> fa) noEffect | 200 | ifoldring ifr f = coerce . ifr (\i a fa -> indexed f i a *> fa) noEffect | 72 | true | true | 0 | 13 | 61 | 131 | 65 | 66 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Errors.hs | bsd-3-clause | errorUnboundSyms l t s m = mkErr l $ text "Symbol" <+> ticks (pp s) <+> text "appearing in type:" $+$
nest 2 (pp t) $+$
text "is unbound" <+> brackets (text "ERROR_CODE:" <+> pp m) | 283 | errorUnboundSyms l t s m = mkErr l $ text "Symbol" <+> ticks (pp s) <+> text "appearing in type:" $+$
nest 2 (pp t) $+$
text "is unbound" <+> brackets (text "ERROR_CODE:" <+> pp m) | 283 | errorUnboundSyms l t s m = mkErr l $ text "Symbol" <+> ticks (pp s) <+> text "appearing in type:" $+$
nest 2 (pp t) $+$
text "is unbound" <+> brackets (text "ERROR_CODE:" <+> pp m) | 283 | false | false | 0 | 12 | 138 | 87 | 39 | 48 | null | null |
tjhunter/karps | haskell/src/Spark/Core/Internal/LocalDataFunctions.hs | apache-2.0 | constant :: (ToSQL a, SQLTypeable a) => a -> LocalData a
constant cst =
let
sqlt = buildType
dt = unSQLType sqlt
in emptyLocalData (NodeLocalLit dt (valueToCell cst)) sqlt | 183 | constant :: (ToSQL a, SQLTypeable a) => a -> LocalData a
constant cst =
let
sqlt = buildType
dt = unSQLType sqlt
in emptyLocalData (NodeLocalLit dt (valueToCell cst)) sqlt | 183 | constant cst =
let
sqlt = buildType
dt = unSQLType sqlt
in emptyLocalData (NodeLocalLit dt (valueToCell cst)) sqlt | 126 | false | true | 0 | 9 | 40 | 79 | 37 | 42 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs | mpl-2.0 | -- | The application label.
ehapkApplicationLabel :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkApplicationLabel
= lens _ehapkApplicationLabel
(\ s a -> s{_ehapkApplicationLabel = a}) | 192 | ehapkApplicationLabel :: Lens' ExternallyHostedAPK (Maybe Text)
ehapkApplicationLabel
= lens _ehapkApplicationLabel
(\ s a -> s{_ehapkApplicationLabel = a}) | 164 | ehapkApplicationLabel
= lens _ehapkApplicationLabel
(\ s a -> s{_ehapkApplicationLabel = a}) | 100 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
nikhilunni/HaskellBoy | src/Cartridge.hs | gpl-2.0 | storeCartridge :: [Word8] -> GBC ()
storeCartridge ws = do
mapM_ (\(c,i) -> writeMem i c) $ zip ws [0..] | 108 | storeCartridge :: [Word8] -> GBC ()
storeCartridge ws = do
mapM_ (\(c,i) -> writeMem i c) $ zip ws [0..] | 107 | storeCartridge ws = do
mapM_ (\(c,i) -> writeMem i c) $ zip ws [0..] | 71 | false | true | 0 | 12 | 23 | 68 | 33 | 35 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Analytics.hs | mit | (!!!) list i =
case drop i list of
[] -> Nothing
(r:_) -> Just r | 84 | (!!!) list i =
case drop i list of
[] -> Nothing
(r:_) -> Just r | 84 | (!!!) list i =
case drop i list of
[] -> Nothing
(r:_) -> Just r | 84 | false | false | 0 | 9 | 35 | 46 | 23 | 23 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCastList_QStyleOptionViewItemV2 x = qcl_QStyleOptionViewItemV2 [] x | 68 | qCastList_QStyleOptionViewItemV2 x = qcl_QStyleOptionViewItemV2 [] x | 68 | qCastList_QStyleOptionViewItemV2 x = qcl_QStyleOptionViewItemV2 [] x | 68 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
teuffy/interactive-brokers | executable/Shell.hs | bsd-3-clause | quit :: InputT IB ()
quit = lift disconnect | 43 | quit :: InputT IB ()
quit = lift disconnect | 43 | quit = lift disconnect | 22 | false | true | 0 | 6 | 8 | 21 | 10 | 11 | null | null |
achudnov/haxy | Network/HTTP/Proxy/Server.hs | bsd-3-clause | processRequest :: HStream s => Settings s -> Request s -> ProxyResponse s
processRequest settings request = do
-- modify the request
myLogInfo "Modifying the request"
modRequest <- lift $ requestModifier settings request
-- check the cache
myLogInfo "Querying cache"
mCachedResponse <- lift $ queryCache (cac... | 980 | processRequest :: HStream s => Settings s -> Request s -> ProxyResponse s
processRequest settings request = do
-- modify the request
myLogInfo "Modifying the request"
modRequest <- lift $ requestModifier settings request
-- check the cache
myLogInfo "Querying cache"
mCachedResponse <- lift $ queryCache (cac... | 980 | processRequest settings request = do
-- modify the request
myLogInfo "Modifying the request"
modRequest <- lift $ requestModifier settings request
-- check the cache
myLogInfo "Querying cache"
mCachedResponse <- lift $ queryCache (cache settings) modRequest
case mCachedResponse of
-- found in cache: r... | 906 | false | true | 0 | 17 | 219 | 207 | 88 | 119 | null | null |
alexstachnik/High-Level-C | src/Language/HLC/HighLevelC/Operators.hs | gpl-2.0 | hlcLOr :: (RHSExpression a HLCBool, RHSExpression b HLCBool) =>
a -> b -> HLC (TypedExpr HLCBool)
hlcLOr = hlcLogicOp HLCLOr | 135 | hlcLOr :: (RHSExpression a HLCBool, RHSExpression b HLCBool) =>
a -> b -> HLC (TypedExpr HLCBool)
hlcLOr = hlcLogicOp HLCLOr | 135 | hlcLOr = hlcLogicOp HLCLOr | 26 | false | true | 0 | 11 | 30 | 55 | 26 | 29 | null | null |
rvion/lamdu | test/InferTests.hs | gpl-3.0 | applyIntToBoolFuncWithHole =
testInfer "apply" $
glob [] "IntToBoolFunc" $$ holeWithInferredType intType | 112 | applyIntToBoolFuncWithHole =
testInfer "apply" $
glob [] "IntToBoolFunc" $$ holeWithInferredType intType | 112 | applyIntToBoolFuncWithHole =
testInfer "apply" $
glob [] "IntToBoolFunc" $$ holeWithInferredType intType | 112 | false | false | 0 | 8 | 18 | 27 | 12 | 15 | null | null |
wxwxwwxxx/ghc | testsuite/tests/stranal/should_run/T10148.hs | bsd-3-clause | adjustA :: (Show a) => Int -> Array a -> Array a
adjustA i (Array t)
| i < 0 = undefined i -- not just undefined!
| otherwise = Array $ trace ("adj " ++ show t) $ t | 169 | adjustA :: (Show a) => Int -> Array a -> Array a
adjustA i (Array t)
| i < 0 = undefined i -- not just undefined!
| otherwise = Array $ trace ("adj " ++ show t) $ t | 169 | adjustA i (Array t)
| i < 0 = undefined i -- not just undefined!
| otherwise = Array $ trace ("adj " ++ show t) $ t | 119 | false | true | 1 | 10 | 44 | 88 | 42 | 46 | null | null |
snape/LooplessFunctionalAlgorithms | LooplessMixallList.hs | apache-2.0 | next rs ((x,(p,q)),r) = Just (x,(rs,consRow ((p,q),rs) r)) | 60 | next rs ((x,(p,q)),r) = Just (x,(rs,consRow ((p,q),rs) r)) | 60 | next rs ((x,(p,q)),r) = Just (x,(rs,consRow ((p,q),rs) r)) | 60 | false | false | 0 | 10 | 9 | 61 | 36 | 25 | null | null |
thomaseding/main | src/ProgramMain.hs | bsd-3-clause | stripExt :: Extension -> FilePath -> FilePath
stripExt ext file = maybe file id $ stripSuffix ext' file
where
ext' = case ext of
'.' : _ -> ext
_ -> '.' : ext | 173 | stripExt :: Extension -> FilePath -> FilePath
stripExt ext file = maybe file id $ stripSuffix ext' file
where
ext' = case ext of
'.' : _ -> ext
_ -> '.' : ext | 173 | stripExt ext file = maybe file id $ stripSuffix ext' file
where
ext' = case ext of
'.' : _ -> ext
_ -> '.' : ext | 127 | false | true | 0 | 8 | 48 | 70 | 34 | 36 | null | null |
thsutton/pheasant | lib/Logic/Pheasant.hs | bsd-3-clause | suitableRelations
:: Map RelName RelArity
-> Map RelName (RelExtent ty)
-> Maybe (Map RelName (RelExtent ty))
suitableRelations l s =
let s' = Map.mapMaybe id (Map.intersectionWithKey fn l s)
in if Map.size s == Map.size s'
then Just s'
else Nothing
where
fn :: RelName -> RelArit... | 484 | suitableRelations
:: Map RelName RelArity
-> Map RelName (RelExtent ty)
-> Maybe (Map RelName (RelExtent ty))
suitableRelations l s =
let s' = Map.mapMaybe id (Map.intersectionWithKey fn l s)
in if Map.size s == Map.size s'
then Just s'
else Nothing
where
fn :: RelName -> RelArit... | 484 | suitableRelations l s =
let s' = Map.mapMaybe id (Map.intersectionWithKey fn l s)
in if Map.size s == Map.size s'
then Just s'
else Nothing
where
fn :: RelName -> RelArity -> RelExtent ty -> Maybe (RelExtent ty)
fn k ra@(RelArity a) re@(RelExtent e) =
if (Set.singleton a) == (Set... | 362 | false | true | 0 | 12 | 124 | 218 | 104 | 114 | null | null |
yesodweb/persistent | persistent/Database/Persist/Class/PersistEntity.hs | mit | entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)
entityIdFromJSON = withObject "entityIdFromJSON" $ \o -> do
val <- parseJSON (Object o)
k <- case keyFromRecordM of
Nothing ->
o .: "id"
Just func ->
pure $ func val
pure $ ... | 332 | entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)
entityIdFromJSON = withObject "entityIdFromJSON" $ \o -> do
val <- parseJSON (Object o)
k <- case keyFromRecordM of
Nothing ->
o .: "id"
Just func ->
pure $ func val
pure $ ... | 332 | entityIdFromJSON = withObject "entityIdFromJSON" $ \o -> do
val <- parseJSON (Object o)
k <- case keyFromRecordM of
Nothing ->
o .: "id"
Just func ->
pure $ func val
pure $ Entity k val | 237 | false | true | 0 | 14 | 98 | 116 | 55 | 61 | null | null |
XinhuaZhang/PetaVisionHaskell | Classifier/LibSVM/Bindings.hs | gpl-3.0 | p'svm_parameter'nu :: Ptr (C'svm_parameter) -> Ptr (CDouble)
p'svm_parameter'p p = plusPtr p 88 | 95 | p'svm_parameter'nu :: Ptr (C'svm_parameter) -> Ptr (CDouble)
p'svm_parameter'p p = plusPtr p 88 | 95 | p'svm_parameter'p p = plusPtr p 88 | 34 | false | true | 0 | 7 | 12 | 35 | 17 | 18 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_3.hs | mit | primPlusInt (Neg x) (Pos y) = primMinusNat y x | 46 | primPlusInt (Neg x) (Pos y) = primMinusNat y x | 46 | primPlusInt (Neg x) (Pos y) = primMinusNat y x | 46 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
BeautifulDestinations/caret | lib/Caret.hs | mit | prepare :: [a->Double] -> (a -> b) -> a -> (Vector Double, b)
prepare preds out x = (predictors preds x , out x) | 112 | prepare :: [a->Double] -> (a -> b) -> a -> (Vector Double, b)
prepare preds out x = (predictors preds x , out x) | 112 | prepare preds out x = (predictors preds x , out x) | 50 | false | true | 0 | 9 | 23 | 67 | 35 | 32 | null | null |
fredmorcos/attic | snippets/haskell/signum.hs | isc | mySigNum2 x =
if x < 0 then
-1
else if x > 0 then
1
else
0 | 127 | mySigNum2 x =
if x < 0 then
-1
else if x > 0 then
1
else
0 | 127 | mySigNum2 x =
if x < 0 then
-1
else if x > 0 then
1
else
0 | 127 | false | false | 0 | 7 | 86 | 35 | 19 | 16 | null | null |
spechub/Hets | DFOL/Colimit.hs | gpl-2.0 | -- main functions
sigColimit :: Gr Sign (Int, Morphism) -> Result (Sign, Map.Map Int Morphism)
sigColimit gr =
let sigs = Graph.labNodes gr
rel = computeRel gr
(sig, maps) = addSig emptySig IntMap.empty Set.empty rel sigs
maps1 = IntMap.mapWithKey (\ i m -> let Just sig1 = Graph.lab gr i
... | 536 | sigColimit :: Gr Sign (Int, Morphism) -> Result (Sign, Map.Map Int Morphism)
sigColimit gr =
let sigs = Graph.labNodes gr
rel = computeRel gr
(sig, maps) = addSig emptySig IntMap.empty Set.empty rel sigs
maps1 = IntMap.mapWithKey (\ i m -> let Just sig1 = Graph.lab gr i
... | 518 | sigColimit gr =
let sigs = Graph.labNodes gr
rel = computeRel gr
(sig, maps) = addSig emptySig IntMap.empty Set.empty rel sigs
maps1 = IntMap.mapWithKey (\ i m -> let Just sig1 = Graph.lab gr i
in Morphism sig1 sig m
)
... | 441 | true | true | 0 | 17 | 211 | 182 | 90 | 92 | null | null |
brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/BigtableAdmin/Types/Product.hs | mpl-2.0 | -- | The column families configured for this table, mapped by column family
-- ID. Views: \`SCHEMA_VIEW\`, \`FULL\`
tColumnFamilies :: Lens' Table (Maybe TableColumnFamilies)
tColumnFamilies
= lens _tColumnFamilies
(\ s a -> s{_tColumnFamilies = a}) | 257 | tColumnFamilies :: Lens' Table (Maybe TableColumnFamilies)
tColumnFamilies
= lens _tColumnFamilies
(\ s a -> s{_tColumnFamilies = a}) | 141 | tColumnFamilies
= lens _tColumnFamilies
(\ s a -> s{_tColumnFamilies = a}) | 82 | true | true | 0 | 9 | 42 | 49 | 26 | 23 | null | null |
wiryls/HomeworkCollectionOfMYLS | 2018.ProjectV/src/IAFinance/Server/Internal/Knowledge.hs | mit | getStockNewsByName :: (Has EnvConfig env, Has EnvLogger env,
Has EnvNetwork env, MonadReader env m, MonadIO m)
=> Text -> m Answer
getStockNewsByName src = stock src >>= \list ->
let msgErr = "很抱歉,出现了一点问题,暂时无法使用这个功能。"
msgNone = "对不起,没有查找到" <> src <> "的相关信息。"
... | 1,300 | getStockNewsByName :: (Has EnvConfig env, Has EnvLogger env,
Has EnvNetwork env, MonadReader env m, MonadIO m)
=> Text -> m Answer
getStockNewsByName src = stock src >>= \list ->
let msgErr = "很抱歉,出现了一点问题,暂时无法使用这个功能。"
msgNone = "对不起,没有查找到" <> src <> "的相关信息。"
... | 1,300 | getStockNewsByName src = stock src >>= \list ->
let msgErr = "很抱歉,出现了一点问题,暂时无法使用这个功能。"
msgNone = "对不起,没有查找到" <> src <> "的相关信息。"
msgOne = \m -> "为您找到" <> src <> "的相关咨询:" <> m
msgSome = \m -> "搜索到相关企业:" <> m <> "。请问您需要查询哪一个?"
msgMany = \m -> "搜索" <> src <> "得到:" <> m <> "等过多相似结果,请尝试使... | 1,127 | false | true | 0 | 26 | 459 | 448 | 222 | 226 | null | null |
mainland/nikola | src/Data/Array/Nikola/Language/Optimize/Simpl.hs | bsd-3-clause | equalTo (Word16C n1) n2 = n1 == fromIntegral n2 | 47 | equalTo (Word16C n1) n2 = n1 == fromIntegral n2 | 47 | equalTo (Word16C n1) n2 = n1 == fromIntegral n2 | 47 | false | false | 2 | 6 | 8 | 29 | 11 | 18 | null | null |
brendanhay/gogol | gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs | mpl-2.0 | -- | Custom encryption configuration (e.g., Cloud KMS keys).
jcqDestinationEncryptionConfiguration :: Lens' JobConfigurationQuery (Maybe EncryptionConfiguration)
jcqDestinationEncryptionConfiguration
= lens _jcqDestinationEncryptionConfiguration
(\ s a ->
s{_jcqDestinationEncryptionConfiguration = a}) | 319 | jcqDestinationEncryptionConfiguration :: Lens' JobConfigurationQuery (Maybe EncryptionConfiguration)
jcqDestinationEncryptionConfiguration
= lens _jcqDestinationEncryptionConfiguration
(\ s a ->
s{_jcqDestinationEncryptionConfiguration = a}) | 258 | jcqDestinationEncryptionConfiguration
= lens _jcqDestinationEncryptionConfiguration
(\ s a ->
s{_jcqDestinationEncryptionConfiguration = a}) | 157 | true | true | 0 | 9 | 42 | 48 | 25 | 23 | null | null |
lpsmith/modern-syslog | src/System/Syslog/Transport/Unix/Internal.hs | bsd-3-clause | sWriteOnce :: Socket -> ByteString -> IO Int
sWriteOnce s (PS fp off len) =
withForeignPtr fp $ \ ptr ->
sendBuf s (ptr `plusPtr` off) len | 150 | sWriteOnce :: Socket -> ByteString -> IO Int
sWriteOnce s (PS fp off len) =
withForeignPtr fp $ \ ptr ->
sendBuf s (ptr `plusPtr` off) len | 150 | sWriteOnce s (PS fp off len) =
withForeignPtr fp $ \ ptr ->
sendBuf s (ptr `plusPtr` off) len | 105 | false | true | 0 | 9 | 38 | 69 | 34 | 35 | null | null |
apoorvingle/h-reversi | src/Game/Grid.hs | mit | getFirstSameDisc :: Cord -> Direction -> Map Cord Disc -> Disc -> Maybe (Cord, Disc)
getFirstSameDisc pos dir board turn = collapse $ head z
where
-- get the series of all the coordinates in the given direction
l = line pos dir
md = (flip Map.lookup board =<<) <$> l
z = dropWhile (\(a,b) -> (b == (Ju... | 371 | getFirstSameDisc :: Cord -> Direction -> Map Cord Disc -> Disc -> Maybe (Cord, Disc)
getFirstSameDisc pos dir board turn = collapse $ head z
where
-- get the series of all the coordinates in the given direction
l = line pos dir
md = (flip Map.lookup board =<<) <$> l
z = dropWhile (\(a,b) -> (b == (Ju... | 371 | getFirstSameDisc pos dir board turn = collapse $ head z
where
-- get the series of all the coordinates in the given direction
l = line pos dir
md = (flip Map.lookup board =<<) <$> l
z = dropWhile (\(a,b) -> (b == (Just $ swap turn)))
$ safeTail
$ zip l md | 286 | false | true | 7 | 11 | 98 | 161 | 75 | 86 | null | null |
kazu-yamamoto/domain-auth | Network/DomainAuth/PRD/PRD.hs | bsd-3-clause | pushResentSender ctx (Just dom)
| praResentFrom ctx == DST_Zero = ctx { praResentSender = rsender }
| isFirstBlock (praHeader ctx) = ctx { praResentSender = DST_Valid dom }
| otherwise = ctx { praResentSender = DST_Invalid }
where
rsender = case praResentSender ctx of
DST_... | 414 | pushResentSender ctx (Just dom)
| praResentFrom ctx == DST_Zero = ctx { praResentSender = rsender }
| isFirstBlock (praHeader ctx) = ctx { praResentSender = DST_Valid dom }
| otherwise = ctx { praResentSender = DST_Invalid }
where
rsender = case praResentSender ctx of
DST_... | 414 | pushResentSender ctx (Just dom)
| praResentFrom ctx == DST_Zero = ctx { praResentSender = rsender }
| isFirstBlock (praHeader ctx) = ctx { praResentSender = DST_Valid dom }
| otherwise = ctx { praResentSender = DST_Invalid }
where
rsender = case praResentSender ctx of
DST_... | 414 | false | false | 0 | 10 | 121 | 126 | 60 | 66 | null | null |
forste/haReFork | refactorer/RefacDupTrans.hs | bsd-3-clause | createAbs'' (x:y:xs)
= createAbs'' ((compareExp [] x y):xs) | 60 | createAbs'' (x:y:xs)
= createAbs'' ((compareExp [] x y):xs) | 60 | createAbs'' (x:y:xs)
= createAbs'' ((compareExp [] x y):xs) | 60 | false | false | 0 | 9 | 8 | 43 | 21 | 22 | null | null |
medik/lang-hack | Haskell/logical-gates.hs | gpl-3.0 | not' :: Binary -> Binary
not' One = Zero | 40 | not' :: Binary -> Binary
not' One = Zero | 40 | not' One = Zero | 15 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
dmjio/aeson | src/Data/Aeson/TH.hs | bsd-3-clause | mkToJSONCommon :: JSONClass -- ^ Which class's method is being derived.
-> Options -- ^ Encoding options.
-> Name -- ^ Name of the encoded type.
-> Q Exp
mkToJSONCommon = mkFunCommon (\jc _ -> consToValue Value jc) | 259 | mkToJSONCommon :: JSONClass -- ^ Which class's method is being derived.
-> Options -- ^ Encoding options.
-> Name -- ^ Name of the encoded type.
-> Q Exp
mkToJSONCommon = mkFunCommon (\jc _ -> consToValue Value jc) | 259 | mkToJSONCommon = mkFunCommon (\jc _ -> consToValue Value jc) | 60 | false | true | 0 | 8 | 82 | 47 | 25 | 22 | null | null |
glutamate/vishnu | Vishnu/Lib/Repo.hs | bsd-3-clause | pushPending :: String -> VisM Bool
pushPending s = do
liftIO $ gotoHomeSubDir s
gitStat <- fmap lines $ sh "git status"
return $ any ("Your branch is ahead" `isInfixOf`) gitStat | 183 | pushPending :: String -> VisM Bool
pushPending s = do
liftIO $ gotoHomeSubDir s
gitStat <- fmap lines $ sh "git status"
return $ any ("Your branch is ahead" `isInfixOf`) gitStat | 183 | pushPending s = do
liftIO $ gotoHomeSubDir s
gitStat <- fmap lines $ sh "git status"
return $ any ("Your branch is ahead" `isInfixOf`) gitStat | 148 | false | true | 0 | 9 | 36 | 66 | 31 | 35 | null | null |
olsner/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | showParen_Expr
:: LHsExpr RdrName -> LHsExpr RdrName
-> LHsExpr RdrName
showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 | 159 | showParen_Expr
:: LHsExpr RdrName -> LHsExpr RdrName
-> LHsExpr RdrName
showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 | 158 | showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 | 70 | false | true | 0 | 9 | 36 | 52 | 24 | 28 | null | null |
dan-t/layers | src/FileData/Data2.hs | bsd-3-clause | dataVersion :: Int
dataVersion = 2 | 34 | dataVersion :: Int
dataVersion = 2 | 34 | dataVersion = 2 | 15 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects ReadByteArrayOp_Int64 = True | 49 | primOpHasSideEffects ReadByteArrayOp_Int64 = True | 49 | primOpHasSideEffects ReadByteArrayOp_Int64 = True | 49 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
david-caro/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | err id code str = addComment $ makeComment ErrorC id code str | 63 | err id code str = addComment $ makeComment ErrorC id code str | 63 | err id code str = addComment $ makeComment ErrorC id code str | 63 | false | false | 0 | 6 | 13 | 26 | 12 | 14 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_PARAMETER_BUFFER_BINDING_ARB :: GLenum
gl_PARAMETER_BUFFER_BINDING_ARB = 0x80EF | 82 | gl_PARAMETER_BUFFER_BINDING_ARB :: GLenum
gl_PARAMETER_BUFFER_BINDING_ARB = 0x80EF | 82 | gl_PARAMETER_BUFFER_BINDING_ARB = 0x80EF | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ejlilley/AbstractMusic | Music.hs | gpl-3.0 | faInt Min Seventh = (faInt Maj Sixth) + (faInt Min Second) | 58 | faInt Min Seventh = (faInt Maj Sixth) + (faInt Min Second) | 58 | faInt Min Seventh = (faInt Maj Sixth) + (faInt Min Second) | 58 | false | false | 1 | 8 | 10 | 36 | 15 | 21 | null | null |
brendanhay/gogol | gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/ListByUser.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
blbuUploadProtocol :: Lens' BlogsListByUser (Maybe Text)
blbuUploadProtocol
= lens _blbuUploadProtocol
(\ s a -> s{_blbuUploadProtocol = a}) | 210 | blbuUploadProtocol :: Lens' BlogsListByUser (Maybe Text)
blbuUploadProtocol
= lens _blbuUploadProtocol
(\ s a -> s{_blbuUploadProtocol = a}) | 148 | blbuUploadProtocol
= lens _blbuUploadProtocol
(\ s a -> s{_blbuUploadProtocol = a}) | 91 | true | true | 1 | 9 | 33 | 52 | 25 | 27 | null | null |
ezyang/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | liftedTypeKindTyCon, starKindTyCon, unicodeStarKindTyCon :: TyCon
-- Type synonyms; see Note [TYPE and RuntimeRep] in TysPrim
-- type Type = tYPE 'LiftedRep
-- type * = tYPE 'LiftedRep
-- type * = tYPE 'LiftedRep -- Unicode variant
liftedTypeKindTyCon = buildSynTyCon liftedTypeKindTyConName
... | 420 | liftedTypeKindTyCon, starKindTyCon, unicodeStarKindTyCon :: TyCon
liftedTypeKindTyCon = buildSynTyCon liftedTypeKindTyConName
[] liftedTypeKind []
(tYPE liftedRepTy) | 245 | liftedTypeKindTyCon = buildSynTyCon liftedTypeKindTyConName
[] liftedTypeKind []
(tYPE liftedRepTy) | 179 | true | true | 0 | 7 | 133 | 40 | 24 | 16 | null | null |
yihuang/xml2json | Text/XML/ToJSON.hs | bsd-3-clause | -- |Convert xml `Element' to aeson `Value' .
--
-- xml attributes and text values are converted to special object attribute @__attributes@ and @__values@.
elementToJSON :: Element -> Value
elementToJSON (Element as vs cs) =
if null as && null cs
then
String (T.concat vs)
else
Object $ HM... | 1,005 | elementToJSON :: Element -> Value
elementToJSON (Element as vs cs) =
if null as && null cs
then
String (T.concat vs)
else
Object $ HM.fromListWith mergeObject
$ attrs
++ values
++ map (second elementToJSON) cs
where
attrs = if ... | 850 | elementToJSON (Element as vs cs) =
if null as && null cs
then
String (T.concat vs)
else
Object $ HM.fromListWith mergeObject
$ attrs
++ values
++ map (second elementToJSON) cs
where
attrs = if null as
then []
... | 816 | true | true | 10 | 15 | 319 | 288 | 150 | 138 | null | null |
timerooney/cis194 | .stack-work/dist/x86_64-windows/Cabal-1.22.4.0/build/autogen/Paths_cis194.hs | bsd-3-clause | libexecdir = "D:\\Development\\Learning\\Haskell\\cis194\\.stack-work\\install\\x86_64-windows\\lts-3.5\\7.10.2\\libexec" | 121 | libexecdir = "D:\\Development\\Learning\\Haskell\\cis194\\.stack-work\\install\\x86_64-windows\\lts-3.5\\7.10.2\\libexec" | 121 | libexecdir = "D:\\Development\\Learning\\Haskell\\cis194\\.stack-work\\install\\x86_64-windows\\lts-3.5\\7.10.2\\libexec" | 121 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
alokpndy/haskell-learn | src/dataScience/Graph.hs | mit | main = addExtension (runGraphviz graphDot) Png "graphDot" | 57 | main = addExtension (runGraphviz graphDot) Png "graphDot" | 57 | main = addExtension (runGraphviz graphDot) Png "graphDot" | 57 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
bbshortcut/Palace | src/CardDB.hs | gpl-3.0 | randomCards :: IO [Card]
randomCards = do
cards <- cards
gen <- newStdGen
return $ unsort gen cards | 107 | randomCards :: IO [Card]
randomCards = do
cards <- cards
gen <- newStdGen
return $ unsort gen cards | 107 | randomCards = do
cards <- cards
gen <- newStdGen
return $ unsort gen cards | 82 | false | true | 0 | 8 | 25 | 43 | 20 | 23 | null | null |
dillonhuff/IntLang | src/Lexer.hs | bsd-3-clause | dname str = Name str dummyPos | 29 | dname str = Name str dummyPos | 29 | dname str = Name str dummyPos | 29 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
kmels/hledger | hledger-lib/Hledger/Read/JournalReader.hs | gpl-3.0 | secondarydatep :: Stream [Char] m Char => Day -> ParsecT [Char] JournalContext m Day
secondarydatep primarydate = do
char '='
-- kludgy way to use primary date for default year
let withDefaultYear d p = do
y <- getYear
let (y',_,_) = toGregorian d in setYear y'
r <- p
when (isJust ... | 422 | secondarydatep :: Stream [Char] m Char => Day -> ParsecT [Char] JournalContext m Day
secondarydatep primarydate = do
char '='
-- kludgy way to use primary date for default year
let withDefaultYear d p = do
y <- getYear
let (y',_,_) = toGregorian d in setYear y'
r <- p
when (isJust ... | 422 | secondarydatep primarydate = do
char '='
-- kludgy way to use primary date for default year
let withDefaultYear d p = do
y <- getYear
let (y',_,_) = toGregorian d in setYear y'
r <- p
when (isJust y) $ setYear $ fromJust y
return r
edate <- withDefaultYear primarydate dat... | 337 | false | true | 1 | 16 | 116 | 156 | 70 | 86 | null | null |
olsner/ghc | testsuite/tests/monadfail/MonadFailWarningsDisabled.hs | bsd-3-clause | tuple = do
(a,b) <- undefined
undefined | 47 | tuple = do
(a,b) <- undefined
undefined | 47 | tuple = do
(a,b) <- undefined
undefined | 47 | false | false | 0 | 8 | 14 | 22 | 11 | 11 | null | null |
DaMSL/K3 | src/Language/K3/Interpreter/Utils.hs | apache-2.0 | prettyIEnvEntry :: PrintConfig -> IEnvEntry Value -> EngineM Value String
prettyIEnvEntry pc (IVal v) = return $ prettyPC pc v | 127 | prettyIEnvEntry :: PrintConfig -> IEnvEntry Value -> EngineM Value String
prettyIEnvEntry pc (IVal v) = return $ prettyPC pc v | 127 | prettyIEnvEntry pc (IVal v) = return $ prettyPC pc v | 53 | false | true | 0 | 7 | 20 | 52 | 23 | 29 | null | null |
oldmanmike/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | hasTyVarHead :: Type -> Bool
-- Returns true of (a t1 .. tn), where 'a' is a type variable
hasTyVarHead ty -- Haskell 98 allows predicates of form
| tcIsTyVarTy ty = True -- C (a ty1 .. tyn)
| otherwise -- where a is a type variable
= case tcSplitAppTy_maybe ty of
... | 383 | hasTyVarHead :: Type -> Bool
hasTyVarHead ty -- Haskell 98 allows predicates of form
| tcIsTyVarTy ty = True -- C (a ty1 .. tyn)
| otherwise -- where a is a type variable
= case tcSplitAppTy_maybe ty of
Just (ty, _) -> hasTyVarHead ty
Nothing -> Fals... | 321 | hasTyVarHead ty -- Haskell 98 allows predicates of form
| tcIsTyVarTy ty = True -- C (a ty1 .. tyn)
| otherwise -- where a is a type variable
= case tcSplitAppTy_maybe ty of
Just (ty, _) -> hasTyVarHead ty
Nothing -> False | 292 | true | true | 0 | 10 | 131 | 79 | 37 | 42 | null | null |
nushio3/ghc | compiler/typecheck/FamInst.hs | bsd-3-clause | bareTvInRHSViolated _ _ = [] | 28 | bareTvInRHSViolated _ _ = [] | 28 | bareTvInRHSViolated _ _ = [] | 28 | false | false | 0 | 5 | 4 | 13 | 6 | 7 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.