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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
seanvert/dotfiles | .xmonad/xmonad.hs | gpl-3.0 | color15="#b4b4b9" | 17 | color15="#b4b4b9" | 17 | color15="#b4b4b9" | 17 | false | false | 0 | 4 | 0 | 6 | 3 | 3 | null | null |
akhileshs/stack | src/Stack/Types/Build.hs | bsd-3-clause | taskLocation :: Task -> InstallLocation
taskLocation task =
case taskType task of
TTLocal _ -> Local
TTUpstream _ loc -> loc
-- | A complete plan of what needs to be built and how to do it | 209 | taskLocation :: Task -> InstallLocation
taskLocation task =
case taskType task of
TTLocal _ -> Local
TTUpstream _ loc -> loc
-- | A complete plan of what needs to be built and how to do it | 209 | taskLocation task =
case taskType task of
TTLocal _ -> Local
TTUpstream _ loc -> loc
-- | A complete plan of what needs to be built and how to do it | 169 | false | true | 0 | 8 | 57 | 46 | 22 | 24 | null | null |
diku-dk/futhark | src/Language/Futhark/Query.hs | isc | atPosInPat (PatAttr _ pat _) pos =
atPosInPat pat pos | 55 | atPosInPat (PatAttr _ pat _) pos =
atPosInPat pat pos | 55 | atPosInPat (PatAttr _ pat _) pos =
atPosInPat pat pos | 55 | false | false | 0 | 7 | 11 | 26 | 12 | 14 | null | null |
Seblink/HackerRank | functional-programming/ad-hoc/jumping-bunnies.hs | mit | -- https://www.hackerrank.com/challenges/jumping-bunnies
main :: IO ()
main = do
n <- readLn :: IO Int
input <- getContents
let numbers = map read (words input) :: [Int]
print $ lcm' numbers
-- Least common divisor for array of numbers. | 255 | main :: IO ()
main = do
n <- readLn :: IO Int
input <- getContents
let numbers = map read (words input) :: [Int]
print $ lcm' numbers
-- Least common divisor for array of numbers. | 197 | main = do
n <- readLn :: IO Int
input <- getContents
let numbers = map read (words input) :: [Int]
print $ lcm' numbers
-- Least common divisor for array of numbers. | 183 | true | true | 0 | 12 | 57 | 74 | 36 | 38 | null | null |
facebookincubator/duckling | Duckling/Numeral/AR/EG/Rules.hs | bsd-3-clause | rules :: [Rule]
rules =
[ ruleInteger2
, ruleInteger3
, ruleInteger8
, ruleInteger11
, ruleInteger12
, ruleInteger13
, ruleInteger14
, ruleInteger15
, ruleInteger16
, ruleInteger17
, ruleInteger18
, ruleInteger19
, ruleInteger30_80
, ruleInteger100
, ruleInteger200
, ruleInteger300
, r... | 595 | rules :: [Rule]
rules =
[ ruleInteger2
, ruleInteger3
, ruleInteger8
, ruleInteger11
, ruleInteger12
, ruleInteger13
, ruleInteger14
, ruleInteger15
, ruleInteger16
, ruleInteger17
, ruleInteger18
, ruleInteger19
, ruleInteger30_80
, ruleInteger100
, ruleInteger200
, ruleInteger300
, r... | 595 | rules =
[ ruleInteger2
, ruleInteger3
, ruleInteger8
, ruleInteger11
, ruleInteger12
, ruleInteger13
, ruleInteger14
, ruleInteger15
, ruleInteger16
, ruleInteger17
, ruleInteger18
, ruleInteger19
, ruleInteger30_80
, ruleInteger100
, ruleInteger200
, ruleInteger300
, ruleInteger400
... | 579 | false | true | 0 | 5 | 127 | 104 | 68 | 36 | null | null |
DougBurke/swish | tests/RDFQueryTest.hs | lgpl-2.1 | -- should use gr4l rather than gr
gr4 :: B.Builder -> RDFGraph
gr4 = graphFromBuilder prefix4 | 93 | gr4 :: B.Builder -> RDFGraph
gr4 = graphFromBuilder prefix4 | 59 | gr4 = graphFromBuilder prefix4 | 30 | true | true | 0 | 7 | 15 | 27 | 12 | 15 | null | null |
asayers/permawiki | src/Main.hs | mit | writeNewPageInstanceToDisk :: T.Text -> IO PageHash
writeNewPageInstanceToDisk contents = do
let pageHash = mkHash contents
let filepath = pageInstanceFilepath pageHash
exists <- liftIO $ doesFileExist filepath
when exists $ error "file already exists"
T.writeFile filepath contents
return pageHa... | 322 | writeNewPageInstanceToDisk :: T.Text -> IO PageHash
writeNewPageInstanceToDisk contents = do
let pageHash = mkHash contents
let filepath = pageInstanceFilepath pageHash
exists <- liftIO $ doesFileExist filepath
when exists $ error "file already exists"
T.writeFile filepath contents
return pageHa... | 322 | writeNewPageInstanceToDisk contents = do
let pageHash = mkHash contents
let filepath = pageInstanceFilepath pageHash
exists <- liftIO $ doesFileExist filepath
when exists $ error "file already exists"
T.writeFile filepath contents
return pageHash | 270 | false | true | 0 | 10 | 61 | 90 | 38 | 52 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Folders/Exclusions/List.hs | mpl-2.0 | -- | Optional. The maximum number of results to return from this request.
-- Non-positive values are ignored. The presence of nextPageToken in the
-- response indicates that more results might be available.
felPageSize :: Lens' FoldersExclusionsList (Maybe Int32)
felPageSize
= lens _felPageSize (\ s a -> s{_felPageSi... | 352 | felPageSize :: Lens' FoldersExclusionsList (Maybe Int32)
felPageSize
= lens _felPageSize (\ s a -> s{_felPageSize = a}) .
mapping _Coerce | 145 | felPageSize
= lens _felPageSize (\ s a -> s{_felPageSize = a}) .
mapping _Coerce | 88 | true | true | 1 | 9 | 60 | 61 | 30 | 31 | null | null |
Hi-Angel/yi | yi-core/src/Yi/Buffer/Implementation.hs | gpl-2.0 | updateIsDelete Insert {} = False | 32 | updateIsDelete Insert {} = False | 32 | updateIsDelete Insert {} = False | 32 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
abbradar/crc-brute | src/Utils.hs | bsd-3-clause | update :: Int -> a -> [a] -> [a]
update i x = map (\(i', x') -> if i == i' then x else x') . zip [0..] | 102 | update :: Int -> a -> [a] -> [a]
update i x = map (\(i', x') -> if i == i' then x else x') . zip [0..] | 102 | update i x = map (\(i', x') -> if i == i' then x else x') . zip [0..] | 69 | false | true | 0 | 10 | 27 | 73 | 40 | 33 | null | null |
alfpark/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | idlType BT_Float = pure "float" | 31 | idlType BT_Float = pure "float" | 31 | idlType BT_Float = pure "float" | 31 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
tamarin-prover/tamarin-prover | lib/sapic/src/Sapic/Facts.hs | gpl-3.0 | crc32 :: String -> Int
crc32 s = foldl iter 0xffffffff (map ord s)
where
inner c = (c `shiftR` 1) `xor` (0xedb88329 .&. (-(c .&. 1)))
iter c m = iterate inner (c `xor` m) !! 8 | 195 | crc32 :: String -> Int
crc32 s = foldl iter 0xffffffff (map ord s)
where
inner c = (c `shiftR` 1) `xor` (0xedb88329 .&. (-(c .&. 1)))
iter c m = iterate inner (c `xor` m) !! 8 | 195 | crc32 s = foldl iter 0xffffffff (map ord s)
where
inner c = (c `shiftR` 1) `xor` (0xedb88329 .&. (-(c .&. 1)))
iter c m = iterate inner (c `xor` m) !! 8 | 172 | false | true | 2 | 11 | 57 | 120 | 58 | 62 | null | null |
sgf-dma/sgf-xmonad-modules | src/Sgf/XMonad/Util/EZConfig.hs | bsd-3-clause | addModMask :: XConfig l -> (ButtonMask, KeySym) -> (ButtonMask, KeySym)
addModMask XConfig{modMask = m} = first (.|. m) | 121 | addModMask :: XConfig l -> (ButtonMask, KeySym) -> (ButtonMask, KeySym)
addModMask XConfig{modMask = m} = first (.|. m) | 121 | addModMask XConfig{modMask = m} = first (.|. m) | 49 | false | true | 0 | 8 | 19 | 53 | 29 | 24 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_10_my_note.hs | mit | split :: [a] -> ([a], [a])
split [] = ([], []) | 63 | split :: [a] -> ([a], [a])
split [] = ([], []) | 63 | split [] = ([], []) | 36 | false | true | 0 | 9 | 27 | 51 | 27 | 24 | null | null |
leksah/yi | src/library/Yi/Editor.hs | gpl-2.0 | switchToBufferWithNameE bufName = switchToBufferE =<< getBufferWithName bufName | 79 | switchToBufferWithNameE bufName = switchToBufferE =<< getBufferWithName bufName | 79 | switchToBufferWithNameE bufName = switchToBufferE =<< getBufferWithName bufName | 79 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
zalora/kraken | src/Kraken/Web.hs | bsd-3-clause | -- * utils
readProcess :: FilePath -> [String] -> String -> IO (ExitCode, ByteString)
readProcess path args input = do
let process = (proc path args){
std_in = CreatePipe,
std_out = CreatePipe
}
(Just std_in, Just std_out, _, processHandle) <- createProcess process
System.IO.hPutStr std_in... | 462 | readProcess :: FilePath -> [String] -> String -> IO (ExitCode, ByteString)
readProcess path args input = do
let process = (proc path args){
std_in = CreatePipe,
std_out = CreatePipe
}
(Just std_in, Just std_out, _, processHandle) <- createProcess process
System.IO.hPutStr std_in input
hCl... | 450 | readProcess path args input = do
let process = (proc path args){
std_in = CreatePipe,
std_out = CreatePipe
}
(Just std_in, Just std_out, _, processHandle) <- createProcess process
System.IO.hPutStr std_in input
hClose std_in
result <- Data.ByteString.hGetContents std_out
exitCode <- w... | 375 | true | true | 0 | 12 | 95 | 154 | 77 | 77 | null | null |
akc/sym | Sym/Perm/Class.hs | bsd-3-clause | -- | Av(213)
av213 :: Int -> [Perm]
av213 = map D8.complement . av231 | 69 | av213 :: Int -> [Perm]
av213 = map D8.complement . av231 | 56 | av213 = map D8.complement . av231 | 33 | true | true | 0 | 8 | 13 | 35 | 16 | 19 | null | null |
pparkkin/eta | compiler/ETA/DeSugar/Coverage.hs | bsd-3-clause | addTickHsLocalBinds :: HsLocalBinds Id -> TM (HsLocalBinds Id)
addTickHsLocalBinds (HsValBinds binds) =
liftM HsValBinds
(addTickHsValBinds binds) | 170 | addTickHsLocalBinds :: HsLocalBinds Id -> TM (HsLocalBinds Id)
addTickHsLocalBinds (HsValBinds binds) =
liftM HsValBinds
(addTickHsValBinds binds) | 170 | addTickHsLocalBinds (HsValBinds binds) =
liftM HsValBinds
(addTickHsValBinds binds) | 107 | false | true | 0 | 8 | 39 | 53 | 23 | 30 | null | null |
scharris/hmq | ForeignKeyLink.hs | bsd-3-clause | rightRowValueExtractor :: ForeignKeyLink a b -> EntityRowValueExtractor b
rightRowValueExtractor (ManyToOne fk) = targetRowValueExtractor fk | 140 | rightRowValueExtractor :: ForeignKeyLink a b -> EntityRowValueExtractor b
rightRowValueExtractor (ManyToOne fk) = targetRowValueExtractor fk | 140 | rightRowValueExtractor (ManyToOne fk) = targetRowValueExtractor fk | 66 | false | true | 0 | 6 | 13 | 39 | 17 | 22 | null | null |
jsavatgy/xroads-game | code/back-to-road.hs | gpl-2.0 | vectors = map (uncurry mkVector) segments | 41 | vectors = map (uncurry mkVector) segments | 41 | vectors = map (uncurry mkVector) segments | 41 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
zenhack/haskell-capnp | cmd/capnpc-haskell/IR/Name.hs | mit | hasFnName = accessorName "has_" | 31 | hasFnName = accessorName "has_" | 31 | hasFnName = accessorName "has_" | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
othercriteria/blaze | Tree_old.hs | mit | tagsToAddress :: Tree a -> TagAddress -> Address
tagsToAddress t tags = address t (map (\x -> (== x) . tagged) tags) | 116 | tagsToAddress :: Tree a -> TagAddress -> Address
tagsToAddress t tags = address t (map (\x -> (== x) . tagged) tags) | 116 | tagsToAddress t tags = address t (map (\x -> (== x) . tagged) tags) | 67 | false | true | 0 | 11 | 21 | 56 | 29 | 27 | null | null |
futufeld/eclogues | eclogues-impl/test/Eclogues/MockSpec.hs | bsd-3-clause | apiPort :: Word16
apiPort = 8000 | 32 | apiPort :: Word16
apiPort = 8000 | 32 | apiPort = 8000 | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
z0isch/lambda-hive | src/LambdaHive/Types.hs | bsd-3-clause | playedBee :: GameState -> Bool
playedBee = notElem Queen . currPlayersHand | 74 | playedBee :: GameState -> Bool
playedBee = notElem Queen . currPlayersHand | 74 | playedBee = notElem Queen . currPlayersHand | 43 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
olsner/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | runPhase (RealPhase Cmm) input_fn dflags
= do
let hsc_lang = hscTarget dflags
let next_phase = hscPostBackendPhase dflags HsSrcFile hsc_lang
output_fn <- phaseOutputFilename next_phase
PipeState{hsc_env} <- getPipeState
liftIO $ hscCompileCmmFile hsc_env input_fn output_fn
... | 605 | runPhase (RealPhase Cmm) input_fn dflags
= do
let hsc_lang = hscTarget dflags
let next_phase = hscPostBackendPhase dflags HsSrcFile hsc_lang
output_fn <- phaseOutputFilename next_phase
PipeState{hsc_env} <- getPipeState
liftIO $ hscCompileCmmFile hsc_env input_fn output_fn
... | 605 | runPhase (RealPhase Cmm) input_fn dflags
= do
let hsc_lang = hscTarget dflags
let next_phase = hscPostBackendPhase dflags HsSrcFile hsc_lang
output_fn <- phaseOutputFilename next_phase
PipeState{hsc_env} <- getPipeState
liftIO $ hscCompileCmmFile hsc_env input_fn output_fn
... | 605 | false | false | 0 | 10 | 124 | 105 | 48 | 57 | null | null |
8Gitbrix/gomoku | src/Misc.hs | mit | foldM :: (Monad m) => (b -> a -> m b) -> b -> [a] -> m b
foldM = Control.Monad.foldM | 85 | foldM :: (Monad m) => (b -> a -> m b) -> b -> [a] -> m b
foldM = Control.Monad.foldM | 85 | foldM = Control.Monad.foldM | 27 | false | true | 0 | 10 | 21 | 55 | 29 | 26 | null | null |
ksaveljev/hake-2 | src/Render/GLFWbRenderer.hs | bsd-3-clause | glfwbRenderer :: Renderer
glfwbRenderer =
Renderer { _rName = "GLFWb"
, _rRefExport = glfwbRefExportT glfwbKBD basicRenderAPI
} | 157 | glfwbRenderer :: Renderer
glfwbRenderer =
Renderer { _rName = "GLFWb"
, _rRefExport = glfwbRefExportT glfwbKBD basicRenderAPI
} | 157 | glfwbRenderer =
Renderer { _rName = "GLFWb"
, _rRefExport = glfwbRefExportT glfwbKBD basicRenderAPI
} | 131 | false | true | 0 | 7 | 46 | 30 | 17 | 13 | null | null |
fredmorcos/attic | projects/pet/archive/pet_haskell_master_complete/Statistics.hs | isc | showStats :: [Expense] -> [Expense] -> String
showStats [] _ = show NoEntriesOriginal | 89 | showStats :: [Expense] -> [Expense] -> String
showStats [] _ = show NoEntriesOriginal | 89 | showStats [] _ = show NoEntriesOriginal | 43 | false | true | 0 | 7 | 16 | 35 | 18 | 17 | null | null |
vTurbine/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | mkForAllKind :: TyVar -> ArgFlag -> Kind -> Kind
mkForAllKind = mkForAllTy | 74 | mkForAllKind :: TyVar -> ArgFlag -> Kind -> Kind
mkForAllKind = mkForAllTy | 74 | mkForAllKind = mkForAllTy | 25 | false | true | 0 | 9 | 11 | 30 | 13 | 17 | null | null |
j3camero/galaxyatlas | OldCrap/haskell/stardata/src/StarData.hs | mit | starDataRecFromStarData :: (StarData a) => a -> StarDataRec
starDataRecFromStarData star = (SDR
(starID star)
(starX star) (starY star) (starZ star)
(starLum star)
(truncate (colorR (starRGB s... | 461 | starDataRecFromStarData :: (StarData a) => a -> StarDataRec
starDataRecFromStarData star = (SDR
(starID star)
(starX star) (starY star) (starZ star)
(starLum star)
(truncate (colorR (starRGB s... | 461 | starDataRecFromStarData star = (SDR
(starID star)
(starX star) (starY star) (starZ star)
(starLum star)
(truncate (colorR (starRGB star)))
(truncate (colorG (st... | 401 | false | true | 0 | 12 | 225 | 131 | 66 | 65 | null | null |
jeremy-w/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | updateProv ns p = p | 19 | updateProv ns p = p | 19 | updateProv ns p = p | 19 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2016/M11/D23/Solution.hs | mit | -- for the Score-type and -values
{--
So. Yesterday, player1 was at how much again?
*Y2016.M11.D22.Solution> player1 ~> 11289979
And today, player1, a very good friend of mine, is at 11422295.
Good? Bad? Ugly?
Today's Haskell exercise.
Project the progress of player1. When does player1 exceed the score of level13... | 547 | project :: (Day, Score) -> (Day, Score) -> Score -> Day
project yesterday today = p' today (diffs yesterday today) | 114 | project yesterday today = p' today (diffs yesterday today) | 58 | true | true | 0 | 7 | 92 | 59 | 31 | 28 | null | null |
ctford/Idris-Elba-dev | src/Idris/REPL.hs | bsd-3-clause | parseArgs ("--version":ns) = Ver : (parseArgs ns) | 55 | parseArgs ("--version":ns) = Ver : (parseArgs ns) | 55 | parseArgs ("--version":ns) = Ver : (parseArgs ns) | 55 | false | false | 0 | 7 | 12 | 27 | 13 | 14 | null | null |
AlexanderPankiv/ghc | compiler/stgSyn/CoreToStg.hs | bsd-3-clause | coreTopBindsToStg
:: DynFlags
-> Module
-> IdEnv HowBound -- environment for the bindings
-> CoreProgram
-> (IdEnv HowBound, FreeVarsInfo, [StgBinding])
coreTopBindsToStg _ _ env [] = (env, emptyFVInfo, []) | 249 | coreTopBindsToStg
:: DynFlags
-> Module
-> IdEnv HowBound -- environment for the bindings
-> CoreProgram
-> (IdEnv HowBound, FreeVarsInfo, [StgBinding])
coreTopBindsToStg _ _ env [] = (env, emptyFVInfo, []) | 248 | coreTopBindsToStg _ _ env [] = (env, emptyFVInfo, []) | 65 | false | true | 0 | 12 | 71 | 74 | 38 | 36 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | rightAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "RightAssociative") | 76 | rightAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "RightAssociative") | 76 | rightAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "RightAssociative") | 76 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
jml/graphql-api | src/GraphQL.hs | bsd-3-clause | parseQuery :: Text -> Either Text AST.QueryDocument
parseQuery query = first toS (parseOnly (Parser.queryDocument <* endOfInput) query) | 135 | parseQuery :: Text -> Either Text AST.QueryDocument
parseQuery query = first toS (parseOnly (Parser.queryDocument <* endOfInput) query) | 135 | parseQuery query = first toS (parseOnly (Parser.queryDocument <* endOfInput) query) | 83 | false | true | 0 | 10 | 16 | 50 | 24 | 26 | null | null |
DavidAlphaFox/darcs | src/Darcs/Patch/Depends.hs | gpl-2.0 | commuteToEnd ps (PatchSet xs (Tagged t _ ys :<: ts)) =
commuteToEnd ps (PatchSet (xs +<+ t :<: ys) ts) | 106 | commuteToEnd ps (PatchSet xs (Tagged t _ ys :<: ts)) =
commuteToEnd ps (PatchSet (xs +<+ t :<: ys) ts) | 106 | commuteToEnd ps (PatchSet xs (Tagged t _ ys :<: ts)) =
commuteToEnd ps (PatchSet (xs +<+ t :<: ys) ts) | 106 | false | false | 0 | 9 | 23 | 60 | 28 | 32 | null | null |
a143753/AOJ | 0082.hs | apache-2.0 | cal [] [] = 0 | 13 | cal [] [] = 0 | 13 | cal [] [] = 0 | 13 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
silkapp/stylish-haskell | tests/Language/Haskell/Stylish/Parse/Tests.hs | bsd-3-clause | --------------------------------------------------------------------------------
testShebang :: Assertion
testShebang = assert $ isRight $ parseModule [] Nothing $ unlines
[ "#!runhaskell"
, "module Main where"
, "main = return ()"
] | 249 | testShebang :: Assertion
testShebang = assert $ isRight $ parseModule [] Nothing $ unlines
[ "#!runhaskell"
, "module Main where"
, "main = return ()"
] | 168 | testShebang = assert $ isRight $ parseModule [] Nothing $ unlines
[ "#!runhaskell"
, "module Main where"
, "main = return ()"
] | 143 | true | true | 4 | 7 | 42 | 51 | 24 | 27 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_HA_DEFAULT :: Int
wxSTC_HA_DEFAULT = 0 | 44 | wxSTC_HA_DEFAULT :: Int
wxSTC_HA_DEFAULT = 0 | 44 | wxSTC_HA_DEFAULT = 0 | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
badp/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | oobPowerCycle :: String
oobPowerCycle = Types.oobCommandToRaw OobPowerCycle | 75 | oobPowerCycle :: String
oobPowerCycle = Types.oobCommandToRaw OobPowerCycle | 75 | oobPowerCycle = Types.oobCommandToRaw OobPowerCycle | 51 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/Enum.hs | bsd-3-clause | efdtWordFB :: (Word -> r -> r) -> r -> Word# -> Word# -> Word# -> r
efdtWordFB c n x1 x2 y
| isTrue# (x2 `geWord#` x1) = efdtWordUpFB c n x1 x2 y
| otherwise = efdtWordDnFB c n x1 x2 y | 202 | efdtWordFB :: (Word -> r -> r) -> r -> Word# -> Word# -> Word# -> r
efdtWordFB c n x1 x2 y
| isTrue# (x2 `geWord#` x1) = efdtWordUpFB c n x1 x2 y
| otherwise = efdtWordDnFB c n x1 x2 y | 202 | efdtWordFB c n x1 x2 y
| isTrue# (x2 `geWord#` x1) = efdtWordUpFB c n x1 x2 y
| otherwise = efdtWordDnFB c n x1 x2 y | 134 | false | true | 1 | 10 | 61 | 100 | 50 | 50 | null | null |
MihaiVisu/HaskellStuff | tutorial8 week10/tutorial8.hs | mit | dfinal :: (Ord q) => FSM q -> [[q]] -> [[q]]
dfinal fsm ss = [ s | s <- ss, length (intersect s (final fsm)) > 0 ] | 114 | dfinal :: (Ord q) => FSM q -> [[q]] -> [[q]]
dfinal fsm ss = [ s | s <- ss, length (intersect s (final fsm)) > 0 ] | 114 | dfinal fsm ss = [ s | s <- ss, length (intersect s (final fsm)) > 0 ] | 69 | false | true | 0 | 12 | 28 | 84 | 44 | 40 | null | null |
plaimi/bweakfwu | src/Main.hs | gpl-3.0 | main :: IO ()
-- | 'main' starts the game loop.
main =
play
window -- The display mode.
black -- The background colour.
600 -- The number of simulation steps per second.
(initialise :: Game) -- Create initial world.
draw -- Convert the world to ... | 377 | main :: IO ()
main =
play
window -- The display mode.
black -- The background colour.
600 -- The number of simulation steps per second.
(initialise :: Game) -- Create initial world.
draw -- Convert the world to a picture.
handle ... | 343 | main =
play
window -- The display mode.
black -- The background colour.
600 -- The number of simulation steps per second.
(initialise :: Game) -- Create initial world.
draw -- Convert the world to a picture.
handle -- Handle input... | 328 | true | true | 0 | 6 | 145 | 50 | 26 | 24 | null | null |
gtk2hs/webkit | Graphics/UI/Gtk/WebKit/DOM/EventM.hs | lgpl-2.1 | removeListener :: (EventTargetClass t, EventClass e) => t -> EventName t e -> SaferEventListener t e -> Bool -> IO ()
removeListener target (EventName eventName) (SaferEventListener l) useCapture =
removeEventListener target eventName (Just l) useCapture | 258 | removeListener :: (EventTargetClass t, EventClass e) => t -> EventName t e -> SaferEventListener t e -> Bool -> IO ()
removeListener target (EventName eventName) (SaferEventListener l) useCapture =
removeEventListener target eventName (Just l) useCapture | 258 | removeListener target (EventName eventName) (SaferEventListener l) useCapture =
removeEventListener target eventName (Just l) useCapture | 140 | false | true | 0 | 11 | 38 | 97 | 46 | 51 | null | null |
snoyberg/ghc | compiler/types/Type.hs | bsd-3-clause | isUnliftedType _ = False | 38 | isUnliftedType _ = False | 38 | isUnliftedType _ = False | 38 | false | false | 0 | 4 | 17 | 10 | 4 | 6 | null | null |
sol/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | bulletList :: GenParser Char ParserState Block
bulletList = try $ do
begin "itemize"
items <- many listItem
end "itemize"
spaces
return (BulletList $ map snd items) | 174 | bulletList :: GenParser Char ParserState Block
bulletList = try $ do
begin "itemize"
items <- many listItem
end "itemize"
spaces
return (BulletList $ map snd items) | 174 | bulletList = try $ do
begin "itemize"
items <- many listItem
end "itemize"
spaces
return (BulletList $ map snd items) | 127 | false | true | 0 | 11 | 35 | 65 | 28 | 37 | null | null |
haskell/haddock | hypsrc-test/src/CPP.hs | bsd-2-clause | baz :: String
baz = "line comment in a string is not a comment --" | 66 | baz :: String
baz = "line comment in a string is not a comment --" | 66 | baz = "line comment in a string is not a comment --" | 52 | false | true | 0 | 4 | 14 | 11 | 6 | 5 | null | null |
nothiphop/project-euler | 025/solution.hs | apache-2.0 | firstNDigitsFibonacciNumTermNo :: Int -> Int
firstNDigitsFibonacciNumTermNo n = 2 + (length $ takeWhile (\fval -> digitsCount(fval) < n) fibonaccies) | 149 | firstNDigitsFibonacciNumTermNo :: Int -> Int
firstNDigitsFibonacciNumTermNo n = 2 + (length $ takeWhile (\fval -> digitsCount(fval) < n) fibonaccies) | 149 | firstNDigitsFibonacciNumTermNo n = 2 + (length $ takeWhile (\fval -> digitsCount(fval) < n) fibonaccies) | 104 | false | true | 0 | 13 | 18 | 52 | 27 | 25 | null | null |
phile314/tasty-silver | Test/Tasty/Silver/Interactive.hs | mit | infoFail = output NormalIntensity Dull Red | 43 | infoFail = output NormalIntensity Dull Red | 43 | infoFail = output NormalIntensity Dull Red | 43 | false | false | 1 | 5 | 6 | 18 | 6 | 12 | null | null |
SteffenMichels/IHPMC | src/Parser.hs | mit | bodyElement :: P AST.RuleBodyElement
bodyElement =
AST.BuildInPredicate <$> try buildInPredicate
<|> uncurry AST.UserPredicate <$> userPred expression | 167 | bodyElement :: P AST.RuleBodyElement
bodyElement =
AST.BuildInPredicate <$> try buildInPredicate
<|> uncurry AST.UserPredicate <$> userPred expression | 167 | bodyElement =
AST.BuildInPredicate <$> try buildInPredicate
<|> uncurry AST.UserPredicate <$> userPred expression | 130 | false | true | 3 | 7 | 32 | 49 | 22 | 27 | null | null |
zaxtax/hakaru | haskell/Tests/RoundTrip.hs | bsd-3-clause | -- Density calculation for (Add StdRandom (Exp (Neg StdRandom))).
-- Maple can integrate this but we don't simplify it for some reason.
t65, t65' :: (ABT Term abt) => abt '[] ('HReal ':-> 'HMeasure HUnit)
t65 =
lam $ \t ->
uniform_0_1 >>= \x ->
if_ (zero < t-x)
(let_ (unsafeProb (t-x)) $ \t_x ->
... | 489 | t65, t65' :: (ABT Term abt) => abt '[] ('HReal ':-> 'HMeasure HUnit)
t65 =
lam $ \t ->
uniform_0_1 >>= \x ->
if_ (zero < t-x)
(let_ (unsafeProb (t-x)) $ \t_x ->
withWeight (recip t_x) $
(if_ (zero < negate (log t_x) && negate (log t_x) < one)
(dirac unit)
(rej... | 353 | t65 =
lam $ \t ->
uniform_0_1 >>= \x ->
if_ (zero < t-x)
(let_ (unsafeProb (t-x)) $ \t_x ->
withWeight (recip t_x) $
(if_ (zero < negate (log t_x) && negate (log t_x) < one)
(dirac unit)
(reject sing)))
(reject sing) | 284 | true | true | 6 | 17 | 144 | 204 | 100 | 104 | null | null |
tolysz/postgresql-simple | src/Database/PostgreSQL/Simple.hs | bsd-3-clause | fold :: ( FromRow row, ToRow params )
=> Connection
-> Query
-> params
-> a
-> (a -> row -> IO a)
-> IO a
fold = foldWithOptions defaultFoldOptions | 254 | fold :: ( FromRow row, ToRow params )
=> Connection
-> Query
-> params
-> a
-> (a -> row -> IO a)
-> IO a
fold = foldWithOptions defaultFoldOptions | 254 | fold = foldWithOptions defaultFoldOptions | 41 | false | true | 0 | 14 | 136 | 66 | 33 | 33 | null | null |
shimanekb/Learn_Haskell | pp2/ppTwoTwo/test/Spec.hs | gpl-2.0 | spec :: Spec
spec = do
describe "mySort Test" $ do
it "should be in ascending order" $ do
(mySort [5, 2, 3, 4, 1]) `shouldBe` [1, 2, 3, 4, 5] | 172 | spec :: Spec
spec = do
describe "mySort Test" $ do
it "should be in ascending order" $ do
(mySort [5, 2, 3, 4, 1]) `shouldBe` [1, 2, 3, 4, 5] | 172 | spec = do
describe "mySort Test" $ do
it "should be in ascending order" $ do
(mySort [5, 2, 3, 4, 1]) `shouldBe` [1, 2, 3, 4, 5] | 159 | false | true | 0 | 16 | 61 | 76 | 42 | 34 | null | null |
orezpraw/gitit2 | Network/Gitit2.hs | gpl-2.0 | pathForCategories :: Page -> GH master FilePath
pathForCategories p = do
conf <- getConfig
return $ T.unpack (toMessage p) <> page_extension conf </> "categories" | 166 | pathForCategories :: Page -> GH master FilePath
pathForCategories p = do
conf <- getConfig
return $ T.unpack (toMessage p) <> page_extension conf </> "categories" | 166 | pathForCategories p = do
conf <- getConfig
return $ T.unpack (toMessage p) <> page_extension conf </> "categories" | 118 | false | true | 0 | 12 | 27 | 64 | 28 | 36 | null | null |
badi/haseem | Haseem/Config/Default.hs | bsd-3-clause | clones :: DefaultConfig -> [Clone]
clones conf = [0..numClones conf - 1] | 72 | clones :: DefaultConfig -> [Clone]
clones conf = [0..numClones conf - 1] | 72 | clones conf = [0..numClones conf - 1] | 37 | false | true | 0 | 7 | 11 | 33 | 17 | 16 | null | null |
m3mitsuppe/haskell | exercises/datatype.hs | unlicense | id' :: a -> a
-- es gibt nur eine mögliche Implementierung
-- für diese Signatur
id' x = x | 90 | id' :: a -> a
id' x = x | 23 | id' x = x | 9 | true | true | 0 | 5 | 19 | 24 | 12 | 12 | null | null |
dysinger/amazonka | amazonka-support/gen/Network/AWS/Support/ResolveCase.hs | mpl-2.0 | -- | 'ResolveCaseResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'rcrFinalCaseStatus' @::@ 'Maybe' 'Text'
--
-- * 'rcrInitialCaseStatus' @::@ 'Maybe' 'Text'
--
resolveCaseResponse :: ResolveCaseResponse
resolveCaseResponse = ResolveCaseResponse
{ _rcrInitialCaseStatus = ... | 371 | resolveCaseResponse :: ResolveCaseResponse
resolveCaseResponse = ResolveCaseResponse
{ _rcrInitialCaseStatus = Nothing
, _rcrFinalCaseStatus = Nothing
} | 166 | resolveCaseResponse = ResolveCaseResponse
{ _rcrInitialCaseStatus = Nothing
, _rcrFinalCaseStatus = Nothing
} | 123 | true | true | 0 | 7 | 56 | 37 | 24 | 13 | null | null |
stu-smith/rendering-in-haskell | src/experiment02/Core.hs | mit | toRayPosition :: Double -> RayPosition
toRayPosition =
RayPosition | 70 | toRayPosition :: Double -> RayPosition
toRayPosition =
RayPosition | 70 | toRayPosition =
RayPosition | 31 | false | true | 0 | 5 | 11 | 15 | 8 | 7 | null | null |
apyrgio/ganeti | test/hs/Test/Ganeti/OpCodes.hs | bsd-2-clause | genNodeNames :: Gen [String]
genNodeNames = resize maxNodes (listOf genFQDN) | 76 | genNodeNames :: Gen [String]
genNodeNames = resize maxNodes (listOf genFQDN) | 76 | genNodeNames = resize maxNodes (listOf genFQDN) | 47 | false | true | 0 | 7 | 9 | 28 | 14 | 14 | null | null |
input-output-hk/pos-haskell-prototype | db/src/Pos/DB/BlockIndex.hs | mit | ----------------------------------------------------------------------------
-- Keys
----------------------------------------------------------------------------
blockIndexKey :: HeaderHash -> ByteString
blockIndexKey h = "b" <> convert h | 239 | blockIndexKey :: HeaderHash -> ByteString
blockIndexKey h = "b" <> convert h | 76 | blockIndexKey h = "b" <> convert h | 34 | true | true | 2 | 7 | 16 | 35 | 16 | 19 | null | null |
flowbox-public/accelerate-cuda | Data/Array/Accelerate/CUDA/Persistent.hs | bsd-3-clause | encode_ch '\'' = "zq" | 21 | encode_ch '\'' = "zq" | 21 | encode_ch '\'' = "zq" | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sonyandy/tnt | Control/Monad/Code/Opcode.hs | bsd-3-clause | dreturn :: Word8
dreturn = 0xaf | 31 | dreturn :: Word8
dreturn = 0xaf | 31 | dreturn = 0xaf | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
olorin/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | Indicates whether traffic to or from the instance is validated.
niSourceDestCheck :: Lens' NetworkInterface (Maybe Bool)
niSourceDestCheck = lens _niSourceDestCheck (\ s a -> s{_niSourceDestCheck = a}) | 206 | niSourceDestCheck :: Lens' NetworkInterface (Maybe Bool)
niSourceDestCheck = lens _niSourceDestCheck (\ s a -> s{_niSourceDestCheck = a}) | 137 | niSourceDestCheck = lens _niSourceDestCheck (\ s a -> s{_niSourceDestCheck = a}) | 80 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
emilaxelsson/operational-alacarte | examples/Advanced.hs | bsd-3-clause | setRef :: IORef a -> Exp a -> MyProgram ()
setRef r = singleInj . SetRef r | 74 | setRef :: IORef a -> Exp a -> MyProgram ()
setRef r = singleInj . SetRef r | 74 | setRef r = singleInj . SetRef r | 31 | false | true | 0 | 8 | 16 | 40 | 18 | 22 | null | null |
opentower/carnap | Carnap-Server/Handler/Info.hs | gpl-3.0 | barcanTheorem = [st|
Show Ax[]Fx->[]AxFx /0 :CD
Ax[]Fx /0 :AS
Show []AxFx /0 :ND
Show AxFx /0-1 :UD
Show Fa /0-1 :DD
[]Fa /0 :AO 2
Fa /0-1 :[]O 6|] | 237 | barcanTheorem = [st|
Show Ax[]Fx->[]AxFx /0 :CD
Ax[]Fx /0 :AS
Show []AxFx /0 :ND
Show AxFx /0-1 :UD
Show Fa /0-1 :DD
[]Fa /0 :AO 2
Fa /0-1 :[]O 6|] | 237 | barcanTheorem = [st|
Show Ax[]Fx->[]AxFx /0 :CD
Ax[]Fx /0 :AS
Show []AxFx /0 :ND
Show AxFx /0-1 :UD
Show Fa /0-1 :DD
[]Fa /0 :AO 2
Fa /0-1 :[]O 6|] | 237 | false | false | 0 | 4 | 119 | 10 | 7 | 3 | null | null |
alephcloud/hs-aws-general | src/Aws/SignatureV4.hs | mit | -- -------------------------------------------------------------------------- --
-- Constants
-- | We only support SHA256 since SHA1 has been deprecated
--
signingAlgorithm :: IsString a => a
signingAlgorithm = "AWS4-HMAC-SHA256" | 230 | signingAlgorithm :: IsString a => a
signingAlgorithm = "AWS4-HMAC-SHA256" | 73 | signingAlgorithm = "AWS4-HMAC-SHA256" | 37 | true | true | 0 | 6 | 26 | 22 | 13 | 9 | null | null |
corajr/cataskell | src/Cataskell/Server/Main.hs | bsd-3-clause | serverMain :: IO ()
serverMain = do
config' <- liftIO config
config'' <- Snap.commandLineConfig config'
Snap.serveSnaplet config'' app | 140 | serverMain :: IO ()
serverMain = do
config' <- liftIO config
config'' <- Snap.commandLineConfig config'
Snap.serveSnaplet config'' app | 140 | serverMain = do
config' <- liftIO config
config'' <- Snap.commandLineConfig config'
Snap.serveSnaplet config'' app | 120 | false | true | 0 | 9 | 23 | 48 | 21 | 27 | null | null |
oden-lang/oden | src/Oden/Compiler/NameEncoder.hs | mit | runEncoder :: TypeEncoder () -> String
runEncoder encoder = snd (runWriter (runStateT encoder 1)) | 97 | runEncoder :: TypeEncoder () -> String
runEncoder encoder = snd (runWriter (runStateT encoder 1)) | 97 | runEncoder encoder = snd (runWriter (runStateT encoder 1)) | 58 | false | true | 0 | 9 | 13 | 40 | 19 | 21 | null | null |
zdravkoandonov/functional-fmi | Haskell/infinitelists.hs | mit | arrmin l = foldl1 min l | 23 | arrmin l = foldl1 min l | 23 | arrmin l = foldl1 min l | 23 | false | false | 1 | 5 | 5 | 19 | 6 | 13 | null | null |
rahulmutt/ghcvm | compiler/Eta/StgSyn/StgSyn.hs | bsd-3-clause | pprStgOp (StgFCallOp op _) = ppr op | 35 | pprStgOp (StgFCallOp op _) = ppr op | 35 | pprStgOp (StgFCallOp op _) = ppr op | 35 | false | false | 0 | 6 | 6 | 21 | 9 | 12 | null | null |
Noeda/caramia | src/Graphics/Caramia/Color.hs | mit | -- | A convenience function to turn a `Float` color value to a `Word8`.
--
-- The value is clamped between 0 and 255.
floatToWord8 :: Float -> Word8
floatToWord8 f = round $ max 0 $ min 255 $ f * 255.0 | 201 | floatToWord8 :: Float -> Word8
floatToWord8 f = round $ max 0 $ min 255 $ f * 255.0 | 83 | floatToWord8 f = round $ max 0 $ min 255 $ f * 255.0 | 52 | true | true | 0 | 9 | 42 | 49 | 23 | 26 | null | null |
scolobb/brsim | brsim.hs | gpl-3.0 | brsimCommands :: Cmd.Commands IO
brsimCommands = Cmd.Node brsimCommand [ Cmd.Node runCmd []
, Cmd.Node interactCmd []
, Cmd.Node showCmd [ Cmd.Node conservedSetsCmd []
, Cmd.Node consDepG... | 518 | brsimCommands :: Cmd.Commands IO
brsimCommands = Cmd.Node brsimCommand [ Cmd.Node runCmd []
, Cmd.Node interactCmd []
, Cmd.Node showCmd [ Cmd.Node conservedSetsCmd []
, Cmd.Node consDepG... | 518 | brsimCommands = Cmd.Node brsimCommand [ Cmd.Node runCmd []
, Cmd.Node interactCmd []
, Cmd.Node showCmd [ Cmd.Node conservedSetsCmd []
, Cmd.Node consDepGraph []
... | 485 | false | true | 0 | 10 | 308 | 105 | 52 | 53 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Confd
confdProtocolVersion :: Int
confdProtocolVersion = ConstantUtils.confdProtocolVersion | 97 | confdProtocolVersion :: Int
confdProtocolVersion = ConstantUtils.confdProtocolVersion | 85 | confdProtocolVersion = ConstantUtils.confdProtocolVersion | 57 | true | true | 0 | 5 | 9 | 14 | 8 | 6 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/bar.hs | bsd-3-clause | foo = bar | 9 | foo = bar | 9 | foo = bar | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
brendanhay/gogol | gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/SavedColumns/List.hs | mpl-2.0 | -- | DS ID of the agency.
sclAgencyId :: Lens' SavedColumnsList Int64
sclAgencyId
= lens _sclAgencyId (\ s a -> s{_sclAgencyId = a}) .
_Coerce | 150 | sclAgencyId :: Lens' SavedColumnsList Int64
sclAgencyId
= lens _sclAgencyId (\ s a -> s{_sclAgencyId = a}) .
_Coerce | 124 | sclAgencyId
= lens _sclAgencyId (\ s a -> s{_sclAgencyId = a}) .
_Coerce | 80 | true | true | 0 | 10 | 32 | 46 | 24 | 22 | null | null |
patperry/hs-gsl-random | lib/GSL/Random/Dist.hs | bsd-3-clause | cauchyQ :: Double -> Double -> Double
cauchyQ = liftDouble2 gsl_cdf_cauchy_Q | 76 | cauchyQ :: Double -> Double -> Double
cauchyQ = liftDouble2 gsl_cdf_cauchy_Q | 76 | cauchyQ = liftDouble2 gsl_cdf_cauchy_Q | 38 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
alios/reflex-http | src/Reflex/HTTP/Host.hs | bsd-3-clause | -- | Register a 'Behavior' with the 'Application'.
-- A JSON representation will be availible as /GET/ under the given url path.
-- Will 'fail' if trying to register with same path more then once.
exportBehavior ::
Aeson.ToJSON a => [Text] -- ^ the HTTP path elements
-> Behavior Spider a -- ^ the 'Behavior' to be '... | 930 | exportBehavior ::
Aeson.ToJSON a => [Text] -- ^ the HTTP path elements
-> Behavior Spider a -- ^ the 'Behavior' to be 'sample'd
-> ReflexHttpHost ()
exportBehavior n b = do
bs <- hostStateBehaviorExports <$> get
if Set.member n bs
then fail . mconcat $
[ "exportBehavior: export with ", show n, " ... | 731 | exportBehavior n b = do
bs <- hostStateBehaviorExports <$> get
if Set.member n bs
then fail . mconcat $
[ "exportBehavior: export with ", show n, " already exists." ]
else do
tell [ExportBehavior n b]
modify (\st -> st { hostStateBehaviorExports = Set.insert n bs })
-- | Register a 'Dynami... | 576 | true | true | 0 | 16 | 195 | 149 | 78 | 71 | null | null |
vikraman/ghc | compiler/types/Type.hs | bsd-3-clause | getEqPredTys :: PredType -> (Type, Type)
getEqPredTys ty
= case splitTyConApp_maybe ty of
Just (tc, [_, _, ty1, ty2])
| tc `hasKey` eqPrimTyConKey
|| tc `hasKey` eqReprPrimTyConKey
-> (ty1, ty2)
_ -> pprPanic "getEqPredTys" (ppr ty) | 271 | getEqPredTys :: PredType -> (Type, Type)
getEqPredTys ty
= case splitTyConApp_maybe ty of
Just (tc, [_, _, ty1, ty2])
| tc `hasKey` eqPrimTyConKey
|| tc `hasKey` eqReprPrimTyConKey
-> (ty1, ty2)
_ -> pprPanic "getEqPredTys" (ppr ty) | 271 | getEqPredTys ty
= case splitTyConApp_maybe ty of
Just (tc, [_, _, ty1, ty2])
| tc `hasKey` eqPrimTyConKey
|| tc `hasKey` eqReprPrimTyConKey
-> (ty1, ty2)
_ -> pprPanic "getEqPredTys" (ppr ty) | 230 | false | true | 0 | 13 | 74 | 108 | 57 | 51 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/applicatives/mcbride-paterson-applicative-programming-with-effects/APWE.hs | unlicense | -- p. 4
-- sequencing commands via Applicative <*> and pure
-- class Applicative f where
-- (<*>) :: Applicative f => f (a -> b) -> f a -> f b
-- pure :: Applicative f => a -> f a
-- Note: Applicative generalizes S and K combinators (see eval below)
-- from threading an environment to threading an effect in ... | 650 | seq'' :: Applicative f => [f a] -> f [a]
seq'' [] = pure [] | 65 | seq'' [] = pure [] | 24 | true | true | 0 | 9 | 135 | 61 | 34 | 27 | null | null |
shashikiranrp/RealWorldHaskell | Chapter 3/Main.hs | apache-2.0 | palin :: [a] -> [a]
palin [] = [] | 33 | palin :: [a] -> [a]
palin [] = [] | 33 | palin [] = [] | 13 | false | true | 0 | 8 | 8 | 34 | 16 | 18 | null | null |
GaloisInc/sk-dev-platform | libs/lobster-selinux/src/Lobster/SELinux/Test/Main.hs | bsd-3-clause | getLobsterPolicies :: IO [(Bool,FilePath)]
getLobsterPolicies = do
fns <- getLobsterExamplePolicies
return $ fns ++ [(False,testappPolicy)] | 147 | getLobsterPolicies :: IO [(Bool,FilePath)]
getLobsterPolicies = do
fns <- getLobsterExamplePolicies
return $ fns ++ [(False,testappPolicy)] | 147 | getLobsterPolicies = do
fns <- getLobsterExamplePolicies
return $ fns ++ [(False,testappPolicy)] | 104 | false | true | 0 | 9 | 22 | 50 | 27 | 23 | null | null |
da-x/ghc | libraries/base/GHC/Exception.hs | bsd-3-clause | ratioZeroDenomException = toException RatioZeroDenominator | 58 | ratioZeroDenomException = toException RatioZeroDenominator | 58 | ratioZeroDenomException = toException RatioZeroDenominator | 58 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
kim/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | The date when the maintenance action will be automatically applied. The
-- maintenance action will be applied to the resource on this date regardless of
-- the maintenance window for the resource. If this date is specified, any 'immediate' opt-in requests are ignored.
pmaForcedApplyDate :: Lens' PendingMaintenance... | 456 | pmaForcedApplyDate :: Lens' PendingMaintenanceAction (Maybe UTCTime)
pmaForcedApplyDate =
lens _pmaForcedApplyDate (\s a -> s { _pmaForcedApplyDate = a })
. mapping _Time | 182 | pmaForcedApplyDate =
lens _pmaForcedApplyDate (\s a -> s { _pmaForcedApplyDate = a })
. mapping _Time | 113 | true | true | 2 | 9 | 78 | 62 | 30 | 32 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getCelestialBodySphereOfInfluenceStreamReq :: KRPCHS.SpaceCenter.CelestialBody -> KRPCStreamReq (Float)
getCelestialBodySphereOfInfluenceStreamReq thisArg =
let req = makeRequest "SpaceCenter" "CelestialBody_get_SphereOfInfluence" [makeArgument 0 thisArg]
in makeStream req | 282 | getCelestialBodySphereOfInfluenceStreamReq :: KRPCHS.SpaceCenter.CelestialBody -> KRPCStreamReq (Float)
getCelestialBodySphereOfInfluenceStreamReq thisArg =
let req = makeRequest "SpaceCenter" "CelestialBody_get_SphereOfInfluence" [makeArgument 0 thisArg]
in makeStream req | 282 | getCelestialBodySphereOfInfluenceStreamReq thisArg =
let req = makeRequest "SpaceCenter" "CelestialBody_get_SphereOfInfluence" [makeArgument 0 thisArg]
in makeStream req | 178 | false | true | 0 | 11 | 29 | 56 | 27 | 29 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 3294 = 3293 | 11 | 3294 = 3293 | 11 | 3294 = 3293 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
DavidAlphaFox/ghc | libraries/haskeline/System/Console/Haskeline/Command/Undo.hs | bsd-3-clause | saveForUndo :: (Save s, MonadState Undo m)
=> Command m s s
saveForUndo s = do
modify (saveToUndo s)
return s | 133 | saveForUndo :: (Save s, MonadState Undo m)
=> Command m s s
saveForUndo s = do
modify (saveToUndo s)
return s | 133 | saveForUndo s = do
modify (saveToUndo s)
return s | 57 | false | true | 0 | 10 | 44 | 61 | 27 | 34 | null | null |
pigworker/CS410-14 | Ex6/HaskellSetup.hs | unlicense | act (BgText Cyan) = escape "46m" | 35 | act (BgText Cyan) = escape "46m" | 35 | act (BgText Cyan) = escape "46m" | 35 | false | false | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
shayan-najd/Haskell-Desugar | Language/Haskell/Exts/Desugar/Conversion.hs | bsd-3-clause | cQualStmt _ = Prelude.error "not implemented completely" | 56 | cQualStmt _ = Prelude.error "not implemented completely" | 56 | cQualStmt _ = Prelude.error "not implemented completely" | 56 | false | false | 0 | 6 | 6 | 14 | 6 | 8 | null | null |
DougBurke/swish | src/Swish/RDF/Vocabulary/FOAF.hs | lgpl-2.1 | -- | @foaf:dnaChecksum@ from <http://xmlns.com/foaf/spec/#term_dnaChecksum>.
foafdnaChecksum :: ScopedName
foafdnaChecksum = toF "dnaChecksum" | 143 | foafdnaChecksum :: ScopedName
foafdnaChecksum = toF "dnaChecksum" | 65 | foafdnaChecksum = toF "dnaChecksum" | 35 | true | true | 0 | 5 | 12 | 15 | 8 | 7 | null | null |
Rufflewind/conplex | Conplex.hs | mit | serveTransporter (bindHost, bindPort) destServs =
serve bindHost bindPort $ \ (bindSocket, _) -> do
vConnID <- newMVar (Nothing :: Maybe ConnectionID)
splitterState <- splitterStateNew
vPState <- (,) <$> newEmptyMVar <*> newMVar mergerInitState
svPushs <- for destServs $ \ x -> (,) x <$> newEmptyMVar
... | 1,691 | serveTransporter (bindHost, bindPort) destServs =
serve bindHost bindPort $ \ (bindSocket, _) -> do
vConnID <- newMVar (Nothing :: Maybe ConnectionID)
splitterState <- splitterStateNew
vPState <- (,) <$> newEmptyMVar <*> newMVar mergerInitState
svPushs <- for destServs $ \ x -> (,) x <$> newEmptyMVar
... | 1,691 | serveTransporter (bindHost, bindPort) destServs =
serve bindHost bindPort $ \ (bindSocket, _) -> do
vConnID <- newMVar (Nothing :: Maybe ConnectionID)
splitterState <- splitterStateNew
vPState <- (,) <$> newEmptyMVar <*> newMVar mergerInitState
svPushs <- for destServs $ \ x -> (,) x <$> newEmptyMVar
... | 1,691 | false | false | 2 | 22 | 462 | 444 | 218 | 226 | null | null |
CarstenKoenig/YouVote | src/server/Poll.hs | bsd-3-clause | recentPollsList :: Int -> Repository [PollDescription]
recentPollsList cnt =
map headerToDescription <$> recentPolls cnt | 122 | recentPollsList :: Int -> Repository [PollDescription]
recentPollsList cnt =
map headerToDescription <$> recentPolls cnt | 122 | recentPollsList cnt =
map headerToDescription <$> recentPolls cnt | 67 | false | true | 0 | 7 | 15 | 34 | 16 | 18 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ispecsParameters :: FrozenSet String
ispecsParameters =
ConstantUtils.mkSet [ConstantUtils.ispecCpuCount,
ConstantUtils.ispecDiskCount,
ConstantUtils.ispecDiskSize,
ConstantUtils.ispecMemSize,
ConstantUtils.ispecNicCount,
... | 369 | ispecsParameters :: FrozenSet String
ispecsParameters =
ConstantUtils.mkSet [ConstantUtils.ispecCpuCount,
ConstantUtils.ispecDiskCount,
ConstantUtils.ispecDiskSize,
ConstantUtils.ispecMemSize,
ConstantUtils.ispecNicCount,
... | 369 | ispecsParameters =
ConstantUtils.mkSet [ConstantUtils.ispecCpuCount,
ConstantUtils.ispecDiskCount,
ConstantUtils.ispecDiskSize,
ConstantUtils.ispecMemSize,
ConstantUtils.ispecNicCount,
ConstantUtils.ispe... | 332 | false | true | 1 | 7 | 129 | 53 | 27 | 26 | null | null |
headprogrammingczar/Data | data-eval/IRC/Data/L.hs | bsd-3-clause | primes n = let f = primes' n 2 in f : primes (n `div` f)
where
primes' n t = if n `mod` t == 0 then t else primes' n (t+1) | 128 | primes n = let f = primes' n 2 in f : primes (n `div` f)
where
primes' n t = if n `mod` t == 0 then t else primes' n (t+1) | 128 | primes n = let f = primes' n 2 in f : primes (n `div` f)
where
primes' n t = if n `mod` t == 0 then t else primes' n (t+1) | 128 | false | false | 2 | 10 | 38 | 91 | 43 | 48 | null | null |
pxqr/intset | tests/Main.hs | bsd-3-clause | prop_combine :: [IntSet] -> Bool
prop_combine xs = all check xs
where
check x = us <> x == us && is * x == is
us = mconcat xs
is = intersections xs | 161 | prop_combine :: [IntSet] -> Bool
prop_combine xs = all check xs
where
check x = us <> x == us && is * x == is
us = mconcat xs
is = intersections xs | 161 | prop_combine xs = all check xs
where
check x = us <> x == us && is * x == is
us = mconcat xs
is = intersections xs | 128 | false | true | 2 | 9 | 47 | 81 | 37 | 44 | null | null |
carlostome/wlp-engine | src/Example.hs | bsd-3-clause | {-- | Swap two variables using tmp
var x:int, y:int, a:int, b:int in
assume (x = a /\ y = b);
var tmp:int in
tmp := x;
x := y;
y := tmp:
end;
assert (x = b /\ y = a);
end
-}
swap1 :: Stmt
swap1 =
var (i "x") $ var (i "y") $ var ("b" ::: int) $ var ("a" ::: int) $ stmts
[assume ((vi "x" ==. vi ... | 579 | swap1 :: Stmt
swap1 =
var (i "x") $ var (i "y") $ var ("b" ::: int) $ var ("a" ::: int) $ stmts
[assume ((vi "x" ==. vi "a") /\ (vi "y" ==. vi "b"))
,var ("tmp" ::: int) $ stmts
[ asg [i "tmp" .:= vi "x"]
, asg [i "x" .:= vi "x"]
, asg [i "x" .:= vi "y"]
, asg [i "y" .:= vi "... | 385 | swap1 =
var (i "x") $ var (i "y") $ var ("b" ::: int) $ var ("a" ::: int) $ stmts
[assume ((vi "x" ==. vi "a") /\ (vi "y" ==. vi "b"))
,var ("tmp" ::: int) $ stmts
[ asg [i "tmp" .:= vi "x"]
, asg [i "x" .:= vi "x"]
, asg [i "x" .:= vi "y"]
, asg [i "y" .:= vi "tmp"]]
,a... | 371 | true | true | 0 | 12 | 194 | 243 | 118 | 125 | null | null |
ndmitchell/tagsoup | dead/Parser2.hs | bsd-3-clause | debug p = do
s <- get
trace (take 50 $ string s) p
---------------------------------------------------------------------
-- USEFUL UTILITIES | 149 | debug p = do
s <- get
trace (take 50 $ string s) p
---------------------------------------------------------------------
-- USEFUL UTILITIES | 149 | debug p = do
s <- get
trace (take 50 $ string s) p
---------------------------------------------------------------------
-- USEFUL UTILITIES | 149 | false | false | 1 | 11 | 26 | 43 | 18 | 25 | null | null |
janschulz/pandoc | tests/Tests/Walk.hs | gpl-2.0 | inlineTrans :: Inline -> Inline
inlineTrans (Str xs) = Str $ map toUpper xs | 75 | inlineTrans :: Inline -> Inline
inlineTrans (Str xs) = Str $ map toUpper xs | 75 | inlineTrans (Str xs) = Str $ map toUpper xs | 43 | false | true | 0 | 7 | 13 | 33 | 16 | 17 | null | null |
Kyly/liquidhaskell | src/Language/Haskell/Liquid/RefType.hs | bsd-3-clause | rApp c = RApp (RTyCon c [] (mkTyConInfo c [] [] Nothing)) | 60 | rApp c = RApp (RTyCon c [] (mkTyConInfo c [] [] Nothing)) | 60 | rApp c = RApp (RTyCon c [] (mkTyConInfo c [] [] Nothing)) | 60 | false | false | 0 | 10 | 14 | 40 | 19 | 21 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs | gpl-2.0 | -- HEBREW LETTER FINAL TSADI
switch 'Z' 'J' = '\x05E6' | 54 | switch 'Z' 'J' = '\x05E6' | 25 | switch 'Z' 'J' = '\x05E6' | 25 | true | false | 0 | 5 | 9 | 12 | 6 | 6 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.