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
Hodapp87/ivory
ivory/src/Ivory/Language/Module.hs
bsd-3-clause
incl (DefImport i) | null (I.importFile i) = error $ "Empty header name for " ++ show i | otherwise = put (mempty { I.modImports = [i] })
141
incl (DefImport i) | null (I.importFile i) = error $ "Empty header name for " ++ show i | otherwise = put (mempty { I.modImports = [i] })
141
incl (DefImport i) | null (I.importFile i) = error $ "Empty header name for " ++ show i | otherwise = put (mempty { I.modImports = [i] })
141
false
false
1
11
31
69
34
35
null
null
kazu-yamamoto/http2
Network/HTTP2/Frame/Types.hs
bsd-3-clause
-- | Setting the PADDED flag. -- -- >>> setPadded 0 -- 8 setPadded :: FrameFlags -> FrameFlags setPadded x = x `setBit` 3
121
setPadded :: FrameFlags -> FrameFlags setPadded x = x `setBit` 3
64
setPadded x = x `setBit` 3
26
true
true
0
5
23
28
17
11
null
null
zoranbosnjak/deseo
Data/Asterix/Expression.hs
gpl-3.0
pow :: Parser Expr pow = do void $ symbol "pow" parened $ do a <- integer void $ symbol "," b <- integer return $ EPow a b
162
pow :: Parser Expr pow = do void $ symbol "pow" parened $ do a <- integer void $ symbol "," b <- integer return $ EPow a b
162
pow = do void $ symbol "pow" parened $ do a <- integer void $ symbol "," b <- integer return $ EPow a b
143
false
true
1
12
68
71
29
42
null
null
alexander-at-github/eta
compiler/ETA/Types/InstEnv.hs
bsd-3-clause
emptyInstEnv :: InstEnv emptyInstEnv = emptyUFM
47
emptyInstEnv :: InstEnv emptyInstEnv = emptyUFM
47
emptyInstEnv = emptyUFM
23
false
true
0
4
5
11
6
5
null
null
elben/typing-haskell-in-haskell
StaticPrelude.hs
bsd-3-clause
rightCfun = "Right" :>: (Forall [Star, Star] ([] :=> (TGen 1 `fn` TAp (TAp tEither (TGen 0)) (TGen 1))))
158
rightCfun = "Right" :>: (Forall [Star, Star] ([] :=> (TGen 1 `fn` TAp (TAp tEither (TGen 0)) (TGen 1))))
158
rightCfun = "Right" :>: (Forall [Star, Star] ([] :=> (TGen 1 `fn` TAp (TAp tEither (TGen 0)) (TGen 1))))
158
false
false
0
16
72
70
37
33
null
null
aleksj/lamdu
Lamdu/Sugar/AddNames.hs
gpl-3.0
runPass1M :: P1Env -> Pass1M a -> a runPass1M initial (Pass1M act) = runReader act initial
90
runPass1M :: P1Env -> Pass1M a -> a runPass1M initial (Pass1M act) = runReader act initial
90
runPass1M initial (Pass1M act) = runReader act initial
54
false
true
0
7
15
38
18
20
null
null
ben-schulz/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectPlicity RConstraint = Var (tacN "Constraint")
52
reflectPlicity RConstraint = Var (tacN "Constraint")
52
reflectPlicity RConstraint = Var (tacN "Constraint")
52
false
false
0
7
5
18
8
10
null
null
mcschroeder/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
bindTick :: TickDensity -> String -> SrcSpan -> FreeVars -> TM (Maybe (Tickish Id)) bindTick density name pos fvs = do decl_path <- getPathEntry let toplev = null decl_path count_entries = toplev || density == TickAllFunctions top_only = density /= TickAllFunctions box_label ...
1,289
bindTick :: TickDensity -> String -> SrcSpan -> FreeVars -> TM (Maybe (Tickish Id)) bindTick density name pos fvs = do decl_path <- getPathEntry let toplev = null decl_path count_entries = toplev || density == TickAllFunctions top_only = density /= TickAllFunctions box_label ...
1,289
bindTick density name pos fvs = do decl_path <- getPathEntry let toplev = null decl_path count_entries = toplev || density == TickAllFunctions top_only = density /= TickAllFunctions box_label = if toplev then TopLevelBox [name] else LocalBox (d...
1,203
false
true
0
15
277
161
88
73
null
null
tsahyt/clingo-haskell
examples/Propagator.hs
mit
onModel :: Model s -> IOSym s Continue onModel m = do syms <- map prettySymbol <$> modelSymbols m (selectNone { selectShown = True }) liftIO (putStr "Model: " >> print syms) return Continue
210
onModel :: Model s -> IOSym s Continue onModel m = do syms <- map prettySymbol <$> modelSymbols m (selectNone { selectShown = True }) liftIO (putStr "Model: " >> print syms) return Continue
210
onModel m = do syms <- map prettySymbol <$> modelSymbols m (selectNone { selectShown = True }) liftIO (putStr "Model: " >> print syms) return Continue
171
false
true
0
13
54
86
38
48
null
null
akc/gfscript
HOPS/GF/CFrac/Poly.hs
bsd-3-clause
jacobi1 :: (Eq a, Fractional a) => Vector a -> Vector a jacobi1 = snd . jacobi
78
jacobi1 :: (Eq a, Fractional a) => Vector a -> Vector a jacobi1 = snd . jacobi
78
jacobi1 = snd . jacobi
22
false
true
1
8
16
47
21
26
null
null
nevrenato/HetsAlloy
CASL/Morphism.hs
gpl-2.0
-- | the induced signature image of a signature morphism inducedSignAux :: InducedSign f e m e -> InducedSign f e m (Sign f e) inducedSignAux f sm om pm em src = let ms = mapSort sm msorts = Set.map ms in (emptySign $ f sm om pm em src) { sortRel = Rel.transClosure . Rel.irreflex . Rel.map ms $ sortRel src ...
635
inducedSignAux :: InducedSign f e m e -> InducedSign f e m (Sign f e) inducedSignAux f sm om pm em src = let ms = mapSort sm msorts = Set.map ms in (emptySign $ f sm om pm em src) { sortRel = Rel.transClosure . Rel.irreflex . Rel.map ms $ sortRel src -- sorts may fall together and need to be removed as ...
578
inducedSignAux f sm om pm em src = let ms = mapSort sm msorts = Set.map ms in (emptySign $ f sm om pm em src) { sortRel = Rel.transClosure . Rel.irreflex . Rel.map ms $ sortRel src -- sorts may fall together and need to be removed as trivial relation , emptySortSet = msorts $ emptySortSet src , opMa...
508
true
true
0
11
148
225
110
115
null
null
tomwadeson/fpinhaskell
src/DataStructures/Tree.hs
mit
depth' :: Tree a -> Int depth' = fold (const 0) (\x y -> 1 + max x y)
69
depth' :: Tree a -> Int depth' = fold (const 0) (\x y -> 1 + max x y)
69
depth' = fold (const 0) (\x y -> 1 + max x y)
45
false
true
0
9
18
55
25
30
null
null
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Products/Insert.hs
mpl-2.0
-- | The ID of the managing account. piMerchantId :: Lens' ProductsInsert Word64 piMerchantId = lens _piMerchantId (\ s a -> s{_piMerchantId = a}) . _Coerce
164
piMerchantId :: Lens' ProductsInsert Word64 piMerchantId = lens _piMerchantId (\ s a -> s{_piMerchantId = a}) . _Coerce
127
piMerchantId = lens _piMerchantId (\ s a -> s{_piMerchantId = a}) . _Coerce
83
true
true
1
9
33
48
24
24
null
null
iand675/hs-kafka
src/Network/Kafka/Internal/Connection.hs
bsd-3-clause
closeKafkaConnection :: KafkaConnection -> KafkaConfig -> IO () closeKafkaConnection conn conf = do writeIORef (kafkaLeftovers conn) $ error "Connection closed" until' (I.null <$> readIORef (kafkaPendingResponses conn)) $ recv conn conf transportClose =<< readMVar (kafkaSocket conn)
289
closeKafkaConnection :: KafkaConnection -> KafkaConfig -> IO () closeKafkaConnection conn conf = do writeIORef (kafkaLeftovers conn) $ error "Connection closed" until' (I.null <$> readIORef (kafkaPendingResponses conn)) $ recv conn conf transportClose =<< readMVar (kafkaSocket conn)
289
closeKafkaConnection conn conf = do writeIORef (kafkaLeftovers conn) $ error "Connection closed" until' (I.null <$> readIORef (kafkaPendingResponses conn)) $ recv conn conf transportClose =<< readMVar (kafkaSocket conn)
225
false
true
0
13
40
97
44
53
null
null
philippedev101/bowtie
src/Main.hs
agpl-3.0
parseNumbers :: A.Parser [Double] parseNumbers = do _ <- skip20 numbers <- A.sepBy1 A.double skip20 _ <- skip20 _ <- A.skipWhile (\c -> c == (BS.c2w '\n') || c == (BS.c2w '\r')) pure numbers where skip20 = A.skipWhile (== (BS.c2w ' '))
247
parseNumbers :: A.Parser [Double] parseNumbers = do _ <- skip20 numbers <- A.sepBy1 A.double skip20 _ <- skip20 _ <- A.skipWhile (\c -> c == (BS.c2w '\n') || c == (BS.c2w '\r')) pure numbers where skip20 = A.skipWhile (== (BS.c2w ' '))
247
parseNumbers = do _ <- skip20 numbers <- A.sepBy1 A.double skip20 _ <- skip20 _ <- A.skipWhile (\c -> c == (BS.c2w '\n') || c == (BS.c2w '\r')) pure numbers where skip20 = A.skipWhile (== (BS.c2w ' '))
213
false
true
0
16
53
128
62
66
null
null
borgsmidt/adv-prog-2013
src/salsa/SalsaParserTest.hs
mit
-- parses a string and compares the AST to an expected program run :: String -> Program -> String run s p = assert (Right p == parseString s) (shw "pass" s)
156
run :: String -> Program -> String run s p = assert (Right p == parseString s) (shw "pass" s)
93
run s p = assert (Right p == parseString s) (shw "pass" s)
58
true
true
0
8
31
55
26
29
null
null
mikeizbicki/hmm
dist/build/autogen/Paths_hmm.hs
bsd-3-clause
getLibDir = catchIO (getEnv "hmm_libdir") (\_ -> return libdir)
63
getLibDir = catchIO (getEnv "hmm_libdir") (\_ -> return libdir)
63
getLibDir = catchIO (getEnv "hmm_libdir") (\_ -> return libdir)
63
false
false
1
8
8
32
14
18
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/BooleanFormula.hs
bsd-3-clause
-- Make a conjunction, and try to simplify mkAnd :: Eq a => [BooleanFormula a] -> BooleanFormula a mkAnd = maybe mkFalse (mkAnd' . nub) . concatMapM fromAnd where -- See Note [Simplification of BooleanFormulas] fromAnd :: BooleanFormula a -> Maybe [BooleanFormula a] fromAnd (And xs) = Just xs -- assume tha...
583
mkAnd :: Eq a => [BooleanFormula a] -> BooleanFormula a mkAnd = maybe mkFalse (mkAnd' . nub) . concatMapM fromAnd where -- See Note [Simplification of BooleanFormulas] fromAnd :: BooleanFormula a -> Maybe [BooleanFormula a] fromAnd (And xs) = Just xs -- assume that xs are already simplified -- otherwi...
540
mkAnd = maybe mkFalse (mkAnd' . nub) . concatMapM fromAnd where -- See Note [Simplification of BooleanFormulas] fromAnd :: BooleanFormula a -> Maybe [BooleanFormula a] fromAnd (And xs) = Just xs -- assume that xs are already simplified -- otherwise we would need: fromAnd (And xs) = concat <$> traverse...
484
true
true
0
8
126
148
74
74
null
null
phischu/fragnix
app/Init.hs
bsd-3-clause
init :: IO () init = do createDirectoryIfMissing True fragnixBasePath createDirectoryIfMissing True environmentPath forM_ [("builtin", builtinEnvironmentPath), ("cbits", cbitsPath), ("include", includePath)] (\(archive, path) -> do putStrLn $ "Fetching " ++ archive ++ " ..." r <- archiveRequest . pack $ a...
374
init :: IO () init = do createDirectoryIfMissing True fragnixBasePath createDirectoryIfMissing True environmentPath forM_ [("builtin", builtinEnvironmentPath), ("cbits", cbitsPath), ("include", includePath)] (\(archive, path) -> do putStrLn $ "Fetching " ++ archive ++ " ..." r <- archiveRequest . pack $ a...
374
init = do createDirectoryIfMissing True fragnixBasePath createDirectoryIfMissing True environmentPath forM_ [("builtin", builtinEnvironmentPath), ("cbits", cbitsPath), ("include", includePath)] (\(archive, path) -> do putStrLn $ "Fetching " ++ archive ++ " ..." r <- archiveRequest . pack $ archive ++ ".ta...
360
false
true
0
16
64
134
66
68
null
null
amnipar/hs-cvsu
CVSU/PixelImage.hs
bsd-3-clause
allocPixelImage :: IO (ForeignPtr C'pixel_image) allocPixelImage = do ptr <- c'pixel_image_alloc if ptr /= nullPtr then newForeignPtr ptr (c'pixel_image_free ptr) else error "Memory allocation failed in allocPixelImage"
231
allocPixelImage :: IO (ForeignPtr C'pixel_image) allocPixelImage = do ptr <- c'pixel_image_alloc if ptr /= nullPtr then newForeignPtr ptr (c'pixel_image_free ptr) else error "Memory allocation failed in allocPixelImage"
231
allocPixelImage = do ptr <- c'pixel_image_alloc if ptr /= nullPtr then newForeignPtr ptr (c'pixel_image_free ptr) else error "Memory allocation failed in allocPixelImage"
182
false
true
0
10
38
56
27
29
null
null
facundominguez/package-loader
src/System/Loader/Package/ZEncoding.hs
lgpl-2.1
-- Variables encode_ch 'z' = "zz"
34
encode_ch 'z' = "zz"
21
encode_ch 'z' = "zz"
21
true
false
0
5
6
10
5
5
null
null
phylake/kademlia
test/TestPrelude.hs
bsd-3-clause
newEnv :: IO KademliaEnv newEnv = do sock <- socket AF_INET Datagram defaultProtocol mvStoreHT <- H.new >>= newMVar dataStore <- defaultDataStore pingREQs <- atomically $ newTVar V.empty routingTable <- atomically $ defaultRoutingTable Nothing return KademliaEnv{..} where logDebug _ = return () lo...
392
newEnv :: IO KademliaEnv newEnv = do sock <- socket AF_INET Datagram defaultProtocol mvStoreHT <- H.new >>= newMVar dataStore <- defaultDataStore pingREQs <- atomically $ newTVar V.empty routingTable <- atomically $ defaultRoutingTable Nothing return KademliaEnv{..} where logDebug _ = return () lo...
392
newEnv = do sock <- socket AF_INET Datagram defaultProtocol mvStoreHT <- H.new >>= newMVar dataStore <- defaultDataStore pingREQs <- atomically $ newTVar V.empty routingTable <- atomically $ defaultRoutingTable Nothing return KademliaEnv{..} where logDebug _ = return () logInfo _ = return () l...
367
false
true
3
10
85
140
65
75
null
null
phischu/fragnix
tests/packages/scotty/System.Posix.Semaphore.hs
bsd-3-clause
semThreadWait :: Semaphore -> IO () semThreadWait sem = do res <- semTryWait sem (if res then return () else ( do { yield; semThreadWait sem } )) -- | Unlock the semaphore.
220
semThreadWait :: Semaphore -> IO () semThreadWait sem = do res <- semTryWait sem (if res then return () else ( do { yield; semThreadWait sem } )) -- | Unlock the semaphore.
220
semThreadWait sem = do res <- semTryWait sem (if res then return () else ( do { yield; semThreadWait sem } )) -- | Unlock the semaphore.
184
false
true
0
12
80
68
34
34
null
null
siddhanathan/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
startPhase "cxx" = Ccxx
28
startPhase "cxx" = Ccxx
28
startPhase "cxx" = Ccxx
28
false
false
1
5
8
13
4
9
null
null
Lainepress/hledger
hledger-lib/Hledger/Read/Utils.hs
gpl-3.0
setYear :: Integer -> GenParser tok JournalContext () setYear y = updateState (\ctx -> ctx{ctxYear=Just y})
107
setYear :: Integer -> GenParser tok JournalContext () setYear y = updateState (\ctx -> ctx{ctxYear=Just y})
107
setYear y = updateState (\ctx -> ctx{ctxYear=Just y})
53
false
true
0
10
15
49
25
24
null
null
benb/MetAl
src/Phylo/Alignment/Test.hs
gpl-3.0
getSeq (UngappedSequence x) = map getSeqChar x
46
getSeq (UngappedSequence x) = map getSeqChar x
46
getSeq (UngappedSequence x) = map getSeqChar x
46
false
false
0
6
6
21
9
12
null
null
39aldo39/klfc
src/Layout/Modifier.hs
gpl-3.0
toBaseModifier ∷ Modifier → Modifier toBaseModifier Shift_L = Shift
67
toBaseModifier ∷ Modifier → Modifier toBaseModifier Shift_L = Shift
67
toBaseModifier Shift_L = Shift
30
false
true
0
5
8
18
9
9
null
null
urv/fixhs
src/Data/FIX/Spec/FIX42.hs
lgpl-2.1
tProcessCode :: FIXTag tProcessCode = FIXTag { tName = "ProcessCode" , tnum = 81 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
161
tProcessCode :: FIXTag tProcessCode = FIXTag { tName = "ProcessCode" , tnum = 81 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
161
tProcessCode = FIXTag { tName = "ProcessCode" , tnum = 81 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
138
false
true
0
10
38
51
29
22
null
null
frp-arduino/frp-arduino
src/Arduino/DSL.hs
gpl-3.0
getResources :: DAG.Body -> [String] getResources (DAG.Driver resources _ _) = resources
88
getResources :: DAG.Body -> [String] getResources (DAG.Driver resources _ _) = resources
88
getResources (DAG.Driver resources _ _) = resources
51
false
true
0
7
11
39
19
20
null
null
dysinger/amazonka
amazonka-s3/gen/Network/AWS/S3/HeadObject.hs
mpl-2.0
-- | The language the content is in. horContentLanguage :: Lens' HeadObjectResponse (Maybe Text) horContentLanguage = lens _horContentLanguage (\s a -> s { _horContentLanguage = a })
186
horContentLanguage :: Lens' HeadObjectResponse (Maybe Text) horContentLanguage = lens _horContentLanguage (\s a -> s { _horContentLanguage = a })
149
horContentLanguage = lens _horContentLanguage (\s a -> s { _horContentLanguage = a })
89
true
true
0
9
30
46
25
21
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/MediaWiki.hs
gpl-2.0
externalLink :: MWParser Inlines externalLink = try $ do char '[' (_, src) <- uri lab <- try (trimInlines . mconcat <$> (skipMany1 spaceChar *> manyTill inline (char ']'))) <|> do char ']' num <- mwNextLinkNumber <$> getState updateState $ \st -> st{ mwNextLinkNumb...
403
externalLink :: MWParser Inlines externalLink = try $ do char '[' (_, src) <- uri lab <- try (trimInlines . mconcat <$> (skipMany1 spaceChar *> manyTill inline (char ']'))) <|> do char ']' num <- mwNextLinkNumber <$> getState updateState $ \st -> st{ mwNextLinkNumb...
403
externalLink = try $ do char '[' (_, src) <- uri lab <- try (trimInlines . mconcat <$> (skipMany1 spaceChar *> manyTill inline (char ']'))) <|> do char ']' num <- mwNextLinkNumber <$> getState updateState $ \st -> st{ mwNextLinkNumber = num + 1 } retu...
370
false
true
0
17
131
156
74
82
null
null
garetxe/cabal
Cabal/Distribution/Simple/GHCJS.hs
bsd-3-clause
checkPackageDbStack _ = die $ "If the global package db is specified, it must be " ++ "specified first and cannot be specified multiple times"
149
checkPackageDbStack _ = die $ "If the global package db is specified, it must be " ++ "specified first and cannot be specified multiple times"
149
checkPackageDbStack _ = die $ "If the global package db is specified, it must be " ++ "specified first and cannot be specified multiple times"
149
false
false
0
6
31
17
8
9
null
null
ghcjs/ghcjs
lib/ghc/includes/GHCConstantsHaskellWrappers.hs
mit
oFFSET_StgRegTable_rSp :: DynFlags -> Int oFFSET_StgRegTable_rSp dflags = pc_OFFSET_StgRegTable_rSp (sPlatformConstants (settings dflags))
138
oFFSET_StgRegTable_rSp :: DynFlags -> Int oFFSET_StgRegTable_rSp dflags = pc_OFFSET_StgRegTable_rSp (sPlatformConstants (settings dflags))
138
oFFSET_StgRegTable_rSp dflags = pc_OFFSET_StgRegTable_rSp (sPlatformConstants (settings dflags))
96
false
true
0
9
11
36
17
19
null
null
RayRacine/aws
Aws/DynamoDb/Core.hs
bsd-3-clause
dySignQuery :: A.ToJSON a => B.ByteString -> a -> DyConfiguration qt -> SignatureData -> SignedQuery dySignQuery target body di sd = SignedQuery { sqMethod = Post , sqProtocol = dyProtocol di , sqHost = dyHost di , sqPort = dyPort di , sqPath = "/" , sqQuery = [] , sqDate...
2,050
dySignQuery :: A.ToJSON a => B.ByteString -> a -> DyConfiguration qt -> SignatureData -> SignedQuery dySignQuery target body di sd = SignedQuery { sqMethod = Post , sqProtocol = dyProtocol di , sqHost = dyHost di , sqPort = dyPort di , sqPath = "/" , sqQuery = [] , sqDate...
2,050
dySignQuery target body di sd = SignedQuery { sqMethod = Post , sqProtocol = dyProtocol di , sqHost = dyHost di , sqPort = dyPort di , sqPath = "/" , sqQuery = [] , sqDate = Just $ signatureTime sd , sqAuthorization = Just auth , sqContentType = Just "applicat...
1,949
false
true
1
9
1,037
344
190
154
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/Coq/Gallina/Util.hs
mit
qualidIsOp :: Qualid -> Bool qualidIsOp = identIsOp . qualidBase
64
qualidIsOp :: Qualid -> Bool qualidIsOp = identIsOp . qualidBase
64
qualidIsOp = identIsOp . qualidBase
35
false
true
0
5
9
19
10
9
null
null
asr/apia
old/AgdaLib/Syntax/Abstract/Name.hs
mit
dropLastNameModuleName ∷ ModuleName → ModuleName dropLastNameModuleName (MName names) = MName (init names)
106
dropLastNameModuleName ∷ ModuleName → ModuleName dropLastNameModuleName (MName names) = MName (init names)
106
dropLastNameModuleName (MName names) = MName (init names)
57
false
true
0
7
11
33
16
17
null
null
gijswijnholds/proofnets-diagrams
src/Net2Diagram.hs
gpl-3.0
curvedTopToRight = uniBimap makeAngle (270, 20)
47
curvedTopToRight = uniBimap makeAngle (270, 20)
47
curvedTopToRight = uniBimap makeAngle (270, 20)
47
false
false
0
6
5
17
9
8
null
null
NightElfik/L-systems-in-Haskell
src/LSystem.hs
unlicense
parseRewriteRule :: String -> Maybe RewriteRule parseRewriteRule = parse readsRewriteRule
89
parseRewriteRule :: String -> Maybe RewriteRule parseRewriteRule = parse readsRewriteRule
89
parseRewriteRule = parse readsRewriteRule
41
false
true
0
7
9
27
11
16
null
null
Fuuzetsu/cabal2nix
src/Distribution/Nixpkgs/Fetch.hs
bsd-3-clause
hashToList :: Hash -> [String] hashToList (Certain s) = [s]
59
hashToList :: Hash -> [String] hashToList (Certain s) = [s]
59
hashToList (Certain s) = [s]
28
false
true
0
7
9
30
16
14
null
null
osa1/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
termSmallerThan x (V i) = True
30
termSmallerThan x (V i) = True
30
termSmallerThan x (V i) = True
30
false
false
0
7
5
18
8
10
null
null
schernichkin/haskell-invertible-syntax-poly
example/json.hs
bsd-3-clause
runStringParser :: RunAsStringParser a ErrorStack runStringParser = runAsParser
80
runStringParser :: RunAsStringParser a ErrorStack runStringParser = runAsParser
80
runStringParser = runAsParser
30
false
true
0
5
8
16
8
8
null
null
tsahyt/clingo-haskell
src/Clingo/Internal/Inspection/Theory.hs
mit
theoryAtomsElementToString :: (MonadIO m, MonadThrow m) => TheoryAtoms s -> ElementId -> m Text theoryAtomsElementToString (TheoryAtoms h) (ElementId k) = do len <- marshal1 (Raw.theoryAtomsElementToStringSize h k) liftIO $ allocaArray (fromIntegral len) $ \arr -> do marshal0...
421
theoryAtomsElementToString :: (MonadIO m, MonadThrow m) => TheoryAtoms s -> ElementId -> m Text theoryAtomsElementToString (TheoryAtoms h) (ElementId k) = do len <- marshal1 (Raw.theoryAtomsElementToStringSize h k) liftIO $ allocaArray (fromIntegral len) $ \arr -> do marshal0...
421
theoryAtomsElementToString (TheoryAtoms h) (ElementId k) = do len <- marshal1 (Raw.theoryAtomsElementToStringSize h k) liftIO $ allocaArray (fromIntegral len) $ \arr -> do marshal0 (Raw.theoryAtomsElementToString h k arr len) pack <$> peekCStringLen (arr, fromIntegral len)
297
false
true
0
14
99
141
67
74
null
null
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Compiler/GhcjsProgram.hs
mit
printObj :: FilePath -> IO () printObj = Object.readObjectFile >=> TL.putStrLn . Object.showObject
98
printObj :: FilePath -> IO () printObj = Object.readObjectFile >=> TL.putStrLn . Object.showObject
98
printObj = Object.readObjectFile >=> TL.putStrLn . Object.showObject
68
false
true
0
7
12
34
17
17
null
null
eigengrau/hlint
data/Default.hs
bsd-3-clause
error = flip traverse_ ==> for_ where _ = noQuickCheck
54
error = flip traverse_ ==> for_ where _ = noQuickCheck
54
error = flip traverse_ ==> for_ where _ = noQuickCheck
54
false
false
2
5
9
26
10
16
null
null
h-hirai/hommad
src/HomMad/Goban.hs
gpl-3.0
getChain :: GameStatus -> Coord -> Chain getChain st pt = case boardRef (_chains st) pt of (Point ch) -> ch _ -> mempty
157
getChain :: GameStatus -> Coord -> Chain getChain st pt = case boardRef (_chains st) pt of (Point ch) -> ch _ -> mempty
157
getChain st pt = case boardRef (_chains st) pt of (Point ch) -> ch _ -> mempty
116
false
true
0
9
61
57
28
29
null
null
yesodweb/yesod
yesod-form/Yesod/Form/I18n/Korean.hs
mit
koreanFormMessage (MsgInvalidSecond t) = "잘못된 초입니다: " `mappend` t
65
koreanFormMessage (MsgInvalidSecond t) = "잘못된 초입니다: " `mappend` t
65
koreanFormMessage (MsgInvalidSecond t) = "잘못된 초입니다: " `mappend` t
65
false
false
0
6
8
22
11
11
null
null
phylake/avm3
vm/store.hs
mit
xform_opCode {- 0x26 -} i u d s m t (Abc.PushTrue) = [PushTrue]
63
xform_opCode {- 0x26 -} i u d s m t (Abc.PushTrue) = [PushTrue]
63
xform_opCode {- 0x26 -} i u d s m t (Abc.PushTrue) = [PushTrue]
63
false
false
0
7
12
30
16
14
null
null
nomeata/sat-britney
Difference.hs
gpl-2.0
setMap f = S.fromList . map f . IxS.toList
42
setMap f = S.fromList . map f . IxS.toList
42
setMap f = S.fromList . map f . IxS.toList
42
false
false
0
7
8
24
11
13
null
null
byorgey/Idris-dev
src/IRTS/LParser.hs
bsd-3-clause
semi = PTok.semi lexer
27
semi = PTok.semi lexer
27
semi = PTok.semi lexer
27
false
false
1
5
8
15
5
10
null
null
ulricha/dsh
src/Database/DSH/Common/Lang.hs
bsd-3-clause
litScalarTy UnitV{} = UnitT
30
litScalarTy UnitV{} = UnitT
30
litScalarTy UnitV{} = UnitT
30
false
false
0
6
6
13
6
7
null
null
HJvT/com
System/Win32/Com/HDirect/Pointer.hs
bsd-3-clause
mkFinal final obj = ap0 final obj
33
mkFinal final obj = ap0 final obj
33
mkFinal final obj = ap0 final obj
33
false
false
0
5
6
16
7
9
null
null
Soares/Pinger.hs
src/Main.hs
mit
happenedBefore :: TimeBounds -> UTCTime -> Bool happenedBefore (start, _) time = maybe False (time <) start
107
happenedBefore :: TimeBounds -> UTCTime -> Bool happenedBefore (start, _) time = maybe False (time <) start
107
happenedBefore (start, _) time = maybe False (time <) start
59
false
true
0
6
16
41
22
19
null
null
fpco/statistics
Statistics/Distribution/FDistribution.hs
bsd-2-clause
logDensity :: FDistribution -> Double -> Double logDensity (F n m fac) x = fac + log x * (0.5 * n - 1) - log(m + n*x) * 0.5 * (n + m)
135
logDensity :: FDistribution -> Double -> Double logDensity (F n m fac) x = fac + log x * (0.5 * n - 1) - log(m + n*x) * 0.5 * (n + m)
135
logDensity (F n m fac) x = fac + log x * (0.5 * n - 1) - log(m + n*x) * 0.5 * (n + m)
87
false
true
0
11
35
89
45
44
null
null
tel/haskell-maia
maia-aeson/src/Maia/Aeson.hs
mpl-2.0
espBuildReader :: Sing rs -> Rec (Serializes Parser Value) rs -> Value -> Parser (Rec Resp rs) respBuildReader rs sz = withObject "maia response" (respBuildObjReader rs sz)
175
respBuildReader :: Sing rs -> Rec (Serializes Parser Value) rs -> Value -> Parser (Rec Resp rs) respBuildReader rs sz = withObject "maia response" (respBuildObjReader rs sz)
175
respBuildReader rs sz = withObject "maia response" (respBuildObjReader rs sz)
77
false
true
0
11
29
69
32
37
null
null
krgn/hamdrill
test/Network/API/Mandrill/MessagesSpec.hs
mit
test_listScheduled :: Spec test_listScheduled = describe "/messages/list-scheduled.json" $ it "should list a scheduled email" $ do raw <- getEnv "MANDRILL_API_KEY" now <- getCurrentTime let email = "karsten@kurt.net" rcpt = [ Recipient { _recipient_email = "karste...
953
test_listScheduled :: Spec test_listScheduled = describe "/messages/list-scheduled.json" $ it "should list a scheduled email" $ do raw <- getEnv "MANDRILL_API_KEY" now <- getCurrentTime let email = "karsten@kurt.net" rcpt = [ Recipient { _recipient_email = "karste...
953
test_listScheduled = describe "/messages/list-scheduled.json" $ it "should list a scheduled email" $ do raw <- getEnv "MANDRILL_API_KEY" now <- getCurrentTime let email = "karsten@kurt.net" rcpt = [ Recipient { _recipient_email = "karsten@null2.net" ...
926
false
true
0
16
381
210
107
103
null
null
LouisJenkinsCS/Minimal-JVM
MateVMRuntime/Utilities.hs
bsd-3-clause
buildMethodID :: Class Direct -> Word16 -> MethodInfo buildMethodID cls idx = MethodInfo (ntName nt) rc (ntSignature nt) where (rc, nt) = case constsPool cls M.! idx of (CMethod rc' nt') -> (rc', nt') (CIfaceMethod rc' nt') -> (rc', nt') _ -> error "buildMethodID: something wrong. abort."
313
buildMethodID :: Class Direct -> Word16 -> MethodInfo buildMethodID cls idx = MethodInfo (ntName nt) rc (ntSignature nt) where (rc, nt) = case constsPool cls M.! idx of (CMethod rc' nt') -> (rc', nt') (CIfaceMethod rc' nt') -> (rc', nt') _ -> error "buildMethodID: something wrong. abort."
313
buildMethodID cls idx = MethodInfo (ntName nt) rc (ntSignature nt) where (rc, nt) = case constsPool cls M.! idx of (CMethod rc' nt') -> (rc', nt') (CIfaceMethod rc' nt') -> (rc', nt') _ -> error "buildMethodID: something wrong. abort."
259
false
true
3
7
70
125
62
63
null
null
thewildweasel/todo-list
src/readtest.hs
gpl-3.0
do_item :: [[String]] -> [String] -> IO() do_item list args = do if length args > 1 then do let newList = doable_check list list args 0 "do" if length newList > 1 then do write_fil...
868
do_item :: [[String]] -> [String] -> IO() do_item list args = do if length args > 1 then do let newList = doable_check list list args 0 "do" if length newList > 1 then do write_fil...
868
do_item list args = do if length args > 1 then do let newList = doable_check list list args 0 "do" if length newList > 1 then do write_file newList args else ...
826
false
true
0
20
546
158
74
84
null
null
michiexile/hplex
pershom/src/Math/Simplicial/FilteredComplex.hs
bsd-3-clause
filtrationTimes :: FilteredComplex a b -> Vect.Vector a filtrationTimes (C t _) = t
83
filtrationTimes :: FilteredComplex a b -> Vect.Vector a filtrationTimes (C t _) = t
83
filtrationTimes (C t _) = t
27
false
true
0
7
13
36
17
19
null
null
sdiehl/ghc
compiler/GHC/Stg/Syntax.hs
bsd-3-clause
pprGenStgTopBinding :: OutputablePass pass => GenStgTopBinding pass -> SDoc pprGenStgTopBinding (StgTopStringLit bndr str) = hang (hsep [pprBndr LetBind bndr, equals]) 4 (pprHsBytes str <> semi)
206
pprGenStgTopBinding :: OutputablePass pass => GenStgTopBinding pass -> SDoc pprGenStgTopBinding (StgTopStringLit bndr str) = hang (hsep [pprBndr LetBind bndr, equals]) 4 (pprHsBytes str <> semi)
206
pprGenStgTopBinding (StgTopStringLit bndr str) = hang (hsep [pprBndr LetBind bndr, equals]) 4 (pprHsBytes str <> semi)
128
false
true
0
9
36
73
35
38
null
null
hazel-el/hazel
test/Hazel/TestCases.hs
gpl-3.0
gci3b' :: TBox gci3b' = gcisToTBox [ Subclass conjunction dummy , Subclass (Exists role dummy) name ] where dummy = toDummy gci3b
171
gci3b' :: TBox gci3b' = gcisToTBox [ Subclass conjunction dummy , Subclass (Exists role dummy) name ] where dummy = toDummy gci3b
171
gci3b' = gcisToTBox [ Subclass conjunction dummy , Subclass (Exists role dummy) name ] where dummy = toDummy gci3b
156
false
true
0
9
63
49
24
25
null
null
urbanslug/ghc
compiler/types/FamInstEnv.hs
bsd-3-clause
-- Return the representation TyCons introduced by data family instances, if any famInstsRepTyCons :: [FamInst] -> [TyCon] famInstsRepTyCons fis = [tc | FamInst { fi_flavor = DataFamilyInst tc } <- fis]
201
famInstsRepTyCons :: [FamInst] -> [TyCon] famInstsRepTyCons fis = [tc | FamInst { fi_flavor = DataFamilyInst tc } <- fis]
121
famInstsRepTyCons fis = [tc | FamInst { fi_flavor = DataFamilyInst tc } <- fis]
79
true
true
0
12
30
52
27
25
null
null
jsnajder/multext-east-msd
src/Data/MultextEastMsd.hs
bsd-3-clause
encode (Gender v) = enc Gender v
38
encode (Gender v) = enc Gender v
38
encode (Gender v) = enc Gender v
38
false
false
0
6
12
21
9
12
null
null
SergeyKrivohatskiy/fp_haskell
class/Hw06.hs
mit
delete key (Branch k v m_left m_right) | key == k = let merge Leaf r = r merge (Branch k v m_left m_right) r = Branch k v m_left (merge m_right r) in merge m_left m_right ...
462
delete key (Branch k v m_left m_right) | key == k = let merge Leaf r = r merge (Branch k v m_left m_right) r = Branch k v m_left (merge m_right r) in merge m_left m_right ...
462
delete key (Branch k v m_left m_right) | key == k = let merge Leaf r = r merge (Branch k v m_left m_right) r = Branch k v m_left (merge m_right r) in merge m_left m_right ...
462
false
false
0
12
250
153
71
82
null
null
beni55/cps-core
CPS/Syntax.hs
bsd-3-clause
renameCoIdBinder' :: InScopeSet -> CoIdSubst -> CoId -> (InScopeSet, CoIdSubst, CoId) renameCoIdBinder' iss coidsubst u = (iss', CoIdSubst (insertUniqueMap n u' (unCoIdSubst coidsubst)), u') where n = coIdName u (iss', n') = uniqAwayName iss n u' = u { coIdName = n' } -- NB: don't need to rename types
320
renameCoIdBinder' :: InScopeSet -> CoIdSubst -> CoId -> (InScopeSet, CoIdSubst, CoId) renameCoIdBinder' iss coidsubst u = (iss', CoIdSubst (insertUniqueMap n u' (unCoIdSubst coidsubst)), u') where n = coIdName u (iss', n') = uniqAwayName iss n u' = u { coIdName = n' } -- NB: don't need to rename types
320
renameCoIdBinder' iss coidsubst u = (iss', CoIdSubst (insertUniqueMap n u' (unCoIdSubst coidsubst)), u') where n = coIdName u (iss', n') = uniqAwayName iss n u' = u { coIdName = n' } -- NB: don't need to rename types
234
false
true
1
10
67
120
61
59
null
null
nevrenato/Hets_Fork
Maude/Maude2DG.hs
gpl-2.0
qualifyRenamings2 :: Token -> [Renaming] -> [Renaming] qualifyRenamings2 t = map (qualifyRenaming2 t)
101
qualifyRenamings2 :: Token -> [Renaming] -> [Renaming] qualifyRenamings2 t = map (qualifyRenaming2 t)
101
qualifyRenamings2 t = map (qualifyRenaming2 t)
46
false
true
0
9
12
42
20
22
null
null
thoughtpolice/shake-extras
Development/Shake/CLI.hs
bsd-3-clause
-- | A 'ShakeOptions' data structure with -- annotations for CmdArgs already included. options :: ShakeOptions options = ShakeOptions { shakeFiles = ".shake" &= help "shake journal/db path" , shakeThreads = 1 &= help "threads to use for build" &= name "j" &= typ "NUM" ...
815
options :: ShakeOptions options = ShakeOptions { shakeFiles = ".shake" &= help "shake journal/db path" , shakeThreads = 1 &= help "threads to use for build" &= name "j" &= typ "NUM" , shakeVersion = 1 &= ignore , shakeStaunch = False &= he...
727
options = ShakeOptions { shakeFiles = ".shake" &= help "shake journal/db path" , shakeThreads = 1 &= help "threads to use for build" &= name "j" &= typ "NUM" , shakeVersion = 1 &= ignore , shakeStaunch = False &= help "keep going after err...
703
true
true
4
10
280
180
92
88
null
null
xnning/fcore
lib/Predef.hs
bsd-2-clause
injectPredef :: String -> String injectPredef s = predef ++ s
61
injectPredef :: String -> String injectPredef s = predef ++ s
61
injectPredef s = predef ++ s
28
false
true
0
7
10
28
12
16
null
null
ComputationWithBoundedResources/tct-hoca
src/Tct/Hoca/Strategies.hs
bsd-3-clause
inline,rewrite :: (PP.Pretty f, Ord f, Typeable f) => String -> Inline.Selector f Int -> Strategy (RewriteSystem f) (RewriteSystem f) inline n f = processor (Inline InlineFull (InlineSelector n f))
197
inline,rewrite :: (PP.Pretty f, Ord f, Typeable f) => String -> Inline.Selector f Int -> Strategy (RewriteSystem f) (RewriteSystem f) inline n f = processor (Inline InlineFull (InlineSelector n f))
197
inline n f = processor (Inline InlineFull (InlineSelector n f))
63
false
true
0
10
29
92
46
46
null
null
A1kmm/sbasetram
pfilter.hs
agpl-3.0
pfilter postco sitefile = do vals <- readValues sitefile writeFASTA (filterByCutoff postco vals)
112
pfilter postco sitefile = do vals <- readValues sitefile writeFASTA (filterByCutoff postco vals)
112
pfilter postco sitefile = do vals <- readValues sitefile writeFASTA (filterByCutoff postco vals)
112
false
false
0
9
28
36
15
21
null
null
alexander-at-github/eta
compiler/ETA/CodeGen/Env.hs
bsd-3-clause
getArgLoadCode (NonVoid (StgLitArg literal)) = return . snd $ cgLit literal
75
getArgLoadCode (NonVoid (StgLitArg literal)) = return . snd $ cgLit literal
75
getArgLoadCode (NonVoid (StgLitArg literal)) = return . snd $ cgLit literal
75
false
false
0
9
10
32
15
17
null
null
Southern-Exposure-Seed-Exchange/southernexposure.com
server/src/Routes/Checkout.hs
gpl-3.0
createProducts :: [CartItemData] -> OrderId -> AppSQL [Cents] createProducts items orderId = mapM (fmap calculateTotal <$> insertEntity . makeProduct) items where calculateTotal (Entity _ prod) = orderProductPrice prod * (Cents $ orderProductQuantity prod) makeProduct CartItemData { cidVar...
667
createProducts :: [CartItemData] -> OrderId -> AppSQL [Cents] createProducts items orderId = mapM (fmap calculateTotal <$> insertEntity . makeProduct) items where calculateTotal (Entity _ prod) = orderProductPrice prod * (Cents $ orderProductQuantity prod) makeProduct CartItemData { cidVar...
667
createProducts items orderId = mapM (fmap calculateTotal <$> insertEntity . makeProduct) items where calculateTotal (Entity _ prod) = orderProductPrice prod * (Cents $ orderProductQuantity prod) makeProduct CartItemData { cidVariant, cidQuantity } = OrderProduct ...
605
false
true
1
9
191
137
72
65
null
null
pontarius/pontarius-service
source/Xmpp.hs
agpl-3.0
ourJid :: PSState -> IO (Maybe Xmpp.Jid) ourJid st = runMaybeT $ do (xmppCon, _ctx) <- (liftIO . atomically . readTVar $ view psXmppCon st) >>= \case XmppConnected c ctx _ -> return (c, ctx) _ -> do logError "Xmpp connection not established" mzero ...
467
ourJid :: PSState -> IO (Maybe Xmpp.Jid) ourJid st = runMaybeT $ do (xmppCon, _ctx) <- (liftIO . atomically . readTVar $ view psXmppCon st) >>= \case XmppConnected c ctx _ -> return (c, ctx) _ -> do logError "Xmpp connection not established" mzero ...
467
ourJid st = runMaybeT $ do (xmppCon, _ctx) <- (liftIO . atomically . readTVar $ view psXmppCon st) >>= \case XmppConnected c ctx _ -> return (c, ctx) _ -> do logError "Xmpp connection not established" mzero liftIO (Xmpp.getJid xmppCon) >>= \case ...
426
false
true
0
15
176
156
73
83
null
null
thalerjonathan/phd
coding/prototyping/haskell/declarativeABM/haskell/SpatialGameABS/src/SpacialGameMsg/SGModelMsg.hs
gpl-3.0
agentToCell :: SGAgent -> (Int, Int) -> (Int, Int) agentToCell a (xCells, yCells) = (ax, ay) where aid = PA.agentId a ax = mod aid yCells ay = floor((fromIntegral aid) / (fromIntegral xCells))
221
agentToCell :: SGAgent -> (Int, Int) -> (Int, Int) agentToCell a (xCells, yCells) = (ax, ay) where aid = PA.agentId a ax = mod aid yCells ay = floor((fromIntegral aid) / (fromIntegral xCells))
221
agentToCell a (xCells, yCells) = (ax, ay) where aid = PA.agentId a ax = mod aid yCells ay = floor((fromIntegral aid) / (fromIntegral xCells))
170
false
true
3
9
61
114
54
60
null
null
nilthehuman/H-99
Lists.hs
unlicense
-- Problem 16 dropEvery :: [a] -> Int -> [a] dropEvery xs k = go xs k where go [] _ = [] go (_:xs) 1 = go xs k go (x:xs) i | i < 1 = error "invalid argument" -- don't let k < 0 bottom out | otherwise = x:go xs (pred i)
275
dropEvery :: [a] -> Int -> [a] dropEvery xs k = go xs k where go [] _ = [] go (_:xs) 1 = go xs k go (x:xs) i | i < 1 = error "invalid argument" -- don't let k < 0 bottom out | otherwise = x:go xs (pred i)
261
dropEvery xs k = go xs k where go [] _ = [] go (_:xs) 1 = go xs k go (x:xs) i | i < 1 = error "invalid argument" -- don't let k < 0 bottom out | otherwise = x:go xs (pred i)
230
true
true
4
9
112
128
64
64
null
null
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/Internal/Texture.hs
mit
offName _ = "Offset"
20
offName _ = "Offset"
20
offName _ = "Offset"
20
false
false
0
4
3
10
4
6
null
null
riwsky/wiwinwlh
src/maybe.hs
mit
example2 :: Maybe Int example2 = do a <- Just 3 b <- Nothing return $ a + b -- Nothing
92
example2 :: Maybe Int example2 = do a <- Just 3 b <- Nothing return $ a + b -- Nothing
92
example2 = do a <- Just 3 b <- Nothing return $ a + b -- Nothing
70
false
true
0
8
26
49
21
28
null
null
shlevy/ghc
compiler/basicTypes/Module.hs
bsd-3-clause
-- | See 'splitModuleInsts'. splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId) splitUnitIdInsts (IndefiniteUnitId iuid) = (componentIdToInstalledUnitId (indefUnitIdComponentId iuid), Just iuid)
214
splitUnitIdInsts :: UnitId -> (InstalledUnitId, Maybe IndefUnitId) splitUnitIdInsts (IndefiniteUnitId iuid) = (componentIdToInstalledUnitId (indefUnitIdComponentId iuid), Just iuid)
185
splitUnitIdInsts (IndefiniteUnitId iuid) = (componentIdToInstalledUnitId (indefUnitIdComponentId iuid), Just iuid)
118
true
true
0
8
23
52
27
25
null
null
roberth/uu-helium
test/simple/benchmarks/Main.hs
gpl-3.0
- deriving (Eq,Show{-was:Text-}) eqFixity :: Fixity -> Fixity -> Bool eqFixity InfixL InfixL = True
101
eqFixity :: Fixity -> Fixity -> Bool eqFixity InfixL InfixL = True
66
eqFixity InfixL InfixL = True
29
true
true
1
6
16
38
20
18
null
null
yaccz/hscmp
Spec.hs
bsd-3-clause
main :: IO () main = hspec $ do describe "CmpResult" $ do it "Differ equals" $ Differ 1 1 `shouldBe` Differ 1 1 it "Same equals" $ do Same `shouldBe` Same it "Differ doesn't equal" $ Differ 1 2 `shouldSatisfy` (/= Differ 1 1) it "Same doesn't equal Differ" $ ...
621
main :: IO () main = hspec $ do describe "CmpResult" $ do it "Differ equals" $ Differ 1 1 `shouldBe` Differ 1 1 it "Same equals" $ do Same `shouldBe` Same it "Differ doesn't equal" $ Differ 1 2 `shouldSatisfy` (/= Differ 1 1) it "Same doesn't equal Differ" $ ...
621
main = hspec $ do describe "CmpResult" $ do it "Differ equals" $ Differ 1 1 `shouldBe` Differ 1 1 it "Same equals" $ do Same `shouldBe` Same it "Differ doesn't equal" $ Differ 1 2 `shouldSatisfy` (/= Differ 1 1) it "Same doesn't equal Differ" $ Differ 1 2 `s...
607
false
true
0
22
221
256
126
130
null
null
rueshyna/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Link to next page for this segment collection. sNextLink :: Lens' Segments (Maybe Text) sNextLink = lens _sNextLink (\ s a -> s{_sNextLink = a})
151
sNextLink :: Lens' Segments (Maybe Text) sNextLink = lens _sNextLink (\ s a -> s{_sNextLink = a})
99
sNextLink = lens _sNextLink (\ s a -> s{_sNextLink = a})
58
true
true
0
9
28
48
25
23
null
null
GaloisInc/pads-haskell
Language/Pads/LazyList.hs
bsd-3-clause
nil :: FList nil = \ws -> ws
29
nil :: FList nil = \ws -> ws
28
nil = \ws -> ws
15
false
true
0
6
8
23
10
13
null
null
fishbee/pfds-haskell
chapter2/Ex2_4.hs
gpl-3.0
insertCondMemo x (T a y b) memo = do if x < y then do left <- insertCondMemo x a memo return (T left y b) else do right <- insertCondMemo x b memo return (T a y right)
187
insertCondMemo x (T a y b) memo = do if x < y then do left <- insertCondMemo x a memo return (T left y b) else do right <- insertCondMemo x b memo return (T a y right)
187
insertCondMemo x (T a y b) memo = do if x < y then do left <- insertCondMemo x a memo return (T left y b) else do right <- insertCondMemo x b memo return (T a y right)
187
false
false
0
12
58
98
45
53
null
null
shlevy/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
cmmLabelOffB :: CLabel -> ByteOff -> CmmLit cmmLabelOffB = cmmLabelOff
70
cmmLabelOffB :: CLabel -> ByteOff -> CmmLit cmmLabelOffB = cmmLabelOff
70
cmmLabelOffB = cmmLabelOff
26
false
true
0
6
9
19
10
9
null
null
ony/hledger
tools/pandoc-drop-web-blocks.hs
gpl-3.0
dropWebBlocks x = x
19
dropWebBlocks x = x
19
dropWebBlocks x = x
19
false
false
0
5
3
9
4
5
null
null
bfpg/brisparks.info
src/KML.hs
mit
makeKML ss = Just $ T.concat [h, geoms, t] where h = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\ \<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n\ \ <Placemark>\n" t = "\n </Placemark>\n</kml>" geoms = T.intercalate "\n" ss
251
makeKML ss = Just $ T.concat [h, geoms, t] where h = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\ \<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n\ \ <Placemark>\n" t = "\n </Placemark>\n</kml>" geoms = T.intercalate "\n" ss
251
makeKML ss = Just $ T.concat [h, geoms, t] where h = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\ \<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n\ \ <Placemark>\n" t = "\n </Placemark>\n</kml>" geoms = T.intercalate "\n" ss
251
false
false
0
7
51
52
27
25
null
null
ciderpunx/exercismo
src/Queens.hs
gpl-3.0
boardString (Just (a,b)) (Just (a',b')) = format $ replaceAt (a,b) 'W' $ replaceAt (a',b') 'B' us
101
boardString (Just (a,b)) (Just (a',b')) = format $ replaceAt (a,b) 'W' $ replaceAt (a',b') 'B' us
101
boardString (Just (a,b)) (Just (a',b')) = format $ replaceAt (a,b) 'W' $ replaceAt (a',b') 'B' us
101
false
false
3
8
19
72
36
36
null
null
klarh/haste-webgl
src/Haste/Graphics/WebGL/Special.hs
mit
disable::Context->Capability->IO () disable = ffi "(function(ctx, cap) {ctx.disable(cap);})"
92
disable::Context->Capability->IO () disable = ffi "(function(ctx, cap) {ctx.disable(cap);})"
92
disable = ffi "(function(ctx, cap) {ctx.disable(cap);})"
56
false
true
0
8
7
27
13
14
null
null
norm2782/uuagc
src/RhsCheck.hs
bsd-3-clause
exts :: [Extension] exts = glasgowExts
38
exts :: [Extension] exts = glasgowExts
38
exts = glasgowExts
18
false
true
0
5
5
14
8
6
null
null
kim/amazonka
amazonka-kinesis/gen/Network/AWS/Kinesis/CreateStream.hs
mpl-2.0
-- | A name to identify the stream. The stream name is scoped to the AWS account -- used by the application that creates the stream. It is also scoped by region. -- That is, two streams in two different AWS accounts can have the same name, -- and two streams in the same AWS account, but in two different regions, can --...
448
csStreamName :: Lens' CreateStream Text csStreamName = lens _csStreamName (\s a -> s { _csStreamName = a })
107
csStreamName = lens _csStreamName (\s a -> s { _csStreamName = a })
67
true
true
0
9
84
44
26
18
null
null
gust/feature-creature
legacy/exe-search-service/Main.hs
mit
main :: IO () main = do appConfig <- readConfig withRetry (createFeaturesIndex (getElasticSearchConfig appConfig)) withRetry (MB.withConn (getRabbitMQConfig appConfig) (initMessageBroker appConfig)) runReaderT processJobs appConfig
239
main :: IO () main = do appConfig <- readConfig withRetry (createFeaturesIndex (getElasticSearchConfig appConfig)) withRetry (MB.withConn (getRabbitMQConfig appConfig) (initMessageBroker appConfig)) runReaderT processJobs appConfig
239
main = do appConfig <- readConfig withRetry (createFeaturesIndex (getElasticSearchConfig appConfig)) withRetry (MB.withConn (getRabbitMQConfig appConfig) (initMessageBroker appConfig)) runReaderT processJobs appConfig
225
false
true
0
11
30
77
35
42
null
null
benkolera/xml-conduit-decode
src/Text/XML/Decode/DecodeCursor.hs
mit
nelCursor :: HCursor -> DecodeResult (NonEmpty HCursor) nelCursor = foldCursor f w where f = Left . ("Tried to convert failed cursor to NEL",) w cs h = Right $ fmap (\ c -> HCursor [c] h) cs
205
nelCursor :: HCursor -> DecodeResult (NonEmpty HCursor) nelCursor = foldCursor f w where f = Left . ("Tried to convert failed cursor to NEL",) w cs h = Right $ fmap (\ c -> HCursor [c] h) cs
205
nelCursor = foldCursor f w where f = Left . ("Tried to convert failed cursor to NEL",) w cs h = Right $ fmap (\ c -> HCursor [c] h) cs
149
false
true
5
9
52
96
42
54
null
null
nomeata/list-fusion-lab
ListImpls/FusingFoldl.hs
bsd-3-clause
or [] = False
24
or [] = False
24
or [] = False
24
false
false
0
5
14
12
5
7
null
null
mrakgr/futhark
src/Futhark/CodeGen/ImpCode.hs
bsd-3-clause
functionsCalled (Call _ fname _) = HS.singleton fname
53
functionsCalled (Call _ fname _) = HS.singleton fname
53
functionsCalled (Call _ fname _) = HS.singleton fname
53
false
false
0
6
7
25
11
14
null
null
ciderpunx/project_euler_in_haskell
euler026.hs
gpl-2.0
-- For a denominator ending 1,3,7, or 9 call cyc on it -- if cyc is empty then return 0 -- otherwise return the length of the head of cyc p -- which is the length of the cyclic period ends137or9 :: Integer -> Integer ends137or9 p = if null cp then 0 else toInteger . length . show $ head cp
294
ends137or9 :: Integer -> Integer ends137or9 p = if null cp then 0 else toInteger . length . show $ head cp
110
ends137or9 p = if null cp then 0 else toInteger . length . show $ head cp
77
true
true
0
8
65
48
26
22
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/OrdList.hs
bsd-3-clause
a `appOL` None = a
23
a `appOL` None = a
23
a `appOL` None = a
23
false
false
0
5
9
14
7
7
null
null
fpco/schoolofhaskell
soh-client/src/View/Build.hs
mit
buildStatusText (KillRequested _ _) = "Killing"
47
buildStatusText (KillRequested _ _) = "Killing"
47
buildStatusText (KillRequested _ _) = "Killing"
47
false
false
0
6
5
18
8
10
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 18315 = 5841
32
getValueFromProduct 18315 = 5841
32
getValueFromProduct 18315 = 5841
32
false
false
0
5
3
9
4
5
null
null
sdiehl/ghc
compiler/utils/UniqFM.hs
bsd-3-clause
-- See Note [Deterministic UniqFM] to learn about nondeterminism. -- If you use this please provide a justification why it doesn't introduce -- nondeterminism. nonDetFoldUFM_Directly:: (Unique -> elt -> a -> a) -> a -> UniqFM elt -> a nonDetFoldUFM_Directly k z (UFM m) = M.foldrWithKey (k . getUnique) z m
306
nonDetFoldUFM_Directly:: (Unique -> elt -> a -> a) -> a -> UniqFM elt -> a nonDetFoldUFM_Directly k z (UFM m) = M.foldrWithKey (k . getUnique) z m
146
nonDetFoldUFM_Directly k z (UFM m) = M.foldrWithKey (k . getUnique) z m
71
true
true
0
9
50
73
38
35
null
null
nyson/haste-compiler
src/Haste/Linker.hs
bsd-3-clause
initState :: Config -> (BS.ByteString, BS.ByteString) -> DepState initState cfg m = DepState { mainModule = m, defs = id, alreadySeen = S.empty, modules = M.empty, infoLogger = info' cfg }
223
initState :: Config -> (BS.ByteString, BS.ByteString) -> DepState initState cfg m = DepState { mainModule = m, defs = id, alreadySeen = S.empty, modules = M.empty, infoLogger = info' cfg }
223
initState cfg m = DepState { mainModule = m, defs = id, alreadySeen = S.empty, modules = M.empty, infoLogger = info' cfg }
157
false
true
0
8
65
73
42
31
null
null
arypbatista/LIS-Parser
Main.hs
gpl-3.0
executeFile = (flip fromFile) (print . (flip execute) memoryNew)
64
executeFile = (flip fromFile) (print . (flip execute) memoryNew)
64
executeFile = (flip fromFile) (print . (flip execute) memoryNew)
64
false
false
0
10
8
31
15
16
null
null