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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brendanhay/gogol | gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/NotificationConfigs/Create.hs | mpl-2.0 | -- | JSONP
onccCallback :: Lens' OrganizationsNotificationConfigsCreate (Maybe Text)
onccCallback
= lens _onccCallback (\ s a -> s{_onccCallback = a}) | 152 | onccCallback :: Lens' OrganizationsNotificationConfigsCreate (Maybe Text)
onccCallback
= lens _onccCallback (\ s a -> s{_onccCallback = a}) | 141 | onccCallback
= lens _onccCallback (\ s a -> s{_onccCallback = a}) | 67 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/CaseTree.hs | bsd-3-clause | stripLambdas x = x | 18 | stripLambdas x = x | 18 | stripLambdas x = x | 18 | false | false | 0 | 4 | 3 | 9 | 4 | 5 | null | null |
joehillen/aura | src/Aura/Core.hs | gpl-3.0 | parseDep :: String -> Dep
parseDep s = Dep name (getVersionDemand comp ver)
where patt = "(<|>=|>|=)" :: String
(name,comp,ver) = s =~ patt :: (String,String,String)
getVersionDemand c v | c == "<" = LessThan v
| c == ">=" = AtLeast v
... | 556 | parseDep :: String -> Dep
parseDep s = Dep name (getVersionDemand comp ver)
where patt = "(<|>=|>|=)" :: String
(name,comp,ver) = s =~ patt :: (String,String,String)
getVersionDemand c v | c == "<" = LessThan v
| c == ">=" = AtLeast v
... | 556 | parseDep s = Dep name (getVersionDemand comp ver)
where patt = "(<|>=|>|=)" :: String
(name,comp,ver) = s =~ patt :: (String,String,String)
getVersionDemand c v | c == "<" = LessThan v
| c == ">=" = AtLeast v
| c == ">" = MoreThan v... | 530 | false | true | 0 | 10 | 230 | 156 | 79 | 77 | null | null |
olorin/amazonka | amazonka-iam/test/Test/AWS/Gen/IAM.hs | mpl-2.0 | testGetOpenIdConnectProviderResponse :: GetOpenIdConnectProviderResponse -> TestTree
testGetOpenIdConnectProviderResponse = res
"GetOpenIdConnectProviderResponse"
"fixture/GetOpenIdConnectProviderResponse.proto"
iAM
(Proxy :: Proxy GetOpenIdConnectProvider) | 273 | testGetOpenIdConnectProviderResponse :: GetOpenIdConnectProviderResponse -> TestTree
testGetOpenIdConnectProviderResponse = res
"GetOpenIdConnectProviderResponse"
"fixture/GetOpenIdConnectProviderResponse.proto"
iAM
(Proxy :: Proxy GetOpenIdConnectProvider) | 273 | testGetOpenIdConnectProviderResponse = res
"GetOpenIdConnectProviderResponse"
"fixture/GetOpenIdConnectProviderResponse.proto"
iAM
(Proxy :: Proxy GetOpenIdConnectProvider) | 188 | false | true | 0 | 6 | 30 | 36 | 17 | 19 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_DEPTH_CLEAR_VALUE :: GLenum
gl_DEPTH_CLEAR_VALUE = 0x0B73 | 60 | gl_DEPTH_CLEAR_VALUE :: GLenum
gl_DEPTH_CLEAR_VALUE = 0x0B73 | 60 | gl_DEPTH_CLEAR_VALUE = 0x0B73 | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/Commands/WhatsNew.hs | gpl-2.0 | whatsnew :: DarcsCommand [DarcsFlag]
whatsnew = DarcsCommand
{ commandProgramName = "darcs"
, commandName = "whatsnew"
, commandHelp = whatsnewHelp
, commandDescription = whatsnewDescription
, commandExtraArgs = -1
, commandExtraArgHelp = ["[FILE or DIRECTORY]..."]
, commandCommand = whatsne... | 720 | whatsnew :: DarcsCommand [DarcsFlag]
whatsnew = DarcsCommand
{ commandProgramName = "darcs"
, commandName = "whatsnew"
, commandHelp = whatsnewHelp
, commandDescription = whatsnewDescription
, commandExtraArgs = -1
, commandExtraArgHelp = ["[FILE or DIRECTORY]..."]
, commandCommand = whatsne... | 720 | whatsnew = DarcsCommand
{ commandProgramName = "darcs"
, commandName = "whatsnew"
, commandHelp = whatsnewHelp
, commandDescription = whatsnewDescription
, commandExtraArgs = -1
, commandExtraArgHelp = ["[FILE or DIRECTORY]..."]
, commandCommand = whatsnewCmd
, commandPrereq = amInReposi... | 683 | false | true | 0 | 8 | 138 | 133 | 79 | 54 | null | null |
rahulmutt/ghcvm | compiler/Eta/BasicTypes/Name.hs | bsd-3-clause | isHoleName :: Name -> Bool
isHoleName = isHoleModule . nameModule | 65 | isHoleName :: Name -> Bool
isHoleName = isHoleModule . nameModule | 65 | isHoleName = isHoleModule . nameModule | 38 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
bruno-cadorette/IFT630-TP3 | ChessPiece.hs | mit | movementImpl :: ChessPiece -> Position -> Board -> [Position]
movementImpl (ChessPiece t color) xy board = movementKind xy color board
where
movementKind =
case t of
King -> movementKing
Queen -> movementQueen
Rook -> movementRook
B... | 421 | movementImpl :: ChessPiece -> Position -> Board -> [Position]
movementImpl (ChessPiece t color) xy board = movementKind xy color board
where
movementKind =
case t of
King -> movementKing
Queen -> movementQueen
Rook -> movementRook
B... | 421 | movementImpl (ChessPiece t color) xy board = movementKind xy color board
where
movementKind =
case t of
King -> movementKing
Queen -> movementQueen
Rook -> movementRook
Bishop -> movementBishop
Knight -> movementKnig... | 359 | false | true | 0 | 8 | 163 | 96 | 48 | 48 | null | null |
sapek/pandoc | src/Text/Pandoc/Writers/MediaWiki.hs | gpl-2.0 | inlineToMediaWiki (Str str) = return $ escapeString str | 55 | inlineToMediaWiki (Str str) = return $ escapeString str | 55 | inlineToMediaWiki (Str str) = return $ escapeString str | 55 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
NickAger/LearningHaskell | haskellForMacMiscPlayground/monads.hsproj/Monads.hs | mit | gcd' :: Int -> Int -> Writer [String] Int
gcd' a b
| b == 0 = do
tell ["Finished with " ++ show a]
return a
| otherwise = do
tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)]
gcd' b (a `mod` b)
-- Reader monad | 281 | gcd' :: Int -> Int -> Writer [String] Int
gcd' a b
| b == 0 = do
tell ["Finished with " ++ show a]
return a
| otherwise = do
tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)]
gcd' b (a `mod` b)
-- Reader monad | 279 | gcd' a b
| b == 0 = do
tell ["Finished with " ++ show a]
return a
| otherwise = do
tell [show a ++ " mod " ++ show b ++ " = " ++ show (a `mod` b)]
gcd' b (a `mod` b)
-- Reader monad | 237 | false | true | 1 | 14 | 115 | 134 | 64 | 70 | null | null |
logaan/typed-game-of-life | src/annotated_game_of_life.hs | epl-1.0 | worldTick :: [Coords] -> [Coords]
worldTick coords =
M.keys $ M.filter tick $ mergeWorlds $ map explode coords | 112 | worldTick :: [Coords] -> [Coords]
worldTick coords =
M.keys $ M.filter tick $ mergeWorlds $ map explode coords | 112 | worldTick coords =
M.keys $ M.filter tick $ mergeWorlds $ map explode coords | 78 | false | true | 2 | 8 | 19 | 52 | 25 | 27 | null | null |
ellej/mire | test/Mire/Test/Autocomplete.hs | bsd-3-clause | completeInBetween1 :: Assertion
completeInBetween1 = assertEqual ""
(Just "somethingone")
(acNewText <$> tryAutocomplete simpleDb "someone" 4) | 148 | completeInBetween1 :: Assertion
completeInBetween1 = assertEqual ""
(Just "somethingone")
(acNewText <$> tryAutocomplete simpleDb "someone" 4) | 148 | completeInBetween1 = assertEqual ""
(Just "somethingone")
(acNewText <$> tryAutocomplete simpleDb "someone" 4) | 116 | false | true | 0 | 7 | 20 | 40 | 19 | 21 | null | null |
siddhanathan/yi | yi-core/src/Yi/Misc.hs | gpl-2.0 | -- | As 'promptFile' but additionally allows the caller to transform
-- the list of hints arbitrarily, such as only showing directories.
promptFileChangingHints :: T.Text -- ^ Prompt
-> (T.Text -> [T.Text] -> YiM [T.Text])
-- ^ Hint transformer: current path, generated hi... | 913 | promptFileChangingHints :: T.Text -- ^ Prompt
-> (T.Text -> [T.Text] -> YiM [T.Text])
-- ^ Hint transformer: current path, generated hints
-> (T.Text -> YiM ()) -- ^ Action over choice
-> YiM ()
promptFileChangingHints promp... | 776 | promptFileChangingHints prompt ht act = do
maybePath <- withCurrentBuffer $ gets file
startPath <- T.pack . addTrailingPathSeparator
<$> liftBase (canonicalizePath =<< getFolder maybePath)
-- TODO: Just call withMinibuffer
withMinibufferGen startPath (\x -> findFileHint startPath x >>= ht x) prom... | 485 | true | true | 1 | 12 | 239 | 202 | 100 | 102 | null | null |
fmapfmapfmap/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/GetDeploymentConfig.hs | mpl-2.0 | -- | Creates a value of 'GetDeploymentConfigResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gdcrsDeploymentConfigInfo'
--
-- * 'gdcrsResponseStatus'
getDeploymentConfigResponse
:: Int -- ^ 'gdcrsResponseStatus'
-> Ge... | 520 | getDeploymentConfigResponse
:: Int -- ^ 'gdcrsResponseStatus'
-> GetDeploymentConfigResponse
getDeploymentConfigResponse pResponseStatus_ =
GetDeploymentConfigResponse'
{ _gdcrsDeploymentConfigInfo = Nothing
, _gdcrsResponseStatus = pResponseStatus_
} | 275 | getDeploymentConfigResponse pResponseStatus_ =
GetDeploymentConfigResponse'
{ _gdcrsDeploymentConfigInfo = Nothing
, _gdcrsResponseStatus = pResponseStatus_
} | 174 | true | true | 0 | 7 | 82 | 49 | 28 | 21 | null | null |
DavidAlphaFox/darcs | src/Darcs/Util/CommandLine.hs | gpl-2.0 | consumeAll :: Parser a -> Parser a
consumeAll p = do r <- p
eof
return r | 108 | consumeAll :: Parser a -> Parser a
consumeAll p = do r <- p
eof
return r | 108 | consumeAll p = do r <- p
eof
return r | 73 | false | true | 0 | 8 | 52 | 45 | 18 | 27 | null | null |
39aldo39/klfc | scripts/ToMarkdownList.hs | gpl-3.0 | escape' (x:xs) = x : escape' xs | 31 | escape' (x:xs) = x : escape' xs | 31 | escape' (x:xs) = x : escape' xs | 31 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
julienschmaltz/madl | src/Parser/MadlTypeChecker.hs | mit | -- | Show function for integer expressions
showIntegerExpression :: IntegerExpression -> String
showIntegerExpression expression = case expression of
IntegerNumber n -> show n
IntegerVariable name -> utxt name
IntegerBinary op left right -> "(" ++showIntegerExpression left ++op' ++showIntegerExpression righ... | 458 | showIntegerExpression :: IntegerExpression -> String
showIntegerExpression expression = case expression of
IntegerNumber n -> show n
IntegerVariable name -> utxt name
IntegerBinary op left right -> "(" ++showIntegerExpression left ++op' ++showIntegerExpression right ++")" where
op' = case op of Plus... | 415 | showIntegerExpression expression = case expression of
IntegerNumber n -> show n
IntegerVariable name -> utxt name
IntegerBinary op left right -> "(" ++showIntegerExpression left ++op' ++showIntegerExpression right ++")" where
op' = case op of Plus -> " + "; Minus -> " - "; Mult -> " * "; Mod -> " % ... | 362 | true | true | 0 | 12 | 93 | 121 | 60 | 61 | null | null |
johnyhlee/media-tracker | src/Main.hs | gpl-2.0 | getDateString s = formatDate <$> getDateFunction s | 50 | getDateString s = formatDate <$> getDateFunction s | 50 | getDateString s = formatDate <$> getDateFunction s | 50 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
flipstone/orville | orville-postgresql/src/Database/Orville/PostgreSQL/Internal/MigrateTable.hs | mit | mkMigrateColumnDDL :: FieldDefinition nullability a
-> Maybe SqlColDesc
-> [String]
mkMigrateColumnDDL fieldDef Nothing = ["ADD COLUMN " ++ mkFieldDDL fieldDef] | 198 | mkMigrateColumnDDL :: FieldDefinition nullability a
-> Maybe SqlColDesc
-> [String]
mkMigrateColumnDDL fieldDef Nothing = ["ADD COLUMN " ++ mkFieldDDL fieldDef] | 198 | mkMigrateColumnDDL fieldDef Nothing = ["ADD COLUMN " ++ mkFieldDDL fieldDef] | 76 | false | true | 0 | 9 | 57 | 51 | 23 | 28 | null | null |
dysinger/amazonka | amazonka-datapipeline/gen/Network/AWS/DataPipeline/RemoveTags.hs | mpl-2.0 | -- | The keys of the tags you wish to remove.
rtTagKeys :: Lens' RemoveTags [Text]
rtTagKeys = lens _rtTagKeys (\s a -> s { _rtTagKeys = a }) . _List | 149 | rtTagKeys :: Lens' RemoveTags [Text]
rtTagKeys = lens _rtTagKeys (\s a -> s { _rtTagKeys = a }) . _List | 103 | rtTagKeys = lens _rtTagKeys (\s a -> s { _rtTagKeys = a }) . _List | 66 | true | true | 0 | 10 | 30 | 47 | 26 | 21 | null | null |
spacekitteh/libgrin | src/GRIN/Parser/Parser.hs | bsd-3-clause | val :: Parser (Value String)
val = SimpleValue <$> sVal | 55 | val :: Parser (Value String)
val = SimpleValue <$> sVal | 55 | val = SimpleValue <$> sVal | 26 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
nomeata/ghc | compiler/cmm/CmmRewriteAssignments.hs | bsd-3-clause | -- Assumptions:
-- * Writes using Hp do not overlap with any other memory locations
-- (An important invariant being relied on here is that we only ever
-- use Hp to allocate values on the heap, which appears to be the
-- case given hpReg usage, and that our heap writing code doesn't
-- do anything stupid ... | 1,119 | clobbers :: (CmmExpr, CmmExpr) -- (lhs, rhs) of clobbering CmmStore
-> (Unique, CmmExpr) -- (register, expression) that may be clobbered
-> Bool
clobbers (CmmRegOff (CmmGlobal Hp) _, _) (_, _) = False | 219 | clobbers (CmmRegOff (CmmGlobal Hp) _, _) (_, _) = False | 55 | true | true | 0 | 9 | 240 | 76 | 50 | 26 | null | null |
noteed/syntactical | tests/Priority.hs | bsd-3-clause | b5' = head $ cut b5 | 19 | b5' = head $ cut b5 | 19 | b5' = head $ cut b5 | 19 | false | false | 3 | 5 | 5 | 18 | 6 | 12 | null | null |
rodrigogribeiro/mptc | test/Cases/SatTest.hs | bsd-3-clause | testsat3 = testsat' test3 | 25 | testsat3 = testsat' test3 | 25 | testsat3 = testsat' test3 | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
johanneshilden/trombone | Trombone/RequestJson.hs | bsd-3-clause | -- | Extract and parse the JSON object from the request body and return the
-- result together with the identity of the participating user agent.
authRequest :: Request -> Dispatch IO RequestInfo
authRequest req = ask >>= liftIO . auth req | 240 | authRequest :: Request -> Dispatch IO RequestInfo
authRequest req = ask >>= liftIO . auth req | 93 | authRequest req = ask >>= liftIO . auth req | 43 | true | true | 3 | 7 | 42 | 43 | 20 | 23 | null | null |
dmwit/pi-eta-epsilon | src/Language/PiEtaEpsilon/Examples.hs | bsd-3-clause | fact' = undefined | 17 | fact' = undefined | 17 | fact' = undefined | 17 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
spechub/Hets | SoftFOL/ProveDarwin.hs | gpl-2.0 | runDarwinProcess
:: String -- ^ binary name
-> Bool -- ^ save problem
-> String -- ^ options
-> String -- ^ filename without extension
-> String -- ^ problem
-> IO (String, [String], Int)
runDarwinProcess bin saveTPTP options tmpFileName prob = do
let tmpFile = basename tmpFileName ++ ".tptp"
when saveT... | 731 | runDarwinProcess
:: String -- ^ binary name
-> Bool -- ^ save problem
-> String -- ^ options
-> String -- ^ filename without extension
-> String -- ^ problem
-> IO (String, [String], Int)
runDarwinProcess bin saveTPTP options tmpFileName prob = do
let tmpFile = basename tmpFileName ++ ".tptp"
when saveT... | 731 | runDarwinProcess bin saveTPTP options tmpFileName prob = do
let tmpFile = basename tmpFileName ++ ".tptp"
when saveTPTP (writeFile tmpFile prob)
noProg <- missingExecutableInPath bin
if noProg then
return (bin ++ " not found. Check your $PATH", [], -1)
else do
timeTmpFile <- getTempFile prob tmpFile... | 531 | false | true | 0 | 15 | 172 | 244 | 123 | 121 | null | null |
dimara/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | lvmStripecount :: Int
lvmStripecount = AutoConf.lvmStripecount | 62 | lvmStripecount :: Int
lvmStripecount = AutoConf.lvmStripecount | 62 | lvmStripecount = AutoConf.lvmStripecount | 40 | false | true | 0 | 6 | 5 | 20 | 8 | 12 | null | null |
treeowl/cassava | Data/Csv/Conversion/Internal.hs | bsd-3-clause | expts :: Array Int Integer
expts = array (minExpt,maxExpt) [(n,2^n) | n <- [minExpt .. maxExpt]] | 96 | expts :: Array Int Integer
expts = array (minExpt,maxExpt) [(n,2^n) | n <- [minExpt .. maxExpt]] | 96 | expts = array (minExpt,maxExpt) [(n,2^n) | n <- [minExpt .. maxExpt]] | 69 | false | true | 1 | 9 | 15 | 57 | 30 | 27 | null | null |
vito/atomo | src/Atomo/Format.hs | bsd-3-clause | process (SGeneral, ms) = float ms showGFloat | 44 | process (SGeneral, ms) = float ms showGFloat | 44 | process (SGeneral, ms) = float ms showGFloat | 44 | false | false | 0 | 6 | 6 | 20 | 10 | 10 | null | null |
brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/EntityTypes/Entities/BatchCreate.hs | mpl-2.0 | -- | Required. The name of the entity type to create entities in. Format:
-- \`projects\/\/agent\/entityTypes\/\`.
paetebcParent :: Lens' ProjectsAgentEntityTypesEntitiesBatchCreate Text
paetebcParent
= lens _paetebcParent
(\ s a -> s{_paetebcParent = a}) | 263 | paetebcParent :: Lens' ProjectsAgentEntityTypesEntitiesBatchCreate Text
paetebcParent
= lens _paetebcParent
(\ s a -> s{_paetebcParent = a}) | 148 | paetebcParent
= lens _paetebcParent
(\ s a -> s{_paetebcParent = a}) | 76 | true | true | 0 | 9 | 39 | 43 | 23 | 20 | null | null |
micknelso/language-c | src/Language/CFamily/C/Analysis/SemRep.hs | bsd-3-clause | isNoName _ = False | 18 | isNoName _ = False | 18 | isNoName _ = False | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
bionikspoon/playing-with-haskell---oreilly | ch04/Exercises.hs | mit | safeHead (x:_) = Just x | 23 | safeHead (x:_) = Just x | 23 | safeHead (x:_) = Just x | 23 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
guoy34/ampersand | src/Database/Design/Ampersand/Input/ADL1/Parser.hs | gpl-3.0 | --- ServiceRule ::= 'SERVICE' RoleList 'MAINTAINS' ADLidList
--TODO: Rename the RoleRule to RoleMantains and RoleRelation to RoleEdits.
pServiceRule :: AmpParser P_RoleRule
pServiceRule = try (Maintain <$> currPos
<* pKey "SERVICE"
<*> (pRole True) `sepBy1` pComma
... | 408 | pServiceRule :: AmpParser P_RoleRule
pServiceRule = try (Maintain <$> currPos
<* pKey "SERVICE"
<*> (pRole True) `sepBy1` pComma
<* pKey "MAINTAINS")
<*> pADLid `sepBy1` pComma | 272 | pServiceRule = try (Maintain <$> currPos
<* pKey "SERVICE"
<*> (pRole True) `sepBy1` pComma
<* pKey "MAINTAINS")
<*> pADLid `sepBy1` pComma | 235 | true | true | 0 | 13 | 137 | 66 | 35 | 31 | null | null |
DaMSL/K3 | src/Language/K3/Runtime/Engine.hs | apache-2.0 | modifyMVE :: MVar a -> (a -> EngineM b (a, c)) -> EngineM b c
modifyMVE v f = do
engine <- ask
result <- liftIO $ modifyMVar v $ \c -> runEngineM (f c) engine >>= return . \case
Left e -> (c, Left e)
Right (r, x) -> (r, Right (r, x))
case result of
Left e -> left e
Right (_, ... | 334 | modifyMVE :: MVar a -> (a -> EngineM b (a, c)) -> EngineM b c
modifyMVE v f = do
engine <- ask
result <- liftIO $ modifyMVar v $ \c -> runEngineM (f c) engine >>= return . \case
Left e -> (c, Left e)
Right (r, x) -> (r, Right (r, x))
case result of
Left e -> left e
Right (_, ... | 334 | modifyMVE v f = do
engine <- ask
result <- liftIO $ modifyMVar v $ \c -> runEngineM (f c) engine >>= return . \case
Left e -> (c, Left e)
Right (r, x) -> (r, Right (r, x))
case result of
Left e -> left e
Right (_, x) -> return x | 272 | false | true | 0 | 16 | 111 | 186 | 92 | 94 | null | null |
ganeti/htools | Ganeti/HTools/Utils.hs | gpl-2.0 | parseChoices name s _ = fail $ name ++ ": cannot parse string '" ++ s ++ "'" | 76 | parseChoices name s _ = fail $ name ++ ": cannot parse string '" ++ s ++ "'" | 76 | parseChoices name s _ = fail $ name ++ ": cannot parse string '" ++ s ++ "'" | 76 | false | false | 0 | 8 | 17 | 29 | 14 | 15 | null | null |
nevrenato/Hets_Fork | Maude/Maude2DG.hs | gpl-2.0 | addNewParams2sort (ps, _) _ = (ps, []) | 38 | addNewParams2sort (ps, _) _ = (ps, []) | 38 | addNewParams2sort (ps, _) _ = (ps, []) | 38 | false | false | 1 | 7 | 6 | 28 | 14 | 14 | null | null |
antalsz/hs-to-coq | examples/ghc/gen-files/Lexer.hs | mit | alex_action_56 = lex_quasiquote_tok | 36 | alex_action_56 = lex_quasiquote_tok | 36 | alex_action_56 = lex_quasiquote_tok | 36 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
ardumont/category-theory-lab | app/Main.hs | gpl-3.0 | j G = GSS | 9 | j G = GSS | 9 | j G = GSS | 9 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
codemac/yi-editor | src/Yi/Mode/Haskell.hs | gpl-2.0 | nominalIndent _ = 1 | 19 | nominalIndent _ = 1 | 19 | nominalIndent _ = 1 | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Noeda/Megaman | src/NetHack/Data/Level.hs | mit | featureByStr "corridor" = Just Corridor | 39 | featureByStr "corridor" = Just Corridor | 39 | featureByStr "corridor" = Just Corridor | 39 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
beni55/HaskellNet | example/pop3.hs | bsd-3-clause | password = "" | 13 | password = "" | 13 | password = "" | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
NorfairKing/the-notes | src/Cryptography/SymmetricCryptography.hs | gpl-2.0 | symmetricCryptographyS :: Note
symmetricCryptographyS = section "Symmetric cryptosystems" $ do
cryptographicSchemeDefinition
cryptographicProtocolDefinition
symmetricCryptosystemDefinition
deterministicCryptoSystem
cipherDefinition
subsection "IND-CPA" $ do
indcpaDefinition
ind... | 1,146 | symmetricCryptographyS :: Note
symmetricCryptographyS = section "Symmetric cryptosystems" $ do
cryptographicSchemeDefinition
cryptographicProtocolDefinition
symmetricCryptosystemDefinition
deterministicCryptoSystem
cipherDefinition
subsection "IND-CPA" $ do
indcpaDefinition
ind... | 1,146 | symmetricCryptographyS = section "Symmetric cryptosystems" $ do
cryptographicSchemeDefinition
cryptographicProtocolDefinition
symmetricCryptosystemDefinition
deterministicCryptoSystem
cipherDefinition
subsection "IND-CPA" $ do
indcpaDefinition
indcpaSecurityDefinition
a... | 1,115 | false | true | 0 | 11 | 297 | 165 | 60 | 105 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/GlassBR/Body.hs | bsd-2-clause | {--Purpose of Document--}
purpOfDocIntro :: NamedChunk -> CI -> NamedChunk -> Sentence
purpOfDocIntro typeOf progName gvnVar = foldlSent [S "The main", phrase purpose,
S "of this", phrase typeOf, S "is to predict whether a given", phrase gvnVar,
S "is likely to resist a specified" +:+. phrase blast, S "The", plura... | 908 | purpOfDocIntro :: NamedChunk -> CI -> NamedChunk -> Sentence
purpOfDocIntro typeOf progName gvnVar = foldlSent [S "The main", phrase purpose,
S "of this", phrase typeOf, S "is to predict whether a given", phrase gvnVar,
S "is likely to resist a specified" +:+. phrase blast, S "The", plural Doc.goal
`sAnd` plural ... | 881 | purpOfDocIntro typeOf progName gvnVar = foldlSent [S "The main", phrase purpose,
S "of this", phrase typeOf, S "is to predict whether a given", phrase gvnVar,
S "is likely to resist a specified" +:+. phrase blast, S "The", plural Doc.goal
`sAnd` plural thModel, S "used in the", short progName, phrase Doc.code,
... | 820 | true | true | 0 | 9 | 162 | 286 | 144 | 142 | null | null |
jordanemedlock/fungen | Graphics/UI/Fungen/Map.hs | bsd-3-clause | -- | creates a PreTextureMap
textureMap :: Int -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GameMap t
textureMap texId tX tY sX sY = TextureMap texId (Point2D tX tY) origin origin (Point2D sX sY) | 203 | textureMap :: Int -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GameMap t
textureMap texId tX tY sX sY = TextureMap texId (Point2D tX tY) origin origin (Point2D sX sY) | 172 | textureMap texId tX tY sX sY = TextureMap texId (Point2D tX tY) origin origin (Point2D sX sY) | 93 | true | true | 0 | 11 | 37 | 81 | 37 | 44 | null | null |
phaazon/vector | Data/Vector/Primitive.hs | bsd-3-clause | scanl1 = G.scanl1 | 17 | scanl1 = G.scanl1 | 17 | scanl1 = G.scanl1 | 17 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
kvnesterov/IdaHaskell | src/Ida.hs | gpl-3.0 | -- Ida plugin callback
-----------------------------------------------------
h_ida_init = do
tmpDir <- getTemporaryDirectory
(_, stdoutNew) <- openTempFile tmpDir "ida_stdout"
(_, stderrNew) <- openTempFile tmpDir "ida_stderr"
hDuplicateTo stdoutNew stdout
hDuplicateTo stderrNew stderr
initCLI
h_msg "R... | 354 | h_ida_init = do
tmpDir <- getTemporaryDirectory
(_, stdoutNew) <- openTempFile tmpDir "ida_stdout"
(_, stderrNew) <- openTempFile tmpDir "ida_stderr"
hDuplicateTo stdoutNew stdout
hDuplicateTo stderrNew stderr
initCLI
h_msg "Release the Kraken!\n"
return () | 276 | h_ida_init = do
tmpDir <- getTemporaryDirectory
(_, stdoutNew) <- openTempFile tmpDir "ida_stdout"
(_, stderrNew) <- openTempFile tmpDir "ida_stderr"
hDuplicateTo stdoutNew stdout
hDuplicateTo stderrNew stderr
initCLI
h_msg "Release the Kraken!\n"
return () | 276 | true | false | 0 | 8 | 55 | 84 | 38 | 46 | null | null |
Munksgaard/SFOT | Asm/AST.hs | mit | opcode (BEQ (RelAddr w8)) = [0xF0, fromIntegral w8] | 51 | opcode (BEQ (RelAddr w8)) = [0xF0, fromIntegral w8] | 51 | opcode (BEQ (RelAddr w8)) = [0xF0, fromIntegral w8] | 51 | false | false | 0 | 9 | 7 | 30 | 15 | 15 | null | null |
leshchevds/ganeti | test/hs/Test/Ganeti/OpCodes.hs | bsd-2-clause | -- | Returns a list of non-empty fields.
genFieldsNE :: Gen [NonEmptyString]
genFieldsNE = genFields >>= mapM mkNonEmpty | 120 | genFieldsNE :: Gen [NonEmptyString]
genFieldsNE = genFields >>= mapM mkNonEmpty | 79 | genFieldsNE = genFields >>= mapM mkNonEmpty | 43 | true | true | 0 | 6 | 17 | 25 | 13 | 12 | null | null |
thomie/cabal | cabal-install/Distribution/Client/Sandbox.hs | bsd-3-clause | sandboxAddSourceSnapshot :: Verbosity -> [FilePath] -> FilePath
-> PackageEnvironment
-> IO ()
sandboxAddSourceSnapshot verbosity buildTreeRefs sandboxDir pkgEnv = do
let snapshotDir = sandboxDir </> snapshotDirectoryName
-- Use 'D.S.SrcDist.prepareTree' to c... | 1,978 | sandboxAddSourceSnapshot :: Verbosity -> [FilePath] -> FilePath
-> PackageEnvironment
-> IO ()
sandboxAddSourceSnapshot verbosity buildTreeRefs sandboxDir pkgEnv = do
let snapshotDir = sandboxDir </> snapshotDirectoryName
-- Use 'D.S.SrcDist.prepareTree' to c... | 1,978 | sandboxAddSourceSnapshot verbosity buildTreeRefs sandboxDir pkgEnv = do
let snapshotDir = sandboxDir </> snapshotDirectoryName
-- Use 'D.S.SrcDist.prepareTree' to copy each package's files to our private
-- location.
createDirectoryIfMissingVerbose verbosity True snapshotDir
-- Collect the package descripti... | 1,827 | false | true | 0 | 19 | 436 | 338 | 162 | 176 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromTo_7.hs | mit | fromIntMyInt :: MyInt -> MyInt
fromIntMyInt x = x | 51 | fromIntMyInt :: MyInt -> MyInt
fromIntMyInt x = x | 51 | fromIntMyInt x = x | 18 | false | true | 0 | 5 | 10 | 18 | 9 | 9 | null | null |
MichaelMcCulloch/MPlusPlus | src/Main.hs | bsd-3-clause | main :: IO ()
main = do
args <- getArgs
if null args then putStrLn "Usage: MCompiler.exe .\\path\\to\\file.m"
else do
let fname = head args
fConts <- readFile fname
let tokens = myLexer fConts
pTree = pProg tokens
in case pTree of
Ok prog -> let
... | 762 | main :: IO ()
main = do
args <- getArgs
if null args then putStrLn "Usage: MCompiler.exe .\\path\\to\\file.m"
else do
let fname = head args
fConts <- readFile fname
let tokens = myLexer fConts
pTree = pProg tokens
in case pTree of
Ok prog -> let
... | 761 | main = do
args <- getArgs
if null args then putStrLn "Usage: MCompiler.exe .\\path\\to\\file.m"
else do
let fname = head args
fConts <- readFile fname
let tokens = myLexer fConts
pTree = pProg tokens
in case pTree of
Ok prog -> let
ast = A... | 747 | false | true | 1 | 29 | 339 | 220 | 99 | 121 | null | null |
ekmett/containers | Data/IntSet/Base.hs | bsd-3-clause | union t@(Bin _ _ _ _) (Tip kx bm) = insertBM kx bm t | 52 | union t@(Bin _ _ _ _) (Tip kx bm) = insertBM kx bm t | 52 | union t@(Bin _ _ _ _) (Tip kx bm) = insertBM kx bm t | 52 | false | false | 0 | 8 | 13 | 41 | 20 | 21 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/TermParser.hs | mit | tupleOrParenthesizedTerm :: Var v => TermP v
tupleOrParenthesizedTerm = label "tuple" $ tupleOrParenthesized term DD.unitTerm pair
where
pair t1 t2 =
Term.app (ann t1 <> ann t2)
(Term.app (ann t1)
(Term.constructor (ann t1 <> ann t2) DD.pairRef 0)
t1)
t2 | 318 | tupleOrParenthesizedTerm :: Var v => TermP v
tupleOrParenthesizedTerm = label "tuple" $ tupleOrParenthesized term DD.unitTerm pair
where
pair t1 t2 =
Term.app (ann t1 <> ann t2)
(Term.app (ann t1)
(Term.constructor (ann t1 <> ann t2) DD.pairRef 0)
t1)
t2 | 318 | tupleOrParenthesizedTerm = label "tuple" $ tupleOrParenthesized term DD.unitTerm pair
where
pair t1 t2 =
Term.app (ann t1 <> ann t2)
(Term.app (ann t1)
(Term.constructor (ann t1 <> ann t2) DD.pairRef 0)
t1)
t2 | 273 | false | true | 0 | 12 | 103 | 116 | 55 | 61 | null | null |
juhp/stack | src/Stack/Ls.hs | bsd-3-clause | lsCmdOptsParser :: OA.Parser LsCmds
lsCmdOptsParser = LsSnapshot <$> lsViewSnapCmd | 82 | lsCmdOptsParser :: OA.Parser LsCmds
lsCmdOptsParser = LsSnapshot <$> lsViewSnapCmd | 82 | lsCmdOptsParser = LsSnapshot <$> lsViewSnapCmd | 46 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
notogawa/VideoCore4 | src/VideoCore4/QPU/Instruction/SmallImmediate.hs | bsd-3-clause | small_immed_2F :: SmallImmediate
small_immed_2F = SmallImmediate 33 | 67 | small_immed_2F :: SmallImmediate
small_immed_2F = SmallImmediate 33 | 67 | small_immed_2F = SmallImmediate 33 | 34 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
dmvianna/haskellbook | src/Ch18-Monad.hs | unlicense | sequencing' :: IO ()
sequencing' =
putStrLn "Blah" >>
putStrLn "another thing" | 82 | sequencing' :: IO ()
sequencing' =
putStrLn "Blah" >>
putStrLn "another thing" | 82 | sequencing' =
putStrLn "Blah" >>
putStrLn "another thing" | 61 | false | true | 0 | 6 | 15 | 26 | 12 | 14 | null | null |
mhuesch/scheme_compiler | src/Spill/Spill.hs | bsd-3-clause | runReadState :: Env -> Int -> RS a -> (a, Int)
runReadState env st rs = runIdentity (runStateT (runReaderT rs env) st) | 118 | runReadState :: Env -> Int -> RS a -> (a, Int)
runReadState env st rs = runIdentity (runStateT (runReaderT rs env) st) | 118 | runReadState env st rs = runIdentity (runStateT (runReaderT rs env) st) | 71 | false | true | 0 | 9 | 21 | 58 | 29 | 29 | null | null |
plow-technologies/cobalt-kiosk-data-template | src/Kiosk/Backend/Data/Migrations/CobaltBaseForm.hs | bsd-3-clause | waterTypeSearchToValidation :: WaterTypeSearch -> Validation Text (WaterTypeFound Text)
waterTypeSearchToValidation (TestThisWaterType _) = Failure "No Amount found, all water type are null" | 191 | waterTypeSearchToValidation :: WaterTypeSearch -> Validation Text (WaterTypeFound Text)
waterTypeSearchToValidation (TestThisWaterType _) = Failure "No Amount found, all water type are null" | 191 | waterTypeSearchToValidation (TestThisWaterType _) = Failure "No Amount found, all water type are null" | 102 | false | true | 0 | 8 | 21 | 38 | 18 | 20 | null | null |
fluffynukeit/FNIStash | src/FNIStash/File/Item.hs | bsd-3-clause | hasFilePath 0x8541 = True | 25 | hasFilePath 0x8541 = True | 25 | hasFilePath 0x8541 = True | 25 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
snape/LooplessFunctionalAlgorithms | Mixall.hs | apache-2.0 | mixall = foldr mix [] | 23 | mixall = foldr mix [] | 23 | mixall = foldr mix [] | 23 | false | false | 1 | 6 | 6 | 16 | 6 | 10 | null | null |
Rydgel/advent-of-code | src/Day7.hs | bsd-3-clause | parseAnd :: Parser Node
parseAnd = And <$> parseAtom <* string " AND " <*> parseAtom | 84 | parseAnd :: Parser Node
parseAnd = And <$> parseAtom <* string " AND " <*> parseAtom | 84 | parseAnd = And <$> parseAtom <* string " AND " <*> parseAtom | 60 | false | true | 0 | 7 | 15 | 29 | 14 | 15 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/Id.hs | bsd-3-clause | setIdCallArity :: Id -> Arity -> Id
setIdCallArity id arity = modifyIdInfo (`setCallArityInfo` arity) id | 104 | setIdCallArity :: Id -> Arity -> Id
setIdCallArity id arity = modifyIdInfo (`setCallArityInfo` arity) id | 104 | setIdCallArity id arity = modifyIdInfo (`setCallArityInfo` arity) id | 68 | false | true | 0 | 8 | 14 | 40 | 20 | 20 | null | null |
oldmanmike/ghc | compiler/cmm/PprC.hs | bsd-3-clause | signedOp (MO_SS_Conv _ _) = True | 32 | signedOp (MO_SS_Conv _ _) = True | 32 | signedOp (MO_SS_Conv _ _) = True | 32 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
peteg/ADHOC | Tests/08_Kesterel/070_par_exn.hs | gpl-2.0 | Just (m2, (_, ())) = isConstructive c2 | 38 | Just (m2, (_, ())) = isConstructive c2 | 38 | Just (m2, (_, ())) = isConstructive c2 | 38 | false | false | 0 | 8 | 6 | 27 | 14 | 13 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | luxiOverrideMaster :: String
luxiOverrideMaster = "master" | 58 | luxiOverrideMaster :: String
luxiOverrideMaster = "master" | 58 | luxiOverrideMaster = "master" | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
nevrenato/HetsAlloy | OWL2/AS.hs | gpl-2.0 | objPropToIRI :: ObjectPropertyExpression -> Individual
objPropToIRI opExp = case opExp of
ObjectProp u -> u
ObjectInverseOf objProp -> objPropToIRI objProp | 163 | objPropToIRI :: ObjectPropertyExpression -> Individual
objPropToIRI opExp = case opExp of
ObjectProp u -> u
ObjectInverseOf objProp -> objPropToIRI objProp | 163 | objPropToIRI opExp = case opExp of
ObjectProp u -> u
ObjectInverseOf objProp -> objPropToIRI objProp | 108 | false | true | 0 | 8 | 27 | 48 | 21 | 27 | null | null |
sdiehl/llvm-codegen | src/LLVM/Codegen/Array.hs | mit | arrayPtr :: Array -> [Operand] -> Codegen Operand
arrayPtr = arrayPtrC | 70 | arrayPtr :: Array -> [Operand] -> Codegen Operand
arrayPtr = arrayPtrC | 70 | arrayPtr = arrayPtrC | 20 | false | true | 0 | 7 | 10 | 25 | 13 | 12 | null | null |
romanb/cassandra-cql-protocol | src/Database/Cassandra/CQL/Protocol.hs | bsd-3-clause | getTopologyChangeType :: Get TopologyChangeType
getTopologyChangeType = do
s <- getStr
case s of
"NEW_NODE" -> return NEW_NODE
"REMOVED_NODE" -> return REMOVED_NODE
_ -> fail $ "Unrecognized topology event: " ++ show s | 250 | getTopologyChangeType :: Get TopologyChangeType
getTopologyChangeType = do
s <- getStr
case s of
"NEW_NODE" -> return NEW_NODE
"REMOVED_NODE" -> return REMOVED_NODE
_ -> fail $ "Unrecognized topology event: " ++ show s | 250 | getTopologyChangeType = do
s <- getStr
case s of
"NEW_NODE" -> return NEW_NODE
"REMOVED_NODE" -> return REMOVED_NODE
_ -> fail $ "Unrecognized topology event: " ++ show s | 202 | false | true | 0 | 11 | 63 | 63 | 29 | 34 | null | null |
elieux/ghc | compiler/main/DynFlags.hs | bsd-3-clause | getStgToDo :: DynFlags -> [StgToDo]
getStgToDo dflags
= todo2
where
stg_stats = gopt Opt_StgStats dflags
todo1 = if stg_stats then [D_stg_stats] else []
todo2 | WayProf `elem` ways dflags
= StgDoMassageForProfiling : todo1
| otherwise
= todo1
{- *... | 1,017 | getStgToDo :: DynFlags -> [StgToDo]
getStgToDo dflags
= todo2
where
stg_stats = gopt Opt_StgStats dflags
todo1 = if stg_stats then [D_stg_stats] else []
todo2 | WayProf `elem` ways dflags
= StgDoMassageForProfiling : todo1
| otherwise
= todo1
{- *... | 1,017 | getStgToDo dflags
= todo2
where
stg_stats = gopt Opt_StgStats dflags
todo1 = if stg_stats then [D_stg_stats] else []
todo2 | WayProf `elem` ways dflags
= StgDoMassageForProfiling : todo1
| otherwise
= todo1
{- *************************************... | 981 | false | true | 5 | 10 | 327 | 93 | 51 | 42 | null | null |
tjakway/ghcjvm | compiler/specialise/Rules.hs | bsd-3-clause | -------------
match_co :: RuleMatchEnv
-> RuleSubst
-> Coercion
-> Coercion
-> Maybe RuleSubst
match_co renv subst co1 co2
| Just cv <- getCoVar_maybe co1
= match_var renv subst cv (Coercion co2)
| Just (ty1, r1) <- isReflCo_maybe co1
= do { (ty2, r2) <- isReflCo_maybe co2
... | 382 | match_co :: RuleMatchEnv
-> RuleSubst
-> Coercion
-> Coercion
-> Maybe RuleSubst
match_co renv subst co1 co2
| Just cv <- getCoVar_maybe co1
= match_var renv subst cv (Coercion co2)
| Just (ty1, r1) <- isReflCo_maybe co1
= do { (ty2, r2) <- isReflCo_maybe co2
; guard (... | 368 | match_co renv subst co1 co2
| Just cv <- getCoVar_maybe co1
= match_var renv subst cv (Coercion co2)
| Just (ty1, r1) <- isReflCo_maybe co1
= do { (ty2, r2) <- isReflCo_maybe co2
; guard (r1 == r2)
; match_ty renv subst ty1 ty2 } | 251 | true | true | 0 | 11 | 115 | 148 | 70 | 78 | null | null |
neothemachine/monadiccp | src/Control/CP/FD/OvertonFD/Sugar.hs | bsd-3-clause | -- processUnary :: (EGVarId,EGVarId) -> (FDVar -> FDVar -> OConstraint) -> FDInstance OvertonFD ()
processUnary (v1,va) f = addFD $ f (getDefIntSpec v1) (getDefIntSpec va) | 171 | processUnary (v1,va) f = addFD $ f (getDefIntSpec v1) (getDefIntSpec va) | 72 | processUnary (v1,va) f = addFD $ f (getDefIntSpec v1) (getDefIntSpec va) | 72 | true | false | 0 | 8 | 24 | 39 | 20 | 19 | null | null |
jwodder/groups | haskell/Closure.hs | mit | closureL :: Ord a => ([a] -> Set a -> [a]) -> ([a], Set a) -> [a]
closureL _ ([], _) = [] | 91 | closureL :: Ord a => ([a] -> Set a -> [a]) -> ([a], Set a) -> [a]
closureL _ ([], _) = [] | 90 | closureL _ ([], _) = [] | 24 | false | true | 0 | 11 | 24 | 82 | 42 | 40 | null | null |
bos/inttable | IntMap.hs | bsd-3-clause | equal :: Eq a => IntMap a -> IntMap a -> Bool
equal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)
= (m1 == m2) && (p1 == p2) && (equal l1 l2) && (equal r1 r2) | 152 | equal :: Eq a => IntMap a -> IntMap a -> Bool
equal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)
= (m1 == m2) && (p1 == p2) && (equal l1 l2) && (equal r1 r2) | 152 | equal (Bin p1 m1 l1 r1) (Bin p2 m2 l2 r2)
= (m1 == m2) && (p1 == p2) && (equal l1 l2) && (equal r1 r2) | 106 | false | true | 2 | 11 | 42 | 110 | 52 | 58 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Attrs/Aria.hs | bsd-3-clause | aOrientation = aNmVal "orientation" | 40 | aOrientation = aNmVal "orientation" | 40 | aOrientation = aNmVal "orientation" | 40 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
yokto/Updater | Updater/List.hs | apache-2.0 | stepHelper :: (Node a -> NodePtr a) -> Node a -> IO (Maybe (Node a))
stepHelper step node = do
node' <- readIORef $ step node
if node' == node
then return Nothing
else case nodeValue node' of
Just _ -> return $ Just node'
Nothing -> return Nothing
-- | /O(1)/. Get the p... | 431 | stepHelper :: (Node a -> NodePtr a) -> Node a -> IO (Maybe (Node a))
stepHelper step node = do
node' <- readIORef $ step node
if node' == node
then return Nothing
else case nodeValue node' of
Just _ -> return $ Just node'
Nothing -> return Nothing
-- | /O(1)/. Get the p... | 431 | stepHelper step node = do
node' <- readIORef $ step node
if node' == node
then return Nothing
else case nodeValue node' of
Just _ -> return $ Just node'
Nothing -> return Nothing
-- | /O(1)/. Get the previous node. Return 'Nothing' if this is the first item,
-- or if t... | 362 | false | true | 0 | 13 | 125 | 126 | 58 | 68 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | {-
- The pitch of the camera, in degrees.
- A value between <see cref="M:SpaceCenter.Camera.MinPitch" /> and <see cref="M:SpaceCenter.Camera.MaxPitch" />
-}
getCameraPitch :: KRPCHS.SpaceCenter.Camera -> RPCContext (Float)
getCameraPitch thisArg = do
let r = makeRequest "SpaceCenter" "Camera_get_Pitch" [makeArgu... | 384 | getCameraPitch :: KRPCHS.SpaceCenter.Camera -> RPCContext (Float)
getCameraPitch thisArg = do
let r = makeRequest "SpaceCenter" "Camera_get_Pitch" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 224 | getCameraPitch thisArg = do
let r = makeRequest "SpaceCenter" "Camera_get_Pitch" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 158 | true | true | 0 | 13 | 60 | 73 | 33 | 40 | null | null |
acowley/ghc | compiler/prelude/PrimOp.hs | bsd-3-clause | primOpOkForSpeculation :: PrimOp -> Bool
-- See Note [PrimOp can_fail and has_side_effects]
-- See comments with CoreUtils.exprOkForSpeculation
-- primOpOkForSpeculation => primOpOkForSideEffects
primOpOkForSpeculation op
= primOpOkForSideEffects op
&& not (primOpOutOfLine op || primOpCanFail op) | 308 | primOpOkForSpeculation :: PrimOp -> Bool
primOpOkForSpeculation op
= primOpOkForSideEffects op
&& not (primOpOutOfLine op || primOpCanFail op) | 147 | primOpOkForSpeculation op
= primOpOkForSideEffects op
&& not (primOpOutOfLine op || primOpCanFail op) | 106 | true | true | 2 | 8 | 43 | 46 | 22 | 24 | null | null |
binesiyu/ifl | examples/ch28/Check.hs | mit | {-- /snippet writeBadLinks --}
{-- snippet waitFor --}
waitFor :: TVar Int -> IO ()
waitFor alive = atomically $ do
count <- readTVar alive
check (count == 0)
{-- /snippet waitFor --}
{-- snippet getStatus --} | 215 | waitFor :: TVar Int -> IO ()
waitFor alive = atomically $ do
count <- readTVar alive
check (count == 0)
{-- /snippet waitFor --}
{-- snippet getStatus --} | 159 | waitFor alive = atomically $ do
count <- readTVar alive
check (count == 0)
{-- /snippet waitFor --}
{-- snippet getStatus --} | 130 | true | true | 0 | 10 | 42 | 57 | 28 | 29 | null | null |
shlevy/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | trueDataConId = dataConWorkId trueDataCon | 42 | trueDataConId = dataConWorkId trueDataCon | 42 | trueDataConId = dataConWorkId trueDataCon | 42 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
sdiehl/ghc | compiler/main/Ar.hs | bsd-3-clause | writeGNUAr fp = L.writeFile fp . runPut . putGNUArch | 52 | writeGNUAr fp = L.writeFile fp . runPut . putGNUArch | 52 | writeGNUAr fp = L.writeFile fp . runPut . putGNUArch | 52 | false | false | 0 | 8 | 8 | 22 | 10 | 12 | null | null |
yogsototh/lish | src/Lish/Parser.hs | isc | parseAtom :: Parser Expr
parseAtom = do
frst <- noneOf " \t()[]\""
rest <- many (noneOf " \t()[]")
case frst:rest of
"true" -> return . Fix $ Bool True
"false" -> return . Fix $ Bool False
x -> return . Fix $ Atom (toS x) | 246 | parseAtom :: Parser Expr
parseAtom = do
frst <- noneOf " \t()[]\""
rest <- many (noneOf " \t()[]")
case frst:rest of
"true" -> return . Fix $ Bool True
"false" -> return . Fix $ Bool False
x -> return . Fix $ Atom (toS x) | 246 | parseAtom = do
frst <- noneOf " \t()[]\""
rest <- many (noneOf " \t()[]")
case frst:rest of
"true" -> return . Fix $ Bool True
"false" -> return . Fix $ Bool False
x -> return . Fix $ Atom (toS x) | 221 | false | true | 0 | 13 | 70 | 108 | 50 | 58 | null | null |
pgj/bead | src/Bead/Domain/Relationships.hs | bsd-3-clause | tcModificationCata
noModification
fileOverwrite
textOverwrite
delete
t = case t of
NoModification -> noModification
FileOverwrite tsk uf -> fileOverwrite tsk uf
TextOverwrite tsk t -> textOverwrite tsk t
TCDelete -> delete
-- * Entity keys | 267 | tcModificationCata
noModification
fileOverwrite
textOverwrite
delete
t = case t of
NoModification -> noModification
FileOverwrite tsk uf -> fileOverwrite tsk uf
TextOverwrite tsk t -> textOverwrite tsk t
TCDelete -> delete
-- * Entity keys | 267 | tcModificationCata
noModification
fileOverwrite
textOverwrite
delete
t = case t of
NoModification -> noModification
FileOverwrite tsk uf -> fileOverwrite tsk uf
TextOverwrite tsk t -> textOverwrite tsk t
TCDelete -> delete
-- * Entity keys | 267 | false | false | 1 | 8 | 61 | 74 | 31 | 43 | null | null |
mrakgr/futhark | src/Futhark/Analysis/Range.hs | bsd-3-clause | bindFunParams :: Typed attr =>
[ParamT attr] -> RangeM a -> RangeM a
bindFunParams [] m =
m | 122 | bindFunParams :: Typed attr =>
[ParamT attr] -> RangeM a -> RangeM a
bindFunParams [] m =
m | 122 | bindFunParams [] m =
m | 36 | false | true | 0 | 8 | 48 | 45 | 21 | 24 | null | null |
yesodweb/yesod | yesod-auth/Yesod/Auth/Dummy.hs | mit | authDummy :: YesodAuth m => AuthPlugin m
authDummy =
AuthPlugin "dummy" dispatch login
where
dispatch :: Text -> [Text] -> AuthHandler m TypedContent
dispatch "POST" [] = do
(jsonResult :: Result Value) <- parseCheckJsonBody
eIdent <- case jsonResult of
Success val -> return $ ... | 1,076 | authDummy :: YesodAuth m => AuthPlugin m
authDummy =
AuthPlugin "dummy" dispatch login
where
dispatch :: Text -> [Text] -> AuthHandler m TypedContent
dispatch "POST" [] = do
(jsonResult :: Result Value) <- parseCheckJsonBody
eIdent <- case jsonResult of
Success val -> return $ ... | 1,076 | authDummy =
AuthPlugin "dummy" dispatch login
where
dispatch :: Text -> [Text] -> AuthHandler m TypedContent
dispatch "POST" [] = do
(jsonResult :: Result Value) <- parseCheckJsonBody
eIdent <- case jsonResult of
Success val -> return $ A.parseEither identParser val
... | 1,035 | false | true | 1 | 14 | 322 | 254 | 116 | 138 | null | null |
srijs/haskell-json-togo | src/Data/JSON/ToGo.hs | mit | matchArray :: (Int -> Expr m a) -> Expr m a
matchArray = Expr . Fix . ArrayM . fmap getFix | 90 | matchArray :: (Int -> Expr m a) -> Expr m a
matchArray = Expr . Fix . ArrayM . fmap getFix | 90 | matchArray = Expr . Fix . ArrayM . fmap getFix | 46 | false | true | 0 | 8 | 20 | 47 | 23 | 24 | null | null |
zeyuanxy/haskell-playground | write-yourself-a-scheme/chap7/main.hs | mit | showVal (List contents) = "(" ++ unwordsList contents ++ ")" | 60 | showVal (List contents) = "(" ++ unwordsList contents ++ ")" | 60 | showVal (List contents) = "(" ++ unwordsList contents ++ ")" | 60 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
kaizhang/haskell-igraph | src/IGraph.hs | mit | -- | Create a graph.
mkGraph :: (SingI d, Serialize v, Ord v, Serialize e)
=> [v] -- ^ Nodes. Each will be assigned a ID from 0 to N.
-> [LEdge e] -- ^ Labeled edges.
-> Graph d v e
mkGraph vattr es = runST $ do
g <- GM.new []
GM.addNodes vattr g
GM.addEdges es g
unsafeFr... | 367 | mkGraph :: (SingI d, Serialize v, Ord v, Serialize e)
=> [v] -- ^ Nodes. Each will be assigned a ID from 0 to N.
-> [LEdge e] -- ^ Labeled edges.
-> Graph d v e
mkGraph vattr es = runST $ do
g <- GM.new []
GM.addNodes vattr g
GM.addEdges es g
unsafeFreeze g
-- | Create a... | 346 | mkGraph vattr es = runST $ do
g <- GM.new []
GM.addNodes vattr g
GM.addEdges es g
unsafeFreeze g
-- | Create a graph from labeled edges. | 153 | true | true | 0 | 10 | 117 | 115 | 56 | 59 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F29.hs | bsd-3-clause | -- glVertex3d ------------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml OpenGL 2.x>. The vector equivalent of this command is 'glVertex3dv'.
glVertex3d
:: MonadIO m
=> GLdouble -- ^ @x@ of type @CoordD@.
-> GLdouble -- ^ @y@ o... | 448 | glVertex3d
:: MonadIO m
=> GLdouble -- ^ @x@ of type @CoordD@.
-> GLdouble -- ^ @y@ of type @CoordD@.
-> GLdouble -- ^ @z@ of type @CoordD@.
-> m ()
glVertex3d v1 v2 v3 = liftIO $ dyn41 ptr_glVertex3d v1 v2 v3 | 219 | glVertex3d v1 v2 v3 = liftIO $ dyn41 ptr_glVertex3d v1 v2 v3 | 60 | true | true | 0 | 11 | 72 | 64 | 32 | 32 | null | null |
poliglot/concraft-de | src/NLP/Concraft/German/Format/Plain.hs | bsd-2-clause | buildKnown :: T.Text -> Bool -> L.Builder
buildKnown _ True = "" | 64 | buildKnown :: T.Text -> Bool -> L.Builder
buildKnown _ True = "" | 64 | buildKnown _ True = "" | 22 | false | true | 0 | 7 | 11 | 28 | 14 | 14 | null | null |
bravit/Idris-dev | src/Idris/Core/Unify.hs | bsd-3-clause | recoverable (P (DCon _ _ _) x _) (Constant _) = False | 53 | recoverable (P (DCon _ _ _) x _) (Constant _) = False | 53 | recoverable (P (DCon _ _ _) x _) (Constant _) = False | 53 | false | false | 0 | 8 | 11 | 39 | 18 | 21 | null | null |
karamellpelle/grid | source/Game/Grid/Output/Plain/ShadePath.hs | gpl-3.0 | shadePathDrawPath1 :: ShadePath -> Path -> IO ()
shadePathDrawPath1 sh path = do
shadePathDrawSegment sh (pathCurrent path) (pathAlpha path) | 144 | shadePathDrawPath1 :: ShadePath -> Path -> IO ()
shadePathDrawPath1 sh path = do
shadePathDrawSegment sh (pathCurrent path) (pathAlpha path) | 144 | shadePathDrawPath1 sh path = do
shadePathDrawSegment sh (pathCurrent path) (pathAlpha path) | 95 | false | true | 0 | 10 | 22 | 56 | 25 | 31 | null | null |
jeyoor/haskell-learning-challenge | learn_haskell_github_courses/Cis194/src/Lecture03.hs | bsd-3-clause | lst1 :: List Int
lst1 = C 3 (C 5 (C 2 E)) | 41 | lst1 :: List Int
lst1 = C 3 (C 5 (C 2 E)) | 41 | lst1 = C 3 (C 5 (C 2 E)) | 24 | false | true | 0 | 8 | 12 | 41 | 18 | 23 | null | null |
nushio3/Paraiso | Language/Paraiso/OM/PrettyPrint.hs | bsd-3-clause | -- | pretty print the OM, using a default printing for annotation.
prettyPrintA1 :: Opt.Ready v g => OM v g Anot.Annotation -> T.Text
prettyPrintA1 om = prettyPrintA (ppAnot1 om) om | 181 | prettyPrintA1 :: Opt.Ready v g => OM v g Anot.Annotation -> T.Text
prettyPrintA1 om = prettyPrintA (ppAnot1 om) om | 114 | prettyPrintA1 om = prettyPrintA (ppAnot1 om) om | 47 | true | true | 0 | 8 | 30 | 52 | 25 | 27 | null | null |
np/hlatex | Language/LaTeX/Builder/Babel.hs | bsd-3-clause | customLang :: String -> Lang
customLang = Lang | 46 | customLang :: String -> Lang
customLang = Lang | 46 | customLang = Lang | 17 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
gridaphobe/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | evVarsOfTerm (EvSuperClass v _) = evVarsOfTerm v | 50 | evVarsOfTerm (EvSuperClass v _) = evVarsOfTerm v | 50 | evVarsOfTerm (EvSuperClass v _) = evVarsOfTerm v | 50 | false | false | 0 | 7 | 8 | 20 | 9 | 11 | null | null |
mitchellwrosen/language-lua2 | src/Language/Lua/Token.hs | bsd-3-clause | showToken (TkStringLit s) = s | 29 | showToken (TkStringLit s) = s | 29 | showToken (TkStringLit s) = s | 29 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
ownclo/authorities | Authorities/Join.hs | gpl-3.0 | manyToMany :: (Joined left lr right)
=> Entity left
-> (EntityExpr left `InnerJoin` EntityExpr lr `InnerJoin` EntityExpr right)
-> SqlQuery (JoinExpr right lr)
manyToMany (Entity key _) = join $
\first (jTable :: EntityExpr lr) second -> do
match first key persistIdField -- unde... | 433 | manyToMany :: (Joined left lr right)
=> Entity left
-> (EntityExpr left `InnerJoin` EntityExpr lr `InnerJoin` EntityExpr right)
-> SqlQuery (JoinExpr right lr)
manyToMany (Entity key _) = join $
\first (jTable :: EntityExpr lr) second -> do
match first key persistIdField -- unde... | 433 | manyToMany (Entity key _) = join $
\first (jTable :: EntityExpr lr) second -> do
match first key persistIdField -- undefined -- leftId
return (second, jTable)
where match entity aKey anId = where_ (entity ^. anId ==. val aKey) | 240 | false | true | 0 | 11 | 108 | 160 | 79 | 81 | null | null |
christiaanb/Idris-dev | src/Core/Execute.hs | bsd-3-clause | findForeign :: String -> Exec (Maybe ForeignFun)
findForeign fn = do est <- getExecState
let libs = exec_dynamic_libs est
fns <- mapMaybeM getFn libs
case fns of
[f] -> return (Just f)
[] -> do execIO . putStrLn $ "S... | 714 | findForeign :: String -> Exec (Maybe ForeignFun)
findForeign fn = do est <- getExecState
let libs = exec_dynamic_libs est
fns <- mapMaybeM getFn libs
case fns of
[f] -> return (Just f)
[] -> do execIO . putStrLn $ "S... | 714 | findForeign fn = do est <- getExecState
let libs = exec_dynamic_libs est
fns <- mapMaybeM getFn libs
case fns of
[f] -> return (Just f)
[] -> do execIO . putStrLn $ "Symbol \"" ++ fn ++ "\" not found"
... | 665 | false | true | 1 | 17 | 331 | 210 | 95 | 115 | null | null |
duplode/stack | src/Stack/Build/Installed.hs | bsd-3-clause | isAllowed :: PackageInstallInfo pii
=> GetInstalledOpts
-> Maybe InstalledCache
-> Map PackageName pii
-> Maybe InstallLocation
-> DumpPackage Bool Bool
-> Maybe LoadHelper
isAllowed opts mcache sourceMap mloc dp
-- Check that it can do profiling if necess... | 2,206 | isAllowed :: PackageInstallInfo pii
=> GetInstalledOpts
-> Maybe InstalledCache
-> Map PackageName pii
-> Maybe InstallLocation
-> DumpPackage Bool Bool
-> Maybe LoadHelper
isAllowed opts mcache sourceMap mloc dp
-- Check that it can do profiling if necess... | 2,206 | isAllowed opts mcache sourceMap mloc dp
-- Check that it can do profiling if necessary
| getInstalledProfiling opts && isJust mcache && not (dpProfiling dp) = Nothing
-- Check that it has haddocks if necessary
| getInstalledHaddock opts && isJust mcache && not (dpHaddock dp) = Nothing
| toInclude = ... | 1,973 | false | true | 2 | 12 | 760 | 374 | 184 | 190 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.