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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
reactormonk/hoauth2 | example/Facebook/test.hs | bsd-3-clause | --------------------------------------------------
main :: IO ()
main = do
print $ serializeURIRef' $ appendQueryParams facebookScope $ authorizationUrl facebookKey
putStrLn "visit the url and paste code here: "
code <- getLine
mgr <- newManager tlsManagerSettings
let (url, body) = accessTokenUrl ... | 810 | main :: IO ()
main = do
print $ serializeURIRef' $ appendQueryParams facebookScope $ authorizationUrl facebookKey
putStrLn "visit the url and paste code here: "
code <- getLine
mgr <- newManager tlsManagerSettings
let (url, body) = accessTokenUrl facebookKey $ ExchangeToken $ pack $ code
resp <... | 758 | main = do
print $ serializeURIRef' $ appendQueryParams facebookScope $ authorizationUrl facebookKey
putStrLn "visit the url and paste code here: "
code <- getLine
mgr <- newManager tlsManagerSettings
let (url, body) = accessTokenUrl facebookKey $ ExchangeToken $ pack $ code
resp <- doJSONPostRe... | 744 | true | true | 0 | 13 | 205 | 183 | 87 | 96 | null | null |
mcschroeder/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | tidyTopPair :: DynFlags
-> Bool -- show unfolding
-> TidyEnv -- The TidyEnv is used to tidy the IdInfo
-- It is knot-tied: don't look at it!
-> CafInfo
-> Name -- New name
-> (Id, CoreExpr) -- Binder and RHS before tidyi... | 1,696 | tidyTopPair :: DynFlags
-> Bool -- show unfolding
-> TidyEnv -- The TidyEnv is used to tidy the IdInfo
-- It is knot-tied: don't look at it!
-> CafInfo
-> Name -- New name
-> (Id, CoreExpr) -- Binder and RHS before tidyi... | 1,398 | tidyTopPair dflags show_unfold rhs_tidy_env caf_info name' (bndr, rhs)
= (bndr1, rhs1)
where
bndr1 = mkGlobalId details name' ty' idinfo'
details = idDetails bndr -- Preserve the IdDetails
ty' = tidyTopType (idType bndr)
rhs1 = tidyExpr rhs_tidy_env rhs
idinfo' = tidyTopIdInfo df... | 1,045 | true | true | 0 | 11 | 509 | 172 | 101 | 71 | null | null |
EarlDolphin/Learn-You-A-Haskell | ch2/lizt/Lizt.hs | bsd-3-clause | elem' e (x:xs) = if (e == x) then True else elem' e xs | 54 | elem' e (x:xs) = if (e == x) then True else elem' e xs | 54 | elem' e (x:xs) = if (e == x) then True else elem' e xs | 54 | false | false | 0 | 7 | 13 | 38 | 20 | 18 | null | null |
cbrghostrider/Hacking | HackerRank/FunctionalProgramming/Recursion/cellular_automata_memoize.hs | mit | --------------------------------------------------------------------------
-- I/O, Main section, etc.
--------------------------------------------------------------------------
runTestCases :: [TreeCA] -> RuleCA -> Int -> Int -> IO ()
runTestCases _ _ 0 _ = return () | 289 | runTestCases :: [TreeCA] -> RuleCA -> Int -> Int -> IO ()
runTestCases _ _ 0 _ = return () | 90 | runTestCases _ _ 0 _ = return () | 32 | true | true | 0 | 10 | 48 | 52 | 27 | 25 | null | null |
ahodgen/qualys | Qualys/Internal.hs | bsd-3-clause | -- | Qualys US Platform 1
qualysUSPlatform1 :: QualysPlatform
qualysUSPlatform1 = QualysPlatform "qualysapi.qualys.com" | 119 | qualysUSPlatform1 :: QualysPlatform
qualysUSPlatform1 = QualysPlatform "qualysapi.qualys.com" | 93 | qualysUSPlatform1 = QualysPlatform "qualysapi.qualys.com" | 57 | true | true | 0 | 5 | 12 | 15 | 8 | 7 | null | null |
dylanmc/cryptol | src/Cryptol/Eval/Value.hs | bsd-3-clause | fromWord :: Value -> Integer
fromWord val = mask w a
where
(w,a) = fromVWord val
-- | Extract a function from a value. | 123 | fromWord :: Value -> Integer
fromWord val = mask w a
where
(w,a) = fromVWord val
-- | Extract a function from a value. | 123 | fromWord val = mask w a
where
(w,a) = fromVWord val
-- | Extract a function from a value. | 94 | false | true | 0 | 5 | 28 | 42 | 21 | 21 | null | null |
lueck/htcf | src/HTCF/TcfParserTypeDefs.hs | gpl-3.0 | getTextLength (TcfStructure _ _ l _ _) = l | 42 | getTextLength (TcfStructure _ _ l _ _) = l | 42 | getTextLength (TcfStructure _ _ l _ _) = l | 42 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailEditor/Interpreter.hs | mit | isLambda :: TAC.RailType -> Bool
isLambda TAC.RailLambda{} = True | 67 | isLambda :: TAC.RailType -> Bool
isLambda TAC.RailLambda{} = True | 65 | isLambda TAC.RailLambda{} = True | 32 | false | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
k0001/gtk2hs | gtk/demo/statusicon/StatusIcon.hs | gpl-3.0 | mkmenu s = do
m <- menuNew
mapM_ (mkitem m) [("Quit",mainQuit)]
return m
where
mkitem menu (label,act) =
do i <- menuItemNewWithLabel label
menuShellAppend menu i
on i menuItemActivated act | 249 | mkmenu s = do
m <- menuNew
mapM_ (mkitem m) [("Quit",mainQuit)]
return m
where
mkitem menu (label,act) =
do i <- menuItemNewWithLabel label
menuShellAppend menu i
on i menuItemActivated act | 249 | mkmenu s = do
m <- menuNew
mapM_ (mkitem m) [("Quit",mainQuit)]
return m
where
mkitem menu (label,act) =
do i <- menuItemNewWithLabel label
menuShellAppend menu i
on i menuItemActivated act | 249 | false | false | 0 | 9 | 89 | 91 | 42 | 49 | null | null |
ekmett/ghclive | src-main/SeqMap.hs | bsd-3-clause | toListFromTo :: Ord k => k -> k -> SeqMap k v -> [(k,v)]
toListFromTo from to (SeqMapM _ _ m)
| isJust (M.lookup from m) = go (Just from)
| otherwise = []
where
go (Just k) = let next = if k == to then [] else go (smNext v)
v = fromJust (M.lookup k m)
... | 368 | toListFromTo :: Ord k => k -> k -> SeqMap k v -> [(k,v)]
toListFromTo from to (SeqMapM _ _ m)
| isJust (M.lookup from m) = go (Just from)
| otherwise = []
where
go (Just k) = let next = if k == to then [] else go (smNext v)
v = fromJust (M.lookup k m)
... | 368 | toListFromTo from to (SeqMapM _ _ m)
| isJust (M.lookup from m) = go (Just from)
| otherwise = []
where
go (Just k) = let next = if k == to then [] else go (smNext v)
v = fromJust (M.lookup k m)
in (k, smVal v) : next
go Nothing = [] | 311 | false | true | 1 | 12 | 145 | 191 | 94 | 97 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/Stream.hs | bsd-3-clause | -- | Returns the last event in a signal.
lastS NullS = error "Empty signal" | 75 | lastS NullS = error "Empty signal" | 34 | lastS NullS = error "Empty signal" | 34 | true | false | 1 | 5 | 14 | 17 | 6 | 11 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Compiler/JMacro/Base.hs | mit | isAlphaOp _ = False | 26 | isAlphaOp _ = False | 26 | isAlphaOp _ = False | 26 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
timjb/lens | src/Control/Lens/Wrapped.hs | bsd-3-clause | -- | This is a convenient version of '_Unwrapped' with an argument that's ignored.
--
-- The user supplied function is /ignored/, merely its types are used.
_Unwrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapping _ = from _Wrapped | 277 | _Unwrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapping _ = from _Wrapped | 120 | _Unwrapping _ = from _Wrapped | 29 | true | true | 0 | 9 | 49 | 64 | 32 | 32 | null | null |
dan-t/dcpu16 | BinaryCode.hs | bsd-3-clause | bin = unwords . L.map (\w -> showIntAtBase 2 intToDigit w "") | 61 | bin = unwords . L.map (\w -> showIntAtBase 2 intToDigit w "") | 61 | bin = unwords . L.map (\w -> showIntAtBase 2 intToDigit w "") | 61 | false | false | 2 | 8 | 11 | 37 | 16 | 21 | null | null |
newmana/lets-lens | src/Lets/Lens.hs | bsd-3-clause | -- |
--
-- >>> setStreetOrState (Right maryLocality) "Some Other State"
-- Right (Locality "Mary Mary" "Some Other State" "Maristan")
--
-- >>> setStreetOrState (Left fred) "Some Other St"
-- Left (Person 24 "Fred" (Address "Some Other St" "Fredville" (Locality "Fredmania" "New South Fred" "Fredalia")))
setStreetOrStat... | 441 | setStreetOrState ::
Either Person Locality
-> String
-> Either Person Locality
setStreetOrState =
error "todo: setStreetOrState" | 136 | setStreetOrState =
error "todo: setStreetOrState" | 51 | true | true | 0 | 8 | 68 | 41 | 22 | 19 | null | null |
reckbo/ppl | pipeline-lib/Node.hs | bsd-3-clause | pathsFsInDwi projdir idx n@(Node.FsInDwi.FsInDwi{..}) =
let fs = Node.FreeSurfer.FreeSurfer{..}
dwi = Node.Dwi.Dwi{..}
dwimask = Node.DwiMask.DwiMask{..}
in [("fsindwi" ++ show idx, projdir </> path n)] ++
pathsFs projdir idx fs ++
pathsDwi projdir idx dwi | 282 | pathsFsInDwi projdir idx n@(Node.FsInDwi.FsInDwi{..}) =
let fs = Node.FreeSurfer.FreeSurfer{..}
dwi = Node.Dwi.Dwi{..}
dwimask = Node.DwiMask.DwiMask{..}
in [("fsindwi" ++ show idx, projdir </> path n)] ++
pathsFs projdir idx fs ++
pathsDwi projdir idx dwi | 282 | pathsFsInDwi projdir idx n@(Node.FsInDwi.FsInDwi{..}) =
let fs = Node.FreeSurfer.FreeSurfer{..}
dwi = Node.Dwi.Dwi{..}
dwimask = Node.DwiMask.DwiMask{..}
in [("fsindwi" ++ show idx, projdir </> path n)] ++
pathsFs projdir idx fs ++
pathsDwi projdir idx dwi | 282 | false | false | 0 | 12 | 59 | 118 | 63 | 55 | null | null |
ezyang/hackage-query | hackage-query.hs | bsd-3-clause | --------
-- Tools
tools = Tools { argDir = def &= dirFlags }
&= help "Search Hackage for build tool usage" | 117 | tools = Tools { argDir = def &= dirFlags }
&= help "Search Hackage for build tool usage" | 98 | tools = Tools { argDir = def &= dirFlags }
&= help "Search Hackage for build tool usage" | 98 | true | false | 3 | 7 | 31 | 36 | 17 | 19 | null | null |
pavelfatin/ninety-nine | haskell/p02.hs | gpl-3.0 | :: [a] -> a
f3 = last . init | 28 | :: [a] -> a
f3 = last . init | 28 | :: [a] -> a
f3 = last . init | 28 | false | false | 1 | 7 | 8 | 27 | 12 | 15 | null | null |
ml9951/ghc | compiler/main/HscTypes.hs | bsd-3-clause | noVectInfo :: VectInfo
noVectInfo
= VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet | 109 | noVectInfo :: VectInfo
noVectInfo
= VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet | 109 | noVectInfo
= VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet | 86 | false | true | 0 | 6 | 12 | 29 | 12 | 17 | null | null |
abhin4v/hastron | src/Hastron/Game/Engine.hs | mit | rightTurn :: Direction -> Direction
rightTurn Left = Up | 56 | rightTurn :: Direction -> Direction
rightTurn Left = Up | 56 | rightTurn Left = Up | 20 | false | true | 0 | 5 | 9 | 18 | 9 | 9 | null | null |
pront/nemo-mpi | src/api/autogen/API.hs | gpl-2.0 | getSynapsePlastic =
ApiFunction "getSynapsePlastic"
"return the boolean plasticity status for the specified synapse"
-- TODO: add notes for C and C++ API, mentioning lifetime of returned pointer/reference
Nothing (M.fromList pythonSynapseGetter)
[ ApiArg "plastic" (Just "plasticity... | 415 | getSynapsePlastic =
ApiFunction "getSynapsePlastic"
"return the boolean plasticity status for the specified synapse"
-- TODO: add notes for C and C++ API, mentioning lifetime of returned pointer/reference
Nothing (M.fromList pythonSynapseGetter)
[ ApiArg "plastic" (Just "plasticity... | 415 | getSynapsePlastic =
ApiFunction "getSynapsePlastic"
"return the boolean plasticity status for the specified synapse"
-- TODO: add notes for C and C++ API, mentioning lifetime of returned pointer/reference
Nothing (M.fromList pythonSynapseGetter)
[ ApiArg "plastic" (Just "plasticity... | 415 | false | false | 0 | 9 | 99 | 56 | 28 | 28 | null | null |
viktorasl/tictactoe-bot | src/Tictactoe/BencodeDict/Encoder.hs | mit | stringifyBoard :: Board -> String
stringifyBoard board = "d" ++ (stringifyBoardFields board 0 "") ++ "e" | 104 | stringifyBoard :: Board -> String
stringifyBoard board = "d" ++ (stringifyBoardFields board 0 "") ++ "e" | 104 | stringifyBoard board = "d" ++ (stringifyBoardFields board 0 "") ++ "e" | 70 | false | true | 0 | 8 | 15 | 36 | 18 | 18 | null | null |
dillonhuff/Folly | test/Folly/TestUtils.hs | bsd-3-clause | testCase func input expected =
TestCase (assertEqual ("Input: " ++ show input) expected (func input)) | 103 | testCase func input expected =
TestCase (assertEqual ("Input: " ++ show input) expected (func input)) | 103 | testCase func input expected =
TestCase (assertEqual ("Input: " ++ show input) expected (func input)) | 103 | false | false | 0 | 10 | 16 | 42 | 20 | 22 | null | null |
facebook/fbthrift | thrift/compiler/test/fixtures/namespace/gen-hs/My/Namespacing/Test/HsTestService.hs | apache-2.0 | -- | Translate a 'Types.ThriftVal' to a 'Init_args'
to_Init_args :: Types.ThriftVal -> Init_args
to_Init_args (Types.TStruct fields) = Init_args{
init_args_int1 = maybe (init_args_int1 default_Init_args) (\(_,_val12) -> (case _val12 of {Types.TI64 _val13 -> _val13; _ -> error "wrong type"})) (Map.lookup (1) fields)
... | 322 | to_Init_args :: Types.ThriftVal -> Init_args
to_Init_args (Types.TStruct fields) = Init_args{
init_args_int1 = maybe (init_args_int1 default_Init_args) (\(_,_val12) -> (case _val12 of {Types.TI64 _val13 -> _val13; _ -> error "wrong type"})) (Map.lookup (1) fields)
} | 270 | to_Init_args (Types.TStruct fields) = Init_args{
init_args_int1 = maybe (init_args_int1 default_Init_args) (\(_,_val12) -> (case _val12 of {Types.TI64 _val13 -> _val13; _ -> error "wrong type"})) (Map.lookup (1) fields)
} | 225 | true | true | 0 | 16 | 44 | 113 | 59 | 54 | null | null |
sdiehl/ghc | compiler/profiling/CostCentre.hs | bsd-3-clause | pprIdxCore idx = whenPprDebug $ ppr idx | 39 | pprIdxCore idx = whenPprDebug $ ppr idx | 39 | pprIdxCore idx = whenPprDebug $ ppr idx | 39 | false | false | 1 | 6 | 6 | 19 | 7 | 12 | null | null |
spacekitteh/compdata | src/Data/Comp/Decompose.hs | bsd-3-clause | {-| This function computes the arguments of a functorial value. -}
arguments :: (Foldable f) => f a -> [a]
arguments = toList | 127 | arguments :: (Foldable f) => f a -> [a]
arguments = toList | 58 | arguments = toList | 18 | true | true | 0 | 7 | 24 | 31 | 17 | 14 | null | null |
chocoluffy/courseography | hs/Response/NotFound.hs | gpl-3.0 | notFoundResponse :: ServerPart Response
notFoundResponse =
notFound $ toResponse $
H.html $ do
H.head $ do
H.title "Courseography - 404!"
H.meta ! A.httpEquiv "Content-Type"
! A.content "text/html;charset=utf-8"
sequence_ $ map toStylesheet [
... | 512 | notFoundResponse :: ServerPart Response
notFoundResponse =
notFound $ toResponse $
H.html $ do
H.head $ do
H.title "Courseography - 404!"
H.meta ! A.httpEquiv "Content-Type"
! A.content "text/html;charset=utf-8"
sequence_ $ map toStylesheet [
... | 512 | notFoundResponse =
notFound $ toResponse $
H.html $ do
H.head $ do
H.title "Courseography - 404!"
H.meta ! A.httpEquiv "Content-Type"
! A.content "text/html;charset=utf-8"
sequence_ $ map toStylesheet [
"//netdna.bootstrapcdn.com/boot... | 472 | false | true | 0 | 14 | 173 | 101 | 46 | 55 | null | null |
mimi1vx/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | potentially = fromMaybe (return ()) | 35 | potentially = fromMaybe (return ()) | 35 | potentially = fromMaybe (return ()) | 35 | false | false | 1 | 8 | 4 | 21 | 8 | 13 | null | null |
Rathcke/uni | ap/advanced programming/exam/src/subs/SimpleParse.hs | gpl-3.0 | sepBy :: Parser a -> Parser b -> Parser [a]
p `sepBy` sep = (p `sepBy1` sep) <|> return [] | 103 | sepBy :: Parser a -> Parser b -> Parser [a]
p `sepBy` sep = (p `sepBy1` sep) <|> return [] | 103 | p `sepBy` sep = (p `sepBy1` sep) <|> return [] | 49 | false | true | 0 | 8 | 32 | 60 | 30 | 30 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey | 84 | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey | 84 | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey | 84 | false | false | 0 | 7 | 12 | 19 | 9 | 10 | null | null |
acowley/DistanceTransform | src/DistanceTransform/Internal/Indexer.hs | bsd-3-clause | rightmost (Zip ls x (r:rs)) = rightmost $ Zip (x:ls) r rs | 57 | rightmost (Zip ls x (r:rs)) = rightmost $ Zip (x:ls) r rs | 57 | rightmost (Zip ls x (r:rs)) = rightmost $ Zip (x:ls) r rs | 57 | false | false | 0 | 9 | 11 | 44 | 22 | 22 | null | null |
bos/text | tests/Tests/Properties/Folds.hs | bsd-2-clause | sf_any q p = (L.any p . L.filter q) `eqP` (S.any p . S.filter q) | 71 | sf_any q p = (L.any p . L.filter q) `eqP` (S.any p . S.filter q) | 71 | sf_any q p = (L.any p . L.filter q) `eqP` (S.any p . S.filter q) | 71 | false | false | 1 | 10 | 21 | 56 | 25 | 31 | null | null |
jasonzoladz/yesod-purescript | Yesod/PureScript.hs | mit | addPureScriptWidget :: YesodPureScriptOptions -> Text -> Q Exp
addPureScriptWidget ypso moduleName = do
let dirs = map FSPC.fromText $ ypsoSourceDirectories ypso
let ignores = ypsoSourceIgnores ypso
parsed <- runIO $ parseFiles dirs ignores
-- parsed is a crazy struct and for now we need only list of mo... | 1,032 | addPureScriptWidget :: YesodPureScriptOptions -> Text -> Q Exp
addPureScriptWidget ypso moduleName = do
let dirs = map FSPC.fromText $ ypsoSourceDirectories ypso
let ignores = ypsoSourceIgnores ypso
parsed <- runIO $ parseFiles dirs ignores
-- parsed is a crazy struct and for now we need only list of mo... | 1,032 | addPureScriptWidget ypso moduleName = do
let dirs = map FSPC.fromText $ ypsoSourceDirectories ypso
let ignores = ypsoSourceIgnores ypso
parsed <- runIO $ parseFiles dirs ignores
-- parsed is a crazy struct and for now we need only list of modules
let parsedModules = concat $ catMaybes $ flip map (M.... | 969 | false | true | 0 | 15 | 242 | 256 | 121 | 135 | null | null |
tittoassini/top | src/Network/Top/Run.hs | bsd-3-clause | runAppForever :: (Model (router a), Flat (router a),Show (router a),Flat a,Show a) =>
Config -- ^ Top configuration
-> router a -- ^ Routing protocol
-> App a r -- ^ Application to connect
-> IO r -- ^ Value returned from the application
runAppForever cfg router app = forever $ do
Left (ex :... | 652 | runAppForever :: (Model (router a), Flat (router a),Show (router a),Flat a,Show a) =>
Config -- ^ Top configuration
-> router a -- ^ Routing protocol
-> App a r -- ^ Application to connect
-> IO r
runAppForever cfg router app = forever $ do
Left (ex :: SomeException) <- try $ runApp cfg router $ ... | 606 | runAppForever cfg router app = forever $ do
Left (ex :: SomeException) <- try $ runApp cfg router $ \conn -> do
liftIO $ dbgS "connected"
app conn
-- Something went wrong, wait a few seconds and restart
dbg ["Exited loop with error",concat ["'",show ex,"'"],"retrying in a bit."]
... | 392 | true | true | 0 | 14 | 167 | 194 | 96 | 98 | null | null |
massysett/cartel | cartel/lib/Cartel/Render.hs | bsd-3-clause | renderNoIndent :: RenderableIndented a => a -> String
renderNoIndent = flip runReader 0 . renderIndented | 104 | renderNoIndent :: RenderableIndented a => a -> String
renderNoIndent = flip runReader 0 . renderIndented | 104 | renderNoIndent = flip runReader 0 . renderIndented | 50 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
hvr/text | Data/Text/Internal/Builder.hs | bsd-2-clause | -- | /O(1)./ A @Builder@ taking a lazy @Text@, satisfying
--
-- * @'toLazyText' ('fromLazyText' t) = t@
--
fromLazyText :: L.Text -> Builder
fromLazyText ts = flush `append` mapBuilder (L.toChunks ts ++) | 204 | fromLazyText :: L.Text -> Builder
fromLazyText ts = flush `append` mapBuilder (L.toChunks ts ++) | 96 | fromLazyText ts = flush `append` mapBuilder (L.toChunks ts ++) | 62 | true | true | 0 | 9 | 33 | 42 | 24 | 18 | null | null |
bamboo/idris-cil | src/IRTS/Cil/Builders.hs | bsd-3-clause | publicSealedClass :: TypeName -> Maybe TypeSpec -> [TypeSpec] -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDef
publicSealedClass = classDef [CaPublic, CaSealed, CaBeforeFieldInit] | 183 | publicSealedClass :: TypeName -> Maybe TypeSpec -> [TypeSpec] -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDef
publicSealedClass = classDef [CaPublic, CaSealed, CaBeforeFieldInit] | 183 | publicSealedClass = classDef [CaPublic, CaSealed, CaBeforeFieldInit] | 68 | false | true | 0 | 12 | 21 | 68 | 35 | 33 | null | null |
piyush-kurur/yesod | yesod/Options.hs | mit | injectDefaultP env path (AltP p1 p2) =
AltP (injectDefaultP env path p1) (injectDefaultP env path p2) | 104 | injectDefaultP env path (AltP p1 p2) =
AltP (injectDefaultP env path p1) (injectDefaultP env path p2) | 104 | injectDefaultP env path (AltP p1 p2) =
AltP (injectDefaultP env path p1) (injectDefaultP env path p2) | 104 | false | false | 0 | 7 | 18 | 50 | 22 | 28 | null | null |
dolio/vector | Data/Vector/Generic.hs | bsd-3-clause | unsafeUpd v us = unsafeUpdate_stream v (Bundle.fromList us) | 59 | unsafeUpd v us = unsafeUpdate_stream v (Bundle.fromList us) | 59 | unsafeUpd v us = unsafeUpdate_stream v (Bundle.fromList us) | 59 | false | false | 0 | 8 | 7 | 24 | 11 | 13 | null | null |
rodrigogribeiro/mptc | src/Tc/TcPat.hs | bsd-3-clause | tcPat p@(PNeg p')
= withDiagnostic p $ tcPat p' | 51 | tcPat p@(PNeg p')
= withDiagnostic p $ tcPat p' | 51 | tcPat p@(PNeg p')
= withDiagnostic p $ tcPat p' | 51 | false | false | 0 | 8 | 12 | 28 | 13 | 15 | null | null |
seanhess/wai-middleware-headers | Network/Wai/Middleware/Headers.hs | bsd-3-clause | cors :: Middleware
cors = addHeaders [("Access-Control-Allow-Origin", "*")] | 75 | cors :: Middleware
cors = addHeaders [("Access-Control-Allow-Origin", "*")] | 75 | cors = addHeaders [("Access-Control-Allow-Origin", "*")] | 56 | false | true | 0 | 7 | 7 | 23 | 13 | 10 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/Enums.hs | mit | js_IDBRequestReadyStatePending = "pending" | 42 | js_IDBRequestReadyStatePending = "pending" | 42 | js_IDBRequestReadyStatePending = "pending" | 42 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ardumont/haskell-platform | hptool/src/Paths.hs | bsd-3-clause | -- | Final products are placed here
productDir :: FilePath
productDir = buildRoot </> "product" | 95 | productDir :: FilePath
productDir = buildRoot </> "product" | 59 | productDir = buildRoot </> "product" | 36 | true | true | 0 | 5 | 14 | 16 | 9 | 7 | null | null |
green-haskell/ghc | compiler/utils/Util.hs | bsd-3-clause | -- | Search for possible matches to the users input in the given list,
-- returning a small number of ranked results
fuzzyLookup :: String -> [(String,a)] -> [a]
fuzzyLookup user_entered possibilites
= map fst $ take mAX_RESULTS $ sortBy (comparing snd)
[ (poss_val, distance) | (poss_str, poss_val) <- possibilite... | 1,431 | fuzzyLookup :: String -> [(String,a)] -> [a]
fuzzyLookup user_entered possibilites
= map fst $ take mAX_RESULTS $ sortBy (comparing snd)
[ (poss_val, distance) | (poss_str, poss_val) <- possibilites
, let distance = restrictedDamerauLevenshteinDistance
... | 1,314 | fuzzyLookup user_entered possibilites
= map fst $ take mAX_RESULTS $ sortBy (comparing snd)
[ (poss_val, distance) | (poss_str, poss_val) <- possibilites
, let distance = restrictedDamerauLevenshteinDistance
poss_str user_entered
... | 1,269 | true | true | 3 | 10 | 539 | 171 | 92 | 79 | null | null |
jdmarble/spatialIndex | test/MetricSpaceTest.hs | bsd-3-clause | prop_non_negative :: MetricSpace a => a -> a -> a -> Bool
prop_non_negative _ x y = distance x y >= 0 | 101 | prop_non_negative :: MetricSpace a => a -> a -> a -> Bool
prop_non_negative _ x y = distance x y >= 0 | 101 | prop_non_negative _ x y = distance x y >= 0 | 43 | false | true | 0 | 10 | 21 | 52 | 23 | 29 | null | null |
gcampax/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | exprStats (Lam b e) = bndrStats b `plusCS` exprStats e | 60 | exprStats (Lam b e) = bndrStats b `plusCS` exprStats e | 60 | exprStats (Lam b e) = bndrStats b `plusCS` exprStats e | 60 | false | false | 0 | 6 | 15 | 30 | 14 | 16 | null | null |
DavidAlphaFox/ghc | libraries/haskeline/System/Console/Haskeline/Completion.hs | bsd-3-clause | isUnquoted :: Maybe Char -> String -> String -> Bool
isUnquoted esc qs s = case splitAtQuote esc qs s of
Just (_,s') -> not (isUnquoted esc qs s')
_ -> True
-- | List all of the files or folders beginning with this path. | 230 | isUnquoted :: Maybe Char -> String -> String -> Bool
isUnquoted esc qs s = case splitAtQuote esc qs s of
Just (_,s') -> not (isUnquoted esc qs s')
_ -> True
-- | List all of the files or folders beginning with this path. | 230 | isUnquoted esc qs s = case splitAtQuote esc qs s of
Just (_,s') -> not (isUnquoted esc qs s')
_ -> True
-- | List all of the files or folders beginning with this path. | 177 | false | true | 0 | 10 | 54 | 79 | 39 | 40 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F03.hs | bsd-3-clause | -- glColor4b -------------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glColor.xml OpenGL 2.x>. The vector equivalent of this command is 'glColor4bv'.
glColor4b
:: MonadIO m
=> GLbyte -- ^ @red@ of type @ColorB@.
-> GLbyte -- ^ @green@ of... | 496 | glColor4b
:: MonadIO m
=> GLbyte -- ^ @red@ of type @ColorB@.
-> GLbyte -- ^ @green@ of type @ColorB@.
-> GLbyte -- ^ @blue@ of type @ColorB@.
-> GLbyte -- ^ @alpha@ of type @ColorB@.
-> m ()
glColor4b v1 v2 v3 v4 = liftIO $ dyn115 ptr_glColor4b v1 v2 v3 v4 | 269 | glColor4b v1 v2 v3 v4 = liftIO $ dyn115 ptr_glColor4b v1 v2 v3 v4 | 65 | true | true | 0 | 12 | 84 | 73 | 37 | 36 | null | null |
mfpi/boom | src/Input.hs | mit | -- type Time = Timed NominalDiffTime ()
-- type InputMonad = RWS UserInput (BoomCommands ()) ()
-- type InputWire a b = Wire Time () InputMonad a b
smallVector :: V2 Float -> Bool
smallVector (V2 dx dy) = abs dx < 0.005 && abs dy < 0.005 | 238 | smallVector :: V2 Float -> Bool
smallVector (V2 dx dy) = abs dx < 0.005 && abs dy < 0.005 | 89 | smallVector (V2 dx dy) = abs dx < 0.005 && abs dy < 0.005 | 57 | true | true | 0 | 8 | 48 | 50 | 25 | 25 | null | null |
bgamari/linear | src/Linear/Matrix.hs | bsd-3-clause | -- | Build a transformation matrix from a rotation matrix and a
-- translation vector.
mkTransformationMat :: Num a => M33 a -> V3 a -> M44 a
mkTransformationMat (V3 r1 r2 r3) (V3 tx ty tz) =
V4 (snoc3 r1 tx) (snoc3 r2 ty) (snoc3 r3 tz) (V4 0 0 0 1)
where snoc3 (V3 x y z) = V4 x y z
| 288 | mkTransformationMat :: Num a => M33 a -> V3 a -> M44 a
mkTransformationMat (V3 r1 r2 r3) (V3 tx ty tz) =
V4 (snoc3 r1 tx) (snoc3 r2 ty) (snoc3 r3 tz) (V4 0 0 0 1)
where snoc3 (V3 x y z) = V4 x y z
| 201 | mkTransformationMat (V3 r1 r2 r3) (V3 tx ty tz) =
V4 (snoc3 r1 tx) (snoc3 r2 ty) (snoc3 r3 tz) (V4 0 0 0 1)
where snoc3 (V3 x y z) = V4 x y z
| 146 | true | true | 0 | 8 | 68 | 134 | 65 | 69 | null | null |
scrive/consumers | src/Database/PostgreSQL/Consumers/Components.hs | bsd-3-clause | spawnDispatcher
:: forall m idx job. ( MonadBaseControl IO m, MonadLog m, MonadMask m, MonadTime m
, Show idx, ToSQL idx )
=> ConsumerConfig m idx job
-> Bool
-> ConnectionSourceM m
-> ConsumerID
-> MVar ()
-> TVar (M.Map ThreadId idx)
-> TVar Int
-> Maybe (TMVar Bool)
-> m Th... | 7,196 | spawnDispatcher
:: forall m idx job. ( MonadBaseControl IO m, MonadLog m, MonadMask m, MonadTime m
, Show idx, ToSQL idx )
=> ConsumerConfig m idx job
-> Bool
-> ConnectionSourceM m
-> ConsumerID
-> MVar ()
-> TVar (M.Map ThreadId idx)
-> TVar Int
-> Maybe (TMVar Bool)
-> m Th... | 7,196 | spawnDispatcher ConsumerConfig{..} useSkipLocked cs cid semaphore
runningJobsInfo runningJobs mIdleSignal =
forkP "dispatcher" . forever $ do
void $ takeMVar semaphore
someJobWasProcessed <- loop 1
if someJobWasProcessed
then setIdle False
else setIdle True
where
setIdle :: forall m' .... | 6,869 | false | true | 10 | 22 | 2,526 | 1,795 | 907 | 888 | null | null |
flipstone/orville | orville-postgresql/src/Database/Orville/PostgreSQL/Internal/RelationalMap.hs | mit | fields (RM_Apply rm1 rm2) = fields rm1 ++ fields rm2 | 52 | fields (RM_Apply rm1 rm2) = fields rm1 ++ fields rm2 | 52 | fields (RM_Apply rm1 rm2) = fields rm1 ++ fields rm2 | 52 | false | false | 0 | 7 | 9 | 27 | 12 | 15 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | partsWithTitleStream :: KRPCHS.SpaceCenter.Parts -> Data.Text.Text -> RPCContext (KRPCStream ([KRPCHS.SpaceCenter.Part]))
partsWithTitleStream thisArg titleArg = requestStream $ partsWithTitleStreamReq thisArg titleArg | 218 | partsWithTitleStream :: KRPCHS.SpaceCenter.Parts -> Data.Text.Text -> RPCContext (KRPCStream ([KRPCHS.SpaceCenter.Part]))
partsWithTitleStream thisArg titleArg = requestStream $ partsWithTitleStreamReq thisArg titleArg | 218 | partsWithTitleStream thisArg titleArg = requestStream $ partsWithTitleStreamReq thisArg titleArg | 96 | false | true | 0 | 12 | 17 | 61 | 31 | 30 | null | null |
mumuki/mulang | src/Language/Mulang/Analyzer/EdlQueryCompiler.hs | gpl-3.0 | compileCQuery pm (E.AtMost n q) = contextualized (atMost (encode n)) <$> compileTQuery pm q | 98 | compileCQuery pm (E.AtMost n q) = contextualized (atMost (encode n)) <$> compileTQuery pm q | 98 | compileCQuery pm (E.AtMost n q) = contextualized (atMost (encode n)) <$> compileTQuery pm q | 98 | false | false | 0 | 10 | 20 | 45 | 21 | 24 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4791 = 4790 | 11 | 4791 = 4790 | 11 | 4791 = 4790 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
jspahrsummers/ScrumBut | Settings.hs | mit | -- | @config/settings.yml@, parsed to a @Value@.
configSettingsYmlValue :: Value
configSettingsYmlValue = either throw id $ decodeEither' configSettingsYmlBS | 157 | configSettingsYmlValue :: Value
configSettingsYmlValue = either throw id $ decodeEither' configSettingsYmlBS | 108 | configSettingsYmlValue = either throw id $ decodeEither' configSettingsYmlBS | 76 | true | true | 0 | 6 | 17 | 30 | 13 | 17 | null | null |
ulricha/dsh | src/Database/DSH/CL/Monad.hs | bsd-3-clause | stateful :: s -> CompSM s w a -> CompM Int w (s, a)
stateful s ma = CompM $ \i ->
case runCompM' (i, s) ma of
((i', _), Left msg) -> (i', Left msg)
((i', s'), Right (a, w)) -> (i', Right ((s', a), w)) | 253 | stateful :: s -> CompSM s w a -> CompM Int w (s, a)
stateful s ma = CompM $ \i ->
case runCompM' (i, s) ma of
((i', _), Left msg) -> (i', Left msg)
((i', s'), Right (a, w)) -> (i', Right ((s', a), w)) | 253 | stateful s ma = CompM $ \i ->
case runCompM' (i, s) ma of
((i', _), Left msg) -> (i', Left msg)
((i', s'), Right (a, w)) -> (i', Right ((s', a), w)) | 201 | false | true | 2 | 9 | 99 | 151 | 82 | 69 | null | null |
brendanhay/gogol | gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/SendAs/SmimeInfo/Insert.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
ussasiiUploadProtocol :: Lens' UsersSettingsSendAsSmimeInfoInsert (Maybe Text)
ussasiiUploadProtocol
= lens _ussasiiUploadProtocol
(\ s a -> s{_ussasiiUploadProtocol = a}) | 241 | ussasiiUploadProtocol :: Lens' UsersSettingsSendAsSmimeInfoInsert (Maybe Text)
ussasiiUploadProtocol
= lens _ussasiiUploadProtocol
(\ s a -> s{_ussasiiUploadProtocol = a}) | 179 | ussasiiUploadProtocol
= lens _ussasiiUploadProtocol
(\ s a -> s{_ussasiiUploadProtocol = a}) | 100 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
hdbc/hdbc-odbc | testsrc/Testbasics.hs | bsd-3-clause | tests = TestList
[
TestLabel "openClosedb" openClosedb,
TestLabel "multiFinish" multiFinish,
TestLabel "basicQueries" basicQueries,
TestLabel "createTable" createTable,
TestLabel "runReplace" runReplace,
TestLabel "executeReplace" executeReplace,
Te... | 632 | tests = TestList
[
TestLabel "openClosedb" openClosedb,
TestLabel "multiFinish" multiFinish,
TestLabel "basicQueries" basicQueries,
TestLabel "createTable" createTable,
TestLabel "runReplace" runReplace,
TestLabel "executeReplace" executeReplace,
Te... | 632 | tests = TestList
[
TestLabel "openClosedb" openClosedb,
TestLabel "multiFinish" multiFinish,
TestLabel "basicQueries" basicQueries,
TestLabel "createTable" createTable,
TestLabel "runReplace" runReplace,
TestLabel "executeReplace" executeReplace,
Te... | 632 | false | false | 0 | 7 | 165 | 105 | 52 | 53 | null | null |
fmapfmapfmap/amazonka | amazonka-codepipeline/gen/Network/AWS/CodePipeline/Types/Product.hs | mpl-2.0 | -- | The settings for the action type.
atSettings :: Lens' ActionType (Maybe ActionTypeSettings)
atSettings = lens _atSettings (\ s a -> s{_atSettings = a}) | 156 | atSettings :: Lens' ActionType (Maybe ActionTypeSettings)
atSettings = lens _atSettings (\ s a -> s{_atSettings = a}) | 117 | atSettings = lens _atSettings (\ s a -> s{_atSettings = a}) | 59 | true | true | 0 | 9 | 24 | 46 | 25 | 21 | null | null |
nickng/gong | GoParser.hs | apache-2.0 | testerStr :: String -> IO ()
testerStr s = do
print ("Attempting to Parse: " ++ s)
let e = passTest s
putStr "Succeeded: "
print . PP.pprintEqn $ e | 155 | testerStr :: String -> IO ()
testerStr s = do
print ("Attempting to Parse: " ++ s)
let e = passTest s
putStr "Succeeded: "
print . PP.pprintEqn $ e | 155 | testerStr s = do
print ("Attempting to Parse: " ++ s)
let e = passTest s
putStr "Succeeded: "
print . PP.pprintEqn $ e | 126 | false | true | 0 | 10 | 37 | 67 | 30 | 37 | null | null |
nevrenato/HetsAlloy | SoftFOL/PrintTPTP.hs | gpl-2.0 | separator :: String
separator = '%' : replicate 75 '-' | 54 | separator :: String
separator = '%' : replicate 75 '-' | 54 | separator = '%' : replicate 75 '-' | 34 | false | true | 0 | 6 | 9 | 20 | 10 | 10 | null | null |
johnjcamilleri/maltese-functional-morphology | lib/SharedString.hs | lgpl-3.0 | -- stringPool :: HashTable String String
-- stringPool = unsafePerformIO $ new (==) hashString
stringPool :: BasicHashTable String String
stringPool = unsafePerformIO $ new | 172 | stringPool :: BasicHashTable String String
stringPool = unsafePerformIO $ new | 77 | stringPool = unsafePerformIO $ new | 34 | true | true | 0 | 5 | 23 | 22 | 12 | 10 | null | null |
oldmanmike/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isAtomicHsExpr (HsOverLit {}) = True | 39 | isAtomicHsExpr (HsOverLit {}) = True | 39 | isAtomicHsExpr (HsOverLit {}) = True | 39 | false | false | 0 | 7 | 7 | 16 | 8 | 8 | null | null |
tolysz/yesod | yesod-core/Yesod/Core/Class/Yesod.hs | mit | defaultErrorHandler (InternalError e) = do
$logErrorS "yesod-core" e
selectRep $ do
provideRep $ defaultLayout $ defaultMessageWidget
"Internal Server Error"
[hamlet|<pre>#{e}|]
provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e] | 317 | defaultErrorHandler (InternalError e) = do
$logErrorS "yesod-core" e
selectRep $ do
provideRep $ defaultLayout $ defaultMessageWidget
"Internal Server Error"
[hamlet|<pre>#{e}|]
provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e] | 317 | defaultErrorHandler (InternalError e) = do
$logErrorS "yesod-core" e
selectRep $ do
provideRep $ defaultLayout $ defaultMessageWidget
"Internal Server Error"
[hamlet|<pre>#{e}|]
provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e] | 317 | false | false | 0 | 14 | 82 | 85 | 42 | 43 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Typecheck/Sub.hs | bsd-3-clause | compareMaybe _ _ _ _ _ _ Nothing = SubOK | 50 | compareMaybe _ _ _ _ _ _ Nothing = SubOK | 50 | compareMaybe _ _ _ _ _ _ Nothing = SubOK | 50 | false | false | 0 | 5 | 19 | 21 | 10 | 11 | null | null |
melrief/Yi-Spolsky | src/Yi/Style/Spolsky.hs | bsd-3-clause | spolskyModeInactiveFg = RGB 85 85 85 | 42 | spolskyModeInactiveFg = RGB 85 85 85 | 42 | spolskyModeInactiveFg = RGB 85 85 85 | 42 | false | false | 1 | 5 | 11 | 16 | 6 | 10 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_SAMPLE_ALPHA_TO_MASK_SGIS :: GLenum
gl_SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E | 76 | gl_SAMPLE_ALPHA_TO_MASK_SGIS :: GLenum
gl_SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E | 76 | gl_SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E | 37 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
agrafix/hackage-server | Distribution/Server/Framework/BlobStorage.hs | bsd-3-clause | fetch :: BlobStorage -> BlobId -> IO BSL.ByteString
fetch store blobid = BSL.readFile (filepath store blobid) | 109 | fetch :: BlobStorage -> BlobId -> IO BSL.ByteString
fetch store blobid = BSL.readFile (filepath store blobid) | 109 | fetch store blobid = BSL.readFile (filepath store blobid) | 57 | false | true | 0 | 8 | 15 | 42 | 20 | 22 | null | null |
marangisto/karakul | src/Internal/ARM.hs | bsd-3-clause | mcuFlags STM32G070 =
[ "-DSTM32G070"
, "-DSTM32G0"
, "-mcpu=cortex-m0plus" -- .small-multiply"
] | 112 | mcuFlags STM32G070 =
[ "-DSTM32G070"
, "-DSTM32G0"
, "-mcpu=cortex-m0plus" -- .small-multiply"
] | 112 | mcuFlags STM32G070 =
[ "-DSTM32G070"
, "-DSTM32G0"
, "-mcpu=cortex-m0plus" -- .small-multiply"
] | 112 | false | false | 1 | 5 | 27 | 22 | 11 | 11 | null | null |
siphayne/CS381 | scratch/InfList.hs | mit | -- head (a:_) = a
-- tail (_:as) = as
-- | Merge two lists element-wise. The result list is produced
-- by applying the given merge function to corresponding
-- elements of the argument lists.
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith _ [] [] = [] | 273 | zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith _ [] [] = [] | 74 | zipWith _ [] [] = [] | 28 | true | true | 0 | 8 | 68 | 61 | 35 | 26 | null | null |
nightscape/platform | editor/src/Unison/Signals.hs | mit | keepWhen :: Reflex t => Behavior t Bool -> Event t a -> Event t a
keepWhen = gate | 81 | keepWhen :: Reflex t => Behavior t Bool -> Event t a -> Event t a
keepWhen = gate | 81 | keepWhen = gate | 15 | false | true | 0 | 9 | 18 | 47 | 20 | 27 | null | null |
Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/02/02.11.07-WaxOffMod.hs | mit | waxOn = x * 5 where
x = y^2
y = z+8
z = 7 | 59 | waxOn = x * 5 where
x = y^2
y = z+8
z = 7 | 59 | waxOn = x * 5 where
x = y^2
y = z+8
z = 7 | 59 | false | false | 9 | 5 | 32 | 54 | 19 | 35 | null | null |
uuhan/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | rigMult Rig1 RigW = RigW | 24 | rigMult Rig1 RigW = RigW | 24 | rigMult Rig1 RigW = RigW | 24 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
DougBurke/swish | tests/RDFGraphTest.hs | lgpl-2.1 | gm66 = NSGraph
{ namespaces = nslist
, formulae = toFM
[Formula ba1 gm2,Formula bn3 gm3
,Formula ba3 gm2f,Formula bn5 gm3f
]
, statements = S.fromList [tm07,tm08,tm09,tm10,tm11,tm12,tm13,tm14
,tm67,tm68... | 385 | gm66 = NSGraph
{ namespaces = nslist
, formulae = toFM
[Formula ba1 gm2,Formula bn3 gm3
,Formula ba3 gm2f,Formula bn5 gm3f
]
, statements = S.fromList [tm07,tm08,tm09,tm10,tm11,tm12,tm13,tm14
,tm67,tm68... | 385 | gm66 = NSGraph
{ namespaces = nslist
, formulae = toFM
[Formula ba1 gm2,Formula bn3 gm3
,Formula ba3 gm2f,Formula bn5 gm3f
]
, statements = S.fromList [tm07,tm08,tm09,tm10,tm11,tm12,tm13,tm14
,tm67,tm68... | 385 | false | false | 0 | 9 | 178 | 114 | 67 | 47 | null | null |
stiell/phec | Haskeleton.hs | gpl-3.0 | testSuiteSuffix :: String
testSuiteSuffix = "Spec" | 50 | testSuiteSuffix :: String
testSuiteSuffix = "Spec" | 50 | testSuiteSuffix = "Spec" | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tabemann/amphibian | src_old/Network/IRC/Client/Amphibian/Commands.hs | bsd-3-clause | err_BADCHANNELKEY :: MessageCommand
err_BADCHANNELKEY = "475" | 61 | err_BADCHANNELKEY :: MessageCommand
err_BADCHANNELKEY = "475" | 61 | err_BADCHANNELKEY = "475" | 25 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
spechub/Hets | Taxonomy/MMiSSOntology.hs | gpl-2.0 | hasValue :: a -> WithError a
hasValue = Right | 45 | hasValue :: a -> WithError a
hasValue = Right | 45 | hasValue = Right | 16 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
uuhan/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | syntaxNames :: Syntax -> [Name]
syntaxNames (Rule syms _ _) = mapMaybe ename syms
where ename (Keyword n) = Just n
ename _ = Nothing | 172 | syntaxNames :: Syntax -> [Name]
syntaxNames (Rule syms _ _) = mapMaybe ename syms
where ename (Keyword n) = Just n
ename _ = Nothing | 172 | syntaxNames (Rule syms _ _) = mapMaybe ename syms
where ename (Keyword n) = Just n
ename _ = Nothing | 140 | false | true | 0 | 9 | 64 | 63 | 31 | 32 | null | null |
smurphy8/massFileHandler | src/System/MassFile.hs | bsd-3-clause | -- |More lens experiments
lensMfName :: Lens (MFcfg cmd) (MFcfg cmd) FilePath FilePath
lensMfName f (MFcfg a b c d) = fmap (\a' -> MFcfg a' b c d) (f a) | 153 | lensMfName :: Lens (MFcfg cmd) (MFcfg cmd) FilePath FilePath
lensMfName f (MFcfg a b c d) = fmap (\a' -> MFcfg a' b c d) (f a) | 126 | lensMfName f (MFcfg a b c d) = fmap (\a' -> MFcfg a' b c d) (f a) | 65 | true | true | 0 | 8 | 31 | 78 | 39 | 39 | null | null |
nushio3/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | trimConArgs (DataAlt dc) args = dropList (dataConUnivTyVars dc) args | 68 | trimConArgs (DataAlt dc) args = dropList (dataConUnivTyVars dc) args | 68 | trimConArgs (DataAlt dc) args = dropList (dataConUnivTyVars dc) args | 68 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
acowley/ghc | compiler/main/DynFlags.hs | bsd-3-clause | opt_lo :: DynFlags -> [String]
opt_lo dflags = sOpt_lo (settings dflags) | 87 | opt_lo :: DynFlags -> [String]
opt_lo dflags = sOpt_lo (settings dflags) | 87 | opt_lo dflags = sOpt_lo (settings dflags) | 41 | false | true | 0 | 7 | 25 | 30 | 15 | 15 | null | null |
bitemyapp/ether | src/Control/Monad/Trans/Ether/State/Strict.hs | bsd-3-clause | -- | Runs a 'StateT' with the given initial state
-- and returns the final state, discarding the final value.
execStateT :: Monad m => proxy tag -> StateT tag s m a -> s -> m s
execStateT t = Trans.execStateT . untagged t | 221 | execStateT :: Monad m => proxy tag -> StateT tag s m a -> s -> m s
execStateT t = Trans.execStateT . untagged t | 111 | execStateT t = Trans.execStateT . untagged t | 44 | true | true | 0 | 9 | 44 | 59 | 28 | 31 | null | null |
justgage/vanpool | dist/dist-sandbox-4fb45de7/build/autogen/Paths_vanpool.hs | mit | catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch | 84 | catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch | 84 | catchIO = Exception.catch | 25 | false | true | 0 | 9 | 14 | 39 | 19 | 20 | null | null |
astro/haskell-torrent | src/WireProtocol-cereal.hs | bsd-2-clause | testDecodeEncodeProp1 :: Message -> Bool
testDecodeEncodeProp1 m =
let encoded = encode m
decoded = decode encoded
in case decoded of
Left _ -> False
Right m' -> m == m'
-- Prelude.map testDecodeEncodeProp1 | 242 | testDecodeEncodeProp1 :: Message -> Bool
testDecodeEncodeProp1 m =
let encoded = encode m
decoded = decode encoded
in case decoded of
Left _ -> False
Right m' -> m == m'
-- Prelude.map testDecodeEncodeProp1 | 242 | testDecodeEncodeProp1 m =
let encoded = encode m
decoded = decode encoded
in case decoded of
Left _ -> False
Right m' -> m == m'
-- Prelude.map testDecodeEncodeProp1 | 201 | false | true | 0 | 10 | 69 | 67 | 32 | 35 | null | null |
fmapfmapfmap/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/ListVolumeRecoveryPoints.hs | mpl-2.0 | -- | Creates a value of 'ListVolumeRecoveryPointsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lvrprsVolumeRecoveryPointInfos'
--
-- * 'lvrprsGatewayARN'
--
-- * 'lvrprsResponseStatus'
listVolumeRecoveryPointsResponse
... | 619 | listVolumeRecoveryPointsResponse
:: Int -- ^ 'lvrprsResponseStatus'
-> ListVolumeRecoveryPointsResponse
listVolumeRecoveryPointsResponse pResponseStatus_ =
ListVolumeRecoveryPointsResponse'
{ _lvrprsVolumeRecoveryPointInfos = Nothing
, _lvrprsGatewayARN = Nothing
, _lvrprsResponseStatus = pRespo... | 336 | listVolumeRecoveryPointsResponse pResponseStatus_ =
ListVolumeRecoveryPointsResponse'
{ _lvrprsVolumeRecoveryPointInfos = Nothing
, _lvrprsGatewayARN = Nothing
, _lvrprsResponseStatus = pResponseStatus_
} | 224 | true | true | 0 | 7 | 94 | 57 | 34 | 23 | null | null |
joeyadams/haskell-iocp | testing/close-without-shutdown.hs | bsd-3-clause | portNum :: PortNumber
portNum = 1234 | 36 | portNum :: PortNumber
portNum = 1234 | 36 | portNum = 1234 | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
bos/text-icu | Data/Text/ICU/Spoof/Pure.hs | bsd-2-clause | -- | Gets the checks currently configured in the spoof checker.
getChecks :: Spoof -> [S.SpoofCheck]
getChecks (S s) = unsafePerformIO $ S.getChecks s | 150 | getChecks :: Spoof -> [S.SpoofCheck]
getChecks (S s) = unsafePerformIO $ S.getChecks s | 86 | getChecks (S s) = unsafePerformIO $ S.getChecks s | 49 | true | true | 0 | 9 | 23 | 44 | 21 | 23 | null | null |
snoyberg/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | split :: Type -> (Type, [Type]) -- Split into function and args
split t = go t []
where go (AppT t1 t2) args = go t1 (t2:args)
go ty args = (ty, args) | 177 | split :: Type -> (Type, [Type])
split t = go t []
where go (AppT t1 t2) args = go t1 (t2:args)
go ty args = (ty, args) | 142 | split t = go t []
where go (AppT t1 t2) args = go t1 (t2:args)
go ty args = (ty, args) | 110 | true | true | 1 | 7 | 60 | 86 | 45 | 41 | null | null |
anthony-coble/puzzle | app/puzzle_cuda.hs | bsd-3-clause | toTuple [a, b, c, d, e, f, g, h, i] = (a, b, c, d, e, f, g, h, i) | 65 | toTuple [a, b, c, d, e, f, g, h, i] = (a, b, c, d, e, f, g, h, i) | 65 | toTuple [a, b, c, d, e, f, g, h, i] = (a, b, c, d, e, f, g, h, i) | 65 | false | false | 0 | 6 | 19 | 63 | 40 | 23 | null | null |
ChrisPenner/rasa | rasa/test/Rasa/Internal/RangeSpec.hs | gpl-3.0 | spec :: Spec
spec = do
describe "overRow" $
prop "overRow f ~= Coord (f a) b" $ \crd@(Coord r c) -> Coord (r+1) c `shouldBe` overRow (+1) crd
describe "overCol" $
prop "overCol f ~= Coord a (f b)" $ \crd@(Coord r c) -> Coord r (c+1) `shouldBe` overCol (+1) crd
describe "overBoth" $
prop "overBoth f ... | 420 | spec :: Spec
spec = do
describe "overRow" $
prop "overRow f ~= Coord (f a) b" $ \crd@(Coord r c) -> Coord (r+1) c `shouldBe` overRow (+1) crd
describe "overCol" $
prop "overCol f ~= Coord a (f b)" $ \crd@(Coord r c) -> Coord r (c+1) `shouldBe` overCol (+1) crd
describe "overBoth" $
prop "overBoth f ... | 420 | spec = do
describe "overRow" $
prop "overRow f ~= Coord (f a) b" $ \crd@(Coord r c) -> Coord (r+1) c `shouldBe` overRow (+1) crd
describe "overCol" $
prop "overCol f ~= Coord a (f b)" $ \crd@(Coord r c) -> Coord r (c+1) `shouldBe` overCol (+1) crd
describe "overBoth" $
prop "overBoth f ~= Coord (f a... | 407 | false | true | 0 | 13 | 98 | 211 | 108 | 103 | null | null |
zerobuzz/servant | servant-server/test/Servant/ServerSpec.hs | bsd-3-clause | jerry :: Animal
jerry = Animal "Mouse" 4 | 40 | jerry :: Animal
jerry = Animal "Mouse" 4 | 40 | jerry = Animal "Mouse" 4 | 24 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
lubomir/dot-race | fay/DotRace/FFI/Raw.hs | bsd-3-clause | onMessage :: Connection -> (Event -> Fay ()) -> Fay ()
onMessage = ffi "%1['onmessage'] = %2" | 93 | onMessage :: Connection -> (Event -> Fay ()) -> Fay ()
onMessage = ffi "%1['onmessage'] = %2" | 93 | onMessage = ffi "%1['onmessage'] = %2" | 38 | false | true | 0 | 10 | 16 | 39 | 19 | 20 | null | null |
olsner/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 126 | emitPrimOp dflags res IndexByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 126 | emitPrimOp dflags res IndexByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 126 | false | false | 0 | 9 | 22 | 40 | 17 | 23 | null | null |
bitemyapp/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | defaultMongoConf :: Text -> MongoConf
defaultMongoConf dbName = MongoConf
{ mgDatabase = dbName
, mgHost = defaultHost
, mgPort = DB.defaultPort
, mgAuth = Nothing
, mgAccessMode = defaultAccessMode
, mgPoolStripes = defaultPoolStripes
, mgStripeConnections = defaultStripeConnections
, mgConnectionIdleT... | 388 | defaultMongoConf :: Text -> MongoConf
defaultMongoConf dbName = MongoConf
{ mgDatabase = dbName
, mgHost = defaultHost
, mgPort = DB.defaultPort
, mgAuth = Nothing
, mgAccessMode = defaultAccessMode
, mgPoolStripes = defaultPoolStripes
, mgStripeConnections = defaultStripeConnections
, mgConnectionIdleT... | 388 | defaultMongoConf dbName = MongoConf
{ mgDatabase = dbName
, mgHost = defaultHost
, mgPort = DB.defaultPort
, mgAuth = Nothing
, mgAccessMode = defaultAccessMode
, mgPoolStripes = defaultPoolStripes
, mgStripeConnections = defaultStripeConnections
, mgConnectionIdleTime = defaultConnectionIdleTime
, mg... | 350 | false | true | 0 | 8 | 65 | 85 | 49 | 36 | null | null |
forste/haReFork | tools/base/tests/GhcLibraries/LeftistHeap.hs | bsd-3-clause | null :: Ord a => Heap a -> Bool
null = undefined | 48 | null :: Ord a => Heap a -> Bool
null = undefined | 48 | null = undefined | 16 | false | true | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
haskell-distributed/network-transport-tcp | tests/TestTCP.hs | bsd-3-clause | testReconnect :: IO ()
testReconnect = do
serverDone <- newEmptyMVar
endpointCreated <- newEmptyMVar
-- The server will put the 'socketFree' IO in here, so that the client can
-- block until the server has closed the socket.
socketClosed <- newEmptyMVar
counter <- newMVar (0 :: Int)
-- Server
... | 5,115 | testReconnect :: IO ()
testReconnect = do
serverDone <- newEmptyMVar
endpointCreated <- newEmptyMVar
-- The server will put the 'socketFree' IO in here, so that the client can
-- block until the server has closed the socket.
socketClosed <- newEmptyMVar
counter <- newMVar (0 :: Int)
-- Server
... | 5,115 | testReconnect = do
serverDone <- newEmptyMVar
endpointCreated <- newEmptyMVar
-- The server will put the 'socketFree' IO in here, so that the client can
-- block until the server has closed the socket.
socketClosed <- newEmptyMVar
counter <- newMVar (0 :: Int)
-- Server
(serverPort, _) <- fork... | 5,092 | false | true | 0 | 28 | 1,251 | 989 | 459 | 530 | null | null |
erochest/barth-scrape | app/Opts.hs | apache-2.0 | opts :: ParserInfo Actions
opts = info (helper <*> opts')
( fullDesc
<> progDesc "Read a MALLET term weighting file into a JSON\
\ network."
<> header "barth-par -- parallel reading a MALLET term weighting\
\ file into a JSO... | 332 | opts :: ParserInfo Actions
opts = info (helper <*> opts')
( fullDesc
<> progDesc "Read a MALLET term weighting file into a JSON\
\ network."
<> header "barth-par -- parallel reading a MALLET term weighting\
\ file into a JSO... | 332 | opts = info (helper <*> opts')
( fullDesc
<> progDesc "Read a MALLET term weighting file into a JSON\
\ network."
<> header "barth-par -- parallel reading a MALLET term weighting\
\ file into a JSON network.") | 305 | false | true | 1 | 9 | 136 | 46 | 21 | 25 | null | null |
rrnewton/stack | src/Stack/Build/Cache.hs | bsd-3-clause | readPrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m)
=> PackageIdentifier -- ^ target package
-> ConfigureOpts
-> m (Maybe PrecompiledCache)
readPrecompiledCache pkgident copts = do
file <- precompiledCacheFile pkgident... | 369 | readPrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m)
=> PackageIdentifier -- ^ target package
-> ConfigureOpts
-> m (Maybe PrecompiledCache)
readPrecompiledCache pkgident copts = do
file <- precompiledCacheFile pkgident... | 369 | readPrecompiledCache pkgident copts = do
file <- precompiledCacheFile pkgident copts
decodeFileOrFailDeep $ toFilePath file | 131 | false | true | 0 | 10 | 107 | 85 | 41 | 44 | null | null |
hvr/vector | Data/Vector/Generic.hs | bsd-3-clause | imapM_ f = Bundle.mapM_ (uncurry f) . Bundle.indexed . stream | 61 | imapM_ f = Bundle.mapM_ (uncurry f) . Bundle.indexed . stream | 61 | imapM_ f = Bundle.mapM_ (uncurry f) . Bundle.indexed . stream | 61 | false | false | 0 | 9 | 9 | 30 | 14 | 16 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.