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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
konn/konnfav | KonnFav.hs | bsd-2-clause | getSearchR :: Handler ()
getSearchR = do
scrName <- runFormGet' $ stringInput "screen_name"
redirect RedirectTemporary $ FavedR scrName | 139 | getSearchR :: Handler ()
getSearchR = do
scrName <- runFormGet' $ stringInput "screen_name"
redirect RedirectTemporary $ FavedR scrName | 139 | getSearchR = do
scrName <- runFormGet' $ stringInput "screen_name"
redirect RedirectTemporary $ FavedR scrName | 114 | false | true | 0 | 9 | 21 | 43 | 19 | 24 | null | null |
meteficha/yesod | yesod-core/Yesod/Core/Internal/Response.hs | mit | yarToResponse (YRPlain s' hs ct c newSess) saveSession yreq _req is sendResponse = do
extraHeaders <- do
let nsToken = maybe
newSess
(\n -> Map.insert tokenKey (encodeUtf8 n) newSess)
(reqToken yreq)
sessionHeaders <- saveSession nsToken
return... | 1,683 | yarToResponse (YRPlain s' hs ct c newSess) saveSession yreq _req is sendResponse = do
extraHeaders <- do
let nsToken = maybe
newSess
(\n -> Map.insert tokenKey (encodeUtf8 n) newSess)
(reqToken yreq)
sessionHeaders <- saveSession nsToken
return... | 1,683 | yarToResponse (YRPlain s' hs ct c newSess) saveSession yreq _req is sendResponse = do
extraHeaders <- do
let nsToken = maybe
newSess
(\n -> Map.insert tokenKey (encodeUtf8 n) newSess)
(reqToken yreq)
sessionHeaders <- saveSession nsToken
return... | 1,683 | false | false | 0 | 19 | 528 | 395 | 191 | 204 | null | null |
Palmik/wai-sockjs | src/Network/Sock/Frame.hs | bsd-3-clause | encodeFrame (FrameClose n m) = "c[" <> AE.encode n <> "," <> AE.encode m <> "]" | 79 | encodeFrame (FrameClose n m) = "c[" <> AE.encode n <> "," <> AE.encode m <> "]" | 79 | encodeFrame (FrameClose n m) = "c[" <> AE.encode n <> "," <> AE.encode m <> "]" | 79 | false | false | 0 | 10 | 15 | 43 | 20 | 23 | null | null |
PierreR/Haskell-Turtle-Library | src/Turtle/Prelude.hs | bsd-3-clause | {-| Analogous to `&&` in Bash
Runs the second command only if the first one returns `ExitSuccess`
-}
(.&&.) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode
cmd1 .&&. cmd2 = do
r <- cmd1
case r of
ExitSuccess -> cmd2
_ -> return r
{-| Analogous to `||` in Bash
Run the se... | 379 | (.&&.) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode
cmd1 .&&. cmd2 = do
r <- cmd1
case r of
ExitSuccess -> cmd2
_ -> return r
{-| Analogous to `||` in Bash
Run the second command only if the first one returns `ExitFailure`
-} | 273 | cmd1 .&&. cmd2 = do
r <- cmd1
case r of
ExitSuccess -> cmd2
_ -> return r
{-| Analogous to `||` in Bash
Run the second command only if the first one returns `ExitFailure`
-} | 213 | true | true | 0 | 11 | 111 | 78 | 36 | 42 | null | null |
CarloMicieli/fun-with-haskell | src/craft3e/Chapter04.hs | apache-2.0 | weakAscOrder_prop1 :: Integer -> Integer -> Integer -> Bool
weakAscOrder_prop1 m n p = weakAscOrder m n p == weakAscOrder' m n p | 128 | weakAscOrder_prop1 :: Integer -> Integer -> Integer -> Bool
weakAscOrder_prop1 m n p = weakAscOrder m n p == weakAscOrder' m n p | 128 | weakAscOrder_prop1 m n p = weakAscOrder m n p == weakAscOrder' m n p | 68 | false | true | 0 | 9 | 22 | 53 | 24 | 29 | null | null |
vito/atomo-old | Atomo/Internals.hs | mit | prettyPattern (PName a) = a | 27 | prettyPattern (PName a) = a | 27 | prettyPattern (PName a) = a | 27 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
rcook/lyah | ninety-nine-problems.hs | mit | dupli (x : xs) = x : x : dupli xs | 33 | dupli (x : xs) = x : x : dupli xs | 33 | dupli (x : xs) = x : x : dupli xs | 33 | false | false | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
kazu-yamamoto/cab | src/Run.hs | bsd-3-clause | run :: CommandSpec -> [Arg] -> [Option] -> IO ()
run cmdspec params opts = case routing cmdspec of
RouteFunc func -> func params opts options
RouteCabal subargs -> callProcess pro subargs params options
where
pro = "cabal"
sws = switches cmdspec
options = optionsToString opts sws | 306 | run :: CommandSpec -> [Arg] -> [Option] -> IO ()
run cmdspec params opts = case routing cmdspec of
RouteFunc func -> func params opts options
RouteCabal subargs -> callProcess pro subargs params options
where
pro = "cabal"
sws = switches cmdspec
options = optionsToString opts sws | 306 | run cmdspec params opts = case routing cmdspec of
RouteFunc func -> func params opts options
RouteCabal subargs -> callProcess pro subargs params options
where
pro = "cabal"
sws = switches cmdspec
options = optionsToString opts sws | 257 | false | true | 3 | 10 | 72 | 122 | 53 | 69 | null | null |
nh2/quickcheck | Test/QuickCheck/Property.hs | bsd-3-clause | rejected :: Result
rejected = result{ ok = Nothing } | 52 | rejected :: Result
rejected = result{ ok = Nothing } | 52 | rejected = result{ ok = Nothing } | 33 | false | true | 0 | 6 | 9 | 19 | 11 | 8 | null | null |
iu-parfunc/containers | tests-ghc/unreliable/mapcoerceintmap.hs | bsd-3-clause | fooCoerce :: IntMap Int -> IntMap Age
fooCoerce = fmap coerce | 61 | fooCoerce :: IntMap Int -> IntMap Age
fooCoerce = fmap coerce | 61 | fooCoerce = fmap coerce | 23 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
marklar/elm-fun | HR/bst.hs | mit | toYesNo False = NO | 18 | toYesNo False = NO | 18 | toYesNo False = NO | 18 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
AlexanderPankiv/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | pprCLbl :: CLabel -> SDoc
pprCLbl (StringLitLabel u)
= pprUnique u <> ptext (sLit "_str") | 91 | pprCLbl :: CLabel -> SDoc
pprCLbl (StringLitLabel u)
= pprUnique u <> ptext (sLit "_str") | 91 | pprCLbl (StringLitLabel u)
= pprUnique u <> ptext (sLit "_str") | 65 | false | true | 2 | 9 | 16 | 46 | 20 | 26 | null | null |
zalora/tinc | src/Util.hs | bsd-3-clause | tee :: Monad m => (a -> m ()) -> a -> m a
tee action a = action a >> return a | 77 | tee :: Monad m => (a -> m ()) -> a -> m a
tee action a = action a >> return a | 77 | tee action a = action a >> return a | 35 | false | true | 2 | 11 | 22 | 61 | 27 | 34 | null | null |
m00nlight/hackerrank | functional/recursion/The-Sum-of-Powers/main.hs | gpl-2.0 | main = do
contents <- getContents
let [num, n] = map (read :: String -> Int) (lines contents)
putStrLn $ show $ solve num n 1 | 137 | main = do
contents <- getContents
let [num, n] = map (read :: String -> Int) (lines contents)
putStrLn $ show $ solve num n 1 | 137 | main = do
contents <- getContents
let [num, n] = map (read :: String -> Int) (lines contents)
putStrLn $ show $ solve num n 1 | 137 | false | false | 1 | 13 | 37 | 72 | 33 | 39 | null | null |
alexander-at-github/eta | compiler/ETA/BasicTypes/Module.hs | bsd-3-clause | foldModuleEnv :: (a -> b -> b) -> b -> ModuleEnv a -> b
foldModuleEnv f x (ModuleEnv e) = Map.foldRightWithKey (\_ v -> f v) x e | 128 | foldModuleEnv :: (a -> b -> b) -> b -> ModuleEnv a -> b
foldModuleEnv f x (ModuleEnv e) = Map.foldRightWithKey (\_ v -> f v) x e | 128 | foldModuleEnv f x (ModuleEnv e) = Map.foldRightWithKey (\_ v -> f v) x e | 72 | false | true | 0 | 8 | 27 | 78 | 37 | 41 | null | null |
JamesSullivan1/Mpp | src/MppSymbolTable.hs | mit | sym_returntype (S_Tab (l:ls,_,m)) = rtype l | 43 | sym_returntype (S_Tab (l:ls,_,m)) = rtype l | 43 | sym_returntype (S_Tab (l:ls,_,m)) = rtype l | 43 | false | false | 0 | 9 | 5 | 31 | 16 | 15 | null | null |
gereeter/bounded-intmap | src/Data/WordMap/Merge/Lazy.hs | mit | zipWithMaybeMatched :: Applicative f => (Key -> a -> b -> Maybe c) -> WhenMatched f a b c
zipWithMaybeMatched f = WhenMatched (\k a b -> pure (f k a b)) | 152 | zipWithMaybeMatched :: Applicative f => (Key -> a -> b -> Maybe c) -> WhenMatched f a b c
zipWithMaybeMatched f = WhenMatched (\k a b -> pure (f k a b)) | 152 | zipWithMaybeMatched f = WhenMatched (\k a b -> pure (f k a b)) | 62 | false | true | 0 | 11 | 31 | 80 | 39 | 41 | null | null |
seckcoder/vector | Data/Vector.hs | bsd-3-clause | headM = G.headM | 15 | headM = G.headM | 15 | headM = G.headM | 15 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
glguy/tt-ratings | LawSerialization.hs | bsd-3-clause | deserializeLaw :: String -> Maybe Law
deserializeLaw str =
case splitOn "," str of
meanStr:stddevStr:ps
| length ps == 361 -> do
let ds = fmap read ps
return $ Law { lawRaw = listArray (0,360) ds
, lawMean = read meanStr
, lawStddev = r... | 352 | deserializeLaw :: String -> Maybe Law
deserializeLaw str =
case splitOn "," str of
meanStr:stddevStr:ps
| length ps == 361 -> do
let ds = fmap read ps
return $ Law { lawRaw = listArray (0,360) ds
, lawMean = read meanStr
, lawStddev = r... | 352 | deserializeLaw str =
case splitOn "," str of
meanStr:stddevStr:ps
| length ps == 361 -> do
let ds = fmap read ps
return $ Law { lawRaw = listArray (0,360) ds
, lawMean = read meanStr
, lawStddev = read stddevStr }
_ -> Nothing | 314 | false | true | 0 | 15 | 138 | 126 | 60 | 66 | null | null |
tomas-stuina/fp | src/MExp.hs | bsd-3-clause | valuesToString (h:t) result = valuesToString t ((toString h) ++ result) | 71 | valuesToString (h:t) result = valuesToString t ((toString h) ++ result) | 71 | valuesToString (h:t) result = valuesToString t ((toString h) ++ result) | 71 | false | false | 0 | 9 | 9 | 36 | 18 | 18 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/TextureInteger.hs | bsd-3-clause | gl_ALPHA16UI :: GLenum
gl_ALPHA16UI = 0x8D78 | 44 | gl_ALPHA16UI :: GLenum
gl_ALPHA16UI = 0x8D78 | 44 | gl_ALPHA16UI = 0x8D78 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tsujigiri/gosh | src/ColorCodes.hs | mit | fgLightYellow :: String
fgLightYellow = esc "93" | 48 | fgLightYellow :: String
fgLightYellow = esc "93" | 48 | fgLightYellow = esc "93" | 24 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
achirkin/qua-kit | apps/hs/qua-server/src/Foundation.hs | mit | -- Note: Some functionality previously present in the scaffolding has been
-- moved to documentation in the Wiki. Following are some hopefully helpful
-- links:
--
-- https://github.com/yesodweb/yesod/wiki/Sending-email
-- https://github.com/yesodweb/yesod/wiki/Serve-static-files-from-a-separate-domain
-- https://githu... | 455 | muserRole :: Maybe (Entity User) -> UserRole
muserRole Nothing = UR_NOBODY | 74 | muserRole Nothing = UR_NOBODY | 29 | true | true | 2 | 6 | 44 | 33 | 19 | 14 | null | null |
tonyday567/web-play | src/Web/Play/Page.hs | mit | playWith :: PlayConfig -> Page
playWith pc =
playPageLibs (pc^.cPage.pagecLibs) <>
Page [] []
cssPlay
jsGlobalPlay
(jsOnloadPlay (pc^.cHandleStream) (pc^.cState) (pc^.cSocket))
mempty
(sectionPlay buttonsPlay (slidersPlay (pc^.cState.pSpeed)) (textsPlay 0)) | 273 | playWith :: PlayConfig -> Page
playWith pc =
playPageLibs (pc^.cPage.pagecLibs) <>
Page [] []
cssPlay
jsGlobalPlay
(jsOnloadPlay (pc^.cHandleStream) (pc^.cState) (pc^.cSocket))
mempty
(sectionPlay buttonsPlay (slidersPlay (pc^.cState.pSpeed)) (textsPlay 0)) | 273 | playWith pc =
playPageLibs (pc^.cPage.pagecLibs) <>
Page [] []
cssPlay
jsGlobalPlay
(jsOnloadPlay (pc^.cHandleStream) (pc^.cState) (pc^.cSocket))
mempty
(sectionPlay buttonsPlay (slidersPlay (pc^.cState.pSpeed)) (textsPlay 0)) | 242 | false | true | 0 | 11 | 42 | 121 | 59 | 62 | null | null |
rueshyna/gogol | gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Watch.hs | mpl-2.0 | -- | Token obtained from the nextSyncToken field returned on the last page of
-- results from the previous list request. It makes the result of this list
-- request contain only entries that have changed since then. All entries
-- deleted since the previous list request will always be in the result set
-- and it is not... | 749 | awSyncToken :: Lens' ACLWatch (Maybe Text)
awSyncToken
= lens _awSyncToken (\ s a -> s{_awSyncToken = a}) | 107 | awSyncToken
= lens _awSyncToken (\ s a -> s{_awSyncToken = a}) | 64 | true | true | 1 | 9 | 129 | 59 | 33 | 26 | null | null |
btipling/machine-vm | test/VMTest/Machine/ALU.hs | bsd-3-clause | aluNotOutTest :: HUnit.Test
aluNotOutTest = let
zx = toEnum 0
nx = toEnum 0
zy = toEnum 0
ny = toEnum 0
f = toEnum 0
no = toEnum 1
x = fmap toEnum [ 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 ]
y = fm... | 616 | aluNotOutTest :: HUnit.Test
aluNotOutTest = let
zx = toEnum 0
nx = toEnum 0
zy = toEnum 0
ny = toEnum 0
f = toEnum 0
no = toEnum 1
x = fmap toEnum [ 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 ]
y = fm... | 616 | aluNotOutTest = let
zx = toEnum 0
nx = toEnum 0
zy = toEnum 0
ny = toEnum 0
f = toEnum 0
no = toEnum 1
x = fmap toEnum [ 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1 ]
y = fmap toEnum [ 1, 1, 1, 1, 0... | 588 | false | true | 0 | 11 | 265 | 300 | 172 | 128 | null | null |
arianvp/binary-serialise-cbor | bench/Macro/Load.hs | bsd-3-clause | classifyArch :: String -> Arch
classifyArch s =
fromMaybe (OtherArch s) $ lookup (lowercase s) archMap
where
archMap = [ (display arch, arch)
| arch <- knownArches ] | 187 | classifyArch :: String -> Arch
classifyArch s =
fromMaybe (OtherArch s) $ lookup (lowercase s) archMap
where
archMap = [ (display arch, arch)
| arch <- knownArches ] | 187 | classifyArch s =
fromMaybe (OtherArch s) $ lookup (lowercase s) archMap
where
archMap = [ (display arch, arch)
| arch <- knownArches ] | 156 | false | true | 3 | 7 | 49 | 67 | 33 | 34 | null | null |
drhodes/jade2hdl | src/Jade/Common.hs | bsd-3-clause | silentBail :: J ()
silentBail = throwError ("" :: String) | 57 | silentBail :: J ()
silentBail = throwError ("" :: String) | 57 | silentBail = throwError ("" :: String) | 38 | false | true | 1 | 6 | 9 | 28 | 13 | 15 | null | null |
z0isch/advent-of-code | src/Day21.hs | bsd-3-clause | shopParser = Shop <$> sectionParser "Weapons:" <*> sectionParser "Armor:" <*> sectionParser "Rings:" | 100 | shopParser = Shop <$> sectionParser "Weapons:" <*> sectionParser "Armor:" <*> sectionParser "Rings:" | 100 | shopParser = Shop <$> sectionParser "Weapons:" <*> sectionParser "Armor:" <*> sectionParser "Rings:" | 100 | false | false | 0 | 8 | 11 | 27 | 12 | 15 | null | null |
infotroph/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | acute 'l' = "ĺ" | 15 | acute 'l' = "ĺ" | 15 | acute 'l' = "ĺ" | 15 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
kindaro/board | src/Main.hs | isc | myPoints :: [(GLfloat,GLfloat,GLfloat)]
myPoints = [ (sin (2*pi*k/120) * r, cos (2*pi*k/120) * r, 0) | k <- [1..120] ] | 118 | myPoints :: [(GLfloat,GLfloat,GLfloat)]
myPoints = [ (sin (2*pi*k/120) * r, cos (2*pi*k/120) * r, 0) | k <- [1..120] ] | 118 | myPoints = [ (sin (2*pi*k/120) * r, cos (2*pi*k/120) * r, 0) | k <- [1..120] ] | 78 | false | true | 0 | 13 | 19 | 99 | 52 | 47 | null | null |
rueshyna/gogol | gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs | mpl-2.0 | -- | The unique name for the predictive model.
insId :: Lens' Insert2 (Maybe Text)
insId = lens _insId (\ s a -> s{_insId = a}) | 127 | insId :: Lens' Insert2 (Maybe Text)
insId = lens _insId (\ s a -> s{_insId = a}) | 80 | insId = lens _insId (\ s a -> s{_insId = a}) | 44 | true | true | 0 | 9 | 25 | 46 | 25 | 21 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromTo_7.hs | mit | toEnum5 ww = toEnum4 (esEsMyInt ww (Pos Zero)) ww | 49 | toEnum5 ww = toEnum4 (esEsMyInt ww (Pos Zero)) ww | 49 | toEnum5 ww = toEnum4 (esEsMyInt ww (Pos Zero)) ww | 49 | false | false | 0 | 9 | 8 | 28 | 13 | 15 | null | null |
spatial-reasoning/zeno | src/Helpful/General.hs | bsd-2-clause | interweave x yys@(y:ys) = [x:yys] ++ map (y:) (interweave x ys) | 63 | interweave x yys@(y:ys) = [x:yys] ++ map (y:) (interweave x ys) | 63 | interweave x yys@(y:ys) = [x:yys] ++ map (y:) (interweave x ys) | 63 | false | false | 0 | 8 | 10 | 51 | 26 | 25 | null | null |
spatial-reasoning/zeno | src/Interface/Sparq/Server.hs | bsd-2-clause | readOneLine :: HandleStream String -> IO String
readOneLine handle = do
x <- readLine handle
case x of
Left err -> error $ "Connection to SparQ broken: " ++ (show err)
Right y -> return $ init y | 219 | readOneLine :: HandleStream String -> IO String
readOneLine handle = do
x <- readLine handle
case x of
Left err -> error $ "Connection to SparQ broken: " ++ (show err)
Right y -> return $ init y | 219 | readOneLine handle = do
x <- readLine handle
case x of
Left err -> error $ "Connection to SparQ broken: " ++ (show err)
Right y -> return $ init y | 171 | false | true | 0 | 12 | 62 | 80 | 36 | 44 | null | null |
k0001/gtk2hs | gtk/Graphics/UI/Gtk/ModelView/TreeStore.hs | gpl-3.0 | treeStoreClear :: TreeStore a -> IO ()
treeStoreClear (TreeStore model) = do
customStoreInvalidateIters model
Store { content = cache } <- readIORef (customStoreGetPrivate model)
let forest = cacheToStore cache
writeIORef (customStoreGetPrivate model) Store {
depth = calcForestDepth [],
content = st... | 641 | treeStoreClear :: TreeStore a -> IO ()
treeStoreClear (TreeStore model) = do
customStoreInvalidateIters model
Store { content = cache } <- readIORef (customStoreGetPrivate model)
let forest = cacheToStore cache
writeIORef (customStoreGetPrivate model) Store {
depth = calcForestDepth [],
content = st... | 641 | treeStoreClear (TreeStore model) = do
customStoreInvalidateIters model
Store { content = cache } <- readIORef (customStoreGetPrivate model)
let forest = cacheToStore cache
writeIORef (customStoreGetPrivate model) Store {
depth = calcForestDepth [],
content = storeToCache []
}
let loop (-1) = r... | 602 | false | true | 0 | 13 | 140 | 186 | 90 | 96 | null | null |
williamHuang5468/LearningHaskell | CH6 High Order Function/High Order Function.hs | mit | zipWith' :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith' _ [] _ = [] | 69 | zipWith' :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith' _ [] _ = [] | 67 | zipWith' _ [] _ = [] | 20 | false | true | 0 | 8 | 20 | 54 | 29 | 25 | null | null |
postgres-haskell/postgres-wire | src/Database/PostgreSQL/Protocol/DataRows.hs | mit | decodeOneRow :: Decode a -> DataRows -> a
decodeOneRow dec Empty = snd $ runDecode dec "" | 113 | decodeOneRow :: Decode a -> DataRows -> a
decodeOneRow dec Empty = snd $ runDecode dec "" | 113 | decodeOneRow dec Empty = snd $ runDecode dec "" | 71 | false | true | 0 | 6 | 40 | 41 | 18 | 23 | null | null |
jacekm-git/HsPredictor | executable/Main.hs | gpl-3.0 | currentHeader :: Int -> String
currentHeader col = case headerData !? col of
Nothing -> ""
Just x -> x | 107 | currentHeader :: Int -> String
currentHeader col = case headerData !? col of
Nothing -> ""
Just x -> x | 107 | currentHeader col = case headerData !? col of
Nothing -> ""
Just x -> x | 76 | false | true | 3 | 6 | 24 | 43 | 20 | 23 | null | null |
rueshyna/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Comments/Update.hs | mpl-2.0 | -- | The ID of the file.
cuFileId :: Lens' CommentsUpdate Text
cuFileId = lens _cuFileId (\ s a -> s{_cuFileId = a}) | 116 | cuFileId :: Lens' CommentsUpdate Text
cuFileId = lens _cuFileId (\ s a -> s{_cuFileId = a}) | 91 | cuFileId = lens _cuFileId (\ s a -> s{_cuFileId = a}) | 53 | true | true | 0 | 9 | 22 | 40 | 22 | 18 | null | null |
green-haskell/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | toInfoLbl l = pprPanic "CLabel.toInfoLbl" (ppr l) | 49 | toInfoLbl l = pprPanic "CLabel.toInfoLbl" (ppr l) | 49 | toInfoLbl l = pprPanic "CLabel.toInfoLbl" (ppr l) | 49 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
toddmohney/tweeter-bot | lib/Tweet/API/Twitter.hs | mit | tweet :: T.Text -> IO Web.Twitter.Types.Status
tweet t = do
twInfo <- ApiConfig.getTWInfoFromEnv
withManager $ \mgr -> TC.call twInfo mgr $ TC.update t | 161 | tweet :: T.Text -> IO Web.Twitter.Types.Status
tweet t = do
twInfo <- ApiConfig.getTWInfoFromEnv
withManager $ \mgr -> TC.call twInfo mgr $ TC.update t | 159 | tweet t = do
twInfo <- ApiConfig.getTWInfoFromEnv
withManager $ \mgr -> TC.call twInfo mgr $ TC.update t | 112 | false | true | 0 | 11 | 32 | 64 | 31 | 33 | null | null |
beni55/cabal | cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs | bsd-3-clause | -- | Convert a single source package into the solver-specific format.
convSP :: OS -> Arch -> CompilerInfo -> Bool -> SourcePackage -> (PN, I, PInfo)
convSP os arch cinfo strfl (SourcePackage (PackageIdentifier pn pv) gpd _ _pl) =
let i = I pv InRepo
in (pn, i, convGPD os arch cinfo strfl (PI pn i) gpd) | 309 | convSP :: OS -> Arch -> CompilerInfo -> Bool -> SourcePackage -> (PN, I, PInfo)
convSP os arch cinfo strfl (SourcePackage (PackageIdentifier pn pv) gpd _ _pl) =
let i = I pv InRepo
in (pn, i, convGPD os arch cinfo strfl (PI pn i) gpd) | 239 | convSP os arch cinfo strfl (SourcePackage (PackageIdentifier pn pv) gpd _ _pl) =
let i = I pv InRepo
in (pn, i, convGPD os arch cinfo strfl (PI pn i) gpd) | 159 | true | true | 0 | 10 | 61 | 118 | 61 | 57 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Organizations/Locations/StoredInfoTypes/List.hs | mpl-2.0 | -- | Comma separated list of fields to order by, followed by \`asc\` or
-- \`desc\` postfix. This list is case-insensitive, default sorting order
-- is ascending, redundant space characters are insignificant. Example:
-- \`name asc, display_name, create_time desc\` Supported fields are: -
-- \`create_time\`: correspond... | 705 | olsitlOrderBy :: Lens' OrganizationsLocationsStoredInfoTypesList (Maybe Text)
olsitlOrderBy
= lens _olsitlOrderBy
(\ s a -> s{_olsitlOrderBy = a}) | 154 | olsitlOrderBy
= lens _olsitlOrderBy
(\ s a -> s{_olsitlOrderBy = a}) | 76 | true | true | 1 | 9 | 107 | 59 | 32 | 27 | null | null |
jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/Upload.hs | gpl-3.0 | report :: Verbosity -> [Repo] -> Maybe Username -> Maybe Password -> IO ()
report verbosity repos mUsername mPassword = do
let uploadURI = if isOldHackageURI targetRepoURI
then legacyUploadURI
else targetRepoURI{uriPath = ""}
Username username <- maybe promptUsern... | 2,038 | report :: Verbosity -> [Repo] -> Maybe Username -> Maybe Password -> IO ()
report verbosity repos mUsername mPassword = do
let uploadURI = if isOldHackageURI targetRepoURI
then legacyUploadURI
else targetRepoURI{uriPath = ""}
Username username <- maybe promptUsern... | 2,038 | report verbosity repos mUsername mPassword = do
let uploadURI = if isOldHackageURI targetRepoURI
then legacyUploadURI
else targetRepoURI{uriPath = ""}
Username username <- maybe promptUsername return mUsername
Password password <- maybe promptPassword return... | 1,963 | false | true | 1 | 30 | 781 | 494 | 233 | 261 | null | null |
jaapweel/piffle | src/Syntax/PPrint.hs | gpl-2.0 | -- | (renderCompact x) renders document x without adding any
-- indentation. Since no 'pretty' printing is involved, this renderer
-- is very fast. The resulting output contains fewer characters as a
-- pretty printed version and can be used for output that is read by
-- other programs.
renderCompact :: Doc -> SimpleDo... | 1,181 | renderCompact :: Doc -> SimpleDoc
renderCompact x
= scan 0 [x]
where
scan _ [] = SEmpty
scan k (d:ds) = case d of
Empty -> scan k ds
Char c -> let k' = k+1 in seq k' (SChar c (scan k' ds))
Text l s -> let k'... | 893 | renderCompact x
= scan 0 [x]
where
scan _ [] = SEmpty
scan k (d:ds) = case d of
Empty -> scan k ds
Char c -> let k' = k+1 in seq k' (SChar c (scan k' ds))
Text l s -> let k' = k+l in seq k' (SText l s (scan ... | 859 | true | true | 0 | 16 | 496 | 331 | 161 | 170 | null | null |
brendanhay/gogol | gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/Delegates/Get.hs | mpl-2.0 | -- | V1 error format.
usdgXgafv :: Lens' UsersSettingsDelegatesGet (Maybe Xgafv)
usdgXgafv
= lens _usdgXgafv (\ s a -> s{_usdgXgafv = a}) | 139 | usdgXgafv :: Lens' UsersSettingsDelegatesGet (Maybe Xgafv)
usdgXgafv
= lens _usdgXgafv (\ s a -> s{_usdgXgafv = a}) | 117 | usdgXgafv
= lens _usdgXgafv (\ s a -> s{_usdgXgafv = a}) | 58 | true | true | 1 | 9 | 23 | 50 | 25 | 25 | null | null |
maxking/cs583-project | src/Bot.hs | gpl-3.0 | process2 :: String -> IO String
process2 m = case commandParser m of
Left error -> return $ show error
Right (Msg onlyMsg) -> return onlyMsg
Right (Cmd cmd args) -> runCommand cmd args
-- | Parse the message which contains either a command starting with ! o... | 333 | process2 :: String -> IO String
process2 m = case commandParser m of
Left error -> return $ show error
Right (Msg onlyMsg) -> return onlyMsg
Right (Cmd cmd args) -> runCommand cmd args
-- | Parse the message which contains either a command starting with ! o... | 333 | process2 m = case commandParser m of
Left error -> return $ show error
Right (Msg onlyMsg) -> return onlyMsg
Right (Cmd cmd args) -> runCommand cmd args
-- | Parse the message which contains either a command starting with ! or
-- anything | 301 | false | true | 0 | 10 | 112 | 86 | 40 | 46 | null | null |
paolino/medibox | Seq.hs | bsd-3-clause | updateTrack :: Controls -> TrackId -> Track -> Track
updateTrack m i (Track _ _ _ es ) = Track (readMorph i m ) (readDisplace i m) (readRepeat i m) es | 153 | updateTrack :: Controls -> TrackId -> Track -> Track
updateTrack m i (Track _ _ _ es ) = Track (readMorph i m ) (readDisplace i m) (readRepeat i m) es | 153 | updateTrack m i (Track _ _ _ es ) = Track (readMorph i m ) (readDisplace i m) (readRepeat i m) es | 99 | false | true | 0 | 7 | 33 | 75 | 37 | 38 | null | null |
keithodulaigh/Hets | PGIP/XMLparsing.hs | gpl-2.0 | processCommand :: [CmdlXMLcommands] -> Command -> CmdlState -> CmdlPgipState
-> IO (CmdlState, CmdlPgipState)
processCommand pl cmd st pgSt = do
nwSt <- cmdlProcessCmd cmd st
postProcessCmd pl nwSt pgSt (Just cmd)
-- postprocess a previously run command and recurse | 272 | processCommand :: [CmdlXMLcommands] -> Command -> CmdlState -> CmdlPgipState
-> IO (CmdlState, CmdlPgipState)
processCommand pl cmd st pgSt = do
nwSt <- cmdlProcessCmd cmd st
postProcessCmd pl nwSt pgSt (Just cmd)
-- postprocess a previously run command and recurse | 272 | processCommand pl cmd st pgSt = do
nwSt <- cmdlProcessCmd cmd st
postProcessCmd pl nwSt pgSt (Just cmd)
-- postprocess a previously run command and recurse | 160 | false | true | 0 | 11 | 45 | 80 | 39 | 41 | null | null |
balopat/quantum-computing | test/CalculationServiceSpec.hs | bsd-3-clause | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
remotty/cdr | frameworks/haskell/Test/CodeWars/BlackList.hs | agpl-3.0 | importDeclarationsHide decls hidden = not $ any (`importDeclImports` hidden) decls | 82 | importDeclarationsHide decls hidden = not $ any (`importDeclImports` hidden) decls | 82 | importDeclarationsHide decls hidden = not $ any (`importDeclImports` hidden) decls | 82 | false | false | 0 | 7 | 9 | 26 | 14 | 12 | null | null |
shlevy/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp _ [res] Pdep16Op [src, mask] = emitPdepCall res src mask W16 | 76 | emitPrimOp _ [res] Pdep16Op [src, mask] = emitPdepCall res src mask W16 | 76 | emitPrimOp _ [res] Pdep16Op [src, mask] = emitPdepCall res src mask W16 | 76 | false | false | 1 | 6 | 16 | 37 | 17 | 20 | null | null |
zearen-wover/haskelldb-template | Database/HaskellDB/Template.hs | bsd-3-clause | (.::) :: String -> TypeQ -> Field
(.::) = mkField | 49 | (.::) :: String -> TypeQ -> Field
(.::) = mkField | 49 | (.::) = mkField | 15 | false | true | 0 | 8 | 9 | 30 | 15 | 15 | null | null |
mrkgnao/tictactoe-minimax | Board.hs | mit | rows, cols, diags :: Board -> [[Cell]]
rows (Board cs) = chunks 3 cs | 68 | rows, cols, diags :: Board -> [[Cell]]
rows (Board cs) = chunks 3 cs | 68 | rows (Board cs) = chunks 3 cs | 29 | false | true | 0 | 7 | 13 | 39 | 22 | 17 | null | null |
shlevy/ghc | compiler/cmm/MkGraph.hs | bsd-3-clause | -- | created a closed AGraph from a given node
mkLast :: CmmNode O C -> CmmAGraph
mkLast last = unitOL (CgLast last) | 128 | mkLast :: CmmNode O C -> CmmAGraph
mkLast last = unitOL (CgLast last) | 81 | mkLast last = unitOL (CgLast last) | 38 | true | true | 0 | 7 | 34 | 38 | 17 | 21 | null | null |
NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter24/LogFileParser/src/LogFileParser.hs | mit | parseInt :: Parser Int
parseInt = fromInteger <$> integer | 57 | parseInt :: Parser Int
parseInt = fromInteger <$> integer | 57 | parseInt = fromInteger <$> integer | 34 | false | true | 0 | 6 | 8 | 24 | 10 | 14 | null | null |
pxqr/intset | src/Data/IntervalSet/Internal.hs | bsd-3-clause | insertFin p1 m1 (Fin p2 m2 ) -- TODO simplify
| isBuddy p1 m1 p2 m2 = Fin p1 (m1 * 2)
| isBuddy p2 m2 p1 m1 = Fin p2 (m1 * 2)
| properSubsetOf p1 m1 p2 m2 = Fin p2 m2
| properSubsetOf p2 m2 p1 m1 = Fin p1 m1
| m1 == m2 && p1 == p2 = Fin p1 m1
| otherwise = jo... | 352 | insertFin p1 m1 (Fin p2 m2 ) -- TODO simplify
| isBuddy p1 m1 p2 m2 = Fin p1 (m1 * 2)
| isBuddy p2 m2 p1 m1 = Fin p2 (m1 * 2)
| properSubsetOf p1 m1 p2 m2 = Fin p2 m2
| properSubsetOf p2 m2 p1 m1 = Fin p1 m1
| m1 == m2 && p1 == p2 = Fin p1 m1
| otherwise = jo... | 352 | insertFin p1 m1 (Fin p2 m2 ) -- TODO simplify
| isBuddy p1 m1 p2 m2 = Fin p1 (m1 * 2)
| isBuddy p2 m2 p1 m1 = Fin p2 (m1 * 2)
| properSubsetOf p1 m1 p2 m2 = Fin p2 m2
| properSubsetOf p2 m2 p1 m1 = Fin p1 m1
| m1 == m2 && p1 == p2 = Fin p1 m1
| otherwise = jo... | 352 | false | false | 4 | 10 | 138 | 179 | 86 | 93 | null | null |
wavewave/chatter | src/client.hs | bsd-3-clause | clientReceiver :: TVar [Message] -> String -> String -> IO ()
clientReceiver logvar ipaddrstr username =
connect ipaddrstr "5002" $ \(sock,addr) -> do
putStrLn $ "Connection established to " ++ show addr
flip evalStateT 0 $ whileJust_ (lift (recvAndUnpack sock)) $ \xs ->
if null xs
then ret... | 519 | clientReceiver :: TVar [Message] -> String -> String -> IO ()
clientReceiver logvar ipaddrstr username =
connect ipaddrstr "5002" $ \(sock,addr) -> do
putStrLn $ "Connection established to " ++ show addr
flip evalStateT 0 $ whileJust_ (lift (recvAndUnpack sock)) $ \xs ->
if null xs
then ret... | 519 | clientReceiver logvar ipaddrstr username =
connect ipaddrstr "5002" $ \(sock,addr) -> do
putStrLn $ "Connection established to " ++ show addr
flip evalStateT 0 $ whileJust_ (lift (recvAndUnpack sock)) $ \xs ->
if null xs
then return ()
else do n <- get
let n' = check... | 457 | false | true | 2 | 17 | 172 | 189 | 86 | 103 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |('Seq.<|')
seq_cons = (Seq.<|) | 34 | seq_cons = (Seq.<|) | 19 | seq_cons = (Seq.<|) | 19 | true | false | 0 | 5 | 4 | 11 | 7 | 4 | null | null |
SFML-haskell/SFML | src/SFML/Audio/SoundRecorder.hs | mit | --CSFML_AUDIO_API const char** sfSoundRecorder_getAvailableDevices(size_t* count);
-- | Get the name of the default audio capture device.
--
-- This function returns the name of the default audio
-- capture device. If none is available, NULL is returned.
getDefaultSoundRecordingDevice :: IO String
getDefaultSoundRec... | 383 | getDefaultSoundRecordingDevice :: IO String
getDefaultSoundRecordingDevice = sfSoundRecorder_getDefaultDevice >>= peekCString | 125 | getDefaultSoundRecordingDevice = sfSoundRecorder_getDefaultDevice >>= peekCString | 81 | true | true | 0 | 5 | 48 | 23 | 14 | 9 | null | null |
brendanhay/gogol | gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Update.hs | mpl-2.0 | -- | The specific id of the configuration to update.
pcuConfigId :: Lens' PretargetingConfigUpdate Int64
pcuConfigId
= lens _pcuConfigId (\ s a -> s{_pcuConfigId = a}) .
_Coerce | 185 | pcuConfigId :: Lens' PretargetingConfigUpdate Int64
pcuConfigId
= lens _pcuConfigId (\ s a -> s{_pcuConfigId = a}) .
_Coerce | 132 | pcuConfigId
= lens _pcuConfigId (\ s a -> s{_pcuConfigId = a}) .
_Coerce | 80 | true | true | 0 | 10 | 35 | 46 | 24 | 22 | null | null |
li-zhirui/EoplLangs | src/ThreadsLang/Evaluator.hs | bsd-3-clause | getRef :: Environment -> String -> IOTry Ref
getRef env name = case apply env name of
Just (DenoRef ref) -> return ref
Nothing -> throwError $ UnboundVar name | 173 | getRef :: Environment -> String -> IOTry Ref
getRef env name = case apply env name of
Just (DenoRef ref) -> return ref
Nothing -> throwError $ UnboundVar name | 173 | getRef env name = case apply env name of
Just (DenoRef ref) -> return ref
Nothing -> throwError $ UnboundVar name | 128 | false | true | 0 | 10 | 43 | 71 | 32 | 39 | null | null |
tdammers/templar | test/Web/Sprinkles/PatternTest.hs | bsd-3-clause | parseNamedAnyMultiTest =
testCase "parse named Any" $ do
let src = "/{{who:**}}"
expected = Right $ Pattern
[ PatternPathItem (Just "who") Any MatchMany
]
[]
actual = parsePattern src
assertEqual "" expec... | 330 | parseNamedAnyMultiTest =
testCase "parse named Any" $ do
let src = "/{{who:**}}"
expected = Right $ Pattern
[ PatternPathItem (Just "who") Any MatchMany
]
[]
actual = parsePattern src
assertEqual "" expec... | 330 | parseNamedAnyMultiTest =
testCase "parse named Any" $ do
let src = "/{{who:**}}"
expected = Right $ Pattern
[ PatternPathItem (Just "who") Any MatchMany
]
[]
actual = parsePattern src
assertEqual "" expec... | 330 | false | false | 0 | 16 | 148 | 72 | 34 | 38 | null | null |
mimi1vx/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkSpacefulness25= verifyTree checkSpacefulness "a='s/[0-9]//g'; sed $a" | 79 | prop_checkSpacefulness25= verifyTree checkSpacefulness "a='s/[0-9]//g'; sed $a" | 79 | prop_checkSpacefulness25= verifyTree checkSpacefulness "a='s/[0-9]//g'; sed $a" | 79 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
kawu/partage | src/NLP/Partage/AStar.hs | bsd-2-clause | fromActive
:: (Ord n, Ord t)
=> Active
-> Hype n t
-> [[T.Tree n (Maybe (Tok t))]]
fromActive active hype =
case activeTrav active hype of
-- Nothing -> error "fromActive: unknown active item"
Nothing -> case Q.lookup (ItemA active) (waiting hype) of
Just _ -> error $
"fromActive: act... | 1,418 | fromActive
:: (Ord n, Ord t)
=> Active
-> Hype n t
-> [[T.Tree n (Maybe (Tok t))]]
fromActive active hype =
case activeTrav active hype of
-- Nothing -> error "fromActive: unknown active item"
Nothing -> case Q.lookup (ItemA active) (waiting hype) of
Just _ -> error $
"fromActive: act... | 1,418 | fromActive active hype =
case activeTrav active hype of
-- Nothing -> error "fromActive: unknown active item"
Nothing -> case Q.lookup (ItemA active) (waiting hype) of
Just _ -> error $
"fromActive: active item in the waiting queue"
++ "\n" ++ show active
Nothing -> error $
... | 1,327 | false | true | 5 | 16 | 469 | 487 | 238 | 249 | null | null |
conal/hermit | examples/IFL2012/Fib.hs | bsd-2-clause | main :: IO ()
main = print $ toInt $ fib $ fromInt 30 | 53 | main :: IO ()
main = print $ toInt $ fib $ fromInt 30 | 53 | main = print $ toInt $ fib $ fromInt 30 | 39 | false | true | 1 | 7 | 13 | 34 | 15 | 19 | null | null |
lamdu/lamdu | src/Lamdu/GUI/Expr/FragmentEdit.hs | gpl-3.0 | makeFragOperator :: _ => ExprGui.Body Sugar.FragOperator i o -> GuiM env i o (Responsive o)
makeFragOperator (Sugar.FragOperator f rArg aArgs) =
(Options.boxSpaced ?? Options.disambiguationNone) <*>
sequenceA
( ((Options.boxSpaced ?? Options.disambiguationNone) <*>
sequenceA
[ GetVarEdit.mak... | 470 | makeFragOperator :: _ => ExprGui.Body Sugar.FragOperator i o -> GuiM env i o (Responsive o)
makeFragOperator (Sugar.FragOperator f rArg aArgs) =
(Options.boxSpaced ?? Options.disambiguationNone) <*>
sequenceA
( ((Options.boxSpaced ?? Options.disambiguationNone) <*>
sequenceA
[ GetVarEdit.mak... | 470 | makeFragOperator (Sugar.FragOperator f rArg aArgs) =
(Options.boxSpaced ?? Options.disambiguationNone) <*>
sequenceA
( ((Options.boxSpaced ?? Options.disambiguationNone) <*>
sequenceA
[ GetVarEdit.make GetVarEdit.Operator f
, GuiM.makeSubexpression rArg
])
: (aArgs <&... | 378 | false | true | 0 | 14 | 103 | 145 | 72 | 73 | null | null |
Garygunn94/DFS | TransactionServer/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/autogen/Paths_TransactionServer.hs | bsd-3-clause | dynlibdir = "/home/ggunn/DFS/TransactionServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/lib/x86_64-linux-ghc-8.0.1" | 123 | dynlibdir = "/home/ggunn/DFS/TransactionServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/lib/x86_64-linux-ghc-8.0.1" | 123 | dynlibdir = "/home/ggunn/DFS/TransactionServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/lib/x86_64-linux-ghc-8.0.1" | 123 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
jsnajder/fer3-catalogue | src/fer3.hs | bsd-3-clause | subtreesTree :: Tree a -> Tree (Tree a)
subtreesTree n@(Node _ ns) = Node n (map subtreesTree ns) | 97 | subtreesTree :: Tree a -> Tree (Tree a)
subtreesTree n@(Node _ ns) = Node n (map subtreesTree ns) | 97 | subtreesTree n@(Node _ ns) = Node n (map subtreesTree ns) | 57 | false | true | 3 | 7 | 17 | 57 | 27 | 30 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/xhtml/Text/XHtml/Frameset/Attributes.hs | bsd-3-clause | marginheight :: Int -> HtmlAttr
marginheight = intAttr "marginheight" | 88 | marginheight :: Int -> HtmlAttr
marginheight = intAttr "marginheight" | 88 | marginheight = intAttr "marginheight" | 46 | false | true | 0 | 5 | 27 | 18 | 9 | 9 | null | null |
PhDP/Sphinx-AI | Faun/FOL.hs | mit | allAss :: Set FOL -> [Map Predicate Bool]
allAss fs = if null as then [] else ms (head as) (tail as)
where
as = Set.toList $ Set.foldr Set.union Set.empty $ Set.map atoms fs
ms atm s =
if null s then
[Map.fromList [(atm, True)], Map.fromList [(atm, False)]]
else
map (Map.insert atm... | 446 | allAss :: Set FOL -> [Map Predicate Bool]
allAss fs = if null as then [] else ms (head as) (tail as)
where
as = Set.toList $ Set.foldr Set.union Set.empty $ Set.map atoms fs
ms atm s =
if null s then
[Map.fromList [(atm, True)], Map.fromList [(atm, False)]]
else
map (Map.insert atm... | 446 | allAss fs = if null as then [] else ms (head as) (tail as)
where
as = Set.toList $ Set.foldr Set.union Set.empty $ Set.map atoms fs
ms atm s =
if null s then
[Map.fromList [(atm, True)], Map.fromList [(atm, False)]]
else
map (Map.insert atm True) (ms (head s) (tail s)) ++
... | 404 | false | true | 4 | 9 | 121 | 243 | 115 | 128 | null | null |
gencer/bond | compiler/src/Language/Bond/Codegen/TypeMapping.hs | mit | csType :: Type -> TypeNameBuilder
csType BT_Int8 = pure "sbyte" | 63 | csType :: Type -> TypeNameBuilder
csType BT_Int8 = pure "sbyte" | 63 | csType BT_Int8 = pure "sbyte" | 29 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
MateVM/harpy | Harpy/X86CodeGen.hs | gpl-2.0 | x86_min_sse_reg_membase :: X86_SSE_PFX -> Word8 -> Word8 -> Word32 -> CodeGen e s ()
x86_min_sse_reg_membase pfx dreg basereg disp =
do emit_sse pfx
emit8 0x0f
emit8 0x5d
x86_membase_emit dreg basereg disp | 230 | x86_min_sse_reg_membase :: X86_SSE_PFX -> Word8 -> Word8 -> Word32 -> CodeGen e s ()
x86_min_sse_reg_membase pfx dreg basereg disp =
do emit_sse pfx
emit8 0x0f
emit8 0x5d
x86_membase_emit dreg basereg disp | 230 | x86_min_sse_reg_membase pfx dreg basereg disp =
do emit_sse pfx
emit8 0x0f
emit8 0x5d
x86_membase_emit dreg basereg disp | 145 | false | true | 0 | 10 | 55 | 73 | 32 | 41 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_SQL_USER3 :: Int
wxSTC_SQL_USER3 = 21 | 43 | wxSTC_SQL_USER3 :: Int
wxSTC_SQL_USER3 = 21 | 43 | wxSTC_SQL_USER3 = 21 | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
mightybyte/reflex-dom | reflex-dom-core/src/Reflex/Dom/WebSocket/Query.hs | bsd-3-clause | runWebSocketQuery :: (MonadJSM m, MonadJSM (Performable m), HasJSContext m, PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, Reflex t, ToJSON q, MonadFix m, Query q, FromJSON (QueryResult q), Additive q, Group q, Eq q)
=> QueryT t q m a
-> Text -- ^ WebSocket url
... | 665 | runWebSocketQuery :: (MonadJSM m, MonadJSM (Performable m), HasJSContext m, PostBuild t m, TriggerEvent t m, PerformEvent t m, MonadHold t m, Reflex t, ToJSON q, MonadFix m, Query q, FromJSON (QueryResult q), Additive q, Group q, Eq q)
=> QueryT t q m a
-> Text -- ^ WebSocket url
... | 665 | runWebSocketQuery app url = do
postBuild <- getPostBuild
rec ws <- jsonWebSocket url $ def { _webSocketConfig_send = pure <$> updatedRequest }
(a, request) <- cropQueryT app $ fromMaybe mempty <$> _webSocket_recv ws
let updatedRequest = leftmost [updated request, tag (current request) postBuild]
retur... | 323 | false | true | 5 | 17 | 169 | 266 | 123 | 143 | null | null |
romanb/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/CopySnapshot.hs | mpl-2.0 | -- | A name for the copied snapshot.
csTargetSnapshotName :: Lens' CopySnapshot Text
csTargetSnapshotName =
lens _csTargetSnapshotName (\s a -> s { _csTargetSnapshotName = a }) | 180 | csTargetSnapshotName :: Lens' CopySnapshot Text
csTargetSnapshotName =
lens _csTargetSnapshotName (\s a -> s { _csTargetSnapshotName = a }) | 143 | csTargetSnapshotName =
lens _csTargetSnapshotName (\s a -> s { _csTargetSnapshotName = a }) | 95 | true | true | 0 | 9 | 29 | 40 | 22 | 18 | null | null |
ksallberg/adventofcode | 2015/src/Day9.hs | bsd-2-clause | calc :: Int
calc = head $
reverse $
sort $
map fromJust (filter (/=Nothing) (map step paths)) | 114 | calc :: Int
calc = head $
reverse $
sort $
map fromJust (filter (/=Nothing) (map step paths)) | 114 | calc = head $
reverse $
sort $
map fromJust (filter (/=Nothing) (map step paths)) | 102 | false | true | 0 | 10 | 38 | 48 | 25 | 23 | null | null |
rueshyna/gogol | gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs | mpl-2.0 | -- | What exchange will provide this inventory (readonly, except on create).
pInventorySource :: Lens' Proposal (Maybe Text)
pInventorySource
= lens _pInventorySource
(\ s a -> s{_pInventorySource = a}) | 210 | pInventorySource :: Lens' Proposal (Maybe Text)
pInventorySource
= lens _pInventorySource
(\ s a -> s{_pInventorySource = a}) | 133 | pInventorySource
= lens _pInventorySource
(\ s a -> s{_pInventorySource = a}) | 85 | true | true | 1 | 9 | 36 | 51 | 25 | 26 | null | null |
brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/WorkerPools/List.hs | mpl-2.0 | -- | JSONP
plwplCallback :: Lens' ProjectsLocationsWorkerPoolsList (Maybe Text)
plwplCallback
= lens _plwplCallback
(\ s a -> s{_plwplCallback = a}) | 156 | plwplCallback :: Lens' ProjectsLocationsWorkerPoolsList (Maybe Text)
plwplCallback
= lens _plwplCallback
(\ s a -> s{_plwplCallback = a}) | 145 | plwplCallback
= lens _plwplCallback
(\ s a -> s{_plwplCallback = a}) | 76 | true | true | 0 | 9 | 27 | 48 | 25 | 23 | null | null |
leshchevds/ganeti | src/Ganeti/Locking/Locks.hs | bsd-2-clause | -- | Provide the String representation of a lock
lockName :: GanetiLocks -> String
lockName BGL = "cluster/BGL" | 111 | lockName :: GanetiLocks -> String
lockName BGL = "cluster/BGL" | 62 | lockName BGL = "cluster/BGL" | 28 | true | true | 0 | 5 | 17 | 19 | 10 | 9 | null | null |
d3alek/SudokuH | CSPframework.hs | bsd-2-clause | ---------------------------
-- Assignment functions. --
---------------------------
-- Checks if a given assignment is complete for a CSP.
is_complete :: CSP -> Assignment -> Bool
is_complete csp assignment = all (\v -> not $ is_unassigned assignment v) $ vars_of csp | 268 | is_complete :: CSP -> Assignment -> Bool
is_complete csp assignment = all (\v -> not $ is_unassigned assignment v) $ vars_of csp | 128 | is_complete csp assignment = all (\v -> not $ is_unassigned assignment v) $ vars_of csp | 87 | true | true | 0 | 10 | 39 | 55 | 29 | 26 | null | null |
kawamuray/ganeti | src/Ganeti/Logging.hs | gpl-2.0 | -- | Builds the log formatter.
logFormatter :: String -- ^ Program
-> Bool -- ^ Multithreaded
-> Bool -- ^ Syslog
-> LogFormatter a
logFormatter prog mt syslog =
let parts = [ if syslog
then "[$pid]:"
else "$time: " ++ prog ++ " pid=$pi... | 508 | logFormatter :: String -- ^ Program
-> Bool -- ^ Multithreaded
-> Bool -- ^ Syslog
-> LogFormatter a
logFormatter prog mt syslog =
let parts = [ if syslog
then "[$pid]:"
else "$time: " ++ prog ++ " pid=$pid"
, if mt then i... | 477 | logFormatter prog mt syslog =
let parts = [ if syslog
then "[$pid]:"
else "$time: " ++ prog ++ " pid=$pid"
, if mt then if syslog then " ($tid)" else "/$tid"
else ""
, " $prio $msg"
]
in tfLogFormatter "%F %X,%q %Z" $ co... | 330 | true | true | 0 | 12 | 217 | 99 | 54 | 45 | null | null |
phischu/fragnix | tests/packages/scotty/Web.Scotty.Action.hs | bsd-3-clause | -- | Finish the execution of the current action. Like throwing an uncatchable
-- exception. Any code after the call to finish will not be run.
--
-- /Since: 0.10.3/
finish :: (ScottyError e, Monad m) => ActionT e m a
finish = throwError Finish | 243 | finish :: (ScottyError e, Monad m) => ActionT e m a
finish = throwError Finish | 78 | finish = throwError Finish | 26 | true | true | 0 | 7 | 44 | 46 | 23 | 23 | null | null |
DanielRS/marquee | src/Text/Marquee/Writers/HTML.hs | mit | writeInline (LineBreak) = toHtml (" " :: String) | 62 | writeInline (LineBreak) = toHtml (" " :: String) | 62 | writeInline (LineBreak) = toHtml (" " :: String) | 62 | false | false | 0 | 6 | 21 | 21 | 11 | 10 | null | null |
ggreif/clash-compiler | examples/i2c/I2C/Slave.hs | bsd-2-clause | bsTest = mapM_ print (sampleN 230 bsTest') | 42 | bsTest = mapM_ print (sampleN 230 bsTest') | 42 | bsTest = mapM_ print (sampleN 230 bsTest') | 42 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
Ketouem/learn-you-a-haskell | src/chapter-6-modules/geometry.hs | unlicense | sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2) | 70 | sphereArea :: Float -> Float
sphereArea radius = 4 * pi * (radius ^ 2) | 70 | sphereArea radius = 4 * pi * (radius ^ 2) | 41 | false | true | 0 | 7 | 14 | 33 | 17 | 16 | null | null |
zsol/visual-graphrewrite | GraphRewrite/Internal/RewriteApp.hs | bsd-3-clause | makeExpr (SH.Cons c) = SCons c | 30 | makeExpr (SH.Cons c) = SCons c | 30 | makeExpr (SH.Cons c) = SCons c | 30 | false | false | 0 | 7 | 5 | 21 | 9 | 12 | null | null |
kazu-yamamoto/network-uri | Network/URI.hs | bsd-3-clause | ------------------------------------------------------------
-- Resolving a relative URI relative to a base URI
------------------------------------------------------------
-- |Returns a new 'URI' which represents the value of the
-- first 'URI' interpreted as relative to the second 'URI'.
-- For example:
--
-- > "... | 729 | nonStrictRelativeTo :: URI -> URI -> URI
nonStrictRelativeTo ref base = relativeTo ref' base
where
ref' = if uriScheme ref == uriScheme base
then ref { uriScheme="" }
else ref | 217 | nonStrictRelativeTo ref base = relativeTo ref' base
where
ref' = if uriScheme ref == uriScheme base
then ref { uriScheme="" }
else ref | 176 | true | true | 0 | 7 | 138 | 75 | 44 | 31 | null | null |
andyarvanitis/idris-golang | src/IRTS/CodegenGo.hs | bsd-2-clause | conTy = "Con" | 20 | conTy = "Con" | 20 | conTy = "Con" | 20 | false | false | 1 | 5 | 9 | 10 | 3 | 7 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Delete.hs | mpl-2.0 | -- | ID of the account which the given web property belongs to.
mwpawldAccountId :: Lens' ManagementWebPropertyAdWordsLinksDelete Text
mwpawldAccountId
= lens _mwpawldAccountId
(\ s a -> s{_mwpawldAccountId = a}) | 220 | mwpawldAccountId :: Lens' ManagementWebPropertyAdWordsLinksDelete Text
mwpawldAccountId
= lens _mwpawldAccountId
(\ s a -> s{_mwpawldAccountId = a}) | 156 | mwpawldAccountId
= lens _mwpawldAccountId
(\ s a -> s{_mwpawldAccountId = a}) | 85 | true | true | 0 | 9 | 36 | 42 | 22 | 20 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-example/Drasil/SSP/Unitals.hs | bsd-2-clause | yMaxSlip = uq (constrained' (makeUCWDS "y_slip^max"
(nounPhraseSent $ S "maximum" +:+ phrase yCoord)
(S "the maximum potential" +:+ phrase yCoord `sOf` S "a point on a slip surface")
(supMax (sub lY lSlip)) metre) [] (dbl 30)) defaultUncrt | 245 | yMaxSlip = uq (constrained' (makeUCWDS "y_slip^max"
(nounPhraseSent $ S "maximum" +:+ phrase yCoord)
(S "the maximum potential" +:+ phrase yCoord `sOf` S "a point on a slip surface")
(supMax (sub lY lSlip)) metre) [] (dbl 30)) defaultUncrt | 245 | yMaxSlip = uq (constrained' (makeUCWDS "y_slip^max"
(nounPhraseSent $ S "maximum" +:+ phrase yCoord)
(S "the maximum potential" +:+ phrase yCoord `sOf` S "a point on a slip surface")
(supMax (sub lY lSlip)) metre) [] (dbl 30)) defaultUncrt | 245 | false | false | 1 | 13 | 42 | 100 | 47 | 53 | null | null |
ocharles/hs-quake-3 | Quake3/Shader/TypeCheck.hs | bsd-3-clause | tcInstruction (Parser.ShaderOp (Parser.Op "light" [_])) =
-- Quake 3 source says:
-- // light <value> determines flaring in q3map, not needed here
mempty | 161 | tcInstruction (Parser.ShaderOp (Parser.Op "light" [_])) =
-- Quake 3 source says:
-- // light <value> determines flaring in q3map, not needed here
mempty | 161 | tcInstruction (Parser.ShaderOp (Parser.Op "light" [_])) =
-- Quake 3 source says:
-- // light <value> determines flaring in q3map, not needed here
mempty | 161 | false | false | 0 | 9 | 30 | 33 | 17 | 16 | null | null |
moonKimura/vector-0.10.9.1 | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | enumFromThenTo x y z = fromList [x, y .. z] | 43 | enumFromThenTo x y z = fromList [x, y .. z] | 43 | enumFromThenTo x y z = fromList [x, y .. z] | 43 | false | false | 1 | 6 | 9 | 30 | 13 | 17 | null | null |
seL4/capDL-tool | CapDL/PrintC.hs | bsd-2-clause | showCap _ IRQControlCap _ _ _ = "{.type = CDL_IRQControlCap}" | 61 | showCap _ IRQControlCap _ _ _ = "{.type = CDL_IRQControlCap}" | 61 | showCap _ IRQControlCap _ _ _ = "{.type = CDL_IRQControlCap}" | 61 | false | false | 0 | 5 | 9 | 17 | 8 | 9 | null | null |
DanielRS/marquee | src/Text/Marquee/Writers/HTML.hs | mit | writeElement (OrderedList x)
| first /= 1 = ol ! start (toValue first) $ forM_ x (li . writeNestedHtml . snd)
| otherwise = ol $ forM_ x (li . writeNestedHtml . snd)
where first = fst . Prelude.head $ x | 242 | writeElement (OrderedList x)
| first /= 1 = ol ! start (toValue first) $ forM_ x (li . writeNestedHtml . snd)
| otherwise = ol $ forM_ x (li . writeNestedHtml . snd)
where first = fst . Prelude.head $ x | 242 | writeElement (OrderedList x)
| first /= 1 = ol ! start (toValue first) $ forM_ x (li . writeNestedHtml . snd)
| otherwise = ol $ forM_ x (li . writeNestedHtml . snd)
where first = fst . Prelude.head $ x | 242 | false | false | 1 | 10 | 80 | 104 | 50 | 54 | null | null |
philipcraig/hutton | src/Exercises/Countdown.hs | bsd-3-clause | valid Div x y = x `mod` y == 0 | 30 | valid Div x y = x `mod` y == 0 | 30 | valid Div x y = x `mod` y == 0 | 30 | false | false | 0 | 6 | 9 | 23 | 12 | 11 | null | null |
AlbinTheander/oden | src/Oden/Explode.hs | mit | explodeExpr' (If si c t f) =
Untyped.If (Metadata si) <$> explodeExpr' c <*> explodeExpr' t <*> explodeExpr' f | 112 | explodeExpr' (If si c t f) =
Untyped.If (Metadata si) <$> explodeExpr' c <*> explodeExpr' t <*> explodeExpr' f | 112 | explodeExpr' (If si c t f) =
Untyped.If (Metadata si) <$> explodeExpr' c <*> explodeExpr' t <*> explodeExpr' f | 112 | false | false | 0 | 10 | 20 | 53 | 24 | 29 | null | null |
brendanhay/gogol | gogol-plus/gen/Network/Google/Plus/Types/Product.hs | mpl-2.0 | -- | ETag of this response for caching purposes.
actEtag :: Lens' Activity (Maybe Text)
actEtag = lens _actEtag (\ s a -> s{_actEtag = a}) | 138 | actEtag :: Lens' Activity (Maybe Text)
actEtag = lens _actEtag (\ s a -> s{_actEtag = a}) | 89 | actEtag = lens _actEtag (\ s a -> s{_actEtag = a}) | 50 | true | true | 1 | 9 | 25 | 49 | 25 | 24 | null | null |
christiaanb/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | ordClassKey = mkPreludeClassUnique 12 | 49 | ordClassKey = mkPreludeClassUnique 12 | 49 | ordClassKey = mkPreludeClassUnique 12 | 49 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.