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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c089/haskell-craft3e | Chapter9.hs | mit | facAux :: Integer -> Integer -> Integer
facAux 0 p = p | 55 | facAux :: Integer -> Integer -> Integer
facAux 0 p = p | 54 | facAux 0 p = p | 14 | false | true | 0 | 6 | 12 | 24 | 12 | 12 | null | null |
ejlilley/AbstractMusic | LilyParse.hs | gpl-3.0 | parseBar = LilyBar <$> ((Nothing <$ (char '|'))
<|> (Just <$> (string "\\bar" *> spaces *> parseLitString))) | 132 | parseBar = LilyBar <$> ((Nothing <$ (char '|'))
<|> (Just <$> (string "\\bar" *> spaces *> parseLitString))) | 132 | parseBar = LilyBar <$> ((Nothing <$ (char '|'))
<|> (Just <$> (string "\\bar" *> spaces *> parseLitString))) | 132 | false | false | 0 | 13 | 40 | 51 | 27 | 24 | null | null |
corngood/cabal | Cabal/Distribution/Simple/GHC.hs | bsd-3-clause | buildOrReplLib :: Bool -> Verbosity -> Cabal.Flag (Maybe Int)
-> PackageDescription -> LocalBuildInfo
-> Library -> ComponentLocalBuildInfo -> IO ()
buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
libName <- case componentLibraries clbi of
[l... | 13,173 | buildOrReplLib :: Bool -> Verbosity -> Cabal.Flag (Maybe Int)
-> PackageDescription -> LocalBuildInfo
-> Library -> ComponentLocalBuildInfo -> IO ()
buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
libName <- case componentLibraries clbi of
[l... | 13,173 | buildOrReplLib forRepl verbosity numJobs pkg_descr lbi lib clbi = do
libName <- case componentLibraries clbi of
[libName] -> return libName
[] -> die "No library name found when building library"
_ -> die "Multiple library names found when building library"
let libTargetDir ... | 12,982 | false | true | 4 | 21 | 4,981 | 2,516 | 1,284 | 1,232 | null | null |
brendanhay/gogol | gogol-classroom/gen/Network/Google/Classroom/Types.hs | mpl-2.0 | -- | Receive notifications about your Google Classroom data
classroomPushNotificationsScope :: Proxy '["https://www.googleapis.com/auth/classroom.push-notifications"]
classroomPushNotificationsScope = Proxy | 206 | classroomPushNotificationsScope :: Proxy '["https://www.googleapis.com/auth/classroom.push-notifications"]
classroomPushNotificationsScope = Proxy | 146 | classroomPushNotificationsScope = Proxy | 39 | true | true | 0 | 7 | 15 | 20 | 11 | 9 | null | null |
gencer/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | cppTypeCustomAlloc scoped alloc (BT_Set element) = "std::set<" <>> elementTypeName element <<>> comparer element <<>> allocator scoped alloc element <<> ">" | 156 | cppTypeCustomAlloc scoped alloc (BT_Set element) = "std::set<" <>> elementTypeName element <<>> comparer element <<>> allocator scoped alloc element <<> ">" | 156 | cppTypeCustomAlloc scoped alloc (BT_Set element) = "std::set<" <>> elementTypeName element <<>> comparer element <<>> allocator scoped alloc element <<> ">" | 156 | false | false | 0 | 9 | 19 | 48 | 22 | 26 | null | null |
brodyberg/Notes | FindingSuccessAndFailure/validation-book/lib/Main_Original.hs | mit | -- eq 2 (checkPasswordLength' "julielovesbooks") (Right "julielovesbooks")
-- eq 3 (checkPasswordLength' "afasdfasdfasdfasdfasdfasdfasdf") (Left "Too long or short")
-- eq 4 (cleanWhitespace' " foo") (Right "foo")
-- eq 5 (cleanWhitespace' "foo") (Right "foo")
-- eq 6 (cleanWhitespace' "foo ") (Right "foo ... | 1,234 | test :: IO ()
test = printTestResult $
do
eq 1 (checkPasswordLength' "") (Left "Too long or short")
eq 2 (checkPasswordLength' "julielovesbooks") (Right "julielovesbooks")
eq 3 (checkPasswordLength' "afasdfasdfasdfasdfasdfasdfasdf") (Left "Too long or short")
eq 4 (cleanWhitespace' " foo... | 685 | test = printTestResult $
do
eq 1 (checkPasswordLength' "") (Left "Too long or short")
eq 2 (checkPasswordLength' "julielovesbooks") (Right "julielovesbooks")
eq 3 (checkPasswordLength' "afasdfasdfasdfasdfasdfasdfasdf") (Left "Too long or short")
eq 4 (cleanWhitespace' " foo") (Right "foo... | 671 | true | true | 0 | 11 | 266 | 181 | 94 | 87 | null | null |
olive/antiqua-prime | src/Antiqua/Data/Array2d.hs | mit | zipWithIndex :: Array2d a -> Array2d (XY, a)
zipWithIndex arr = (,) <$*> arr | 76 | zipWithIndex :: Array2d a -> Array2d (XY, a)
zipWithIndex arr = (,) <$*> arr | 76 | zipWithIndex arr = (,) <$*> arr | 31 | false | true | 3 | 8 | 13 | 45 | 22 | 23 | null | null |
brenov/set | interpreter/Types.hs | mit | getDefaultValue (Type "Real" pos) = Real 0.0 pos | 49 | getDefaultValue (Type "Real" pos) = Real 0.0 pos | 49 | getDefaultValue (Type "Real" pos) = Real 0.0 pos | 49 | false | false | 0 | 7 | 8 | 22 | 10 | 12 | null | null |
LambdaHack/LambdaHack | definition-src/Game/LambdaHack/Definition/Color.hs | bsd-3-clause | nbspAttrW32 :: AttrCharW32
nbspAttrW32 = attrCharToW32 $ AttrChar defAttr '\x00a0' | 82 | nbspAttrW32 :: AttrCharW32
nbspAttrW32 = attrCharToW32 $ AttrChar defAttr '\x00a0' | 82 | nbspAttrW32 = attrCharToW32 $ AttrChar defAttr '\x00a0' | 55 | false | true | 0 | 6 | 9 | 20 | 10 | 10 | null | null |
overminder/punch-forward | src/Network/Punch/Peer/PortFwd.hs | bsd-3-clause | logWith tag = forever $ await >>= yield | 39 | logWith tag = forever $ await >>= yield | 39 | logWith tag = forever $ await >>= yield | 39 | false | false | 1 | 6 | 7 | 21 | 8 | 13 | null | null |
sukhmel/experiments.haskell | Sudoku/Sudoku.hs | mit | updateValueAt :: (Int, Int) -> [Cell Int] -> [Int] -> [Cell Int]
updateValueAt (x,y) list v = updateValue list $ Cell v x y | 123 | updateValueAt :: (Int, Int) -> [Cell Int] -> [Int] -> [Cell Int]
updateValueAt (x,y) list v = updateValue list $ Cell v x y | 123 | updateValueAt (x,y) list v = updateValue list $ Cell v x y | 58 | false | true | 0 | 11 | 23 | 76 | 38 | 38 | null | null |
DanielSchuessler/hstri | Tetrahedron/NormalDisc.hs | gpl-3.0 | otherNormalQuads Q_ad = (Q_ab,Q_ac) | 35 | otherNormalQuads Q_ad = (Q_ab,Q_ac) | 35 | otherNormalQuads Q_ad = (Q_ab,Q_ac) | 35 | false | false | 0 | 5 | 3 | 15 | 8 | 7 | null | null |
sopvop/cabal | cabal-install/Distribution/Client/BuildReports/Anonymous.hs | bsd-3-clause | parseFields :: String -> ParseResult BuildReport
parseFields input = do
fields <- mapM extractField =<< readFields input
let merged = mergeBy (\desc (_,name,_) -> compare (fieldName desc) name)
sortedFieldDescrs
(sortBy (comparing (\(_,name,_) -> name)) fields)
checkM... | 1,078 | parseFields :: String -> ParseResult BuildReport
parseFields input = do
fields <- mapM extractField =<< readFields input
let merged = mergeBy (\desc (_,name,_) -> compare (fieldName desc) name)
sortedFieldDescrs
(sortBy (comparing (\(_,name,_) -> name)) fields)
checkM... | 1,078 | parseFields input = do
fields <- mapM extractField =<< readFields input
let merged = mergeBy (\desc (_,name,_) -> compare (fieldName desc) name)
sortedFieldDescrs
(sortBy (comparing (\(_,name,_) -> name)) fields)
checkMerged initialBuildReport merged
where
extr... | 1,029 | false | true | 6 | 17 | 262 | 355 | 180 | 175 | null | null |
liuyang1/H99 | 50.hs | gpl-2.0 | -- 56
-- symmetric
mirror Empty = Empty | 39 | mirror Empty = Empty | 20 | mirror Empty = Empty | 20 | true | false | 1 | 5 | 7 | 15 | 6 | 9 | null | null |
Deewiant/haschoo | Haschoo/Running.hs | bsd-3-clause | runRepl :: [IORef Context] -> IO ()
runRepl ctx = do
putStr "Haschoo} "
hFlush stdout
line <- fmap Just getLine `catch` (\(_ :: IOError) -> return Nothing)
maybe (return ()) (\l -> handle (go l) >> runRepl ctx) line
where
handle = flip catch $ \e -> hPutStrLn stderr $ show (e :: RunError)
go str =
... | 790 | runRepl :: [IORef Context] -> IO ()
runRepl ctx = do
putStr "Haschoo} "
hFlush stdout
line <- fmap Just getLine `catch` (\(_ :: IOError) -> return Nothing)
maybe (return ()) (\l -> handle (go l) >> runRepl ctx) line
where
handle = flip catch $ \e -> hPutStrLn stderr $ show (e :: RunError)
go str =
... | 790 | runRepl ctx = do
putStr "Haschoo} "
hFlush stdout
line <- fmap Just getLine `catch` (\(_ :: IOError) -> return Nothing)
maybe (return ()) (\l -> handle (go l) >> runRepl ctx) line
where
handle = flip catch $ \e -> hPutStrLn stderr $ show (e :: RunError)
go str =
case runParser (programValue Not... | 754 | false | true | 0 | 18 | 317 | 322 | 151 | 171 | null | null |
lamdu/lamdu | test/Tests/Sugar.hs | gpl-3.0 | replLet :: Lens.Traversal' (WorkArea v name i o a) (Let v name i o # Annotated a)
replLet = replBinder . _BinderLet | 115 | replLet :: Lens.Traversal' (WorkArea v name i o a) (Let v name i o # Annotated a)
replLet = replBinder . _BinderLet | 115 | replLet = replBinder . _BinderLet | 33 | false | true | 0 | 8 | 21 | 55 | 27 | 28 | null | null |
forgit/Rosalind | orf.hs | gpl-2.0 | rna2Prot [] table = [] | 22 | rna2Prot [] table = [] | 22 | rna2Prot [] table = [] | 22 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
gonimo/gonimo-front | build/Main.hs | agpl-3.0 | main :: IO ()
main = shakeArgsWith shakeOptions flags $ \flagVals _ -> build (Prod `elem` flagVals) | 99 | main :: IO ()
main = shakeArgsWith shakeOptions flags $ \flagVals _ -> build (Prod `elem` flagVals) | 99 | main = shakeArgsWith shakeOptions flags $ \flagVals _ -> build (Prod `elem` flagVals) | 85 | false | true | 0 | 9 | 16 | 44 | 23 | 21 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_DETAIL_TEXTURE_FUNC_POINTS_SGIS :: GLenum
gl_DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C | 88 | gl_DETAIL_TEXTURE_FUNC_POINTS_SGIS :: GLenum
gl_DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C | 88 | gl_DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C | 43 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
GaloisInc/halvm-ghc | compiler/cmm/PprC.hs | bsd-3-clause | pprAsPtrReg :: CmmReg -> SDoc
pprAsPtrReg (CmmGlobal (VanillaReg n gcp))
= WARN( gcp /= VGcPtr, ppr n ) char 'R' <> int n <> text ".p" | 136 | pprAsPtrReg :: CmmReg -> SDoc
pprAsPtrReg (CmmGlobal (VanillaReg n gcp))
= WARN( gcp /= VGcPtr, ppr n ) char 'R' <> int n <> text ".p" | 136 | pprAsPtrReg (CmmGlobal (VanillaReg n gcp))
= WARN( gcp /= VGcPtr, ppr n ) char 'R' <> int n <> text ".p" | 106 | false | true | 0 | 9 | 27 | 66 | 32 | 34 | null | null |
swistak35/symmetrical-chainsaw | backend/test/TestImport.hs | mit | runDB :: SqlPersistM a -> YesodExample App a
runDB query = do
app <- getTestYesod
liftIO $ runDBWithApp app query | 121 | runDB :: SqlPersistM a -> YesodExample App a
runDB query = do
app <- getTestYesod
liftIO $ runDBWithApp app query | 121 | runDB query = do
app <- getTestYesod
liftIO $ runDBWithApp app query | 76 | false | true | 0 | 9 | 27 | 50 | 21 | 29 | null | null |
ckkashyap/Dancer | Pose.hs | bsd-3-clause | upperLegLength = 34 | 19 | upperLegLength = 34 | 19 | upperLegLength = 34 | 19 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
jrockway/c2hs | src/C2HS/Gen/Bind.hs | gpl-2.0 | -- | determine the calling convention for the provided decl
extractCallingConvention :: CDecl -> CallingConvention
extractCallingConvention cdecl
| hasStdCallAttr cdecl = StdCallConv
| otherwise = CCallConv
where
isStdCallAttr (CAttr x _ _) = identToString x == "stdcall"
... | 884 | extractCallingConvention :: CDecl -> CallingConvention
extractCallingConvention cdecl
| hasStdCallAttr cdecl = StdCallConv
| otherwise = CCallConv
where
isStdCallAttr (CAttr x _ _) = identToString x == "stdcall"
|| identToString x == "__stdcall__"
hasStdCallAttr ... | 824 | extractCallingConvention cdecl
| hasStdCallAttr cdecl = StdCallConv
| otherwise = CCallConv
where
isStdCallAttr (CAttr x _ _) = identToString x == "stdcall"
|| identToString x == "__stdcall__"
hasStdCallAttr = any isStdCallAttr . funAttrs
funAttrs (CDecl spe... | 769 | true | true | 1 | 14 | 257 | 209 | 106 | 103 | null | null |
nbrendler/hackerrank-exercises | find-digits/Main.hs | mit | checkN n t res =
case (t `rem` 10) of
0 -> checkN n (t `div` 10) res
d -> case (n `rem` d) of
0 -> checkN n (t `div` 10) (res + 1)
_ -> checkN n (t `div` 10) res | 205 | checkN n t res =
case (t `rem` 10) of
0 -> checkN n (t `div` 10) res
d -> case (n `rem` d) of
0 -> checkN n (t `div` 10) (res + 1)
_ -> checkN n (t `div` 10) res | 205 | checkN n t res =
case (t `rem` 10) of
0 -> checkN n (t `div` 10) res
d -> case (n `rem` d) of
0 -> checkN n (t `div` 10) (res + 1)
_ -> checkN n (t `div` 10) res | 205 | false | false | 1 | 13 | 86 | 123 | 65 | 58 | null | null |
tidalcycles/tidal-midi | Sound/Tidal/MIDI/CC.hs | gpl-3.0 | (cc21, cc21_p) = pF "cc21" (Just 0) | 35 | (cc21, cc21_p) = pF "cc21" (Just 0) | 35 | (cc21, cc21_p) = pF "cc21" (Just 0) | 35 | false | false | 0 | 6 | 6 | 25 | 12 | 13 | null | null |
alexisVallet/haskell-shmup | Test/Collision.hs | bsd-3-clause | naiveDetection :: AABB -> [AABB] -> [AABB]
naiveDetection aabb aabbs =
filter (intersectAABB aabb) aabbs | 106 | naiveDetection :: AABB -> [AABB] -> [AABB]
naiveDetection aabb aabbs =
filter (intersectAABB aabb) aabbs | 106 | naiveDetection aabb aabbs =
filter (intersectAABB aabb) aabbs | 63 | false | true | 0 | 7 | 16 | 41 | 21 | 20 | null | null |
NatureShade/SymbolicHaskell | src/Math/Symbolic/M/QQ.hs | mit | antiExprExp :: Math Rational -> Maybe (TH.Q TH.Exp)
antiExprExp (Op "numM" [Sym v]) = Just $ TH.appE (TH.conE (TH.mkName "Numeric"))
(TH.varE (TH.mkName $ T.unpack v)) | 218 | antiExprExp :: Math Rational -> Maybe (TH.Q TH.Exp)
antiExprExp (Op "numM" [Sym v]) = Just $ TH.appE (TH.conE (TH.mkName "Numeric"))
(TH.varE (TH.mkName $ T.unpack v)) | 218 | antiExprExp (Op "numM" [Sym v]) = Just $ TH.appE (TH.conE (TH.mkName "Numeric"))
(TH.varE (TH.mkName $ T.unpack v)) | 166 | false | true | 0 | 12 | 75 | 101 | 48 | 53 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 248 = 247 | 9 | 248 = 247 | 9 | 248 = 247 | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
facebookincubator/duckling | Duckling/Time/PL/Rules.hs | bsd-3-clause | ruleInDuration :: Rule
ruleInDuration = Rule
{ name = "in <duration>"
, pattern =
[ regex "(w( ?(prze)?ciągu)?|za) ?(jeszcze)?|przez"
, dimension Duration
]
, prod = \tokens -> case tokens of
(_:Token Duration dd:_) ->
tt $ inDuration dd
_ -> Nothing
} | 292 | ruleInDuration :: Rule
ruleInDuration = Rule
{ name = "in <duration>"
, pattern =
[ regex "(w( ?(prze)?ciągu)?|za) ?(jeszcze)?|przez"
, dimension Duration
]
, prod = \tokens -> case tokens of
(_:Token Duration dd:_) ->
tt $ inDuration dd
_ -> Nothing
} | 292 | ruleInDuration = Rule
{ name = "in <duration>"
, pattern =
[ regex "(w( ?(prze)?ciągu)?|za) ?(jeszcze)?|przez"
, dimension Duration
]
, prod = \tokens -> case tokens of
(_:Token Duration dd:_) ->
tt $ inDuration dd
_ -> Nothing
} | 269 | false | true | 0 | 15 | 82 | 91 | 48 | 43 | null | null |
gbataille/pandoc | src/Text/Pandoc/Writers/Texinfo.hs | gpl-2.0 | inlineListToTexinfo :: [Inline] -- ^ Inlines to convert
-> State WriterState Doc
inlineListToTexinfo lst = mapM inlineToTexinfo lst >>= return . hcat | 168 | inlineListToTexinfo :: [Inline] -- ^ Inlines to convert
-> State WriterState Doc
inlineListToTexinfo lst = mapM inlineToTexinfo lst >>= return . hcat | 168 | inlineListToTexinfo lst = mapM inlineToTexinfo lst >>= return . hcat | 68 | false | true | 0 | 7 | 40 | 40 | 20 | 20 | null | null |
flipstone/glados | src/Handler/Applications.hs | mit | applications :: Entity Person -> App Response
applications person = routeResource $ defaultActions {
resActionNew = applicationsNew person
, resActionEdit = applicationsEdit person
, resActionShow = applicationsShow person
, resActionCreate = applicationsCreate person
, resActionUpdate = applicationsUpdate ... | 330 | applications :: Entity Person -> App Response
applications person = routeResource $ defaultActions {
resActionNew = applicationsNew person
, resActionEdit = applicationsEdit person
, resActionShow = applicationsShow person
, resActionCreate = applicationsCreate person
, resActionUpdate = applicationsUpdate ... | 330 | applications person = routeResource $ defaultActions {
resActionNew = applicationsNew person
, resActionEdit = applicationsEdit person
, resActionShow = applicationsShow person
, resActionCreate = applicationsCreate person
, resActionUpdate = applicationsUpdate person
} | 284 | false | true | 0 | 9 | 52 | 80 | 40 | 40 | null | null |
conal/hermit | src/HERMIT/PrettyPrinter/GHC.hs | bsd-2-clause | ppModGuts :: PrettyH ModGuts
ppModGuts = mg_binds ^>> ppSDoc | 60 | ppModGuts :: PrettyH ModGuts
ppModGuts = mg_binds ^>> ppSDoc | 60 | ppModGuts = mg_binds ^>> ppSDoc | 31 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | The suggested insertion IDs. A ColumnBreak may have multiple insertion
-- IDs if it is a nested suggested change. If empty, then this is not a
-- suggested insertion.
cbSuggestedInsertionIds :: Lens' ColumnBreak [Text]
cbSuggestedInsertionIds
= lens _cbSuggestedInsertionIds
(\ s a -> s{_cbSuggestedInsertio... | 363 | cbSuggestedInsertionIds :: Lens' ColumnBreak [Text]
cbSuggestedInsertionIds
= lens _cbSuggestedInsertionIds
(\ s a -> s{_cbSuggestedInsertionIds = a})
. _Default
. _Coerce | 191 | cbSuggestedInsertionIds
= lens _cbSuggestedInsertionIds
(\ s a -> s{_cbSuggestedInsertionIds = a})
. _Default
. _Coerce | 139 | true | true | 0 | 11 | 70 | 55 | 30 | 25 | null | null |
bgaster/idris-java | src/IRTS/CodegenJava.hs | bsd-3-clause | mkConstMatch :: BlockPostprocessor ->
(BlockPostprocessor -> CodeGeneration [BlockStmt]) ->
LVar ->
[SAlt] ->
CodeGeneration Stmt
mkConstMatch pp getDefaultStmts var ((SConstCase constant branchExpression):cases) = do
matchExp <- mkMatchConstExp var cons... | 532 | mkConstMatch :: BlockPostprocessor ->
(BlockPostprocessor -> CodeGeneration [BlockStmt]) ->
LVar ->
[SAlt] ->
CodeGeneration Stmt
mkConstMatch pp getDefaultStmts var ((SConstCase constant branchExpression):cases) = do
matchExp <- mkMatchConstExp var cons... | 532 | mkConstMatch pp getDefaultStmts var ((SConstCase constant branchExpression):cases) = do
matchExp <- mkMatchConstExp var constant
pushScope
branchBlock <- mkExp pp branchExpression
popScope
otherBranches <- mkConstMatch pp getDefaultStmts var cases
return
$ IfThenElse matchExp (StmtBlock $ Block branchBl... | 338 | false | true | 0 | 11 | 131 | 140 | 66 | 74 | null | null |
CGenie/platform | shared/src/Unison/Var.hs | mit | freshes :: Var v => Set v -> [v] -> [v]
freshes _ [] = [] | 57 | freshes :: Var v => Set v -> [v] -> [v]
freshes _ [] = [] | 57 | freshes _ [] = [] | 17 | false | true | 0 | 10 | 15 | 50 | 23 | 27 | null | null |
jb55/cassava | Data/Csv/Builder.hs | bsd-3-clause | -- | Like 'encodeRecord', but lets you customize how the CSV data is
-- encoded.
encodeRecordWith :: ToRecord a => EncodeOptions -> a -> Builder.Builder
encodeRecordWith opts r =
Encoding.encodeRecord (encQuoting opts) (encDelimiter opts) (toRecord r)
<> Encoding.recordSep (encUseCrLf opts) | 299 | encodeRecordWith :: ToRecord a => EncodeOptions -> a -> Builder.Builder
encodeRecordWith opts r =
Encoding.encodeRecord (encQuoting opts) (encDelimiter opts) (toRecord r)
<> Encoding.recordSep (encUseCrLf opts) | 218 | encodeRecordWith opts r =
Encoding.encodeRecord (encQuoting opts) (encDelimiter opts) (toRecord r)
<> Encoding.recordSep (encUseCrLf opts) | 146 | true | true | 2 | 8 | 47 | 78 | 38 | 40 | null | null |
Kheldar/hw-koans | solution/Koan/Either.hs | bsd-3-clause | applyEither :: Either a (b -> c) -> Either a b -> Either a c
applyEither (Left e) _ = Left e | 93 | applyEither :: Either a (b -> c) -> Either a b -> Either a c
applyEither (Left e) _ = Left e | 93 | applyEither (Left e) _ = Left e | 32 | false | true | 0 | 8 | 22 | 55 | 26 | 29 | null | null |
helino/wham | src/Wham/SignExc.hs | bsd-3-clause | _ `le` Zero = ret NonErrorT | 27 | _ `le` Zero = ret NonErrorT | 27 | _ `le` Zero = ret NonErrorT | 27 | false | false | 0 | 5 | 5 | 17 | 8 | 9 | null | null |
Quid2/model | test/Spec.hs | bsd-3-clause | tests :: TestTree
tests = testGroup
"Tests"
[ modelTests
--, transformTests
, namesTests
, prettyTests
] | 118 | tests :: TestTree
tests = testGroup
"Tests"
[ modelTests
--, transformTests
, namesTests
, prettyTests
] | 118 | tests = testGroup
"Tests"
[ modelTests
--, transformTests
, namesTests
, prettyTests
] | 100 | false | true | 0 | 5 | 29 | 27 | 15 | 12 | null | null |
muspellsson/hiccup | TclObj.hs | lgpl-2.1 | falseValues = map pack ["0", "false", "no", "off"] | 50 | falseValues = map pack ["0", "false", "no", "off"] | 50 | falseValues = map pack ["0", "false", "no", "off"] | 50 | false | false | 0 | 6 | 7 | 23 | 13 | 10 | null | null |
nevrenato/Hets_Fork | CSL/Keywords.hs | gpl-2.0 | oddS :: String
oddS = "odd" | 27 | oddS :: String
oddS = "odd" | 27 | oddS = "odd" | 12 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
alekar/hugs | packages/base/Data/Set.hs | bsd-3-clause | difference t1 Tip = t1 | 23 | difference t1 Tip = t1 | 23 | difference t1 Tip = t1 | 23 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
ssaavedra/liquidhaskell | benchmarks/containers-0.5.0.0/benchmarks/Set.hs | bsd-3-clause | ins :: [Int] -> S.Set Int -> S.Set Int
ins xs s0 = foldl' (\s a -> S.insert a s) s0 xs | 86 | ins :: [Int] -> S.Set Int -> S.Set Int
ins xs s0 = foldl' (\s a -> S.insert a s) s0 xs | 86 | ins xs s0 = foldl' (\s a -> S.insert a s) s0 xs | 47 | false | true | 0 | 9 | 21 | 65 | 31 | 34 | null | null |
spechub/Hets | CSL/Keywords.hs | gpl-2.0 | smacroS :: String
smacroS = "scmacro" | 37 | smacroS :: String
smacroS = "scmacro" | 37 | smacroS = "scmacro" | 19 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'MapL.assocs'
ml_assocs = MapL.assocs | 41 | ml_assocs = MapL.assocs | 23 | ml_assocs = MapL.assocs | 23 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
ezyang/ghc | compiler/typecheck/TcDerivUtils.hs | bsd-3-clause | badCon :: DataCon -> SDoc -> SDoc
badCon con msg = text "Constructor" <+> quotes (ppr con) <+> msg | 98 | badCon :: DataCon -> SDoc -> SDoc
badCon con msg = text "Constructor" <+> quotes (ppr con) <+> msg | 98 | badCon con msg = text "Constructor" <+> quotes (ppr con) <+> msg | 64 | false | true | 0 | 9 | 18 | 50 | 22 | 28 | null | null |
visood/bioalgo | src/lib/Genome/Dna/Replication.hs | bsd-3-clause | indexesWhere :: (Show a) => (a -> Bool) -> [a] -> [Int]
indexesWhere pred xs = indexesWhereWithAcc xs 0
where
indexesWhereWithAcc [] _ = []
indexesWhereWithAcc (u:us) n = if pred u then n:nxt else nxt
where nxt = indexesWhereWithAcc us (n+1) | 257 | indexesWhere :: (Show a) => (a -> Bool) -> [a] -> [Int]
indexesWhere pred xs = indexesWhereWithAcc xs 0
where
indexesWhereWithAcc [] _ = []
indexesWhereWithAcc (u:us) n = if pred u then n:nxt else nxt
where nxt = indexesWhereWithAcc us (n+1) | 257 | indexesWhere pred xs = indexesWhereWithAcc xs 0
where
indexesWhereWithAcc [] _ = []
indexesWhereWithAcc (u:us) n = if pred u then n:nxt else nxt
where nxt = indexesWhereWithAcc us (n+1) | 201 | false | true | 1 | 9 | 57 | 119 | 62 | 57 | null | null |
ml9951/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | unpackCStringUtf8Name = varQual gHC_CSTRING (fsLit "unpackCStringUtf8#") unpackCStringUtf8IdKey | 97 | unpackCStringUtf8Name = varQual gHC_CSTRING (fsLit "unpackCStringUtf8#") unpackCStringUtf8IdKey | 97 | unpackCStringUtf8Name = varQual gHC_CSTRING (fsLit "unpackCStringUtf8#") unpackCStringUtf8IdKey | 97 | false | false | 0 | 7 | 8 | 19 | 9 | 10 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/GHC/IO/Encoding/Failure.hs | bsd-3-clause | codingFailureModeSuffix RoundtripFailure = "//ROUNDTRIP" | 66 | codingFailureModeSuffix RoundtripFailure = "//ROUNDTRIP" | 66 | codingFailureModeSuffix RoundtripFailure = "//ROUNDTRIP" | 66 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The element properties for the image. When the aspect ratio of the
-- provided size does not match the image aspect ratio, the image is scaled
-- and centered with respect to the size in order to maintain aspect ratio.
-- The provided transform is applied after this operation. The
-- PageElementProperties.size pro... | 752 | cirElementProperties :: Lens' CreateImageRequest (Maybe PageElementProperties)
cirElementProperties
= lens _cirElementProperties
(\ s a -> s{_cirElementProperties = a}) | 176 | cirElementProperties
= lens _cirElementProperties
(\ s a -> s{_cirElementProperties = a}) | 97 | true | true | 0 | 9 | 123 | 56 | 33 | 23 | null | null |
Bodigrim/katas | src/haskell/B-Circumference-Pathing.hs | bsd-2-clause | circPath :: (Num a, Ord a) => a -> a -> a -> a
circPath s t c = if l1 <= l2 then l1 else negate l2 where
l1 = if t >= s then t - s else t - s + c
l2 = if s >= t then s - t else s - t + c | 191 | circPath :: (Num a, Ord a) => a -> a -> a -> a
circPath s t c = if l1 <= l2 then l1 else negate l2 where
l1 = if t >= s then t - s else t - s + c
l2 = if s >= t then s - t else s - t + c | 191 | circPath s t c = if l1 <= l2 then l1 else negate l2 where
l1 = if t >= s then t - s else t - s + c
l2 = if s >= t then s - t else s - t + c | 144 | false | true | 0 | 8 | 65 | 119 | 64 | 55 | null | null |
shnarazk/profileAnalyzer | GHC/ProfileAnalyzer/ParseProfile.hs | gpl-3.0 | main = do
args <- getArgs
res <- parseFromFile header $ if null args then "sih4-prof.prof" else head args
case res of
Left err -> print err
Right (title, cmd, totalTime, totalAlloc, ls) -> print (title, cmd, totalTime, ls) | 257 | main = do
args <- getArgs
res <- parseFromFile header $ if null args then "sih4-prof.prof" else head args
case res of
Left err -> print err
Right (title, cmd, totalTime, totalAlloc, ls) -> print (title, cmd, totalTime, ls) | 257 | main = do
args <- getArgs
res <- parseFromFile header $ if null args then "sih4-prof.prof" else head args
case res of
Left err -> print err
Right (title, cmd, totalTime, totalAlloc, ls) -> print (title, cmd, totalTime, ls) | 257 | false | false | 0 | 11 | 73 | 99 | 50 | 49 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- Turn these flags off when enabling this way
wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
wayUnsetGeneralFlags _ (WayCustom {}) = [] | 146 | wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
wayUnsetGeneralFlags _ (WayCustom {}) = [] | 99 | wayUnsetGeneralFlags _ (WayCustom {}) = [] | 42 | true | true | 1 | 9 | 21 | 42 | 21 | 21 | null | null |
johnjcamilleri/maltese-verb-inflections | VerbCSV.hs | mit | -- | This will throw an error if not parseable
readInflectionCSV :: String -> Inflection
readInflectionCSV s =
Inflection {
aspect = (bits!!0),
subject = (bits!!1),
dir = (bits!!2),
ind = (bits!!3),
pol = (bits!!4),
tree = (bits!!5)
}
where
bits = split "," s
-- | Import file into l... | 338 | readInflectionCSV :: String -> Inflection
readInflectionCSV s =
Inflection {
aspect = (bits!!0),
subject = (bits!!1),
dir = (bits!!2),
ind = (bits!!3),
pol = (bits!!4),
tree = (bits!!5)
}
where
bits = split "," s
-- | Import file into list of inflections | 291 | readInflectionCSV s =
Inflection {
aspect = (bits!!0),
subject = (bits!!1),
dir = (bits!!2),
ind = (bits!!3),
pol = (bits!!4),
tree = (bits!!5)
}
where
bits = split "," s
-- | Import file into list of inflections | 249 | true | true | 1 | 8 | 89 | 116 | 66 | 50 | null | null |
JohnLato/impulse | src/Reactive/Impulse/Internal/RWST.hs | lgpl-3.0 | -- ---------------------------------------------------------------------------
-- Writer operations
writer :: (Monad m, Monoid w) => (a, w) -> RWST r w s m a
writer (a, w) = RWST $ \w' _ s -> let !w'2 = w' `mappend` w in return (a, s, w'2) | 240 | writer :: (Monad m, Monoid w) => (a, w) -> RWST r w s m a
writer (a, w) = RWST $ \w' _ s -> let !w'2 = w' `mappend` w in return (a, s, w'2) | 139 | writer (a, w) = RWST $ \w' _ s -> let !w'2 = w' `mappend` w in return (a, s, w'2) | 81 | true | true | 0 | 11 | 42 | 102 | 55 | 47 | null | null |
siddhanathan/ghc | compiler/cmm/CmmNode.hs | bsd-3-clause | mapListJ :: (a -> Maybe a) -> [a] -> [a]
mapListJ f xs = snd (mapListT f xs) | 76 | mapListJ :: (a -> Maybe a) -> [a] -> [a]
mapListJ f xs = snd (mapListT f xs) | 76 | mapListJ f xs = snd (mapListT f xs) | 35 | false | true | 0 | 9 | 17 | 57 | 27 | 30 | null | null |
xkollar/handy-haskell | other/js-2015-05/Main.hs | gpl-3.0 | procOne :: P -> IO ()
procOne s = putStrLn $ show s ++ ": " ++ show (valuation res) ++ ' ':show res where
res = meStartWith s | 129 | procOne :: P -> IO ()
procOne s = putStrLn $ show s ++ ": " ++ show (valuation res) ++ ' ':show res where
res = meStartWith s | 129 | procOne s = putStrLn $ show s ++ ": " ++ show (valuation res) ++ ' ':show res where
res = meStartWith s | 107 | false | true | 0 | 10 | 32 | 67 | 32 | 35 | null | null |
2ion/yst | Yst/Data.hs | gpl-2.0 | satisfiesCond (Has _) _ = False | 39 | satisfiesCond (Has _) _ = False | 39 | satisfiesCond (Has _) _ = False | 39 | false | false | 1 | 6 | 13 | 18 | 8 | 10 | null | null |
zloster/FrameworkBenchmarks | frameworks/Haskell/warp/warp-shared/src/Lib.hs | bsd-3-clause | getFortunes :: Db.Pool -> IO Wai.Response
getFortunes dbPool = do
res <- Db.queryFortunes dbPool
return $ case res of
Left e -> respondDbError e
Right fs -> respondHtml $ do
let new = Types.Fortune 0 "Additional fortune added at request time."
let header = Html.tr_ $ Html.th_ (Html.Raw "id") # H... | 724 | getFortunes :: Db.Pool -> IO Wai.Response
getFortunes dbPool = do
res <- Db.queryFortunes dbPool
return $ case res of
Left e -> respondDbError e
Right fs -> respondHtml $ do
let new = Types.Fortune 0 "Additional fortune added at request time."
let header = Html.tr_ $ Html.th_ (Html.Raw "id") # H... | 724 | getFortunes dbPool = do
res <- Db.queryFortunes dbPool
return $ case res of
Left e -> respondDbError e
Right fs -> respondHtml $ do
let new = Types.Fortune 0 "Additional fortune added at request time."
let header = Html.tr_ $ Html.th_ (Html.Raw "id") # Html.th_ (Html.Raw "message")
let mkR... | 682 | false | true | 3 | 11 | 222 | 258 | 128 | 130 | null | null |
nshepperd/funn | AI/Funn/CL/Tensor.hs | mit | fromVector :: forall ds m. (MonadIO m, KnownDims ds) => S.Vector Double -> m (Tensor ds)
fromVector xs = do when (n /= V.length xs) $ liftIO $ do
throwIO (IndexOutOfBounds "Tensor.fromVector")
Tensor <$> MemSub.fromVector xs
where
n = dimSize (Proxy @ ds) | 301 | fromVector :: forall ds m. (MonadIO m, KnownDims ds) => S.Vector Double -> m (Tensor ds)
fromVector xs = do when (n /= V.length xs) $ liftIO $ do
throwIO (IndexOutOfBounds "Tensor.fromVector")
Tensor <$> MemSub.fromVector xs
where
n = dimSize (Proxy @ ds) | 301 | fromVector xs = do when (n /= V.length xs) $ liftIO $ do
throwIO (IndexOutOfBounds "Tensor.fromVector")
Tensor <$> MemSub.fromVector xs
where
n = dimSize (Proxy @ ds) | 212 | false | true | 1 | 13 | 88 | 130 | 59 | 71 | null | null |
balodja/sesyrel | example/Main.hs | bsd-3-clause | treesS :: Fractional k => [(String, Maybe [Variable], FaultTreeMonad k [Variable], [Double])]
treesS =
[ ("voterTree", Nothing, testVoterM, [0])
, ("ftree1", Nothing, simpleFaultTreeMonad, [1, 3])
, ("ftree1", Just [4, 1, 3, 2], simpleFaultTreeMonad, [])
] | 264 | treesS :: Fractional k => [(String, Maybe [Variable], FaultTreeMonad k [Variable], [Double])]
treesS =
[ ("voterTree", Nothing, testVoterM, [0])
, ("ftree1", Nothing, simpleFaultTreeMonad, [1, 3])
, ("ftree1", Just [4, 1, 3, 2], simpleFaultTreeMonad, [])
] | 264 | treesS =
[ ("voterTree", Nothing, testVoterM, [0])
, ("ftree1", Nothing, simpleFaultTreeMonad, [1, 3])
, ("ftree1", Just [4, 1, 3, 2], simpleFaultTreeMonad, [])
] | 170 | false | true | 0 | 11 | 42 | 128 | 75 | 53 | null | null |
Rizary/hackage-matrix-builder | src-exe/Controller/Cli.hs | gpl-3.0 | getOpts :: IO Opts
getOpts = getRecord "hackage matrix builder (controller)" | 76 | getOpts :: IO Opts
getOpts = getRecord "hackage matrix builder (controller)" | 76 | getOpts = getRecord "hackage matrix builder (controller)" | 57 | false | true | 0 | 5 | 10 | 17 | 8 | 9 | null | null |
ezyang/ghc | testsuite/tests/programs/galois_raytrace/Data.hs | bsd-3-clause | image = error "undefined function: talk to image group" | 55 | image = error "undefined function: talk to image group" | 55 | image = error "undefined function: talk to image group" | 55 | false | false | 1 | 5 | 8 | 12 | 4 | 8 | null | null |
techfort/hbow | Utils/String.hs | mit | bow :: String -> [String]
bow a = [a] | 37 | bow :: String -> [String]
bow a = [a] | 37 | bow a = [a] | 11 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
bitemyapp/text-pipes | Pipes/Text.hs | bsd-3-clause | unwords
:: Monad m
=> Lens' (FreeT (Producer Text m) m r) (Producer Text m r)
unwords k p = fmap _words (k (_unwords p)) | 128 | unwords
:: Monad m
=> Lens' (FreeT (Producer Text m) m r) (Producer Text m r)
unwords k p = fmap _words (k (_unwords p)) | 128 | unwords k p = fmap _words (k (_unwords p)) | 42 | false | true | 0 | 10 | 32 | 73 | 35 | 38 | null | null |
eklinkhammer/haskell-vision | RobotVision/ImageRep/Utility.hs | mit | toChannels :: (Source r e)
=> Array r DIM3 e -> (Array D DIM2 e, Array D DIM2 e, Array D DIM2 e)
toChannels img = (r,g,b)
where
r = fromFunction (Z :. height :. width) rf
g = fromFunction (Z :. height :. width) gf
b = fromFunction (Z :. height :. width) bf
(Z :. height :. width :. _) = extent img
... | 463 | toChannels :: (Source r e)
=> Array r DIM3 e -> (Array D DIM2 e, Array D DIM2 e, Array D DIM2 e)
toChannels img = (r,g,b)
where
r = fromFunction (Z :. height :. width) rf
g = fromFunction (Z :. height :. width) gf
b = fromFunction (Z :. height :. width) bf
(Z :. height :. width :. _) = extent img
... | 463 | toChannels img = (r,g,b)
where
r = fromFunction (Z :. height :. width) rf
g = fromFunction (Z :. height :. width) gf
b = fromFunction (Z :. height :. width) bf
(Z :. height :. width :. _) = extent img
rf (Z :. y :. x) = img ! (Z :. y :. x :. 0)
gf (Z :. y :. x) = img ! (Z :. y :. x :. 1)
b... | 363 | false | true | 9 | 10 | 146 | 302 | 146 | 156 | null | null |
scolobb/fgl | Data/Graph/Inductive/Graph.hs | bsd-3-clause | -- | All labelled links coming into or going from a 'Context'.
lneighbors' :: Context a b -> Adj b
lneighbors' (p,_,_,s) = p ++ s | 129 | lneighbors' :: Context a b -> Adj b
lneighbors' (p,_,_,s) = p ++ s | 66 | lneighbors' (p,_,_,s) = p ++ s | 30 | true | true | 2 | 8 | 25 | 49 | 24 | 25 | null | null |
google-research/dex-lang | src/lib/LiveOutput.hs | bsd-3-clause | watchFile :: FilePath -> PChan String -> IO ()
watchFile fname chan = onmod fname $ sendFileContents fname chan | 111 | watchFile :: FilePath -> PChan String -> IO ()
watchFile fname chan = onmod fname $ sendFileContents fname chan | 111 | watchFile fname chan = onmod fname $ sendFileContents fname chan | 64 | false | true | 0 | 9 | 18 | 48 | 21 | 27 | null | null |
sdiehl/ghc | testsuite/tests/primops/should_run/ArithWord16.hs | bsd-3-clause | main :: IO ()
main = do
--
-- Check if passing Word16# on the stack works (16 parameter function will
-- need to use stack for some of the them)
--
let input =
[ ( (a + 0), (a + 1), (a + 2), (a + 3),
(a + 4), (a + 5), (a + 6), (a + 7),
(a + 8), (a + 9), (... | 2,905 | main :: IO ()
main = do
--
-- Check if passing Word16# on the stack works (16 parameter function will
-- need to use stack for some of the them)
--
let input =
[ ( (a + 0), (a + 1), (a + 2), (a + 3),
(a + 4), (a + 5), (a + 6), (a + 7),
(a + 8), (a + 9), (... | 2,905 | main = do
--
-- Check if passing Word16# on the stack works (16 parameter function will
-- need to use stack for some of the them)
--
let input =
[ ( (a + 0), (a + 1), (a + 2), (a + 3),
(a + 4), (a + 5), (a + 6), (a + 7),
(a + 8), (a + 9), (a + 10), (a + ... | 2,891 | false | true | 0 | 28 | 1,124 | 1,229 | 682 | 547 | null | null |
ejlilley/AbstractMusic | MusicGraph.hs | gpl-3.0 | joinStrings _ (s:[]) = s | 24 | joinStrings _ (s:[]) = s | 24 | joinStrings _ (s:[]) = s | 24 | false | false | 0 | 8 | 4 | 20 | 10 | 10 | null | null |
happyherp/lazyset | O.hs | mit | total_size growth 0 = 1 | 23 | total_size growth 0 = 1 | 23 | total_size growth 0 = 1 | 23 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
KrzyStar/binary-low-level | src/Data/Binary/Strict/Get.hs | bsd-3-clause | skip :: Int -> Get ()
skip n = readN (fromIntegral n) (const ()) | 64 | skip :: Int -> Get ()
skip n = readN (fromIntegral n) (const ()) | 64 | skip n = readN (fromIntegral n) (const ()) | 42 | false | true | 0 | 8 | 13 | 48 | 21 | 27 | null | null |
tjunier/mlgsc | src/Output.hs | mit | literalChar :: Parser FmtComponent
literalChar = do
c <- noneOf "%"
return $ Literal c | 94 | literalChar :: Parser FmtComponent
literalChar = do
c <- noneOf "%"
return $ Literal c | 94 | literalChar = do
c <- noneOf "%"
return $ Literal c | 59 | false | true | 0 | 8 | 22 | 34 | 15 | 19 | null | null |
stulli/projectEuler | eu238.hs | bsd-3-clause | allInfStrings' :: Integer -> [String]
allInfStrings' n = genericDrop n infStr : allInfStrings' (n+1) | 100 | allInfStrings' :: Integer -> [String]
allInfStrings' n = genericDrop n infStr : allInfStrings' (n+1) | 100 | allInfStrings' n = genericDrop n infStr : allInfStrings' (n+1) | 62 | false | true | 2 | 8 | 13 | 47 | 21 | 26 | null | null |
diminishedprime/.org | programmey_stuff/write_yourself_a_scheme/ch_08/wyas/app/Parser.hs | mit | -- These could probably be refactored out into one function that takes "quote"
-- and character needed as arguments.
parseQuoted :: Parser LispVal
parseQuoted = (\e -> List [Atom "quote", e]) <$> (char '\'' >> parseExpr) | 220 | parseQuoted :: Parser LispVal
parseQuoted = (\e -> List [Atom "quote", e]) <$> (char '\'' >> parseExpr) | 103 | parseQuoted = (\e -> List [Atom "quote", e]) <$> (char '\'' >> parseExpr) | 73 | true | true | 0 | 10 | 35 | 56 | 28 | 28 | null | null |
tabemann/amphibian | src/Network/IRC/Client/Amphibian/ServerReplies.hs | bsd-3-clause | rpl_ADMINLOC2 :: B.ByteString
rpl_ADMINLOC2 = encodeUtf8 "258" | 62 | rpl_ADMINLOC2 :: B.ByteString
rpl_ADMINLOC2 = encodeUtf8 "258" | 62 | rpl_ADMINLOC2 = encodeUtf8 "258" | 32 | false | true | 0 | 5 | 6 | 16 | 8 | 8 | null | null |
mpickering/core-kythe | src/KythePlugin.hs | bsd-3-clause | cvtGhcSrcSpan :: GHC.SrcSpan -> Maybe Span
cvtGhcSrcSpan ss = case ss of
GHC.UnhelpfulSpan _ -> Nothing
GHC.RealSrcSpan r -> Just $ Span (realToPos . GHC.realSrcSpanStart $ r)
(realToPos . GHC.realSrcSpanEnd $ r)
where
realToPos :: RealSrcLoc -> P.Pos
realToPos r =
... | 464 | cvtGhcSrcSpan :: GHC.SrcSpan -> Maybe Span
cvtGhcSrcSpan ss = case ss of
GHC.UnhelpfulSpan _ -> Nothing
GHC.RealSrcSpan r -> Just $ Span (realToPos . GHC.realSrcSpanStart $ r)
(realToPos . GHC.realSrcSpanEnd $ r)
where
realToPos :: RealSrcLoc -> P.Pos
realToPos r =
... | 464 | cvtGhcSrcSpan ss = case ss of
GHC.UnhelpfulSpan _ -> Nothing
GHC.RealSrcSpan r -> Just $ Span (realToPos . GHC.realSrcSpanStart $ r)
(realToPos . GHC.realSrcSpanEnd $ r)
where
realToPos :: RealSrcLoc -> P.Pos
realToPos r =
let path = SourcePath . T.pack . FS.un... | 421 | false | true | 0 | 13 | 130 | 165 | 81 | 84 | null | null |
ilyasergey/GHC-XAppFix | compiler/nativeGen/RegAlloc/Liveness.hs | bsd-3-clause | checkIsReverseDependent
:: Instruction instr
=> [SCC (LiveBasicBlock instr)] -- ^ SCCs of blocks that we're about to run the liveness determinator on.
-> Maybe BlockId -- ^ BlockIds that fail the test (if any)
checkIsReverseDependent sccs'
= go emptyUniqSet sccs'... | 1,569 | checkIsReverseDependent
:: Instruction instr
=> [SCC (LiveBasicBlock instr)] -- ^ SCCs of blocks that we're about to run the liveness determinator on.
-> Maybe BlockId
checkIsReverseDependent sccs'
= go emptyUniqSet sccs'
where go _ []
= Nothing
go blocksSeen (Acycl... | 1,503 | checkIsReverseDependent sccs'
= go emptyUniqSet sccs'
where go _ []
= Nothing
go blocksSeen (AcyclicSCC block : sccs)
= let dests = slurpJumpDestsOfBlock block
blocksSeen' = unionUniqSets blocksSeen $ mkUniqSet [blockId block]
badDests ... | 1,303 | true | true | 0 | 12 | 600 | 321 | 156 | 165 | null | null |
np/umm | UMMHelp.hs | gpl-3.0 | usageMsg :: String -> String
usageMsg prog =
"usage is '" ++ prog ++ " <ledger-file> <command> <options>'\n" ++
"where <command> and <options> can be any of the following:\n" ++
"\n" ++
" 'balance' [account-or-group] [date]\n" ++
" 'change' acc-or-inc-or-exp [date-range]\n" ++
" 'list' ['all' | 'ac... | 20,165 | usageMsg :: String -> String
usageMsg prog =
"usage is '" ++ prog ++ " <ledger-file> <command> <options>'\n" ++
"where <command> and <options> can be any of the following:\n" ++
"\n" ++
" 'balance' [account-or-group] [date]\n" ++
" 'change' acc-or-inc-or-exp [date-range]\n" ++
" 'list' ['all' | 'ac... | 20,165 | usageMsg prog =
"usage is '" ++ prog ++ " <ledger-file> <command> <options>'\n" ++
"where <command> and <options> can be any of the following:\n" ++
"\n" ++
" 'balance' [account-or-group] [date]\n" ++
" 'change' acc-or-inc-or-exp [date-range]\n" ++
" 'list' ['all' | 'accounts' | 'ccs' | 'expenses' ... | 20,136 | false | true | 0 | 374 | 4,513 | 1,498 | 749 | 749 | null | null |
jgm/texmath | src/Text/TeXMath/Readers/TeX.hs | gpl-2.0 | toNeg :: Text -> Text
toNeg x = case x of
"\x2203" -> "\x2204"
"\x2208" -> "\x2209"
"\x220B" -> "\x220C"
"\x2223" -> "\x2224"
"\x2225" -> "\x2226"
"\x2243" -> "\x2244"
"\x2245" -> "\x2246"
"\x2248" -> "\x2249"
"=... | 937 | toNeg :: Text -> Text
toNeg x = case x of
"\x2203" -> "\x2204"
"\x2208" -> "\x2209"
"\x220B" -> "\x220C"
"\x2223" -> "\x2224"
"\x2225" -> "\x2226"
"\x2243" -> "\x2244"
"\x2245" -> "\x2246"
"\x2248" -> "\x2249"
"=... | 937 | toNeg x = case x of
"\x2203" -> "\x2204"
"\x2208" -> "\x2209"
"\x220B" -> "\x220C"
"\x2223" -> "\x2224"
"\x2225" -> "\x2226"
"\x2243" -> "\x2244"
"\x2245" -> "\x2246"
"\x2248" -> "\x2249"
"=" -> "\x2260"
... | 915 | false | true | 0 | 8 | 439 | 188 | 94 | 94 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs | lgpl-2.1 | ne03bwd = [ ] | 13 | ne03bwd = [ ] | 13 | ne03bwd = [ ] | 13 | false | false | 0 | 5 | 3 | 8 | 4 | 4 | null | null |
erikd/hs-tls | core/Network/TLS/Handshake/Signature.hs | bsd-3-clause | signatureParams :: DigitalSignatureAlg -> Maybe HashAndSignatureAlgorithm -> SignatureParams
signatureParams RSA hashSigAlg =
case hashSigAlg of
Just (HashSHA512, SignatureRSA) -> RSAParams SHA512 RSApkcs1
Just (HashSHA384, SignatureRSA) -> RSAParams SHA384 RSApkcs1
Just (HashSHA256, Sig... | 963 | signatureParams :: DigitalSignatureAlg -> Maybe HashAndSignatureAlgorithm -> SignatureParams
signatureParams RSA hashSigAlg =
case hashSigAlg of
Just (HashSHA512, SignatureRSA) -> RSAParams SHA512 RSApkcs1
Just (HashSHA384, SignatureRSA) -> RSAParams SHA384 RSApkcs1
Just (HashSHA256, Sig... | 963 | signatureParams RSA hashSigAlg =
case hashSigAlg of
Just (HashSHA512, SignatureRSA) -> RSAParams SHA512 RSApkcs1
Just (HashSHA384, SignatureRSA) -> RSAParams SHA384 RSApkcs1
Just (HashSHA256, SignatureRSA) -> RSAParams SHA256 RSApkcs1
Just (HashSHA1 , SignatureRSA) -> RSAParam... | 870 | false | true | 0 | 11 | 242 | 238 | 118 | 120 | null | null |
alephnil/h99 | 08.hs | apache-2.0 | compress :: Eq a => [a] -> [a]
compress [] = [] | 47 | compress :: Eq a => [a] -> [a]
compress [] = [] | 47 | compress [] = [] | 16 | false | true | 0 | 9 | 11 | 41 | 19 | 22 | null | null |
adamschoenemann/simple-frp | src/FRP/AST/QuasiQuoter.hs | mit | parseFRP :: Monad m => Parser p -> String -> m p
parseFRP p s = either (fail . show) return $ parse (spaces >> p) "quasi" s | 123 | parseFRP :: Monad m => Parser p -> String -> m p
parseFRP p s = either (fail . show) return $ parse (spaces >> p) "quasi" s | 123 | parseFRP p s = either (fail . show) return $ parse (spaces >> p) "quasi" s | 74 | false | true | 0 | 9 | 27 | 72 | 33 | 39 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x2F94C' = "\x4096" | 34 | decomposeChar '\x2F94C' = "\x4096" | 34 | decomposeChar '\x2F94C' = "\x4096" | 34 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
nushio3/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | selectorClassName = clsQual gHC_GENERICS (fsLit "Selector") selectorClassKey | 82 | selectorClassName = clsQual gHC_GENERICS (fsLit "Selector") selectorClassKey | 82 | selectorClassName = clsQual gHC_GENERICS (fsLit "Selector") selectorClassKey | 82 | false | false | 0 | 7 | 12 | 19 | 9 | 10 | null | null |
wouwouwou/module_8 | src/main/haskell/series3/exercise1.hs | apache-2.0 | pp1b :: Tree1b -> RoseTree
pp1b (Leaf1b l) = RoseNode (show l) [] | 65 | pp1b :: Tree1b -> RoseTree
pp1b (Leaf1b l) = RoseNode (show l) [] | 65 | pp1b (Leaf1b l) = RoseNode (show l) [] | 38 | false | true | 0 | 7 | 12 | 37 | 18 | 19 | null | null |
TOSPIO/yi | src/library/Yi/Interact.hs | gpl-2.0 | -- Utility function
showT :: Show a => a -> T.Text
showT = T.pack . show | 72 | showT :: Show a => a -> T.Text
showT = T.pack . show | 52 | showT = T.pack . show | 21 | true | true | 0 | 7 | 15 | 31 | 16 | 15 | null | null |
nevrenato/HetsAlloy | Propositional/Sublogic.hs | gpl-2.0 | -- | all sublogics
sublogics_all :: [PropSL]
sublogics_all =
[PropSL
{
format = HornClause
}
, PropSL
{
format = PlainFormula
}
] | 175 | sublogics_all :: [PropSL]
sublogics_all =
[PropSL
{
format = HornClause
}
, PropSL
{
format = PlainFormula
}
] | 156 | sublogics_all =
[PropSL
{
format = HornClause
}
, PropSL
{
format = PlainFormula
}
] | 130 | true | true | 0 | 8 | 68 | 44 | 24 | 20 | null | null |
Noeda/caramia | src/Graphics/Caramia/Texture.hs | mit | getWrapping :: (MonadIO m, MonadMask m) => Texture -> m Wrapping
getWrapping tex = liftIO $ withBindingByTopology tex $ \target ->
alloca $ \result_ptr -> do
glGetTexParameteriv target GL_TEXTURE_WRAP_S result_ptr
result <- peek result_ptr
return $ if
| result == GL_CLAMP_TO_EDGE... | 447 | getWrapping :: (MonadIO m, MonadMask m) => Texture -> m Wrapping
getWrapping tex = liftIO $ withBindingByTopology tex $ \target ->
alloca $ \result_ptr -> do
glGetTexParameteriv target GL_TEXTURE_WRAP_S result_ptr
result <- peek result_ptr
return $ if
| result == GL_CLAMP_TO_EDGE... | 447 | getWrapping tex = liftIO $ withBindingByTopology tex $ \target ->
alloca $ \result_ptr -> do
glGetTexParameteriv target GL_TEXTURE_WRAP_S result_ptr
result <- peek result_ptr
return $ if
| result == GL_CLAMP_TO_EDGE -> Clamp
| result == GL_REPEAT -> Repeat
... | 382 | false | true | 0 | 16 | 120 | 126 | 59 | 67 | null | null |
typelead/epm | Cabal/Distribution/Simple/PackageIndex.hs | bsd-3-clause | -- | Variant of 'dependencyInconsistencies' which accepts a 'FakeMap'. See Note [FakeMap].
dependencyInconsistencies' :: PackageInstalled a => FakeMap -> PackageIndex a
-> [(PackageName, [(PackageId, Version)])]
dependencyInconsistencies' fakeMap index =
[ (name, [ (pid,packageVersion dep) ... | 1,607 | dependencyInconsistencies' :: PackageInstalled a => FakeMap -> PackageIndex a
-> [(PackageName, [(PackageId, Version)])]
dependencyInconsistencies' fakeMap index =
[ (name, [ (pid,packageVersion dep) | (dep,pids) <- uses, pid <- pids])
| (name, ipid_map) <- Map.toList inverseIndex
, let ... | 1,515 | dependencyInconsistencies' fakeMap index =
[ (name, [ (pid,packageVersion dep) | (dep,pids) <- uses, pid <- pids])
| (name, ipid_map) <- Map.toList inverseIndex
, let uses = Map.elems ipid_map
, reallyIsInconsistent (map fst uses) ]
where -- for each PackageName,
-- for each package with that name,... | 1,368 | true | true | 3 | 13 | 421 | 436 | 224 | 212 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmClosure.hs | bsd-3-clause | closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel
closureLocalEntryLabel dflags
| tablesNextToCode dflags = toInfoLbl . closureInfoLabel
| otherwise = toEntryLbl . closureInfoLabel | 209 | closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel
closureLocalEntryLabel dflags
| tablesNextToCode dflags = toInfoLbl . closureInfoLabel
| otherwise = toEntryLbl . closureInfoLabel | 209 | closureLocalEntryLabel dflags
| tablesNextToCode dflags = toInfoLbl . closureInfoLabel
| otherwise = toEntryLbl . closureInfoLabel | 149 | false | true | 1 | 8 | 40 | 47 | 22 | 25 | null | null |
jameshales/voltorb-flip | src/Inferences.hs | bsd-3-clause | unInferences :: Inferences -> Array Position (Set Tile)
unInferences (Inferences arr) = arr | 91 | unInferences :: Inferences -> Array Position (Set Tile)
unInferences (Inferences arr) = arr | 91 | unInferences (Inferences arr) = arr | 35 | false | true | 0 | 8 | 12 | 35 | 17 | 18 | null | null |
kovach/web2 | src/Types.hs | mit | m2l Nothing = [] | 16 | m2l Nothing = [] | 16 | m2l Nothing = [] | 16 | false | false | 1 | 6 | 3 | 15 | 5 | 10 | null | null |
ambiata/mismi | mismi-cli/main/s3.hs | bsd-3-clause | metric :: Scale Bytes
metric =
mkScale "B" [
Suffix (pow 1000 1) (pow 1000 1) "kB"
, Suffix (pow 1000 2) (pow 1000 2) "MB"
, Suffix (pow 1000 3) (pow 1000 3) "GB"
, Suffix (pow 1000 4) (pow 1000 4) "TB"
, Suffix (pow 1000 5) (pow 1000 5) "PB"
, Suffix (pow 1000 6) (pow 1000 6) "EB"
] | 316 | metric :: Scale Bytes
metric =
mkScale "B" [
Suffix (pow 1000 1) (pow 1000 1) "kB"
, Suffix (pow 1000 2) (pow 1000 2) "MB"
, Suffix (pow 1000 3) (pow 1000 3) "GB"
, Suffix (pow 1000 4) (pow 1000 4) "TB"
, Suffix (pow 1000 5) (pow 1000 5) "PB"
, Suffix (pow 1000 6) (pow 1000 6) "EB"
] | 316 | metric =
mkScale "B" [
Suffix (pow 1000 1) (pow 1000 1) "kB"
, Suffix (pow 1000 2) (pow 1000 2) "MB"
, Suffix (pow 1000 3) (pow 1000 3) "GB"
, Suffix (pow 1000 4) (pow 1000 4) "TB"
, Suffix (pow 1000 5) (pow 1000 5) "PB"
, Suffix (pow 1000 6) (pow 1000 6) "EB"
] | 294 | false | true | 0 | 9 | 94 | 175 | 87 | 88 | null | null |
bocharov-ivan/.dotfiles | xmonad.hs | mit | ------------------------------------------------------------------------
-- Event handling
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
-- * NOTE: EwmhDe... | 574 | myEventHook = mempty | 20 | myEventHook = mempty | 20 | true | false | 0 | 4 | 84 | 17 | 14 | 3 | null | null |
j5b/ps-pc | ModelChecker_test.hs | gpl-3.0 | test120 = testequality "Failed to show forall S C is true" result target $ printModel model1
where result = checkGivens forall_s_c model1
target = ("", True) | 167 | test120 = testequality "Failed to show forall S C is true" result target $ printModel model1
where result = checkGivens forall_s_c model1
target = ("", True) | 167 | test120 = testequality "Failed to show forall S C is true" result target $ printModel model1
where result = checkGivens forall_s_c model1
target = ("", True) | 167 | false | false | 2 | 6 | 35 | 52 | 22 | 30 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLMediaElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement.loop Mozilla HTMLMediaElement.loop documentation>
setLoop ::
(MonadDOM m, IsHTMLMediaElement self) => self -> Bool -> m ()
setLoop self val
= liftDOM ((toHTMLMediaElement self) ^. jss "loop" (toJSVal val)) | 288 | setLoop ::
(MonadDOM m, IsHTMLMediaElement self) => self -> Bool -> m ()
setLoop self val
= liftDOM ((toHTMLMediaElement self) ^. jss "loop" (toJSVal val)) | 165 | setLoop self val
= liftDOM ((toHTMLMediaElement self) ^. jss "loop" (toJSVal val)) | 84 | true | true | 0 | 10 | 41 | 72 | 36 | 36 | null | null |
mino2357/Hello_Haskell | src/haskell020.hs | mit | main = do
print $ 12345:334:[1..7] ++ [4, 5] | 48 | main = do
print $ 12345:334:[1..7] ++ [4, 5] | 48 | main = do
print $ 12345:334:[1..7] ++ [4, 5] | 48 | false | false | 1 | 10 | 12 | 40 | 19 | 21 | null | null |
ulrikrasmussen/TwelfParser | src/Language/Twelf/AST.hs | bsd-3-clause | conc t = t | 10 | conc t = t | 10 | conc t = t | 10 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.