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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DavidAlphaFox/ghc | libraries/containers/Data/Sequence.hs | bsd-3-clause | -- | /O(min(n1,n2,n3,n4))/. 'zip4' takes four sequences and returns a
-- sequence of quadruples, analogous to 'zip'.
zip4 :: Seq a -> Seq b -> Seq c -> Seq d -> Seq (a,b,c,d)
zip4 = zipWith4 (,,,) | 197 | zip4 :: Seq a -> Seq b -> Seq c -> Seq d -> Seq (a,b,c,d)
zip4 = zipWith4 (,,,) | 79 | zip4 = zipWith4 (,,,) | 21 | true | true | 0 | 11 | 37 | 70 | 35 | 35 | null | null |
rubik/stack | src/Stack/Types/BuildPlan.hs | bsd-3-clause | renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d | 58 | renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d | 58 | renderSnapName (Nightly d) = T.pack $ "nightly-" ++ show d | 58 | false | false | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT09.hs | gpl-3.0 | revflat ((x:xs):xss) = revflat (xs:xss) ++ [x] | 46 | revflat ((x:xs):xss) = revflat (xs:xss) ++ [x] | 46 | revflat ((x:xs):xss) = revflat (xs:xss) ++ [x] | 46 | false | false | 0 | 8 | 6 | 41 | 21 | 20 | null | null |
niteria/haddock | haddock-api/src/Haddock/Interface/Rename.hs | bsd-2-clause | renamePseudoFamilyDecl :: PseudoFamilyDecl Name
-> RnM (PseudoFamilyDecl DocName)
renamePseudoFamilyDecl (PseudoFamilyDecl { .. }) = PseudoFamilyDecl
<$> renameFamilyInfo pfdInfo
<*> renameL pfdLName
<*> mapM renameLType pfdTyVars
<*> renameFamilyResultSig pfdKindSig | 307 | renamePseudoFamilyDecl :: PseudoFamilyDecl Name
-> RnM (PseudoFamilyDecl DocName)
renamePseudoFamilyDecl (PseudoFamilyDecl { .. }) = PseudoFamilyDecl
<$> renameFamilyInfo pfdInfo
<*> renameL pfdLName
<*> mapM renameLType pfdTyVars
<*> renameFamilyResultSig pfdKindSig | 307 | renamePseudoFamilyDecl (PseudoFamilyDecl { .. }) = PseudoFamilyDecl
<$> renameFamilyInfo pfdInfo
<*> renameL pfdLName
<*> mapM renameLType pfdTyVars
<*> renameFamilyResultSig pfdKindSig | 202 | false | true | 0 | 9 | 67 | 69 | 32 | 37 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/NameResolution.hs | bsd-3-clause | rnName :: Resolve Name
-- Case 1: The name has no prefix
-- => We should resolve it through expansion
-- If no expansion exists, then we should try (if applicable) to
-- resolve it as a package.
rnName n@(Name pos nt Nothing i) = do
expn <- getExpansion
case Map.lookup (unIdent i,nt) expn of
Just nrAction -> do... | 1,161 | rnName :: Resolve Name
rnName n@(Name pos nt Nothing i) = do
expn <- getExpansion
case Map.lookup (unIdent i,nt) expn of
Just nrAction -> do
(mPre, resNt) <- liftEither nrAction
return $ Name pos resNt mPre i
Nothing -> do
{- debugPrint $ "Unexpanded: " ++ show nam
-- TODO: Optim... | 989 | rnName n@(Name pos nt Nothing i) = do
expn <- getExpansion
case Map.lookup (unIdent i,nt) expn of
Just nrAction -> do
(mPre, resNt) <- liftEither nrAction
return $ Name pos resNt mPre i
Nothing -> do
{- debugPrint $ "Unexpanded: " ++ show nam
-- TODO: Optimize to check lazily, an... | 966 | true | true | 0 | 17 | 355 | 202 | 99 | 103 | null | null |
maxgurewitz/immigrate-haskell | dist/dist-sandbox-fd22d9f3/build/autogen/Paths_immigrate_haskell.hs | mit | getLibexecDir = catchIO (getEnv "immigrate_haskell_libexecdir") (\_ -> return libexecdir) | 89 | getLibexecDir = catchIO (getEnv "immigrate_haskell_libexecdir") (\_ -> return libexecdir) | 89 | getLibexecDir = catchIO (getEnv "immigrate_haskell_libexecdir") (\_ -> return libexecdir) | 89 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
Brightgalrs/con-lang-gen | src/Out/Roman.hs | mit | romanizeSyllable :: Language -> Syllable -> Text
romanizeSyllable lang (Syllable onset nucleus coda tone stress) = out where
out
| length (getTones lang) > 1 = romanizePhonemes onset ++ romanizePhoneme nucleus ++ writeToneDiacritic tone ++ romanizePhonemes coda
| length (getStresses lang) > 1 = romanizePho... | 507 | romanizeSyllable :: Language -> Syllable -> Text
romanizeSyllable lang (Syllable onset nucleus coda tone stress) = out where
out
| length (getTones lang) > 1 = romanizePhonemes onset ++ romanizePhoneme nucleus ++ writeToneDiacritic tone ++ romanizePhonemes coda
| length (getStresses lang) > 1 = romanizePho... | 507 | romanizeSyllable lang (Syllable onset nucleus coda tone stress) = out where
out
| length (getTones lang) > 1 = romanizePhonemes onset ++ romanizePhoneme nucleus ++ writeToneDiacritic tone ++ romanizePhonemes coda
| length (getStresses lang) > 1 = romanizePhonemes onset ++ romanizePhoneme nucleus ++ writeSt... | 458 | false | true | 0 | 13 | 82 | 165 | 73 | 92 | null | null |
fatho/kos-c | src/KOSC/Compiler/CodeGen.hs | bsd-3-clause | generateStatements :: Monad m => [AST.Stmt AST.ScopedName] -> CodeGenM m GeneratedCode
generateStatements stmts = L.concat <$> traverse generateStatement stmts | 159 | generateStatements :: Monad m => [AST.Stmt AST.ScopedName] -> CodeGenM m GeneratedCode
generateStatements stmts = L.concat <$> traverse generateStatement stmts | 159 | generateStatements stmts = L.concat <$> traverse generateStatement stmts | 72 | false | true | 0 | 9 | 18 | 51 | 24 | 27 | null | null |
csabahruska/GFXDemo | Utils.hs | bsd-3-clause | addNormal :: Mesh -> Mesh
addNormal (Mesh [("position",A_Vec3 p)] (TrianglesI idx)) = Mesh [("position",A_Vec3 p'),("normal",A_Vec3 n)] $ TrianglesI idx'
where
p' = V.backpermute p idx
pv i = p' V.! i -- p V.! (idx V.! i)
nv i = normalize $ (b-a) &^ (c-a)
where
a = pv i
b = pv $ i +... | 471 | addNormal :: Mesh -> Mesh
addNormal (Mesh [("position",A_Vec3 p)] (TrianglesI idx)) = Mesh [("position",A_Vec3 p'),("normal",A_Vec3 n)] $ TrianglesI idx'
where
p' = V.backpermute p idx
pv i = p' V.! i -- p V.! (idx V.! i)
nv i = normalize $ (b-a) &^ (c-a)
where
a = pv i
b = pv $ i +... | 471 | addNormal (Mesh [("position",A_Vec3 p)] (TrianglesI idx)) = Mesh [("position",A_Vec3 p'),("normal",A_Vec3 n)] $ TrianglesI idx'
where
p' = V.backpermute p idx
pv i = p' V.! i -- p V.! (idx V.! i)
nv i = normalize $ (b-a) &^ (c-a)
where
a = pv i
b = pv $ i + 1
c = pv $ i + 2
... | 445 | false | true | 0 | 10 | 138 | 243 | 126 | 117 | null | null |
nevrenato/HetsAlloy | HasCASL/Sublogic.hs | gpl-2.0 | sl_opId :: PolyId -> Sublogic
sl_opId (PolyId i tys _)
| isEq i = need_eq
| elem i [botId, defId, resId] = need_part
| elem i $ map fst bList = bottom
| otherwise = comp_list $ map sl_typeArg tys | 203 | sl_opId :: PolyId -> Sublogic
sl_opId (PolyId i tys _)
| isEq i = need_eq
| elem i [botId, defId, resId] = need_part
| elem i $ map fst bList = bottom
| otherwise = comp_list $ map sl_typeArg tys | 203 | sl_opId (PolyId i tys _)
| isEq i = need_eq
| elem i [botId, defId, resId] = need_part
| elem i $ map fst bList = bottom
| otherwise = comp_list $ map sl_typeArg tys | 173 | false | true | 2 | 9 | 47 | 97 | 47 | 50 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F19.hs | bsd-3-clause | ptr_glPNTrianglesfATI :: FunPtr (GLenum -> GLfloat -> IO ())
ptr_glPNTrianglesfATI = unsafePerformIO $ getCommand "glPNTrianglesfATI" | 133 | ptr_glPNTrianglesfATI :: FunPtr (GLenum -> GLfloat -> IO ())
ptr_glPNTrianglesfATI = unsafePerformIO $ getCommand "glPNTrianglesfATI" | 133 | ptr_glPNTrianglesfATI = unsafePerformIO $ getCommand "glPNTrianglesfATI" | 72 | false | true | 1 | 10 | 14 | 40 | 18 | 22 | null | null |
rfranek/duckling | Duckling/Duration/NB/Rules.hs | bsd-3-clause | ruleAboutDuration :: Rule
ruleAboutDuration = Rule
{ name = "about <duration>"
, pattern =
[ regex "(omkring|cirka|ca.|ca)"
, dimension Duration
]
, prod = \tokens -> case tokens of
(_:token:_) -> Just token
_ -> Nothing
} | 254 | ruleAboutDuration :: Rule
ruleAboutDuration = Rule
{ name = "about <duration>"
, pattern =
[ regex "(omkring|cirka|ca.|ca)"
, dimension Duration
]
, prod = \tokens -> case tokens of
(_:token:_) -> Just token
_ -> Nothing
} | 254 | ruleAboutDuration = Rule
{ name = "about <duration>"
, pattern =
[ regex "(omkring|cirka|ca.|ca)"
, dimension Duration
]
, prod = \tokens -> case tokens of
(_:token:_) -> Just token
_ -> Nothing
} | 228 | false | true | 0 | 14 | 68 | 82 | 44 | 38 | null | null |
troydm/edda | src/EDDA/Data/Document.hs | mit | toAeson (UTC d) = A.String $ T.pack (show d) | 44 | toAeson (UTC d) = A.String $ T.pack (show d) | 44 | toAeson (UTC d) = A.String $ T.pack (show d) | 44 | false | false | 0 | 8 | 8 | 33 | 15 | 18 | null | null |
amremam2004/vxmlizer | VXMLTree.hs | bsd-3-clause | -- A function that converts all vxml files in the current directory to dot files
-- You can use the command
-- !dot -Tpng filename.dot > filename.png
-- to convert any dot file to png (image) file
all2dot :: IO [()]
all2dot
= getCurrentDirectory
>>= getFiles
>>= inIO (filter (isSuffixOf "vxml")) >>= ... | 333 | all2dot :: IO [()]
all2dot
= getCurrentDirectory
>>= getFiles
>>= inIO (filter (isSuffixOf "vxml")) >>= mapM file2dot | 129 | all2dot
= getCurrentDirectory
>>= getFiles
>>= inIO (filter (isSuffixOf "vxml")) >>= mapM file2dot | 110 | true | true | 0 | 11 | 72 | 55 | 28 | 27 | null | null |
christiaanb/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcGetTyVar :: String -> Type -> TyVar
tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty) | 94 | tcGetTyVar :: String -> Type -> TyVar
tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty) | 94 | tcGetTyVar msg ty = expectJust msg (tcGetTyVar_maybe ty) | 56 | false | true | 0 | 8 | 14 | 40 | 18 | 22 | null | null |
brendanhay/gogol | gogol-composer/gen/Network/Google/Composer/Types/Product.hs | mpl-2.0 | -- | The standard List next-page token.
lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a}) | 187 | lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a}) | 147 | lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a}) | 85 | true | true | 1 | 9 | 31 | 52 | 25 | 27 | null | null |
dambaev/hep | src/Control/Concurrent/HEP/Proc.hs | mit | handleParentMessage::Maybe ParentMessage-> HEPGlobal ()
handleParentMessage Nothing = return () | 95 | handleParentMessage::Maybe ParentMessage-> HEPGlobal ()
handleParentMessage Nothing = return () | 95 | handleParentMessage Nothing = return () | 39 | false | true | 0 | 7 | 8 | 31 | 14 | 17 | null | null |
switchface/helm | src/Helm/Graphics2D.hs | mit | -- | Fill a shape with a texture. The texture should
-- be an image loaded by the engine.
textured :: Image e -> Shape -> Form e
textured img = fill (Texture img) | 162 | textured :: Image e -> Shape -> Form e
textured img = fill (Texture img) | 72 | textured img = fill (Texture img) | 33 | true | true | 0 | 8 | 33 | 43 | 20 | 23 | null | null |
Teaspot-Studio/bmstu-binary-genetics-haste | Genetic/Population.hs | bsd-3-clause | -- | Caclulates next generation of population
nextPopulation :: Individ a => IndividOptions a -> Fitness a -> GeneticOptions -> Population a -> PauseableRand (Population a)
nextPopulation iopts fitness opts pop = do
newPop' <- liftM concat $ forM [1 .. ceiling $ fromIntegral nonEliteCount / 2] $ \i -> do
when (i ... | 1,098 | nextPopulation :: Individ a => IndividOptions a -> Fitness a -> GeneticOptions -> Population a -> PauseableRand (Population a)
nextPopulation iopts fitness opts pop = do
newPop' <- liftM concat $ forM [1 .. ceiling $ fromIntegral nonEliteCount / 2] $ \i -> do
when (i `mod` 25 == 0) pause
a1 <- takeChr
b1 ... | 1,052 | nextPopulation iopts fitness opts pop = do
newPop' <- liftM concat $ forM [1 .. ceiling $ fromIntegral nonEliteCount / 2] $ \i -> do
when (i `mod` 25 == 0) pause
a1 <- takeChr
b1 <- takeChr
(a2, b2) <- crossover iopts a1 b1
a3 <- applyMutation a2
b3 <- applyMutation b2
return [a3, b3]
le... | 925 | true | true | 12 | 15 | 273 | 451 | 203 | 248 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/Repa.hs | bsd-3-clause | rotateVecR :: Syntax a => Data Index -> Vector DIM1 a -> Vector DIM1 a
rotateVecR ix = reverse . rotateVecL ix . reverse | 120 | rotateVecR :: Syntax a => Data Index -> Vector DIM1 a -> Vector DIM1 a
rotateVecR ix = reverse . rotateVecL ix . reverse | 120 | rotateVecR ix = reverse . rotateVecL ix . reverse | 49 | false | true | 0 | 8 | 23 | 53 | 24 | 29 | null | null |
music-suite/music-score | src/Music/Time/Internal/Util.hs | bsd-3-clause | uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uncurry3 = (. untripl) . uncurry . uncurry | 91 | uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
uncurry3 = (. untripl) . uncurry . uncurry | 91 | uncurry3 = (. untripl) . uncurry . uncurry | 42 | false | true | 0 | 9 | 22 | 55 | 31 | 24 | null | null |
ekmett/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexByteArrayOp_Word8 args = doIndexByteArrayOp (Just (mo_u_8ToWord dflags)) b8 res args | 125 | emitPrimOp dflags res IndexByteArrayOp_Word8 args = doIndexByteArrayOp (Just (mo_u_8ToWord dflags)) b8 res args | 125 | emitPrimOp dflags res IndexByteArrayOp_Word8 args = doIndexByteArrayOp (Just (mo_u_8ToWord dflags)) b8 res args | 125 | false | false | 0 | 9 | 26 | 36 | 17 | 19 | null | null |
MichielDerhaeg/stack | src/Stack/Upload.hs | bsd-3-clause | promptPassword :: IO Text
promptPassword = do
putStr "Hackage password: "
hFlush stdout
-- save/restore the terminal echoing status (no echoing for entering the password)
passwd <- withoutInputEcho $ fmap T.pack getLine
putStrLn ""
return passwd | 257 | promptPassword :: IO Text
promptPassword = do
putStr "Hackage password: "
hFlush stdout
-- save/restore the terminal echoing status (no echoing for entering the password)
passwd <- withoutInputEcho $ fmap T.pack getLine
putStrLn ""
return passwd | 257 | promptPassword = do
putStr "Hackage password: "
hFlush stdout
-- save/restore the terminal echoing status (no echoing for entering the password)
passwd <- withoutInputEcho $ fmap T.pack getLine
putStrLn ""
return passwd | 231 | false | true | 0 | 10 | 47 | 57 | 24 | 33 | null | null |
allanderek/ipclib | Language/Pepa/Probes/Translate.hs | gpl-2.0 | buildNfa :: ProbeR -> ProbeNfa
buildNfa (SPact a) =
NFA ( fromList [ state0, state1 ] )
( singleton $ Move state0 (unguardedLabel a) state1 )
state0
( singleton state1 )
where
state0 = 0 -- Ordinary 0
state1 = 1 -- Ordinary 1 | 266 | buildNfa :: ProbeR -> ProbeNfa
buildNfa (SPact a) =
NFA ( fromList [ state0, state1 ] )
( singleton $ Move state0 (unguardedLabel a) state1 )
state0
( singleton state1 )
where
state0 = 0 -- Ordinary 0
state1 = 1 -- Ordinary 1 | 266 | buildNfa (SPact a) =
NFA ( fromList [ state0, state1 ] )
( singleton $ Move state0 (unguardedLabel a) state1 )
state0
( singleton state1 )
where
state0 = 0 -- Ordinary 0
state1 = 1 -- Ordinary 1 | 235 | false | true | 0 | 10 | 84 | 86 | 45 | 41 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Disk template types
dtDiskless :: String
dtDiskless = Types.diskTemplateToRaw DTDiskless | 94 | dtDiskless :: String
dtDiskless = Types.diskTemplateToRaw DTDiskless | 68 | dtDiskless = Types.diskTemplateToRaw DTDiskless | 47 | true | true | 0 | 6 | 12 | 17 | 9 | 8 | null | null |
wskplho/stack | src/Stack/BuildPlan.hs | bsd-3-clause | resolveBuildPlan :: (MonadThrow m, MonadIO m, MonadReader env m, HasBuildConfig env, MonadLogger m, HasHttpManager env, MonadBaseControl IO m,MonadCatch m)
=> EnvOverride
-> MiniBuildPlan
-> (PackageName -> Bool) -- ^ is it shadowed by a local package?
... | 1,143 | resolveBuildPlan :: (MonadThrow m, MonadIO m, MonadReader env m, HasBuildConfig env, MonadLogger m, HasHttpManager env, MonadBaseControl IO m,MonadCatch m)
=> EnvOverride
-> MiniBuildPlan
-> (PackageName -> Bool) -- ^ is it shadowed by a local package?
... | 1,143 | resolveBuildPlan menv mbp isShadowed packages
| Map.null (rsUnknown rs) && Map.null (rsShadowed rs) = return (rsToInstall rs, rsUsedBy rs)
| otherwise = do
cache <- getPackageCaches menv
let maxVer = Map.fromListWith max $ map toTuple $ Map.keys cache
unknown = flip Map.mapWithKey (r... | 594 | false | true | 0 | 15 | 373 | 336 | 162 | 174 | null | null |
lynnard/cocos2d-hs | src/Graphics/UI/Cocos2d/Sprite.hs | bsd-3-clause | sprite_createWithTextureAndRect :: (M3.Texture2DPtr arg'1, M2.RawRectValue arg'2) => arg'1 -> arg'2 -> HoppyP.IO Sprite
sprite_createWithTextureAndRect arg'1 arg'2 =
HoppyFHR.withCppPtr (M3.toTexture2D arg'1) $ \arg'1' ->
M2.withRawRectPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
HoppyP.fmap Sprite
... | 368 | sprite_createWithTextureAndRect :: (M3.Texture2DPtr arg'1, M2.RawRectValue arg'2) => arg'1 -> arg'2 -> HoppyP.IO Sprite
sprite_createWithTextureAndRect arg'1 arg'2 =
HoppyFHR.withCppPtr (M3.toTexture2D arg'1) $ \arg'1' ->
M2.withRawRectPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
HoppyP.fmap Sprite
... | 368 | sprite_createWithTextureAndRect arg'1 arg'2 =
HoppyFHR.withCppPtr (M3.toTexture2D arg'1) $ \arg'1' ->
M2.withRawRectPtr arg'2 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'2' ->
HoppyP.fmap Sprite
(sprite_createWithTextureAndRect' arg'1' arg'2') | 248 | false | true | 0 | 9 | 43 | 111 | 54 | 57 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/LTEQ_7.hs | mit | ltEsOrdering LT EQ = MyTrue | 27 | ltEsOrdering LT EQ = MyTrue | 27 | ltEsOrdering LT EQ = MyTrue | 27 | false | false | 0 | 4 | 4 | 13 | 5 | 8 | null | null |
koengit/zeldspar | examples/ZeldsparTest.hs | bsd-3-clause | prog4 :: Zun (Data Int32) (Data Int32) ()
prog4 = loop $ do
i <- take
emit (i * 2)
i <- take
emit (i * 3)
i <- take
emit (i * 4) | 152 | prog4 :: Zun (Data Int32) (Data Int32) ()
prog4 = loop $ do
i <- take
emit (i * 2)
i <- take
emit (i * 3)
i <- take
emit (i * 4) | 152 | prog4 = loop $ do
i <- take
emit (i * 2)
i <- take
emit (i * 3)
i <- take
emit (i * 4) | 110 | false | true | 4 | 10 | 57 | 105 | 45 | 60 | null | null |
brendanhay/gogol | gogol-tpu/gen/Network/Google/Resource/TPU/Projects/Locations/Get.hs | mpl-2.0 | -- | Resource name for the location.
plgName :: Lens' ProjectsLocationsGet Text
plgName = lens _plgName (\ s a -> s{_plgName = a}) | 130 | plgName :: Lens' ProjectsLocationsGet Text
plgName = lens _plgName (\ s a -> s{_plgName = a}) | 93 | plgName = lens _plgName (\ s a -> s{_plgName = a}) | 50 | true | true | 0 | 9 | 22 | 40 | 22 | 18 | null | null |
mcschroeder/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- All dynamic flags present in GHC with deprecation information.
flagsAllDeps :: [(Deprecation, Flag (CmdLineP DynFlags))]
flagsAllDeps = package_flags_deps ++ dynamic_flags_deps | 180 | flagsAllDeps :: [(Deprecation, Flag (CmdLineP DynFlags))]
flagsAllDeps = package_flags_deps ++ dynamic_flags_deps | 114 | flagsAllDeps = package_flags_deps ++ dynamic_flags_deps | 56 | true | true | 0 | 9 | 21 | 34 | 19 | 15 | null | null |
rad1al/hutton_exercises | ch06.hs | gpl-2.0 | sum' :: Num a => [a] -> a
sum' [] = 0 | 41 | sum' :: Num a => [a] -> a
sum' [] = 0 | 41 | sum' [] = 0 | 15 | false | true | 0 | 7 | 15 | 30 | 15 | 15 | null | null |
shayan-najd/QFeldspar | QFeldspar/Expression/Utils/Equality/GADTFirstOrder.hs | gpl-3.0 | eql (Abs _) _ = False | 37 | eql (Abs _) _ = False | 37 | eql (Abs _) _ = False | 37 | false | false | 1 | 6 | 21 | 18 | 8 | 10 | null | null |
kovach/web2 | src/Types.hs | mit | mpos (MT Positive t) = Just t | 29 | mpos (MT Positive t) = Just t | 29 | mpos (MT Positive t) = Just t | 29 | false | false | 0 | 6 | 6 | 21 | 9 | 12 | null | null |
deech/LibClang | src/Clang/Module.hs | bsd-3-clause | -- | Given an module, returns either
--
-- * the parent module (for example, for \'std.vector\' the \'std\'
-- module will be returned), or
--
-- * 'Nothing' if the module is top-level.
getParent :: ClangBase m => FFI.Module s' -> ClangT s m (Maybe (FFI.Module s))
getParent m = liftIO $ FFI.module_getParent mkP... | 326 | getParent :: ClangBase m => FFI.Module s' -> ClangT s m (Maybe (FFI.Module s))
getParent m = liftIO $ FFI.module_getParent mkProxy m | 132 | getParent m = liftIO $ FFI.module_getParent mkProxy m | 53 | true | true | 0 | 12 | 63 | 68 | 35 | 33 | null | null |
nominolo/haddock2 | src/Haddock/GhcUtils.hs | bsd-2-clause | moduleString :: Module -> String
moduleString = moduleNameString . moduleName | 77 | moduleString :: Module -> String
moduleString = moduleNameString . moduleName | 77 | moduleString = moduleNameString . moduleName | 44 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
jtapolczai/Scratchpad | src/WordCounter.hs | apache-2.0 | main :: IO ()
main = do path <- putStr "Enter path: " >> hFlush stdout >> getLine
ext <- putStr "Enter extension (with dot): " >> hFlush stdout >> getLine
main' path ext | 189 | main :: IO ()
main = do path <- putStr "Enter path: " >> hFlush stdout >> getLine
ext <- putStr "Enter extension (with dot): " >> hFlush stdout >> getLine
main' path ext | 189 | main = do path <- putStr "Enter path: " >> hFlush stdout >> getLine
ext <- putStr "Enter extension (with dot): " >> hFlush stdout >> getLine
main' path ext | 175 | false | true | 0 | 11 | 53 | 72 | 30 | 42 | null | null |
ploeh/dependency-rejection-samples | Haskell/MaitreDTests.hs | mit | tryAcceptBehavesCorrectlyWhenItCanAccept :: NonNegative Int -> Property
tryAcceptBehavesCorrectlyWhenItCanAccept (NonNegative excessCapacity) =
forAll
(liftM2 (,) genReservation $ listOf genReservation)
(\(reservation, reservations) ->
let capacity =
excessCapacity
+ sumBy quanti... | 496 | tryAcceptBehavesCorrectlyWhenItCanAccept :: NonNegative Int -> Property
tryAcceptBehavesCorrectlyWhenItCanAccept (NonNegative excessCapacity) =
forAll
(liftM2 (,) genReservation $ listOf genReservation)
(\(reservation, reservations) ->
let capacity =
excessCapacity
+ sumBy quanti... | 496 | tryAcceptBehavesCorrectlyWhenItCanAccept (NonNegative excessCapacity) =
forAll
(liftM2 (,) genReservation $ listOf genReservation)
(\(reservation, reservations) ->
let capacity =
excessCapacity
+ sumBy quantity reservations
+ quantity reservation
actual = t... | 424 | false | true | 0 | 14 | 116 | 121 | 61 | 60 | null | null |
soumith/fbthrift | thrift/lib/hs/Thrift/Protocol/JSON.hs | apache-2.0 | buildJSONValue (TI32 i) = int32Dec i | 36 | buildJSONValue (TI32 i) = int32Dec i | 36 | buildJSONValue (TI32 i) = int32Dec i | 36 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
lukexi/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprMnemonic_ :: LitString -> SDoc
pprMnemonic_ name =
char '\t' <> ptext name <> space | 90 | pprMnemonic_ :: LitString -> SDoc
pprMnemonic_ name =
char '\t' <> ptext name <> space | 90 | pprMnemonic_ name =
char '\t' <> ptext name <> space | 55 | false | true | 0 | 7 | 18 | 32 | 15 | 17 | null | null |
fmapfmapfmap/amazonka | amazonka-iam/gen/Network/AWS/IAM/UpdateAccountPasswordPolicy.hs | mpl-2.0 | -- | Specifies whether IAM user passwords must contain at least one uppercase
-- character from the ISO basic Latin alphabet (A to Z).
--
-- Default value: false
uappRequireUppercaseCharacters :: Lens' UpdateAccountPasswordPolicy (Maybe Bool)
uappRequireUppercaseCharacters = lens _uappRequireUppercaseCharacters (\ s a ... | 362 | uappRequireUppercaseCharacters :: Lens' UpdateAccountPasswordPolicy (Maybe Bool)
uappRequireUppercaseCharacters = lens _uappRequireUppercaseCharacters (\ s a -> s{_uappRequireUppercaseCharacters = a}) | 200 | uappRequireUppercaseCharacters = lens _uappRequireUppercaseCharacters (\ s a -> s{_uappRequireUppercaseCharacters = a}) | 119 | true | true | 1 | 9 | 45 | 52 | 28 | 24 | null | null |
myfreeweb/sweetroll | sweetroll-be/library/Sweetroll/Database.hs | unlicense | guardDbError ∷ MonadThrow μ ⇒ Either DbError α → μ α
guardDbError (Right x) = return x | 86 | guardDbError ∷ MonadThrow μ ⇒ Either DbError α → μ α
guardDbError (Right x) = return x | 86 | guardDbError (Right x) = return x | 33 | false | true | 0 | 7 | 16 | 42 | 19 | 23 | null | null |
mettekou/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | mkCast (Cast expr co2) co
= WARN(let { Pair from_ty _to_ty = coercionKind co;
Pair _from_ty2 to_ty2 = coercionKind co2} in
not (from_ty `eqType` to_ty2),
vcat ([ text "expr:" <+> ppr expr
, text "co2:" <+> ppr co2
, text "co:" <+> ppr c... | 361 | mkCast (Cast expr co2) co
= WARN(let { Pair from_ty _to_ty = coercionKind co;
Pair _from_ty2 to_ty2 = coercionKind co2} in
not (from_ty `eqType` to_ty2),
vcat ([ text "expr:" <+> ppr expr
, text "co2:" <+> ppr co2
, text "co:" <+> ppr c... | 361 | mkCast (Cast expr co2) co
= WARN(let { Pair from_ty _to_ty = coercionKind co;
Pair _from_ty2 to_ty2 = coercionKind co2} in
not (from_ty `eqType` to_ty2),
vcat ([ text "expr:" <+> ppr expr
, text "co2:" <+> ppr co2
, text "co:" <+> ppr c... | 361 | false | false | 0 | 11 | 138 | 136 | 66 | 70 | null | null |
RAFIRAF/HASKELL | shapes.hs | mit | baseRect :: Float -> Float -> Shape
baseRect w h = Rectangle (Point 0 0) $ Point (w) h | 86 | baseRect :: Float -> Float -> Shape
baseRect w h = Rectangle (Point 0 0) $ Point (w) h | 86 | baseRect w h = Rectangle (Point 0 0) $ Point (w) h | 50 | false | true | 0 | 8 | 18 | 47 | 23 | 24 | null | null |
roldugin/LiveFusion | Data/LiveFusion.hs | bsd-3-clause | -- | O(length result). Backwards permutation of array elements.
--
-- @bpermute [50, 60, 20, 30] [0, 3, 2] = [50, 30, 20]@
bpermute
:: Elt a
=> Array a -- ^ Source array.
-> Array Int -- ^ Indices in the source to copy elements from.
-> Array a
bpermute arr ixs = Bpermute (re... | 342 | bpermute
:: Elt a
=> Array a -- ^ Source array.
-> Array Int -- ^ Indices in the source to copy elements from.
-> Array a
bpermute arr ixs = Bpermute (rebaseManifest' arr) ixs | 217 | bpermute arr ixs = Bpermute (rebaseManifest' arr) ixs | 53 | true | true | 0 | 8 | 101 | 56 | 28 | 28 | null | null |
cchalmers/geometry | src/Geometry/Transform.hs | bsd-3-clause | -- | Create a general affine transformation from an linear
-- transformation and its inverse. The translational component is
-- assumed to be zero.
fromLinear :: (Additive v, Num n) => v (v n) -> v (v n) -> Transformation v n
fromLinear l1 l2 = T l1 l2 zero | 261 | fromLinear :: (Additive v, Num n) => v (v n) -> v (v n) -> Transformation v n
fromLinear l1 l2 = T l1 l2 zero | 109 | fromLinear l1 l2 = T l1 l2 zero | 31 | true | true | 0 | 11 | 53 | 78 | 37 | 41 | null | null |
keithodulaigh/Hets | Static/GTheory.hs | gpl-2.0 | createGThWith :: G_theory -> SigId -> ThId -> G_theory
createGThWith (G_theory gtl gsub gts _ _ _) si =
G_theory gtl gsub gts si noSens | 137 | createGThWith :: G_theory -> SigId -> ThId -> G_theory
createGThWith (G_theory gtl gsub gts _ _ _) si =
G_theory gtl gsub gts si noSens | 137 | createGThWith (G_theory gtl gsub gts _ _ _) si =
G_theory gtl gsub gts si noSens | 82 | false | true | 0 | 11 | 26 | 65 | 28 | 37 | null | null |
nymacro/hs-kmip | src/Ttlv/Parser/Serialize.hs | bsd-3-clause | parseTtlvByteString :: Int -> Get TtlvData
parseTtlvByteString n = do
val <- getByteString $ fromIntegral n
return $ TtlvByteString val | 139 | parseTtlvByteString :: Int -> Get TtlvData
parseTtlvByteString n = do
val <- getByteString $ fromIntegral n
return $ TtlvByteString val | 139 | parseTtlvByteString n = do
val <- getByteString $ fromIntegral n
return $ TtlvByteString val | 96 | false | true | 0 | 10 | 23 | 50 | 21 | 29 | null | null |
m00nlight/99-problems | haskell/p-14.hs | bsd-3-clause | dupli :: [b] -> [b]
dupli = concatMap (\ x -> [x, x]) | 53 | dupli :: [b] -> [b]
dupli = concatMap (\ x -> [x, x]) | 53 | dupli = concatMap (\ x -> [x, x]) | 33 | false | true | 0 | 8 | 12 | 38 | 22 | 16 | null | null |
mankyKitty/haskell-to-llvm-compiler | src/Codegen.hs | mit | fmul :: Operand -> Operand -> Codegen Operand
fmul a b = instr $ FMul a b [] | 76 | fmul :: Operand -> Operand -> Codegen Operand
fmul a b = instr $ FMul a b [] | 76 | fmul a b = instr $ FMul a b [] | 30 | false | true | 0 | 8 | 17 | 44 | 20 | 24 | null | null |
ezyang/ghc | testsuite/tests/th/T10603.hs | bsd-3-clause | main = print $ $([| case Just 'a' of Just a -> Just ((\x -> x) a) |]) | 69 | main = print $ $([| case Just 'a' of Just a -> Just ((\x -> x) a) |]) | 69 | main = print $ $([| case Just 'a' of Just a -> Just ((\x -> x) a) |]) | 69 | false | false | 0 | 7 | 17 | 17 | 10 | 7 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/compare_6.hs | mit | primCmpInt :: MyInt -> MyInt -> Ordering;
primCmpInt (Pos Zero) (Pos Zero) = EQ | 83 | primCmpInt :: MyInt -> MyInt -> Ordering
primCmpInt (Pos Zero) (Pos Zero) = EQ | 82 | primCmpInt (Pos Zero) (Pos Zero) = EQ | 37 | false | true | 0 | 7 | 17 | 37 | 19 | 18 | null | null |
oldmanmike/ghc | compiler/basicTypes/VarSet.hs | bsd-3-clause | fixVarSet :: (VarSet -> VarSet) -- Map the current set to a new set
-> VarSet -> VarSet
-- (fixVarSet f s) repeatedly applies f to the set s,
-- until it reaches a fixed point.
fixVarSet fn vars
| new_vars `subVarSet` vars = vars
| otherwise = fixVarSet fn new_vars
where
new_vars =... | 328 | fixVarSet :: (VarSet -> VarSet) -- Map the current set to a new set
-> VarSet -> VarSet
fixVarSet fn vars
| new_vars `subVarSet` vars = vars
| otherwise = fixVarSet fn new_vars
where
new_vars = fn vars | 239 | fixVarSet fn vars
| new_vars `subVarSet` vars = vars
| otherwise = fixVarSet fn new_vars
where
new_vars = fn vars | 139 | true | true | 1 | 8 | 93 | 69 | 36 | 33 | null | null |
text-utf8/text | tests/Tests/Properties.hs | bsd-2-clause | tl_cons x = (x:) `eqP` (unpackS . TL.cons x) | 56 | tl_cons x = (x:) `eqP` (unpackS . TL.cons x) | 56 | tl_cons x = (x:) `eqP` (unpackS . TL.cons x) | 56 | false | false | 0 | 9 | 20 | 31 | 17 | 14 | null | null |
drx/petal | Interpreter.hs | mit | rhat :: RegisterFile -> Value -> Value
rhat rf (Int n) = Int n | 62 | rhat :: RegisterFile -> Value -> Value
rhat rf (Int n) = Int n | 62 | rhat rf (Int n) = Int n | 23 | false | true | 0 | 10 | 13 | 39 | 17 | 22 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F11.hs | bsd-3-clause | ptr_glGetObjectParameterivARB :: FunPtr (GLhandleARB -> GLenum -> Ptr GLint -> IO ())
ptr_glGetObjectParameterivARB = unsafePerformIO $ getCommand "glGetObjectParameterivARB" | 174 | ptr_glGetObjectParameterivARB :: FunPtr (GLhandleARB -> GLenum -> Ptr GLint -> IO ())
ptr_glGetObjectParameterivARB = unsafePerformIO $ getCommand "glGetObjectParameterivARB" | 174 | ptr_glGetObjectParameterivARB = unsafePerformIO $ getCommand "glGetObjectParameterivARB" | 88 | false | true | 0 | 11 | 17 | 44 | 21 | 23 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F30.hs | bsd-3-clause | ptr_glVertexAttrib4sARB :: FunPtr (GLuint -> GLshort -> GLshort -> GLshort -> GLshort -> IO ())
ptr_glVertexAttrib4sARB = unsafePerformIO $ getCommand "glVertexAttrib4sARB" | 172 | ptr_glVertexAttrib4sARB :: FunPtr (GLuint -> GLshort -> GLshort -> GLshort -> GLshort -> IO ())
ptr_glVertexAttrib4sARB = unsafePerformIO $ getCommand "glVertexAttrib4sARB" | 172 | ptr_glVertexAttrib4sARB = unsafePerformIO $ getCommand "glVertexAttrib4sARB" | 76 | false | true | 0 | 13 | 20 | 49 | 24 | 25 | null | null |
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (NegApp e _) = char '-' <+> pprDebugParendExpr e | 57 | ppr_expr (NegApp e _) = char '-' <+> pprDebugParendExpr e | 57 | ppr_expr (NegApp e _) = char '-' <+> pprDebugParendExpr e | 57 | false | false | 0 | 6 | 9 | 28 | 12 | 16 | null | null |
frantisekfarka/ghc-dsi | compiler/main/HscMain.hs | bsd-3-clause | tcRnModule' :: HscEnv -> ModSummary -> Bool -> HsParsedModule
-> Hsc TcGblEnv
tcRnModule' hsc_env sum save_rn_syntax mod = do
tcg_res <- {-# SCC "Typecheck-Rename" #-}
ioMsgMaybe $
tcRnModule hsc_env (ms_hsc_src sum) save_rn_syntax mod
tcSafeOK <- liftIO $ readIORe... | 1,170 | tcRnModule' :: HscEnv -> ModSummary -> Bool -> HsParsedModule
-> Hsc TcGblEnv
tcRnModule' hsc_env sum save_rn_syntax mod = do
tcg_res <- {-# SCC "Typecheck-Rename" #-}
ioMsgMaybe $
tcRnModule hsc_env (ms_hsc_src sum) save_rn_syntax mod
tcSafeOK <- liftIO $ readIORe... | 1,170 | tcRnModule' hsc_env sum save_rn_syntax mod = do
tcg_res <- {-# SCC "Typecheck-Rename" #-}
ioMsgMaybe $
tcRnModule hsc_env (ms_hsc_src sum) save_rn_syntax mod
tcSafeOK <- liftIO $ readIORef (tcg_safeInfer tcg_res)
dflags <- getDynFlags
-- end of the Safe Haskell line... | 1,080 | false | true | 4 | 16 | 350 | 281 | 128 | 153 | null | null |
helino/wham | src/Wham/PrettyPrinter.hs | bsd-3-clause | printRHS (Just (Nothing, _, StateMode Exception)) = "" | 54 | printRHS (Just (Nothing, _, StateMode Exception)) = "" | 54 | printRHS (Just (Nothing, _, StateMode Exception)) = "" | 54 | false | false | 0 | 8 | 7 | 28 | 14 | 14 | null | null |
hsyl20/ViperVM | haskus-system/src/lib/Haskus/Arch/X86_64/ISA/Size.hs | bsd-3-clause | getSize64 s = error ("getSize: unsupported size: " ++ show s) | 66 | getSize64 s = error ("getSize: unsupported size: " ++ show s) | 66 | getSize64 s = error ("getSize: unsupported size: " ++ show s) | 66 | false | false | 0 | 8 | 15 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | Settings controlling the behavior of a device in kiosk mode. To enable
-- kiosk mode, set kioskCustomLauncherEnabled to true or specify an app in
-- the policy with installType KIOSK.
pKioskCustomization :: Lens' Policy (Maybe KioskCustomization)
pKioskCustomization
= lens _pKioskCustomization
(\ s a -> s{... | 346 | pKioskCustomization :: Lens' Policy (Maybe KioskCustomization)
pKioskCustomization
= lens _pKioskCustomization
(\ s a -> s{_pKioskCustomization = a}) | 157 | pKioskCustomization
= lens _pKioskCustomization
(\ s a -> s{_pKioskCustomization = a}) | 94 | true | true | 0 | 8 | 56 | 51 | 27 | 24 | null | null |
anton-dessiatov/dbmigrations | test/CycleDetectionTest.hs | bsd-3-clause | tests :: [Test]
tests = mkCycleTests | 36 | tests :: [Test]
tests = mkCycleTests | 36 | tests = mkCycleTests | 20 | false | true | 0 | 5 | 5 | 14 | 8 | 6 | null | null |
josefs/bktrees | bench/BKTree.hs | bsd-3-clause | lvn' (t:ts) (dlh:dlt) c ndl ld | length dlt > 0 = lvn' ts dlt c (ndl ++ [m]) m
where
m = foldl1 min [ld + 1, head dlt + 1, dlh + (dif t c)] | 151 | lvn' (t:ts) (dlh:dlt) c ndl ld | length dlt > 0 = lvn' ts dlt c (ndl ++ [m]) m
where
m = foldl1 min [ld + 1, head dlt + 1, dlh + (dif t c)] | 151 | lvn' (t:ts) (dlh:dlt) c ndl ld | length dlt > 0 = lvn' ts dlt c (ndl ++ [m]) m
where
m = foldl1 min [ld + 1, head dlt + 1, dlh + (dif t c)] | 151 | false | false | 2 | 9 | 48 | 110 | 55 | 55 | null | null |
schernichkin/snakes | bench/Main.hs | bsd-3-clause | vectorBench :: Benchmark
vectorBench = bgroup "vectorBench"
[ env (randomVector $ 2^10) $ \ (v :: Vector Char) ->
bench "2^10 Core" $ (nf $ runIdentity . uncurry (snakeInt Nothing)) (v, v)
, env (randomVector $ 2^20) $ \ (v :: Vector Char) ->
bench "2^20 Core" $ (nf $ runIdentity . uncurry (snakeInt Nothing... | 333 | vectorBench :: Benchmark
vectorBench = bgroup "vectorBench"
[ env (randomVector $ 2^10) $ \ (v :: Vector Char) ->
bench "2^10 Core" $ (nf $ runIdentity . uncurry (snakeInt Nothing)) (v, v)
, env (randomVector $ 2^20) $ \ (v :: Vector Char) ->
bench "2^20 Core" $ (nf $ runIdentity . uncurry (snakeInt Nothing... | 333 | vectorBench = bgroup "vectorBench"
[ env (randomVector $ 2^10) $ \ (v :: Vector Char) ->
bench "2^10 Core" $ (nf $ runIdentity . uncurry (snakeInt Nothing)) (v, v)
, env (randomVector $ 2^20) $ \ (v :: Vector Char) ->
bench "2^20 Core" $ (nf $ runIdentity . uncurry (snakeInt Nothing)) (v, v)
] | 308 | false | true | 0 | 14 | 71 | 161 | 82 | 79 | null | null |
CarstenKoenig/AdventOfCode2016 | Day11/Main.hs | mit | answerFrom :: State -> Int
answerFrom = (+ (-1)) . length . solveFrom | 70 | answerFrom :: State -> Int
answerFrom = (+ (-1)) . length . solveFrom | 70 | answerFrom = (+ (-1)) . length . solveFrom | 43 | false | true | 2 | 7 | 13 | 41 | 19 | 22 | null | null |
dragosboca/xmobar | src/Plugins/Monitors/Mpris.hs | bsd-3-clause | unpackMetadata xs = (map (fromVar *** fromVar) . unpack . head) xs where
unpack v = case variantType v of
TypeDictionary _ _ -> dictionaryItems $ fromVar v
TypeVariant -> unpack $ fromVar v
TypeStructure _ -> unpac... | 393 | unpackMetadata xs = (map (fromVar *** fromVar) . unpack . head) xs where
unpack v = case variantType v of
TypeDictionary _ _ -> dictionaryItems $ fromVar v
TypeVariant -> unpack $ fromVar v
TypeStructure _ -> unpac... | 393 | unpackMetadata xs = (map (fromVar *** fromVar) . unpack . head) xs where
unpack v = case variantType v of
TypeDictionary _ _ -> dictionaryItems $ fromVar v
TypeVariant -> unpack $ fromVar v
TypeStructure _ -> unpac... | 393 | false | false | 0 | 12 | 181 | 113 | 53 | 60 | null | null |
christiaanb/SoOSiM | src/SoOSiM/Simulator/Util.hs | mit | incrRunningCount tv = lift $ modifyTVar tv (\mdata -> mdata
{cyclesRunning = cyclesRunning mdata + 1}) | 132 | incrRunningCount tv = lift $ modifyTVar tv (\mdata -> mdata
{cyclesRunning = cyclesRunning mdata + 1}) | 132 | incrRunningCount tv = lift $ modifyTVar tv (\mdata -> mdata
{cyclesRunning = cyclesRunning mdata + 1}) | 132 | false | false | 0 | 12 | 45 | 41 | 21 | 20 | null | null |
yoo-e/weixin-mp-sdk | WeiXin/PublicPlatform/Pay/Function.hs | mit | wxPayCallErrorCode _ = Nothing | 79 | wxPayCallErrorCode _ = Nothing | 79 | wxPayCallErrorCode _ = Nothing | 79 | false | false | 0 | 5 | 52 | 9 | 4 | 5 | null | null |
bravit/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | envBinders = map (\(n, _, b) -> (n, b)) | 39 | envBinders = map (\(n, _, b) -> (n, b)) | 39 | envBinders = map (\(n, _, b) -> (n, b)) | 39 | false | false | 1 | 8 | 8 | 35 | 19 | 16 | null | null |
trskop/cabal | Cabal/Distribution/Simple/Build.hs | bsd-3-clause | repl :: PackageDescription -- ^ Mostly information from the .cabal file
-> LocalBuildInfo -- ^ Configuration information
-> ReplFlags -- ^ Flags that the user passed to build
-> [ PPSuffixHandler ] -- ^ preprocessors to run before compiling
-> [String]
->... | 2,074 | repl :: PackageDescription -- ^ Mostly information from the .cabal file
-> LocalBuildInfo -- ^ Configuration information
-> ReplFlags -- ^ Flags that the user passed to build
-> [ PPSuffixHandler ] -- ^ preprocessors to run before compiling
-> [String]
->... | 2,074 | repl pkg_descr lbi flags suffixes args = do
let distPref = fromFlag (replDistPref flags)
verbosity = fromFlag (replVerbosity flags)
targets <- readBuildTargets pkg_descr args
targets' <- case targets of
[] -> return $ take 1 [ componentName c
| c <- pkgEnabledCom... | 1,747 | false | true | 0 | 17 | 585 | 468 | 228 | 240 | null | null |
ashutoshrishi/blogserver | src/Migration.hs | bsd-3-clause | parseSource :: Source -> IO [Post]
parseSource (Disk dir) = do
allFiles <- catchIOError (listDirectory dir) (\_ -> return [])
catMaybes <$> mapM (parsePostFile . (dir ++)) allFiles | 188 | parseSource :: Source -> IO [Post]
parseSource (Disk dir) = do
allFiles <- catchIOError (listDirectory dir) (\_ -> return [])
catMaybes <$> mapM (parsePostFile . (dir ++)) allFiles | 188 | parseSource (Disk dir) = do
allFiles <- catchIOError (listDirectory dir) (\_ -> return [])
catMaybes <$> mapM (parsePostFile . (dir ++)) allFiles | 153 | false | true | 0 | 13 | 35 | 89 | 43 | 46 | null | null |
brendanhay/gogol | gogol-books/gen/Network/Google/Resource/Books/Layers/AnnotationData/List.hs | mpl-2.0 | -- | RFC 3339 timestamp to restrict to items updated since this timestamp
-- (inclusive).
ladlUpdatedMin :: Lens' LayersAnnotationDataList (Maybe Text)
ladlUpdatedMin
= lens _ladlUpdatedMin
(\ s a -> s{_ladlUpdatedMin = a}) | 231 | ladlUpdatedMin :: Lens' LayersAnnotationDataList (Maybe Text)
ladlUpdatedMin
= lens _ladlUpdatedMin
(\ s a -> s{_ladlUpdatedMin = a}) | 141 | ladlUpdatedMin
= lens _ladlUpdatedMin
(\ s a -> s{_ladlUpdatedMin = a}) | 79 | true | true | 1 | 9 | 39 | 53 | 26 | 27 | null | null |
mbrock/HBEAM | src/Language/Erlang/BEAM/Opcodes.hs | gpl-3.0 | opcodeInfo 124 = ("gc_bif1", 5) | 31 | opcodeInfo 124 = ("gc_bif1", 5) | 31 | opcodeInfo 124 = ("gc_bif1", 5) | 31 | false | false | 0 | 5 | 4 | 15 | 8 | 7 | null | null |
hesselink/type-equality | src-old/Data/Type/Equality.hs | bsd-3-clause | -- | Extract equality of the arguments from an equality of applied types
inner :: f a :~: g b -> a :~: b
inner = fromLeibniz . innerLeibniz . toLeibniz | 151 | inner :: f a :~: g b -> a :~: b
inner = fromLeibniz . innerLeibniz . toLeibniz | 78 | inner = fromLeibniz . innerLeibniz . toLeibniz | 46 | true | true | 0 | 7 | 30 | 38 | 19 | 19 | null | null |
garetht/jsons-to-schema | src/JSONSchema/Draft4/Internal/Utils.hs | mit | -- |Returns the and of the Just values or Nothing if there are no Justs
andMaybe :: [Maybe Bool] -> Maybe Bool
andMaybe = emptyFold and . catMaybes | 147 | andMaybe :: [Maybe Bool] -> Maybe Bool
andMaybe = emptyFold and . catMaybes | 75 | andMaybe = emptyFold and . catMaybes | 36 | true | true | 0 | 8 | 27 | 37 | 17 | 20 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | -- | The private key for the client cert, in pem format. Keep private in
-- order to protect your security.
scdCertPrivateKey :: Lens' SSLCertDetail (Maybe Text)
scdCertPrivateKey
= lens _scdCertPrivateKey
(\ s a -> s{_scdCertPrivateKey = a}) | 250 | scdCertPrivateKey :: Lens' SSLCertDetail (Maybe Text)
scdCertPrivateKey
= lens _scdCertPrivateKey
(\ s a -> s{_scdCertPrivateKey = a}) | 142 | scdCertPrivateKey
= lens _scdCertPrivateKey
(\ s a -> s{_scdCertPrivateKey = a}) | 88 | true | true | 0 | 8 | 45 | 50 | 26 | 24 | null | null |
olsner/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- and type constraints here
topStage, topAnnStage, topSpliceStage :: ThStage
topStage = Comp | 104 | topStage, topAnnStage, topSpliceStage :: ThStage
topStage = Comp | 70 | topStage = Comp | 21 | true | true | 0 | 4 | 23 | 16 | 11 | 5 | null | null |
mtlstats/mtlstats | test/TypesSpec.hs | gpl-3.0 | activeGoalieSearchSpec :: Spec
activeGoalieSearchSpec = describe "activeGoalieSearch" $ do
let
goalies =
[ newGoalie 2 "Joe"
, newGoalie 3 "Bob"
, newGoalie 5 "Steve" & gActive .~ False
]
result n = (n, goalies!!n)
context "partial match" $
it "should return Joe" $
activeG... | 596 | activeGoalieSearchSpec :: Spec
activeGoalieSearchSpec = describe "activeGoalieSearch" $ do
let
goalies =
[ newGoalie 2 "Joe"
, newGoalie 3 "Bob"
, newGoalie 5 "Steve" & gActive .~ False
]
result n = (n, goalies!!n)
context "partial match" $
it "should return Joe" $
activeG... | 596 | activeGoalieSearchSpec = describe "activeGoalieSearch" $ do
let
goalies =
[ newGoalie 2 "Joe"
, newGoalie 3 "Bob"
, newGoalie 5 "Steve" & gActive .~ False
]
result n = (n, goalies!!n)
context "partial match" $
it "should return Joe" $
activeGoalieSearch "e" goalies `should... | 565 | false | true | 0 | 14 | 152 | 182 | 86 | 96 | null | null |
DavidAlphaFox/ghc | libraries/pretty/src/Text/PrettyPrint/HughesPJClass.hs | bsd-3-clause | prettyShow :: (Pretty a) => a -> String
prettyShow = render . pPrint | 68 | prettyShow :: (Pretty a) => a -> String
prettyShow = render . pPrint | 68 | prettyShow = render . pPrint | 28 | false | true | 1 | 8 | 12 | 36 | 16 | 20 | null | null |
yesodweb/persistent | persistent/Database/Persist/TH.hs | mit | maybeExp :: Bool -> Exp -> Exp
maybeExp may exp | may = fmapE `AppE` exp
| otherwise = exp | 107 | maybeExp :: Bool -> Exp -> Exp
maybeExp may exp | may = fmapE `AppE` exp
| otherwise = exp | 107 | maybeExp may exp | may = fmapE `AppE` exp
| otherwise = exp | 76 | false | true | 0 | 7 | 36 | 45 | 22 | 23 | null | null |
pdbartlett/misc-stuff | unfuddle/PdbMisc/Haskell/Tutorial/Hugs.hs | apache-2.0 | my_map :: (a -> b) -> [a] -> [b]
my_map _ [] = [] | 50 | my_map :: (a -> b) -> [a] -> [b]
my_map _ [] = [] | 49 | my_map _ [] = [] | 16 | false | true | 0 | 7 | 14 | 41 | 22 | 19 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | fromListNClassOpKey = mkPreludeMiscIdUnique 500 | 47 | fromListNClassOpKey = mkPreludeMiscIdUnique 500 | 47 | fromListNClassOpKey = mkPreludeMiscIdUnique 500 | 47 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
skill-lang/skill | src/main/resources/haskell/Types.hs | bsd-3-clause | c'A_A (GString value) = value | 29 | c'A_A (GString value) = value | 29 | c'A_A (GString value) = value | 29 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
ghc-android/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | isVoidArg _ = False | 19 | isVoidArg _ = False | 19 | isVoidArg _ = False | 19 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/OffsetExpr.hs | mit | offsetExpr :: Int -> OffsetExpr
offsetExpr offsetValue =
OffsetExpr $
RawSql.fromString "OFFSET " <> RawSql.parameter (SqlValue.fromInt offsetValue) | 154 | offsetExpr :: Int -> OffsetExpr
offsetExpr offsetValue =
OffsetExpr $
RawSql.fromString "OFFSET " <> RawSql.parameter (SqlValue.fromInt offsetValue) | 154 | offsetExpr offsetValue =
OffsetExpr $
RawSql.fromString "OFFSET " <> RawSql.parameter (SqlValue.fromInt offsetValue) | 122 | false | true | 2 | 9 | 22 | 50 | 22 | 28 | null | null |
fluffynukeit/FNIStash | src/FNIStash/Logic/Item.hs | bsd-3-clause | damageTypeLookup 0x04 = Electric | 32 | damageTypeLookup 0x04 = Electric | 32 | damageTypeLookup 0x04 = Electric | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/fromEnum_2.hs | mit | primMinusNatS :: Nat -> Nat -> Nat;
primMinusNatS (Succ x) (Succ y) = primMinusNatS x y | 91 | primMinusNatS :: Nat -> Nat -> Nat
primMinusNatS (Succ x) (Succ y) = primMinusNatS x y | 90 | primMinusNatS (Succ x) (Succ y) = primMinusNatS x y | 51 | false | true | 0 | 7 | 19 | 42 | 21 | 21 | null | null |
florianpilz/autotool | src/Program/Cexp/Type.hs | gpl-2.0 | poke (k:ks) v (Apply op ys) | 0 <= k && k < length ys = do
let ( pre, this: post) = splitAt k ys
that <- poke ks v this
return $ Apply op $ pre ++ that : post | 171 | poke (k:ks) v (Apply op ys) | 0 <= k && k < length ys = do
let ( pre, this: post) = splitAt k ys
that <- poke ks v this
return $ Apply op $ pre ++ that : post | 171 | poke (k:ks) v (Apply op ys) | 0 <= k && k < length ys = do
let ( pre, this: post) = splitAt k ys
that <- poke ks v this
return $ Apply op $ pre ++ that : post | 171 | false | false | 0 | 12 | 54 | 110 | 51 | 59 | null | null |
green-haskell/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- GHCi things
ghciIoClassName, ghciStepIoMName :: Name
ghciIoClassName = clsQual gHC_GHCI (fsLit "GHCiSandboxIO") ghciIoClassKey | 129 | ghciIoClassName, ghciStepIoMName :: Name
ghciIoClassName = clsQual gHC_GHCI (fsLit "GHCiSandboxIO") ghciIoClassKey | 114 | ghciIoClassName = clsQual gHC_GHCI (fsLit "GHCiSandboxIO") ghciIoClassKey | 73 | true | true | 0 | 7 | 13 | 27 | 15 | 12 | null | null |
michalt/cvector | Data/CVector/Unboxed.hs | bsd-3-clause | unsafeUpdate :: (Unbox a) => CVector a -> CVector (Int, a) -> CVector a
unsafeUpdate = G.unsafeUpdate | 101 | unsafeUpdate :: (Unbox a) => CVector a -> CVector (Int, a) -> CVector a
unsafeUpdate = G.unsafeUpdate | 101 | unsafeUpdate = G.unsafeUpdate | 29 | false | true | 0 | 9 | 16 | 45 | 23 | 22 | null | null |
aleator/simple-dc1394 | System/Camera/Firewire/Simple.hs | bsd-3-clause | -- | Poll frames until the camera buffer is empty. Notice that you
-- have to restart the transmission after this call
flushBuffer :: Camera a -> IO ()
flushBuffer cam = alloca $ \(framePtrPtr :: Ptr (Ptr C'dc1394video_frame_t)) -> do
withCameraPtr cam $ flushLoop framePtrPtr
where
flushLoop framePtrPtr cam ... | 658 | flushBuffer :: Camera a -> IO ()
flushBuffer cam = alloca $ \(framePtrPtr :: Ptr (Ptr C'dc1394video_frame_t)) -> do
withCameraPtr cam $ flushLoop framePtrPtr
where
flushLoop framePtrPtr cam = do
c'dc1394_capture_dequeue cam c'DC1394_CAPTURE_POLICY_POLL framePtrPtr
-- print "Flush!"
fram... | 537 | flushBuffer cam = alloca $ \(framePtrPtr :: Ptr (Ptr C'dc1394video_frame_t)) -> do
withCameraPtr cam $ flushLoop framePtrPtr
where
flushLoop framePtrPtr cam = do
c'dc1394_capture_dequeue cam c'DC1394_CAPTURE_POLICY_POLL framePtrPtr
-- print "Flush!"
framePtr :: Ptr C'dc1394video_frame_... | 504 | true | true | 2 | 12 | 143 | 146 | 66 | 80 | null | null |
ARCCN/hcprobe | src/HCProbe/EDSL/Handlers.hs | bsd-3-clause | onReceive :: StatsEntity
-> (StatEntry -> IO ())
-> (OfpType, OfpMessage)
-> IO (OfpType, OfpMessage)
onReceive sE eH m@(_, (OfpMessage _ (OfpPacketOut (OfpPacketOutData bid _pid))))
= receiveHandler sE eH bid m | 245 | onReceive :: StatsEntity
-> (StatEntry -> IO ())
-> (OfpType, OfpMessage)
-> IO (OfpType, OfpMessage)
onReceive sE eH m@(_, (OfpMessage _ (OfpPacketOut (OfpPacketOutData bid _pid))))
= receiveHandler sE eH bid m | 245 | onReceive sE eH m@(_, (OfpMessage _ (OfpPacketOut (OfpPacketOutData bid _pid))))
= receiveHandler sE eH bid m | 113 | false | true | 3 | 12 | 64 | 98 | 52 | 46 | null | null |
shlevy/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | isVecExpr (CmmMachOp (MO_V_Add {}) _) = True | 49 | isVecExpr (CmmMachOp (MO_V_Add {}) _) = True | 49 | isVecExpr (CmmMachOp (MO_V_Add {}) _) = True | 49 | false | false | 0 | 9 | 11 | 24 | 12 | 12 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x1FF3' = "\x03C9\x0345" | 39 | decomposeChar '\x1FF3' = "\x03C9\x0345" | 39 | decomposeChar '\x1FF3' = "\x03C9\x0345" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
allanderek/ipclib | Language/Hydra/Print.hs | gpl-2.0 | printCassign (DNAMidentIncr ident) =
unwords [ hprintQualifiedName ident
, "="
, hprintQualifiedName ident
, " + 1 ;"
] | 173 | printCassign (DNAMidentIncr ident) =
unwords [ hprintQualifiedName ident
, "="
, hprintQualifiedName ident
, " + 1 ;"
] | 173 | printCassign (DNAMidentIncr ident) =
unwords [ hprintQualifiedName ident
, "="
, hprintQualifiedName ident
, " + 1 ;"
] | 173 | false | false | 0 | 7 | 72 | 36 | 18 | 18 | null | null |
GaloisInc/halvm-ghc | compiler/utils/Outputable.hs | bsd-3-clause | showSDocDebug :: DynFlags -> SDoc -> String
showSDocDebug dflags d = renderWithStyle dflags d PprDebug | 102 | showSDocDebug :: DynFlags -> SDoc -> String
showSDocDebug dflags d = renderWithStyle dflags d PprDebug | 102 | showSDocDebug dflags d = renderWithStyle dflags d PprDebug | 58 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 226525 = 5566 | 33 | getValueFromProduct 226525 = 5566 | 33 | getValueFromProduct 226525 = 5566 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
audreyt/findbin | src/System/Environment/FindBin.hs | mit | -- | Unsafe (/constant/) version of 'getProgPath'.
__Bin__ :: String
__Bin__ = let path = unsafePerformIO getProgPath
in length path `seq` path | 147 | __Bin__ :: String
__Bin__ = let path = unsafePerformIO getProgPath
in length path `seq` path | 96 | __Bin__ = let path = unsafePerformIO getProgPath
in length path `seq` path | 78 | true | true | 0 | 9 | 25 | 44 | 20 | 24 | null | null |
allanderek/ipclib | Language/Pepa/Analysis/FixMap.hs | gpl-2.0 | {-|
And now we come to the main purpose of this module.
This function takes in a function which perhaps modifies a fix map, but also
perhaps returns the one given. This function repeatedly calls the given function
on the fixmap until it is unchanged.
Note, clearly the user must be careful to provide a functio... | 578 | fixPoint :: (FixMap k a -> FixMap k a) -> FixMap k a -> FixMap k a
fixPoint f inputMap
| modified = fixPoint f (False, outputMap)
| otherwise = inputMap
where (modified, outputMap) = f inputMap | 207 | fixPoint f inputMap
| modified = fixPoint f (False, outputMap)
| otherwise = inputMap
where (modified, outputMap) = f inputMap | 140 | true | true | 0 | 8 | 127 | 95 | 46 | 49 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.