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
travitch/dalvik
src/Dalvik/Types.hs
bsd-3-clause
methodSignatureString :: ([BS.ByteString], BS.ByteString) -> BS.ByteString methodSignatureString (pts, rt) = mconcat [ fromString "(", mconcat pts, fromString ")", rt ]
170
methodSignatureString :: ([BS.ByteString], BS.ByteString) -> BS.ByteString methodSignatureString (pts, rt) = mconcat [ fromString "(", mconcat pts, fromString ")", rt ]
170
methodSignatureString (pts, rt) = mconcat [ fromString "(", mconcat pts, fromString ")", rt ]
95
false
true
0
8
21
63
34
29
null
null
codders/gp3
src/BPackReader.hs
gpl-3.0
parseCompressedFile :: Show a => (L.ByteString -> FileType -> Maybe a) -> String -> IO (Maybe a) parseCompressedFile parseFunction fileName = do putStrLn $ "Loading from " ++ fileName handle (\e -> do putStrLn $ "Error loading file: " ++ (show e); return Nothing) $ bracket (openFile fileName R...
841
parseCompressedFile :: Show a => (L.ByteString -> FileType -> Maybe a) -> String -> IO (Maybe a) parseCompressedFile parseFunction fileName = do putStrLn $ "Loading from " ++ fileName handle (\e -> do putStrLn $ "Error loading file: " ++ (show e); return Nothing) $ bracket (openFile fileName R...
841
parseCompressedFile parseFunction fileName = do putStrLn $ "Loading from " ++ fileName handle (\e -> do putStrLn $ "Error loading file: " ++ (show e); return Nothing) $ bracket (openFile fileName ReadMode) hClose $ \h -> do fileData <- L.hGetContents h let unpacked = un...
744
false
true
8
12
258
236
114
122
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
osScriptVerify :: String osScriptVerify = "verify"
50
osScriptVerify :: String osScriptVerify = "verify"
50
osScriptVerify = "verify"
25
false
true
0
4
5
11
6
5
null
null
GaloisInc/halvm-ghc
compiler/codeGen/StgCmmUtils.hs
bsd-3-clause
label_branches :: BlockId -> [(a,CmmAGraphScoped)] -> FCode [(a,BlockId)] label_branches _join_lbl [] = return []
115
label_branches :: BlockId -> [(a,CmmAGraphScoped)] -> FCode [(a,BlockId)] label_branches _join_lbl [] = return []
115
label_branches _join_lbl [] = return []
41
false
true
0
9
15
52
28
24
null
null
adityagupta1089/Project-Euler-Haskell
src/problems/Problem315.hs
bsd-3-clause
digits :: Array Int Digit digits = array (0, 9) [ (0, [1, 1, 1, 1, 1, 1, 0]) , (1, [0, 1, 1, 0, 0, 0, 0]) , (2, [1, 1, 0, 1, 1, 0, 1]) , (3, [1, 1, 1, 1, 0, 0, 1]) , (4, [0, 1, 1, 0, 0, 1, 1]) , (5, [1, 0, 1, 1, 0, 1, 1]) , (6, [1, 0, 1, 1, 1, 1, 1]) , (7, [1, 1, 1, 0, 0, 1, 0]) ...
387
digits :: Array Int Digit digits = array (0, 9) [ (0, [1, 1, 1, 1, 1, 1, 0]) , (1, [0, 1, 1, 0, 0, 0, 0]) , (2, [1, 1, 0, 1, 1, 0, 1]) , (3, [1, 1, 1, 1, 0, 0, 1]) , (4, [0, 1, 1, 0, 0, 1, 1]) , (5, [1, 0, 1, 1, 0, 1, 1]) , (6, [1, 0, 1, 1, 1, 1, 1]) , (7, [1, 1, 1, 0, 0, 1, 0]) ...
387
digits = array (0, 9) [ (0, [1, 1, 1, 1, 1, 1, 0]) , (1, [0, 1, 1, 0, 0, 0, 0]) , (2, [1, 1, 0, 1, 1, 0, 1]) , (3, [1, 1, 1, 1, 0, 0, 1]) , (4, [0, 1, 1, 0, 0, 1, 1]) , (5, [1, 0, 1, 1, 0, 1, 1]) , (6, [1, 0, 1, 1, 1, 1, 1]) , (7, [1, 1, 1, 0, 0, 1, 0]) , (8, [1, 1, 1, 1, 1, 1, 1...
361
false
true
0
8
148
327
214
113
null
null
ezyang/ghc
compiler/types/Coercion.hs
bsd-3-clause
-- | Make a phantom coercion between two types of the same kind. mkHomoPhantomCo :: Type -> Type -> Coercion mkHomoPhantomCo t1 t2 = ASSERT( k1 `eqType` typeKind t2 ) mkPhantomCo (mkNomReflCo k1) t1 t2 where k1 = typeKind t1 -- takes any coercion and turns it into a Phantom coercion
296
mkHomoPhantomCo :: Type -> Type -> Coercion mkHomoPhantomCo t1 t2 = ASSERT( k1 `eqType` typeKind t2 ) mkPhantomCo (mkNomReflCo k1) t1 t2 where k1 = typeKind t1 -- takes any coercion and turns it into a Phantom coercion
231
mkHomoPhantomCo t1 t2 = ASSERT( k1 `eqType` typeKind t2 ) mkPhantomCo (mkNomReflCo k1) t1 t2 where k1 = typeKind t1 -- takes any coercion and turns it into a Phantom coercion
187
true
true
0
8
63
66
34
32
null
null
c0deaddict/project-euler
src/Part2/Problem54.hs
bsd-3-clause
readNumber '9' = Just Nine
26
readNumber '9' = Just Nine
26
readNumber '9' = Just Nine
26
false
false
0
5
4
12
5
7
null
null
froozen/kademlia
src/Network/Kademlia/Instance.hs
bsd-3-clause
handleCommand :: (Serialize i, Eq i, Ord i, Serialize a) => Command i a -> Peer -> KademliaInstance i a -> IO () -- Simply answer a PING with a PONG handleCommand PING peer inst = send (handle inst) peer PONG
212
handleCommand :: (Serialize i, Eq i, Ord i, Serialize a) => Command i a -> Peer -> KademliaInstance i a -> IO () handleCommand PING peer inst = send (handle inst) peer PONG
176
handleCommand PING peer inst = send (handle inst) peer PONG
59
true
true
0
11
44
90
43
47
null
null
jekor/haskell-sscgi
Network/SCGI.hs
bsd-3-clause
path :: Monad m => SCGIT m (Maybe B.ByteString) -- ^ the path if found path = header "REQUEST_URI"
98
path :: Monad m => SCGIT m (Maybe B.ByteString) path = header "REQUEST_URI"
75
path = header "REQUEST_URI"
27
true
true
0
9
18
35
17
18
null
null
michaelficarra/purescript
src/Language/PureScript/Constants.hs
mit
st :: String st = "Control_Monad_ST"
36
st :: String st = "Control_Monad_ST"
36
st = "Control_Monad_ST"
23
false
true
0
4
5
11
6
5
null
null
MaxDaten/yage
src/Yage/Material.hs
mit
stpOrientation :: Lens' (Material col i) (Quaternion Double) stpOrientation = materialTransformation.orientation
112
stpOrientation :: Lens' (Material col i) (Quaternion Double) stpOrientation = materialTransformation.orientation
112
stpOrientation = materialTransformation.orientation
51
false
true
0
7
10
32
16
16
null
null
thoughtpolice/binary-serialise-cbor
Data/Binary/Serialise/CBOR/Write.hs
bsd-3-clause
{- From RFC 7049: Major type 1: a negative integer. The encoding follows the rules for unsigned integers (major type 0), except that the value is then -1 minus the encoded unsigned integer. For example, the integer -500 would be 0b001_11001 (major type 1, additional information 25) follow...
806
negInt64MP :: P.BoundedPrim Word64 negInt64MP = condB (<= 0x17) (fromIntegral . (0x20 +) >$< header) $ condB (<= 0xff) (fromIntegral >$< withConstHeader 0x38 P.word8) $ condB (<= 0xffff) (fromIntegral >$< withConstHeader 0x39 P.word16BE) $ condB (<= 0xffffffff) (fromIntegral >$< withCons...
423
negInt64MP = condB (<= 0x17) (fromIntegral . (0x20 +) >$< header) $ condB (<= 0xff) (fromIntegral >$< withConstHeader 0x38 P.word8) $ condB (<= 0xffff) (fromIntegral >$< withConstHeader 0x39 P.word16BE) $ condB (<= 0xffffffff) (fromIntegral >$< withConstHeader 0x3a P.word32BE) $ ...
388
true
true
0
13
202
140
74
66
null
null
bitemyapp/ghc
compiler/nativeGen/Dwarf/Types.hs
bsd-3-clause
-- | Header for the .debug_frame section. Here we emit the "Common -- Information Entry" record that etablishes general call frame -- parameters and the default stack layout. pprDwarfFrame :: DwarfFrame -> SDoc pprDwarfFrame DwarfFrame{dwCieLabel=cieLabel,dwCieInit=cieInit,dwCieProcs=procs} = sdocWithPlatform $ \plat...
2,038
pprDwarfFrame :: DwarfFrame -> SDoc pprDwarfFrame DwarfFrame{dwCieLabel=cieLabel,dwCieInit=cieInit,dwCieProcs=procs} = sdocWithPlatform $ \plat -> let cieStartLabel= mkAsmTempDerivedLabel cieLabel (fsLit "_start") cieEndLabel = mkAsmTempEndLabel cieLabel length = ppr cieEndLabel <> char '-' <...
1,863
pprDwarfFrame DwarfFrame{dwCieLabel=cieLabel,dwCieInit=cieInit,dwCieProcs=procs} = sdocWithPlatform $ \plat -> let cieStartLabel= mkAsmTempDerivedLabel cieLabel (fsLit "_start") cieEndLabel = mkAsmTempEndLabel cieLabel length = ppr cieEndLabel <> char '-' <> ppr cieStartLabel spReg ...
1,827
true
true
8
12
706
376
193
183
null
null
tolysz/hiccup
TclLib/CoreCmds.hs
lgpl-2.1
coreInits = [registerEnsem "info" cmdInfo]
42
coreInits = [registerEnsem "info" cmdInfo]
42
coreInits = [registerEnsem "info" cmdInfo]
42
false
false
0
6
4
14
7
7
null
null
bmsherman/haskell-vect
Data/Vect.hs
bsd-3-clause
concatMap :: (a -> Vect k b) -> Vect n a -> Vect (n * k) b concatMap f = concat . map f
87
concatMap :: (a -> Vect k b) -> Vect n a -> Vect (n * k) b concatMap f = concat . map f
87
concatMap f = concat . map f
28
false
true
1
10
23
65
29
36
null
null
jthornber/xdrgen
Data/XDR/Parser.hs
gpl-3.0
enumTypeSpec :: (Monad m) => Parser m Type enumTypeSpec = TEnum <$> (reserved "enum" *> enumDetail)
99
enumTypeSpec :: (Monad m) => Parser m Type enumTypeSpec = TEnum <$> (reserved "enum" *> enumDetail)
99
enumTypeSpec = TEnum <$> (reserved "enum" *> enumDetail)
56
false
true
0
8
15
39
20
19
null
null
brodyberg/LearnHaskell
HaskellProgramming.hsproj/Chapter07/Chapter7.hs
mit
pal :: [Char] -> Bool pal xs | xs == reverse xs = True | otherwise = False
91
pal :: [Char] -> Bool pal xs | xs == reverse xs = True | otherwise = False
89
pal xs | xs == reverse xs = True | otherwise = False
67
false
true
1
9
34
47
21
26
null
null
sos22/himap
MailFilter.hs
gpl-3.0
queryToFilter l c (DefnOr a b) = "(" ++ (queryToFilter l c a) ++ " OR " ++ (queryToFilter l c b) ++ ")"
106
queryToFilter l c (DefnOr a b) = "(" ++ (queryToFilter l c a) ++ " OR " ++ (queryToFilter l c b) ++ ")"
106
queryToFilter l c (DefnOr a b) = "(" ++ (queryToFilter l c a) ++ " OR " ++ (queryToFilter l c b) ++ ")"
106
false
false
0
10
26
57
28
29
null
null
ganeti/ganeti
src/Ganeti/Monitoring/Server.hs
bsd-2-clause
-- * Configuration handling -- | The default configuration for the HTTP server. defaultHttpConf :: FilePath -> FilePath -> Config Snap () defaultHttpConf accessLog errorLog = setAccessLog (ConfigFileLog accessLog) . setCompression False . setErrorLog (ConfigFileLog errorLog) $ setVerbose False emptyConfig
317
defaultHttpConf :: FilePath -> FilePath -> Config Snap () defaultHttpConf accessLog errorLog = setAccessLog (ConfigFileLog accessLog) . setCompression False . setErrorLog (ConfigFileLog errorLog) $ setVerbose False emptyConfig
236
defaultHttpConf accessLog errorLog = setAccessLog (ConfigFileLog accessLog) . setCompression False . setErrorLog (ConfigFileLog errorLog) $ setVerbose False emptyConfig
178
true
true
1
8
50
78
35
43
null
null
kolmodin/spdy
Network/SPDY.hs
bsd-3-clause
sessionHandler :: FrameHandler IO -> TLSCtx Handle -> SockAddr -> ResourceT IO () sessionHandler handler tlsctx sockaddr = do init <- liftIO $ initSession liftIO $ forkIO $ sender tlsctx (sessionStateSendQueue init) go init (runGetPartial (runBitGet getFrame)) where go s r = case r of Fail _ _ msg -...
719
sessionHandler :: FrameHandler IO -> TLSCtx Handle -> SockAddr -> ResourceT IO () sessionHandler handler tlsctx sockaddr = do init <- liftIO $ initSession liftIO $ forkIO $ sender tlsctx (sessionStateSendQueue init) go init (runGetPartial (runBitGet getFrame)) where go s r = case r of Fail _ _ msg -...
719
sessionHandler handler tlsctx sockaddr = do init <- liftIO $ initSession liftIO $ forkIO $ sender tlsctx (sessionStateSendQueue init) go init (runGetPartial (runBitGet getFrame)) where go s r = case r of Fail _ _ msg -> error msg Partial f -> do raw <- TLS.recvData tlsctx liftI...
637
false
true
0
19
190
276
126
150
null
null
adept/hledger
hledger-lib/Hledger/Utils/Debug.hs
gpl-3.0
dbg8With :: Show a => (a -> String) -> a -> a dbg8With = ptraceAtWith 8
71
dbg8With :: Show a => (a -> String) -> a -> a dbg8With = ptraceAtWith 8
71
dbg8With = ptraceAtWith 8
25
false
true
0
8
15
36
18
18
null
null
LeonieWeissweiler/CISTEM
Cistem.hs
mit
-- | A case insensitive variant. Use only if the text may be incorrectly upper case. segment'CaseInsensitive :: Text -> Segmentation segment'CaseInsensitive = segment' . T.toLower
179
segment'CaseInsensitive :: Text -> Segmentation segment'CaseInsensitive = segment' . T.toLower
94
segment'CaseInsensitive = segment' . T.toLower
46
true
true
0
6
25
22
12
10
null
null
amccausl/Swish
Swish/HaskellRDF/N3FormatterTest.hs
lgpl-2.1
qb1p1 = ScopedName base1 "p1"
30
qb1p1 = ScopedName base1 "p1"
30
qb1p1 = ScopedName base1 "p1"
30
false
false
0
5
5
11
5
6
null
null
mgomezch/yesod-squealer
source/Yesod/Squealer.hs
bsd-3-clause
optionsVersionR ∷ Text → Text → SquealerHandler () optionsVersionR _ _ = pure ()
80
optionsVersionR ∷ Text → Text → SquealerHandler () optionsVersionR _ _ = pure ()
80
optionsVersionR _ _ = pure ()
29
false
true
0
8
13
34
16
18
null
null
arekfu/project_euler
p0053/p0053.hs
mit
comb n r = (product [(k+1)..n]) `div` (product [2..(n-k)]) where k = max r (n-r)
88
comb n r = (product [(k+1)..n]) `div` (product [2..(n-k)]) where k = max r (n-r)
88
comb n r = (product [(k+1)..n]) `div` (product [2..(n-k)]) where k = max r (n-r)
88
false
false
2
10
22
85
40
45
null
null
dnvriend/study-category-theory
haskell/programming_in_haskell/chapter2/chapter2.hs
apache-2.0
init' :: (Num a, Ord a) => [a] -> [a] init' ns = take (length ns - 1) ns
72
init' :: (Num a, Ord a) => [a] -> [a] init' ns = take (length ns - 1) ns
72
init' ns = take (length ns - 1) ns
34
false
true
0
9
18
59
29
30
null
null
maoe/text-keepalived
src/Text/Keepalived/Types.hs
bsd-3-clause
renderVrrpNotify (NotifyFault s) = text "notify_fault" <+> text s
67
renderVrrpNotify (NotifyFault s) = text "notify_fault" <+> text s
67
renderVrrpNotify (NotifyFault s) = text "notify_fault" <+> text s
67
false
false
0
7
10
25
11
14
null
null
bvdelft/parac2
src/Language/Java/Paragon/TypeCheck/NullAnalysis.hs
bsd-3-clause
joinNA NotNull a = a
22
joinNA NotNull a = a
22
joinNA NotNull a = a
22
false
false
0
5
6
11
5
6
null
null
michalt/ghc-comparisons-plugin
GhcPlugins/Comparisons/Pass.hs
bsd-3-clause
optimizeExpr debug numenv subst (Lam bndr expr) = Lam bndr' (tryToSimplify debug numenv subst' expr) where (subst', bndr') = substBndr subst bndr
153
optimizeExpr debug numenv subst (Lam bndr expr) = Lam bndr' (tryToSimplify debug numenv subst' expr) where (subst', bndr') = substBndr subst bndr
153
optimizeExpr debug numenv subst (Lam bndr expr) = Lam bndr' (tryToSimplify debug numenv subst' expr) where (subst', bndr') = substBndr subst bndr
153
false
false
0
7
29
63
29
34
null
null
muhbaasu/pfennig-server
tests/NetworkHelperSpec.hs
mit
spec :: Spec spec = do describe "matchMediaType" $ do it "should return nothing when no media type matches" $ do let m = matchMediaType [("Accept", "text/json, text/json, text/json;")] m `shouldBe` Nothing it "should return just mediatype for known matches" $ do let m = matchMediaType [("Ac...
743
spec :: Spec spec = do describe "matchMediaType" $ do it "should return nothing when no media type matches" $ do let m = matchMediaType [("Accept", "text/json, text/json, text/json;")] m `shouldBe` Nothing it "should return just mediatype for known matches" $ do let m = matchMediaType [("Ac...
743
spec = do describe "matchMediaType" $ do it "should return nothing when no media type matches" $ do let m = matchMediaType [("Accept", "text/json, text/json, text/json;")] m `shouldBe` Nothing it "should return just mediatype for known matches" $ do let m = matchMediaType [("Accept", "appli...
730
false
true
0
18
163
187
92
95
null
null
geekingfrog/advent-of-code
src/Y2018/Day01.hs
bsd-3-clause
getFreqs :: IO [Int] getFreqs = map read . lines <$> readFile "data/2018/day01.txt"
83
getFreqs :: IO [Int] getFreqs = map read . lines <$> readFile "data/2018/day01.txt"
83
getFreqs = map read . lines <$> readFile "data/2018/day01.txt"
62
false
true
0
7
12
36
16
20
null
null
sdiehl/llvm-codegen
src/LLVM/Codegen/Intrinsics.hs
mit
fabs = intrinsic f64 "llvm.fabs.f64" [f64]
43
fabs = intrinsic f64 "llvm.fabs.f64" [f64]
43
fabs = intrinsic f64 "llvm.fabs.f64" [f64]
43
false
false
0
6
6
16
8
8
null
null
keithodulaigh/Hets
ExtModal/Parse_AS.hs
gpl-2.0
prefixModifier :: AParser st (FormPrefix, Range) prefixModifier = let mkF f r = return (f, tokPos r) in (asKey allPathsS >>= mkF (PathQuantification True)) <|> (asKey somePathsS >>= mkF (PathQuantification False)) <|> (asKey nextS >>= mkF (NextY True)) <|> (asKey yesterdayS >>= mkF (NextY False)) <|> (asK...
1,226
prefixModifier :: AParser st (FormPrefix, Range) prefixModifier = let mkF f r = return (f, tokPos r) in (asKey allPathsS >>= mkF (PathQuantification True)) <|> (asKey somePathsS >>= mkF (PathQuantification False)) <|> (asKey nextS >>= mkF (NextY True)) <|> (asKey yesterdayS >>= mkF (NextY False)) <|> (asK...
1,226
prefixModifier = let mkF f r = return (f, tokPos r) in (asKey allPathsS >>= mkF (PathQuantification True)) <|> (asKey somePathsS >>= mkF (PathQuantification False)) <|> (asKey nextS >>= mkF (NextY True)) <|> (asKey yesterdayS >>= mkF (NextY False)) <|> (asKey generallyS >>= mkF (StateQuantification True T...
1,177
false
true
30
17
288
547
266
281
null
null
brendanhay/gogol
gogol-clouderrorreporting/gen/Network/Google/Resource/CloudErrorReporting/Projects/DeleteEvents.hs
mpl-2.0
-- | V1 error format. pdeXgafv :: Lens' ProjectsDeleteEvents (Maybe Xgafv) pdeXgafv = lens _pdeXgafv (\ s a -> s{_pdeXgafv = a})
128
pdeXgafv :: Lens' ProjectsDeleteEvents (Maybe Xgafv) pdeXgafv = lens _pdeXgafv (\ s a -> s{_pdeXgafv = a})
106
pdeXgafv = lens _pdeXgafv (\ s a -> s{_pdeXgafv = a})
53
true
true
1
9
21
52
25
27
null
null
li-zhirui/EoplLangs
src/ImplicitRefsCont/Evaluator.hs
bsd-3-clause
liftMaybe :: LangError -> Maybe a -> IOTry a liftMaybe _ (Just x) = return x
76
liftMaybe :: LangError -> Maybe a -> IOTry a liftMaybe _ (Just x) = return x
76
liftMaybe _ (Just x) = return x
31
false
true
0
10
15
43
19
24
null
null
jamesdabbs/pi-base-2
src/Config.hs
bsd-3-clause
urlToConnString :: String -> ConnectionString urlToConnString = normalize . parseDatabaseUrl where normalize = encodeUtf8 . T.unwords . map (\(k,v) -> T.concat [k, "='", v, "'"])
180
urlToConnString :: String -> ConnectionString urlToConnString = normalize . parseDatabaseUrl where normalize = encodeUtf8 . T.unwords . map (\(k,v) -> T.concat [k, "='", v, "'"])
180
urlToConnString = normalize . parseDatabaseUrl where normalize = encodeUtf8 . T.unwords . map (\(k,v) -> T.concat [k, "='", v, "'"])
134
false
true
0
10
26
71
39
32
null
null
kishoredbn/barrelfish
tools/flounder/GHBackend.hs
mit
rpc_tx_vtbl_decl :: String -> [MessageDef] -> C.Unit rpc_tx_vtbl_decl n ml = C.StructDecl (rpc_tx_vtbl_type n) [ intf_vtbl_param n m TX | m <- ml ]
151
rpc_tx_vtbl_decl :: String -> [MessageDef] -> C.Unit rpc_tx_vtbl_decl n ml = C.StructDecl (rpc_tx_vtbl_type n) [ intf_vtbl_param n m TX | m <- ml ]
151
rpc_tx_vtbl_decl n ml = C.StructDecl (rpc_tx_vtbl_type n) [ intf_vtbl_param n m TX | m <- ml ]
98
false
true
0
8
27
60
30
30
null
null
andersk/haskell-cgi
Network/CGI.hs
bsd-3-clause
outputInternalServerError :: (MonadIO m, MonadCGI m) => [String] -- ^ Error information. -> m CGIResult outputInternalServerError es = outputError 500 "Internal Server Error" es
232
outputInternalServerError :: (MonadIO m, MonadCGI m) => [String] -- ^ Error information. -> m CGIResult outputInternalServerError es = outputError 500 "Internal Server Error" es
232
outputInternalServerError es = outputError 500 "Internal Server Error" es
73
false
true
0
7
78
47
24
23
null
null
np/hlatex
examples/ds/Kit.hs
bsd-3-clause
itemW :: (MonadWriter (f ListItem) m, Monad f) => ParItemW -> m () itemW = tell . return . B.item . execWriter
110
itemW :: (MonadWriter (f ListItem) m, Monad f) => ParItemW -> m () itemW = tell . return . B.item . execWriter
110
itemW = tell . return . B.item . execWriter
43
false
true
0
8
21
57
29
28
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/Frontend.hs
bsd-3-clause
display :: RawFrontend -> Frame -> IO () display rf@RawFrontend{fshowNow, fcoscreen=ScreenContent{rwidth, rheight}} ((m, upd), (ovProp, ovSquare, ovMono)) = do let new :: forall s. ST s (G.Mutable U.Vector s Word32) new = do v <- unFrameBase m unFrameForall upd v return v s...
509
display :: RawFrontend -> Frame -> IO () display rf@RawFrontend{fshowNow, fcoscreen=ScreenContent{rwidth, rheight}} ((m, upd), (ovProp, ovSquare, ovMono)) = do let new :: forall s. ST s (G.Mutable U.Vector s Word32) new = do v <- unFrameBase m unFrameForall upd v return v s...
509
display rf@RawFrontend{fshowNow, fcoscreen=ScreenContent{rwidth, rheight}} ((m, upd), (ovProp, ovSquare, ovMono)) = do let new :: forall s. ST s (G.Mutable U.Vector s Word32) new = do v <- unFrameBase m unFrameForall upd v return v singleArray = PointArray.Array rwidth rhei...
468
false
true
0
14
118
188
94
94
null
null
topliceanu/learn
haskell/functions.hs
mit
capitalize (x:xs) = (toUpperCase [x]) ++ xs
43
capitalize (x:xs) = (toUpperCase [x]) ++ xs
43
capitalize (x:xs) = (toUpperCase [x]) ++ xs
43
false
false
0
8
6
30
15
15
null
null
literate-unitb/literate-unitb
src/Document/Tests/TerminationDetection.hs
mit
result0 :: String result0 = unlines [ " o m0/INIT/INV/m0:inv0" , " o m0/activate/INV/m0:inv0" , " o m0/stop/INV/m0:inv0" , "passed 3 / 3" ]
165
result0 :: String result0 = unlines [ " o m0/INIT/INV/m0:inv0" , " o m0/activate/INV/m0:inv0" , " o m0/stop/INV/m0:inv0" , "passed 3 / 3" ]
165
result0 = unlines [ " o m0/INIT/INV/m0:inv0" , " o m0/activate/INV/m0:inv0" , " o m0/stop/INV/m0:inv0" , "passed 3 / 3" ]
147
false
true
0
5
49
26
15
11
null
null
BartAdv/Idris-dev
src/Idris/Error.hs
bsd-3-clause
warnDisamb ist (PMatchApp _ _) = return ()
42
warnDisamb ist (PMatchApp _ _) = return ()
42
warnDisamb ist (PMatchApp _ _) = return ()
42
false
false
0
7
7
25
11
14
null
null
izimbra/PLT2014
Lab2/BuiltIns.hs
gpl-2.0
argi = Arg TInt (Id "dummy")
31
argi = Arg TInt (Id "dummy")
31
argi = Arg TInt (Id "dummy")
31
false
false
1
6
8
21
8
13
null
null
tlunter/MacFinder
src/MacFinder/Util.hs
mit
convertByteStringToText :: B.ByteString -> T.Text convertByteStringToText = convertStringToText . convertByteStringToString
123
convertByteStringToText :: B.ByteString -> T.Text convertByteStringToText = convertStringToText . convertByteStringToString
123
convertByteStringToText = convertStringToText . convertByteStringToString
73
false
true
0
6
9
23
12
11
null
null
vedgar/mlr
Haskell/2017K1rj/Z4rj.hs
unlicense
idokaz a = ModPon (ModPon (A2 a i a) (A1 a i)) (A1 a a) where i = a --> a
73
idokaz a = ModPon (ModPon (A2 a i a) (A1 a i)) (A1 a a) where i = a --> a
73
idokaz a = ModPon (ModPon (A2 a i a) (A1 a i)) (A1 a a) where i = a --> a
73
false
false
0
9
20
59
29
30
null
null
a143753/AOJ
0135.hs
apache-2.0
main = do n <- getLine c <- getContents let n' = read n :: Int i = lines c o = map ans i mapM_ putStrLn o
127
main = do n <- getLine c <- getContents let n' = read n :: Int i = lines c o = map ans i mapM_ putStrLn o
127
main = do n <- getLine c <- getContents let n' = read n :: Int i = lines c o = map ans i mapM_ putStrLn o
127
false
false
0
10
49
61
28
33
null
null
nlim/haskell-playground
src/AesonFun2.hs
mit
commandProcessor :: Handle -> IO () commandProcessor handle = do line <- BS.hGetLine handle let lazyLine = BL.fromChunks [line] let Just login = decode lazyLine :: Maybe LogIn _ <- hPutStrLn handle $ show login _ <- hPutStrLn handle "." commandProcessor handle
272
commandProcessor :: Handle -> IO () commandProcessor handle = do line <- BS.hGetLine handle let lazyLine = BL.fromChunks [line] let Just login = decode lazyLine :: Maybe LogIn _ <- hPutStrLn handle $ show login _ <- hPutStrLn handle "." commandProcessor handle
272
commandProcessor handle = do line <- BS.hGetLine handle let lazyLine = BL.fromChunks [line] let Just login = decode lazyLine :: Maybe LogIn _ <- hPutStrLn handle $ show login _ <- hPutStrLn handle "." commandProcessor handle
236
false
true
4
9
53
89
42
47
null
null
koengit/induction-examples
Propositional.hs
mit
-------------------------------------------------------------------------------- okay :: Val -> Bool okay [] = True
123
okay :: Val -> Bool okay [] = True
41
okay [] = True
21
true
true
0
8
17
27
12
15
null
null
formrre/yi
yi-core/src/Yi/Buffer/HighLevel.hs
gpl-2.0
-- just to disable the non-exhaustive pattern match warning -- | Move the visible region to include the point snapScreenB :: Maybe ScrollStyle ->BufferM Bool snapScreenB style = do w <- askWindow wkey movePoint <- Set.member w <$> use pointFollowsWindowA if movePoint then return False else do inWin...
1,067
snapScreenB :: Maybe ScrollStyle ->BufferM Bool snapScreenB style = do w <- askWindow wkey movePoint <- Set.member w <$> use pointFollowsWindowA if movePoint then return False else do inWin <- pointInWindowB =<< pointB if inWin then return False else do h <- askWindow actualLines...
956
snapScreenB style = do w <- askWindow wkey movePoint <- Set.member w <$> use pointFollowsWindowA if movePoint then return False else do inWin <- pointInWindowB =<< pointB if inWin then return False else do h <- askWindow actualLines r <- winRegionB p <- po...
908
true
true
0
23
459
241
111
130
null
null
lukexi/rumpus
src/Rumpus/Systems/Selection.hs
bsd-3-clause
initSelectionSystem :: MonadState ECS m => m () initSelectionSystem = do registerSystem sysSelection (SelectionSystem Nothing)
130
initSelectionSystem :: MonadState ECS m => m () initSelectionSystem = do registerSystem sysSelection (SelectionSystem Nothing)
130
initSelectionSystem = do registerSystem sysSelection (SelectionSystem Nothing)
82
false
true
0
9
18
39
18
21
null
null
hvr/semigroups
src/Data/List/NonEmpty.hs
bsd-2-clause
-- | @'repeat' x@ returns a constant stream, where all elements are -- equal to @x@. repeat :: a -> NonEmpty a repeat a = a :| List.repeat a
140
repeat :: a -> NonEmpty a repeat a = a :| List.repeat a
55
repeat a = a :| List.repeat a
29
true
true
0
7
28
32
16
16
null
null
mit-plv/riscv-semantics
src/Spec/CSRGetSet.hs
bsd-3-clause
setCSR MCounterEn val = do let mhpm = shift val (-3) let mir = bitSlice val 2 3 let mtm = bitSlice val 1 2 let mcy = bitSlice val 0 1 setCSRField Field.MHPM mhpm setCSRField Field.MIR mir setCSRField Field.MTM mtm setCSRField Field.MCY mcy
255
setCSR MCounterEn val = do let mhpm = shift val (-3) let mir = bitSlice val 2 3 let mtm = bitSlice val 1 2 let mcy = bitSlice val 0 1 setCSRField Field.MHPM mhpm setCSRField Field.MIR mir setCSRField Field.MTM mtm setCSRField Field.MCY mcy
255
setCSR MCounterEn val = do let mhpm = shift val (-3) let mir = bitSlice val 2 3 let mtm = bitSlice val 1 2 let mcy = bitSlice val 0 1 setCSRField Field.MHPM mhpm setCSRField Field.MIR mir setCSRField Field.MTM mtm setCSRField Field.MCY mcy
255
false
false
0
12
59
118
51
67
null
null
samstokes/yesodoro-reboot
Foundation.hs
bsd-2-clause
deleteR :: Route App -> (Route App, [(Text, Text)]) deleteR = overrideMethodR "DELETE"
86
deleteR :: Route App -> (Route App, [(Text, Text)]) deleteR = overrideMethodR "DELETE"
86
deleteR = overrideMethodR "DELETE"
34
false
true
0
8
12
39
21
18
null
null
tjakway/ghcjvm
compiler/nativeGen/PPC/Instr.hs
bsd-3-clause
-- | Convert a spill slot number to a *byte* offset, with no sign. spillSlotToOffset :: Int -> Int spillSlotToOffset slot = 64 + spillSlotSize * slot
152
spillSlotToOffset :: Int -> Int spillSlotToOffset slot = 64 + spillSlotSize * slot
85
spillSlotToOffset slot = 64 + spillSlotSize * slot
53
true
true
2
5
29
28
14
14
null
null
mvidner/projecteuler
src/PE0031.hs
mit
divides :: Int -> Int -> Bool n `divides` k = k `rem` n == 0
60
divides :: Int -> Int -> Bool n `divides` k = k `rem` n == 0
60
n `divides` k = k `rem` n == 0
30
false
true
2
8
15
44
21
23
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/types/Type.hs
bsd-3-clause
typeRepArity n ty = case repType ty of UnaryRep (FunTy ty1 ty2) -> length (flattenRepType (repType ty1)) + typeRepArity (n - 1) ty2 _ -> pprPanic "typeRepArity: arity greater than type can handle" (ppr (n, ty))
237
typeRepArity n ty = case repType ty of UnaryRep (FunTy ty1 ty2) -> length (flattenRepType (repType ty1)) + typeRepArity (n - 1) ty2 _ -> pprPanic "typeRepArity: arity greater than type can handle" (ppr (n, ty))
237
typeRepArity n ty = case repType ty of UnaryRep (FunTy ty1 ty2) -> length (flattenRepType (repType ty1)) + typeRepArity (n - 1) ty2 _ -> pprPanic "typeRepArity: arity greater than type can handle" (ppr (n, ty))
237
false
false
1
13
62
93
43
50
null
null
typedvar/hLand
hcore/Heap.hs
mit
hFree :: Heap a -> Addr -> Heap a hFree (size, free, assocs) addr = (size - 1, addr:free, remove assocs addr)
114
hFree :: Heap a -> Addr -> Heap a hFree (size, free, assocs) addr = (size - 1, addr:free, remove assocs addr)
114
hFree (size, free, assocs) addr = (size - 1, addr:free, remove assocs addr)
80
false
true
0
7
26
61
32
29
null
null
reouno/gradient-method
.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_Gradient_Method.hs
bsd-3-clause
getDataDir = catchIO (getEnv "Gradient_Method_datadir") (\_ -> return datadir)
78
getDataDir = catchIO (getEnv "Gradient_Method_datadir") (\_ -> return datadir)
78
getDataDir = catchIO (getEnv "Gradient_Method_datadir") (\_ -> return datadir)
78
false
false
1
8
8
32
14
18
null
null
bmillwood/pointfree
Pointfree.hs
mit
{- | >>> pointfree' "I'm not a valid Haskell expression!" Nothing >>> pointfree' "sum xs = foldr (+) 0 xs" Just "sum = foldr (+) 0" -} pointfree' :: String -> Maybe String pointfree' = listToMaybe . reverse . pointfree
226
pointfree' :: String -> Maybe String pointfree' = listToMaybe . reverse . pointfree
83
pointfree' = listToMaybe . reverse . pointfree
46
true
true
0
6
47
27
14
13
null
null
spechub/Hets
CSL/Parse_AS_Basic.hs
gpl-2.0
parseVarList :: CharParser st EXPRESSION parseVarList = do Lexer.keySign (string "{") elems <- Lexer.separatedBy parseVar pComma Lexer.keySign (string "}") return (List (fst elems) nullRange)
199
parseVarList :: CharParser st EXPRESSION parseVarList = do Lexer.keySign (string "{") elems <- Lexer.separatedBy parseVar pComma Lexer.keySign (string "}") return (List (fst elems) nullRange)
199
parseVarList = do Lexer.keySign (string "{") elems <- Lexer.separatedBy parseVar pComma Lexer.keySign (string "}") return (List (fst elems) nullRange)
158
false
true
0
11
31
78
35
43
null
null
Shimuuar/mwc-random
System/Random/MWC/CondensedTable.hs
bsd-2-clause
tableBinomial :: Int -- ^ Number of tries -> Double -- ^ Probability of success -> CondensedTableU Int tableBinomial n p = tableFromProbabilities makeBinom where makeBinom | n <= 0 = pkgError "tableBinomial" "non-positive number of tries" | p == 0 ...
711
tableBinomial :: Int -- ^ Number of tries -> Double -- ^ Probability of success -> CondensedTableU Int tableBinomial n p = tableFromProbabilities makeBinom where makeBinom | n <= 0 = pkgError "tableBinomial" "non-positive number of tries" | p == 0 ...
711
tableBinomial n p = tableFromProbabilities makeBinom where makeBinom | n <= 0 = pkgError "tableBinomial" "non-positive number of tries" | p == 0 = U.singleton (0,1) | p == 1 = U.singleton (n,1) | p > 0 && p < 1 = U.unfoldrN (n + 1) unfolder ((1-p)^n, 0) | otherwise ...
561
false
true
5
15
266
268
137
131
null
null
tcoenraad/functioneel-programmeren
2013/opg1b.hs
mit
subbag :: Eq a => Bag a -> Bag a -> Bool subbag sub bag = and $ map (\(a, n) -> (countItem a bag) >= n) sub
107
subbag :: Eq a => Bag a -> Bag a -> Bool subbag sub bag = and $ map (\(a, n) -> (countItem a bag) >= n) sub
107
subbag sub bag = and $ map (\(a, n) -> (countItem a bag) >= n) sub
66
false
true
0
11
27
72
36
36
null
null
shlevy/ghc
compiler/types/OptCoercion.hs
bsd-3-clause
opt_trans2 is co1 co2 | Just co <- opt_trans_rule is co1 co2 = co
69
opt_trans2 is co1 co2 | Just co <- opt_trans_rule is co1 co2 = co
69
opt_trans2 is co1 co2 | Just co <- opt_trans_rule is co1 co2 = co
69
false
false
0
9
17
34
14
20
null
null
jrclogic/SMCDEL
src/SMCDEL/Symbolic/K.hs
gpl-2.0
-- represent p in the double vocabulary cpP (P n) = P ((2*n) + 1)
66
cpP (P n) = P ((2*n) + 1)
25
cpP (P n) = P ((2*n) + 1)
25
true
false
0
9
15
33
17
16
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'MapL.foldlWithKey' ml_foldlWithKey = MapL.foldlWithKey
59
ml_foldlWithKey = MapL.foldlWithKey
35
ml_foldlWithKey = MapL.foldlWithKey
35
true
false
0
5
4
9
5
4
null
null
sumitsahrawat/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/Valid.hs
mit
-- | Create a new output widget mkValidWidget :: IO ValidWidget mkValidWidget = do -- Default properties, with a random uuid uuid <- U.random let boolState = defaultBoolWidget "ValidView" "ValidModel" validState = (ReadOutMsg =:: "") :& RNil widgetState = WidgetState $ boolState <+> validState sta...
550
mkValidWidget :: IO ValidWidget mkValidWidget = do -- Default properties, with a random uuid uuid <- U.random let boolState = defaultBoolWidget "ValidView" "ValidModel" validState = (ReadOutMsg =:: "") :& RNil widgetState = WidgetState $ boolState <+> validState stateIO <- newIORef widgetState ...
518
mkValidWidget = do -- Default properties, with a random uuid uuid <- U.random let boolState = defaultBoolWidget "ValidView" "ValidModel" validState = (ReadOutMsg =:: "") :& RNil widgetState = WidgetState $ boolState <+> validState stateIO <- newIORef widgetState let widget = IPythonWidget uuid ...
486
true
true
0
13
114
119
55
64
null
null
mattias-lundell/timber-llvm
src/Reduce.hs
bsd-3-clause
preferLocals env pe qe eq = walk [] (equalities env) where walk bs [] = let (pe1,pe2) = partition ((`elem` dom bs) . fst) pe in (pe2, groupBinds (Binds False (pe1++qe) (prune eq (dom bs) ++ mapSnd EVar bs))) walk bs ((x,y):eqs) ...
935
preferLocals env pe qe eq = walk [] (equalities env) where walk bs [] = let (pe1,pe2) = partition ((`elem` dom bs) . fst) pe in (pe2, groupBinds (Binds False (pe1++qe) (prune eq (dom bs) ++ mapSnd EVar bs))) walk bs ((x,y):eqs) ...
935
preferLocals env pe qe eq = walk [] (equalities env) where walk bs [] = let (pe1,pe2) = partition ((`elem` dom bs) . fst) pe in (pe2, groupBinds (Binds False (pe1++qe) (prune eq (dom bs) ++ mapSnd EVar bs))) walk bs ((x,y):eqs) ...
935
false
false
8
18
514
342
186
156
null
null
urbanslug/ghc
utils/hpc/HpcReport.hs
bsd-3-clause
single (BinBox {}) = False
26
single (BinBox {}) = False
26
single (BinBox {}) = False
26
false
false
0
6
4
17
8
9
null
null
ashnikel/haskellbook
ch05/ch05.8_ex.hs
mit
-- 2 functionC :: Ord a => a -> a -> Bool functionC x y = if (x > y) then True else False
89
functionC :: Ord a => a -> a -> Bool functionC x y = if (x > y) then True else False
84
functionC x y = if (x > y) then True else False
47
true
true
0
7
23
47
25
22
null
null
keithodulaigh/Hets
CSL/MapleInterpreter.hs
gpl-2.0
mapleBindInfoMap :: BindInfoMap mapleBindInfoMap = operatorBindInfoMap
70
mapleBindInfoMap :: BindInfoMap mapleBindInfoMap = operatorBindInfoMap
70
mapleBindInfoMap = operatorBindInfoMap
38
false
true
0
4
5
11
6
5
null
null
armoredsoftware/protocol
tpm/mainline/src/TPM/Const.hs
bsd-3-clause
tpm_es_rsaespkcsv15 = (0x0002 :: Word16)
40
tpm_es_rsaespkcsv15 = (0x0002 :: Word16)
40
tpm_es_rsaespkcsv15 = (0x0002 :: Word16)
40
false
false
0
5
4
12
7
5
null
null
ghc-android/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
canDischargeFR (Given, _) _ = True
47
canDischargeFR (Given, _) _ = True
47
canDischargeFR (Given, _) _ = True
47
false
false
0
5
18
19
9
10
null
null
dysinger/amazonka
amazonka-emr/gen/Network/AWS/EMR/SetVisibleToAllUsers.hs
mpl-2.0
-- | 'SetVisibleToAllUsersResponse' constructor. setVisibleToAllUsersResponse :: SetVisibleToAllUsersResponse setVisibleToAllUsersResponse = SetVisibleToAllUsersResponse
169
setVisibleToAllUsersResponse :: SetVisibleToAllUsersResponse setVisibleToAllUsersResponse = SetVisibleToAllUsersResponse
120
setVisibleToAllUsersResponse = SetVisibleToAllUsersResponse
59
true
true
0
4
9
12
7
5
null
null
ducis/haAni
hs/common/Graphics/UI/GLUT/Menu.hs
gpl-2.0
-------------------------------------------------------------------------------- {- UNUSED -- | Change the specified menu entry in the /current menu/ into a menu entry. -- The given position determines which menu item should be changed and must be -- between 1 (the topmost menu item) and -- 'Graphics.UI.GLUT.State.get...
1,770
attachMenu_ :: MouseButton -> IO () attachMenu_ = glutAttachMenu . marshalMouseButton
85
attachMenu_ = glutAttachMenu . marshalMouseButton
49
true
true
0
7
281
31
19
12
null
null
mazuschlag/haskov
src/Haskov.hs
mit
-- Machine Epsilon -- machineE :: Double machineE = until ((== 1) . (+1)) (/2) 1
81
machineE :: Double machineE = until ((== 1) . (+1)) (/2) 1
58
machineE = until ((== 1) . (+1)) (/2) 1
39
true
true
0
8
16
45
24
21
null
null
Thimoteus/snootify
src/Main.hs
mit
notify :: String -> String -> IO ProcessHandle notify title msg = runCommand $ "notify-send " ++ readify title ++ ' ':(readify msg) where readify :: String -> String readify = quotify . escapify escapify :: String -> String escapify = foldr acc "" where acc :: Char -> String -> String acc c str ...
439
notify :: String -> String -> IO ProcessHandle notify title msg = runCommand $ "notify-send " ++ readify title ++ ' ':(readify msg) where readify :: String -> String readify = quotify . escapify escapify :: String -> String escapify = foldr acc "" where acc :: Char -> String -> String acc c str ...
439
notify title msg = runCommand $ "notify-send " ++ readify title ++ ' ':(readify msg) where readify :: String -> String readify = quotify . escapify escapify :: String -> String escapify = foldr acc "" where acc :: Char -> String -> String acc c str | c == '"' = '\\':'"':str | otherwise...
392
false
true
0
8
115
170
84
86
null
null
Michaelt293/Lipid-Haskell
src/Lipid/Parsers/CombinedRadyl/Glycerophospholipid.hs
gpl-3.0
peDeltaP :: Parser (PE DeltaPosition) peDeltaP = peP deltaPositionP
67
peDeltaP :: Parser (PE DeltaPosition) peDeltaP = peP deltaPositionP
67
peDeltaP = peP deltaPositionP
29
false
true
0
7
8
23
11
12
null
null
Pamelloes/reflex-wx
src/main/Reflex/WX/Internal.hs
lgpl-2.1
whileM :: Monad m => (m Bool) -> m a -> m () whileM c l = do v <- c if v then l >> whileM c l else return ()
114
whileM :: Monad m => (m Bool) -> m a -> m () whileM c l = do v <- c if v then l >> whileM c l else return ()
114
whileM c l = do v <- c if v then l >> whileM c l else return ()
69
false
true
0
9
37
77
36
41
null
null
nickgeoca/music-browserside
Graphic.hs
bsd-3-clause
-- TODO: Is best way of tieing constant dimensions with a global? E.g. staff measurements. -- This could change in future, if staff measurements were to be dynamic. noteAnno :: Annotation noteAnno = Annotation (5,5) (0.5, 0.5) (NoteLocDy BottomOfStaff ((measureHeight gSGS) / 8)...
366
noteAnno :: Annotation noteAnno = Annotation (5,5) (0.5, 0.5) (NoteLocDy BottomOfStaff ((measureHeight gSGS) / 8)) (4 * (fst $ dimensions noteAnno))
193
noteAnno = Annotation (5,5) (0.5, 0.5) (NoteLocDy BottomOfStaff ((measureHeight gSGS) / 8)) (4 * (fst $ dimensions noteAnno))
170
true
true
0
10
101
82
41
41
null
null
fmapfmapfmap/amazonka
amazonka-codepipeline/gen/Network/AWS/CodePipeline/Types/Product.hs
mpl-2.0
-- | The identifier used to identify the job details in AWS CodePipeline. tpjdId :: Lens' ThirdPartyJobDetails (Maybe Text) tpjdId = lens _tpjdId (\ s a -> s{_tpjdId = a})
171
tpjdId :: Lens' ThirdPartyJobDetails (Maybe Text) tpjdId = lens _tpjdId (\ s a -> s{_tpjdId = a})
97
tpjdId = lens _tpjdId (\ s a -> s{_tpjdId = a})
47
true
true
0
9
29
46
25
21
null
null
fmapfmapfmap/amazonka
amazonka-ds/gen/Network/AWS/DirectoryService/Types/Product.hs
mpl-2.0
-- | The date and time that the stage was last updated. ddStageLastUpdatedDateTime :: Lens' DirectoryDescription (Maybe UTCTime) ddStageLastUpdatedDateTime = lens _ddStageLastUpdatedDateTime (\ s a -> s{_ddStageLastUpdatedDateTime = a}) . mapping _Time
252
ddStageLastUpdatedDateTime :: Lens' DirectoryDescription (Maybe UTCTime) ddStageLastUpdatedDateTime = lens _ddStageLastUpdatedDateTime (\ s a -> s{_ddStageLastUpdatedDateTime = a}) . mapping _Time
196
ddStageLastUpdatedDateTime = lens _ddStageLastUpdatedDateTime (\ s a -> s{_ddStageLastUpdatedDateTime = a}) . mapping _Time
123
true
true
0
10
31
53
28
25
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Util/Stack.hs
bsd-2-clause
-- | Swap the focused element with the first one swapMasterZ :: Zipper a -> Zipper a swapMasterZ Nothing = Nothing
114
swapMasterZ :: Zipper a -> Zipper a swapMasterZ Nothing = Nothing
65
swapMasterZ Nothing = Nothing
29
true
true
0
7
20
30
13
17
null
null
kolmodin/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
genBoundsCommand :: CommandUI FreezeFlags genBoundsCommand = CommandUI { commandName = "gen-bounds", commandSynopsis = "Generate dependency bounds.", commandDescription = Just $ \_ -> wrapText $ "Generates bounds for all dependencies that do not currently have them. " ++ "Generat...
677
genBoundsCommand :: CommandUI FreezeFlags genBoundsCommand = CommandUI { commandName = "gen-bounds", commandSynopsis = "Generate dependency bounds.", commandDescription = Just $ \_ -> wrapText $ "Generates bounds for all dependencies that do not currently have them. " ++ "Generat...
677
genBoundsCommand = CommandUI { commandName = "gen-bounds", commandSynopsis = "Generate dependency bounds.", commandDescription = Just $ \_ -> wrapText $ "Generates bounds for all dependencies that do not currently have them. " ++ "Generated bounds are printed to stdout. You can ...
635
false
true
0
13
176
113
66
47
null
null
jbalint/banshee-sympatico
meera/ospace_lisp.hs
mit
richSexprToObj :: RichSExpr Term -> Obj richSexprToObj sexpr = let exprs = case sexpr of RSList x -> x objKey = case head exprs of RSAtom (TId id) -> id fields = foldl addField Map.empty (tail exprs) in Obj objKey fields
238
richSexprToObj :: RichSExpr Term -> Obj richSexprToObj sexpr = let exprs = case sexpr of RSList x -> x objKey = case head exprs of RSAtom (TId id) -> id fields = foldl addField Map.empty (tail exprs) in Obj objKey fields
238
richSexprToObj sexpr = let exprs = case sexpr of RSList x -> x objKey = case head exprs of RSAtom (TId id) -> id fields = foldl addField Map.empty (tail exprs) in Obj objKey fields
198
false
true
0
14
58
98
46
52
null
null
lordi/flowskell
src/Flowskell/Lib/Time.hs
gpl-2.0
timeInMilliSeconds [] = do x <- time; return $ Float $ 1000 * (realToFrac x)
76
timeInMilliSeconds [] = do x <- time; return $ Float $ 1000 * (realToFrac x)
76
timeInMilliSeconds [] = do x <- time; return $ Float $ 1000 * (realToFrac x)
76
false
false
0
9
14
40
19
21
null
null
rainbowbismuth/go-analyze
src/Go/Lexer.hs
gpl-3.0
lexOptionalComment :: Parser () lexOptionalComment = lexLineComment <|> lexGeneralComment
108
lexOptionalComment :: Parser () lexOptionalComment = lexLineComment <|> lexGeneralComment
108
lexOptionalComment = lexLineComment <|> lexGeneralComment
76
false
true
0
6
27
20
10
10
null
null
jml/haverer
lib/Haverer/Round.hs
apache-2.0
-- | The currently surviving players in the round, with their cards. survivors :: Victory playerId -> [(playerId, Card)] survivors (SoleSurvivor pid card) = [(pid, card)]
170
survivors :: Victory playerId -> [(playerId, Card)] survivors (SoleSurvivor pid card) = [(pid, card)]
101
survivors (SoleSurvivor pid card) = [(pid, card)]
49
true
true
0
7
25
48
27
21
null
null
DATX02-17-26/DATX02-17-26
Test/TestUtil.hs
gpl-2.0
-- | Runs a golden test given: -- 1) test name, -- 2) the path to the golden file, -- 3) the path to the to-test file, -- 4) and then a function that is given the contents of 1), 2) and yields an -- IO action that succeeds on Nothing or Just (error message inside) on failure. goldenFileM :: TestName -> FilePath -> File...
484
goldenFileM :: TestName -> FilePath -> FilePath -> (String -> String -> IO (Maybe String)) -> TestTree goldenFileM n g t m = goldenTest n (readFile g) (readFile t) m (const $ pure ())
207
goldenFileM n g t m = goldenTest n (readFile g) (readFile t) m (const $ pure ())
80
true
true
0
14
115
97
51
46
null
null
massysett/penny
penny/lib/Penny/Copper/Copperize.hs
bsd-3-clause
cNewline :: Newline Char () cNewline = Newline ('\n', ())
57
cNewline :: Newline Char () cNewline = Newline ('\n', ())
57
cNewline = Newline ('\n', ())
29
false
true
0
7
9
29
15
14
null
null
mumuki/mulang
src/Language/Mulang/Ast.hs
gpl-3.0
extractClause (Rule name patterns expressions) = Just (name, patterns, expressions)
83
extractClause (Rule name patterns expressions) = Just (name, patterns, expressions)
83
extractClause (Rule name patterns expressions) = Just (name, patterns, expressions)
83
false
false
0
7
9
31
16
15
null
null
pgj/bead
src/Bead/View/Content/Assignment/Page.hs
bsd-3-clause
postModifyAssignment :: POSTContentHandler postModifyAssignment = do ModifyAssignment <$> getAssignmentKey <*> getAssignment <*> readTCModification
155
postModifyAssignment :: POSTContentHandler postModifyAssignment = do ModifyAssignment <$> getAssignmentKey <*> getAssignment <*> readTCModification
155
postModifyAssignment = do ModifyAssignment <$> getAssignmentKey <*> getAssignment <*> readTCModification
112
false
true
8
6
20
34
17
17
null
null
energyflowanalysis/efa-2.1
src/EFA/Report/FormatValue.hs
bsd-3-clause
formatCarryPosition :: (PartIdx.Format part, Format output) => StorageIdx.Position part -> output formatCarryPosition (StorageIdx.Position s0 s1) = PartIdx.formatAugmented s0 `Format.link` PartIdx.formatAugmented s1
224
formatCarryPosition :: (PartIdx.Format part, Format output) => StorageIdx.Position part -> output formatCarryPosition (StorageIdx.Position s0 s1) = PartIdx.formatAugmented s0 `Format.link` PartIdx.formatAugmented s1
224
formatCarryPosition (StorageIdx.Position s0 s1) = PartIdx.formatAugmented s0 `Format.link` PartIdx.formatAugmented s1
120
false
true
0
8
29
68
34
34
null
null
apyrgio/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
iallocatorModeMultiAlloc :: String iallocatorModeMultiAlloc = Types.iAllocatorModeToRaw IAllocatorMultiAlloc
108
iallocatorModeMultiAlloc :: String iallocatorModeMultiAlloc = Types.iAllocatorModeToRaw IAllocatorMultiAlloc
108
iallocatorModeMultiAlloc = Types.iAllocatorModeToRaw IAllocatorMultiAlloc
73
false
true
0
6
6
16
8
8
null
null
pparkkin/eta
compiler/ETA/BasicTypes/Lexeme.hs
bsd-3-clause
-- | All reserved operators. Taken from section 2.4 of the 2010 Report. reservedOps :: Set.Set String reservedOps = Set.fromList [ "..", ":", "::", "=", "\\", "|", "<-", "->" , "@", "~", "=>" ]
220
reservedOps :: Set.Set String reservedOps = Set.fromList [ "..", ":", "::", "=", "\\", "|", "<-", "->" , "@", "~", "=>" ]
148
reservedOps = Set.fromList [ "..", ":", "::", "=", "\\", "|", "<-", "->" , "@", "~", "=>" ]
118
true
true
1
6
60
58
33
25
null
null
robert-butts/haskell
mergesort.hs
mit
merge allx@(x:xs) ally@(y:ys) | x < y = x : merge xs ally | otherwise = y : merge allx ys
103
merge allx@(x:xs) ally@(y:ys) | x < y = x : merge xs ally | otherwise = y : merge allx ys
103
merge allx@(x:xs) ally@(y:ys) | x < y = x : merge xs ally | otherwise = y : merge allx ys
103
false
false
0
8
34
68
33
35
null
null
DATX02-17-26/DATX02-17-26
Test/TestStrategies.hs
gpl-2.0
selfIsLeftmost :: FilePath -> IO Bool selfIsLeftmost sol = do let paths = Ctx sol [] (Ctx (Right sol) []) <- resultEvalM ((fmap parseConv) <$> readRawContents paths) return $ leftmost (makeASTsRoseTree (makeStrategy (AST.toUnitype $ normalize sol))) == (AST.toUnitype $ normalize sol)
290
selfIsLeftmost :: FilePath -> IO Bool selfIsLeftmost sol = do let paths = Ctx sol [] (Ctx (Right sol) []) <- resultEvalM ((fmap parseConv) <$> readRawContents paths) return $ leftmost (makeASTsRoseTree (makeStrategy (AST.toUnitype $ normalize sol))) == (AST.toUnitype $ normalize sol)
290
selfIsLeftmost sol = do let paths = Ctx sol [] (Ctx (Right sol) []) <- resultEvalM ((fmap parseConv) <$> readRawContents paths) return $ leftmost (makeASTsRoseTree (makeStrategy (AST.toUnitype $ normalize sol))) == (AST.toUnitype $ normalize sol)
252
false
true
0
16
46
134
62
72
null
null
decomputed/euler
src/Numeric/Euler/Primes.hs
apache-2.0
firstStep :: Int -> [(Int,Int)] -> [(Int,Int)] firstStep size sieve = let topx = floor( sqrt(fromIntegral (size `div` 4)) :: Double) topy = floor( sqrt(fromIntegral size) :: Double) in flipAll (sort [n | n <- [4*x^(2::Integer) + y^(2::Integer)| x <- [1..topx], y <- [1,3..topy]], ...
388
firstStep :: Int -> [(Int,Int)] -> [(Int,Int)] firstStep size sieve = let topx = floor( sqrt(fromIntegral (size `div` 4)) :: Double) topy = floor( sqrt(fromIntegral size) :: Double) in flipAll (sort [n | n <- [4*x^(2::Integer) + y^(2::Integer)| x <- [1..topx], y <- [1,3..topy]], ...
388
firstStep size sieve = let topx = floor( sqrt(fromIntegral (size `div` 4)) :: Double) topy = floor( sqrt(fromIntegral size) :: Double) in flipAll (sort [n | n <- [4*x^(2::Integer) + y^(2::Integer)| x <- [1..topx], y <- [1,3..topy]], n `mod` 60 `elem` [1,13,17,29,37,...
339
false
true
0
15
107
231
128
103
null
null
danr/hipspec
examples/Challenges/SameFringe.hs
gpl-3.0
enum (Branch l x r) e = enum l (Next x e r)
43
enum (Branch l x r) e = enum l (Next x e r)
43
enum (Branch l x r) e = enum l (Next x e r)
43
false
false
1
7
12
38
17
21
null
null
mightymoose/liquidhaskell
tests/todo/ptr2.hs
bsd-3-clause
readCharFromBuffer :: RawBuffer b -> Int -> IO (Char, Int) readCharFromBuffer x y = error "LIQUIDCOMPAT"
104
readCharFromBuffer :: RawBuffer b -> Int -> IO (Char, Int) readCharFromBuffer x y = error "LIQUIDCOMPAT"
104
readCharFromBuffer x y = error "LIQUIDCOMPAT"
45
false
true
0
8
15
43
20
23
null
null