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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arekfu/markov-chains | src/MarkovChain.hs | mit | actWhileM :: Monad m => a -> (a -> m (Maybe a)) -> m [a]
actWhileM initialState act = do
newState <- act initialState
case newState of
Nothing -> return []
Just s -> do
rest <- actWhileM s act
return (s:rest)
-- | Take steps until we hit absorption | 286 | actWhileM :: Monad m => a -> (a -> m (Maybe a)) -> m [a]
actWhileM initialState act = do
newState <- act initialState
case newState of
Nothing -> return []
Just s -> do
rest <- actWhileM s act
return (s:rest)
-- | Take steps until we hit absorption | 286 | actWhileM initialState act = do
newState <- act initialState
case newState of
Nothing -> return []
Just s -> do
rest <- actWhileM s act
return (s:rest)
-- | Take steps until we hit absorption | 229 | false | true | 0 | 14 | 87 | 116 | 54 | 62 | null | null |
garetxe/cabal | cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | bsd-3-clause | processPackageConstraintF :: Flag
-> ConflictSet QPN
-> Bool
-> LabeledPackageConstraint
-> Tree a
-> Tree a
processPackageConstraintF f c b' (LabeledPackageConstraint pc src) r = go pc
wh... | 828 | processPackageConstraintF :: Flag
-> ConflictSet QPN
-> Bool
-> LabeledPackageConstraint
-> Tree a
-> Tree a
processPackageConstraintF f c b' (LabeledPackageConstraint pc src) r = go pc
wh... | 828 | processPackageConstraintF f c b' (LabeledPackageConstraint pc src) r = go pc
where
go (PackageConstraintFlags _ fa) =
case L.lookup f fa of
Nothing -> r
Just b | b == b' -> r
| otherwise -> Fail c (GlobalConstraintFlag src)
go _ ... | 589 | false | true | 0 | 11 | 329 | 149 | 71 | 78 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Transit time range (min-max) in business days. 0 means same day
-- delivery, 1 means next day delivery.
ttttrttvMinTransitTimeInDays :: Lens' TransitTableTransitTimeRowTransitTimeValue (Maybe Word32)
ttttrttvMinTransitTimeInDays
= lens _ttttrttvMinTransitTimeInDays
(\ s a -> s{_ttttrttvMinTransitTimeInDays... | 350 | ttttrttvMinTransitTimeInDays :: Lens' TransitTableTransitTimeRowTransitTimeValue (Maybe Word32)
ttttrttvMinTransitTimeInDays
= lens _ttttrttvMinTransitTimeInDays
(\ s a -> s{_ttttrttvMinTransitTimeInDays = a})
. mapping _Coerce | 241 | ttttrttvMinTransitTimeInDays
= lens _ttttrttvMinTransitTimeInDays
(\ s a -> s{_ttttrttvMinTransitTimeInDays = a})
. mapping _Coerce | 145 | true | true | 0 | 10 | 53 | 56 | 29 | 27 | null | null |
taktoa/ThermoCalc | src/System.hs | gpl-3.0 | getMaxCOP :: System -> DimlessDouble
getMaxCOP = copMax | 55 | getMaxCOP :: System -> DimlessDouble
getMaxCOP = copMax | 55 | getMaxCOP = copMax | 18 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
ribag/ganeti-experiments | src/Ganeti/Constants.hs | gpl-2.0 | sshsSshHostKey :: String
sshsSshHostKey = "ssh_host_key" | 56 | sshsSshHostKey :: String
sshsSshHostKey = "ssh_host_key" | 56 | sshsSshHostKey = "ssh_host_key" | 31 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
pharpend/eros | src/Text/Eros/Phrase.hs | bsd-3-clause | -- |The 'score' of the 'PhraseTree' is the sum of the 'score's of its 'Node's.
treeScore :: PhraseTree -> Int
treeScore = sum . map score . flatten | 147 | treeScore :: PhraseTree -> Int
treeScore = sum . map score . flatten | 68 | treeScore = sum . map score . flatten | 37 | true | true | 0 | 7 | 27 | 34 | 15 | 19 | null | null |
sdiehl/ghc | compiler/GHC/Hs/Utils.hs | bsd-3-clause | collectPatsBinders :: [LPat (GhcPass p)] -> [IdP (GhcPass p)]
collectPatsBinders pats = foldr collect_lpat [] pats | 114 | collectPatsBinders :: [LPat (GhcPass p)] -> [IdP (GhcPass p)]
collectPatsBinders pats = foldr collect_lpat [] pats | 114 | collectPatsBinders pats = foldr collect_lpat [] pats | 52 | false | true | 0 | 9 | 15 | 51 | 25 | 26 | null | null |
nadavshemer/buildsome | src/Lib/Printer.hs | gpl-2.0 | ignoreResourceVanished :: IO () -> IO ()
ignoreResourceVanished act = do
res <- E.try act
case res of
Right x -> return x
Left e@(G.IOError { G.ioe_type = t }) ->
unless (t == G.ResourceVanished) $ E.throwIO e | 227 | ignoreResourceVanished :: IO () -> IO ()
ignoreResourceVanished act = do
res <- E.try act
case res of
Right x -> return x
Left e@(G.IOError { G.ioe_type = t }) ->
unless (t == G.ResourceVanished) $ E.throwIO e | 227 | ignoreResourceVanished act = do
res <- E.try act
case res of
Right x -> return x
Left e@(G.IOError { G.ioe_type = t }) ->
unless (t == G.ResourceVanished) $ E.throwIO e | 186 | false | true | 0 | 16 | 55 | 113 | 52 | 61 | null | null |
rueshyna/gogol | gogol-firebase-dynamiclinks/gen/Network/Google/FirebaseDynamicLinks/Types/Product.hs | mpl-2.0 | -- | Campaign name; used for keyword analysis to identify a specific product
-- promotion or strategic campaign.
gpaUtmCampaign :: Lens' GooglePlayAnalytics (Maybe Text)
gpaUtmCampaign
= lens _gpaUtmCampaign
(\ s a -> s{_gpaUtmCampaign = a}) | 249 | gpaUtmCampaign :: Lens' GooglePlayAnalytics (Maybe Text)
gpaUtmCampaign
= lens _gpaUtmCampaign
(\ s a -> s{_gpaUtmCampaign = a}) | 136 | gpaUtmCampaign
= lens _gpaUtmCampaign
(\ s a -> s{_gpaUtmCampaign = a}) | 79 | true | true | 0 | 8 | 42 | 50 | 26 | 24 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M03/D20/Solution.hs | mit | cpsb _ [] = [] | 51 | cpsb _ [] = [] | 51 | cpsb _ [] = [] | 51 | false | false | 0 | 6 | 41 | 15 | 7 | 8 | null | null |
lowasser/TrieMap | Data/TrieMap/Utils.hs | bsd-3-clause | unstreamM :: (Vector v a, PrimMonad m) => MStream m a -> m (v a)
unstreamM strm = munstream strm >>= unsafeFreeze | 113 | unstreamM :: (Vector v a, PrimMonad m) => MStream m a -> m (v a)
unstreamM strm = munstream strm >>= unsafeFreeze | 113 | unstreamM strm = munstream strm >>= unsafeFreeze | 48 | false | true | 0 | 10 | 21 | 60 | 28 | 32 | null | null |
blast-hardcheese/git-dag-graph | src/Graph.hs | mit | fromTreeEntry :: GitTreeEntry -> DotNode String
fromTreeEntry (GitTreeEntry _ o@(GitBlobObject h _) name) = objectToNode Box3D name o | 133 | fromTreeEntry :: GitTreeEntry -> DotNode String
fromTreeEntry (GitTreeEntry _ o@(GitBlobObject h _) name) = objectToNode Box3D name o | 133 | fromTreeEntry (GitTreeEntry _ o@(GitBlobObject h _) name) = objectToNode Box3D name o | 85 | false | true | 0 | 10 | 17 | 49 | 24 | 25 | null | null |
tobiasreinhardt/show | CLIArguments/src/Query.hs | apache-2.0 | isOptionFlagged x (OnlyOption y:ys) = x == y || isOptionFlagged x ys | 68 | isOptionFlagged x (OnlyOption y:ys) = x == y || isOptionFlagged x ys | 68 | isOptionFlagged x (OnlyOption y:ys) = x == y || isOptionFlagged x ys | 68 | false | false | 0 | 8 | 11 | 34 | 16 | 18 | null | null |
carlohamalainen/imagetrove-uploader | src/Data/Dicom.hs | bsd-2-clause | readSeriesDesc :: FilePath -> IO String
readSeriesDesc f = do
{-
x <- runShellCommand (dropFileName f) "dcmdump" ["-s", "+P", "0020,000e", f]
case x of
Left e -> throwM $ ShellError e
Right x' -> case (unescapeEntities <$> parseSingleMatch pSeriesInstanceUID x') of
... | 1,862 | readSeriesDesc :: FilePath -> IO String
readSeriesDesc f = do
{-
x <- runShellCommand (dropFileName f) "dcmdump" ["-s", "+P", "0020,000e", f]
case x of
Left e -> throwM $ ShellError e
Right x' -> case (unescapeEntities <$> parseSingleMatch pSeriesInstanceUID x') of
... | 1,862 | readSeriesDesc f = do
{-
x <- runShellCommand (dropFileName f) "dcmdump" ["-s", "+P", "0020,000e", f]
case x of
Left e -> throwM $ ShellError e
Right x' -> case (unescapeEntities <$> parseSingleMatch pSeriesInstanceUID x') of
Nothing -> throwM $ DicomMissin... | 1,822 | false | true | 0 | 17 | 763 | 140 | 66 | 74 | null | null |
wereHamster/yag | Git/Command/Status.hs | unlicense | run :: [String] -> IO ()
run args = return () | 45 | run :: [String] -> IO ()
run args = return () | 45 | run args = return () | 20 | false | true | 0 | 7 | 10 | 34 | 16 | 18 | null | null |
nevrenato/HetsAlloy | Syntax/Parse_AS_Structured.hs | gpl-2.0 | parseItemsMap :: AnyLogic -> AParser st (G_symb_map_items_list, [Token])
parseItemsMap (Logic lid) = do
(cs, ps) <- callSymParser False (parse_symb_map_items lid)
(language_name lid) " maps"
return (G_symb_map_items_list lid cs, ps) | 262 | parseItemsMap :: AnyLogic -> AParser st (G_symb_map_items_list, [Token])
parseItemsMap (Logic lid) = do
(cs, ps) <- callSymParser False (parse_symb_map_items lid)
(language_name lid) " maps"
return (G_symb_map_items_list lid cs, ps) | 262 | parseItemsMap (Logic lid) = do
(cs, ps) <- callSymParser False (parse_symb_map_items lid)
(language_name lid) " maps"
return (G_symb_map_items_list lid cs, ps) | 189 | false | true | 0 | 10 | 58 | 89 | 45 | 44 | null | null |
glutamate/probably-baysig | src/Math/Probably/Utils.hs | bsd-3-clause | - | A target augmented by momentum auxilliary variables.
auxilliaryTarget :: (ContinuousParams -> Double) -> Particle -> Double
auxilliaryTarget lTarget (t, r) =
lTarget t - 0.5 * innerProduct r r
| 199 | auxilliaryTarget :: (ContinuousParams -> Double) -> Particle -> Double
auxilliaryTarget lTarget (t, r) =
lTarget t - 0.5 * innerProduct r r | 141 | auxilliaryTarget lTarget (t, r) =
lTarget t - 0.5 * innerProduct r r | 70 | true | true | 2 | 9 | 33 | 77 | 38 | 39 | null | null |
bigsleep/Wf | src/Wf/Web/Routing.hs | mit | matchRouteMethod (RouteMethodOneOf as) b = b `elem` as | 54 | matchRouteMethod (RouteMethodOneOf as) b = b `elem` as | 54 | matchRouteMethod (RouteMethodOneOf as) b = b `elem` as | 54 | false | false | 1 | 8 | 7 | 27 | 12 | 15 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/ElastiCacheParameterGroup.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-parameter-group.html#cfn-elasticache-parametergroup-properties
ecpgProperties :: Lens' ElastiCacheParameterGroup (Maybe Object)
ecpgProperties = lens _elastiCacheParameterGroupProperties (\s a -> s { _elastiCacheParameterGroup... | 337 | ecpgProperties :: Lens' ElastiCacheParameterGroup (Maybe Object)
ecpgProperties = lens _elastiCacheParameterGroupProperties (\s a -> s { _elastiCacheParameterGroupProperties = a }) | 180 | ecpgProperties = lens _elastiCacheParameterGroupProperties (\s a -> s { _elastiCacheParameterGroupProperties = a }) | 115 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
enolan/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | defined (PRecord _ _ _ _ n _ _ _ _ cn _ _) = n : map fst (maybeToList cn) | 80 | defined (PRecord _ _ _ _ n _ _ _ _ cn _ _) = n : map fst (maybeToList cn) | 80 | defined (PRecord _ _ _ _ n _ _ _ _ cn _ _) = n : map fst (maybeToList cn) | 80 | false | false | 0 | 8 | 27 | 53 | 25 | 28 | null | null |
Mahdi89/eTeak | src/SimBuiltin.hs | bsd-3-clause | skipWS :: String -> String
skipWS = dropWhile isSpace | 57 | skipWS :: String -> String
skipWS = dropWhile isSpace | 53 | skipWS = dropWhile isSpace | 26 | false | true | 0 | 7 | 12 | 21 | 9 | 12 | null | null |
f-me/avaya-ws | src/Main.hs | mit | rqHandler :: Config -> AvayaMap -> Request -> WebSockets Hybi00 ()
rqHandler cfg cMapVar rq = do
(ext,pwd) <- chkRequestPath rq
(h,m) <- getSession cMapVar cfg ext pwd
>>= either
(\err -> liftIO (syslog Warning err) >> rejectRequest rq "501")
return
acceptRequest rq
s <- getSink
... | 656 | rqHandler :: Config -> AvayaMap -> Request -> WebSockets Hybi00 ()
rqHandler cfg cMapVar rq = do
(ext,pwd) <- chkRequestPath rq
(h,m) <- getSession cMapVar cfg ext pwd
>>= either
(\err -> liftIO (syslog Warning err) >> rejectRequest rq "501")
return
acceptRequest rq
s <- getSink
... | 656 | rqHandler cfg cMapVar rq = do
(ext,pwd) <- chkRequestPath rq
(h,m) <- getSession cMapVar cfg ext pwd
>>= either
(\err -> liftIO (syslog Warning err) >> rejectRequest rq "501")
return
acceptRequest rq
s <- getSink
o <- liftIO $ attachObserver h $ evHandler s
let loop
= ... | 589 | false | true | 0 | 17 | 193 | 259 | 118 | 141 | null | null |
avh4/elm-compiler | src/Elm/Compiler/Module.hs | bsd-3-clause | dehyphenate :: String -> Maybe Name
dehyphenate =
fromString '-' | 68 | dehyphenate :: String -> Maybe Name
dehyphenate =
fromString '-' | 68 | dehyphenate =
fromString '-' | 32 | false | true | 0 | 6 | 13 | 21 | 10 | 11 | null | null |
alekar/hugs | packages/base/Data/Set.hs | bsd-3-clause | -- | /O(log n)/. The maximal element of a set.
findMax :: Set a -> a
findMax (Bin _ x l Tip) = x | 97 | findMax :: Set a -> a
findMax (Bin _ x l Tip) = x | 50 | findMax (Bin _ x l Tip) = x | 28 | true | true | 0 | 7 | 24 | 34 | 17 | 17 | null | null |
kawu/data-named | src/Data/Named/Tree.hs | bsd-2-clause | -- | Annotate forest nodes with spanning info.
spanForest :: Ord w => Forest (Either n w) -> Forest (Either n w, Span w)
spanForest = map spanTree | 146 | spanForest :: Ord w => Forest (Either n w) -> Forest (Either n w, Span w)
spanForest = map spanTree | 99 | spanForest = map spanTree | 25 | true | true | 0 | 9 | 27 | 54 | 26 | 28 | null | null |
GaloisInc/ivory | ivory/src/Ivory/Language/Loop.hs | bsd-3-clause | -- | Loop over the range of indexes @[end, end - 1 .. start]@. If
-- @end > start@, the loop body will never execute.
downTo :: ANat n
=> Ix n -> Ix n -> (Ix n -> Ivory (E.AllowBreak eff) a) -> Ivory eff ()
downTo from to = loop AST.DecrTo (fromIx from) (fromIx to) | 272 | downTo :: ANat n
=> Ix n -> Ix n -> (Ix n -> Ivory (E.AllowBreak eff) a) -> Ivory eff ()
downTo from to = loop AST.DecrTo (fromIx from) (fromIx to) | 154 | downTo from to = loop AST.DecrTo (fromIx from) (fromIx to) | 58 | true | true | 0 | 14 | 63 | 94 | 45 | 49 | null | null |
nushio3/ghc | compiler/deSugar/Desugar.hs | bsd-3-clause | dsVect vd@(L _ (HsVectTypeIn _ _ _ _))
= pprPanic "Desugar.dsVect: unexpected 'HsVectTypeIn'" (ppr vd) | 104 | dsVect vd@(L _ (HsVectTypeIn _ _ _ _))
= pprPanic "Desugar.dsVect: unexpected 'HsVectTypeIn'" (ppr vd) | 104 | dsVect vd@(L _ (HsVectTypeIn _ _ _ _))
= pprPanic "Desugar.dsVect: unexpected 'HsVectTypeIn'" (ppr vd) | 104 | false | false | 0 | 10 | 16 | 43 | 21 | 22 | null | null |
zombiecalypse/config-files | xmonad/xmonad.hs | apache-2.0 | amarok = False | 14 | amarok = False | 14 | amarok = False | 14 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
mgsloan/compconfig | env/src/Constants.hs | mit | browser, emacs :: String
browser = "google-chrome" | 50 | browser, emacs :: String
browser = "google-chrome" | 50 | browser = "google-chrome" | 25 | false | true | 2 | 6 | 6 | 24 | 9 | 15 | null | null |
thomasjm/IHaskell | ipython-kernel/src/IHaskell/IPython/Types.hs | mit | replyType InspectRequestMessage = Just InspectReplyMessage | 58 | replyType InspectRequestMessage = Just InspectReplyMessage | 58 | replyType InspectRequestMessage = Just InspectReplyMessage | 58 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
massysett/multiarg | lib/Multiarg/Examples/Grover.hs | bsd-3-clause | globalOptSpecs :: [OptSpec (Either String Global)]
globalOptSpecs =
[ optSpec "h" ["help"] . ZeroArg . return $ Help
, optSpec "v" ["verbose"] . OneArg $ \s ->
Verbose <$> readErr s
, optSpec "" ["version"] . ZeroArg . return $ Version
] | 249 | globalOptSpecs :: [OptSpec (Either String Global)]
globalOptSpecs =
[ optSpec "h" ["help"] . ZeroArg . return $ Help
, optSpec "v" ["verbose"] . OneArg $ \s ->
Verbose <$> readErr s
, optSpec "" ["version"] . ZeroArg . return $ Version
] | 249 | globalOptSpecs =
[ optSpec "h" ["help"] . ZeroArg . return $ Help
, optSpec "v" ["verbose"] . OneArg $ \s ->
Verbose <$> readErr s
, optSpec "" ["version"] . ZeroArg . return $ Version
] | 198 | false | true | 0 | 10 | 53 | 102 | 53 | 49 | null | null |
wrengr/bytestring-trie | src/Data/Trie/Internal.hs | bsd-3-clause | mergeMaybe f (Just v0) (Just v1) = f v0 v1 | 44 | mergeMaybe f (Just v0) (Just v1) = f v0 v1 | 44 | mergeMaybe f (Just v0) (Just v1) = f v0 v1 | 44 | false | false | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/HTools/Node.hs | gpl-2.0 | -- | Transform a Node + Instance list into a NodeGraph type.
-- Returns Nothing if the node list is empty.
mkNodeGraph :: List -> Instance.List -> Maybe Graph.Graph
mkNodeGraph nl il =
liftM (`Graph.buildG` (filterValid nl . instancesToEdges $ il))
(nodesToBounds nl) | 271 | mkNodeGraph :: List -> Instance.List -> Maybe Graph.Graph
mkNodeGraph nl il =
liftM (`Graph.buildG` (filterValid nl . instancesToEdges $ il))
(nodesToBounds nl) | 164 | mkNodeGraph nl il =
liftM (`Graph.buildG` (filterValid nl . instancesToEdges $ il))
(nodesToBounds nl) | 106 | true | true | 0 | 10 | 46 | 67 | 35 | 32 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | readFilename = readNormalWord | 29 | readFilename = readNormalWord | 29 | readFilename = readNormalWord | 29 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
nyson/haste-compiler | libraries/haste-lib/src/Haste/DOM/JSString.hs | bsd-3-clause | -- | Get the name of the currently selected file from a file input element.
-- Any directory information is stripped, and only the actual file name is
-- returned, as the directory information is useless (and faked) anyway.
getFileName :: (IsElem e, MonadIO m) => e -> m JSString
getFileName e = liftIO $ do
fn <... | 575 | getFileName :: (IsElem e, MonadIO m) => e -> m JSString
getFileName e = liftIO $ do
fn <- fromJSStr `fmap` getProp e "value"
return $ toJSStr $ reverse $ takeWhile (not . separator) $ reverse fn
where
separator '/' = True
separator '\\' = True
separator _ = False
-- | Add or remove a class fr... | 347 | getFileName e = liftIO $ do
fn <- fromJSStr `fmap` getProp e "value"
return $ toJSStr $ reverse $ takeWhile (not . separator) $ reverse fn
where
separator '/' = True
separator '\\' = True
separator _ = False
-- | Add or remove a class from an element's class list. | 291 | true | true | 0 | 12 | 131 | 121 | 61 | 60 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Mandoc.hs | gpl-2.0 | list_formatting = Set.fromList $ words $ "B BI BR I IB IR RB RI SM SB" | 70 | list_formatting = Set.fromList $ words $ "B BI BR I IB IR RB RI SM SB" | 70 | list_formatting = Set.fromList $ words $ "B BI BR I IB IR RB RI SM SB" | 70 | false | false | 0 | 7 | 15 | 16 | 8 | 8 | null | null |
Mathnerd314/lamdu | src/Lamdu/Data/Ops.hs | gpl-3.0 | lambdaWrap
:: MonadA m
=> ExprIRef.ExpressionProperty m
-> T m (Guid, ExprIRef.ExpressionI (Tag m))
lambdaWrap exprP = do
newParamTypeI <- newHole
(newParam, newExprI) <-
ExprIRef.newLambda newParamTypeI $ Property.value exprP
Property.set exprP newExprI
return (newParam, newExprI) | 300 | lambdaWrap
:: MonadA m
=> ExprIRef.ExpressionProperty m
-> T m (Guid, ExprIRef.ExpressionI (Tag m))
lambdaWrap exprP = do
newParamTypeI <- newHole
(newParam, newExprI) <-
ExprIRef.newLambda newParamTypeI $ Property.value exprP
Property.set exprP newExprI
return (newParam, newExprI) | 300 | lambdaWrap exprP = do
newParamTypeI <- newHole
(newParam, newExprI) <-
ExprIRef.newLambda newParamTypeI $ Property.value exprP
Property.set exprP newExprI
return (newParam, newExprI) | 194 | false | true | 0 | 12 | 52 | 113 | 52 | 61 | null | null |
sdiehl/ghc | testsuite/tests/typecheck/should_compile/Vta1.hs | bsd-3-clause | silly = quad @_ @Bool @Char @_ 5 True 'a' "Hello" | 49 | silly = quad @_ @Bool @Char @_ 5 True 'a' "Hello" | 49 | silly = quad @_ @Bool @Char @_ 5 True 'a' "Hello" | 49 | false | false | 0 | 6 | 10 | 31 | 15 | 16 | null | null |
dysinger/amazonka | amazonka-datapipeline/gen/Network/AWS/DataPipeline/AddTags.hs | mpl-2.0 | -- | The identifier of the pipeline to which you want to add the tags.
atPipelineId :: Lens' AddTags Text
atPipelineId = lens _atPipelineId (\s a -> s { _atPipelineId = a }) | 173 | atPipelineId :: Lens' AddTags Text
atPipelineId = lens _atPipelineId (\s a -> s { _atPipelineId = a }) | 102 | atPipelineId = lens _atPipelineId (\s a -> s { _atPipelineId = a }) | 67 | true | true | 0 | 9 | 32 | 40 | 22 | 18 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/index_2.hs | mit | primMinusInt (Neg x) (Neg y) = primMinusNat y x | 47 | primMinusInt (Neg x) (Neg y) = primMinusNat y x | 47 | primMinusInt (Neg x) (Neg y) = primMinusNat y x | 47 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
karamellpelle/grid | source/OpenAL/Values.hs | gpl-3.0 | al_EXTENSIONS :: ALenum
al_EXTENSIONS = 0xB004 | 72 | al_EXTENSIONS :: ALenum
al_EXTENSIONS = 0xB004 | 72 | al_EXTENSIONS = 0xB004 | 48 | false | true | 0 | 4 | 31 | 11 | 6 | 5 | null | null |
martindavid/code-sandbox | comp90048/assignments/project1/attempt2/Proj1.hs | mit | countOctsNotes :: (Eq a) => [a] -> [a] -> Int
countOctsNotes [] _ = 0 | 69 | countOctsNotes :: (Eq a) => [a] -> [a] -> Int
countOctsNotes [] _ = 0 | 69 | countOctsNotes [] _ = 0 | 23 | false | true | 0 | 8 | 14 | 41 | 22 | 19 | null | null |
dgvncsz0f/nws | src/Jerimum/PostgreSQL/Introspect.hs | bsd-3-clause | readSchema :: PQ.Connection -> IO RawSchema
readSchema conn =
M.fromListWith (M.unionWith (flip (++))) . map fromRow <$>
PQ.query_ conn query
where
query =
"SELECT" <> " table_schema, table_name, column_name, data_type " <>
" FROM information_schema.columns" <>
" ORDER BY column_name"
fr... | 416 | readSchema :: PQ.Connection -> IO RawSchema
readSchema conn =
M.fromListWith (M.unionWith (flip (++))) . map fromRow <$>
PQ.query_ conn query
where
query =
"SELECT" <> " table_schema, table_name, column_name, data_type " <>
" FROM information_schema.columns" <>
" ORDER BY column_name"
fr... | 416 | readSchema conn =
M.fromListWith (M.unionWith (flip (++))) . map fromRow <$>
PQ.query_ conn query
where
query =
"SELECT" <> " table_schema, table_name, column_name, data_type " <>
" FROM information_schema.columns" <>
" ORDER BY column_name"
fromRow (schema, table, colName, colType) =
... | 372 | false | true | 3 | 10 | 88 | 135 | 66 | 69 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/TysWiredIn.hs | bsd-3-clause | -- build one specially
parrFakeCon i = parrFakeConArr!i | 77 | parrFakeCon i = parrFakeConArr!i | 54 | parrFakeCon i = parrFakeConArr!i | 54 | true | false | 0 | 5 | 29 | 14 | 7 | 7 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/Where/ComparisonOperator.hs | mit | equalsOp :: ComparisonOperator
equalsOp =
ComparisonOperator (RawSql.fromString "=") | 86 | equalsOp :: ComparisonOperator
equalsOp =
ComparisonOperator (RawSql.fromString "=") | 86 | equalsOp =
ComparisonOperator (RawSql.fromString "=") | 55 | false | true | 0 | 8 | 9 | 29 | 12 | 17 | null | null |
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailEditor/Interpreter.hs | mit | perform tac _ IDT.Breakup = do
cnt <- readIORef (TAC.context tac)
if null (TAC.dataStack cnt)
then showError tac "Empty stack"
else
if not $ isList $ head $ TAC.dataStack cnt
then showError tac "Wrong type on stack, list expected"
else do
let (TAC.RailList lst:xs) = TAC.dataSta... | 529 | perform tac _ IDT.Breakup = do
cnt <- readIORef (TAC.context tac)
if null (TAC.dataStack cnt)
then showError tac "Empty stack"
else
if not $ isList $ head $ TAC.dataStack cnt
then showError tac "Wrong type on stack, list expected"
else do
let (TAC.RailList lst:xs) = TAC.dataSta... | 529 | perform tac _ IDT.Breakup = do
cnt <- readIORef (TAC.context tac)
if null (TAC.dataStack cnt)
then showError tac "Empty stack"
else
if not $ isList $ head $ TAC.dataStack cnt
then showError tac "Wrong type on stack, list expected"
else do
let (TAC.RailList lst:xs) = TAC.dataSta... | 529 | false | false | 0 | 20 | 156 | 192 | 91 | 101 | null | null |
headprogrammingczar/cabal | cabal-install/Distribution/Client/ProjectConfig/Legacy.hs | bsd-3-clause | packageRepoSectionDescr :: SectionDescr LegacyProjectConfig
packageRepoSectionDescr =
SectionDescr {
sectionName = "source-repository-package",
sectionFields = sourceRepoFieldDescrs,
sectionSubsections = [],
sectionGet = map (\x->("", x))
. legacy... | 1,112 | packageRepoSectionDescr :: SectionDescr LegacyProjectConfig
packageRepoSectionDescr =
SectionDescr {
sectionName = "source-repository-package",
sectionFields = sourceRepoFieldDescrs,
sectionSubsections = [],
sectionGet = map (\x->("", x))
. legacy... | 1,112 | packageRepoSectionDescr =
SectionDescr {
sectionName = "source-repository-package",
sectionFields = sourceRepoFieldDescrs,
sectionSubsections = [],
sectionGet = map (\x->("", x))
. legacyPackagesRepo,
sectionSet =
\lineno unu... | 1,052 | false | true | 1 | 15 | 497 | 183 | 103 | 80 | null | null |
tismith/tlisp | write-yourself-a-scheme/listings/listing8.hs | mit | unwordsList :: [LispVal] -> String
unwordsList = unwords . map showVal | 70 | unwordsList :: [LispVal] -> String
unwordsList = unwords . map showVal | 70 | unwordsList = unwords . map showVal | 35 | false | true | 0 | 7 | 10 | 31 | 14 | 17 | null | null |
Moskau/estuary | Estuary/WebDirt/Stream.hs | gpl-3.0 | valueToJSVal :: Value -> T.JSVal
valueToJSVal (VI x) = P.pToJSVal x | 68 | valueToJSVal :: Value -> T.JSVal
valueToJSVal (VI x) = P.pToJSVal x | 67 | valueToJSVal (VI x) = P.pToJSVal x | 34 | false | true | 0 | 7 | 11 | 31 | 15 | 16 | null | null |
reinh/CodeSearch | src/CodeSearch/Regex/Parser.hs | bsd-3-clause | concats = foldr1 Concat | 23 | concats = foldr1 Concat | 23 | concats = foldr1 Concat | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
stevezhee/ed | app/Main.hs | bsd-3-clause | upperTbl = zip "`1234567890-=[]\\;',./" "~!@#$%^&*()_+{}|:\"<>?" | 64 | upperTbl = zip "`1234567890-=[]\\;',./" "~!@#$%^&*()_+{}|:\"<>?" | 64 | upperTbl = zip "`1234567890-=[]\\;',./" "~!@#$%^&*()_+{}|:\"<>?" | 64 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
erikd/yesod | yesod-core/Yesod/Core/Internal/Request.hs | mit | randomString :: PrimMonad m => Int -> MWC.Gen (PrimState m) -> m Text
randomString len gen =
liftM (decodeUtf8 . fromByteVector) $ V.replicateM len asciiChar
where
asciiChar = liftM toAscii $ MWC.uniformR (0, 61) gen
toAscii i
| i < 26 = i + Word8._A
| i < 52 = i + Word8._a - 26
|... | 350 | randomString :: PrimMonad m => Int -> MWC.Gen (PrimState m) -> m Text
randomString len gen =
liftM (decodeUtf8 . fromByteVector) $ V.replicateM len asciiChar
where
asciiChar = liftM toAscii $ MWC.uniformR (0, 61) gen
toAscii i
| i < 26 = i + Word8._A
| i < 52 = i + Word8._a - 26
|... | 350 | randomString len gen =
liftM (decodeUtf8 . fromByteVector) $ V.replicateM len asciiChar
where
asciiChar = liftM toAscii $ MWC.uniformR (0, 61) gen
toAscii i
| i < 26 = i + Word8._A
| i < 52 = i + Word8._a - 26
| otherwise = i + Word8._0 - 52 | 280 | false | true | 5 | 13 | 101 | 161 | 76 | 85 | null | null |
kmate/HaRe | old/refactorer/RefacSimplify.hs | bsd-3-clause | getPatBind pats e@(Exp (HsList es))
= concatMap (getPatBind pats) es | 77 | getPatBind pats e@(Exp (HsList es))
= concatMap (getPatBind pats) es | 77 | getPatBind pats e@(Exp (HsList es))
= concatMap (getPatBind pats) es | 77 | false | false | 0 | 10 | 18 | 37 | 18 | 19 | null | null |
NunoEdgarGub1/hql | src/Hql/Time/Calendar.hs | bsd-3-clause | -- | Advances a date w.r.t. a given calendar and business day convention by a given period
-- If end of month (eom) is set to True an end of month date will be also an end of month
-- date after the shift.
advanceByUnits :: Calendar -> Date -> Int -> Unit -> BusinessDayConvention -> Bool -> Date
advanceByUnits cale... | 360 | advanceByUnits :: Calendar -> Date -> Int -> Unit -> BusinessDayConvention -> Bool -> Date
advanceByUnits calendar d 0 _ bdc _ = adjust calendar d bdc | 150 | advanceByUnits calendar d 0 _ bdc _ = adjust calendar d bdc | 59 | true | true | 0 | 10 | 74 | 58 | 30 | 28 | null | null |
sdiehl/ghc | compiler/GHC/StgToCmm/ArgRep.hs | bsd-3-clause | argRepString L = "L" | 20 | argRepString L = "L" | 20 | argRepString L = "L" | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
hpacheco/HAAP | examples/gameworker/li1g147/Bomberman/AI.hs | mit | compareMove x@(Just 'B') y = LT | 31 | compareMove x@(Just 'B') y = LT | 31 | compareMove x@(Just 'B') y = LT | 31 | false | false | 0 | 8 | 5 | 20 | 10 | 10 | null | null |
Sgoettschkes/learning | haskell/ProjectEuler/src/Problems/Problem026.hs | mit | remainders d r rs = let r' = r `mod` d
in case elemIndex r' rs of
Just i -> i + 1
Nothing -> remainders d (10*r') (r':rs) | 142 | remainders d r rs = let r' = r `mod` d
in case elemIndex r' rs of
Just i -> i + 1
Nothing -> remainders d (10*r') (r':rs) | 142 | remainders d r rs = let r' = r `mod` d
in case elemIndex r' rs of
Just i -> i + 1
Nothing -> remainders d (10*r') (r':rs) | 142 | false | false | 0 | 12 | 49 | 79 | 39 | 40 | null | null |
rawlep/EQS | sourceCode/NiceFork.hs | mit | keepChecking :: IORef Bool -> IO() -> IO()
keepChecking trefRef io = do
flag <- readIORef trefRef
if flag then io else keepChecking trefRef io
{--
modifyMVar takes the value from an MVar, and passes it to a function. This function
can both generate a new value and return a result. If the function throws an e... | 1,362 | keepChecking :: IORef Bool -> IO() -> IO()
keepChecking trefRef io = do
flag <- readIORef trefRef
if flag then io else keepChecking trefRef io
{--
modifyMVar takes the value from an MVar, and passes it to a function. This function
can both generate a new value and return a result. If the function throws an e... | 1,362 | keepChecking trefRef io = do
flag <- readIORef trefRef
if flag then io else keepChecking trefRef io
{--
modifyMVar takes the value from an MVar, and passes it to a function. This function
can both generate a new value and return a result. If the function throws an exception,
modifyMVar puts the original valu... | 1,319 | false | true | 0 | 8 | 282 | 65 | 31 | 34 | null | null |
henrytill/hecate | src/Data/Multimap.hs | apache-2.0 | lookup :: Ord k => k -> Multimap k v -> Set v
lookup k (Multimap m) = Maybe.fromMaybe Set.empty (Map.lookup k m) | 112 | lookup :: Ord k => k -> Multimap k v -> Set v
lookup k (Multimap m) = Maybe.fromMaybe Set.empty (Map.lookup k m) | 112 | lookup k (Multimap m) = Maybe.fromMaybe Set.empty (Map.lookup k m) | 66 | false | true | 0 | 8 | 22 | 64 | 30 | 34 | null | null |
sdiehl/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | flattenBinds (Rec prs1 : binds) = prs1 ++ flattenBinds binds | 62 | flattenBinds (Rec prs1 : binds) = prs1 ++ flattenBinds binds | 62 | flattenBinds (Rec prs1 : binds) = prs1 ++ flattenBinds binds | 62 | false | false | 0 | 7 | 11 | 27 | 12 | 15 | null | null |
kojiromike/Idris-dev | src/Idris/Elab/Quasiquote.hs | bsd-3-clause | extract2 :: Int -> (PTerm -> PTerm -> a) -> PTerm -> PTerm -> Elab' aux (a, [(Name, PTerm)])
extract2 n c a b = do (a', ex1) <- extractUnquotes n a
(b', ex2) <- extractUnquotes n b
return (c a' b', ex1 ++ ex2) | 253 | extract2 :: Int -> (PTerm -> PTerm -> a) -> PTerm -> PTerm -> Elab' aux (a, [(Name, PTerm)])
extract2 n c a b = do (a', ex1) <- extractUnquotes n a
(b', ex2) <- extractUnquotes n b
return (c a' b', ex1 ++ ex2) | 253 | extract2 n c a b = do (a', ex1) <- extractUnquotes n a
(b', ex2) <- extractUnquotes n b
return (c a' b', ex1 ++ ex2) | 160 | false | true | 0 | 12 | 88 | 124 | 64 | 60 | null | null |
achudnov/jespresso | test/UnitTest.hs | bsd-3-clause | verifyOutput :: String -> String -> IO (Maybe String)
verifyOutput expected actual = return $
let fs = filter (not . isSpace)
msg = "Failed to match expected output to normalized input:\n\
\Diff:\n" ++ ppDiff (getGroupedDiff (lines expected) (lines actual))
in if (fs expected == fs actual) then N... | 376 | verifyOutput :: String -> String -> IO (Maybe String)
verifyOutput expected actual = return $
let fs = filter (not . isSpace)
msg = "Failed to match expected output to normalized input:\n\
\Diff:\n" ++ ppDiff (getGroupedDiff (lines expected) (lines actual))
in if (fs expected == fs actual) then N... | 376 | verifyOutput expected actual = return $
let fs = filter (not . isSpace)
msg = "Failed to match expected output to normalized input:\n\
\Diff:\n" ++ ppDiff (getGroupedDiff (lines expected) (lines actual))
in if (fs expected == fs actual) then Nothing
else Just m... | 322 | false | true | 0 | 15 | 110 | 114 | 56 | 58 | null | null |
uduki/hsQt | Qtc/Opengl/QGLFormat.hs | bsd-2-clause | setSamples :: QGLFormat a -> ((Int)) -> IO ()
setSamples x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGLFormat_setSamples cobj_x0 (toCInt x1) | 148 | setSamples :: QGLFormat a -> ((Int)) -> IO ()
setSamples x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGLFormat_setSamples cobj_x0 (toCInt x1) | 148 | setSamples x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGLFormat_setSamples cobj_x0 (toCInt x1) | 102 | false | true | 0 | 9 | 27 | 69 | 33 | 36 | null | null |
ndmitchell/qed | v1/Exp.hs | bsd-3-clause | fromDecl DataDecl{} = [] | 24 | fromDecl DataDecl{} = [] | 24 | fromDecl DataDecl{} = [] | 24 | false | false | 1 | 6 | 3 | 18 | 7 | 11 | null | null |
rueshyna/gogol | gogol-admin-emailmigration/gen/Network/Google/EmailMigration/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'MailItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'miIsDeleted'
--
-- * 'miIsDraft'
--
-- * 'miIsStarred'
--
-- * 'miKind'
--
-- * 'miIsUnread'
--
-- * 'miLabels'
--
-- * 'miIsInbox'
--
-- * 'miIsTrash'... | 641 | mailItem
:: MailItem
mailItem =
MailItem'
{ _miIsDeleted = Nothing
, _miIsDraft = Nothing
, _miIsStarred = Nothing
, _miKind = "mailItem"
, _miIsUnread = Nothing
, _miLabels = Nothing
, _miIsInbox = Nothing
, _miIsTrash = Nothing
, _miIsSent = Nothing
} | 301 | mailItem =
MailItem'
{ _miIsDeleted = Nothing
, _miIsDraft = Nothing
, _miIsStarred = Nothing
, _miKind = "mailItem"
, _miIsUnread = Nothing
, _miLabels = Nothing
, _miIsInbox = Nothing
, _miIsTrash = Nothing
, _miIsSent = Nothing
} | 276 | true | true | 1 | 7 | 156 | 95 | 65 | 30 | null | null |
jmitchell/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LAnd (ITFixed ty)) [x, y] = bitOp v "And" ty [x, y] | 59 | doOp v (LAnd (ITFixed ty)) [x, y] = bitOp v "And" ty [x, y] | 59 | doOp v (LAnd (ITFixed ty)) [x, y] = bitOp v "And" ty [x, y] | 59 | false | false | 0 | 9 | 13 | 46 | 24 | 22 | null | null |
xmonad/xmonad-contrib | XMonad/Util/Dzen.hs | bsd-3-clause | chomp :: String -> String
chomp = (++"\n") . reverse . dropWhile ('\n' ==) . reverse | 84 | chomp :: String -> String
chomp = (++"\n") . reverse . dropWhile ('\n' ==) . reverse | 84 | chomp = (++"\n") . reverse . dropWhile ('\n' ==) . reverse | 58 | false | true | 0 | 8 | 15 | 38 | 21 | 17 | null | null |
jean-edouard/manager | xenmgr/Vm/Queries.hs | gpl-2.0 | getCryptoKeyLookupPaths :: Uuid -> Rpc [FilePath]
getCryptoKeyLookupPaths uuid =
do user <- getVmCryptoUser uuid
vm_dirs <- split ',' <$> getVmCryptoKeyDirs uuid
platform_dirs <- split ',' <$> appGetPlatformCryptoKeyDirs
let dirs = filter (not . null) $ [user_key_dir user] ++ vm_dirs ++ platfor... | 462 | getCryptoKeyLookupPaths :: Uuid -> Rpc [FilePath]
getCryptoKeyLookupPaths uuid =
do user <- getVmCryptoUser uuid
vm_dirs <- split ',' <$> getVmCryptoKeyDirs uuid
platform_dirs <- split ',' <$> appGetPlatformCryptoKeyDirs
let dirs = filter (not . null) $ [user_key_dir user] ++ vm_dirs ++ platfor... | 462 | getCryptoKeyLookupPaths uuid =
do user <- getVmCryptoUser uuid
vm_dirs <- split ',' <$> getVmCryptoKeyDirs uuid
platform_dirs <- split ',' <$> appGetPlatformCryptoKeyDirs
let dirs = filter (not . null) $ [user_key_dir user] ++ vm_dirs ++ platform_dirs
liftIO $ filterM doesDirectoryExist ... | 412 | false | true | 0 | 15 | 104 | 137 | 63 | 74 | null | null |
input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Txp/Bi.hs | mit | --------------------------------------------------------------------------------
-- TxAux
--------------------------------------------------------------------------------
roundTripTxAux :: Property
roundTripTxAux = eachOf 100 (feedPM genTxAux) roundTripsBiBuildable | 266 | roundTripTxAux :: Property
roundTripTxAux = eachOf 100 (feedPM genTxAux) roundTripsBiBuildable | 94 | roundTripTxAux = eachOf 100 (feedPM genTxAux) roundTripsBiBuildable | 67 | true | true | 0 | 7 | 14 | 27 | 15 | 12 | null | null |
Ongy/monky | Monky/CPU.hs | lgpl-3.0 | getCPUTemp (TH (Just f)) = do
temp <- readValue f
return (temp `div` 1000) | 78 | getCPUTemp (TH (Just f)) = do
temp <- readValue f
return (temp `div` 1000) | 78 | getCPUTemp (TH (Just f)) = do
temp <- readValue f
return (temp `div` 1000) | 78 | false | false | 0 | 9 | 17 | 47 | 22 | 25 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_COMPRESSED_SIGNED_RED_RGTC1_EXT :: GLenum
gl_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC | 88 | gl_COMPRESSED_SIGNED_RED_RGTC1_EXT :: GLenum
gl_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC | 88 | gl_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC | 43 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Twinside/pandoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | listMarkerToId :: ListMarker -> String
listMarkerToId NoMarker = "990" | 70 | listMarkerToId :: ListMarker -> String
listMarkerToId NoMarker = "990" | 70 | listMarkerToId NoMarker = "990" | 31 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/SecurityPolicies/PatchRule.hs | mpl-2.0 | -- | Name of the security policy to update.
spprSecurityPolicy :: Lens' SecurityPoliciesPatchRule Text
spprSecurityPolicy
= lens _spprSecurityPolicy
(\ s a -> s{_spprSecurityPolicy = a}) | 194 | spprSecurityPolicy :: Lens' SecurityPoliciesPatchRule Text
spprSecurityPolicy
= lens _spprSecurityPolicy
(\ s a -> s{_spprSecurityPolicy = a}) | 150 | spprSecurityPolicy
= lens _spprSecurityPolicy
(\ s a -> s{_spprSecurityPolicy = a}) | 91 | true | true | 0 | 8 | 32 | 43 | 22 | 21 | null | null |
ryantm/ghc | ghc/Main.hs | bsd-3-clause | printSetting :: String -> Mode
printSetting k = mkPreLoadMode (PrintWithDynFlags f)
where f dflags = fromMaybe (panic ("Setting not found: " ++ show k))
$ lookup k (compilerInfo dflags) | 208 | printSetting :: String -> Mode
printSetting k = mkPreLoadMode (PrintWithDynFlags f)
where f dflags = fromMaybe (panic ("Setting not found: " ++ show k))
$ lookup k (compilerInfo dflags) | 208 | printSetting k = mkPreLoadMode (PrintWithDynFlags f)
where f dflags = fromMaybe (panic ("Setting not found: " ++ show k))
$ lookup k (compilerInfo dflags) | 177 | false | true | 3 | 9 | 51 | 83 | 35 | 48 | null | null |
olsner/m3 | TypeCheck.hs | bsd-3-clause | tcUnary LogicalNot = const (tcExprAsType TBool) | 47 | tcUnary LogicalNot = const (tcExprAsType TBool) | 47 | tcUnary LogicalNot = const (tcExprAsType TBool) | 47 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
tjakway/ghcjvm | compiler/utils/Bag.hs | bsd-3-clause | mapAccumBagL f s (UnitBag x) = let (s1, x1) = f s x in (s1, UnitBag x1) | 75 | mapAccumBagL f s (UnitBag x) = let (s1, x1) = f s x in (s1, UnitBag x1) | 75 | mapAccumBagL f s (UnitBag x) = let (s1, x1) = f s x in (s1, UnitBag x1) | 75 | false | false | 0 | 9 | 20 | 51 | 25 | 26 | null | null |
rueshyna/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | -- | Token corresponding to the next page of results.
qlrNextPageToken :: Lens' QuestListResponse (Maybe Text)
qlrNextPageToken
= lens _qlrNextPageToken
(\ s a -> s{_qlrNextPageToken = a}) | 196 | qlrNextPageToken :: Lens' QuestListResponse (Maybe Text)
qlrNextPageToken
= lens _qlrNextPageToken
(\ s a -> s{_qlrNextPageToken = a}) | 142 | qlrNextPageToken
= lens _qlrNextPageToken
(\ s a -> s{_qlrNextPageToken = a}) | 85 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
orbitgray/ProjectEuler | haskell/017.hs | lgpl-3.0 | -- apply count_char to the range 1..N
problem :: Int -> Int
problem n = foldr (+) 0 (map count_chars [1..n]) | 108 | problem :: Int -> Int
problem n = foldr (+) 0 (map count_chars [1..n]) | 70 | problem n = foldr (+) 0 (map count_chars [1..n]) | 48 | true | true | 0 | 8 | 20 | 41 | 22 | 19 | null | null |
choener/BiobaseBlast | Biobase/BLAST/Import.hs | gpl-3.0 | aminoacidLetters = inClass "ARNDCQEGHILMFPSTWYVBZX-" | 52 | aminoacidLetters = inClass "ARNDCQEGHILMFPSTWYVBZX-" | 52 | aminoacidLetters = inClass "ARNDCQEGHILMFPSTWYVBZX-" | 52 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
nkarag/haskell-CSVDB | src/Data/RTable.hs | bsd-3-clause | runUnaryROperation ::
ROperation -- ^ input ROperation
-> RTable -- ^ input RTable
-> RTable -- ^ output RTable
runUnaryROperation rop irtab =
case rop of
RFilter { fpred = rpredicate } -> runRfilter rpredicate irtab
RPrj { col... | 980 | runUnaryROperation ::
ROperation -- ^ input ROperation
-> RTable -- ^ input RTable
-> RTable
runUnaryROperation rop irtab =
case rop of
RFilter { fpred = rpredicate } -> runRfilter rpredicate irtab
RPrj { colPrjList = colNames } ... | 959 | runUnaryROperation rop irtab =
case rop of
RFilter { fpred = rpredicate } -> runRfilter rpredicate irtab
RPrj { colPrjList = colNames } -> runProjection colNames irtab
RAggregate { aggLis... | 849 | true | true | 0 | 10 | 430 | 168 | 88 | 80 | null | null |
felipeZ/Dynamics | src/Molcas.hs | bsd-3-clause | parserInputMolcasQM :: FilePath -> MyParser MolState [AtomQM] -> IO [AtomQM]
parserInputMolcasQM fileName parser = do
input <- C.readFile fileName
case runParser parser defaultParserState fileName input of
Left msg -> error $ show msg
Right xs -> return xs
-- | Molcas .input File Parser | 314 | parserInputMolcasQM :: FilePath -> MyParser MolState [AtomQM] -> IO [AtomQM]
parserInputMolcasQM fileName parser = do
input <- C.readFile fileName
case runParser parser defaultParserState fileName input of
Left msg -> error $ show msg
Right xs -> return xs
-- | Molcas .input File Parser | 314 | parserInputMolcasQM fileName parser = do
input <- C.readFile fileName
case runParser parser defaultParserState fileName input of
Left msg -> error $ show msg
Right xs -> return xs
-- | Molcas .input File Parser | 237 | false | true | 0 | 12 | 70 | 100 | 45 | 55 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F03.hs | bsd-3-clause | -- glClearStencil --------------------------------------------------------------
-- | Manual pages for <https://www.opengl.org/sdk/docs/man2/xhtml/glClearStencil.xml OpenGL 2.x> or <https://www.opengl.org/sdk/docs/man3/xhtml/glClearStencil.xml OpenGL 3.x> or <https://www.opengl.org/sdk/docs/man4/html/glClearStencil.xh... | 477 | glClearStencil
:: MonadIO m
=> GLint -- ^ @s@ of type @StencilValue@.
-> m ()
glClearStencil v1 = liftIO $ dyn13 ptr_glClearStencil v1 | 140 | glClearStencil v1 = liftIO $ dyn13 ptr_glClearStencil v1 | 56 | true | true | 0 | 9 | 48 | 46 | 22 | 24 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The object ID for this page. Object IDs used by Page and PageElement
-- share the same namespace.
pObjectId :: Lens' Page (Maybe Text)
pObjectId
= lens _pObjectId (\ s a -> s{_pObjectId = a}) | 198 | pObjectId :: Lens' Page (Maybe Text)
pObjectId
= lens _pObjectId (\ s a -> s{_pObjectId = a}) | 95 | pObjectId
= lens _pObjectId (\ s a -> s{_pObjectId = a}) | 58 | true | true | 0 | 9 | 38 | 49 | 26 | 23 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribePlacementGroups.hs | mpl-2.0 | dpg1DryRun :: Lens' DescribePlacementGroups (Maybe Bool)
dpg1DryRun = lens _dpg1DryRun (\s a -> s { _dpg1DryRun = a }) | 118 | dpg1DryRun :: Lens' DescribePlacementGroups (Maybe Bool)
dpg1DryRun = lens _dpg1DryRun (\s a -> s { _dpg1DryRun = a }) | 118 | dpg1DryRun = lens _dpg1DryRun (\s a -> s { _dpg1DryRun = a }) | 61 | false | true | 0 | 9 | 18 | 45 | 24 | 21 | null | null |
fmthoma/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | assertErrorIdKey = mkPreludeMiscIdUnique 105 | 57 | assertErrorIdKey = mkPreludeMiscIdUnique 105 | 57 | assertErrorIdKey = mkPreludeMiscIdUnique 105 | 57 | false | false | 0 | 5 | 16 | 9 | 4 | 5 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_TEXTURE_IMMUTABLE_FORMAT_EXT :: GLenum
gl_TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F | 82 | gl_TEXTURE_IMMUTABLE_FORMAT_EXT :: GLenum
gl_TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F | 82 | gl_TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
nevrenato/Hets_Fork | Isabelle/IsaConsts.hs | gpl-2.0 | constsS :: String
constsS = "consts" | 36 | constsS :: String
constsS = "consts" | 36 | constsS = "consts" | 18 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
danr/hipspec | src/HipSpec/Sig/Scope.hs | gpl-3.0 | getIdsInScope :: (Id -> Id) -> Ghc [Id]
getIdsInScope fix_id = do
ns <- getNamesInScope
things <- catMaybes <$> mapM lookupName ns
return [ fix_id i | AnId i <- things ] | 184 | getIdsInScope :: (Id -> Id) -> Ghc [Id]
getIdsInScope fix_id = do
ns <- getNamesInScope
things <- catMaybes <$> mapM lookupName ns
return [ fix_id i | AnId i <- things ] | 184 | getIdsInScope fix_id = do
ns <- getNamesInScope
things <- catMaybes <$> mapM lookupName ns
return [ fix_id i | AnId i <- things ] | 144 | false | true | 0 | 12 | 46 | 82 | 37 | 45 | null | null |
harrisi/on-being-better | list-expansion/Haskell/cis194/spring13/04/HigherOrder.hs | cc0-1.0 | fun1 :: [Integer] -> Integer
fun1 [] = 1 | 40 | fun1 :: [Integer] -> Integer
fun1 [] = 1 | 40 | fun1 [] = 1 | 11 | false | true | 0 | 8 | 8 | 29 | 13 | 16 | null | null |
schell/odin | odin-engine/src/Odin/Engine/GUI/Styles.hs | mit | --V4 0.74 0.23 0.22 1
textColorForButtonState _ = textColorForButtonState ButtonStateUp | 87 | textColorForButtonState _ = textColorForButtonState ButtonStateUp | 65 | textColorForButtonState _ = textColorForButtonState ButtonStateUp | 65 | true | false | 0 | 5 | 9 | 14 | 6 | 8 | null | null |
Jonplussed/genotype-parser | src/Genotype/Printer/Arlequin.hs | bsd-3-clause | refCount [] = 0 | 15 | refCount [] = 0 | 15 | refCount [] = 0 | 15 | false | false | 1 | 5 | 3 | 15 | 5 | 10 | null | null |
luqui/tigress | CLI.hs | bsd-3-clause | showEnv :: Database -> PP.Doc
showEnv db = PP.vcat
[ PP.vcat (map (showProp db) (dbAssumptions db)) ] | 106 | showEnv :: Database -> PP.Doc
showEnv db = PP.vcat
[ PP.vcat (map (showProp db) (dbAssumptions db)) ] | 106 | showEnv db = PP.vcat
[ PP.vcat (map (showProp db) (dbAssumptions db)) ] | 76 | false | true | 0 | 10 | 21 | 53 | 26 | 27 | null | null |
kazu-yamamoto/http2 | Network/HTTP2/Server.hs | bsd-3-clause | requestHeaders :: Request -> HeaderTable
requestHeaders (Request req) = inpObjHeaders req | 89 | requestHeaders :: Request -> HeaderTable
requestHeaders (Request req) = inpObjHeaders req | 89 | requestHeaders (Request req) = inpObjHeaders req | 48 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
haskellbr/missingh | missingh-all/testsrc/Globtest.hs | mit | test_nested_dir =
map f
[glob (preppath "a/bcd/E*") >>= eq "a/bcd/E*" [preppath "a/bcd/EF"],
glob (preppath "a/bcd/*g") >>= eq "a/bcd/*g" [preppath "a/bcd/efg"],
glob (preppath "a/*.foo") >>= eq "a/*.foo" [preppath "a/a.foo"]
] | 265 | test_nested_dir =
map f
[glob (preppath "a/bcd/E*") >>= eq "a/bcd/E*" [preppath "a/bcd/EF"],
glob (preppath "a/bcd/*g") >>= eq "a/bcd/*g" [preppath "a/bcd/efg"],
glob (preppath "a/*.foo") >>= eq "a/*.foo" [preppath "a/a.foo"]
] | 265 | test_nested_dir =
map f
[glob (preppath "a/bcd/E*") >>= eq "a/bcd/E*" [preppath "a/bcd/EF"],
glob (preppath "a/bcd/*g") >>= eq "a/bcd/*g" [preppath "a/bcd/efg"],
glob (preppath "a/*.foo") >>= eq "a/*.foo" [preppath "a/a.foo"]
] | 265 | false | false | 0 | 10 | 66 | 92 | 44 | 48 | null | null |
krisajenkins/esqueleto | src/Database/Esqueleto.hs | bsd-3-clause | -- $setup
--
-- If you're already using @persistent@, then you're ready to use
-- @esqueleto@, no further setup is needed. If you're just
-- starting a new project and would like to use @esqueleto@, take
-- a look at @persistent@'s book first
-- (<http://www.yesodweb.com/book/persistent>) to learn how to
-- define you... | 9,093 | valkey :: (Esqueleto query expr backend, ToBackendKey SqlBackend entity, PersistField (Key entity)) =>
Int64 -> expr (Value (Key entity))
valkey = val . toSqlKey | 171 | valkey = val . toSqlKey | 23 | true | true | 0 | 11 | 1,728 | 339 | 306 | 33 | null | null |
apyrgio/ganeti | src/Ganeti/HTools/Cluster.hs | bsd-2-clause | instanceGroup :: Node.List -> Instance.Instance -> Result Gdx
instanceGroup nl i =
let sidx = Instance.sNode i
pnode = Container.find (Instance.pNode i) nl
snode = if sidx == Node.noSecondary
then pnode
else Container.find sidx nl
pgroup = Node.group pnode
sgroup = ... | 524 | instanceGroup :: Node.List -> Instance.Instance -> Result Gdx
instanceGroup nl i =
let sidx = Instance.sNode i
pnode = Container.find (Instance.pNode i) nl
snode = if sidx == Node.noSecondary
then pnode
else Container.find sidx nl
pgroup = Node.group pnode
sgroup = ... | 524 | instanceGroup nl i =
let sidx = Instance.sNode i
pnode = Container.find (Instance.pNode i) nl
snode = if sidx == Node.noSecondary
then pnode
else Container.find sidx nl
pgroup = Node.group pnode
sgroup = Node.group snode
in if pgroup /= sgroup
then fail ("I... | 462 | false | true | 0 | 13 | 158 | 157 | 76 | 81 | null | null |
zhiyuanshi/fcore | testsuite/ModuleSpec.hs | bsd-2-clause | testCasesPath = "testsuite/tests/should_run/module" | 51 | testCasesPath = "testsuite/tests/should_run/module" | 51 | testCasesPath = "testsuite/tests/should_run/module" | 51 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
gsdlab/claferIG | src/Language/Clafer/IG/ClaferModel.hs | mit | n_id (ValueNode i _) = i | 24 | n_id (ValueNode i _) = i | 24 | n_id (ValueNode i _) = i | 24 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
lukexi/ghc-7.8-arm64 | compiler/cmm/CmmOpt.hs | bsd-3-clause | constantFoldNode :: DynFlags -> CmmNode e x -> CmmNode e x
constantFoldNode dflags = mapExp (constantFoldExpr dflags) | 117 | constantFoldNode :: DynFlags -> CmmNode e x -> CmmNode e x
constantFoldNode dflags = mapExp (constantFoldExpr dflags) | 117 | constantFoldNode dflags = mapExp (constantFoldExpr dflags) | 58 | false | true | 0 | 7 | 16 | 41 | 19 | 22 | null | null |
input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Kernel/Util/NonEmptyMap.hs | mit | fromMap :: Map k v -> Maybe (NonEmptyMap k v)
fromMap m = if Map.null m then Nothing else Just (coerce m) | 105 | fromMap :: Map k v -> Maybe (NonEmptyMap k v)
fromMap m = if Map.null m then Nothing else Just (coerce m) | 105 | fromMap m = if Map.null m then Nothing else Just (coerce m) | 59 | false | true | 0 | 8 | 21 | 56 | 27 | 29 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.