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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f1u77y/xmonad-contrib | XMonad/Util/EZConfig.hs | bsd-3-clause | -- | Parse a special key name (one enclosed in angle brackets).
parseSpecial :: ReadP KeySym
parseSpecial = do _ <- char '<'
key <- choice [ string name >> return k
| (name,k) <- keyNames
]
_ <- char '>'
... | 404 | parseSpecial :: ReadP KeySym
parseSpecial = do _ <- char '<'
key <- choice [ string name >> return k
| (name,k) <- keyNames
]
_ <- char '>'
return key
-- | A list of all special key names and their... | 340 | parseSpecial = do _ <- char '<'
key <- choice [ string name >> return k
| (name,k) <- keyNames
]
_ <- char '>'
return key
-- | A list of all special key names and their associated KeySyms. | 311 | true | true | 0 | 12 | 178 | 79 | 37 | 42 | null | null |
cchalmers/dense | src/Data/Dense/Generic.hs | bsd-3-clause | -- | Make a stream of the indexes of a 'Layout'.
streamIndexes :: (Monad m, Shape f) => Layout f -> Stream m (f Int)
streamIndexes l = Stream step (if eq1 l zero then Nothing else Just zero)
where
{-# INLINE [0] step #-}
step (Just i) = return $ Yield i (shapeStep l i)
step Nothing = return Done
| 312 | streamIndexes :: (Monad m, Shape f) => Layout f -> Stream m (f Int)
streamIndexes l = Stream step (if eq1 l zero then Nothing else Just zero)
where
{-# INLINE [0] step #-}
step (Just i) = return $ Yield i (shapeStep l i)
step Nothing = return Done
| 263 | streamIndexes l = Stream step (if eq1 l zero then Nothing else Just zero)
where
{-# INLINE [0] step #-}
step (Just i) = return $ Yield i (shapeStep l i)
step Nothing = return Done
| 195 | true | true | 3 | 10 | 76 | 128 | 59 | 69 | null | null |
eltongo/unicorn | bindings/haskell/samples/SampleX86.hs | gpl-2.0 | -- Callback for tracing basic blocks
hookBlock :: BlockHook ()
hookBlock _ addr size _ =
putStrLn $ ">>> Tracing basic block at 0x" ++ showHex addr ++
", block size = 0x" ++ (maybe "0" showHex size) | 217 | hookBlock :: BlockHook ()
hookBlock _ addr size _ =
putStrLn $ ">>> Tracing basic block at 0x" ++ showHex addr ++
", block size = 0x" ++ (maybe "0" showHex size) | 180 | hookBlock _ addr size _ =
putStrLn $ ">>> Tracing basic block at 0x" ++ showHex addr ++
", block size = 0x" ++ (maybe "0" showHex size) | 154 | true | true | 0 | 8 | 56 | 55 | 27 | 28 | null | null |
ghorn/cs240h-class | Lab2/HilbertCurve.hs | bsd-3-clause | xy2d :: Int -> (Int, Int) -> Int
xy2d n (x,y)
| x >= 2^n || y >= 2^n || x < 0 || y < 0 = error $ "xy2d can't compute "++show (x,y)++
", range is between 0 and "++show (2^n-1 :: Int)
| otherwise = f (x,y) 0 ((2^n) `div` 2)
where
f :: (Int, Int) -> Int -> Int -> Int... | 599 | xy2d :: Int -> (Int, Int) -> Int
xy2d n (x,y)
| x >= 2^n || y >= 2^n || x < 0 || y < 0 = error $ "xy2d can't compute "++show (x,y)++
", range is between 0 and "++show (2^n-1 :: Int)
| otherwise = f (x,y) 0 ((2^n) `div` 2)
where
f :: (Int, Int) -> Int -> Int -> Int... | 599 | xy2d n (x,y)
| x >= 2^n || y >= 2^n || x < 0 || y < 0 = error $ "xy2d can't compute "++show (x,y)++
", range is between 0 and "++show (2^n-1 :: Int)
| otherwise = f (x,y) 0 ((2^n) `div` 2)
where
f :: (Int, Int) -> Int -> Int -> Int
f _ d 0 = d
f (x',y') d ... | 566 | false | true | 7 | 16 | 263 | 377 | 190 | 187 | null | null |
bergmark/purescript | src/Language/PureScript/Sugar/TypeClasses.hs | mit | memberToNameAndType _ = error "Invalid declaration in type class definition" | 76 | memberToNameAndType _ = error "Invalid declaration in type class definition" | 76 | memberToNameAndType _ = error "Invalid declaration in type class definition" | 76 | false | false | 0 | 5 | 9 | 12 | 5 | 7 | null | null |
exclipy/pdata | Data/BitUtil.hs | bsd-3-clause | bitCount8 155 = 5 | 17 | bitCount8 155 = 5 | 17 | bitCount8 155 = 5 | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
plancalculus/nextstep-plist | Text/NSPlist/Pretty.hs | bsd-3-clause | angles :: Doc -> Doc
angles p = char '<' <> p <> char '>' | 57 | angles :: Doc -> Doc
angles p = char '<' <> p <> char '>' | 57 | angles p = char '<' <> p <> char '>' | 36 | false | true | 4 | 7 | 14 | 39 | 16 | 23 | null | null |
ocharles/hackage-server | Distribution/Server/Packages/Metadata.hs | bsd-3-clause | pkgTarballTargets :: Int -> PackageIdentifier -> PkgTarball -> Sec.Targets
pkgTarballTargets revNo pkgId pkgTarball = Sec.Targets {
targetsVersion = Sec.FileVersion revNo
, targetsExpires = Sec.expiresNever
, targetsTargets = Sec.FileMap.fromList [
(inRepoPkgTarG... | 462 | pkgTarballTargets :: Int -> PackageIdentifier -> PkgTarball -> Sec.Targets
pkgTarballTargets revNo pkgId pkgTarball = Sec.Targets {
targetsVersion = Sec.FileVersion revNo
, targetsExpires = Sec.expiresNever
, targetsTargets = Sec.FileMap.fromList [
(inRepoPkgTarG... | 462 | pkgTarballTargets revNo pkgId pkgTarball = Sec.Targets {
targetsVersion = Sec.FileVersion revNo
, targetsExpires = Sec.expiresNever
, targetsTargets = Sec.FileMap.fromList [
(inRepoPkgTarGz pkgId, fileInfo pkgTarballGz)
]
, target... | 387 | false | true | 0 | 10 | 141 | 103 | 55 | 48 | null | null |
bergmark/hakyll | src/Hakyll/Core/Identifier/Pattern.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- | Internal verion of 'capture'
capture' :: [GlobComponent] -> String -> Maybe [String]
capture' [] [] = Just [] | 195 | capture' :: [GlobComponent] -> String -> Maybe [String]
capture' [] [] = Just [] | 80 | capture' [] [] = Just [] | 24 | true | true | 0 | 9 | 20 | 49 | 24 | 25 | null | null |
mvr/abyme | haskell-model/src/Abyme/Shapey/Universe/Generate.hs | bsd-3-clause | removeSquare :: Universe -> Square -> Universe
removeSquare u s = u & atShape (s ^. squareShape) . shapePolyomino . polyominoSquares %~ delete (s ^. squarePosition) | 164 | removeSquare :: Universe -> Square -> Universe
removeSquare u s = u & atShape (s ^. squareShape) . shapePolyomino . polyominoSquares %~ delete (s ^. squarePosition) | 164 | removeSquare u s = u & atShape (s ^. squareShape) . shapePolyomino . polyominoSquares %~ delete (s ^. squarePosition) | 117 | false | true | 0 | 11 | 25 | 60 | 30 | 30 | null | null |
ndmitchell/shake | src/Development/Ninja/Parse.hs | bsd-3-clause | parseFile :: FilePath -> Env Str Str -> Ninja -> IO Ninja
parseFile file env ninja = do
lexes <- lexerFile $ if file == "-" then Nothing else Just file
foldM (applyStmt env) ninja{sources=file:sources ninja} $ withBinds lexes | 233 | parseFile :: FilePath -> Env Str Str -> Ninja -> IO Ninja
parseFile file env ninja = do
lexes <- lexerFile $ if file == "-" then Nothing else Just file
foldM (applyStmt env) ninja{sources=file:sources ninja} $ withBinds lexes | 233 | parseFile file env ninja = do
lexes <- lexerFile $ if file == "-" then Nothing else Just file
foldM (applyStmt env) ninja{sources=file:sources ninja} $ withBinds lexes | 175 | false | true | 0 | 12 | 46 | 100 | 48 | 52 | null | null |
Airtnp/Freshman_Simple_Haskell_Lib | Idioms/DS-not-Func.hs | mit | squareRoot' n x = iterate (\x -> 0.5 * (x + n/x)) x | 51 | squareRoot' n x = iterate (\x -> 0.5 * (x + n/x)) x | 51 | squareRoot' n x = iterate (\x -> 0.5 * (x + n/x)) x | 51 | false | false | 1 | 11 | 12 | 43 | 20 | 23 | null | null |
nevrenato/Hets_Fork | CspCASL/StatAnaCSP.hs | gpl-2.0 | getBinPredsById :: Id -> State CspCASLSign [(SORT, SORT)]
getBinPredsById ri = do
pm <- gets predMap
return $ Set.fold (\ pty -> case pty of
PredType [s1, s2] -> ((s1, s2) :)
_ -> id) [] $ MapSet.lookup ri pm
{- | Given two CspCASL communication alphabets, check that the first's
subsort closure is a subs... | 358 | getBinPredsById :: Id -> State CspCASLSign [(SORT, SORT)]
getBinPredsById ri = do
pm <- gets predMap
return $ Set.fold (\ pty -> case pty of
PredType [s1, s2] -> ((s1, s2) :)
_ -> id) [] $ MapSet.lookup ri pm
{- | Given two CspCASL communication alphabets, check that the first's
subsort closure is a subs... | 358 | getBinPredsById ri = do
pm <- gets predMap
return $ Set.fold (\ pty -> case pty of
PredType [s1, s2] -> ((s1, s2) :)
_ -> id) [] $ MapSet.lookup ri pm
{- | Given two CspCASL communication alphabets, check that the first's
subsort closure is a subset of the second's subsort closure. -} | 300 | false | true | 0 | 16 | 76 | 113 | 59 | 54 | null | null |
jutaro/rdf4h | src/Data/RDF/Types.hs | bsd-3-clause | uEscapedToXEscaped :: String -> String
uEscapedToXEscaped ss =
let str = ['\\','x'] ++ ss
in read ("\"" ++ str ++ "\"") | 127 | uEscapedToXEscaped :: String -> String
uEscapedToXEscaped ss =
let str = ['\\','x'] ++ ss
in read ("\"" ++ str ++ "\"") | 127 | uEscapedToXEscaped ss =
let str = ['\\','x'] ++ ss
in read ("\"" ++ str ++ "\"") | 88 | false | true | 0 | 10 | 28 | 50 | 25 | 25 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/rangeSize_2.hs | mit | seq :: b -> a -> a;
seq x y = enforceWHNF (WHNF x) y | 56 | seq :: b -> a -> a
seq x y = enforceWHNF (WHNF x) y | 55 | seq x y = enforceWHNF (WHNF x) y | 32 | false | true | 0 | 7 | 18 | 36 | 18 | 18 | null | null |
martinra/hlinear | src/HLinear/Hook/LeftTransformation/Basic.hs | gpl-3.0 | minimizeSize lt@(LeftTransformationMatrix m) = lt | 49 | minimizeSize lt@(LeftTransformationMatrix m) = lt | 49 | minimizeSize lt@(LeftTransformationMatrix m) = lt | 49 | false | false | 0 | 8 | 4 | 18 | 9 | 9 | null | null |
brendanhay/gogol | gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs | mpl-2.0 | -- | The detected text.
gcvvta2Text :: Lens' GoogleCloudVideointelligenceV1p3beta1_TextAnnotation (Maybe Text)
gcvvta2Text
= lens _gcvvta2Text (\ s a -> s{_gcvvta2Text = a}) | 175 | gcvvta2Text :: Lens' GoogleCloudVideointelligenceV1p3beta1_TextAnnotation (Maybe Text)
gcvvta2Text
= lens _gcvvta2Text (\ s a -> s{_gcvvta2Text = a}) | 151 | gcvvta2Text
= lens _gcvvta2Text (\ s a -> s{_gcvvta2Text = a}) | 64 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
kazu-yamamoto/cab | Distribution/Cab/Printer.hs | bsd-3-clause | extraInfo True pkgi = putStr $ " " ++ lcns ++ " \"" ++ show auth ++ "\""
where
lcns = showLicense (pkgInfoLicense pkgi)
auth = author pkgi | 148 | extraInfo True pkgi = putStr $ " " ++ lcns ++ " \"" ++ show auth ++ "\""
where
lcns = showLicense (pkgInfoLicense pkgi)
auth = author pkgi | 148 | extraInfo True pkgi = putStr $ " " ++ lcns ++ " \"" ++ show auth ++ "\""
where
lcns = showLicense (pkgInfoLicense pkgi)
auth = author pkgi | 148 | false | false | 0 | 9 | 37 | 59 | 28 | 31 | null | null |
Lykos/Sara | src/lib/Sara/Compiler.hs | gpl-3.0 | runStage :: Context -> M.Module -> IO (Either Error Int64)
runStage context mod = jit context $ \engine -> EE.withModuleInEngine engine mod execute'
where execute' :: EE.ExecutableModule EE.MCJIT -> IO (Either Error Int64)
execute' ee = do
fn <- EE.getFunction ee (Name "main")
case fn of
... | 467 | runStage :: Context -> M.Module -> IO (Either Error Int64)
runStage context mod = jit context $ \engine -> EE.withModuleInEngine engine mod execute'
where execute' :: EE.ExecutableModule EE.MCJIT -> IO (Either Error Int64)
execute' ee = do
fn <- EE.getFunction ee (Name "main")
case fn of
... | 467 | runStage context mod = jit context $ \engine -> EE.withModuleInEngine engine mod execute'
where execute' :: EE.ExecutableModule EE.MCJIT -> IO (Either Error Int64)
execute' ee = do
fn <- EE.getFunction ee (Name "main")
case fn of
(Just fn) -> do
res <- runFn fn
... | 408 | false | true | 2 | 13 | 148 | 162 | 76 | 86 | null | null |
mydaum/cabal | cabal-install/Distribution/Client/ProjectOrchestration.hs | bsd-3-clause | establishProjectBaseContext :: Verbosity
-> ProjectConfig
-> IO ProjectBaseContext
establishProjectBaseContext verbosity cliConfig = do
cabalDir <- defaultCabalDir
projectRoot <- either throwIO return =<<
findProjectRoot Nothing mprojec... | 1,280 | establishProjectBaseContext :: Verbosity
-> ProjectConfig
-> IO ProjectBaseContext
establishProjectBaseContext verbosity cliConfig = do
cabalDir <- defaultCabalDir
projectRoot <- either throwIO return =<<
findProjectRoot Nothing mprojec... | 1,280 | establishProjectBaseContext verbosity cliConfig = do
cabalDir <- defaultCabalDir
projectRoot <- either throwIO return =<<
findProjectRoot Nothing mprojectFile
let cabalDirLayout = defaultCabalDirLayout cabalDir
distDirLayout = defaultDistDirLayout projectRoot
... | 1,141 | false | true | 0 | 10 | 427 | 180 | 87 | 93 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/signum_1.hs | mit | gtMyInt :: MyInt -> MyInt -> MyBool
gtMyInt x y = esEsOrdering (compareMyInt x y) GT | 88 | gtMyInt :: MyInt -> MyInt -> MyBool
gtMyInt x y = esEsOrdering (compareMyInt x y) GT | 88 | gtMyInt x y = esEsOrdering (compareMyInt x y) GT | 48 | false | true | 0 | 8 | 19 | 43 | 19 | 24 | null | null |
hvr/cassava | src/Data/Csv/Parser.hs | bsd-3-clause | -- | Parse a field. The field may be in either the escaped or
-- non-escaped format. The return value is unescaped.
field :: Word8 -> AL.Parser Field
field !delim = do
mb <- A.peekWord8
-- We purposely don't use <|> as we want to commit to the first
-- choice if we see a double quote.
case mb of
... | 421 | field :: Word8 -> AL.Parser Field
field !delim = do
mb <- A.peekWord8
-- We purposely don't use <|> as we want to commit to the first
-- choice if we see a double quote.
case mb of
Just b | b == doubleQuote -> escapedField
_ -> unescapedField delim
| 305 | field !delim = do
mb <- A.peekWord8
-- We purposely don't use <|> as we want to commit to the first
-- choice if we see a double quote.
case mb of
Just b | b == doubleQuote -> escapedField
_ -> unescapedField delim
| 271 | true | true | 0 | 13 | 128 | 76 | 35 | 41 | null | null |
agentm/project-m36 | src/lib/ProjectM36/TransGraphRelationalExpression.hs | unlicense | processTransGraphTupleExpr :: TransGraphTupleExpr -> TransGraphEvalMonad GraphRefTupleExpr
processTransGraphTupleExpr (TupleExpr attrMap) = do
let attrAssoc = mapM (\(attrName, atomExpr) -> do
aExpr <- processTransGraphAtomExpr atomExpr
pure (attrName, aExpr)
... | 390 | processTransGraphTupleExpr :: TransGraphTupleExpr -> TransGraphEvalMonad GraphRefTupleExpr
processTransGraphTupleExpr (TupleExpr attrMap) = do
let attrAssoc = mapM (\(attrName, atomExpr) -> do
aExpr <- processTransGraphAtomExpr atomExpr
pure (attrName, aExpr)
... | 390 | processTransGraphTupleExpr (TupleExpr attrMap) = do
let attrAssoc = mapM (\(attrName, atomExpr) -> do
aExpr <- processTransGraphAtomExpr atomExpr
pure (attrName, aExpr)
) (M.toList attrMap)
TupleExpr . M.fromList <$> attrAssoc | 299 | false | true | 0 | 16 | 106 | 98 | 48 | 50 | null | null |
lvicentesanchez/servantapp | src/main/Main.hs | bsd-3-clause | usersApi :: Proxy UsersApi
usersApi = Proxy | 43 | usersApi :: Proxy UsersApi
usersApi = Proxy | 43 | usersApi = Proxy | 16 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
uuhan/Idris-dev | main/Main.hs | bsd-3-clause | processPackageOptions :: [Opt] -> Idris ()
processPackageOptions opts = do
check opts getPkgCheck $ \fs -> runIO $ do
mapM_ (checkPkg opts (WarnOnly `elem` opts) True) fs
check opts getPkgClean $ \fs -> runIO $ do
mapM_ (cleanPkg opts) fs
check opts getPkgMkDoc $ \fs -> runIO $ do
mapM_ (documentPkg o... | 859 | processPackageOptions :: [Opt] -> Idris ()
processPackageOptions opts = do
check opts getPkgCheck $ \fs -> runIO $ do
mapM_ (checkPkg opts (WarnOnly `elem` opts) True) fs
check opts getPkgClean $ \fs -> runIO $ do
mapM_ (cleanPkg opts) fs
check opts getPkgMkDoc $ \fs -> runIO $ do
mapM_ (documentPkg o... | 859 | processPackageOptions opts = do
check opts getPkgCheck $ \fs -> runIO $ do
mapM_ (checkPkg opts (WarnOnly `elem` opts) True) fs
check opts getPkgClean $ \fs -> runIO $ do
mapM_ (cleanPkg opts) fs
check opts getPkgMkDoc $ \fs -> runIO $ do
mapM_ (documentPkg opts) fs
check opts getPkgTest $ \fs -> ru... | 816 | false | true | 0 | 17 | 211 | 311 | 151 | 160 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Scala.hs | gpl-2.0 | regex_'5cb'28package'7cimport'29'5cb = compileRegex True "\\b(package|import)\\b" | 81 | regex_'5cb'28package'7cimport'29'5cb = compileRegex True "\\b(package|import)\\b" | 81 | regex_'5cb'28package'7cimport'29'5cb = compileRegex True "\\b(package|import)\\b" | 81 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
kini/ghc-server | src/Server/Import.hs | bsd-3-clause | -- | Gotta have.
io :: MonadIO m => IO a -> m a
io = Trans.liftIO | 65 | io :: MonadIO m => IO a -> m a
io = Trans.liftIO | 48 | io = Trans.liftIO | 17 | true | true | 0 | 7 | 16 | 31 | 15 | 16 | null | null |
johanjoensson/QuantumHaskell | Harmonic_Oscillator.hs | agpl-3.0 | :: Ket Int -> Ket Int
a = applyOp a_eig
where
a_eig KetZero = KetZero
a_eig (Ket n) = sqrt (fromIntegral n) *| Ket (n - 1) | 136 | :: Ket Int -> Ket Int
a = applyOp a_eig
where
a_eig KetZero = KetZero
a_eig (Ket n) = sqrt (fromIntegral n) *| Ket (n - 1) | 136 | :: Ket Int -> Ket Int
a = applyOp a_eig
where
a_eig KetZero = KetZero
a_eig (Ket n) = sqrt (fromIntegral n) *| Ket (n - 1) | 136 | false | false | 1 | 8 | 40 | 78 | 34 | 44 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QMessageBox.hs | bsd-2-clause | eEscape :: QMessageBoxStandardButton
eEscape
= ieQMessageBoxStandardButton $ 512 | 82 | eEscape :: QMessageBoxStandardButton
eEscape
= ieQMessageBoxStandardButton $ 512 | 82 | eEscape
= ieQMessageBoxStandardButton $ 512 | 45 | false | true | 0 | 6 | 9 | 22 | 9 | 13 | null | null |
phischu/fragnix | tests/packages/scotty/Data.ByteString.Short.Internal.hs | bsd-3-clause | ------------------------------------------------------------------------
-- Internal utils
asBA :: ShortByteString -> BA
asBA (SBS ba# ) = BA# ba# | 147 | asBA :: ShortByteString -> BA
asBA (SBS ba# ) = BA# ba# | 55 | asBA (SBS ba# ) = BA# ba# | 25 | true | true | 0 | 6 | 16 | 33 | 16 | 17 | null | null |
nomeata/ghc | compiler/nativeGen/X86/Regs.hs | bsd-3-clause | regNames :: Platform -> [String]
regNames platform
= if target32Bit platform
then ["%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp", "%esp"]
else ["%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", "%rbp", "%rsp"] | 232 | regNames :: Platform -> [String]
regNames platform
= if target32Bit platform
then ["%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp", "%esp"]
else ["%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", "%rbp", "%rsp"] | 232 | regNames platform
= if target32Bit platform
then ["%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp", "%esp"]
else ["%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi", "%rbp", "%rsp"] | 199 | false | true | 0 | 6 | 44 | 80 | 49 | 31 | null | null |
beni55/haste-compiler | libraries/haste-lib/src/Haste/App/Monad.hs | bsd-3-clause | -- | Has 'runApp' already been invoked?
hasteAppRunning :: IORef Bool
hasteAppRunning = unsafePerformIO $ newIORef False | 120 | hasteAppRunning :: IORef Bool
hasteAppRunning = unsafePerformIO $ newIORef False | 80 | hasteAppRunning = unsafePerformIO $ newIORef False | 50 | true | true | 0 | 6 | 16 | 22 | 11 | 11 | null | null |
tlunter/PushBullet | src/Web/PushBullet/Core.hs | mit | runPushBullet :: Connection -> PushBullet a -> IO a
runPushBullet conn (PushBullet pb) = runReaderT pb conn | 107 | runPushBullet :: Connection -> PushBullet a -> IO a
runPushBullet conn (PushBullet pb) = runReaderT pb conn | 107 | runPushBullet conn (PushBullet pb) = runReaderT pb conn | 55 | false | true | 0 | 7 | 16 | 45 | 20 | 25 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/GHC/Misc.hs | bsd-3-clause | sDocDoc = PJ.text . showSDoc | 30 | sDocDoc = PJ.text . showSDoc | 30 | sDocDoc = PJ.text . showSDoc | 30 | false | false | 0 | 6 | 6 | 12 | 6 | 6 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/Consents/Get.hs | mpl-2.0 | -- | Required. The resource name of the Consent to retrieve, of the form
-- \`projects\/{project_id}\/locations\/{location_id}\/datasets\/{dataset_id}\/consentStores\/{consent_store_id}\/consents\/{consent_id}\`.
-- In order to retrieve a previous revision of the Consent, also provide
-- the revision ID:
-- \`projects\... | 604 | pldscscgName :: Lens' ProjectsLocationsDataSetsConsentStoresConsentsGet Text
pldscscgName
= lens _pldscscgName (\ s a -> s{_pldscscgName = a}) | 144 | pldscscgName
= lens _pldscscgName (\ s a -> s{_pldscscgName = a}) | 67 | true | true | 0 | 9 | 52 | 46 | 26 | 20 | null | null |
akindle/hdlint | Parse/Statements.hs | mit | caseItem :: Parser Statement
caseItem = do
caseName <- (aExpression <|> (rword "default" >> return Default))
_ <- colon
content <- statement
return $ Case caseName content | 187 | caseItem :: Parser Statement
caseItem = do
caseName <- (aExpression <|> (rword "default" >> return Default))
_ <- colon
content <- statement
return $ Case caseName content | 187 | caseItem = do
caseName <- (aExpression <|> (rword "default" >> return Default))
_ <- colon
content <- statement
return $ Case caseName content | 158 | false | true | 0 | 12 | 42 | 67 | 31 | 36 | null | null |
frantisekfarka/ghc-dsi | libraries/base/System/IO.hs | bsd-3-clause | -- | The 'print' function outputs a value of any printable type to the
-- standard output device.
-- Printable types are those that are instances of class 'Show'; 'print'
-- converts values to strings for output using the 'show' operation and
-- adds a newline.
--
-- For example, a program to print the first 20 integer... | 494 | print :: Show a => a -> IO ()
print x = putStrLn (show x) | 76 | print x = putStrLn (show x) | 36 | true | true | 0 | 9 | 114 | 54 | 29 | 25 | null | null |
Numberartificial/Realworld-Haskell | code/Ch03/BookStore.hs | apache-2.0 | nodesAreSame _ _ = Nothing | 26 | nodesAreSame _ _ = Nothing | 26 | nodesAreSame _ _ = Nothing | 26 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
uduki/hsQt | Qtc/Gui/QFrame.hs | bsd-2-clause | setFrameShape :: QFrame a -> ((QFrameShape)) -> IO ()
setFrameShape x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QFrame_setFrameShape cobj_x0 (toCLong $ qEnum_toInt x1) | 174 | setFrameShape :: QFrame a -> ((QFrameShape)) -> IO ()
setFrameShape x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QFrame_setFrameShape cobj_x0 (toCLong $ qEnum_toInt x1) | 174 | setFrameShape x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QFrame_setFrameShape cobj_x0 (toCLong $ qEnum_toInt x1) | 120 | false | true | 2 | 9 | 29 | 74 | 35 | 39 | null | null |
keithduncan/logplex-parse | src/Text/Syslog/Parser.hs | mit | nonZeroDigit = oneOf "123456789" | 32 | nonZeroDigit = oneOf "123456789" | 32 | nonZeroDigit = oneOf "123456789" | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
snoyberg/ghc | compiler/main/PprTyThing.hs | bsd-3-clause | pprFamInst :: FamInst -> SDoc
-- * For data instances we go via pprTyThing of the representational TyCon,
-- because there is already much cleverness associated with printing
-- data type declarations that I don't want to duplicate
-- * For type instances we print directly here; there is no TyCon
-- to give ... | 518 | pprFamInst :: FamInst -> SDoc
pprFamInst (FamInst { fi_flavor = DataFamilyInst rep_tc })
= pprTyThingInContextLoc (ATyCon rep_tc) | 131 | pprFamInst (FamInst { fi_flavor = DataFamilyInst rep_tc })
= pprTyThingInContextLoc (ATyCon rep_tc) | 101 | true | true | 0 | 10 | 92 | 49 | 28 | 21 | null | null |
shouya/thinking-dumps | wys48h/code/Primitive.hs | mit | substring [String _, x, _] = throwError $ TypeMismatch "number" x | 72 | substring [String _, x, _] = throwError $ TypeMismatch "number" x | 72 | substring [String _, x, _] = throwError $ TypeMismatch "number" x | 72 | false | false | 0 | 6 | 17 | 31 | 15 | 16 | null | null |
egison/egison | hs-src/Language/Egison/Data.hs | mit | symbolExprToEgison :: (SymbolExpr, Integer) -> EgisonValue
symbolExprToEgison (Symbol id x js, n) = Tuple [InductiveData "Symbol" [symbolScalarData id x, f js], toEgison n]
where
f js = Collection (Sq.fromList (map scalarIndexToEgison js)) | 242 | symbolExprToEgison :: (SymbolExpr, Integer) -> EgisonValue
symbolExprToEgison (Symbol id x js, n) = Tuple [InductiveData "Symbol" [symbolScalarData id x, f js], toEgison n]
where
f js = Collection (Sq.fromList (map scalarIndexToEgison js)) | 242 | symbolExprToEgison (Symbol id x js, n) = Tuple [InductiveData "Symbol" [symbolScalarData id x, f js], toEgison n]
where
f js = Collection (Sq.fromList (map scalarIndexToEgison js)) | 183 | false | true | 0 | 9 | 34 | 98 | 49 | 49 | null | null |
acharal/wam | src/Prolog.hs | gpl-2.0 | preds cs = nub $ map (\(T (s,args),_) -> (s, length args)) cs | 62 | preds cs = nub $ map (\(T (s,args),_) -> (s, length args)) cs | 62 | preds cs = nub $ map (\(T (s,args),_) -> (s, length args)) cs | 62 | false | false | 0 | 11 | 13 | 50 | 27 | 23 | null | null |
misc-tools/projmgt | app/Main.hs | mit | -- | List all organizations
printOrgs :: IO ()
printOrgs = do
putStrLnColor Yellow "CURRENT ORGANIZATIONS:"
view $ getName . toText . filename <$> (ls projectsDir) | 171 | printOrgs :: IO ()
printOrgs = do
putStrLnColor Yellow "CURRENT ORGANIZATIONS:"
view $ getName . toText . filename <$> (ls projectsDir) | 143 | printOrgs = do
putStrLnColor Yellow "CURRENT ORGANIZATIONS:"
view $ getName . toText . filename <$> (ls projectsDir) | 124 | true | true | 0 | 10 | 33 | 50 | 24 | 26 | null | null |
jtdaugherty/vty | src/Graphics/Vty/Output/XTermColor.hs | bsd-3-clause | enableBracketedPastes :: String
enableBracketedPastes = "\ESC[?2004h" | 69 | enableBracketedPastes :: String
enableBracketedPastes = "\ESC[?2004h" | 69 | enableBracketedPastes = "\ESC[?2004h" | 37 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
bluepeppers/highhockwho | tests/Tests/HighHock/Controller.hs | agpl-3.0 | controllerTests = do
describe "Controller.stop" $ do
it "stops the controller immedietly" $ do
states <- controllerStates
asyncs <- forM states $ \c -> A.async $ do
stop c
threadDelay timeout
forM_ asyncs $ \a -> do
state <- A.poll a
state `shouldBe` Just (Right ())... | 2,984 | controllerTests = do
describe "Controller.stop" $ do
it "stops the controller immedietly" $ do
states <- controllerStates
asyncs <- forM states $ \c -> A.async $ do
stop c
threadDelay timeout
forM_ asyncs $ \a -> do
state <- A.poll a
state `shouldBe` Just (Right ())... | 2,984 | controllerTests = do
describe "Controller.stop" $ do
it "stops the controller immedietly" $ do
states <- controllerStates
asyncs <- forM states $ \c -> A.async $ do
stop c
threadDelay timeout
forM_ asyncs $ \a -> do
state <- A.poll a
state `shouldBe` Just (Right ())... | 2,984 | false | false | 0 | 22 | 1,045 | 1,108 | 482 | 626 | null | null |
ronichoudhury/bechtrek | app/startrek/parse.hs | apache-2.0 | main :: IO ()
main = do
args <- getArgs
when (length args < 2) $ do
hPutStrLn stderr "usage: parse <scriptfile> <outputfile>"
exitFailure
-- Open the input file for reading; grab its contents.
file <- openFile (head args) ReadMode
hSetEncoding file latin1
text <- hGetContents fi... | 1,063 | main :: IO ()
main = do
args <- getArgs
when (length args < 2) $ do
hPutStrLn stderr "usage: parse <scriptfile> <outputfile>"
exitFailure
-- Open the input file for reading; grab its contents.
file <- openFile (head args) ReadMode
hSetEncoding file latin1
text <- hGetContents fi... | 1,063 | main = do
args <- getArgs
when (length args < 2) $ do
hPutStrLn stderr "usage: parse <scriptfile> <outputfile>"
exitFailure
-- Open the input file for reading; grab its contents.
file <- openFile (head args) ReadMode
hSetEncoding file latin1
text <- hGetContents file
-- Ope... | 1,049 | false | true | 0 | 15 | 276 | 262 | 125 | 137 | null | null |
snoyberg/ghc | compiler/utils/Pretty.hs | bsd-3-clause | -- | Apply 'parens' to 'Doc' if boolean is true.
maybeParens :: Bool -> Doc -> Doc
maybeParens False = id | 105 | maybeParens :: Bool -> Doc -> Doc
maybeParens False = id | 56 | maybeParens False = id | 22 | true | true | 0 | 6 | 20 | 23 | 12 | 11 | null | null |
maple-shaft/HashCashUtilities | src/HashCash.hs | bsd-3-clause | convertToString :: ByteString -> String
convertToString = BU.toString | 69 | convertToString :: ByteString -> String
convertToString = BU.toString | 69 | convertToString = BU.toString | 29 | false | true | 0 | 7 | 7 | 24 | 10 | 14 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/Import.hs | mpl-2.0 | -- | Creates a value of 'ProjectsLocationsDataSetsDicomStoresImport' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pldsdsiXgafv'
--
-- * 'pldsdsiUploadProtocol'
--
-- * 'pldsdsiAccessToken'
--
-- * 'pldsdsiUploadType'
--
-- * 'pldsd... | 931 | projectsLocationsDataSetsDicomStoresImport
:: ImportDicomDataRequest -- ^ 'pldsdsiPayload'
-> Text -- ^ 'pldsdsiName'
-> ProjectsLocationsDataSetsDicomStoresImport
projectsLocationsDataSetsDicomStoresImport pPldsdsiPayload_ pPldsdsiName_ =
ProjectsLocationsDataSetsDicomStoresImport'
{ _pldsdsiXgafv = ... | 552 | projectsLocationsDataSetsDicomStoresImport pPldsdsiPayload_ pPldsdsiName_ =
ProjectsLocationsDataSetsDicomStoresImport'
{ _pldsdsiXgafv = Nothing
, _pldsdsiUploadProtocol = Nothing
, _pldsdsiAccessToken = Nothing
, _pldsdsiUploadType = Nothing
, _pldsdsiPayload = pPldsdsiPayload_
, _pldsdsiNam... | 376 | true | true | 0 | 8 | 150 | 96 | 62 | 34 | null | null |
schell/hdevtools | src/Main.hs | mit | pathArg' (ModuleFile {}) = Nothing | 34 | pathArg' (ModuleFile {}) = Nothing | 34 | pathArg' (ModuleFile {}) = Nothing | 34 | false | false | 0 | 7 | 4 | 16 | 8 | 8 | null | null |
gambogi/csh-eval | src/CSH/Eval/Cacheable/Prim.hs | mit | appendGhost :: (Cache -> IDCache [a])
-> Word64
-> a
-> Cacheable ()
appendGhost a k v c = liftIO $ forkFinally insrt1 (either (const $ putStrLn "appendGhost died!") (const $ return ())) >> return ()
where m1 = a c
insrt1 = do
bracketOnError (takeMVar m1)... | 699 | appendGhost :: (Cache -> IDCache [a])
-> Word64
-> a
-> Cacheable ()
appendGhost a k v c = liftIO $ forkFinally insrt1 (either (const $ putStrLn "appendGhost died!") (const $ return ())) >> return ()
where m1 = a c
insrt1 = do
bracketOnError (takeMVar m1)... | 699 | appendGhost a k v c = liftIO $ forkFinally insrt1 (either (const $ putStrLn "appendGhost died!") (const $ return ())) >> return ()
where m1 = a c
insrt1 = do
bracketOnError (takeMVar m1) (putMVar m1) insrt2
insrt2 m2 = case M.lookup k m2 of
Nothing -> new... | 594 | false | true | 2 | 15 | 231 | 227 | 113 | 114 | null | null |
peteg/ADHOC | Apps/Cache/Tests/030_cache_bugfinder.hs | gpl-2.0 | -------------------------------------------------------------------
-- Composition.
proc_cache i busSigs busArb = signalE $ \procSigs ->
processor i procSigs
||||
cacheController i busSigs busArb procSigs | 216 | proc_cache i busSigs busArb = signalE $ \procSigs ->
processor i procSigs
||||
cacheController i busSigs busArb procSigs | 130 | proc_cache i busSigs busArb = signalE $ \procSigs ->
processor i procSigs
||||
cacheController i busSigs busArb procSigs | 130 | true | false | 1 | 7 | 32 | 37 | 18 | 19 | null | null |
mariefarrell/Hets | Common/Id.hs | gpl-2.0 | -- | is a 'place' token
isPlace :: Token -> Bool
isPlace (Token t _) = t == place | 81 | isPlace :: Token -> Bool
isPlace (Token t _) = t == place | 57 | isPlace (Token t _) = t == place | 32 | true | true | 0 | 7 | 18 | 31 | 16 | 15 | null | null |
ducis/cassandra-minimalist | cassandra-cql-0.3.0.1/Database/Cassandra/CQL1.hs | apache-2.0 | connectIfNeeded :: Pool -> Session -> IO Session
connectIfNeeded pool session =
if isJust (sesActive session)
then return session
else do
let hints = defaultHints { addrSocketType = Stream }
let (host, service) = sesServer session
ais <- getAddrInfo (Just hints) (... | 1,375 | connectIfNeeded :: Pool -> Session -> IO Session
connectIfNeeded pool session =
if isJust (sesActive session)
then return session
else do
let hints = defaultHints { addrSocketType = Stream }
let (host, service) = sesServer session
ais <- getAddrInfo (Just hints) (... | 1,375 | connectIfNeeded pool session =
if isJust (sesActive session)
then return session
else do
let hints = defaultHints { addrSocketType = Stream }
let (host, service) = sesServer session
ais <- getAddrInfo (Just hints) (Just host) (Just service)
mSocket <- ... | 1,326 | false | true | 0 | 25 | 712 | 346 | 164 | 182 | null | null |
ksaveljev/hake-2 | src/Constants.hs | bsd-3-clause | cmAngle3 = 1 `shiftL` 2 :: Int | 31 | cmAngle3 = 1 `shiftL` 2 :: Int | 31 | cmAngle3 = 1 `shiftL` 2 :: Int | 31 | false | false | 0 | 5 | 7 | 15 | 9 | 6 | null | null |
lstephen/box | src/main/ansible/roles/netbeans/files/nbm-install.hs | apache-2.0 | mkTempDir :: FilePath -> IO FilePath
mkTempDir nbm = createDirectoryIfMissing True path >> return path
where
path = "/tmp" </> takeFileName nbm | 149 | mkTempDir :: FilePath -> IO FilePath
mkTempDir nbm = createDirectoryIfMissing True path >> return path
where
path = "/tmp" </> takeFileName nbm | 149 | mkTempDir nbm = createDirectoryIfMissing True path >> return path
where
path = "/tmp" </> takeFileName nbm | 112 | false | true | 0 | 6 | 27 | 48 | 22 | 26 | null | null |
rgaiacs/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | subscript :: OrgParser (F Inlines)
subscript = fmap B.subscript <$> try (char '_' *> subOrSuperExpr) | 106 | subscript :: OrgParser (F Inlines)
subscript = fmap B.subscript <$> try (char '_' *> subOrSuperExpr) | 106 | subscript = fmap B.subscript <$> try (char '_' *> subOrSuperExpr) | 69 | false | true | 0 | 9 | 20 | 42 | 20 | 22 | null | null |
Concomitant/LambdaHack | GameDefinition/Content/ItemKindActor.hs | bsd-3-clause | civilian3 = civilian
{ iname = "lawyer" } | 46 | civilian3 = civilian
{ iname = "lawyer" } | 46 | civilian3 = civilian
{ iname = "lawyer" } | 46 | false | false | 0 | 7 | 12 | 18 | 9 | 9 | null | null |
mrehayden1/lji | src/LJI/Output.hs | bsd-3-clause | clss (Flat n) = name n ++ "f" | 35 | clss (Flat n) = name n ++ "f" | 35 | clss (Flat n) = name n ++ "f" | 35 | false | false | 2 | 6 | 13 | 25 | 10 | 15 | null | null |
adjoint-io/datetime | src/Datetime/Types.hs | apache-2.0 | fomonth :: Int -> DH.Month -> Datetime
fomonth y m =
dateTimeToDatetime DH.timezone_UTC $
DateTime (Date y m 1) (TimeOfDay 0 0 0 0) | 137 | fomonth :: Int -> DH.Month -> Datetime
fomonth y m =
dateTimeToDatetime DH.timezone_UTC $
DateTime (Date y m 1) (TimeOfDay 0 0 0 0) | 137 | fomonth y m =
dateTimeToDatetime DH.timezone_UTC $
DateTime (Date y m 1) (TimeOfDay 0 0 0 0) | 98 | false | true | 0 | 8 | 29 | 62 | 30 | 32 | null | null |
karamellpelle/grid | source/Game/Grid/Helpers/Path.hs | gpl-3.0 | pathSetTurn :: Path -> Turn -> Path
pathSetTurn path turn =
path { pathCurrent = (pathCurrent path) { segmentTurn = turn } } | 128 | pathSetTurn :: Path -> Turn -> Path
pathSetTurn path turn =
path { pathCurrent = (pathCurrent path) { segmentTurn = turn } } | 128 | pathSetTurn path turn =
path { pathCurrent = (pathCurrent path) { segmentTurn = turn } } | 92 | false | true | 0 | 10 | 26 | 55 | 27 | 28 | null | null |
bergmark/binary | src/Data/Binary/Get.hs | bsd-3-clause | -- | Get a lazy ByteString that is terminated with a NUL byte.
-- The returned string does not contain the NUL byte. Fails
-- if it reaches the end of input without finding a NUL.
getLazyByteStringNul :: Get L.ByteString
getLazyByteStringNul = withInputChunks () consumeUntilNul L.fromChunks failOnEOF | 301 | getLazyByteStringNul :: Get L.ByteString
getLazyByteStringNul = withInputChunks () consumeUntilNul L.fromChunks failOnEOF | 121 | getLazyByteStringNul = withInputChunks () consumeUntilNul L.fromChunks failOnEOF | 80 | true | true | 0 | 6 | 46 | 32 | 17 | 15 | null | null |
TomMD/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | hsLKiTyVarNames :: LHsTyVarBndrs Name -> [Name]
-- Kind and type variables
hsLKiTyVarNames (HsQTvs { hsq_kvs = kvs, hsq_tvs = tvs })
= kvs ++ map hsLTyVarName tvs | 164 | hsLKiTyVarNames :: LHsTyVarBndrs Name -> [Name]
hsLKiTyVarNames (HsQTvs { hsq_kvs = kvs, hsq_tvs = tvs })
= kvs ++ map hsLTyVarName tvs | 137 | hsLKiTyVarNames (HsQTvs { hsq_kvs = kvs, hsq_tvs = tvs })
= kvs ++ map hsLTyVarName tvs | 89 | true | true | 7 | 8 | 28 | 63 | 29 | 34 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | -- Casting to remove a compiler warning about Int being too big
wxHSCROLL :: Int
wxHSCROLL = 0x40000000 | 104 | wxHSCROLL :: Int
wxHSCROLL = 0x40000000 | 39 | wxHSCROLL = 0x40000000 | 22 | true | true | 0 | 4 | 18 | 12 | 7 | 5 | null | null |
mumuki/mulang | src/Language/Mulang/Parsers/JavaScript.hs | gpl-3.0 | muJSStatement (JSForIn _ _ id _ gen _ body) = muForIn muJsVarPattern id gen body | 112 | muJSStatement (JSForIn _ _ id _ gen _ body) = muForIn muJsVarPattern id gen body | 112 | muJSStatement (JSForIn _ _ id _ gen _ body) = muForIn muJsVarPattern id gen body | 112 | false | false | 0 | 7 | 46 | 36 | 17 | 19 | null | null |
OS2World/DEV-UTIL-HUGS | oldlib/UnbalancedSet.hs | bsd-3-clause | filterLT y E = E | 16 | filterLT y E = E | 16 | filterLT y E = E | 16 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
Jefffrey/Solidran | src/Solidran/Mrna/Detail.hs | mit | rnaCombsMod :: Int -> String -> Int
rnaCombsMod m str =
foldr (\c i ->
let ni = i * combsFor c
in ni `mod` m) 3 str | 136 | rnaCombsMod :: Int -> String -> Int
rnaCombsMod m str =
foldr (\c i ->
let ni = i * combsFor c
in ni `mod` m) 3 str | 136 | rnaCombsMod m str =
foldr (\c i ->
let ni = i * combsFor c
in ni `mod` m) 3 str | 100 | false | true | 0 | 12 | 48 | 73 | 34 | 39 | null | null |
wxwxwwxxx/ghc | compiler/simplCore/SAT.hs | bsd-3-clause | pprStaticness (Static (CoApp _)) = ptext (sLit "SC") | 54 | pprStaticness (Static (CoApp _)) = ptext (sLit "SC") | 54 | pprStaticness (Static (CoApp _)) = ptext (sLit "SC") | 54 | false | false | 0 | 9 | 9 | 30 | 14 | 16 | null | null |
JacksonGariety/euler.hs | 035.hs | bsd-3-clause | -- purposefully backwrads
toDigits :: Integral x => x -> [x]
toDigits = unfoldr (\x -> if x == 0 then Nothing else Just (swap (quotRem x 10))) | 142 | toDigits :: Integral x => x -> [x]
toDigits = unfoldr (\x -> if x == 0 then Nothing else Just (swap (quotRem x 10))) | 116 | toDigits = unfoldr (\x -> if x == 0 then Nothing else Just (swap (quotRem x 10))) | 81 | true | true | 0 | 13 | 27 | 66 | 35 | 31 | null | null |
adamse/haddock | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | bsd-2-clause | -- btype in ParseIface.y in GHC
-- Used for LH arg of (->)
pREC_OP = 3 :: Int | 100 | pREC_OP = 3 :: Int | 19 | pREC_OP = 3 :: Int | 19 | true | false | 2 | 5 | 40 | 17 | 7 | 10 | null | null |
SimplyNaOH/voronoi | src/BreakpointTree.hs | gpl-3.0 | deleteX (Node l _ r ) = Node l r' $ tail' r
where
r' = leftistElement r | 80 | deleteX (Node l _ r ) = Node l r' $ tail' r
where
r' = leftistElement r | 80 | deleteX (Node l _ r ) = Node l r' $ tail' r
where
r' = leftistElement r | 80 | false | false | 0 | 7 | 26 | 42 | 19 | 23 | null | null |
hjwylde/werewolf | app/Game/Werewolf/Util.hs | bsd-3-clause | -- | Get a random allegiance (either Villagers or Werewolves).
getRandomAllegiance :: MonadRandom m => m Allegiance
getRandomAllegiance = fromList [(Villagers, 0.5), (Werewolves, 0.5)] | 184 | getRandomAllegiance :: MonadRandom m => m Allegiance
getRandomAllegiance = fromList [(Villagers, 0.5), (Werewolves, 0.5)] | 121 | getRandomAllegiance = fromList [(Villagers, 0.5), (Werewolves, 0.5)] | 68 | true | true | 0 | 7 | 23 | 48 | 25 | 23 | null | null |
ddssff/lens | src/Language/Haskell/TH/Lens.hs | bsd-3-clause | _UnboxedSumE :: Prism' Exp (Exp, SumAlt, SumArity)
_UnboxedSumE
= prism' reviewer remitter
where
reviewer (x, y, z) = UnboxedSumE x y z
remitter (UnboxedSumE x y z) = Just (x, y, z)
remitter _ = Nothing
#endif | 231 | _UnboxedSumE :: Prism' Exp (Exp, SumAlt, SumArity)
_UnboxedSumE
= prism' reviewer remitter
where
reviewer (x, y, z) = UnboxedSumE x y z
remitter (UnboxedSumE x y z) = Just (x, y, z)
remitter _ = Nothing
#endif | 231 | _UnboxedSumE
= prism' reviewer remitter
where
reviewer (x, y, z) = UnboxedSumE x y z
remitter (UnboxedSumE x y z) = Just (x, y, z)
remitter _ = Nothing
#endif | 180 | false | true | 2 | 7 | 58 | 96 | 51 | 45 | null | null |
danr/agder | backend/Problems.hs | bsd-3-clause | problemDir :: String -> FilePath
problemDir p = problems </> p | 62 | problemDir :: String -> FilePath
problemDir p = problems </> p | 62 | problemDir p = problems </> p | 29 | false | true | 0 | 5 | 10 | 22 | 11 | 11 | null | null |
ThoseGrapefruits/dataface | src/Data.hs | bsd-3-clause | createUser :: Text -> Text -> BoltActionT IO User
createUser username password = do
records <- queryP cypher params
liftIO . putStrLn $ "// CREATING USER" ++ (show username)
liftIO . print $ records
return (User username [])
where cypher = "CREATE (u:User {username: {username}, passwordHash: {password... | 1,128 | createUser :: Text -> Text -> BoltActionT IO User
createUser username password = do
records <- queryP cypher params
liftIO . putStrLn $ "// CREATING USER" ++ (show username)
liftIO . print $ records
return (User username [])
where cypher = "CREATE (u:User {username: {username}, passwordHash: {password... | 1,128 | createUser username password = do
records <- queryP cypher params
liftIO . putStrLn $ "// CREATING USER" ++ (show username)
liftIO . print $ records
return (User username [])
where cypher = "CREATE (u:User {username: {username}, passwordHash: {passwordHash}})" <>
"RETURN u"
pa... | 1,078 | false | true | 2 | 10 | 306 | 160 | 80 | 80 | null | null |
ezyang/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | tickString LetFloatFromLet = "LetFloatFromLet" | 59 | tickString LetFloatFromLet = "LetFloatFromLet" | 59 | tickString LetFloatFromLet = "LetFloatFromLet" | 59 | false | false | 0 | 4 | 16 | 10 | 4 | 6 | null | null |
koba-e964/hayashii-mcc | test/SSATest.hs | bsd-3-clause | time :: Int
time = 2000000 | 26 | time :: Int
time = 2000000 | 26 | time = 2000000 | 14 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
emaphis/Haskell-Practice | cis194/src/Misc/Date2.hs | bsd-3-clause | -- 10
-- add months
day4 :: Day
day4 = addGregorianMonthsClip 1 day3 | 69 | day4 :: Day
day4 = addGregorianMonthsClip 1 day3 | 48 | day4 = addGregorianMonthsClip 1 day3 | 36 | true | true | 0 | 6 | 13 | 26 | 11 | 15 | null | null |
xmonad/xmonad-contrib | XMonad/Actions/TreeSelect.hs | bsd-3-clause | -- | Same as 'treeselect' but ad a specific starting position
treeselectAt :: TSConfig a -- ^ config file
-> TreeZipper (TSNode a) -- ^ tree structure with a cursor position (starting node)
-> [[String]] -- ^ list of paths that can be navigated with 'moveHistBack' and 'moveHistForward... | 3,215 | treeselectAt :: TSConfig a -- ^ config file
-> TreeZipper (TSNode a) -- ^ tree structure with a cursor position (starting node)
-> [[String]] -- ^ list of paths that can be navigated with 'moveHistBack' and 'moveHistForward' (bound to the 'o' and 'i' keys)
-> X (Maybe a)
... | 3,153 | treeselectAt conf@TSConfig{..} zipper hist = withDisplay $ \display -> do
-- create a window on the currently focused screen
rootw <- asks theRoot
Rectangle{..} <- gets $ screenRect . W.screenDetail . W.current . windowset
Just vinfo <- liftIO $ matchVisualInfo display (defaultScreen display) 32 4
... | 2,833 | true | true | 33 | 15 | 1,031 | 621 | 319 | 302 | null | null |
spechub/Hets | ConstraintCASL/Formula.hs | gpl-2.0 | {- ------------------------------------------------------------------------
formula
------------------------------------------------------------------------ -}
cformula :: [String] -> AParser st ConstraintFORMULA
cformula k =
try (
do c1 <- conjunction k
impliesT
c2 <- conjunction k
return... | 591 | cformula :: [String] -> AParser st ConstraintFORMULA
cformula k =
try (
do c1 <- conjunction k
impliesT
c2 <- conjunction k
return (Implication_ConstraintFormula c1 c2))
<|>
try (
do c1 <- conjunction k
equivalentT
c2 <- conjunction k
return (Equivalence_Const... | 430 | cformula k =
try (
do c1 <- conjunction k
impliesT
c2 <- conjunction k
return (Implication_ConstraintFormula c1 c2))
<|>
try (
do c1 <- conjunction k
equivalentT
c2 <- conjunction k
return (Equivalence_ConstraintFormula c1 c2))
<|>
do impliesT
c <... | 377 | true | true | 6 | 10 | 138 | 153 | 68 | 85 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Text.hs | bsd-3-clause | group :: Text -> [Text]
group = groupBy (==) | 44 | group :: Text -> [Text]
group = groupBy (==) | 44 | group = groupBy (==) | 20 | false | true | 0 | 8 | 8 | 30 | 14 | 16 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/ReplaceMap.hs | gpl-2.0 | insertOrReplaceCharWithBelowB :: BufferM ()
insertOrReplaceCharWithBelowB = do
currentChar <- readB
if currentChar == '\n'
then insertCharWithBelowB
else replaceCharWithBelowB
rightB | 202 | insertOrReplaceCharWithBelowB :: BufferM ()
insertOrReplaceCharWithBelowB = do
currentChar <- readB
if currentChar == '\n'
then insertCharWithBelowB
else replaceCharWithBelowB
rightB | 202 | insertOrReplaceCharWithBelowB = do
currentChar <- readB
if currentChar == '\n'
then insertCharWithBelowB
else replaceCharWithBelowB
rightB | 158 | false | true | 0 | 8 | 38 | 41 | 20 | 21 | null | null |
bkoropoff/Idris-dev | src/Idris/DSL.hs | bsd-3-clause | expandSugar dsl (PHidden t) = PHidden (expandSugar dsl t) | 57 | expandSugar dsl (PHidden t) = PHidden (expandSugar dsl t) | 57 | expandSugar dsl (PHidden t) = PHidden (expandSugar dsl t) | 57 | false | false | 0 | 7 | 8 | 30 | 13 | 17 | null | null |
jwodder/hsgraphics | Raster/Palette/HTML.hs | mit | red = fromRGB 0xFF 0 0 | 32 | red = fromRGB 0xFF 0 0 | 32 | red = fromRGB 0xFF 0 0 | 32 | false | false | 1 | 5 | 15 | 19 | 6 | 13 | null | null |
bgw/hs-rpal | src/Parser/Ast.hs | gpl-3.0 | showName (AstTrue) = "<true>" | 29 | showName (AstTrue) = "<true>" | 29 | showName (AstTrue) = "<true>" | 29 | false | false | 0 | 6 | 3 | 12 | 6 | 6 | null | null |
vikraman/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | thenBc_ :: BcM a -> BcM b -> BcM b
thenBc_ (BcM expr) (BcM cont) = BcM $ \st0 -> do
(st1, _) <- expr st0
(st2, r) <- cont st1
return (st2, r) | 147 | thenBc_ :: BcM a -> BcM b -> BcM b
thenBc_ (BcM expr) (BcM cont) = BcM $ \st0 -> do
(st1, _) <- expr st0
(st2, r) <- cont st1
return (st2, r) | 147 | thenBc_ (BcM expr) (BcM cont) = BcM $ \st0 -> do
(st1, _) <- expr st0
(st2, r) <- cont st1
return (st2, r) | 112 | false | true | 2 | 10 | 39 | 104 | 49 | 55 | null | null |
snoyberg/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | -- | Make a sigma ty where all type variables are "specified". That is,
-- they can be used with visible type application
mkSpecSigmaTy :: [TyVar] -> [PredType] -> Type -> Type
mkSpecSigmaTy tyvars ty = mkSigmaTy (mkTyVarBinders Specified tyvars) ty | 249 | mkSpecSigmaTy :: [TyVar] -> [PredType] -> Type -> Type
mkSpecSigmaTy tyvars ty = mkSigmaTy (mkTyVarBinders Specified tyvars) ty | 127 | mkSpecSigmaTy tyvars ty = mkSigmaTy (mkTyVarBinders Specified tyvars) ty | 72 | true | true | 0 | 7 | 40 | 49 | 26 | 23 | null | null |
ony/hledger | hledger/Hledger/Cli/Commands/Add.hs | gpl-3.0 | maybeRestartTransaction = parser (\s -> if s=="<" then throw RestartTransactionException else Just s) | 101 | maybeRestartTransaction = parser (\s -> if s=="<" then throw RestartTransactionException else Just s) | 101 | maybeRestartTransaction = parser (\s -> if s=="<" then throw RestartTransactionException else Just s) | 101 | false | false | 0 | 9 | 12 | 35 | 18 | 17 | null | null |
ygale/yesod | yesod-core/Yesod/Core/Class/Yesod.hs | mit | sslOnlySessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend)
sslOnlySessions = (fmap . fmap) secureSessionCookies
where
setSecureBit cookie = cookie { setCookieSecure = True }
secureSessionCookies = customizeSessionCookies setSecureBit
-- | Apply a Strict-Transport-Security header with the speci... | 782 | sslOnlySessions :: IO (Maybe SessionBackend) -> IO (Maybe SessionBackend)
sslOnlySessions = (fmap . fmap) secureSessionCookies
where
setSecureBit cookie = cookie { setCookieSecure = True }
secureSessionCookies = customizeSessionCookies setSecureBit
-- | Apply a Strict-Transport-Security header with the speci... | 782 | sslOnlySessions = (fmap . fmap) secureSessionCookies
where
setSecureBit cookie = cookie { setCookieSecure = True }
secureSessionCookies = customizeSessionCookies setSecureBit
-- | Apply a Strict-Transport-Security header with the specified timeout to
-- all responses so that browsers will rewrite all http li... | 708 | false | true | 0 | 8 | 127 | 79 | 44 | 35 | null | null |
diogob/pivotal-tracker-api | src/PivotalTrackerApi.hs | bsd-3-clause | baseUrl :: String
baseUrl = "https://www.pivotaltracker.com/services/v5/" | 73 | baseUrl :: String
baseUrl = "https://www.pivotaltracker.com/services/v5/" | 73 | baseUrl = "https://www.pivotaltracker.com/services/v5/" | 55 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
OS2World/DEV-UTIL-HUGS | oldlib/PatriciaLoMap.hs | bsd-3-clause | map :: (a -> b) -> IntMap a -> IntMap b
map f E = E | 51 | map :: (a -> b) -> IntMap a -> IntMap b
map f E = E | 51 | map f E = E | 11 | false | true | 0 | 7 | 15 | 37 | 18 | 19 | null | null |
juodaspaulius/clafer-old-customBNFC | src/Language/Clafer/Optimizer/Optimizer.hs | mit | checkConstraintElement :: [String] -> IElement -> Bool
checkConstraintElement idents x = case x of
IEClafer claf -> and $ map (checkConstraintElement idents) $ _elements claf
IEConstraint _ pexp -> checkConstraintPExp idents pexp
IEGoal _ _ -> True | 256 | checkConstraintElement :: [String] -> IElement -> Bool
checkConstraintElement idents x = case x of
IEClafer claf -> and $ map (checkConstraintElement idents) $ _elements claf
IEConstraint _ pexp -> checkConstraintPExp idents pexp
IEGoal _ _ -> True | 256 | checkConstraintElement idents x = case x of
IEClafer claf -> and $ map (checkConstraintElement idents) $ _elements claf
IEConstraint _ pexp -> checkConstraintPExp idents pexp
IEGoal _ _ -> True | 201 | false | true | 5 | 6 | 44 | 80 | 41 | 39 | null | null |
muhbaasu/hash-id | src/Data/HashId/Internal.hs | mit | consistentShuffle :: String -> Salt -> String
consistentShuffle alpha (Salt salt') =
fst $ foldl' shuffleStep (alpha, 0) $ zip is vs
where
vs = cycle [0..(length salt'-1)]
is = [(length alpha-1), (length alpha-2)..1]
shuffleStep (alpha', p) (i, v) =
let ascVal = ord $ salt' !! v
p' = p +... | 400 | consistentShuffle :: String -> Salt -> String
consistentShuffle alpha (Salt salt') =
fst $ foldl' shuffleStep (alpha, 0) $ zip is vs
where
vs = cycle [0..(length salt'-1)]
is = [(length alpha-1), (length alpha-2)..1]
shuffleStep (alpha', p) (i, v) =
let ascVal = ord $ salt' !! v
p' = p +... | 400 | consistentShuffle alpha (Salt salt') =
fst $ foldl' shuffleStep (alpha, 0) $ zip is vs
where
vs = cycle [0..(length salt'-1)]
is = [(length alpha-1), (length alpha-2)..1]
shuffleStep (alpha', p) (i, v) =
let ascVal = ord $ salt' !! v
p' = p + ascVal
j = (ascVal + v + p') `mod` ... | 354 | false | true | 5 | 12 | 115 | 215 | 106 | 109 | null | null |
abakst/liquidhaskell | tests/pos/deptupW.hs | bsd-3-clause | {-@ mkP :: forall a <q :: y0:a -> y1:a -> Prop>. x: a -> y: a<q x> -> Pair <q> a a @-}
mkP :: a -> a -> Pair a a
mkP x y = P x y | 128 | mkP :: a -> a -> Pair a a
mkP x y = P x y | 41 | mkP x y = P x y | 15 | true | true | 0 | 8 | 39 | 41 | 18 | 23 | null | null |
mvr/cf | src/Math/ContinuedFraction/Simple.hs | mit | bihomAbsorbY :: Bihom -> Integer -> Bihom
bihomAbsorbY (n0, n1, n2, n3,
d0, d1, d2, d3) y = (n0*y + n2, n1*y + n3, n0, n1,
d0*y + d2, d1*y + d3, d0, d1) | 201 | bihomAbsorbY :: Bihom -> Integer -> Bihom
bihomAbsorbY (n0, n1, n2, n3,
d0, d1, d2, d3) y = (n0*y + n2, n1*y + n3, n0, n1,
d0*y + d2, d1*y + d3, d0, d1) | 201 | bihomAbsorbY (n0, n1, n2, n3,
d0, d1, d2, d3) y = (n0*y + n2, n1*y + n3, n0, n1,
d0*y + d2, d1*y + d3, d0, d1) | 159 | false | true | 0 | 9 | 82 | 110 | 61 | 49 | null | null |
paulsamways/hs-scheme | src/Scheme.hs | bsd-3-clause | readExpr :: String -> ThrowsError LispValue
readExpr input = case parse parseExpr "lisp" input of
Left err -> throwError $ ErrorParse err
Right v -> return v | 161 | readExpr :: String -> ThrowsError LispValue
readExpr input = case parse parseExpr "lisp" input of
Left err -> throwError $ ErrorParse err
Right v -> return v | 161 | readExpr input = case parse parseExpr "lisp" input of
Left err -> throwError $ ErrorParse err
Right v -> return v | 117 | false | true | 0 | 9 | 30 | 64 | 28 | 36 | null | null |
entropia/tip-toi-reveng | src/GMEWriter.hs | mit | putCommand Cancel = do
putWord16 0
mapM_ putWord8 [0xFF, 0xFA]
putTVal (Const 0xFFFF) | 97 | putCommand Cancel = do
putWord16 0
mapM_ putWord8 [0xFF, 0xFA]
putTVal (Const 0xFFFF) | 97 | putCommand Cancel = do
putWord16 0
mapM_ putWord8 [0xFF, 0xFA]
putTVal (Const 0xFFFF) | 97 | false | false | 0 | 9 | 24 | 41 | 18 | 23 | null | null |
brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/EntityTypes/List.hs | mpl-2.0 | -- | Optional. The next_page_token value returned from a previous list
-- request.
paetlPageToken :: Lens' ProjectsAgentEntityTypesList (Maybe Text)
paetlPageToken
= lens _paetlPageToken
(\ s a -> s{_paetlPageToken = a}) | 228 | paetlPageToken :: Lens' ProjectsAgentEntityTypesList (Maybe Text)
paetlPageToken
= lens _paetlPageToken
(\ s a -> s{_paetlPageToken = a}) | 145 | paetlPageToken
= lens _paetlPageToken
(\ s a -> s{_paetlPageToken = a}) | 79 | true | true | 0 | 9 | 37 | 49 | 26 | 23 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.