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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
quintenpalmer/dungeons | server/src/Character/Util.hs | mit | sOnce :: Char -> String -> String -> (String, String)
sOnce _ [] buf = (buf, "") | 80 | sOnce :: Char -> String -> String -> (String, String)
sOnce _ [] buf = (buf, "") | 80 | sOnce _ [] buf = (buf, "") | 26 | false | true | 0 | 8 | 16 | 44 | 24 | 20 | null | null |
bos/statistics | Statistics/Correlation.hs | bsd-2-clause | ----------------------------------------------------------------
-- Spearman
----------------------------------------------------------------
-- | compute spearman correlation between two samples
spearman :: ( Ord a
, Ord b
, G.Vector v a
, G.Vector v b
, G.Vector v (a, ... | 648 | spearman :: ( Ord a
, Ord b
, G.Vector v a
, G.Vector v b
, G.Vector v (a, b)
, G.Vector v Int
, G.Vector v Double
, G.Vector v (Double, Double)
, G.Vector v (Int, a)
, G.Vector v (Int, b)
)
... | 451 | spearman xy
= pearson
$ G.zip (rankUnsorted x) (rankUnsorted y)
where
(x, y) = G.unzip xy
| 100 | true | true | 2 | 8 | 228 | 194 | 103 | 91 | null | null |
kojiromike/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v LFSqrt [x] = v ++ flUnOp "sqrt" (creg x) | 47 | doOp v LFSqrt [x] = v ++ flUnOp "sqrt" (creg x) | 47 | doOp v LFSqrt [x] = v ++ flUnOp "sqrt" (creg x) | 47 | false | false | 0 | 8 | 10 | 31 | 15 | 16 | null | null |
geggo98/backup-octo-wookie | src/Main.hs | unlicense | mergePrimes x ps@(pt@(p,m):pr)
| p==x = (p,m+1):pr
| p>x = (x,1) : ps
| otherwise = pt : mergePrimes x pr | 128 | mergePrimes x ps@(pt@(p,m):pr)
| p==x = (p,m+1):pr
| p>x = (x,1) : ps
| otherwise = pt : mergePrimes x pr | 128 | mergePrimes x ps@(pt@(p,m):pr)
| p==x = (p,m+1):pr
| p>x = (x,1) : ps
| otherwise = pt : mergePrimes x pr | 128 | false | false | 3 | 9 | 43 | 108 | 52 | 56 | null | null |
rueshyna/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | Inserts rows into a table.
reqInsertTableRows :: Lens' Request' (Maybe InsertTableRowsRequest)
reqInsertTableRows
= lens _reqInsertTableRows
(\ s a -> s{_reqInsertTableRows = a}) | 191 | reqInsertTableRows :: Lens' Request' (Maybe InsertTableRowsRequest)
reqInsertTableRows
= lens _reqInsertTableRows
(\ s a -> s{_reqInsertTableRows = a}) | 159 | reqInsertTableRows
= lens _reqInsertTableRows
(\ s a -> s{_reqInsertTableRows = a}) | 91 | true | true | 0 | 9 | 31 | 48 | 25 | 23 | null | null |
ndmitchell/shake | src/Development/Shake/Internal/Core/Types.hs | bsd-3-clause | userRuleSize (Versioned _ x) = userRuleSize x | 45 | userRuleSize (Versioned _ x) = userRuleSize x | 45 | userRuleSize (Versioned _ x) = userRuleSize x | 45 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M05/D04/Solution.hs | mit | pack2arts :: Day -> Packet Value -> [(Value, Article)]
pack2arts day (Pack arts) = mapMaybe (r2m . (id &&& fromJSON)) arts
where r2m (y, Success x) = Just (y, x)
r2m _ = Nothing
-- but we also need to weed out articles too old in the packet: | 267 | pack2arts :: Day -> Packet Value -> [(Value, Article)]
pack2arts day (Pack arts) = mapMaybe (r2m . (id &&& fromJSON)) arts
where r2m (y, Success x) = Just (y, x)
r2m _ = Nothing
-- but we also need to weed out articles too old in the packet: | 267 | pack2arts day (Pack arts) = mapMaybe (r2m . (id &&& fromJSON)) arts
where r2m (y, Success x) = Just (y, x)
r2m _ = Nothing
-- but we also need to weed out articles too old in the packet: | 212 | false | true | 0 | 9 | 73 | 98 | 52 | 46 | null | null |
keithodulaigh/Hets | DFOL/Sign.hs | gpl-2.0 | printSig :: Sign -> Doc
printSig (Sign []) = text "EmptySig" | 60 | printSig :: Sign -> Doc
printSig (Sign []) = text "EmptySig" | 60 | printSig (Sign []) = text "EmptySig" | 36 | false | true | 0 | 10 | 10 | 35 | 15 | 20 | null | null |
psfblair/freepalace | src/FreePalace/Handlers/Incoming.hs | apache-2.0 | handleInboundEvent clientState (InboundMessages.UserDisconnectedMessage userDisconnected) = handleUserDisconnected clientState userDisconnected | 143 | handleInboundEvent clientState (InboundMessages.UserDisconnectedMessage userDisconnected) = handleUserDisconnected clientState userDisconnected | 143 | handleInboundEvent clientState (InboundMessages.UserDisconnectedMessage userDisconnected) = handleUserDisconnected clientState userDisconnected | 143 | false | false | 0 | 8 | 7 | 24 | 11 | 13 | null | null |
omefire/lens | src/Control/Lens/Traversal.hs | bsd-3-clause | -- | Sequence a container using a specified 'Applicative'.
--
-- This is like 'traverseBy' where the 'Traversable' instance can be specified by any 'Traversal'
--
-- @
-- 'sequenceByOf' 'traverse' ≡ 'sequenceBy'
-- @
sequenceByOf :: Traversal s t (f b) b -> (forall x. x -> f x) -> (forall x y. f (x -> y) -> f x -> f y)... | 407 | sequenceByOf :: Traversal s t (f b) b -> (forall x. x -> f x) -> (forall x y. f (x -> y) -> f x -> f y) -> s -> f t
sequenceByOf l pur app = reifyApplicative pur app (l ReflectedApplicative) | 190 | sequenceByOf l pur app = reifyApplicative pur app (l ReflectedApplicative) | 74 | true | true | 0 | 13 | 78 | 120 | 63 | 57 | null | null |
tcoenraad/functioneel-programmeren | practica/serie6/find-paths.hs | mit | g!5 = [] | 8 | g!5 = [] | 8 | g!5 = [] | 8 | false | false | 0 | 5 | 2 | 13 | 5 | 8 | null | null |
tibbe/ghc | compiler/cmm/PprC.hs | bsd-3-clause | te_BB :: CmmBlock -> TE ()
te_BB block = mapM_ te_Stmt (blockToList mid) >> te_Stmt last
where (_, mid, last) = blockSplit block | 130 | te_BB :: CmmBlock -> TE ()
te_BB block = mapM_ te_Stmt (blockToList mid) >> te_Stmt last
where (_, mid, last) = blockSplit block | 130 | te_BB block = mapM_ te_Stmt (blockToList mid) >> te_Stmt last
where (_, mid, last) = blockSplit block | 103 | false | true | 0 | 8 | 24 | 61 | 30 | 31 | null | null |
cshung/MiscLab | Haskell99/q10.test.hs | mit | test1 = TestCase (assertEqualIntTupleList "encode [] should be []." ([] ) (encode [] )) | 129 | test1 = TestCase (assertEqualIntTupleList "encode [] should be []." ([] ) (encode [] )) | 129 | test1 = TestCase (assertEqualIntTupleList "encode [] should be []." ([] ) (encode [] )) | 129 | false | false | 0 | 10 | 55 | 32 | 16 | 16 | null | null |
alpheccar/Signal | Windows.hs | bsd-3-clause | flattenWithOverlapS :: (Unbox a,Num a, Fractional t)
=> Int -- ^ Window size
-> Int -- ^ Overlap
-> Sampled t (U.Vector a) -- ^ Signal
-> Sampled t a -- ^ Result and new sampling period
flattenWithOverlapS winSize o s | null (getSamples .... | 1,680 | flattenWithOverlapS :: (Unbox a,Num a, Fractional t)
=> Int -- ^ Window size
-> Int -- ^ Overlap
-> Sampled t (U.Vector a) -- ^ Signal
-> Sampled t a
flattenWithOverlapS winSize o s | null (getSamples . getSignal $ s) = error "A signal ca... | 1,644 | flattenWithOverlapS winSize o s | null (getSamples . getSignal $ s) = error "A signal can't be empty : in flattenWithOverlapS"
| o == 0 = Sampled r' (concatMapS U.toList . getSignal $ s)
| otherwise =
l... | 1,413 | true | true | 0 | 17 | 1,051 | 402 | 199 | 203 | null | null |
Raveline/Rocketfuel | src/Rocketfuel/Grid.hs | mit | generateRandomCell :: (MonadRandom r) => r Cell
generateRandomCell = getRandomR'(Fuel, Navigate) | 96 | generateRandomCell :: (MonadRandom r) => r Cell
generateRandomCell = getRandomR'(Fuel, Navigate) | 96 | generateRandomCell = getRandomR'(Fuel, Navigate) | 48 | false | true | 0 | 6 | 10 | 32 | 17 | 15 | null | null |
Fuuzetsu/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | moduleBasename :: Module -> FilePath
moduleBasename mdl = map (\c -> if c == '.' then '-' else c)
(moduleNameString (moduleName mdl)) | 158 | moduleBasename :: Module -> FilePath
moduleBasename mdl = map (\c -> if c == '.' then '-' else c)
(moduleNameString (moduleName mdl)) | 158 | moduleBasename mdl = map (\c -> if c == '.' then '-' else c)
(moduleNameString (moduleName mdl)) | 121 | false | true | 0 | 9 | 46 | 55 | 29 | 26 | null | null |
tjakway/ghcjvm | compiler/types/CoAxiom.hs | bsd-3-clause | manyBranches :: [CoAxBranch] -> Branches Branched
manyBranches brs = ASSERT( snd bnds >= fst bnds )
MkBranches (listArray bnds brs)
where
bnds = (0, length brs - 1) | 189 | manyBranches :: [CoAxBranch] -> Branches Branched
manyBranches brs = ASSERT( snd bnds >= fst bnds )
MkBranches (listArray bnds brs)
where
bnds = (0, length brs - 1) | 189 | manyBranches brs = ASSERT( snd bnds >= fst bnds )
MkBranches (listArray bnds brs)
where
bnds = (0, length brs - 1) | 139 | false | true | 0 | 8 | 52 | 73 | 36 | 37 | null | null |
emwap/feldspar-language | src/Feldspar/Core/Constructs/Tuple.hs | bsd-3-clause | sel9Size Tup15Type{} = $(proj 15 8) | 35 | sel9Size Tup15Type{} = $(proj 15 8) | 35 | sel9Size Tup15Type{} = $(proj 15 8) | 35 | false | false | 0 | 7 | 5 | 22 | 10 | 12 | null | null |
jespino/haskell-validate | Tests/US.hs | bsd-3-clause | tests_US = TestList [tests_US_region, tests_US_ssn] | 51 | tests_US = TestList [tests_US_region, tests_US_ssn] | 51 | tests_US = TestList [tests_US_region, tests_US_ssn] | 51 | false | false | 0 | 6 | 4 | 15 | 8 | 7 | null | null |
kojiromike/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | highestFC (PLet fc _ _ _ _ _ _) = Just fc | 43 | highestFC (PLet fc _ _ _ _ _ _) = Just fc | 43 | highestFC (PLet fc _ _ _ _ _ _) = Just fc | 43 | false | false | 0 | 6 | 13 | 31 | 14 | 17 | null | null |
TransformingMusicology/tabcode-haskell | src/TabCode/Serialiser/MEIXML/Serialiser.hs | gpl-3.0 | meiDoc (MEIMensur attrs children) xmlIds =
meiXml "mensur" attrs children xmlIds | 83 | meiDoc (MEIMensur attrs children) xmlIds =
meiXml "mensur" attrs children xmlIds | 83 | meiDoc (MEIMensur attrs children) xmlIds =
meiXml "mensur" attrs children xmlIds | 83 | false | false | 0 | 7 | 13 | 28 | 13 | 15 | null | null |
wyn/blash | src/BlashImpl.hs | bsd-3-clause | -- /********************************* BLAS1 routines *************************/
-- TODO get the constraint 0 <= i < n in here
stride :: Size -> Inc -> (Int -> Int)
stride n inc =
-- Old fortran code - need to do
-- haskell_index = fortran_index-1
--
-- IX = 1
-- IY = 1
-- IF (INCX.LT.0) IX = (-N+1)*INCX + ... | 553 | stride :: Size -> Inc -> (Int -> Int)
stride n inc =
-- Old fortran code - need to do
-- haskell_index = fortran_index-1
--
-- IX = 1
-- IY = 1
-- IF (INCX.LT.0) IX = (-N+1)*INCX + 1
-- IF (INCY.LT.0) IY = (-N+1)*INCY + 1
-- DO I = 1,N
-- DY(IY) = DX(IX) OR SOME OTHER OPERATION
-- IX = IX + IN... | 426 | stride n inc =
-- Old fortran code - need to do
-- haskell_index = fortran_index-1
--
-- IX = 1
-- IY = 1
-- IF (INCX.LT.0) IX = (-N+1)*INCX + 1
-- IF (INCY.LT.0) IY = (-N+1)*INCY + 1
-- DO I = 1,N
-- DY(IY) = DX(IX) OR SOME OTHER OPERATION
-- IX = IX + INCX
-- IY = IY + INCY
-- END DO
... | 388 | true | true | 0 | 12 | 151 | 92 | 55 | 37 | null | null |
kmate/HaRe | old/testing/asPatterns/M1.hs | bsd-3-clause | main :: IO ()
main = do
(T val Empty Empty) <- buildtree [3,1,2]
putStrLn $ show (T val Empty Empty) | 123 | main :: IO ()
main = do
(T val Empty Empty) <- buildtree [3,1,2]
putStrLn $ show (T val Empty Empty) | 123 | main = do
(T val Empty Empty) <- buildtree [3,1,2]
putStrLn $ show (T val Empty Empty) | 109 | false | true | 0 | 11 | 43 | 71 | 33 | 38 | null | null |
lierdakil/pandoc-crossref | test/test-pandoc-crossref.hs | gpl-2.0 | cit :: T.Text -> [Citation]
cit r = [defCit{citationId=r}] | 58 | cit :: T.Text -> [Citation]
cit r = [defCit{citationId=r}] | 58 | cit r = [defCit{citationId=r}] | 30 | false | true | 0 | 7 | 8 | 34 | 19 | 15 | null | null |
chemist/highlighter | src/Text/Highlighter/Lexers/Python.hs | bsd-3-clause | keywords' :: TokenMatcher
keywords' =
[ tok "(assert|break|continue|del|elif|else|except|exec|finally|for|global|if|lambda|pass|print|raise|return|try|while|yield|as|with)\\b" (Arbitrary "Keyword")
] | 207 | keywords' :: TokenMatcher
keywords' =
[ tok "(assert|break|continue|del|elif|else|except|exec|finally|for|global|if|lambda|pass|print|raise|return|try|while|yield|as|with)\\b" (Arbitrary "Keyword")
] | 207 | keywords' =
[ tok "(assert|break|continue|del|elif|else|except|exec|finally|for|global|if|lambda|pass|print|raise|return|try|while|yield|as|with)\\b" (Arbitrary "Keyword")
] | 181 | false | true | 0 | 8 | 18 | 25 | 13 | 12 | null | null |
GaloisInc/halvm-ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | hsExprNeedsParens (ExplicitList {}) = False | 45 | hsExprNeedsParens (ExplicitList {}) = False | 45 | hsExprNeedsParens (ExplicitList {}) = False | 45 | false | false | 0 | 7 | 6 | 16 | 8 | 8 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | ID of the creative asset. This is a required field.
camaAssetIdentifier :: Lens' CreativeAssetMetadata (Maybe CreativeAssetId)
camaAssetIdentifier
= lens _camaAssetIdentifier
(\ s a -> s{_camaAssetIdentifier = a}) | 226 | camaAssetIdentifier :: Lens' CreativeAssetMetadata (Maybe CreativeAssetId)
camaAssetIdentifier
= lens _camaAssetIdentifier
(\ s a -> s{_camaAssetIdentifier = a}) | 169 | camaAssetIdentifier
= lens _camaAssetIdentifier
(\ s a -> s{_camaAssetIdentifier = a}) | 94 | true | true | 0 | 9 | 36 | 46 | 25 | 21 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ssHvparamsXenFake :: String
ssHvparamsXenFake = ssHvparamsPref ++ htFake | 72 | ssHvparamsXenFake :: String
ssHvparamsXenFake = ssHvparamsPref ++ htFake | 72 | ssHvparamsXenFake = ssHvparamsPref ++ htFake | 44 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
suhailshergill/liboleg | Language/TEval/TInfTEnv.hs | bsd-3-clause | -- | If either t1 or t2 are type variables, they are definitely unbound
unify' :: Typ -> Typ -> TVE -> Either String TVE
unify' TInt TInt = Right | 145 | unify' :: Typ -> Typ -> TVE -> Either String TVE
unify' TInt TInt = Right | 73 | unify' TInt TInt = Right | 24 | true | true | 0 | 8 | 29 | 34 | 17 | 17 | null | null |
rahulmutt/ghcvm | compiler/Eta/Iface/IfaceType.hs | bsd-3-clause | pprIfaceSigmaType :: IfaceType -> SDoc
pprIfaceSigmaType ty = ppr_iface_sigma_type False ty | 91 | pprIfaceSigmaType :: IfaceType -> SDoc
pprIfaceSigmaType ty = ppr_iface_sigma_type False ty | 91 | pprIfaceSigmaType ty = ppr_iface_sigma_type False ty | 52 | false | true | 0 | 5 | 10 | 23 | 11 | 12 | null | null |
coghex/abridgefaraway | src/ABFA/Time.hs | bsd-3-clause | animTime :: Env -> State -> Int -> TimerState -> IO ()
animTime env state n TStop = do
let statechan = envStateChan4 env
timerchan = envATimerChan env
tsnew <- atomically $ readChan timerchan
firstunits <- atomically $ readChan statechan
let newstate = animState state env
animTime env newstate n ts... | 323 | animTime :: Env -> State -> Int -> TimerState -> IO ()
animTime env state n TStop = do
let statechan = envStateChan4 env
timerchan = envATimerChan env
tsnew <- atomically $ readChan timerchan
firstunits <- atomically $ readChan statechan
let newstate = animState state env
animTime env newstate n ts... | 323 | animTime env state n TStop = do
let statechan = envStateChan4 env
timerchan = envATimerChan env
tsnew <- atomically $ readChan timerchan
firstunits <- atomically $ readChan statechan
let newstate = animState state env
animTime env newstate n tsnew | 268 | false | true | 0 | 10 | 71 | 115 | 52 | 63 | null | null |
sdiehl/ghc | testsuite/tests/cmm/should_compile/T16930.hs | bsd-3-clause | b :: Int
b = a + 7 | 18 | b :: Int
b = a + 7 | 18 | b = a + 7 | 9 | false | true | 2 | 6 | 7 | 23 | 9 | 14 | null | null |
ice1000/OI-codes | codewars/101-200/human-readable-time.hs | agpl-3.0 | format :: Int -> String
format a|a < 10 = "0" ++ show a
|otherwise = show a | 86 | format :: Int -> String
format a|a < 10 = "0" ++ show a
|otherwise = show a | 86 | format a|a < 10 = "0" ++ show a
|otherwise = show a | 62 | false | true | 0 | 8 | 28 | 54 | 23 | 31 | null | null |
Heather/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | bitBin ITNative op [I x, I y] = Just $ I (op x y) | 53 | bitBin ITNative op [I x, I y] = Just $ I (op x y) | 53 | bitBin ITNative op [I x, I y] = Just $ I (op x y) | 53 | false | false | 0 | 8 | 17 | 43 | 19 | 24 | null | null |
beni55/bayes-stack | SharedTasteTest.hs | bsd-3-clause | -- | Number of Gibbs sweeps
nIter = 1000 | 40 | nIter = 1000 | 12 | nIter = 1000 | 12 | true | false | 0 | 4 | 8 | 7 | 4 | 3 | null | null |
NicolasDP/hs-smtp | tests/Arbitrary.hs | bsd-3-clause | arbitraryRCPT :: Gen Command
arbitraryRCPT = RCPT <$> arbitraryForwardPath <*> arbitraryMailParameters | 102 | arbitraryRCPT :: Gen Command
arbitraryRCPT = RCPT <$> arbitraryForwardPath <*> arbitraryMailParameters | 102 | arbitraryRCPT = RCPT <$> arbitraryForwardPath <*> arbitraryMailParameters | 73 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
MarcusVoelker/Recolang | CodeModel/Function.hs | mit | showStatement _ (TupleLiteral ts) = "(" ++ intercalate "," (map show ts) ++ ")" | 79 | showStatement _ (TupleLiteral ts) = "(" ++ intercalate "," (map show ts) ++ ")" | 79 | showStatement _ (TupleLiteral ts) = "(" ++ intercalate "," (map show ts) ++ ")" | 79 | false | false | 1 | 9 | 13 | 41 | 18 | 23 | null | null |
benkolera/haskell-opaleye | src/Opaleye/Internal/Sql.hs | bsd-3-clause | ensureColumns :: [(HSql.SqlExpr, Maybe a)]
-> NEL.NonEmpty (HSql.SqlExpr, Maybe a)
ensureColumns = ensureColumnsGen (\x -> (x,Nothing)) | 148 | ensureColumns :: [(HSql.SqlExpr, Maybe a)]
-> NEL.NonEmpty (HSql.SqlExpr, Maybe a)
ensureColumns = ensureColumnsGen (\x -> (x,Nothing)) | 148 | ensureColumns = ensureColumnsGen (\x -> (x,Nothing)) | 52 | false | true | 0 | 8 | 28 | 62 | 34 | 28 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/Const.hs | apache-2.0 | constValType (CFloat _) = BaseType JFloat | 42 | constValType (CFloat _) = BaseType JFloat | 42 | constValType (CFloat _) = BaseType JFloat | 42 | false | false | 0 | 6 | 6 | 19 | 8 | 11 | null | null |
mrmonday/Idris-dev | src/Idris/Elab/Class.hs | bsd-3-clause | findDets :: Name -> [Name] -> Idris [Int]
findDets n ns =
do i <- getIState
return $ case lookupTyExact n (tt_ctxt i) of
Just ty -> getDetPos 0 ns ty
Nothing -> []
where
getDetPos i ns (Bind n (Pi _ _ _) sc)
| n `elem` ns = i : getDetPos (i + 1) ns sc
| otherwise =... | 369 | findDets :: Name -> [Name] -> Idris [Int]
findDets n ns =
do i <- getIState
return $ case lookupTyExact n (tt_ctxt i) of
Just ty -> getDetPos 0 ns ty
Nothing -> []
where
getDetPos i ns (Bind n (Pi _ _ _) sc)
| n `elem` ns = i : getDetPos (i + 1) ns sc
| otherwise =... | 369 | findDets n ns =
do i <- getIState
return $ case lookupTyExact n (tt_ctxt i) of
Just ty -> getDetPos 0 ns ty
Nothing -> []
where
getDetPos i ns (Bind n (Pi _ _ _) sc)
| n `elem` ns = i : getDetPos (i + 1) ns sc
| otherwise = getDetPos (i + 1) ns sc
getDetPos _ _... | 327 | false | true | 2 | 11 | 131 | 200 | 93 | 107 | null | null |
Super-Fluid/heqet | Heqet/Meters.hs | gpl-3.0 | -- 7/8 possibilities
m3'3'2_8 :: MMeter
m3'3'2_8 = (concat [measure,beat,beatAt $ 3/8,beatAt $ 6/8], 7/8) | 105 | m3'3'2_8 :: MMeter
m3'3'2_8 = (concat [measure,beat,beatAt $ 3/8,beatAt $ 6/8], 7/8) | 84 | m3'3'2_8 = (concat [measure,beat,beatAt $ 3/8,beatAt $ 6/8], 7/8) | 65 | true | true | 0 | 9 | 14 | 53 | 30 | 23 | null | null |
psibi/shakespeare | Text/Css.hs | mit | blockRuntime :: [(Deref, CDData url)]
-> (url -> [(Text, Text)] -> Text)
-> Block Unresolved
-> Either String (DList (Block Resolved))
-- FIXME share code with blockToCss
blockRuntime cd render' (Block x attrs z mixinsDerefs) = do
mixins <- mapM getMixin mixinsDerefs
x' <-... | 1,513 | blockRuntime :: [(Deref, CDData url)]
-> (url -> [(Text, Text)] -> Text)
-> Block Unresolved
-> Either String (DList (Block Resolved))
blockRuntime cd render' (Block x attrs z mixinsDerefs) = do
mixins <- mapM getMixin mixinsDerefs
x' <- mapM go' $ intercalate [ContentRaw ... | 1,477 | blockRuntime cd render' (Block x attrs z mixinsDerefs) = do
mixins <- mapM getMixin mixinsDerefs
x' <- mapM go' $ intercalate [ContentRaw ","] x
attrs' <- mapM resolveAttr attrs
z' <- mapM (subGo x) z -- FIXME use difflists again
Right $ \rest -> Block
{ blockSelector = mconcat x'
, ... | 1,303 | true | true | 0 | 13 | 475 | 496 | 248 | 248 | null | null |
SamirTalwar/advent-of-code | 2016/AOC_06_1.hs | mit | main = do
messages <- lines <$> getContents
let characters = List.transpose messages
let modalCharacters = map modal characters
putStrLn modalCharacters | 160 | main = do
messages <- lines <$> getContents
let characters = List.transpose messages
let modalCharacters = map modal characters
putStrLn modalCharacters | 160 | main = do
messages <- lines <$> getContents
let characters = List.transpose messages
let modalCharacters = map modal characters
putStrLn modalCharacters | 160 | false | false | 1 | 12 | 28 | 55 | 22 | 33 | null | null |
kyren/hsgb | lib/Gameboy/Instructions.hs | unlicense | encodeInstruction (RL_R ERegister) = [0xcb, 0x13] | 49 | encodeInstruction (RL_R ERegister) = [0xcb, 0x13] | 49 | encodeInstruction (RL_R ERegister) = [0xcb, 0x13] | 49 | false | false | 0 | 6 | 5 | 22 | 11 | 11 | null | null |
penteract/HigherOrderHornRefinement | HOCHC/Printing.hs | bsd-3-clause | base other = error ("Printing.hs, base: \n" ++ show other) | 58 | base other = error ("Printing.hs, base: \n" ++ show other) | 58 | base other = error ("Printing.hs, base: \n" ++ show other) | 58 | false | false | 1 | 8 | 9 | 26 | 10 | 16 | null | null |
bitemyapp/stm-chans | src/Control/Concurrent/STM/TBChan.hs | bsd-3-clause | -- | A version of 'peekTBChan' which does not retry. Instead it
-- returns @Nothing@ if no value is available.
tryPeekTBChan :: TBChan a -> STM (Maybe a)
tryPeekTBChan (TBChan _slots _reads chan) =
tryPeekTChan chan | 219 | tryPeekTBChan :: TBChan a -> STM (Maybe a)
tryPeekTBChan (TBChan _slots _reads chan) =
tryPeekTChan chan | 108 | tryPeekTBChan (TBChan _slots _reads chan) =
tryPeekTChan chan | 65 | true | true | 0 | 8 | 39 | 45 | 22 | 23 | null | null |
expipiplus1/spir-v | Language/SpirV/OpCode.hs | mit | instructionSize OpAtomicSMin = Fixed 7 | 38 | instructionSize OpAtomicSMin = Fixed 7 | 38 | instructionSize OpAtomicSMin = Fixed 7 | 38 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
Mathnerd314/lamdu | test/InferWrappers.hs | gpl-3.0 | inferResults :: ExprIRef.Expression t (Infer.Inferred (DefI t)) -> InferResults t
inferResults = fmap (void . Infer.iValue &&& void . Infer.iType) | 146 | inferResults :: ExprIRef.Expression t (Infer.Inferred (DefI t)) -> InferResults t
inferResults = fmap (void . Infer.iValue &&& void . Infer.iType) | 146 | inferResults = fmap (void . Infer.iValue &&& void . Infer.iType) | 64 | false | true | 0 | 10 | 19 | 61 | 30 | 31 | null | null |
plow-technologies/live-vdom | src/LiveVDom/Render.hs | mit | runDom :: DOMNode
-> IO ()
-> Elem Identity
-> IO ()
runDom container postRun element = do
EV.initEventDelegation EV.defaultEvents
let (vdm, _) = runIdentity $ renderElement element
vmount <- mount container $ div () ()
vn' <- renderDom vmount vdm
_ <- inAnimationFrame ContinueAsync (\_ -> p... | 595 | runDom :: DOMNode
-> IO ()
-> Elem Identity
-> IO ()
runDom container postRun element = do
EV.initEventDelegation EV.defaultEvents
let (vdm, _) = runIdentity $ renderElement element
vmount <- mount container $ div () ()
vn' <- renderDom vmount vdm
_ <- inAnimationFrame ContinueAsync (\_ -> p... | 595 | runDom container postRun element = do
EV.initEventDelegation EV.defaultEvents
let (vdm, _) = runIdentity $ renderElement element
vmount <- mount container $ div () ()
vn' <- renderDom vmount vdm
_ <- inAnimationFrame ContinueAsync (\_ -> postRun)
foldOnChangeWith waitForDom (return vdm) (\_ v -> renderDom v... | 524 | false | true | 0 | 12 | 129 | 172 | 80 | 92 | null | null |
nimia/bottle | bottlelib/Data/Vector/Vector2.hs | gpl-3.0 | fst :: Vector2 a -> a
fst (Vector2 x _) = x | 43 | fst :: Vector2 a -> a
fst (Vector2 x _) = x | 43 | fst (Vector2 x _) = x | 21 | false | true | 0 | 6 | 11 | 33 | 15 | 18 | null | null |
k16shikano/hpdft | src/PDF/OpenType.hs | mit | searchRange = getUint16 | 23 | searchRange = getUint16 | 23 | searchRange = getUint16 | 23 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
bj4rtmar/sdl2 | src/SDL/Raw/Haptic.hs | bsd-3-clause | hapticDestroyEffect :: MonadIO m => Haptic -> CInt -> m ()
hapticDestroyEffect v1 v2 = liftIO $ hapticDestroyEffect' v1 v2 | 122 | hapticDestroyEffect :: MonadIO m => Haptic -> CInt -> m ()
hapticDestroyEffect v1 v2 = liftIO $ hapticDestroyEffect' v1 v2 | 122 | hapticDestroyEffect v1 v2 = liftIO $ hapticDestroyEffect' v1 v2 | 63 | false | true | 0 | 9 | 19 | 45 | 21 | 24 | null | null |
shockkolate/containers | Data/Map/Base.hs | bsd-3-clause | -- | /O(n+m)/. Intersection with a combining function. The implementation uses
-- an efficient /hedge/ algorithm comparable with /hedge-union/.
--
-- > let f k al ar = (show k) ++ ":" ++ al ++ "|" ++ ar
-- > intersectionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == singleton 5 "5:a|A"
... | 507 | intersectionWithKey :: Ord k => (k -> a -> b -> c) -> Map k a -> Map k b -> Map k c
intersectionWithKey f t1 t2 = mergeWithKey (\k x1 x2 -> Just $ f k x1 x2) (const Tip) (const Tip) t1 t2 | 187 | intersectionWithKey f t1 t2 = mergeWithKey (\k x1 x2 -> Just $ f k x1 x2) (const Tip) (const Tip) t1 t2 | 103 | true | true | 0 | 11 | 104 | 123 | 61 | 62 | null | null |
tarleb/zeitkraut-blog | hakyll/src/ZeitKraut/Blog/Main.hs | agpl-3.0 | sassCompiler :: Compiler (Item String)
sassCompiler = getResourceString
>>= withItemBody (unixFilter "node-sass" ["-s", "--scss"])
>>= return . fmap compressCss | 190 | sassCompiler :: Compiler (Item String)
sassCompiler = getResourceString
>>= withItemBody (unixFilter "node-sass" ["-s", "--scss"])
>>= return . fmap compressCss | 190 | sassCompiler = getResourceString
>>= withItemBody (unixFilter "node-sass" ["-s", "--scss"])
>>= return . fmap compressCss | 151 | false | true | 0 | 11 | 48 | 52 | 26 | 26 | null | null |
razvan9310/barrelfish | hake/RuleDefs.hs | mit | -------------------------------------------------------------------------
--
-- Functions with logic to start doing things
--
--
-- Create C file dependencies
--
-- Since this is where we know what the depfile is called it is here that we also
-- decide to include it. This stops many different places below trying to... | 608 | makeDependArchSub :: Options -> String -> String -> String -> String -> [ RuleToken ]
makeDependArchSub opts phase src objfile depfile =
[ Str ("@if [ -z $Q ]; then echo Generating $@; fi"), NL ] ++
makeDepend opts phase src objfile depfile | 248 | makeDependArchSub opts phase src objfile depfile =
[ Str ("@if [ -z $Q ]; then echo Generating $@; fi"), NL ] ++
makeDepend opts phase src objfile depfile | 162 | true | true | 0 | 10 | 110 | 83 | 48 | 35 | null | null |
olorin/amazonka | amazonka-sqs/gen/Network/AWS/SQS/ListQueues.hs | mpl-2.0 | -- | A string to use for filtering the list results. Only those queues whose
-- name begins with the specified string are returned.
lqQueueNamePrefix :: Lens' ListQueues (Maybe Text)
lqQueueNamePrefix = lens _lqQueueNamePrefix (\ s a -> s{_lqQueueNamePrefix = a}) | 263 | lqQueueNamePrefix :: Lens' ListQueues (Maybe Text)
lqQueueNamePrefix = lens _lqQueueNamePrefix (\ s a -> s{_lqQueueNamePrefix = a}) | 131 | lqQueueNamePrefix = lens _lqQueueNamePrefix (\ s a -> s{_lqQueueNamePrefix = a}) | 80 | true | true | 0 | 9 | 40 | 47 | 26 | 21 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | delaytimerecv :: Pattern Int -> ControlPattern
delaytimerecv busid = pI "^delaytime" busid | 90 | delaytimerecv :: Pattern Int -> ControlPattern
delaytimerecv busid = pI "^delaytime" busid | 90 | delaytimerecv busid = pI "^delaytime" busid | 43 | false | true | 0 | 7 | 11 | 33 | 13 | 20 | null | null |
jwiegley/lambdabot-1 | lambdabot-utils/Lambdabot/Parser.hs | mit | parseDecl :: String -> Either String HsDecl
parseDecl s = case parseModule s of
ParseOk (HsModule _ _ _ _ [d]) -> Right $ fixPrecedence d
ParseFailed (SrcLoc _ _ col) msg -> Left $ showParseError msg col s | 223 | parseDecl :: String -> Either String HsDecl
parseDecl s = case parseModule s of
ParseOk (HsModule _ _ _ _ [d]) -> Right $ fixPrecedence d
ParseFailed (SrcLoc _ _ col) msg -> Left $ showParseError msg col s | 223 | parseDecl s = case parseModule s of
ParseOk (HsModule _ _ _ _ [d]) -> Right $ fixPrecedence d
ParseFailed (SrcLoc _ _ col) msg -> Left $ showParseError msg col s | 179 | false | true | 0 | 11 | 56 | 95 | 45 | 50 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | The name of the policy setting. This is the JSON field name of a
-- top-level Policy field.
ncdSettingName :: Lens' NonComplianceDetail (Maybe Text)
ncdSettingName
= lens _ncdSettingName
(\ s a -> s{_ncdSettingName = a}) | 233 | ncdSettingName :: Lens' NonComplianceDetail (Maybe Text)
ncdSettingName
= lens _ncdSettingName
(\ s a -> s{_ncdSettingName = a}) | 136 | ncdSettingName
= lens _ncdSettingName
(\ s a -> s{_ncdSettingName = a}) | 79 | true | true | 1 | 9 | 44 | 52 | 26 | 26 | null | null |
jvictor0/JoSQL | Server/Parser.hs | mit | token "from" = FromToken | 24 | token "from" = FromToken | 24 | token "from" = FromToken | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
eigengrau/stylish-haskell | src/Language/Haskell/Stylish/Step/Records.hs | bsd-3-clause | fixable fields = all singleLine containers && nonOverlapping containers
where
containers = map aContainer fields
singleLine s = H.srcSpanStartLine s == H.srcSpanEndLine s
nonOverlapping ss = length ss == length (nub $ map H.srcSpanStartLine ss)
-----------------------------------------------... | 353 | fixable fields = all singleLine containers && nonOverlapping containers
where
containers = map aContainer fields
singleLine s = H.srcSpanStartLine s == H.srcSpanEndLine s
nonOverlapping ss = length ss == length (nub $ map H.srcSpanStartLine ss)
-----------------------------------------------... | 353 | fixable fields = all singleLine containers && nonOverlapping containers
where
containers = map aContainer fields
singleLine s = H.srcSpanStartLine s == H.srcSpanEndLine s
nonOverlapping ss = length ss == length (nub $ map H.srcSpanStartLine ss)
-----------------------------------------------... | 353 | false | false | 0 | 10 | 63 | 89 | 41 | 48 | null | null |
keithodulaigh/Hets | THF/Translate.hs | gpl-2.0 | isTHFChar :: Char -> Bool
isTHFChar c = isAlphaNum c && isAscii c || c == '_' | 77 | isTHFChar :: Char -> Bool
isTHFChar c = isAlphaNum c && isAscii c || c == '_' | 77 | isTHFChar c = isAlphaNum c && isAscii c || c == '_' | 51 | false | true | 0 | 8 | 16 | 36 | 17 | 19 | null | null |
fmapfmapfmap/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs | mpl-2.0 | -- | The child workflow execution that was completed.
cweceaWorkflowExecution :: Lens' ChildWorkflowExecutionCompletedEventAttributes WorkflowExecution
cweceaWorkflowExecution = lens _cweceaWorkflowExecution (\ s a -> s{_cweceaWorkflowExecution = a}) | 250 | cweceaWorkflowExecution :: Lens' ChildWorkflowExecutionCompletedEventAttributes WorkflowExecution
cweceaWorkflowExecution = lens _cweceaWorkflowExecution (\ s a -> s{_cweceaWorkflowExecution = a}) | 196 | cweceaWorkflowExecution = lens _cweceaWorkflowExecution (\ s a -> s{_cweceaWorkflowExecution = a}) | 98 | true | true | 0 | 9 | 24 | 40 | 22 | 18 | null | null |
GaloisInc/halvm-ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | diffExpr _ _ e1 e2
= [fsep [ppr e1, text "/=", ppr e2]] | 58 | diffExpr _ _ e1 e2
= [fsep [ppr e1, text "/=", ppr e2]] | 58 | diffExpr _ _ e1 e2
= [fsep [ppr e1, text "/=", ppr e2]] | 58 | false | false | 0 | 8 | 15 | 39 | 19 | 20 | null | null |
DrNico/rhodium | tools/rhc-strap/Jeden/Category/Context.hs | mit | Proj m2 a2 `dot` Proj m1 a1 = Proj (Proj m2 a2 `dot` m1) a1 | 59 | Proj m2 a2 `dot` Proj m1 a1 = Proj (Proj m2 a2 `dot` m1) a1 | 59 | Proj m2 a2 `dot` Proj m1 a1 = Proj (Proj m2 a2 `dot` m1) a1 | 59 | false | false | 0 | 8 | 14 | 44 | 21 | 23 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT46.hs | gpl-3.0 | _ || _ = True | 17 | _ || _ = True | 17 | _ || _ = True | 17 | false | false | 0 | 5 | 8 | 12 | 5 | 7 | null | null |
bkoropoff/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | -- | Like 'bindAll', but the 'Binder's are 'TT' terms instead.
-- The first argument is a function to map @TT@ terms to @Binder@s.
-- This function might often be something like 'Lam', which directly
-- constructs a @Binder@ from a @TT@ term.
bindTyArgs :: (TT n -> Binder (TT n)) -> [(n, TT n)] -> TT n -> TT n
bindTyAr... | 371 | bindTyArgs :: (TT n -> Binder (TT n)) -> [(n, TT n)] -> TT n -> TT n
bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs) | 128 | bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs) | 59 | true | true | 0 | 11 | 74 | 107 | 56 | 51 | null | null |
nadirs/todohs | src/lib/Todo/Read.hs | mit | parseDate :: Parser String
parseDate = try date
where
date = do
_ <- many space
year <- count 4 digit
_ <- char '-'
month <- count 2 digit
_ <- char '-'
day <- count 2 digit
_ <- char ' '
return (intercalate "-" [year, month, day]) | 301 | parseDate :: Parser String
parseDate = try date
where
date = do
_ <- many space
year <- count 4 digit
_ <- char '-'
month <- count 2 digit
_ <- char '-'
day <- count 2 digit
_ <- char ' '
return (intercalate "-" [year, month, day]) | 301 | parseDate = try date
where
date = do
_ <- many space
year <- count 4 digit
_ <- char '-'
month <- count 2 digit
_ <- char '-'
day <- count 2 digit
_ <- char ' '
return (intercalate "-" [year, month, day]) | 274 | false | true | 1 | 11 | 119 | 133 | 56 | 77 | null | null |
brendanhay/gogol | gogol-discovery/gen/Network/Google/Discovery/Types/Product.hs | mpl-2.0 | -- | The URI path to be used for upload. Should be used in conjunction with
-- the basePath property at the api-level.
rmmupsPath :: Lens' RestMethodMediaUploadProtocolsSimple (Maybe Text)
rmmupsPath
= lens _rmmupsPath (\ s a -> s{_rmmupsPath = a}) | 250 | rmmupsPath :: Lens' RestMethodMediaUploadProtocolsSimple (Maybe Text)
rmmupsPath
= lens _rmmupsPath (\ s a -> s{_rmmupsPath = a}) | 131 | rmmupsPath
= lens _rmmupsPath (\ s a -> s{_rmmupsPath = a}) | 61 | true | true | 1 | 9 | 41 | 53 | 26 | 27 | null | null |
facebookincubator/duckling | Duckling/Distance/HR/Rules.hs | bsd-3-clause | rules :: [Rule]
rules =
[ ruleDistCentimetar
, ruleDistMAmbiguousMilesOrMeters
, ruleDistMetar
, ruleDistMilja
, ruleLatentDistKm
] | 143 | rules :: [Rule]
rules =
[ ruleDistCentimetar
, ruleDistMAmbiguousMilesOrMeters
, ruleDistMetar
, ruleDistMilja
, ruleLatentDistKm
] | 143 | rules =
[ ruleDistCentimetar
, ruleDistMAmbiguousMilesOrMeters
, ruleDistMetar
, ruleDistMilja
, ruleLatentDistKm
] | 127 | false | true | 0 | 5 | 27 | 29 | 18 | 11 | null | null |
rueshyna/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/TimeSeries/List.hs | mpl-2.0 | -- | JSONP
ptslCallback :: Lens' ProjectsTimeSeriesList (Maybe Text)
ptslCallback
= lens _ptslCallback (\ s a -> s{_ptslCallback = a}) | 136 | ptslCallback :: Lens' ProjectsTimeSeriesList (Maybe Text)
ptslCallback
= lens _ptslCallback (\ s a -> s{_ptslCallback = a}) | 125 | ptslCallback
= lens _ptslCallback (\ s a -> s{_ptslCallback = a}) | 67 | true | true | 1 | 9 | 21 | 50 | 25 | 25 | null | null |
sdiehl/ghc | libraries/base/Data/List.hs | bsd-3-clause | isSubsequenceOf _ [] = False | 50 | isSubsequenceOf _ [] = False | 50 | isSubsequenceOf _ [] = False | 50 | false | false | 0 | 6 | 26 | 13 | 6 | 7 | null | null |
apyrgio/snf-ganeti | src/Ganeti/HTools/Instance.hs | bsd-2-clause | isRunning (Instance {runSt = T.ErrorUp}) = True | 47 | isRunning (Instance {runSt = T.ErrorUp}) = True | 47 | isRunning (Instance {runSt = T.ErrorUp}) = True | 47 | false | false | 0 | 10 | 6 | 23 | 12 | 11 | null | null |
minad/colorful-monoids | src/Data/Monoid/Colorful/Color.hs | mit | squareNorm :: Integral a => a -> a -> a -> a
squareNorm r g b = ri*ri + bi*bi * gi*gi
where ri = fromIntegral r
gi = fromIntegral g
bi = fromIntegral b | 169 | squareNorm :: Integral a => a -> a -> a -> a
squareNorm r g b = ri*ri + bi*bi * gi*gi
where ri = fromIntegral r
gi = fromIntegral g
bi = fromIntegral b | 169 | squareNorm r g b = ri*ri + bi*bi * gi*gi
where ri = fromIntegral r
gi = fromIntegral g
bi = fromIntegral b | 124 | false | true | 6 | 10 | 52 | 102 | 42 | 60 | null | null |
itkovian/number-six | src/NumberSix/Message/Decode.hs | bsd-3-clause | isSpace _ = False | 20 | isSpace _ = False | 20 | isSpace _ = False | 20 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
Yuras/hfd | src/IMsg.hs | bsd-3-clause | terProcessTag :: Monad m => Word32 -> Iteratee ByteString m IMsg
iterProcessTag len = do
when (len /= 0) (fail "iterProcessTag: wrong length")
return IMsgProcessTag
| 169 | iterProcessTag :: Monad m => Word32 -> Iteratee ByteString m IMsg
iterProcessTag len = do
when (len /= 0) (fail "iterProcessTag: wrong length")
return IMsgProcessTag | 169 | iterProcessTag len = do
when (len /= 0) (fail "iterProcessTag: wrong length")
return IMsgProcessTag | 103 | false | true | 0 | 9 | 29 | 63 | 28 | 35 | null | null |
brendanhay/gogol | gogol-adsense-host/gen/Network/Google/AdSenseHost/Types/Product.hs | mpl-2.0 | -- | URL Pattern of this URL channel. Does not include \"http:\/\/\" or
-- \"https:\/\/\". Example: www.example.com\/home
urlcURLPattern :: Lens' URLChannel (Maybe Text)
urlcURLPattern
= lens _urlcURLPattern
(\ s a -> s{_urlcURLPattern = a}) | 249 | urlcURLPattern :: Lens' URLChannel (Maybe Text)
urlcURLPattern
= lens _urlcURLPattern
(\ s a -> s{_urlcURLPattern = a}) | 127 | urlcURLPattern
= lens _urlcURLPattern
(\ s a -> s{_urlcURLPattern = a}) | 79 | true | true | 0 | 9 | 41 | 49 | 26 | 23 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | The fetch status for landing_page_errors.
psdqiFetchStatus :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiFetchStatus
= lens _psdqiFetchStatus
(\ s a -> s{_psdqiFetchStatus = a}) | 201 | psdqiFetchStatus :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiFetchStatus
= lens _psdqiFetchStatus
(\ s a -> s{_psdqiFetchStatus = a}) | 154 | psdqiFetchStatus
= lens _psdqiFetchStatus
(\ s a -> s{_psdqiFetchStatus = a}) | 85 | true | true | 0 | 8 | 31 | 49 | 25 | 24 | null | null |
ruiting/opencog | opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban/Syntax.hs | agpl-3.0 | handleNU :: Iso (State Atom,String) (State Atom)
handleNU = Iso f g where
f ((atom,as),name) = let pred = cPN name lowTv
link = mkCtxPre pred atom
in Just (pred,link:as)
g (PN name,CtxPred atom : as) = Just ((atom,as),name)
{-nuIso = Iso f g where
f (LL... | 904 | handleNU :: Iso (State Atom,String) (State Atom)
handleNU = Iso f g where
f ((atom,as),name) = let pred = cPN name lowTv
link = mkCtxPre pred atom
in Just (pred,link:as)
g (PN name,CtxPred atom : as) = Just ((atom,as),name)
{-nuIso = Iso f g where
f (LL... | 904 | handleNU = Iso f g where
f ((atom,as),name) = let pred = cPN name lowTv
link = mkCtxPre pred atom
in Just (pred,link:as)
g (PN name,CtxPred atom : as) = Just ((atom,as),name)
{-nuIso = Iso f g where
f (LL ls) = let pred = findPred ls
... | 855 | false | true | 2 | 9 | 438 | 148 | 72 | 76 | null | null |
gsdlab/clafer | src/Language/Clafer/Generator/Html.hs | mit | printExp (EUnionCom _ set1 set2) indent irMap html comments = printExp set1 indent irMap html comments ++ ", " ++ printExp set2 indent irMap html comments | 158 | printExp (EUnionCom _ set1 set2) indent irMap html comments = printExp set1 indent irMap html comments ++ ", " ++ printExp set2 indent irMap html comments | 158 | printExp (EUnionCom _ set1 set2) indent irMap html comments = printExp set1 indent irMap html comments ++ ", " ++ printExp set2 indent irMap html comments | 158 | false | false | 0 | 7 | 29 | 57 | 27 | 30 | null | null |
snoyberg/ghc | compiler/types/Type.hs | bsd-3-clause | -- The free vars of 'rhs' should all be bound by 'tenv', so it's
-- ok to use 'substTy' here.
-- See also Note [The substitution invariant] in TyCoRep.
-- Its important to use mkAppTys, rather than (foldl AppTy),
-- because the function part might well return ... | 418 | coreView _ = Nothing | 20 | coreView _ = Nothing | 20 | true | false | 0 | 5 | 133 | 15 | 10 | 5 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-code/Language/Drasil/Code/Imperative/Import.hs | bsd-2-clause | codeType :: (HasSpace c) => c -> Reader DrasilState CodeType
codeType c = do
g <- ask
return $ spaceMatches g (c ^. typ) | 124 | codeType :: (HasSpace c) => c -> Reader DrasilState CodeType
codeType c = do
g <- ask
return $ spaceMatches g (c ^. typ) | 124 | codeType c = do
g <- ask
return $ spaceMatches g (c ^. typ) | 63 | false | true | 0 | 10 | 27 | 58 | 28 | 30 | null | null |
urbanslug/ghc | compiler/cmm/CmmPipeline.hs | bsd-3-clause | cpsTop :: HscEnv -> CmmDecl -> IO (CAFEnv, [CmmDecl])
cpsTop _ p@(CmmData {}) = return (mapEmpty, [p]) | 102 | cpsTop :: HscEnv -> CmmDecl -> IO (CAFEnv, [CmmDecl])
cpsTop _ p@(CmmData {}) = return (mapEmpty, [p]) | 102 | cpsTop _ p@(CmmData {}) = return (mapEmpty, [p]) | 48 | false | true | 4 | 7 | 16 | 59 | 33 | 26 | null | null |
ramirez7/configurator-applicative | src/Data/Configurator/Applicative/Print.hs | bsd-3-clause | mkTree (LookupP lk) = Node $ prettyLookup lk | 44 | mkTree (LookupP lk) = Node $ prettyLookup lk | 44 | mkTree (LookupP lk) = Node $ prettyLookup lk | 44 | false | false | 2 | 6 | 7 | 24 | 10 | 14 | null | null |
mcmaniac/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | iselExpr64 (CmmLoad addrTree ty) | isWord64 ty = do
Amode addr addr_code <- getAmode addrTree
(rlo,rhi) <- getNewRegPairNat II32
let
mov_lo = MOV II32 (OpAddr addr) (OpReg rlo)
mov_hi = MOV II32 (OpAddr (fromJust (addrOffset addr 4))) (OpReg rhi)
-- in
return (
ChildCode64 (ad... | 395 | iselExpr64 (CmmLoad addrTree ty) | isWord64 ty = do
Amode addr addr_code <- getAmode addrTree
(rlo,rhi) <- getNewRegPairNat II32
let
mov_lo = MOV II32 (OpAddr addr) (OpReg rlo)
mov_hi = MOV II32 (OpAddr (fromJust (addrOffset addr 4))) (OpReg rhi)
-- in
return (
ChildCode64 (ad... | 395 | iselExpr64 (CmmLoad addrTree ty) | isWord64 ty = do
Amode addr addr_code <- getAmode addrTree
(rlo,rhi) <- getNewRegPairNat II32
let
mov_lo = MOV II32 (OpAddr addr) (OpReg rlo)
mov_hi = MOV II32 (OpAddr (fromJust (addrOffset addr 4))) (OpReg rhi)
-- in
return (
ChildCode64 (ad... | 395 | false | false | 0 | 17 | 122 | 153 | 74 | 79 | null | null |
pwoh/examples-hs | src/MMultDivConq.hs | bsd-3-clause | strassen :: Acc (Matrix Double) -> Acc (Matrix Double) -> Acc (Matrix Double)
strassen a b = concatFour c11 c12 c21 c22
where (a11,a12,a21,a22) = splitFour a
(b11,b12,b21,b22) = splitFour b
m1 = mmult (a11 `add` a22) (b11 `add` b22)
m2 = mmult (a21 `add` a22) b11
m3 = mmult a... | 674 | strassen :: Acc (Matrix Double) -> Acc (Matrix Double) -> Acc (Matrix Double)
strassen a b = concatFour c11 c12 c21 c22
where (a11,a12,a21,a22) = splitFour a
(b11,b12,b21,b22) = splitFour b
m1 = mmult (a11 `add` a22) (b11 `add` b22)
m2 = mmult (a21 `add` a22) b11
m3 = mmult a... | 674 | strassen a b = concatFour c11 c12 c21 c22
where (a11,a12,a21,a22) = splitFour a
(b11,b12,b21,b22) = splitFour b
m1 = mmult (a11 `add` a22) (b11 `add` b22)
m2 = mmult (a21 `add` a22) b11
m3 = mmult a11 (b12 `sub` b22)
m4 = mmult a22 (b21 `sub` b11)
m5 = mmu... | 596 | false | true | 12 | 15 | 237 | 338 | 192 | 146 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | An entry ID, unique within the batch request.
liaBatchId :: Lens' LiaSettingsCustomBatchRequestEntry (Maybe Word32)
liaBatchId
= lens _liaBatchId (\ s a -> s{_liaBatchId = a}) .
mapping _Coerce | 206 | liaBatchId :: Lens' LiaSettingsCustomBatchRequestEntry (Maybe Word32)
liaBatchId
= lens _liaBatchId (\ s a -> s{_liaBatchId = a}) .
mapping _Coerce | 155 | liaBatchId
= lens _liaBatchId (\ s a -> s{_liaBatchId = a}) .
mapping _Coerce | 85 | true | true | 0 | 10 | 37 | 55 | 28 | 27 | null | null |
GaloisInc/haskell-tor | src/Tor/Link.hs | bsd-3-clause | exactlyOneAuth (_:rest) acc = exactlyOneAuth rest acc | 72 | exactlyOneAuth (_:rest) acc = exactlyOneAuth rest acc | 72 | exactlyOneAuth (_:rest) acc = exactlyOneAuth rest acc | 72 | false | false | 0 | 7 | 25 | 23 | 11 | 12 | null | null |
benweitzman/DivisionOfLabor | src/DivisionOfLabor-cli/Graphics/Vty/Widgets/HexGrid.hs | mit | moveRight :: Widget (HexGridWidget a) -> IO ()
moveRight = moveByDirection East | 79 | moveRight :: Widget (HexGridWidget a) -> IO ()
moveRight = moveByDirection East | 79 | moveRight = moveByDirection East | 32 | false | true | 0 | 8 | 11 | 32 | 15 | 17 | null | null |
ssaavedra/liquidhaskell | tests/pos/alphaconvert-List.hs | bsd-3-clause | ----------------------------------------------------------------------------
-- | Part 2: Free Variables ------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
{-@ free ... | 469 | free (Var x) = [x] | 22 | free (Var x) = [x] | 22 | true | false | 0 | 6 | 41 | 25 | 15 | 10 | null | null |
kajigor/uKanren_transformations | test/resources/Program/Programs.hs | bsd-3-clause | emptyAppendoDef :: Def
emptyAppendoDef =
( Def "emptyAppendo" ["x", "y"]
(
call "appendo" [nil, x, y]
)
)
where
[x, y] = map V ["x", "y"] | 171 | emptyAppendoDef :: Def
emptyAppendoDef =
( Def "emptyAppendo" ["x", "y"]
(
call "appendo" [nil, x, y]
)
)
where
[x, y] = map V ["x", "y"] | 171 | emptyAppendoDef =
( Def "emptyAppendo" ["x", "y"]
(
call "appendo" [nil, x, y]
)
)
where
[x, y] = map V ["x", "y"] | 148 | false | true | 0 | 9 | 59 | 77 | 40 | 37 | null | null |
co-dan/pipes-irc | src/Pipes/Network/IRC/Core.hs | bsd-3-clause | filterMsg :: (MonadIO m, Monad m)
=> IRCSettings
-> Pipe Message Message m r
filterMsg (IRCSettings{..}) = loop
where loop = do
msg <- await
case msgCommand msg of
PrivMsgCmd targets txt -> do
let me = S.insert nick channels
if (t... | 539 | filterMsg :: (MonadIO m, Monad m)
=> IRCSettings
-> Pipe Message Message m r
filterMsg (IRCSettings{..}) = loop
where loop = do
msg <- await
case msgCommand msg of
PrivMsgCmd targets txt -> do
let me = S.insert nick channels
if (t... | 539 | filterMsg (IRCSettings{..}) = loop
where loop = do
msg <- await
case msgCommand msg of
PrivMsgCmd targets txt -> do
let me = S.insert nick channels
if (trigger `BS.isPrefixOf` txt)
&& (not . S.null $ me `S.intersection` targets)
... | 434 | false | true | 0 | 18 | 219 | 164 | 83 | 81 | null | null |
tonymorris/geo-osm | src/Data/Geo/OSM/Api.hs | bsd-3-clause | -- | Constructs a @api@ with version, area, tracepoints and waynodes.
api ::
Version -- ^ The @version@ element.
-> Area -- ^ The @area@ element.
-> Tracepoints -- ^ The @tracepoints@ element.
-> Waynodes -- ^ The @waynodes@ element.
-> Api
api =
Api | 262 | api ::
Version -- ^ The @version@ element.
-> Area -- ^ The @area@ element.
-> Tracepoints -- ^ The @tracepoints@ element.
-> Waynodes -- ^ The @waynodes@ element.
-> Api
api =
Api | 192 | api =
Api | 11 | true | true | 0 | 10 | 56 | 39 | 20 | 19 | null | null |
ml9951/ThreadScope | papers/haskell_symposium_2009/bsort/BSortPar.hs | bsd-3-clause | ilvN n r = ilv (ilvN (n-1) r) | 29 | ilvN n r = ilv (ilvN (n-1) r) | 29 | ilvN n r = ilv (ilvN (n-1) r) | 29 | false | false | 0 | 9 | 7 | 30 | 14 | 16 | null | null |
remyoudompheng/hs-language-go | tests/TestMain.hs | gpl-3.0 | sampleFiles :: [FilePath]
sampleFiles = map ("tests" </>)
[ "test01.go"
, "test02.go"
, "test02.go"
, "test04.go"
, "test05.go"
, "test06.go"
, "test07.go"
, "test08.go"
, "test09.go"
, "test10.go"
, "test11.go"
, "test12.go"
, "test13.go"
, "test14.go"
, "test15.go"
, "test16.go"
, "t... | 489 | sampleFiles :: [FilePath]
sampleFiles = map ("tests" </>)
[ "test01.go"
, "test02.go"
, "test02.go"
, "test04.go"
, "test05.go"
, "test06.go"
, "test07.go"
, "test08.go"
, "test09.go"
, "test10.go"
, "test11.go"
, "test12.go"
, "test13.go"
, "test14.go"
, "test15.go"
, "test16.go"
, "t... | 489 | sampleFiles = map ("tests" </>)
[ "test01.go"
, "test02.go"
, "test02.go"
, "test04.go"
, "test05.go"
, "test06.go"
, "test07.go"
, "test08.go"
, "test09.go"
, "test10.go"
, "test11.go"
, "test12.go"
, "test13.go"
, "test14.go"
, "test15.go"
, "test16.go"
, "test17.go"
, "test18.go"
... | 463 | false | true | 0 | 7 | 106 | 102 | 62 | 40 | null | null |
Saeron/haskell | data.structures/haskell/DataStructures/Queue/QueueAxioms.hs | apache-2.0 | -- an element enqueueed on an empty queue is placed at the first of the queue
ax1 x = True ==> first (enqueue x empty) == x | 128 | ax1 x = True ==> first (enqueue x empty) == x | 49 | ax1 x = True ==> first (enqueue x empty) == x | 49 | true | false | 0 | 9 | 31 | 29 | 14 | 15 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Projects/StoredInfoTypes/Patch.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
psitpUploadType :: Lens' ProjectsStoredInfoTypesPatch (Maybe Text)
psitpUploadType
= lens _psitpUploadType
(\ s a -> s{_psitpUploadType = a}) | 220 | psitpUploadType :: Lens' ProjectsStoredInfoTypesPatch (Maybe Text)
psitpUploadType
= lens _psitpUploadType
(\ s a -> s{_psitpUploadType = a}) | 149 | psitpUploadType
= lens _psitpUploadType
(\ s a -> s{_psitpUploadType = a}) | 82 | true | true | 0 | 8 | 34 | 49 | 25 | 24 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | secureDirMode :: Int
secureDirMode = 0o700 | 42 | secureDirMode :: Int
secureDirMode = 0o700 | 42 | secureDirMode = 0o700 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
brendanhay/gogol | gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs | mpl-2.0 | -- | Normalized Bounding box in a frame, where the object is located.
gcvvto1NormalizedBoundingBox :: Lens' GoogleCloudVideointelligenceV1p2beta1_TimestampedObject (Maybe GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox)
gcvvto1NormalizedBoundingBox
= lens _gcvvto1NormalizedBoundingBox
(\ s a -> s{_g... | 353 | gcvvto1NormalizedBoundingBox :: Lens' GoogleCloudVideointelligenceV1p2beta1_TimestampedObject (Maybe GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox)
gcvvto1NormalizedBoundingBox
= lens _gcvvto1NormalizedBoundingBox
(\ s a -> s{_gcvvto1NormalizedBoundingBox = a}) | 283 | gcvvto1NormalizedBoundingBox
= lens _gcvvto1NormalizedBoundingBox
(\ s a -> s{_gcvvto1NormalizedBoundingBox = a}) | 121 | true | true | 0 | 9 | 37 | 48 | 25 | 23 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AccountActiveAdSummaries/Get.hs | mpl-2.0 | -- | OAuth access token.
aaasgAccessToken :: Lens' AccountActiveAdSummariesGet (Maybe Text)
aaasgAccessToken
= lens _aaasgAccessToken
(\ s a -> s{_aaasgAccessToken = a}) | 177 | aaasgAccessToken :: Lens' AccountActiveAdSummariesGet (Maybe Text)
aaasgAccessToken
= lens _aaasgAccessToken
(\ s a -> s{_aaasgAccessToken = a}) | 152 | aaasgAccessToken
= lens _aaasgAccessToken
(\ s a -> s{_aaasgAccessToken = a}) | 85 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.