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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
divipp/lensref | src/Utils.hs | bsd-3-clause | modSimpleRef :: SimpleRefs m => SimpleRef m a -> (a -> m (a, b)) -> m b
modSimpleRef x f = do
v <- readSimpleRef x
(v', a) <- f v
writeSimpleRef x v'
return a | 174 | modSimpleRef :: SimpleRefs m => SimpleRef m a -> (a -> m (a, b)) -> m b
modSimpleRef x f = do
v <- readSimpleRef x
(v', a) <- f v
writeSimpleRef x v'
return a | 174 | modSimpleRef x f = do
v <- readSimpleRef x
(v', a) <- f v
writeSimpleRef x v'
return a | 102 | false | true | 0 | 11 | 51 | 95 | 44 | 51 | null | null |
brendanhay/gogol | gogol-cloudscheduler/gen/Network/Google/Resource/CloudScheduler/Projects/Locations/Jobs/Delete.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
pljdUploadType :: Lens' ProjectsLocationsJobsDelete (Maybe Text)
pljdUploadType
= lens _pljdUploadType
(\ s a -> s{_pljdUploadType = a}) | 215 | pljdUploadType :: Lens' ProjectsLocationsJobsDelete (Maybe Text)
pljdUploadType
= lens _pljdUploadType
(\ s a -> s{_pljdUploadType = a}) | 144 | pljdUploadType
= lens _pljdUploadType
(\ s a -> s{_pljdUploadType = a}) | 79 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
pasberth/binal1 | Language/Binal/Generator/Simple.hs | mit | generateExpr (TyList (TyLit (SymLit "unmutable") _ _:x:[]) _ _) = do
generateExpr x | 85 | generateExpr (TyList (TyLit (SymLit "unmutable") _ _:x:[]) _ _) = do
generateExpr x | 85 | generateExpr (TyList (TyLit (SymLit "unmutable") _ _:x:[]) _ _) = do
generateExpr x | 85 | false | false | 0 | 12 | 14 | 51 | 24 | 27 | null | null |
wrengr/bytestring-trie | dev/Bench/Foldable.hs | bsd-3-clause | foldr_noClosure f z (Arc _ (Just v) t) = f v (foldr_noClosure f z t) | 68 | foldr_noClosure f z (Arc _ (Just v) t) = f v (foldr_noClosure f z t) | 68 | foldr_noClosure f z (Arc _ (Just v) t) = f v (foldr_noClosure f z t) | 68 | false | false | 0 | 9 | 14 | 44 | 21 | 23 | null | null |
jtapolczai/Hephaestos | Main.hs | apache-2.0 | -- |The entry point for the CLI.
main :: IO ()
main = withSocketsDo $
(initState >>= mainCLI) `catchAll` (errorMsg "en" >=> printError)
where
initState :: IO AppState
initState = do
config <- readAppConfig
req <- readRequestConfig config
dlf <- downloadsFolder
cur <... | 1,452 | main :: IO ()
main = withSocketsDo $
(initState >>= mainCLI) `catchAll` (errorMsg "en" >=> printError)
where
initState :: IO AppState
initState = do
config <- readAppConfig
req <- readRequestConfig config
dlf <- downloadsFolder
cur <- getCurrentDirectory >$> decodeS... | 1,419 | main = withSocketsDo $
(initState >>= mainCLI) `catchAll` (errorMsg "en" >=> printError)
where
initState :: IO AppState
initState = do
config <- readAppConfig
req <- readRequestConfig config
dlf <- downloadsFolder
cur <- getCurrentDirectory >$> decodeString
... | 1,405 | true | true | 0 | 14 | 677 | 301 | 162 | 139 | null | null |
martinra/hflint | test/HFlint/Test/FMPZPoly.hs | gpl-3.0 | properties :: TestTree
properties = testGroup "Properties"
[ -- Eq instance
-- we use only QuickCheck, because SmallCheck is yields too slow tests
testPropertyQC "Eq" $
intertwiningInnerPairing fromIntegers
((==) `on` reverse . dropWhile (0==) . reverse)
(==)
] | 291 | properties :: TestTree
properties = testGroup "Properties"
[ -- Eq instance
-- we use only QuickCheck, because SmallCheck is yields too slow tests
testPropertyQC "Eq" $
intertwiningInnerPairing fromIntegers
((==) `on` reverse . dropWhile (0==) . reverse)
(==)
] | 291 | properties = testGroup "Properties"
[ -- Eq instance
-- we use only QuickCheck, because SmallCheck is yields too slow tests
testPropertyQC "Eq" $
intertwiningInnerPairing fromIntegers
((==) `on` reverse . dropWhile (0==) . reverse)
(==)
] | 268 | false | true | 0 | 12 | 67 | 64 | 36 | 28 | null | null |
jpierre03/hahp | tests/HAHP/Props/Tests.hs | gpl-3.0 | libQcProps = testGroup "(checked by QuickCheck)"
[
--QC.testProperty "Squared numbers are positives or null" $ \size -> (size*size :: Integer) >= 0
QC.testProperty "generated matrix size is good - rows & cols" $ \size -> matrixSizeGood (size :: Int)
, QC.testProperty "generated matrix size is goo... | 375 | libQcProps = testGroup "(checked by QuickCheck)"
[
--QC.testProperty "Squared numbers are positives or null" $ \size -> (size*size :: Integer) >= 0
QC.testProperty "generated matrix size is good - rows & cols" $ \size -> matrixSizeGood (size :: Int)
, QC.testProperty "generated matrix size is goo... | 375 | libQcProps = testGroup "(checked by QuickCheck)"
[
--QC.testProperty "Squared numbers are positives or null" $ \size -> (size*size :: Integer) >= 0
QC.testProperty "generated matrix size is good - rows & cols" $ \size -> matrixSizeGood (size :: Int)
, QC.testProperty "generated matrix size is goo... | 375 | false | false | 0 | 10 | 82 | 64 | 34 | 30 | null | null |
quchen/shaking-up-ghc | src/Settings/Packages/Rts.hs | bsd-3-clause | rtsConfIn :: FilePath
rtsConfIn = pkgPath rts -/- "package.conf.in" | 67 | rtsConfIn :: FilePath
rtsConfIn = pkgPath rts -/- "package.conf.in" | 67 | rtsConfIn = pkgPath rts -/- "package.conf.in" | 45 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
egaburov/funstuff | Haskell/book/14_foldables.hs | apache-2.0 | -- > fold tree
-- 12
-- > fold tree'
-- 60
-- Generic functions
average :: Foldable t => t Int -> Int
average ns = sum ns `div` length ns | 139 | average :: Foldable t => t Int -> Int
average ns = sum ns `div` length ns | 73 | average ns = sum ns `div` length ns | 35 | true | true | 0 | 8 | 33 | 50 | 25 | 25 | null | null |
penteract/HigherOrderHornRefinement | HOCHC/Refinement/HCParser.hs | bsd-3-clause | separator = (tok ";" >> tok "\n") <|> tok "\n" <|> return "" | 60 | separator = (tok ";" >> tok "\n") <|> tok "\n" <|> return "" | 60 | separator = (tok ";" >> tok "\n") <|> tok "\n" <|> return "" | 60 | false | false | 1 | 9 | 12 | 36 | 15 | 21 | null | null |
brendanhay/gogol | gogol-monitoring/gen/Network/Google/Monitoring/Types/Product.hs | mpl-2.0 | -- | The internal checkers that this check will egress from. If is_internal
-- is true and this list is empty, the check will egress from all the
-- InternalCheckers configured for the project that owns this
-- UptimeCheckConfig.
uccInternalCheckers :: Lens' UptimeCheckConfig [InternalChecker]
uccInternalCheckers
= l... | 422 | uccInternalCheckers :: Lens' UptimeCheckConfig [InternalChecker]
uccInternalCheckers
= lens _uccInternalCheckers
(\ s a -> s{_uccInternalCheckers = a})
. _Default
. _Coerce | 192 | uccInternalCheckers
= lens _uccInternalCheckers
(\ s a -> s{_uccInternalCheckers = a})
. _Default
. _Coerce | 127 | true | true | 2 | 8 | 78 | 60 | 31 | 29 | null | null |
jchmrt/btjchm | Parsers.hs | mit | removeAfkUser :: User -> IRCParser ()
removeAfkUser usr = do
old <- getOnlineUsers
putOnlineUsers $ M.insert usr Nothing old | 128 | removeAfkUser :: User -> IRCParser ()
removeAfkUser usr = do
old <- getOnlineUsers
putOnlineUsers $ M.insert usr Nothing old | 128 | removeAfkUser usr = do
old <- getOnlineUsers
putOnlineUsers $ M.insert usr Nothing old | 90 | false | true | 0 | 9 | 22 | 46 | 21 | 25 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects FinalizeWeakOp = True | 42 | primOpHasSideEffects FinalizeWeakOp = True | 42 | primOpHasSideEffects FinalizeWeakOp = True | 42 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
anttisalonen/freekick | haskell/freekick_server/physics/src/Main.hs | agpl-3.0 | getClientType :: Handle -> IO ClientType
getClientType h = do
putStrLn "Waiting for OK"
s <- hGetLine h
putStrLn ("Received: " ++ s)
idl <- evaluate (read (drop 2 s)) `catch` \e -> (print (show (e :: IOException))) >> return []
case take 2 s of
"OK" -> return (Human idl)
"AI" -> return... | 434 | getClientType :: Handle -> IO ClientType
getClientType h = do
putStrLn "Waiting for OK"
s <- hGetLine h
putStrLn ("Received: " ++ s)
idl <- evaluate (read (drop 2 s)) `catch` \e -> (print (show (e :: IOException))) >> return []
case take 2 s of
"OK" -> return (Human idl)
"AI" -> return... | 434 | getClientType h = do
putStrLn "Waiting for OK"
s <- hGetLine h
putStrLn ("Received: " ++ s)
idl <- evaluate (read (drop 2 s)) `catch` \e -> (print (show (e :: IOException))) >> return []
case take 2 s of
"OK" -> return (Human idl)
"AI" -> return (AI idl)
_ -> return Invali... | 393 | false | true | 0 | 15 | 118 | 164 | 78 | 86 | null | null |
gcampax/ghc | compiler/utils/Outputable.hs | bsd-3-clause | pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
-- Truncate a list that list that is longer than the current depth
pprDeeperList f ds
| null ds = f []
| otherwise = SDoc work
where
work ctx@SDC{sdocStyle=PprUser q (PartWay n)}
| n==0 = Pretty.text "..."
| otherwise =
runSDoc (f (go 0 ds)) ... | 525 | pprDeeperList :: ([SDoc] -> SDoc) -> [SDoc] -> SDoc
pprDeeperList f ds
| null ds = f []
| otherwise = SDoc work
where
work ctx@SDC{sdocStyle=PprUser q (PartWay n)}
| n==0 = Pretty.text "..."
| otherwise =
runSDoc (f (go 0 ds)) ctx{sdocStyle = PprUser q (PartWay (n-1))}
where
go _ [] = ... | 458 | pprDeeperList f ds
| null ds = f []
| otherwise = SDoc work
where
work ctx@SDC{sdocStyle=PprUser q (PartWay n)}
| n==0 = Pretty.text "..."
| otherwise =
runSDoc (f (go 0 ds)) ctx{sdocStyle = PprUser q (PartWay (n-1))}
where
go _ [] = []
go i (d:ds) | i >= n = [text "...."]
... | 406 | true | true | 2 | 12 | 152 | 285 | 132 | 153 | null | null |
alanz/machines-play | Main.hs | bsd-3-clause | -- |simplest machine, using Identity Monad for pure results
simplest :: [Char]
simplest = run machinea | 102 | simplest :: [Char]
simplest = run machinea | 42 | simplest = run machinea | 23 | true | true | 0 | 7 | 15 | 25 | 11 | 14 | null | null |
fmapfmapfmap/amazonka | amazonka-directconnect/gen/Network/AWS/DirectConnect/Types/Product.hs | mpl-2.0 | -- | Undocumented member.
newAmazonAddress :: Lens' NewPublicVirtualInterfaceAllocation Text
newAmazonAddress = lens _newAmazonAddress (\ s a -> s{_newAmazonAddress = a}) | 170 | newAmazonAddress :: Lens' NewPublicVirtualInterfaceAllocation Text
newAmazonAddress = lens _newAmazonAddress (\ s a -> s{_newAmazonAddress = a}) | 144 | newAmazonAddress = lens _newAmazonAddress (\ s a -> s{_newAmazonAddress = a}) | 77 | true | true | 1 | 9 | 19 | 46 | 22 | 24 | null | null |
rueshyna/gogol | gogol-apps-tasks/gen/Network/Google/Resource/Tasks/TaskLists/List.hs | mpl-2.0 | -- | Creates a value of 'TaskListsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tllPageToken'
--
-- * 'tllMaxResults'
taskListsList
:: TaskListsList
taskListsList =
TaskListsList'
{ _tllPageToken = Nothing
, _t... | 348 | taskListsList
:: TaskListsList
taskListsList =
TaskListsList'
{ _tllPageToken = Nothing
, _tllMaxResults = Nothing
} | 136 | taskListsList =
TaskListsList'
{ _tllPageToken = Nothing
, _tllMaxResults = Nothing
} | 101 | true | true | 0 | 6 | 72 | 32 | 22 | 10 | null | null |
spacekitteh/smcghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprGInstr (GADD sz src1 src2 dst) = pprSizeRegRegReg (sLit "gadd") sz src1 src2 dst | 83 | pprGInstr (GADD sz src1 src2 dst) = pprSizeRegRegReg (sLit "gadd") sz src1 src2 dst | 83 | pprGInstr (GADD sz src1 src2 dst) = pprSizeRegRegReg (sLit "gadd") sz src1 src2 dst | 83 | false | false | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
hanshoglund/modulo | src/Language/Modulo/Haskell.hs | gpl-3.0 | -- |
-- Render a module using the default style.
--
-- Returns a Haskell file, represented as a syntax tree.
--
renderModuleHaskell :: Module -> HsModule
renderModuleHaskell = renderModuleHaskellStyle def | 204 | renderModuleHaskell :: Module -> HsModule
renderModuleHaskell = renderModuleHaskellStyle def | 92 | renderModuleHaskell = renderModuleHaskellStyle def | 50 | true | true | 0 | 5 | 30 | 23 | 14 | 9 | null | null |
bryangarza/cheese | src/Cheese.hs | mit | lsLayers (Just White) (Board a b c d e f _ _ _ _ _ _) = [a,b,c,d,e,f] | 69 | lsLayers (Just White) (Board a b c d e f _ _ _ _ _ _) = [a,b,c,d,e,f] | 69 | lsLayers (Just White) (Board a b c d e f _ _ _ _ _ _) = [a,b,c,d,e,f] | 69 | false | false | 0 | 7 | 17 | 63 | 34 | 29 | null | null |
green-haskell/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | bindIOIdKey = mkPreludeMiscIdUnique 34 | 56 | bindIOIdKey = mkPreludeMiscIdUnique 34 | 56 | bindIOIdKey = mkPreludeMiscIdUnique 34 | 56 | false | false | 0 | 5 | 21 | 9 | 4 | 5 | null | null |
np/json-tools | jq.hs | bsd-3-clause | parseOpFilter = buildExpressionParser table parseConcFilter
<?> "op filter" | 88 | parseOpFilter = buildExpressionParser table parseConcFilter
<?> "op filter" | 88 | parseOpFilter = buildExpressionParser table parseConcFilter
<?> "op filter" | 88 | false | false | 3 | 5 | 20 | 20 | 7 | 13 | null | null |
romanb/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/DescribeScheduledActions.hs | mpl-2.0 | -- | 'DescribeScheduledActionsResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'dsarNextToken' @::@ 'Maybe' 'Text'
--
-- * 'dsarScheduledUpdateGroupActions' @::@ ['ScheduledUpdateGroupAction']
--
describeScheduledActionsResponse :: DescribeScheduledActionsResponse
describeSch... | 479 | describeScheduledActionsResponse :: DescribeScheduledActionsResponse
describeScheduledActionsResponse = DescribeScheduledActionsResponse
{ _dsarScheduledUpdateGroupActions = mempty
, _dsarNextToken = Nothing
} | 239 | describeScheduledActionsResponse = DescribeScheduledActionsResponse
{ _dsarScheduledUpdateGroupActions = mempty
, _dsarNextToken = Nothing
} | 170 | true | true | 0 | 7 | 71 | 37 | 24 | 13 | null | null |
sopvop/snap-server | src/Snap/Internal/Http/Server/Config.hs | bsd-3-clause | fmapArg f (ReqArg g s) = ReqArg (f . g) s | 41 | fmapArg f (ReqArg g s) = ReqArg (f . g) s | 41 | fmapArg f (ReqArg g s) = ReqArg (f . g) s | 41 | false | false | 0 | 7 | 10 | 33 | 15 | 18 | null | null |
elblake/hs-php-session | tests/DecodeAndReencode.hs | bsd-3-clause | test2 = "v1|a:3:{i:0;i:10;i:1;i:9;i:2;a:3:{i:0;i:8;i:1;i:7;i:2;a:3:{i:0;i:6;i:1;s:4:\"five\";i:2;d:4;}}}v2|O:9:\"ClassName\":2:{s:4:\"blah\";i:1;s:3:\"str\";s:94:\" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\";}" | 265 | test2 = "v1|a:3:{i:0;i:10;i:1;i:9;i:2;a:3:{i:0;i:8;i:1;i:7;i:2;a:3:{i:0;i:6;i:1;s:4:\"five\";i:2;d:4;}}}v2|O:9:\"ClassName\":2:{s:4:\"blah\";i:1;s:3:\"str\";s:94:\" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\";}" | 265 | test2 = "v1|a:3:{i:0;i:10;i:1;i:9;i:2;a:3:{i:0;i:8;i:1;i:7;i:2;a:3:{i:0;i:6;i:1;s:4:\"five\";i:2;d:4;}}}v2|O:9:\"ClassName\":2:{s:4:\"blah\";i:1;s:3:\"str\";s:94:\" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\";}" | 265 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
sbidin/sdl2-mixer | examples/Basic.hs | bsd-3-clause | main :: IO ()
main = do
-- read arguments
fileName <- do
args <- getArgs
case args of
(arg:_) -> return arg
_ -> do
putStrLn "Usage: cabal run sdl2-mixer-basic <sound filename>"
exitFailure
-- initialize libraries
SDL.initialize [SDL.InitAudio]
Mix.initialize [Mix.InitMP3]... | 615 | main :: IO ()
main = do
-- read arguments
fileName <- do
args <- getArgs
case args of
(arg:_) -> return arg
_ -> do
putStrLn "Usage: cabal run sdl2-mixer-basic <sound filename>"
exitFailure
-- initialize libraries
SDL.initialize [SDL.InitAudio]
Mix.initialize [Mix.InitMP3]... | 615 | main = do
-- read arguments
fileName <- do
args <- getArgs
case args of
(arg:_) -> return arg
_ -> do
putStrLn "Usage: cabal run sdl2-mixer-basic <sound filename>"
exitFailure
-- initialize libraries
SDL.initialize [SDL.InitAudio]
Mix.initialize [Mix.InitMP3]
-- open de... | 601 | false | true | 0 | 17 | 162 | 171 | 79 | 92 | null | null |
ghc-android/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | demoteNameSpace TvName = Nothing | 32 | demoteNameSpace TvName = Nothing | 32 | demoteNameSpace TvName = Nothing | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
rodrigo-machado/verigraph | src/library/XML/GGXParseOut.hs | gpl-3.0 | parseCPGraph :: (String,String,[CP.CriticalPair (TypedGraphMorphism a b)]) -> Overlappings
parseCPGraph (name1,name2,cps) = (name1,name2,overlaps)
where
overlaps = map (overlapsCP name2) cps | 196 | parseCPGraph :: (String,String,[CP.CriticalPair (TypedGraphMorphism a b)]) -> Overlappings
parseCPGraph (name1,name2,cps) = (name1,name2,overlaps)
where
overlaps = map (overlapsCP name2) cps | 196 | parseCPGraph (name1,name2,cps) = (name1,name2,overlaps)
where
overlaps = map (overlapsCP name2) cps | 105 | false | true | 0 | 10 | 24 | 80 | 44 | 36 | null | null |
codemac/yi-editor | src/Shim/Messages.hs | gpl-2.0 | findDefinition :: FilePath -> Int -> Int -> Maybe String -> SHM (Response Se)
findDefinition filename line col source = do
srcLoc <- Hsinfo.findDefinition filename line col source
loc <- encodeSrcLoc srcLoc
retVal loc | 223 | findDefinition :: FilePath -> Int -> Int -> Maybe String -> SHM (Response Se)
findDefinition filename line col source = do
srcLoc <- Hsinfo.findDefinition filename line col source
loc <- encodeSrcLoc srcLoc
retVal loc | 223 | findDefinition filename line col source = do
srcLoc <- Hsinfo.findDefinition filename line col source
loc <- encodeSrcLoc srcLoc
retVal loc | 145 | false | true | 0 | 12 | 39 | 87 | 38 | 49 | null | null |
afronski/playground-fp | books/learn-you-a-haskell-for-great-good/making-our-own-types-and-typeclasses/Person2.hs | mit | mikeD = Person2 { firstName = "Michael", lastName = "Diamond", age = 43 } | 73 | mikeD = Person2 { firstName = "Michael", lastName = "Diamond", age = 43 } | 73 | mikeD = Person2 { firstName = "Michael", lastName = "Diamond", age = 43 } | 73 | false | false | 0 | 6 | 13 | 26 | 16 | 10 | null | null |
copton/ocram | ocram/src/Ocram/Intermediate/CriticalVariables.hs | gpl-2.0 | readAccess o@(CStatExpr _ _) = $abort $ unexp o | 59 | readAccess o@(CStatExpr _ _) = $abort $ unexp o | 59 | readAccess o@(CStatExpr _ _) = $abort $ unexp o | 59 | false | false | 0 | 8 | 20 | 28 | 13 | 15 | null | null |
sirius94/lambdai | src/Reducer.hs | gpl-3.0 | callByValue = innermostFirstNoLambda | 36 | callByValue = innermostFirstNoLambda | 36 | callByValue = innermostFirstNoLambda | 36 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
travitch/humidor | src/Smoke/Gen/Classes.hs | bsd-3-clause | classesModuleName :: Gen Text
classesModuleName = do
moduleName <- askModuleName
modNameMap <- askModuleConf generatorModuleNameMap
return $ modNameMap moduleName `mappend` "Classes" | 188 | classesModuleName :: Gen Text
classesModuleName = do
moduleName <- askModuleName
modNameMap <- askModuleConf generatorModuleNameMap
return $ modNameMap moduleName `mappend` "Classes" | 188 | classesModuleName = do
moduleName <- askModuleName
modNameMap <- askModuleConf generatorModuleNameMap
return $ modNameMap moduleName `mappend` "Classes" | 158 | false | true | 0 | 9 | 25 | 47 | 22 | 25 | null | null |
xmonad/xmonad | src/XMonad/StackSet.hs | bsd-3-clause | delete :: (Ord a) => a -> StackSet i l a s sd -> StackSet i l a s sd
delete w = sink w . delete' w | 98 | delete :: (Ord a) => a -> StackSet i l a s sd -> StackSet i l a s sd
delete w = sink w . delete' w | 98 | delete w = sink w . delete' w | 29 | false | true | 0 | 8 | 27 | 63 | 30 | 33 | null | null |
ahmadnazir/scheme | 2_Parsing/Language/Number.hs | mit | toDouble :: D.LispVal -> Double
toDouble(D.Float f) = realToFrac f | 66 | toDouble :: D.LispVal -> Double
toDouble(D.Float f) = realToFrac f | 66 | toDouble(D.Float f) = realToFrac f | 34 | false | true | 0 | 10 | 9 | 36 | 16 | 20 | null | null |
abuiles/turbinado-blog | tmp/dependencies/hsx-0.4.5/src/HSX/Transform.hs | bsd-3-clause | runMatchFun, baseMatchFun, manyMatchFun, gManyMatchFun :: HsExp
runMatchFun = match_qual runMatch_name | 102 | runMatchFun, baseMatchFun, manyMatchFun, gManyMatchFun :: HsExp
runMatchFun = match_qual runMatch_name | 102 | runMatchFun = match_qual runMatch_name | 38 | false | true | 5 | 5 | 9 | 32 | 13 | 19 | null | null |
yav/smtLib | src/SMTLib2/BitVector.hs | mit | bvsub :: Expr -> Expr -> Expr
bvsub x y = app "bvsub" [x,y] | 59 | bvsub :: Expr -> Expr -> Expr
bvsub x y = app "bvsub" [x,y] | 59 | bvsub x y = app "bvsub" [x,y] | 29 | false | true | 0 | 6 | 13 | 35 | 18 | 17 | null | null |
uduki/hsQt | Qtc/Core/QDateTime.hs | bsd-2-clause | timeSpec :: QDateTime a -> (()) -> IO (TimeSpec)
timeSpec x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTime_timeSpec cobj_x0 | 155 | timeSpec :: QDateTime a -> (()) -> IO (TimeSpec)
timeSpec x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTime_timeSpec cobj_x0 | 155 | timeSpec x0 ()
= withQEnumResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDateTime_timeSpec cobj_x0 | 106 | false | true | 0 | 8 | 31 | 59 | 29 | 30 | null | null |
cartazio/omega | src/Encoding.hs | bsd-3-clause | consDown :: Encoding a => V -> [a]
consDown (Vcon (Global "[]",lx) []) | normalList lx = [] | 93 | consDown :: Encoding a => V -> [a]
consDown (Vcon (Global "[]",lx) []) | normalList lx = [] | 93 | consDown (Vcon (Global "[]",lx) []) | normalList lx = [] | 58 | false | true | 0 | 12 | 19 | 64 | 29 | 35 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | quiveringly = id | 16 | quiveringly = id | 16 | quiveringly = id | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
gibiansky/hlint | data/Default.hs | bsd-3-clause | error = elem True ==> or | 24 | error = elem True ==> or | 24 | error = elem True ==> or | 24 | false | false | 1 | 6 | 5 | 17 | 6 | 11 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M04/D18/Solution.hs | mit | mbshow :: Show a => Maybe a -> String
mbshow Nothing = "" | 57 | mbshow :: Show a => Maybe a -> String
mbshow Nothing = "" | 57 | mbshow Nothing = "" | 19 | false | true | 0 | 7 | 12 | 28 | 13 | 15 | null | null |
sol/aeson | tests/Properties.hs | bsd-3-clause | isUntaggedValueETI (Bool _) = True | 36 | isUntaggedValueETI (Bool _) = True | 36 | isUntaggedValueETI (Bool _) = True | 36 | false | false | 0 | 7 | 6 | 15 | 7 | 8 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Delete.hs | mpl-2.0 | -- | Creates a value of 'OrganizationsSinksDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'osdXgafv'
--
-- * 'osdUploadProtocol'
--
-- * 'osdPp'
--
-- * 'osdAccessToken'
--
-- * 'osdUploadType'
--
-- * 'osdBearerToken'
--
-- *... | 761 | organizationsSinksDelete
:: Text -- ^ 'osdSinkName'
-> OrganizationsSinksDelete
organizationsSinksDelete pOsdSinkName_ =
OrganizationsSinksDelete'
{ _osdXgafv = Nothing
, _osdUploadProtocol = Nothing
, _osdPp = True
, _osdAccessToken = Nothing
, _osdUploadType = Nothing
, _osdBearerT... | 404 | organizationsSinksDelete pOsdSinkName_ =
OrganizationsSinksDelete'
{ _osdXgafv = Nothing
, _osdUploadProtocol = Nothing
, _osdPp = True
, _osdAccessToken = Nothing
, _osdUploadType = Nothing
, _osdBearerToken = Nothing
, _osdSinkName = pOsdSinkName_
, _osdCallback = Nothing
} | 316 | true | true | 0 | 6 | 154 | 88 | 62 | 26 | null | null |
anr/prog-haskell | chapter-02.hs | mit | -- Exercises from chapter 2.
-- 3
n = a `div` length xs
where
a = 10
xs = [1,2,3,4,5]
-- 4 | 103 | n = a `div` length xs
where
a = 10
xs = [1,2,3,4,5]
-- 4 | 67 | n = a `div` length xs
where
a = 10
xs = [1,2,3,4,5]
-- 4 | 67 | true | false | 2 | 6 | 34 | 51 | 28 | 23 | null | null |
MicheleCastrovilli/EuPhBot | Bots/HaskellBot/Main.hs | bsd-3-clause | myFun a@(SnapshotEvent _ _ _ u _) = do
tellLog $ T.pack $ show u
w <- sendPacket Who
let equ = \x y -> name x == name y
let grsort = L.groupBy equ . L.sortBy (\x y -> compare (name x) ... | 627 | myFun a@(SnapshotEvent _ _ _ u _) = do
tellLog $ T.pack $ show u
w <- sendPacket Who
let equ = \x y -> name x == name y
let grsort = L.groupBy equ . L.sortBy (\x y -> compare (name x) ... | 627 | myFun a@(SnapshotEvent _ _ _ u _) = do
tellLog $ T.pack $ show u
w <- sendPacket Who
let equ = \x y -> name x == name y
let grsort = L.groupBy equ . L.sortBy (\x y -> compare (name x) ... | 627 | false | false | 5 | 13 | 328 | 209 | 104 | 105 | null | null |
sdiehl/ghc | hadrian/src/Rules/Register.hs | bsd-3-clause | parseSetupConfig :: FilePath -> Parsec.Parsec String () (Stage, FilePath)
parseSetupConfig root = do
_ <- Parsec.string root *> Parsec.optional (Parsec.char '/')
stage <- parseStage
_ <- Parsec.char '/'
pkgPath <- Parsec.manyTill Parsec.anyChar
(Parsec.try $ Parsec.string "/setup-config")
re... | 341 | parseSetupConfig :: FilePath -> Parsec.Parsec String () (Stage, FilePath)
parseSetupConfig root = do
_ <- Parsec.string root *> Parsec.optional (Parsec.char '/')
stage <- parseStage
_ <- Parsec.char '/'
pkgPath <- Parsec.manyTill Parsec.anyChar
(Parsec.try $ Parsec.string "/setup-config")
re... | 341 | parseSetupConfig root = do
_ <- Parsec.string root *> Parsec.optional (Parsec.char '/')
stage <- parseStage
_ <- Parsec.char '/'
pkgPath <- Parsec.manyTill Parsec.anyChar
(Parsec.try $ Parsec.string "/setup-config")
return (stage, pkgPath) | 267 | false | true | 0 | 12 | 66 | 125 | 59 | 66 | null | null |
luqui/logic-db | LogicDB/Parser.hs | bsd-3-clause | -- CodeShare Snippet http://www.codeshare.co/450/3/
sortNub :: (Ord a) => [a] -> [a]
sortNub = Data.Set.toList . Data.Set.fromList | 130 | sortNub :: (Ord a) => [a] -> [a]
sortNub = Data.Set.toList . Data.Set.fromList | 78 | sortNub = Data.Set.toList . Data.Set.fromList | 45 | true | true | 1 | 9 | 16 | 49 | 25 | 24 | null | null |
tomicm/puh-hash | Parsing/HashParser.hs | gpl-2.0 | -- parses a single command
command :: Parser Stmt
command = do
name <- lexeme someString
args <- many cmdArg
semi
return $ Cmd name
(getRealArgs args)
(findInputRedir args)
(findOutputRedir args)
-- find last input/output redirection from arguments | 308 | command :: Parser Stmt
command = do
name <- lexeme someString
args <- many cmdArg
semi
return $ Cmd name
(getRealArgs args)
(findInputRedir args)
(findOutputRedir args)
-- find last input/output redirection from arguments | 281 | command = do
name <- lexeme someString
args <- many cmdArg
semi
return $ Cmd name
(getRealArgs args)
(findInputRedir args)
(findOutputRedir args)
-- find last input/output redirection from arguments | 258 | true | true | 0 | 10 | 97 | 73 | 34 | 39 | null | null |
pogin503/vbautil | language/haskell/caesar/src/Lib.hs | mit | caesarDecode :: String -> Int -> String -> String -> String
caesarDecode plain seed charset allowedStrRx =
map (\c -> if [c] =~ allowedStrRx
then decode c seed
else c) plain
where
decode :: Char -> Int -> Char
decode c seed' =
charset !! (mod ((fromJust $ elemIndex c charset... | 348 | caesarDecode :: String -> Int -> String -> String -> String
caesarDecode plain seed charset allowedStrRx =
map (\c -> if [c] =~ allowedStrRx
then decode c seed
else c) plain
where
decode :: Char -> Int -> Char
decode c seed' =
charset !! (mod ((fromJust $ elemIndex c charset... | 348 | caesarDecode plain seed charset allowedStrRx =
map (\c -> if [c] =~ allowedStrRx
then decode c seed
else c) plain
where
decode :: Char -> Int -> Char
decode c seed' =
charset !! (mod ((fromJust $ elemIndex c charset) - seed') $ length charset) | 288 | false | true | 3 | 13 | 100 | 131 | 67 | 64 | null | null |
nbloomf/carl | test/Tests/Util.hs | gpl-3.0 | isLIdentityUnderBy :: (a -> a -> Either err a) -> (a -> a -> Either err Bool) -> (a,a) -> Bool
isLIdentityUnderBy op eq (x,y) = checkEither foo
where
foo = do
t <- x `op` y
t `eq` y | 199 | isLIdentityUnderBy :: (a -> a -> Either err a) -> (a -> a -> Either err Bool) -> (a,a) -> Bool
isLIdentityUnderBy op eq (x,y) = checkEither foo
where
foo = do
t <- x `op` y
t `eq` y | 199 | isLIdentityUnderBy op eq (x,y) = checkEither foo
where
foo = do
t <- x `op` y
t `eq` y | 104 | false | true | 1 | 10 | 57 | 117 | 57 | 60 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_MARKNUM_FOLDERMIDTAIL :: Int
wxSTC_MARKNUM_FOLDERMIDTAIL = 27 | 67 | wxSTC_MARKNUM_FOLDERMIDTAIL :: Int
wxSTC_MARKNUM_FOLDERMIDTAIL = 27 | 67 | wxSTC_MARKNUM_FOLDERMIDTAIL = 27 | 32 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
binesiyu/ifl | examples/ch25/G.hs | mit | main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
{-- snippet pair --} | 98 | main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
{-- snippet pair --} | 98 | main = do
[d] <- map read `fmap` getArgs
printf "%f\n" (mean [1..d])
{-- snippet pair --} | 98 | false | false | 0 | 10 | 25 | 45 | 23 | 22 | null | null |
jano017/Discord.hs | src/Network/Discord/Framework.hs | mit | handle a@(GuildBanRemoveEvent p) (D.GuildBanRemove o)
= runAsync (clientProxy a) $ p o | 99 | handle a@(GuildBanRemoveEvent p) (D.GuildBanRemove o)
= runAsync (clientProxy a) $ p o | 99 | handle a@(GuildBanRemoveEvent p) (D.GuildBanRemove o)
= runAsync (clientProxy a) $ p o | 99 | false | false | 0 | 8 | 24 | 44 | 21 | 23 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | uWordHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uWord#") | 59 | uWordHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uWord#") | 59 | uWordHash_RDR = varQual_RDR gHC_GENERICS (fsLit "uWord#") | 59 | false | false | 0 | 7 | 7 | 17 | 8 | 9 | null | null |
zenhack/haskell-capnp | cmd/capnpc-haskell/IR/Raw.hs | mit | -- | Convert a tag offset (as in the 'tagOffset' field of 'TagSetter') to a
-- corresponding 'Common.DataLoc', with the default value set to zero.
tagOffsetToDataLoc :: Word32 -> Common.DataLoc
tagOffsetToDataLoc tagOffset =
Common.DataLoc
{ dataIdx = fromIntegral tagOffset `div` 4
, dataOff = (from... | 384 | tagOffsetToDataLoc :: Word32 -> Common.DataLoc
tagOffsetToDataLoc tagOffset =
Common.DataLoc
{ dataIdx = fromIntegral tagOffset `div` 4
, dataOff = (fromIntegral tagOffset `mod` 4) * 16
, dataDef = 0
} | 237 | tagOffsetToDataLoc tagOffset =
Common.DataLoc
{ dataIdx = fromIntegral tagOffset `div` 4
, dataOff = (fromIntegral tagOffset `mod` 4) * 16
, dataDef = 0
} | 190 | true | true | 0 | 10 | 90 | 69 | 40 | 29 | null | null |
brendanhay/hexpat-pickle-generic | src/Text/XML/Expat/Pickle/Generic.hs | bsd-3-clause | xpPrim :: (Read a, Show a) => PU ByteString a
xpPrim = XMLPU
{ root = Nothing
, pickleTree = BS.pack . show
, unpickleTree = \t ->
let s = BS.unpack t
in case reads s of
[(x, "")] -> Right x
_ -> Left $ "failed to read text: " ++ s
} | 313 | xpPrim :: (Read a, Show a) => PU ByteString a
xpPrim = XMLPU
{ root = Nothing
, pickleTree = BS.pack . show
, unpickleTree = \t ->
let s = BS.unpack t
in case reads s of
[(x, "")] -> Right x
_ -> Left $ "failed to read text: " ++ s
} | 313 | xpPrim = XMLPU
{ root = Nothing
, pickleTree = BS.pack . show
, unpickleTree = \t ->
let s = BS.unpack t
in case reads s of
[(x, "")] -> Right x
_ -> Left $ "failed to read text: " ++ s
} | 267 | false | true | 0 | 15 | 134 | 126 | 64 | 62 | null | null |
RossMeikleham/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | ctype (FCon c)
| c == sUN "C_Str" = "char*"
| c == sUN "C_Float" = "float"
| c == sUN "C_Ptr" = "void*"
| c == sUN "C_MPtr" = "void*"
| c == sUN "C_Unit" = "void" | 172 | ctype (FCon c)
| c == sUN "C_Str" = "char*"
| c == sUN "C_Float" = "float"
| c == sUN "C_Ptr" = "void*"
| c == sUN "C_MPtr" = "void*"
| c == sUN "C_Unit" = "void" | 172 | ctype (FCon c)
| c == sUN "C_Str" = "char*"
| c == sUN "C_Float" = "float"
| c == sUN "C_Ptr" = "void*"
| c == sUN "C_MPtr" = "void*"
| c == sUN "C_Unit" = "void" | 172 | false | false | 0 | 9 | 47 | 101 | 44 | 57 | null | null |
capgelka/hapidry | src/Api.hs | gpl-2.0 | postsCreate env p names = do
uids <- catMaybes <$> mapM (idByName env) names
sequence <$> mapM (\u -> postCreate env (("juserid", u):p)) uids | 145 | postsCreate env p names = do
uids <- catMaybes <$> mapM (idByName env) names
sequence <$> mapM (\u -> postCreate env (("juserid", u):p)) uids | 145 | postsCreate env p names = do
uids <- catMaybes <$> mapM (idByName env) names
sequence <$> mapM (\u -> postCreate env (("juserid", u):p)) uids | 145 | false | false | 0 | 14 | 27 | 73 | 36 | 37 | null | null |
isovector/futarchy | src/Main.hs | bsd-3-clause | difficulty :: Hashable a => Block a -> Difficulty
-- TODO(sandy): use countLeadingZeros instead
difficulty = (64 -) . popCount . fingerprint | 140 | difficulty :: Hashable a => Block a -> Difficulty
difficulty = (64 -) . popCount . fingerprint | 94 | difficulty = (64 -) . popCount . fingerprint | 44 | true | true | 0 | 7 | 21 | 38 | 20 | 18 | null | null |
gergoerdi/kansas-lava-papilio | src/Language/KansasLava/Signal/Utils.hs | bsd-3-clause | divideClk :: forall c sig ix. (Clock c, sig ~ Signal c, Size ix) => Witness ix -> sig Bool
divideClk _ = counter high .==. (0 :: sig (Unsigned ix)) | 147 | divideClk :: forall c sig ix. (Clock c, sig ~ Signal c, Size ix) => Witness ix -> sig Bool
divideClk _ = counter high .==. (0 :: sig (Unsigned ix)) | 147 | divideClk _ = counter high .==. (0 :: sig (Unsigned ix)) | 56 | false | true | 0 | 9 | 30 | 79 | 40 | 39 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/BuildTarget.hs | bsd-3-clause | ------------------------------
-- Top level match runner
--
-- | Given a matcher and a key to look up, use the matcher to find all the
-- possible matches. There may be 'None', a single 'Unambiguous' match or
-- you may have an 'Ambiguous' match with several possibilities.
--
findMatch :: Eq b => Match b -> MaybeAmbig... | 638 | findMatch :: Eq b => Match b -> MaybeAmbigious b
findMatch match =
case match of
NoMatch _ msgs -> None (nub msgs)
ExactMatch _ xs -> checkAmbigious xs
InexactMatch _ xs -> checkAmbigious xs
where
checkAmbigious xs = case nub xs of
[x] -> Unambiguous x
... | 360 | findMatch match =
case match of
NoMatch _ msgs -> None (nub msgs)
ExactMatch _ xs -> checkAmbigious xs
InexactMatch _ xs -> checkAmbigious xs
where
checkAmbigious xs = case nub xs of
[x] -> Unambiguous x
xs' -> Ambiguous xs' | 311 | true | true | 1 | 10 | 186 | 136 | 63 | 73 | null | null |
ribag/ganeti-experiments | src/Ganeti/Daemon.hs | gpl-2.0 | -- | Default values for the command line options.
defaultOptions :: DaemonOptions
defaultOptions = DaemonOptions
{ optShowHelp = False
, optShowVer = False
, optShowComp = False
, optDaemonize = True
, optPort = Nothing
, optDebug = False
, optNoUserChecks = False
, optBi... | 458 | defaultOptions :: DaemonOptions
defaultOptions = DaemonOptions
{ optShowHelp = False
, optShowVer = False
, optShowComp = False
, optDaemonize = True
, optPort = Nothing
, optDebug = False
, optNoUserChecks = False
, optBindAddress = Nothing
, optSyslogUsage = Nothing... | 408 | defaultOptions = DaemonOptions
{ optShowHelp = False
, optShowVer = False
, optShowComp = False
, optDaemonize = True
, optPort = Nothing
, optDebug = False
, optNoUserChecks = False
, optBindAddress = Nothing
, optSyslogUsage = Nothing
, optForceNode = False
,... | 376 | true | true | 0 | 7 | 135 | 90 | 57 | 33 | null | null |
toish/Pico | src/Helpers.hs | gpl-3.0 | readFunction :: String -> [String] -> Int -> Program
readFunction arg c p
| (loadLib arg) /= [] = let c' = dropAt p c in
Program ((loadLib arg)++c') 0 Running []
| otherwise = ProgramError $ "Unknown module\nReferring to: \""++arg++"\"" | 283 | readFunction :: String -> [String] -> Int -> Program
readFunction arg c p
| (loadLib arg) /= [] = let c' = dropAt p c in
Program ((loadLib arg)++c') 0 Running []
| otherwise = ProgramError $ "Unknown module\nReferring to: \""++arg++"\"" | 283 | readFunction arg c p
| (loadLib arg) /= [] = let c' = dropAt p c in
Program ((loadLib arg)++c') 0 Running []
| otherwise = ProgramError $ "Unknown module\nReferring to: \""++arg++"\"" | 230 | false | true | 1 | 12 | 87 | 111 | 54 | 57 | null | null |
rgrinberg/wai | warp/Network/Wai/Handler/Warp/HTTP2/Request.hs | mit | newReadBody :: TQueue ByteString -> IO (IO ByteString)
newReadBody q = do
ref <- newIORef False
return $ readBody q ref | 127 | newReadBody :: TQueue ByteString -> IO (IO ByteString)
newReadBody q = do
ref <- newIORef False
return $ readBody q ref | 127 | newReadBody q = do
ref <- newIORef False
return $ readBody q ref | 72 | false | true | 0 | 8 | 28 | 52 | 23 | 29 | null | null |
int-index/singletons | src/Data/Singletons/Promote.hs | bsd-3-clause | -- | Produce instances for 'POrd' from the given types
promoteOrdInstances :: DsMonad q => [Name] -> q [Dec]
promoteOrdInstances = concatMapM promoteOrdInstance | 160 | promoteOrdInstances :: DsMonad q => [Name] -> q [Dec]
promoteOrdInstances = concatMapM promoteOrdInstance | 105 | promoteOrdInstances = concatMapM promoteOrdInstance | 51 | true | true | 0 | 9 | 22 | 40 | 19 | 21 | null | null |
nickbart1980/pandoc | tests/Tests/Readers/Org.hs | gpl-2.0 | tests :: [Test]
tests =
[ testGroup "Inlines" $
[ "Plain String" =:
"Hello, World" =?>
para (spcSep [ "Hello,", "World" ])
, "Emphasis" =:
"/Planet Punk/" =?>
para (emph . spcSep $ ["Planet", "Punk"])
, "Strong" =:
"*Cider*" =?>
para (str... | 34,153 | tests :: [Test]
tests =
[ testGroup "Inlines" $
[ "Plain String" =:
"Hello, World" =?>
para (spcSep [ "Hello,", "World" ])
, "Emphasis" =:
"/Planet Punk/" =?>
para (emph . spcSep $ ["Planet", "Punk"])
, "Strong" =:
"*Cider*" =?>
para (str... | 34,153 | tests =
[ testGroup "Inlines" $
[ "Plain String" =:
"Hello, World" =?>
para (spcSep [ "Hello,", "World" ])
, "Emphasis" =:
"/Planet Punk/" =?>
para (emph . spcSep $ ["Planet", "Punk"])
, "Strong" =:
"*Cider*" =?>
para (strong "Cider")
... | 34,137 | false | true | 0 | 23 | 16,583 | 6,234 | 3,383 | 2,851 | null | null |
cosmoharrigan/atomspace | opencog/haskell/OpenCog/AtomSpace/Internal.hs | agpl-3.0 | tvMAX_PARAMS :: Int
tvMAX_PARAMS = 5 | 36 | tvMAX_PARAMS :: Int
tvMAX_PARAMS = 5 | 36 | tvMAX_PARAMS = 5 | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
srhb/quickcheck | examples/Heap_ProgramAlgebraic.hs | bsd-3-clause | size :: Heap a -> Int
size Nil = 0 | 45 | size :: Heap a -> Int
size Nil = 0 | 45 | size Nil = 0 | 23 | false | true | 0 | 6 | 20 | 21 | 10 | 11 | null | null |
abuiles/turbinado-blog | tmp/dependencies/hdbc-postgresql-1.1.4.1/Database/HDBC/PostgreSQL/Parser.hs | bsd-3-clause | escapeseq = (try $ string "''") <|>
(try $ string "\\'") | 68 | escapeseq = (try $ string "''") <|>
(try $ string "\\'") | 68 | escapeseq = (try $ string "''") <|>
(try $ string "\\'") | 68 | false | false | 0 | 8 | 22 | 30 | 15 | 15 | null | null |
nadavshemer/buildsome | src/Buildsome.hs | gpl-2.0 | verifyFileDesc ::
(IsString str, Monoid str, MonadIO m) =>
str -> FilePath -> Db.FileDesc ne desc ->
(Posix.FileStatus -> desc -> EitherT (str, FilePath) m ()) ->
EitherT (str, FilePath) m ()
verifyFileDesc str filePath fileDesc existingVerify = do
mStat <- liftIO $ Dir.getMFileStatus filePath
case (mStat, ... | 641 | verifyFileDesc ::
(IsString str, Monoid str, MonadIO m) =>
str -> FilePath -> Db.FileDesc ne desc ->
(Posix.FileStatus -> desc -> EitherT (str, FilePath) m ()) ->
EitherT (str, FilePath) m ()
verifyFileDesc str filePath fileDesc existingVerify = do
mStat <- liftIO $ Dir.getMFileStatus filePath
case (mStat, ... | 641 | verifyFileDesc str filePath fileDesc existingVerify = do
mStat <- liftIO $ Dir.getMFileStatus filePath
case (mStat, fileDesc) of
(Nothing, Db.FileDescNonExisting _) -> return ()
(Just stat, Db.FileDescExisting desc) -> existingVerify stat desc
(Just _, Db.FileDescNonExisting _) -> left (str <> " file d... | 441 | false | true | 0 | 14 | 119 | 247 | 126 | 121 | null | null |
ezyang/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- schemeTopBind
-- Compile code for the right-hand side of a top-level binding
schemeTopBind :: (Id, AnnExpr Id DVarSet) -> BcM (ProtoBCO Name)
schemeTopBind (id, rhs)
| Just data_con <- isDataConWorkId_maybe id,
isNullaryRepDataC... | 1,014 | schemeTopBind :: (Id, AnnExpr Id DVarSet) -> BcM (ProtoBCO Name)
schemeTopBind (id, rhs)
| Just data_con <- isDataConWorkId_maybe id,
isNullaryRepDataCon data_con = do
dflags <- getDynFlags
-- Special case for the worker of a nullary data con.
-- It'll look like this: Nil = /\a -> Nil a... | 851 | schemeTopBind (id, rhs)
| Just data_con <- isDataConWorkId_maybe id,
isNullaryRepDataCon data_con = do
dflags <- getDynFlags
-- Special case for the worker of a nullary data con.
-- It'll look like this: Nil = /\a -> Nil a
-- If we feed it into schemeR, we'll get
-- ... | 786 | true | true | 0 | 15 | 254 | 170 | 89 | 81 | null | null |
olsner/m3 | CodeGen.hs | bsd-3-clause | bitcast value to = "bitcast " ++ valueText value ++ " to " ++ encodeType to | 75 | bitcast value to = "bitcast " ++ valueText value ++ " to " ++ encodeType to | 75 | bitcast value to = "bitcast " ++ valueText value ++ " to " ++ encodeType to | 75 | false | false | 3 | 7 | 15 | 34 | 13 | 21 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | inwards = id | 12 | inwards = id | 12 | inwards = id | 12 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
google/cabal2bazel | src/Google/Google3/Tools/Cabal2Build/VersionAgnosticThirdParty.hs | apache-2.0 | filegroup = "filegroup" | 23 | filegroup = "filegroup" | 23 | filegroup = "filegroup" | 23 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
RAFIRAF/HASKELL | mergeSort3.hs | mit | mergeIter :: (Ord a) => [[a]] -> [[a]]
mergeIter [] = [] | 56 | mergeIter :: (Ord a) => [[a]] -> [[a]]
mergeIter [] = [] | 56 | mergeIter [] = [] | 17 | false | true | 0 | 8 | 11 | 43 | 24 | 19 | null | null |
dalaing/free | src/Control/Monad/Free/TH.hs | bsd-3-clause | usesTV _ _ = False | 18 | usesTV _ _ = False | 18 | usesTV _ _ = False | 18 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH10/PGM.hs | mit | parse :: Parse a -> L.ByteString -> Either String a
parse parser initState
= case runParse parser (ParseState initState 0) of
Left err -> Left err
Right (result, _) -> Right result | 209 | parse :: Parse a -> L.ByteString -> Either String a
parse parser initState
= case runParse parser (ParseState initState 0) of
Left err -> Left err
Right (result, _) -> Right result | 209 | parse parser initState
= case runParse parser (ParseState initState 0) of
Left err -> Left err
Right (result, _) -> Right result | 157 | false | true | 3 | 8 | 60 | 82 | 39 | 43 | null | null |
paolino/touchnet | Message.hs | mit | incoming :: [Bool] -- random stream (True is transmit)
-> Index -- id of the node
-> Operation -- node state
-> Maybe Message -- a message is on the air
-> (Operation, Maybe Message, [Bool]) -- (new state for the node, a possible message product... | 482 | incoming :: [Bool] -- random stream (True is transmit)
-> Index -- id of the node
-> Operation -- node state
-> Maybe Message -- a message is on the air
-> (Operation, Maybe Message, [Bool])
incoming rs k (Scanning is) (Just (Message _ (Known j)... | 354 | incoming rs k (Scanning is) (Just (Message _ (Known j))) = (Scanning (j:is), Nothing,rs) | 88 | true | true | 0 | 11 | 146 | 108 | 60 | 48 | null | null |
tadeuzagallo/verve-lang | src/Renamer/Renamer.hs | mit | r_codeBlock :: CodeBlock -> Rn CodeBlock
r_codeBlock (m :< CodeBlock stmts) =
(m :<) . CodeBlock <$> r_stmts stmts | 116 | r_codeBlock :: CodeBlock -> Rn CodeBlock
r_codeBlock (m :< CodeBlock stmts) =
(m :<) . CodeBlock <$> r_stmts stmts | 116 | r_codeBlock (m :< CodeBlock stmts) =
(m :<) . CodeBlock <$> r_stmts stmts | 75 | false | true | 0 | 8 | 20 | 46 | 23 | 23 | null | null |
timsears/species | Math/Combinatorics/Species/Enumerate.hs | bsd-3-clause | enumerate' TSubset xs = map (Set . MS.toList . fst) (MS.splits xs) | 77 | enumerate' TSubset xs = map (Set . MS.toList . fst) (MS.splits xs) | 77 | enumerate' TSubset xs = map (Set . MS.toList . fst) (MS.splits xs) | 77 | false | false | 0 | 9 | 22 | 38 | 18 | 20 | null | null |
fcostantini/PlEb | src/Pls.hs | gpl-3.0 | version :: Parser PlsLine
version = do string "Version="
i <- digit
skipMany (noneOf "\n\r")
return $ Version (digitToInt i) | 163 | version :: Parser PlsLine
version = do string "Version="
i <- digit
skipMany (noneOf "\n\r")
return $ Version (digitToInt i) | 163 | version = do string "Version="
i <- digit
skipMany (noneOf "\n\r")
return $ Version (digitToInt i) | 137 | false | true | 1 | 11 | 58 | 59 | 24 | 35 | null | null |
mwotton/sofadb | mkindex.hs | bsd-3-clause | ppFile :: String -> FileStatus -> String
ppFile f st
| isDirectory st = f ++ "/"
| otherwise = f | 105 | ppFile :: String -> FileStatus -> String
ppFile f st
| isDirectory st = f ++ "/"
| otherwise = f | 105 | ppFile f st
| isDirectory st = f ++ "/"
| otherwise = f | 64 | false | true | 2 | 8 | 29 | 55 | 23 | 32 | null | null |
ocramz/petsc-hs | src/Numerical/PETSc/Internal/Storable/Common.hs | gpl-3.0 | unsafeWithVS :: (VG.Vector v a, Storable a) =>
v a ->
(Ptr a -> IO b) ->
IO b
unsafeWithVS v = VS.unsafeWith (VG.convert v) | 171 | unsafeWithVS :: (VG.Vector v a, Storable a) =>
v a ->
(Ptr a -> IO b) ->
IO b
unsafeWithVS v = VS.unsafeWith (VG.convert v) | 171 | unsafeWithVS v = VS.unsafeWith (VG.convert v) | 45 | false | true | 0 | 11 | 72 | 77 | 36 | 41 | null | null |
mzini/termlib | Termlib/Term.hs | gpl-3.0 | genSubterms :: Bool -> Term -> [Term]
genSubterms includeVars t@(Var _) = if includeVars then [t] else [] | 105 | genSubterms :: Bool -> Term -> [Term]
genSubterms includeVars t@(Var _) = if includeVars then [t] else [] | 105 | genSubterms includeVars t@(Var _) = if includeVars then [t] else [] | 67 | false | true | 1 | 10 | 17 | 56 | 28 | 28 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 14686963 = 1765 | 35 | getValueFromProduct 14686963 = 1765 | 35 | getValueFromProduct 14686963 = 1765 | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
polar-engine/polar-shader | src/Polar/Shader/Processor.hs | apache-2.0 | processAST lets ast@(Identifier name) = case M.lookup name lets of
Just x -> return (NameVar name x)
Nothing -> view (globals . at name) >>= \case
Just x -> tell ([(name, x)], [], []) >> return (NameGlobal name x)
Nothing -> get >>= \case
ShaderVertex -> case name of
... | 733 | processAST lets ast@(Identifier name) = case M.lookup name lets of
Just x -> return (NameVar name x)
Nothing -> view (globals . at name) >>= \case
Just x -> tell ([(name, x)], [], []) >> return (NameGlobal name x)
Nothing -> get >>= \case
ShaderVertex -> case name of
... | 733 | processAST lets ast@(Identifier name) = case M.lookup name lets of
Just x -> return (NameVar name x)
Nothing -> view (globals . at name) >>= \case
Just x -> tell ([(name, x)], [], []) >> return (NameGlobal name x)
Nothing -> get >>= \case
ShaderVertex -> case name of
... | 733 | false | false | 4 | 23 | 270 | 324 | 161 | 163 | null | null |
tolysz/Haxl | Haxl/Core/Util.hs | bsd-3-clause | -- | Composes a list of endofunctions.
compose :: [a -> a] -> a -> a
compose = foldr (.) id | 91 | compose :: [a -> a] -> a -> a
compose = foldr (.) id | 52 | compose = foldr (.) id | 22 | true | true | 0 | 8 | 20 | 41 | 20 | 21 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x1E58' = "\x0052\x0307" | 39 | decomposeChar '\x1E58' = "\x0052\x0307" | 39 | decomposeChar '\x1E58' = "\x0052\x0307" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
tekul/cryptonite | Crypto/PubKey/ECC/Types.hs | bsd-3-clause | getCurveByName SEC_t409k1 = CurveF2m $ CurveBinary
0x02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001
(CurveCommon
{ ecc_a = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
, ecc_b ... | 846 | getCurveByName SEC_t409k1 = CurveF2m $ CurveBinary
0x02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001
(CurveCommon
{ ecc_a = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
, ecc_b ... | 846 | getCurveByName SEC_t409k1 = CurveF2m $ CurveBinary
0x02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001
(CurveCommon
{ ecc_a = 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
, ecc_b ... | 846 | false | false | 0 | 8 | 110 | 59 | 33 | 26 | null | null |
Mathnerd314/lamdu | src/Lamdu/WidgetEnvT.hs | gpl-3.0 | runWidgetEnvT :: MonadA m => Widget.Id -> TextEdit.Style -> Config -> WidgetEnvT m a -> m a
runWidgetEnvT cursor style config (WidgetEnvT action) = runReaderT action (Env cursor style config) | 191 | runWidgetEnvT :: MonadA m => Widget.Id -> TextEdit.Style -> Config -> WidgetEnvT m a -> m a
runWidgetEnvT cursor style config (WidgetEnvT action) = runReaderT action (Env cursor style config) | 191 | runWidgetEnvT cursor style config (WidgetEnvT action) = runReaderT action (Env cursor style config) | 99 | false | true | 0 | 10 | 29 | 76 | 36 | 40 | null | null |
DavidAlphaFox/darcs | harness/Darcs/Test/Email.hs | gpl-2.0 | cleanFieldString :: String -> String
cleanFieldString = filter (\c -> isPrint c && c < '\x80' && c /= ':') | 106 | cleanFieldString :: String -> String
cleanFieldString = filter (\c -> isPrint c && c < '\x80' && c /= ':') | 106 | cleanFieldString = filter (\c -> isPrint c && c < '\x80' && c /= ':') | 69 | false | true | 0 | 12 | 19 | 52 | 24 | 28 | null | null |
xrchz/ot | OpenTheory/Proof.hs | gpl-3.0 | concl (EqMp th1 _) = rhs (concl th1) | 36 | concl (EqMp th1 _) = rhs (concl th1) | 36 | concl (EqMp th1 _) = rhs (concl th1) | 36 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
iqsf/HFitUI | src/WebUI/Widgets/UIWidget.hs | bsd-3-clause | -- | Отступ снизу (Num)
bottomNum :: Int -> WidgetUI -> UI WidgetUI
bottomNum val widget =
applyStyleToWidget widget ("bottom:" ++ (show val) ++ "px;") | 155 | bottomNum :: Int -> WidgetUI -> UI WidgetUI
bottomNum val widget =
applyStyleToWidget widget ("bottom:" ++ (show val) ++ "px;") | 131 | bottomNum val widget =
applyStyleToWidget widget ("bottom:" ++ (show val) ++ "px;") | 87 | true | true | 0 | 10 | 28 | 56 | 26 | 30 | null | null |
isankadn/yesod-testweb-full | Handler/Event.hs | mit | checkDates :: Day -> Maybe Day -> Bool
checkDates _ Nothing = True | 66 | checkDates :: Day -> Maybe Day -> Bool
checkDates _ Nothing = True | 66 | checkDates _ Nothing = True | 27 | false | true | 0 | 7 | 12 | 27 | 13 | 14 | null | null |
mightymoose/liquidhaskell | benchmarks/llrbtree-0.1.1/Data/Set/RBTree-mini-color.hs | bsd-3-clause | alanceL k h l x r = Node k h l x r
| 35 | balanceL k h l x r = Node k h l x r | 35 | balanceL k h l x r = Node k h l x r | 35 | false | false | 0 | 5 | 13 | 28 | 13 | 15 | null | null |
christiaanb/ghc | compiler/stgSyn/CoreToStg.hs | bsd-3-clause | -- The HowBound info for a variable in the FVInfo should be consistent
check_eq_how_bound :: HowBound -> HowBound -> Bool
check_eq_how_bound ImportBound ImportBound = True | 185 | check_eq_how_bound :: HowBound -> HowBound -> Bool
check_eq_how_bound ImportBound ImportBound = True | 114 | check_eq_how_bound ImportBound ImportBound = True | 63 | true | true | 0 | 6 | 38 | 30 | 14 | 16 | null | null |
dysinger/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/BatchGetDeployments.hs | mpl-2.0 | -- | A list of deployment IDs, with multiple deployment IDs separated by spaces.
bgdDeploymentIds :: Lens' BatchGetDeployments [Text]
bgdDeploymentIds = lens _bgdDeploymentIds (\s a -> s { _bgdDeploymentIds = a }) . _List | 221 | bgdDeploymentIds :: Lens' BatchGetDeployments [Text]
bgdDeploymentIds = lens _bgdDeploymentIds (\s a -> s { _bgdDeploymentIds = a }) . _List | 140 | bgdDeploymentIds = lens _bgdDeploymentIds (\s a -> s { _bgdDeploymentIds = a }) . _List | 87 | true | true | 1 | 10 | 33 | 51 | 26 | 25 | null | null |
edgarklerks/dotfiles | .xmonad/xmonad.hs | bsd-2-clause | -- | My topic config
{- defaultTopicConfig { topicDirs = M.fromList $ [
("sources", "~/sources"),
("hardware", "~/hardware"),
("sanoma", "~/sources/sanoma"),
("sanoma/dcp-core", "~/sources/sanoma/dcp-core"),
("sanoma/dcp-content-hub", "~/sourc... | 2,208 | like :: XMonad.Query String -> String -> XMonad.Query Bool
like q x = isInfixOf x `fmap` q | 90 | like q x = isInfixOf x `fmap` q | 31 | true | true | 0 | 8 | 694 | 50 | 24 | 26 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.