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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Potregon/while | src/Interface/TAC.hs | gpl-3.0 | getUseVariables (MCall _ ref _) = variablesFromData [ref] | 57 | getUseVariables (MCall _ ref _) = variablesFromData [ref] | 57 | getUseVariables (MCall _ ref _) = variablesFromData [ref] | 57 | false | false | 0 | 7 | 7 | 25 | 12 | 13 | null | null |
susoDominguez/eNominalTerms-Alpha | RewritingX.hs | unlicense | areNRs rw = isNR rw || isNRout rw | 33 | areNRs rw = isNR rw || isNRout rw | 33 | areNRs rw = isNR rw || isNRout rw | 33 | false | false | 0 | 6 | 7 | 19 | 8 | 11 | null | null |
brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/Export.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
paeUploadType :: Lens' ProjectsAgentExport (Maybe Text)
paeUploadType
= lens _paeUploadType
(\ s a -> s{_paeUploadType = a}) | 203 | paeUploadType :: Lens' ProjectsAgentExport (Maybe Text)
paeUploadType
= lens _paeUploadType
(\ s a -> s{_paeUploadType = a}) | 132 | paeUploadType
= lens _paeUploadType
(\ s a -> s{_paeUploadType = a}) | 76 | true | true | 1 | 9 | 34 | 51 | 25 | 26 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | opcodeReasonSrcNoded :: String
opcodeReasonSrcNoded = _opcodeReasonSrcDaemon ++ ":noded" | 88 | opcodeReasonSrcNoded :: String
opcodeReasonSrcNoded = _opcodeReasonSrcDaemon ++ ":noded" | 88 | opcodeReasonSrcNoded = _opcodeReasonSrcDaemon ++ ":noded" | 57 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
DavidAlphaFox/ghc | libraries/transformers/Control/Monad/Trans/Writer/Strict.hs | bsd-3-clause | -- | Unwrap a writer computation as a (result, output) pair.
-- (The inverse of 'writer'.)
runWriter :: Writer w a -> (a, w)
runWriter = runIdentity . runWriterT | 161 | runWriter :: Writer w a -> (a, w)
runWriter = runIdentity . runWriterT | 70 | runWriter = runIdentity . runWriterT | 36 | true | true | 0 | 6 | 28 | 32 | 18 | 14 | null | null |
dillonhuff/Proper | src/Proper/Clause.hs | bsd-3-clause | assignTruthVal (NLit _) = False | 31 | assignTruthVal (NLit _) = False | 31 | assignTruthVal (NLit _) = False | 31 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
Mic92/eidolon | Handler/MediumSettings.hs | agpl-3.0 | postMediumSettingsR :: MediumId -> Handler Html
postMediumSettingsR mediumId = do
checkRes <- mediumCheck mediumId
case checkRes of
Right medium -> do
((result, _), _) <- runFormPost $ mediumSettingsForm medium
case result of
FormSuccess temp -> do
_ <- runDB $ update mediumId
... | 782 | postMediumSettingsR :: MediumId -> Handler Html
postMediumSettingsR mediumId = do
checkRes <- mediumCheck mediumId
case checkRes of
Right medium -> do
((result, _), _) <- runFormPost $ mediumSettingsForm medium
case result of
FormSuccess temp -> do
_ <- runDB $ update mediumId
... | 782 | postMediumSettingsR mediumId = do
checkRes <- mediumCheck mediumId
case checkRes of
Right medium -> do
((result, _), _) <- runFormPost $ mediumSettingsForm medium
case result of
FormSuccess temp -> do
_ <- runDB $ update mediumId
[ MediumTitle =. mediumTitle temp
... | 734 | false | true | 0 | 22 | 241 | 206 | 93 | 113 | null | null |
plow-technologies/shakespeare-dynamic | ghcjs-shakespeare-dynamic/example/TankGauge.hs | mit | scaleWidthHeight :: Scale -> (Int,Int) -> (Int, Int)
scaleWidthHeight (Scale (absWidth, absHeight)) (width, height) = (floor width' , floor height')
where width' = (fromIntegral $ width * absWidth) / 1000.0 :: Double
height' = (fromIntegral $ height * absHeight )/ 1000.0 :: Double | 291 | scaleWidthHeight :: Scale -> (Int,Int) -> (Int, Int)
scaleWidthHeight (Scale (absWidth, absHeight)) (width, height) = (floor width' , floor height')
where width' = (fromIntegral $ width * absWidth) / 1000.0 :: Double
height' = (fromIntegral $ height * absHeight )/ 1000.0 :: Double | 291 | scaleWidthHeight (Scale (absWidth, absHeight)) (width, height) = (floor width' , floor height')
where width' = (fromIntegral $ width * absWidth) / 1000.0 :: Double
height' = (fromIntegral $ height * absHeight )/ 1000.0 :: Double | 238 | false | true | 5 | 8 | 52 | 118 | 64 | 54 | null | null |
snoyberg/photosorter | fay/Language/Fay/JQuery.hs | bsd-2-clause | onClick :: (EventObject -> Fay Bool) -> JQuery -> Fay JQuery
onClick = ffi "%2['click'](%1)" | 92 | onClick :: (EventObject -> Fay Bool) -> JQuery -> Fay JQuery
onClick = ffi "%2['click'](%1)" | 92 | onClick = ffi "%2['click'](%1)" | 31 | false | true | 0 | 8 | 14 | 35 | 17 | 18 | null | null |
bravit/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectRawQuote unq (RConstant cst) = reflCall "RConstant" [reflectConstant cst] | 80 | reflectRawQuote unq (RConstant cst) = reflCall "RConstant" [reflectConstant cst] | 80 | reflectRawQuote unq (RConstant cst) = reflCall "RConstant" [reflectConstant cst] | 80 | false | false | 0 | 7 | 8 | 30 | 13 | 17 | null | null |
pdmurray/haskell-book-ex | src/ch4/Exercises4.hs | bsd-3-clause | -- 10.
f :: (a, b) -> (c, d) -> ((b, d), (a, c))
f x y = ((snd x, snd y), (fst x, fst y)) | 90 | f :: (a, b) -> (c, d) -> ((b, d), (a, c))
f x y = ((snd x, snd y), (fst x, fst y)) | 82 | f x y = ((snd x, snd y), (fst x, fst y)) | 40 | true | true | 0 | 8 | 26 | 90 | 50 | 40 | null | null |
urbanslug/ghc | testsuite/tests/dph/nbody/Main.hs | bsd-3-clause | mainBatchRun config calcAccels worldStart
= go worldStart
where go !world
= let world' = advanceWorld
(calcAccels $ configEpsilon config)
(configTimeStep config)
world
in if worldSteps world' < con... | 468 | mainBatchRun config calcAccels worldStart
= go worldStart
where go !world
= let world' = advanceWorld
(calcAccels $ configEpsilon config)
(configTimeStep config)
world
in if worldSteps world' < con... | 468 | mainBatchRun config calcAccels worldStart
= go worldStart
where go !world
= let world' = advanceWorld
(calcAccels $ configEpsilon config)
(configTimeStep config)
world
in if worldSteps world' < con... | 468 | false | false | 0 | 12 | 218 | 83 | 39 | 44 | null | null |
HJvT/com | System/Win32/Com.hs | bsd-3-clause | enumSkip :: Word32 -> IUnknown a -> IO ()
enumSkip count iptr =
invokeIt (\ methPtr ip -> primEnumSkip methPtr ip count) 4 iptr | 131 | enumSkip :: Word32 -> IUnknown a -> IO ()
enumSkip count iptr =
invokeIt (\ methPtr ip -> primEnumSkip methPtr ip count) 4 iptr | 131 | enumSkip count iptr =
invokeIt (\ methPtr ip -> primEnumSkip methPtr ip count) 4 iptr | 89 | false | true | 0 | 8 | 27 | 56 | 27 | 29 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QSizePolicy.hs | bsd-2-clause | fLabel :: ControlTypes
fLabel
= ifControlTypes $ 64 | 53 | fLabel :: ControlTypes
fLabel
= ifControlTypes $ 64 | 53 | fLabel
= ifControlTypes $ 64 | 30 | false | true | 2 | 6 | 9 | 23 | 9 | 14 | null | null |
grtlr/wyas | src/Wyas/Evaluator.hs | bsd-3-clause | cdr [badArg] = throwError $ TypeMismatch "pair" badArg | 69 | cdr [badArg] = throwError $ TypeMismatch "pair" badArg | 69 | cdr [badArg] = throwError $ TypeMismatch "pair" badArg | 69 | false | false | 0 | 6 | 22 | 22 | 10 | 12 | null | null |
olorin/amazonka | amazonka-route53/gen/Network/AWS/Route53/Types/Product.hs | mpl-2.0 | -- | The code for a country\'s subdivision (e.g., a province of Canada). A
-- subdivision code is only valid with the appropriate country code.
--
-- Constraint: Specifying 'SubdivisionCode' without 'CountryCode' returns
-- an InvalidInput error.
glSubdivisionCode :: Lens' GeoLocation (Maybe Text)
glSubdivisionCode = l... | 379 | glSubdivisionCode :: Lens' GeoLocation (Maybe Text)
glSubdivisionCode = lens _glSubdivisionCode (\ s a -> s{_glSubdivisionCode = a}) | 132 | glSubdivisionCode = lens _glSubdivisionCode (\ s a -> s{_glSubdivisionCode = a}) | 80 | true | true | 0 | 9 | 53 | 50 | 29 | 21 | null | null |
wskplho/stack | src/Stack/Types/Image.hs | bsd-3-clause | imgDockerAddArgName :: Text
imgDockerAddArgName = "add" | 55 | imgDockerAddArgName :: Text
imgDockerAddArgName = "add" | 55 | imgDockerAddArgName = "add" | 27 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
shayan-najd/Haskell-Desugar-Generic | Examples/XMonad/SS_noListComp.hs | bsd-3-clause | filter :: (a -> Bool) -> Stack a -> Maybe (Stack a)
filter p (Stack f ls rs)
= case L.filter p (f : rs) of
f' : rs' -> Just $ Stack f' (L.filter p ls) rs'
[] -> case L.filter p ls of
f' : ls' -> Just $ Stack f' ls' []
[] -> Nothing | 285 | filter :: (a -> Bool) -> Stack a -> Maybe (Stack a)
filter p (Stack f ls rs)
= case L.filter p (f : rs) of
f' : rs' -> Just $ Stack f' (L.filter p ls) rs'
[] -> case L.filter p ls of
f' : ls' -> Just $ Stack f' ls' []
[] -> Nothing | 285 | filter p (Stack f ls rs)
= case L.filter p (f : rs) of
f' : rs' -> Just $ Stack f' (L.filter p ls) rs'
[] -> case L.filter p ls of
f' : ls' -> Just $ Stack f' ls' []
[] -> Nothing | 233 | false | true | 0 | 13 | 111 | 152 | 74 | 78 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Numerical.hs | mit | numDiv [Number 0] = throwError $ DivideByZero | 45 | numDiv [Number 0] = throwError $ DivideByZero | 45 | numDiv [Number 0] = throwError $ DivideByZero | 45 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
eigengrau/hlint | data/Default.hs | bsd-3-clause | error = all (a /=) ==> notElem a where note = ValidInstance "Eq" a | 66 | error = all (a /=) ==> notElem a where note = ValidInstance "Eq" a | 66 | error = all (a /=) ==> notElem a where note = ValidInstance "Eq" a | 66 | false | false | 0 | 7 | 13 | 35 | 17 | 18 | null | null |
rueshyna/gogol | gogol-cloudmonitoring/gen/Network/Google/Resource/CloudMonitoring/Timeseries/Write.hs | mpl-2.0 | -- | Creates a value of 'TimeseriesWrite' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'twProject'
--
-- * 'twPayload'
timeseriesWrite
:: Text -- ^ 'twProject'
-> WriteTimeseriesRequest -- ^ 'twPayload'
-> TimeseriesWrit... | 452 | timeseriesWrite
:: Text -- ^ 'twProject'
-> WriteTimeseriesRequest -- ^ 'twPayload'
-> TimeseriesWrite
timeseriesWrite pTwProject_ pTwPayload_ =
TimeseriesWrite'
{ _twProject = pTwProject_
, _twPayload = pTwPayload_
} | 245 | timeseriesWrite pTwProject_ pTwPayload_ =
TimeseriesWrite'
{ _twProject = pTwProject_
, _twPayload = pTwPayload_
} | 130 | true | true | 0 | 6 | 92 | 47 | 30 | 17 | null | null |
cartazio/omega | src/NarrowData.hs | bsd-3-clause | eq [x,y] = inject(RelN (EqR (x,y))) | 35 | eq [x,y] = inject(RelN (EqR (x,y))) | 35 | eq [x,y] = inject(RelN (EqR (x,y))) | 35 | false | false | 0 | 10 | 5 | 36 | 19 | 17 | null | null |
GaloisInc/halvm-ghc | compiler/coreSyn/TrieMap.hs | bsd-3-clause | lkTickish :: Tickish Id -> TickishMap a -> Maybe a
lkTickish = lookupTM | 71 | lkTickish :: Tickish Id -> TickishMap a -> Maybe a
lkTickish = lookupTM | 71 | lkTickish = lookupTM | 20 | false | true | 0 | 7 | 12 | 28 | 13 | 15 | null | null |
TomMD/ghc | compiler/nativeGen/SPARC/Regs.hs | bsd-3-clause | f0 = RegReal (RealRegSingle (fReg 0)) | 38 | f0 = RegReal (RealRegSingle (fReg 0)) | 38 | f0 = RegReal (RealRegSingle (fReg 0)) | 38 | false | false | 1 | 9 | 6 | 24 | 10 | 14 | null | null |
brownplt/ovid | src/Jsaz.hs | bsd-2-clause | argSpec =
[ Option ['o'] ["output"] (ReqArg OutputScheme "FILE") "output as a PLT Scheme expression"
, Option ['x'] ["xml"] (ReqArg OutputXML "FILE") "output as GraphML"
, Option [] ["cfa"] (ReqArg (ApplyCFA . read) "K") "perform a control flow analysis only"
, Option [] ["cfg"] (ReqArg (BuildCFG . read) "K") "... | 1,071 | argSpec =
[ Option ['o'] ["output"] (ReqArg OutputScheme "FILE") "output as a PLT Scheme expression"
, Option ['x'] ["xml"] (ReqArg OutputXML "FILE") "output as GraphML"
, Option [] ["cfa"] (ReqArg (ApplyCFA . read) "K") "perform a control flow analysis only"
, Option [] ["cfg"] (ReqArg (BuildCFG . read) "K") "... | 1,071 | argSpec =
[ Option ['o'] ["output"] (ReqArg OutputScheme "FILE") "output as a PLT Scheme expression"
, Option ['x'] ["xml"] (ReqArg OutputXML "FILE") "output as GraphML"
, Option [] ["cfa"] (ReqArg (ApplyCFA . read) "K") "perform a control flow analysis only"
, Option [] ["cfg"] (ReqArg (BuildCFG . read) "K") "... | 1,071 | false | false | 0 | 10 | 197 | 312 | 166 | 146 | null | null |
ekmett/ghc | compiler/cmm/CmmBuildInfoTables.hs | bsd-3-clause | buildSRTs :: DynFlags -> TopSRT -> BlockEnv CAFSet
-> UniqSM (TopSRT, [CmmDecl], BlockEnv C_SRT)
buildSRTs dflags top_srt caf_map
= foldM doOne (top_srt, [], mapEmpty) (mapToList caf_map)
where
doOne (top_srt, decls, srt_env) (l, cafs)
= do (top_srt, mb_decl, srt) <- buildSRT dflags top_srt cafs
... | 971 | buildSRTs :: DynFlags -> TopSRT -> BlockEnv CAFSet
-> UniqSM (TopSRT, [CmmDecl], BlockEnv C_SRT)
buildSRTs dflags top_srt caf_map
= foldM doOne (top_srt, [], mapEmpty) (mapToList caf_map)
where
doOne (top_srt, decls, srt_env) (l, cafs)
= do (top_srt, mb_decl, srt) <- buildSRT dflags top_srt cafs
... | 971 | buildSRTs dflags top_srt caf_map
= foldM doOne (top_srt, [], mapEmpty) (mapToList caf_map)
where
doOne (top_srt, decls, srt_env) (l, cafs)
= do (top_srt, mb_decl, srt) <- buildSRT dflags top_srt cafs
return ( top_srt, maybeToList mb_decl ++ decls
, mapInsert l srt srt_env )
{-
- In e... | 864 | false | true | 1 | 11 | 219 | 162 | 83 | 79 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/05/05.08.03-does-it-compile.hs | mit | c = a b 10 | 10 | c = a b 10 | 10 | c = a b 10 | 10 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
nbrunt/JSHOP | res/hjs-0.2.1/src/HJS/Parser/Prim.hs | mit | equal :: Token -> JSParser ()
equal test = mytoken (\tok -> if tok == test then Just () else Nothing) | 102 | equal :: Token -> JSParser ()
equal test = mytoken (\tok -> if tok == test then Just () else Nothing) | 101 | equal test = mytoken (\tok -> if tok == test then Just () else Nothing) | 71 | false | true | 0 | 10 | 21 | 51 | 26 | 25 | null | null |
tpsinnem/Idris-dev | src/Idris/Core/Unify.hs | bsd-3-clause | recoverable (P (TCon _ _) x _) (Constant _) = False | 51 | recoverable (P (TCon _ _) x _) (Constant _) = False | 51 | recoverable (P (TCon _ _) x _) (Constant _) = False | 51 | false | false | 0 | 8 | 10 | 37 | 17 | 20 | null | null |
flocc-net/flocc | v0.1/Compiler/Front/ExprTree.hs | apache-2.0 | replaceExprIdsOnly :: Monad m => (Expr -> Bool) -> Expr -> StateT (Map Idx Idx) (StateT IdxSet m) Expr
replaceExprIdsOnly predicate exp = if not (predicate exp) then return exp else case exp of
(Lit i v) -> do i' <- saveNewExprId i; return (Lit i' v)
(Var i v s) -> do
i' <- saveNewExprId i
return (Var i' v ... | 2,095 | replaceExprIdsOnly :: Monad m => (Expr -> Bool) -> Expr -> StateT (Map Idx Idx) (StateT IdxSet m) Expr
replaceExprIdsOnly predicate exp = if not (predicate exp) then return exp else case exp of
(Lit i v) -> do i' <- saveNewExprId i; return (Lit i' v)
(Var i v s) -> do
i' <- saveNewExprId i
return (Var i' v ... | 2,095 | replaceExprIdsOnly predicate exp = if not (predicate exp) then return exp else case exp of
(Lit i v) -> do i' <- saveNewExprId i; return (Lit i' v)
(Var i v s) -> do
i' <- saveNewExprId i
return (Var i' v s)
(Tup i l) -> do
i' <- saveNewExprId i
l' <- mapM recur l
return (Tup i' l')
(Rel i l... | 1,992 | false | true | 8 | 10 | 570 | 570 | 258 | 312 | null | null |
sellerlabs/haskell-workshop | src/FinalReddit.hs | bsd-3-clause | viewAll :: Listing -> Html ()
viewAll listing = do
bootstrap
container_ (viewListing listing) | 97 | viewAll :: Listing -> Html ()
viewAll listing = do
bootstrap
container_ (viewListing listing) | 97 | viewAll listing = do
bootstrap
container_ (viewListing listing) | 67 | false | true | 0 | 9 | 17 | 38 | 17 | 21 | null | null |
orbitgray/ProjectEuler | haskell/common/Combinations.hs | lgpl-3.0 | filter_unique_sorted (x1:x2:[])
| x1 == x2 = [x1]
| otherwise = (x1:x2:[]) | 82 | filter_unique_sorted (x1:x2:[])
| x1 == x2 = [x1]
| otherwise = (x1:x2:[]) | 82 | filter_unique_sorted (x1:x2:[])
| x1 == x2 = [x1]
| otherwise = (x1:x2:[]) | 82 | false | false | 1 | 9 | 19 | 56 | 28 | 28 | null | null |
altschuler/kite | src/Kite/Syntax.hs | mit | prettyExpr (PLambda ide expr) = "|" ++ ide ++ "| -> {\n" ++ (prettyExpr expr) ++ "\n}" | 87 | prettyExpr (PLambda ide expr) = "|" ++ ide ++ "| -> {\n" ++ (prettyExpr expr) ++ "\n}" | 87 | prettyExpr (PLambda ide expr) = "|" ++ ide ++ "| -> {\n" ++ (prettyExpr expr) ++ "\n}" | 87 | false | false | 0 | 8 | 17 | 39 | 19 | 20 | null | null |
schell/blocks | src/Game/Block.hs | bsd-3-clause | blockZ :: Block
blockZ = Block TZ (0,0) [[True, True, False]
,[False, True, True]
] | 131 | blockZ :: Block
blockZ = Block TZ (0,0) [[True, True, False]
,[False, True, True]
] | 131 | blockZ = Block TZ (0,0) [[True, True, False]
,[False, True, True]
] | 115 | false | true | 0 | 7 | 62 | 48 | 29 | 19 | null | null |
gianlucagiorgolo/glue-xle | Parsers.hs | mit | template :: Parsec String [Argument] Template
template = do
spaces
name <- templateName
spaces
args <- arguments
putState args -- we store the list of argument names
spaces
char '='
raw <- many1 $ try templateSpacingToken <|> try templateStringToken <|> try templateSeparatorToken <|> (te... | 430 | template :: Parsec String [Argument] Template
template = do
spaces
name <- templateName
spaces
args <- arguments
putState args -- we store the list of argument names
spaces
char '='
raw <- many1 $ try templateSpacingToken <|> try templateStringToken <|> try templateSeparatorToken <|> (te... | 430 | template = do
spaces
name <- templateName
spaces
args <- arguments
putState args -- we store the list of argument names
spaces
char '='
raw <- many1 $ try templateSpacingToken <|> try templateStringToken <|> try templateSeparatorToken <|> (templateCall >>= \x -> return $ TemplateCallToke... | 384 | false | true | 0 | 13 | 103 | 131 | 58 | 73 | null | null |
music-suite/music-score | src/Music/Time/Score.hs | bsd-3-clause | removeRests :: Score (Maybe a) -> Score a
removeRests = mcatMaybes | 66 | removeRests :: Score (Maybe a) -> Score a
removeRests = mcatMaybes | 66 | removeRests = mcatMaybes | 24 | false | true | 0 | 8 | 10 | 27 | 13 | 14 | null | null |
neothemachine/monadiccp | src/Control/CP/FD/FD.hs | bsd-3-clause | getIntVal_ :: FDSolver s => EGVarId -> FDState s -> Maybe EGPar
getIntVal_ id s =
let r1 =
case Map.lookup id (fdsIntVars s) of
Nothing -> Nothing
Just x -> fdspIntVal x
in case r1 of
Nothing ->
let Just j = fdsModel s
ei = findEdge j EGIntType id (==... | 538 | getIntVal_ :: FDSolver s => EGVarId -> FDState s -> Maybe EGPar
getIntVal_ id s =
let r1 =
case Map.lookup id (fdsIntVars s) of
Nothing -> Nothing
Just x -> fdspIntVal x
in case r1 of
Nothing ->
let Just j = fdsModel s
ei = findEdge j EGIntType id (==... | 538 | getIntVal_ id s =
let r1 =
case Map.lookup id (fdsIntVars s) of
Nothing -> Nothing
Just x -> fdspIntVal x
in case r1 of
Nothing ->
let Just j = fdsModel s
ei = findEdge j EGIntType id (==0) (\x -> case x of { EGIntValue _ -> True; _ -> False })
... | 474 | false | true | 1 | 20 | 213 | 213 | 104 | 109 | null | null |
lzlarryli/advent_of_code_2016 | day1/part1.hs | mit | move facing x y ((turn, numSteps):ss)
| facing' == N = move facing' (x + numSteps) y ss
| facing' == S = move facing' (x - numSteps) y ss
| facing' == E = move facing' x (y + numSteps) ss
| facing' == W = move facing' x (y - numSteps) ss
where
facing' = turnMap Map.! (facing, turn) | 296 | move facing x y ((turn, numSteps):ss)
| facing' == N = move facing' (x + numSteps) y ss
| facing' == S = move facing' (x - numSteps) y ss
| facing' == E = move facing' x (y + numSteps) ss
| facing' == W = move facing' x (y - numSteps) ss
where
facing' = turnMap Map.! (facing, turn) | 296 | move facing x y ((turn, numSteps):ss)
| facing' == N = move facing' (x + numSteps) y ss
| facing' == S = move facing' (x - numSteps) y ss
| facing' == E = move facing' x (y + numSteps) ss
| facing' == W = move facing' x (y - numSteps) ss
where
facing' = turnMap Map.! (facing, turn) | 296 | false | false | 1 | 8 | 74 | 175 | 83 | 92 | null | null |
HaskellForCats/HaskellForCats | wrapHello.hs | mit | app :: Application
app _req sendResponse = sendResponse $ responseBuilder
status200
[("Content-Type", "text/plain")]
(renderHtmlBuilder myPage) | 217 | app :: Application
app _req sendResponse = sendResponse $ responseBuilder
status200
[("Content-Type", "text/plain")]
(renderHtmlBuilder myPage) | 216 | app _req sendResponse = sendResponse $ responseBuilder
status200
[("Content-Type", "text/plain")]
(renderHtmlBuilder myPage) | 197 | false | true | 0 | 8 | 88 | 42 | 22 | 20 | null | null |
danoctavian/bit-smuggler | BitSmuggler/src/Network/BitSmuggler/Proxy/Server.hs | gpl-2.0 | defaultBTConfig = BTClientConfig {
pubBitTorrentPort = 7881
, socksProxyPort = 3001
, revProxyPort = 3002
, cmdPort = 9000 -- port on which it's receiving commands
-- host, port, (uname, password)
, connectToClient = uTorrentConnect
} | 250 | defaultBTConfig = BTClientConfig {
pubBitTorrentPort = 7881
, socksProxyPort = 3001
, revProxyPort = 3002
, cmdPort = 9000 -- port on which it's receiving commands
-- host, port, (uname, password)
, connectToClient = uTorrentConnect
} | 250 | defaultBTConfig = BTClientConfig {
pubBitTorrentPort = 7881
, socksProxyPort = 3001
, revProxyPort = 3002
, cmdPort = 9000 -- port on which it's receiving commands
-- host, port, (uname, password)
, connectToClient = uTorrentConnect
} | 250 | false | false | 1 | 7 | 51 | 47 | 27 | 20 | null | null |
purcell/adventofcodeteam | app/TwentyTwo.hs | bsd-3-clause | addPlayerBonus :: Player -> Char -> Effect -> Int -> Player
addPlayerBonus (stats, effects, bonuses) key effect duration = (stats, effects, (bonuses ++ [(key, duration, effect)])) | 179 | addPlayerBonus :: Player -> Char -> Effect -> Int -> Player
addPlayerBonus (stats, effects, bonuses) key effect duration = (stats, effects, (bonuses ++ [(key, duration, effect)])) | 179 | addPlayerBonus (stats, effects, bonuses) key effect duration = (stats, effects, (bonuses ++ [(key, duration, effect)])) | 119 | false | true | 0 | 11 | 25 | 79 | 43 | 36 | null | null |
triplepointfive/hogldev | tutorial22/Tutorial22.hs | mit | specialKeyboardCB :: IORef Camera -> SpecialCallback
specialKeyboardCB cameraRef key _ = cameraRef $~! cameraOnKeyboard key | 123 | specialKeyboardCB :: IORef Camera -> SpecialCallback
specialKeyboardCB cameraRef key _ = cameraRef $~! cameraOnKeyboard key | 123 | specialKeyboardCB cameraRef key _ = cameraRef $~! cameraOnKeyboard key | 70 | false | true | 0 | 7 | 14 | 37 | 16 | 21 | null | null |
CulpaBS/wbBach | src/Futhark/CodeGen/Backends/SimpleRepresentation.hs | bsd-3-clause | floatTypeToCType :: FloatType -> C.Type
floatTypeToCType Float32 = [C.cty|float|] | 81 | floatTypeToCType :: FloatType -> C.Type
floatTypeToCType Float32 = [C.cty|float|] | 81 | floatTypeToCType Float32 = [C.cty|float|] | 41 | false | true | 0 | 8 | 8 | 32 | 16 | 16 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Locations/Operations/Cancel.hs | mpl-2.0 | -- | Multipart request metadata.
olocPayload :: Lens' OrganizationsLocationsOperationsCancel CancelOperationRequest
olocPayload
= lens _olocPayload (\ s a -> s{_olocPayload = a}) | 180 | olocPayload :: Lens' OrganizationsLocationsOperationsCancel CancelOperationRequest
olocPayload
= lens _olocPayload (\ s a -> s{_olocPayload = a}) | 147 | olocPayload
= lens _olocPayload (\ s a -> s{_olocPayload = a}) | 64 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
dalaing/type-systems | src/Fragment/Tuple/Helpers.hs | bsd-3-clause | tmTupleIx :: AsTmTuple ki ty pt tm => Term ki ty pt tm a -> Int -> Term ki ty pt tm a
tmTupleIx = curry $ review _TmTupleIx | 123 | tmTupleIx :: AsTmTuple ki ty pt tm => Term ki ty pt tm a -> Int -> Term ki ty pt tm a
tmTupleIx = curry $ review _TmTupleIx | 123 | tmTupleIx = curry $ review _TmTupleIx | 37 | false | true | 2 | 9 | 28 | 67 | 30 | 37 | null | null |
vedgar/mlr | Haskell/2017K1rj/Z3rj.hs | unlicense | f = Application (FuncS 'f' Nothing) | 35 | f = Application (FuncS 'f' Nothing) | 35 | f = Application (FuncS 'f' Nothing) | 35 | false | false | 1 | 7 | 5 | 20 | 8 | 12 | null | null |
infotroph/pandoc-crossref | lib/Text/Pandoc/CrossRef/References/Refs.hs | gpl-2.0 | replaceRefs _ x = return x | 26 | replaceRefs _ x = return x | 26 | replaceRefs _ x = return x | 26 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
AlexeyRaga/eta | compiler/ETA/Main/HscTypes.hs | bsd-3-clause | plusWarns (WarnAll t) _ = WarnAll t | 35 | plusWarns (WarnAll t) _ = WarnAll t | 35 | plusWarns (WarnAll t) _ = WarnAll t | 35 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
tjakway/ghcjvm | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | -- Matches: (x + offset) + (y << shift)
getAmode' _ (CmmMachOp (MO_Add _) [CmmRegOff x offset,
CmmMachOp (MO_Shl _)
[y, CmmLit (CmmInt shift _)]])
| shift == 0 || shift == 1 || shift == 2 || shift == 3
= x86_complex_amode (CmmReg x) y shift ... | 341 | getAmode' _ (CmmMachOp (MO_Add _) [CmmRegOff x offset,
CmmMachOp (MO_Shl _)
[y, CmmLit (CmmInt shift _)]])
| shift == 0 || shift == 1 || shift == 2 || shift == 3
= x86_complex_amode (CmmReg x) y shift (fromIntegral offset) | 301 | getAmode' _ (CmmMachOp (MO_Add _) [CmmRegOff x offset,
CmmMachOp (MO_Shl _)
[y, CmmLit (CmmInt shift _)]])
| shift == 0 || shift == 1 || shift == 2 || shift == 3
= x86_complex_amode (CmmReg x) y shift (fromIntegral offset) | 301 | true | false | 1 | 14 | 127 | 125 | 59 | 66 | null | null |
CulpaBS/wbBach | src/Futhark/CodeGen/Backends/COpenCL.hs | bsd-3-clause | copyOpenCLMemory destmem destidx (Space "device") srcmem srcidx (Space "device") nbytes =
-- Be aware that OpenCL swaps the usual order of operands for
-- memcpy()-like functions. The order below is not a typo.
GenericC.stm [C.cstm|{
if ($exp:nbytes > 0) {
OPENCL_SUCCEED(
clEnqueueCopyBuffer(fu... | 617 | copyOpenCLMemory destmem destidx (Space "device") srcmem srcidx (Space "device") nbytes =
-- Be aware that OpenCL swaps the usual order of operands for
-- memcpy()-like functions. The order below is not a typo.
GenericC.stm [C.cstm|{
if ($exp:nbytes > 0) {
OPENCL_SUCCEED(
clEnqueueCopyBuffer(fu... | 617 | copyOpenCLMemory destmem destidx (Space "device") srcmem srcidx (Space "device") nbytes =
-- Be aware that OpenCL swaps the usual order of operands for
-- memcpy()-like functions. The order below is not a typo.
GenericC.stm [C.cstm|{
if ($exp:nbytes > 0) {
OPENCL_SUCCEED(
clEnqueueCopyBuffer(fu... | 617 | false | false | 0 | 7 | 219 | 46 | 25 | 21 | null | null |
agrafix/hackmanager | app/Main.hs | bsd-3-clause | withProjectInfo :: (ProjectInfo -> IO ()) -> IO ()
withProjectInfo cont =
do raw <- getProjectInfo
case raw of
Left err ->
putStrLn err
Right pinfo ->
cont pinfo | 216 | withProjectInfo :: (ProjectInfo -> IO ()) -> IO ()
withProjectInfo cont =
do raw <- getProjectInfo
case raw of
Left err ->
putStrLn err
Right pinfo ->
cont pinfo | 216 | withProjectInfo cont =
do raw <- getProjectInfo
case raw of
Left err ->
putStrLn err
Right pinfo ->
cont pinfo | 165 | false | true | 0 | 10 | 83 | 73 | 33 | 40 | null | null |
shepheb/hork | Hork/Header.hs | bsd-3-clause | hdrOBJTABLE = 0xA | 17 | hdrOBJTABLE = 0xA | 17 | hdrOBJTABLE = 0xA | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
bruno-cadorette/TheLambdaReactor | test/BackendSpec/CharacterSpec.hs | mit | spec :: Spec
spec = describe "Character" $ do
it "hp" $ do
hp (Entity 15 (Location (V2 1 1) (V2 1 1))) `shouldBe` 15
it "position" $ do
(position $ location (Entity 15 (Location (V2 1 1) (V2 1 1)))) `shouldBe` (V2 1 1)
it "isDead" $ do
isDead (Entity 15 (Location (V... | 714 | spec :: Spec
spec = describe "Character" $ do
it "hp" $ do
hp (Entity 15 (Location (V2 1 1) (V2 1 1))) `shouldBe` 15
it "position" $ do
(position $ location (Entity 15 (Location (V2 1 1) (V2 1 1)))) `shouldBe` (V2 1 1)
it "isDead" $ do
isDead (Entity 15 (Location (V... | 714 | spec = describe "Character" $ do
it "hp" $ do
hp (Entity 15 (Location (V2 1 1) (V2 1 1))) `shouldBe` 15
it "position" $ do
(position $ location (Entity 15 (Location (V2 1 1) (V2 1 1)))) `shouldBe` (V2 1 1)
it "isDead" $ do
isDead (Entity 15 (Location (V2 1 1) (V2 1 ... | 701 | false | true | 0 | 28 | 229 | 412 | 199 | 213 | null | null |
vkomenda/CoALP | lib/CoALP/Tree.hs | lgpl-3.0 | initTree :: (Int, Int) -> Term1 -> TreeOper1
initTree bounds a =
NodeOper a $ Array.listArray bounds (repeat $ Left ToBeMatched) | 130 | initTree :: (Int, Int) -> Term1 -> TreeOper1
initTree bounds a =
NodeOper a $ Array.listArray bounds (repeat $ Left ToBeMatched) | 130 | initTree bounds a =
NodeOper a $ Array.listArray bounds (repeat $ Left ToBeMatched) | 85 | false | true | 2 | 8 | 22 | 59 | 28 | 31 | null | null |
dhess/free-experiments | src/RetryTH.hs | bsd-3-clause | main :: IO ()
main = runRetry test | 34 | main :: IO ()
main = runRetry test | 34 | main = runRetry test | 20 | false | true | 0 | 7 | 7 | 24 | 10 | 14 | null | null |
lukexi/ghc | libraries/base/System/IO.hs | bsd-3-clause | -- | Write a string to the standard output device
-- (same as 'hPutStr' 'stdout').
putStr :: String -> IO ()
putStr s = hPutStr stdout s | 154 | putStr :: String -> IO ()
putStr s = hPutStr stdout s | 70 | putStr s = hPutStr stdout s | 35 | true | true | 0 | 8 | 44 | 36 | 16 | 20 | null | null |
rleshchinskiy/vector | Data/Vector/Primitive.hs | bsd-3-clause | indexM = G.indexM | 17 | indexM = G.indexM | 17 | indexM = G.indexM | 17 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
urbanslug/ghc | compiler/codeGen/StgCmmMonad.hs | bsd-3-clause | -- ----------------------------------------------------------------------------
-- turn CmmAGraph into CmmGraph, for making a new proc.
aGraphToGraph :: CmmAGraphScoped -> FCode CmmGraph
aGraphToGraph stmts
= do { l <- newLabelC
; return (labelAGraph l stmts) } | 273 | aGraphToGraph :: CmmAGraphScoped -> FCode CmmGraph
aGraphToGraph stmts
= do { l <- newLabelC
; return (labelAGraph l stmts) } | 136 | aGraphToGraph stmts
= do { l <- newLabelC
; return (labelAGraph l stmts) } | 85 | true | true | 0 | 9 | 43 | 47 | 24 | 23 | null | null |
tolysz/yesod | yesod-core/Yesod/Core/Internal/Run.hs | mit | -- | Determine if an exception is asynchronous
--
-- Also worth being upstream
isAsyncException :: E.SomeException -> Bool
isAsyncException e =
case fromException e of
Just E.SomeAsyncException{} -> True
Nothing -> False
-- | Convert an exception into an ErrorResponse | 289 | isAsyncException :: E.SomeException -> Bool
isAsyncException e =
case fromException e of
Just E.SomeAsyncException{} -> True
Nothing -> False
-- | Convert an exception into an ErrorResponse | 210 | isAsyncException e =
case fromException e of
Just E.SomeAsyncException{} -> True
Nothing -> False
-- | Convert an exception into an ErrorResponse | 166 | true | true | 0 | 10 | 61 | 58 | 28 | 30 | null | null |
xpika/Time-Console | Main.hs | gpl-2.0 | sequenceWhileTrue (m:ms) = do
r <- m
if r then m >> sequenceWhileTrue ms
else return () | 142 | sequenceWhileTrue (m:ms) = do
r <- m
if r then m >> sequenceWhileTrue ms
else return () | 142 | sequenceWhileTrue (m:ms) = do
r <- m
if r then m >> sequenceWhileTrue ms
else return () | 142 | false | false | 0 | 9 | 71 | 46 | 22 | 24 | null | null |
gridaphobe/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | -- | Conditional branch
genCondBranch :: CmmExpr -> BlockId -> BlockId -> LlvmM StmtData
genCondBranch cond idT idF = do
let labelT = blockIdToLlvm idT
let labelF = blockIdToLlvm idF
-- See Note [Literals and branch conditions].
(vc, stmts, top) <- exprToVarOpt i1Option cond
if getVarType vc == i1
... | 2,014 | genCondBranch :: CmmExpr -> BlockId -> BlockId -> LlvmM StmtData
genCondBranch cond idT idF = do
let labelT = blockIdToLlvm idT
let labelF = blockIdToLlvm idF
-- See Note [Literals and branch conditions].
(vc, stmts, top) <- exprToVarOpt i1Option cond
if getVarType vc == i1
then do
... | 1,990 | genCondBranch cond idT idF = do
let labelT = blockIdToLlvm idT
let labelF = blockIdToLlvm idF
-- See Note [Literals and branch conditions].
(vc, stmts, top) <- exprToVarOpt i1Option cond
if getVarType vc == i1
then do
let s1 = BranchIf vc labelT labelF
return (stmts `... | 1,925 | true | true | 0 | 14 | 482 | 167 | 82 | 85 | null | null |
gcampax/ghc | compiler/utils/Util.hs | bsd-3-clause | leLength :: [a] -> [b] -> Bool
-- ^ True if length xs <= length ys
leLength xs ys = case compareLength xs ys of
LT -> True
EQ -> True
GT -> False
---------------------------- | 232 | leLength :: [a] -> [b] -> Bool
leLength xs ys = case compareLength xs ys of
LT -> True
EQ -> True
GT -> False
---------------------------- | 196 | leLength xs ys = case compareLength xs ys of
LT -> True
EQ -> True
GT -> False
---------------------------- | 165 | true | true | 0 | 8 | 92 | 65 | 32 | 33 | null | null |
wavewave/cmdmanager | exe/cmdmanager.hs | bsd-3-clause | test_tickingevent :: IO ()
test_tickingevent = do
dref <- newEmptyMVar :: IO (MVar (Driver IO ()))
let logger = simplelogger -- weblogger "http://127.0.0.1:7800"
putMVar dref (driver logger world (eventHandler dref))
putStrLn "starting ticking"
ticking dref 0 | 286 | test_tickingevent :: IO ()
test_tickingevent = do
dref <- newEmptyMVar :: IO (MVar (Driver IO ()))
let logger = simplelogger -- weblogger "http://127.0.0.1:7800"
putMVar dref (driver logger world (eventHandler dref))
putStrLn "starting ticking"
ticking dref 0 | 285 | test_tickingevent = do
dref <- newEmptyMVar :: IO (MVar (Driver IO ()))
let logger = simplelogger -- weblogger "http://127.0.0.1:7800"
putMVar dref (driver logger world (eventHandler dref))
putStrLn "starting ticking"
ticking dref 0 | 258 | false | true | 0 | 14 | 62 | 99 | 44 | 55 | null | null |
lefant/kurt | src/Kurt/MainLoop.hs | gpl-3.0 | loop :: EngineState -> IO ()
loop oldState =
do
input <- getLine
let parseResult = pureParseCommand input commandargparserlist
case parseResult of
Left err ->
do
putStrLn $ "? Couldn't parse command: " ++ show err
putStrLn ""
loop oldSt... | 1,281 | loop :: EngineState -> IO ()
loop oldState =
do
input <- getLine
let parseResult = pureParseCommand input commandargparserlist
case parseResult of
Left err ->
do
putStrLn $ "? Couldn't parse command: " ++ show err
putStrLn ""
loop oldSt... | 1,281 | loop oldState =
do
input <- getLine
let parseResult = pureParseCommand input commandargparserlist
case parseResult of
Left err ->
do
putStrLn $ "? Couldn't parse command: " ++ show err
putStrLn ""
loop oldState
Right (maybeId, C... | 1,252 | false | true | 1 | 25 | 688 | 273 | 120 | 153 | null | null |
damoxc/ganeti | test/hs/Test/Ganeti/OpCodes.hs | gpl-2.0 | -- | Generates a list of node names in non-empty string type.
genNodeNamesNE :: Gen [NonEmptyString]
genNodeNamesNE = genNodeNames >>= mapM mkNonEmpty | 150 | genNodeNamesNE :: Gen [NonEmptyString]
genNodeNamesNE = genNodeNames >>= mapM mkNonEmpty | 88 | genNodeNamesNE = genNodeNames >>= mapM mkNonEmpty | 49 | true | true | 0 | 6 | 21 | 25 | 13 | 12 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Frontend/ANSI.hs | bsd-3-clause | colorTranslate Color.BrBlue = (ANSI.Vivid, ANSI.Blue) | 56 | colorTranslate Color.BrBlue = (ANSI.Vivid, ANSI.Blue) | 56 | colorTranslate Color.BrBlue = (ANSI.Vivid, ANSI.Blue) | 56 | false | false | 0 | 6 | 7 | 21 | 11 | 10 | null | null |
ivan-m/keyless-entry | bench/KeylessBenchmark.hs | bsd-3-clause | mkSimpleBenchGroup' :: String -> (forall c . (NFKeyless c) => c Int -> c Int)
-> Benchmark
mkSimpleBenchGroup' nm f = mkSimpleBenchGroup nm $ K . f | 170 | mkSimpleBenchGroup' :: String -> (forall c . (NFKeyless c) => c Int -> c Int)
-> Benchmark
mkSimpleBenchGroup' nm f = mkSimpleBenchGroup nm $ K . f | 170 | mkSimpleBenchGroup' nm f = mkSimpleBenchGroup nm $ K . f | 56 | false | true | 0 | 11 | 49 | 62 | 31 | 31 | null | null |
jfranklin9000/urbit | pkg/hs/urbit-king/lib/Urbit/Vere/Ames.hs | mit | galaxyPort Real (Patp g) = fromIntegral g + 13337 | 54 | galaxyPort Real (Patp g) = fromIntegral g + 13337 | 54 | galaxyPort Real (Patp g) = fromIntegral g + 13337 | 54 | false | false | 0 | 7 | 13 | 24 | 11 | 13 | null | null |
diflying/logitext | Coq.hs | bsd-3-clause | -- operconstr:
-- 200 RIGHTA binder_constr
-- 100 RIGHTA operconstr.10 ":" binder_constr
-- operconstr.10 ":" operconstr.100
-- 10 LEFTA operconstr.0 appl_arg+ // this one might be wrong, see what we're using
-- "@" global operconstr.0*
-- 0 atomic_constr
-- "(" operco... | 369 | term :: P Term
term = operconstr200 | 35 | term = operconstr200 | 20 | true | true | 0 | 5 | 100 | 22 | 15 | 7 | null | null |
christiaanb/SoOSiM-components | src/SoOSiM/Components/ResourceManager/Behaviour.hs | mit | behaviour s (Message _ (GetResourceDescription rId) retAddr) = do
let rdM = HashMap.lookup rId (resources s)
respond ResourceManager retAddr (RM_Descriptor rdM)
yield s | 174 | behaviour s (Message _ (GetResourceDescription rId) retAddr) = do
let rdM = HashMap.lookup rId (resources s)
respond ResourceManager retAddr (RM_Descriptor rdM)
yield s | 174 | behaviour s (Message _ (GetResourceDescription rId) retAddr) = do
let rdM = HashMap.lookup rId (resources s)
respond ResourceManager retAddr (RM_Descriptor rdM)
yield s | 174 | false | false | 0 | 12 | 28 | 71 | 32 | 39 | null | null |
keithodulaigh/Hets | HasCASL/InteractiveTests.hs | gpl-2.0 | infoEntry :: GlobalEntry -> Doc
infoEntry ge = case ge of
SpecEntry egs -> text "SpecEntry" <+> parens (infoEGS egs)
ViewOrStructEntry b evs -> text $ (if b then "View" else "Struct")
++ "Entry"
UnitEntry us -> text "UnitEntry"
ArchOrRefEntry b rs -> text $ (if b then "Arch" else "Ref")
... | 338 | infoEntry :: GlobalEntry -> Doc
infoEntry ge = case ge of
SpecEntry egs -> text "SpecEntry" <+> parens (infoEGS egs)
ViewOrStructEntry b evs -> text $ (if b then "View" else "Struct")
++ "Entry"
UnitEntry us -> text "UnitEntry"
ArchOrRefEntry b rs -> text $ (if b then "Arch" else "Ref")
... | 338 | infoEntry ge = case ge of
SpecEntry egs -> text "SpecEntry" <+> parens (infoEGS egs)
ViewOrStructEntry b evs -> text $ (if b then "View" else "Struct")
++ "Entry"
UnitEntry us -> text "UnitEntry"
ArchOrRefEntry b rs -> text $ (if b then "Arch" else "Ref")
++ "Entry" | 306 | false | true | 0 | 11 | 92 | 119 | 59 | 60 | null | null |
filib/ruby-marshal | src/Data/Ruby/Marshal/Encoding.hs | mit | toEnc "UTF-32BE" = UTF_32BE | 45 | toEnc "UTF-32BE" = UTF_32BE | 45 | toEnc "UTF-32BE" = UTF_32BE | 45 | false | false | 0 | 5 | 21 | 9 | 4 | 5 | null | null |
ocharles/hs-quake-3 | Quake3/Shader/TypeCheck.hs | bsd-3-clause | tcFactor s = Failure ["Unknown blending factor: " ++ s] | 55 | tcFactor s = Failure ["Unknown blending factor: " ++ s] | 55 | tcFactor s = Failure ["Unknown blending factor: " ++ s] | 55 | false | false | 1 | 7 | 9 | 23 | 9 | 14 | null | null |
erikd/yesod | yesod-auth/Yesod/Auth.hs | mit | maybeAuth :: ( YesodAuthPersist master
, val ~ AuthEntity master
, Key val ~ AuthId master
, PersistEntity val
, Typeable val
) => HandlerT master IO (Maybe (Entity val))
maybeAuth = runMaybeT $ do
(aid, ae) <- MaybeT maybeAuthPair
return $ Entity... | 439 | maybeAuth :: ( YesodAuthPersist master
, val ~ AuthEntity master
, Key val ~ AuthId master
, PersistEntity val
, Typeable val
) => HandlerT master IO (Maybe (Entity val))
maybeAuth = runMaybeT $ do
(aid, ae) <- MaybeT maybeAuthPair
return $ Entity... | 439 | maybeAuth = runMaybeT $ do
(aid, ae) <- MaybeT maybeAuthPair
return $ Entity aid ae
-- | Similar to 'maybeAuth', but doesn’t assume that you are using a
-- Persistent database.
--
-- Since 1.4.0 | 203 | false | true | 0 | 10 | 138 | 112 | 56 | 56 | null | null |
m4dc4p/haskelldb | examples/DB1/Double_tbl.hs | bsd-3-clause | f01 :: Attr F01 (Maybe Double)
f01 = mkAttr F01 | 47 | f01 :: Attr F01 (Maybe Double)
f01 = mkAttr F01 | 47 | f01 = mkAttr F01 | 16 | false | true | 2 | 6 | 9 | 33 | 12 | 21 | null | null |
craigbilner/advent-of-code-2016 | day-2.hs | apache-2.0 | keyPad2 :: KeyPad
keyPad2 = [ ['0', '0', '0', '0', '0', '0', '0']
, ['0', '0', '0', '1', '0', '0', '0']
, ['0', '0', '2', '3', '4', '0', '0']
, ['0', '5', '6', '7', '8', '9', '0']
, ['0', '0', 'A', 'B', 'C', '0', '0']
, ['0', '0', '0', 'D', '0', '0', '0']
, ['... | 365 | keyPad2 :: KeyPad
keyPad2 = [ ['0', '0', '0', '0', '0', '0', '0']
, ['0', '0', '0', '1', '0', '0', '0']
, ['0', '0', '2', '3', '4', '0', '0']
, ['0', '5', '6', '7', '8', '9', '0']
, ['0', '0', 'A', 'B', 'C', '0', '0']
, ['0', '0', '0', 'D', '0', '0', '0']
, ['... | 365 | keyPad2 = [ ['0', '0', '0', '0', '0', '0', '0']
, ['0', '0', '0', '1', '0', '0', '0']
, ['0', '0', '2', '3', '4', '0', '0']
, ['0', '5', '6', '7', '8', '9', '0']
, ['0', '0', 'A', 'B', 'C', '0', '0']
, ['0', '0', '0', 'D', '0', '0', '0']
, ['0', '0', '0', '0',... | 347 | false | true | 0 | 6 | 131 | 179 | 118 | 61 | null | null |
nomeata/sat-britney | Data/DenseIntSet.hs | gpl-2.0 | natFromInt :: Int -> Nat
natFromInt i = fromIntegral i | 54 | natFromInt :: Int -> Nat
natFromInt i = fromIntegral i | 54 | natFromInt i = fromIntegral i | 29 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
janschulz/pandoc | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | numElemToNum :: NameSpaces -> Element -> Maybe Numb
numElemToNum ns element |
qName (elName element) == "num" &&
qURI (elName element) == (lookup "w" ns) = do
numId <- findAttr (QName "numId" (lookup "w" ns) (Just "w")) element
absNumId <- findChild (QName "abstractNumId" (lookup "w" ns) (Just "w")) element... | 423 | numElemToNum :: NameSpaces -> Element -> Maybe Numb
numElemToNum ns element |
qName (elName element) == "num" &&
qURI (elName element) == (lookup "w" ns) = do
numId <- findAttr (QName "numId" (lookup "w" ns) (Just "w")) element
absNumId <- findChild (QName "abstractNumId" (lookup "w" ns) (Just "w")) element... | 423 | numElemToNum ns element |
qName (elName element) == "num" &&
qURI (elName element) == (lookup "w" ns) = do
numId <- findAttr (QName "numId" (lookup "w" ns) (Just "w")) element
absNumId <- findChild (QName "abstractNumId" (lookup "w" ns) (Just "w")) element
>>= findAttr (QName "val" (lookup "... | 371 | false | true | 0 | 14 | 94 | 186 | 87 | 99 | null | null |
ribag/ganeti-experiments | src/Ganeti/Errors.hs | gpl-2.0 | formatError (GenericError msg) =
"Unhandled Ganeti error: " ++ msg | 68 | formatError (GenericError msg) =
"Unhandled Ganeti error: " ++ msg | 68 | formatError (GenericError msg) =
"Unhandled Ganeti error: " ++ msg | 68 | false | false | 0 | 7 | 11 | 19 | 9 | 10 | null | null |
ibotty/pipes-text | src/Pipes/Text.hs | bsd-3-clause | any :: Monad m => (Char -> Bool) -> Producer Text m () -> m Bool
any = P.any . T.any | 84 | any :: Monad m => (Char -> Bool) -> Producer Text m () -> m Bool
any = P.any . T.any | 84 | any = P.any . T.any | 19 | false | true | 0 | 10 | 20 | 59 | 27 | 32 | null | null |
cirquit/Personal-Repository | Haskell/Playground/AdventOfCode/advent-coding/src/Day11.hs | mit | genPW :: String -> [String]
genPW str = str' : genPW str'
where
str' = inc str
inc :: String -> String
inc [] = []
inc xs
| overflowed = inc (init xs) ++ [c]
| otherwise = init xs ++ [c]
where (c, overflowed) = succ' (last xs)
succ' '... | 483 | genPW :: String -> [String]
genPW str = str' : genPW str'
where
str' = inc str
inc :: String -> String
inc [] = []
inc xs
| overflowed = inc (init xs) ++ [c]
| otherwise = init xs ++ [c]
where (c, overflowed) = succ' (last xs)
succ' '... | 483 | genPW str = str' : genPW str'
where
str' = inc str
inc :: String -> String
inc [] = []
inc xs
| overflowed = inc (init xs) ++ [c]
| otherwise = init xs ++ [c]
where (c, overflowed) = succ' (last xs)
succ' 'z' = ('a' , True)
... | 455 | false | true | 16 | 8 | 207 | 200 | 106 | 94 | null | null |
dblia/nosql-ganeti | src/Ganeti/HTools/Types.hs | gpl-2.0 | -- | Initial empty utilisation.
zeroUtil :: DynUtil
zeroUtil = DynUtil { cpuWeight = 0, memWeight = 0
, dskWeight = 0, netWeight = 0 } | 153 | zeroUtil :: DynUtil
zeroUtil = DynUtil { cpuWeight = 0, memWeight = 0
, dskWeight = 0, netWeight = 0 } | 121 | zeroUtil = DynUtil { cpuWeight = 0, memWeight = 0
, dskWeight = 0, netWeight = 0 } | 101 | true | true | 0 | 7 | 44 | 45 | 25 | 20 | null | null |
da-x/ghc | compiler/ghci/ByteCodeItbls.hs | bsd-3-clause | byte6 w = fromIntegral (w `shiftR` 48) | 38 | byte6 w = fromIntegral (w `shiftR` 48) | 38 | byte6 w = fromIntegral (w `shiftR` 48) | 38 | false | false | 1 | 7 | 6 | 25 | 11 | 14 | null | null |
BartAdv/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyTTApp t [Constant (I i)]
| t == reflm "V" = return $ V i | 72 | reifyTTApp t [Constant (I i)]
| t == reflm "V" = return $ V i | 72 | reifyTTApp t [Constant (I i)]
| t == reflm "V" = return $ V i | 72 | false | false | 0 | 9 | 25 | 43 | 19 | 24 | null | null |
ideas-edu/ideas | src/Ideas/Common/Strategy/Abstract.hs | apache-2.0 | -- | Removes the label from a strategy
unlabel :: LabeledStrategy a -> Strategy a
unlabel (LS _ s) = s | 104 | unlabel :: LabeledStrategy a -> Strategy a
unlabel (LS _ s) = s | 63 | unlabel (LS _ s) = s | 20 | true | true | 0 | 6 | 22 | 37 | 17 | 20 | null | null |
yiannist/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pNodeSslCerts :: Field
pNodeSslCerts =
withDoc "Whether to renew node SSL certificates" .
defaultField [| False |] $
simpleField "node_certificates" [t| Bool |] | 166 | pNodeSslCerts :: Field
pNodeSslCerts =
withDoc "Whether to renew node SSL certificates" .
defaultField [| False |] $
simpleField "node_certificates" [t| Bool |] | 166 | pNodeSslCerts =
withDoc "Whether to renew node SSL certificates" .
defaultField [| False |] $
simpleField "node_certificates" [t| Bool |] | 143 | false | true | 0 | 7 | 28 | 37 | 21 | 16 | null | null |
michalt/cvector | Data/CVector/Unboxed.hs | bsd-3-clause | --
-- Indexing
--
indexed :: (Unbox a) => CVector a -> CVector (Int,a)
indexed = G.indexed | 91 | indexed :: (Unbox a) => CVector a -> CVector (Int,a)
indexed = G.indexed | 72 | indexed = G.indexed | 19 | true | true | 0 | 8 | 17 | 41 | 23 | 18 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The number of rows to be inserted. Maximum 20 per request.
itrrNumber :: Lens' InsertTableRowsRequest (Maybe Int32)
itrrNumber
= lens _itrrNumber (\ s a -> s{_itrrNumber = a}) .
mapping _Coerce | 206 | itrrNumber :: Lens' InsertTableRowsRequest (Maybe Int32)
itrrNumber
= lens _itrrNumber (\ s a -> s{_itrrNumber = a}) .
mapping _Coerce | 142 | itrrNumber
= lens _itrrNumber (\ s a -> s{_itrrNumber = a}) .
mapping _Coerce | 85 | true | true | 0 | 10 | 40 | 55 | 28 | 27 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexByteArrayOp_Int args = doIndexByteArrayOp Nothing (bWord dflags) res args | 115 | emitPrimOp dflags res IndexByteArrayOp_Int args = doIndexByteArrayOp Nothing (bWord dflags) res args | 115 | emitPrimOp dflags res IndexByteArrayOp_Int args = doIndexByteArrayOp Nothing (bWord dflags) res args | 115 | false | false | 0 | 7 | 26 | 34 | 14 | 20 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxCURSOR_PENCIL :: Int
wxCURSOR_PENCIL = 13 | 43 | wxCURSOR_PENCIL :: Int
wxCURSOR_PENCIL = 13 | 43 | wxCURSOR_PENCIL = 13 | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
prydonius/Oxo | Player.hs | mit | showPlayer X = "Player X" | 28 | showPlayer X = "Player X" | 28 | showPlayer X = "Player X" | 28 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
soponpunth/turtle-haskell | TurtleGraphics.hs | mit | getColorGraphic TRed = Red | 26 | getColorGraphic TRed = Red | 26 | getColorGraphic TRed = Red | 26 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
nicklawls/haskellbook | src/FoldyInstances.hs | bsd-3-clause | filterF :: (Applicative f, Foldable t, Monoid (f a)) => (a -> Bool) -> t a -> f a
filterF p = foldMap (\a -> if pope a then pure a else mempty) | 143 | filterF :: (Applicative f, Foldable t, Monoid (f a)) => (a -> Bool) -> t a -> f a
filterF p = foldMap (\a -> if pope a then pure a else mempty) | 143 | filterF p = foldMap (\a -> if pope a then pure a else mempty) | 61 | false | true | 0 | 9 | 32 | 87 | 44 | 43 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Hooks/WallpaperSetter.hs | bsd-2-clause | getPicPathsAndWSRects :: WallpaperConf -> X [(Rectangle, FilePath)]
getPicPathsAndWSRects wpconf = do
winset <- gets windowset
paths <- liftIO getPicPaths
visws <- getVisibleWorkspaces
let visscr = S.current winset : S.visible winset
visrects = M.fromList $ map (\x -> ((S.tag . S.workspace) x, S.screenDet... | 814 | getPicPathsAndWSRects :: WallpaperConf -> X [(Rectangle, FilePath)]
getPicPathsAndWSRects wpconf = do
winset <- gets windowset
paths <- liftIO getPicPaths
visws <- getVisibleWorkspaces
let visscr = S.current winset : S.visible winset
visrects = M.fromList $ map (\x -> ((S.tag . S.workspace) x, S.screenDet... | 814 | getPicPathsAndWSRects wpconf = do
winset <- gets windowset
paths <- liftIO getPicPaths
visws <- getVisibleWorkspaces
let visscr = S.current winset : S.visible winset
visrects = M.fromList $ map (\x -> ((S.tag . S.workspace) x, S.screenDetail x)) visscr
hasPicAndIsVisible (n, mp) = n `elem` visws && ... | 746 | false | true | 1 | 18 | 185 | 299 | 150 | 149 | null | null |
hanjoes/cis194 | hw3/HW03.hs | mit | evalSimple :: State -> DietStatement -> State
evalSimple s (DAssign name e) = extend s name $ evalE s e | 103 | evalSimple :: State -> DietStatement -> State
evalSimple s (DAssign name e) = extend s name $ evalE s e | 103 | evalSimple s (DAssign name e) = extend s name $ evalE s e | 57 | false | true | 0 | 7 | 19 | 46 | 22 | 24 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/network/Network/URI.hs | bsd-3-clause | isGenDelims c = c `elem` ":/?#[]@" | 34 | isGenDelims c = c `elem` ":/?#[]@" | 34 | isGenDelims c = c `elem` ":/?#[]@" | 34 | false | false | 0 | 5 | 5 | 15 | 8 | 7 | null | null |
josefs/autosar | oldARSim/tmp-ABS.hs | bsd-3-clause | pressure_step valve accel 20 = do
rte_write valve True
return Stopped | 85 | pressure_step valve accel 20 = do
rte_write valve True
return Stopped | 85 | pressure_step valve accel 20 = do
rte_write valve True
return Stopped | 85 | false | false | 0 | 7 | 26 | 27 | 11 | 16 | null | null |
s9gf4ult/yesod | yesod-core/test/YesodCoreTest/NoOverloadedStrings.hs | mit | getBarR :: MonadHandler m => m T.Text
getBarR = return $ T.pack "BarR" | 70 | getBarR :: MonadHandler m => m T.Text
getBarR = return $ T.pack "BarR" | 70 | getBarR = return $ T.pack "BarR" | 32 | false | true | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
ThreeFx/ETH | 1semester/diskmat/CurryHoward.hs | mit | -- assume the excluded middle
-- not provable in constructive logic
excluded_middle :: p \/ Not p
excluded_middle = assume | 125 | excluded_middle :: p \/ Not p
excluded_middle = assume | 54 | excluded_middle = assume | 24 | true | true | 0 | 6 | 22 | 20 | 11 | 9 | null | null |
genos/online_problems | advent_of_code_2016/day7/src/Main.hs | mit | input :: ByteString
input = $(embedFile "input.txt") | 52 | input :: ByteString
input = $(embedFile "input.txt") | 52 | input = $(embedFile "input.txt") | 32 | false | true | 0 | 7 | 6 | 18 | 9 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.