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
CRogers/stack-ide-atom
haskell/src/StackIdeProcess.hs
mit
makeRequest :: ChildProcess -> Request -> IO () makeRequest childProcess req = writeLine childProcess (decodeUtf8 (toStrict (encode req)))
140
makeRequest :: ChildProcess -> Request -> IO () makeRequest childProcess req = writeLine childProcess (decodeUtf8 (toStrict (encode req)))
140
makeRequest childProcess req = writeLine childProcess (decodeUtf8 (toStrict (encode req)))
92
false
true
0
11
19
52
25
27
null
null
paterson/interpreter
src/Program.hs
bsd-3-clause
variablesInExpr (Div e0 e1) = variablesInExpr e0 ++ variablesInExpr e1
70
variablesInExpr (Div e0 e1) = variablesInExpr e0 ++ variablesInExpr e1
70
variablesInExpr (Div e0 e1) = variablesInExpr e0 ++ variablesInExpr e1
70
false
false
0
6
9
28
12
16
null
null
sol/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
textualCite :: GenParser Char ParserState [Citation] textualCite = try $ do (_, key) <- citeKey let first = Citation{ citationId = key , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citatio...
535
textualCite :: GenParser Char ParserState [Citation] textualCite = try $ do (_, key) <- citeKey let first = Citation{ citationId = key , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citatio...
535
textualCite = try $ do (_, key) <- citeKey let first = Citation{ citationId = key , citationPrefix = [] , citationSuffix = [] , citationMode = AuthorInText , citationNoteNum = 0 , citationHash ...
482
false
true
0
13
230
148
79
69
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/test/Test/AWS/Gen/StorageGateway.hs
mpl-2.0
testCreateTapesResponse :: CreateTapesResponse -> TestTree testCreateTapesResponse = res "CreateTapesResponse" "fixture/CreateTapesResponse.proto" storageGateway (Proxy :: Proxy CreateTapes)
206
testCreateTapesResponse :: CreateTapesResponse -> TestTree testCreateTapesResponse = res "CreateTapesResponse" "fixture/CreateTapesResponse.proto" storageGateway (Proxy :: Proxy CreateTapes)
206
testCreateTapesResponse = res "CreateTapesResponse" "fixture/CreateTapesResponse.proto" storageGateway (Proxy :: Proxy CreateTapes)
147
false
true
0
7
30
33
17
16
null
null
atomb/dalvik
Dalvik/Types.hs
bsd-3-clause
findString :: DexFile -> BS.ByteString -> Maybe StringId findString dex t = case filter isThis (Map.toList (dexStrings dex)) of [(sid, _)] -> Just sid _ -> Nothing where isThis (_, t') = t == t'
206
findString :: DexFile -> BS.ByteString -> Maybe StringId findString dex t = case filter isThis (Map.toList (dexStrings dex)) of [(sid, _)] -> Just sid _ -> Nothing where isThis (_, t') = t == t'
206
findString dex t = case filter isThis (Map.toList (dexStrings dex)) of [(sid, _)] -> Just sid _ -> Nothing where isThis (_, t') = t == t'
149
false
true
2
10
46
90
48
42
null
null
locaweb/leela
src/warpdrive/src/Leela/HZMQ/ZHelpers.hs
apache-2.0
sendAll fh [chk] = send fh [] chk
37
sendAll fh [chk] = send fh [] chk
37
sendAll fh [chk] = send fh [] chk
37
false
false
0
6
11
25
11
14
null
null
oldmanmike/ghc
compiler/utils/FastString.hs
bsd-3-clause
-- | Create a 'FastString' from an existing 'ForeignPtr'; the difference -- between this and 'mkFastStringBytes' is that we don't have to copy -- the bytes if the string is new to the table. mkFastStringByteString :: ByteString -> FastString mkFastStringByteString bs = inlinePerformIO $ BS.unsafeUseAsCStringL...
509
mkFastStringByteString :: ByteString -> FastString mkFastStringByteString bs = inlinePerformIO $ BS.unsafeUseAsCStringLen bs $ \(ptr, len) -> do let ptr' = castPtr ptr mkFastStringWith (mkNewFastStringByteString bs ptr' len) ptr' len -- | Creates a UTF-8 encoded 'FastString' from a 'String'
318
mkFastStringByteString bs = inlinePerformIO $ BS.unsafeUseAsCStringLen bs $ \(ptr, len) -> do let ptr' = castPtr ptr mkFastStringWith (mkNewFastStringByteString bs ptr' len) ptr' len -- | Creates a UTF-8 encoded 'FastString' from a 'String'
267
true
true
0
12
99
78
40
38
null
null
mrkkrp/mida
src/Mida/Representation/Parser.hs
gpl-3.0
parens :: Parser a -> Parser a parens = between (symbol "(") (symbol ")")
73
parens :: Parser a -> Parser a parens = between (symbol "(") (symbol ")")
73
parens = between (symbol "(") (symbol ")")
42
false
true
0
7
13
38
18
20
null
null
TimeAttack/time-attack-server
devel.hs
mit
loop :: IO () loop = do threadDelay 100000 e <- doesFileExist "yesod-devel/devel-terminate" if e then terminateDevel else loop
132
loop :: IO () loop = do threadDelay 100000 e <- doesFileExist "yesod-devel/devel-terminate" if e then terminateDevel else loop
132
loop = do threadDelay 100000 e <- doesFileExist "yesod-devel/devel-terminate" if e then terminateDevel else loop
118
false
true
1
8
24
47
20
27
null
null
halarnold2000/cis194
src/Cis194/Hw/LogAnalysis.hs
bsd-3-clause
inOrder :: MessageTree -> [LogMessage] inOrder Leaf = []
57
inOrder :: MessageTree -> [LogMessage] inOrder Leaf = []
57
inOrder Leaf = []
18
false
true
0
8
9
29
13
16
null
null
Zigazou/HaMinitel
src/Minitel/Constants/MUnicode.hs
gpl-3.0
sectionSign = chr 0xa7
42
sectionSign = chr 0xa7
42
sectionSign = chr 0xa7
42
false
false
0
5
23
9
4
5
null
null
schell/orion
src/Web/Orion/Template.hs
bsd-3-clause
wrapper :: Html -> Html -> Html wrapper = wrapperWithNav loggedOutNav
69
wrapper :: Html -> Html -> Html wrapper = wrapperWithNav loggedOutNav
69
wrapper = wrapperWithNav loggedOutNav
37
false
true
0
6
10
22
11
11
null
null
haskell-tinc/hpack
src/Data/Aeson/Config/FromValue.hs
mit
genericFromValue :: forall a d m. (Generic a, Rep a ~ D1 d m, Datatype d, GenericDecode (Rep a)) => Value -> Parser a genericFromValue = genericFromValueWith (Options $ hyphenize name) where name :: String name = datatypeName (undefined :: D1 d m p)
259
genericFromValue :: forall a d m. (Generic a, Rep a ~ D1 d m, Datatype d, GenericDecode (Rep a)) => Value -> Parser a genericFromValue = genericFromValueWith (Options $ hyphenize name) where name :: String name = datatypeName (undefined :: D1 d m p)
259
genericFromValue = genericFromValueWith (Options $ hyphenize name) where name :: String name = datatypeName (undefined :: D1 d m p)
141
false
true
1
9
53
111
56
55
null
null
green-haskell/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
fdE :: (a -> b -> b) -> CoreMapX a -> b -> b fdE k m = foldTM k (cm_var m) . foldTM k (cm_lit m) . foldTM k (cm_co m) . foldTM k (cm_type m) . foldTM (foldTM k) (cm_cast m) . foldTM (foldTM k) (cm_tick m) . foldTM (foldTM k) (cm_app m) . foldTM (foldTM k) (cm_lam m) . foldTM (foldTM (foldTM k)) (cm_le...
437
fdE :: (a -> b -> b) -> CoreMapX a -> b -> b fdE k m = foldTM k (cm_var m) . foldTM k (cm_lit m) . foldTM k (cm_co m) . foldTM k (cm_type m) . foldTM (foldTM k) (cm_cast m) . foldTM (foldTM k) (cm_tick m) . foldTM (foldTM k) (cm_app m) . foldTM (foldTM k) (cm_lam m) . foldTM (foldTM (foldTM k)) (cm_le...
437
fdE k m = foldTM k (cm_var m) . foldTM k (cm_lit m) . foldTM k (cm_co m) . foldTM k (cm_type m) . foldTM (foldTM k) (cm_cast m) . foldTM (foldTM k) (cm_tick m) . foldTM (foldTM k) (cm_app m) . foldTM (foldTM k) (cm_lam m) . foldTM (foldTM (foldTM k)) (cm_letn m) . foldTM (foldTM (foldTM k)) (cm_letr...
392
false
true
11
9
110
293
134
159
null
null
selectel/mongoDB-haskell
Database/MongoDB/Query.hs
apache-2.0
allCollections :: (MonadIO m, MonadBaseControl IO m) => Action m [Collection] -- ^ List all collections in this database allCollections = do db <- thisDatabase docs <- rest =<< find (query [] "system.namespaces") {sort = ["name" =: (1 :: Int)]} return . filter (not . isSpecial db) . map dropDbPrefix $ map (...
486
allCollections :: (MonadIO m, MonadBaseControl IO m) => Action m [Collection] allCollections = do db <- thisDatabase docs <- rest =<< find (query [] "system.namespaces") {sort = ["name" =: (1 :: Int)]} return . filter (not . isSpecial db) . map dropDbPrefix $ map (at "name") docs where dropDbPrefix = T...
443
allCollections = do db <- thisDatabase docs <- rest =<< find (query [] "system.namespaces") {sort = ["name" =: (1 :: Int)]} return . filter (not . isSpecial db) . map dropDbPrefix $ map (at "name") docs where dropDbPrefix = T.tail . T.dropWhile (/= '.') isSpecial db col = T.any (== '$') col && db <...
365
true
true
10
14
101
208
99
109
null
null
danplubell/hmp3-phoenix
src/Utils.hs
gpl-3.0
a <+> b = a ++ " " ++ b
24
a <+> b = a ++ " " ++ b
24
a <+> b = a ++ " " ++ b
24
false
false
0
6
10
20
9
11
null
null
marcellussiegburg/autotool
yesod/Handler/Schule.hs
gpl-2.0
spracheMsg :: Language -> AutotoolMessage spracheMsg sprache' = case sprache' of DE -> MsgSpracheDE NL -> MsgSpracheNL UK -> MsgSpracheUK
143
spracheMsg :: Language -> AutotoolMessage spracheMsg sprache' = case sprache' of DE -> MsgSpracheDE NL -> MsgSpracheNL UK -> MsgSpracheUK
143
spracheMsg sprache' = case sprache' of DE -> MsgSpracheDE NL -> MsgSpracheNL UK -> MsgSpracheUK
101
false
true
3
5
25
45
20
25
null
null
santolucito/haste-compiler
libraries/haste-lib/src/Haste/DOM.hs
bsd-3-clause
-- | Set an attribute of the given element. setAttr :: (IsElem e, MonadIO m) => e -> PropID -> String -> m () setAttr e prop val = J.setAttr e (toJSStr prop) (toJSStr val)
171
setAttr :: (IsElem e, MonadIO m) => e -> PropID -> String -> m () setAttr e prop val = J.setAttr e (toJSStr prop) (toJSStr val)
127
setAttr e prop val = J.setAttr e (toJSStr prop) (toJSStr val)
61
true
true
0
11
34
76
37
39
null
null
bkoropoff/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
doForeign vs env xs = ifail "Badly formed foreign function call"
64
doForeign vs env xs = ifail "Badly formed foreign function call"
64
doForeign vs env xs = ifail "Badly formed foreign function call"
64
false
false
0
5
10
16
7
9
null
null
Daniel-Diaz/rachel
Rachel/Types.hs
bsd-3-clause
defaultFixity :: Fixity defaultFixity = Fixity LeftA 10
55
defaultFixity :: Fixity defaultFixity = Fixity LeftA 10
55
defaultFixity = Fixity LeftA 10
31
false
true
0
5
7
16
8
8
null
null
dysinger/amazonka
amazonka-lambda/gen/Network/AWS/Lambda/Types.hs
mpl-2.0
-- | The type of the Lambda function you uploaded. fcMode :: Lens' FunctionConfiguration (Maybe Mode) fcMode = lens _fcMode (\s a -> s { _fcMode = a })
151
fcMode :: Lens' FunctionConfiguration (Maybe Mode) fcMode = lens _fcMode (\s a -> s { _fcMode = a })
100
fcMode = lens _fcMode (\s a -> s { _fcMode = a })
49
true
true
0
9
28
46
25
21
null
null
shnarazk/mios
src/SAT/Mios/OptionParser.hs
gpl-3.0
-- | default option settings miosDefaultOption :: MiosProgramOption miosDefaultOption = MiosProgramOption { _targetFile = Left "" , _targets = [] , _outputFile = Nothing , _confVariableDecayRate = variableDecayRate defaultConfiguration , _confClauseDecayRate = clauseDecayRate defaultConfiguration , _con...
769
miosDefaultOption :: MiosProgramOption miosDefaultOption = MiosProgramOption { _targetFile = Left "" , _targets = [] , _outputFile = Nothing , _confVariableDecayRate = variableDecayRate defaultConfiguration , _confClauseDecayRate = clauseDecayRate defaultConfiguration , _confRestartE = restartExpansion ...
740
miosDefaultOption = MiosProgramOption { _targetFile = Left "" , _targets = [] , _outputFile = Nothing , _confVariableDecayRate = variableDecayRate defaultConfiguration , _confClauseDecayRate = clauseDecayRate defaultConfiguration , _confRestartE = restartExpansion defaultConfiguration , _confRestartS ...
701
true
true
0
8
126
137
82
55
null
null
bvdelft/parac2
src/Language/Java/Paragon/NameResolution.hs
bsd-3-clause
rnTypeArgument x = failEC x . mkErrorFromInfo $ UnsupportedFeature "Wildcards not yet supported"
118
rnTypeArgument x = failEC x . mkErrorFromInfo $ UnsupportedFeature "Wildcards not yet supported"
118
rnTypeArgument x = failEC x . mkErrorFromInfo $ UnsupportedFeature "Wildcards not yet supported"
118
false
false
0
7
34
23
10
13
null
null
wgyn/tlv-parser
test/Spec.hs
bsd-3-clause
main :: IO () main = hspec $ do describe "parseTLVs" $ do it "gracefully handles no bytes" $ do parseTLVs [] `shouldBe` [] describe "a single TLV" $ do describe "by tag" $ do it "can parse a 1-byte long tag" $ do let input = [0x5A, 0x01, 0x01] expected = [([0x5A], ...
1,776
main :: IO () main = hspec $ do describe "parseTLVs" $ do it "gracefully handles no bytes" $ do parseTLVs [] `shouldBe` [] describe "a single TLV" $ do describe "by tag" $ do it "can parse a 1-byte long tag" $ do let input = [0x5A, 0x01, 0x01] expected = [([0x5A], ...
1,776
main = hspec $ do describe "parseTLVs" $ do it "gracefully handles no bytes" $ do parseTLVs [] `shouldBe` [] describe "a single TLV" $ do describe "by tag" $ do it "can parse a 1-byte long tag" $ do let input = [0x5A, 0x01, 0x01] expected = [([0x5A], [0x01])] ...
1,762
false
true
2
24
591
650
354
296
null
null
termite2/tsl
Frontend/InstTree.hs
bsd-3-clause
-- Template from instance descriptor itreeTemplate :: (?spec::Spec) => IID -> Template itreeTemplate ns = itreeTemplate' itreeRoot ns
133
itreeTemplate :: (?spec::Spec) => IID -> Template itreeTemplate ns = itreeTemplate' itreeRoot ns
96
itreeTemplate ns = itreeTemplate' itreeRoot ns
46
true
true
0
6
17
33
18
15
null
null
ambiata/tatooine-cli
test/Test/Ambiata/Cli/Arbitrary.hs
apache-2.0
futureWithin :: UTCTime -> Retention -> Gen UTCTime futureWithin now (Retention d) = (flip addUTCTime now) <$> arbitrary `suchThat` closeEnough where closeEnough t = (t > (fromIntegral (0 :: Int))) && (t < posixDays d)
230
futureWithin :: UTCTime -> Retention -> Gen UTCTime futureWithin now (Retention d) = (flip addUTCTime now) <$> arbitrary `suchThat` closeEnough where closeEnough t = (t > (fromIntegral (0 :: Int))) && (t < posixDays d)
230
futureWithin now (Retention d) = (flip addUTCTime now) <$> arbitrary `suchThat` closeEnough where closeEnough t = (t > (fromIntegral (0 :: Int))) && (t < posixDays d)
178
false
true
1
10
46
103
50
53
null
null
a143753/AOJ
0148.hs
apache-2.0
main = do c <- getContents let i = map read $ lines c :: [Int] o = map ans i mapM_ putStrLn o
105
main = do c <- getContents let i = map read $ lines c :: [Int] o = map ans i mapM_ putStrLn o
105
main = do c <- getContents let i = map read $ lines c :: [Int] o = map ans i mapM_ putStrLn o
105
false
false
0
11
35
56
26
30
null
null
limaner2002/EPC-tools
USACScripts/src/Scripts/Opts.hs
bsd-3-clause
commandsInfo :: ParserInfo (IO ()) commandsInfo = info (helper <*> parseCommands) ( fullDesc <> progDesc progInfo )
122
commandsInfo :: ParserInfo (IO ()) commandsInfo = info (helper <*> parseCommands) ( fullDesc <> progDesc progInfo )
122
commandsInfo = info (helper <*> parseCommands) ( fullDesc <> progDesc progInfo )
87
false
true
0
8
23
45
22
23
null
null
rainbyte/summarizer
src/NLP/Summarizer/Grader.hs
gpl-3.0
applySentenceFactors :: Article -> Article applySentenceFactors article = let s:ss = sentences article s' = s { score = score s * 2 } factor :: Sentence -> Sentence factor sentence = if isNewParagraph sentence then sentence { score = score sentence * 1.6 } else sentence ...
392
applySentenceFactors :: Article -> Article applySentenceFactors article = let s:ss = sentences article s' = s { score = score s * 2 } factor :: Sentence -> Sentence factor sentence = if isNewParagraph sentence then sentence { score = score sentence * 1.6 } else sentence ...
392
applySentenceFactors article = let s:ss = sentences article s' = s { score = score s * 2 } factor :: Sentence -> Sentence factor sentence = if isNewParagraph sentence then sentence { score = score sentence * 1.6 } else sentence sentences' = map factor (s':ss) in artic...
349
false
true
0
13
110
125
65
60
null
null
mikehat/blaze-css
src/Text/Blaze/Css21/Value.hs
bsd-3-clause
to_string Teal = "teal"
41
to_string Teal = "teal"
41
to_string Teal = "teal"
41
false
false
0
5
21
9
4
5
null
null
polarina/sdl2
Graphics/UI/SDL/Video.hs
bsd-3-clause
raiseWindow :: MonadIO m => Window -> m () raiseWindow v1 = liftIO $ raiseWindow' v1
84
raiseWindow :: MonadIO m => Window -> m () raiseWindow v1 = liftIO $ raiseWindow' v1
84
raiseWindow v1 = liftIO $ raiseWindow' v1
41
false
true
0
8
15
37
17
20
null
null
GaloisInc/halvm-ghc
compiler/utils/Util.hs
bsd-3-clause
-- Module names: looksLikeModuleName :: String -> Bool looksLikeModuleName [] = False
86
looksLikeModuleName :: String -> Bool looksLikeModuleName [] = False
68
looksLikeModuleName [] = False
30
true
true
0
6
12
21
11
10
null
null
phaazon/ghc-mod
Language/Haskell/GhcMod/Monad.hs
bsd-3-clause
gmsGet :: IOish m => GhcModT m GhcModState gmsGet = GhcModT get
63
gmsGet :: IOish m => GhcModT m GhcModState gmsGet = GhcModT get
63
gmsGet = GhcModT get
20
false
true
0
6
11
26
12
14
null
null
pparkkin/eta
compiler/ETA/Utils/Outputable.hs
bsd-3-clause
printForAsm :: DynFlags -> Handle -> SDoc -> IO () printForAsm dflags handle doc = Pretty.printDoc LeftMode (pprCols dflags) handle (runSDoc doc (initSDocContext dflags (PprCode AsmStyle)))
195
printForAsm :: DynFlags -> Handle -> SDoc -> IO () printForAsm dflags handle doc = Pretty.printDoc LeftMode (pprCols dflags) handle (runSDoc doc (initSDocContext dflags (PprCode AsmStyle)))
195
printForAsm dflags handle doc = Pretty.printDoc LeftMode (pprCols dflags) handle (runSDoc doc (initSDocContext dflags (PprCode AsmStyle)))
144
false
true
0
11
31
82
37
45
null
null
fros1y/patent-api
src/Data/Patent/Citation/Format.hs
agpl-3.0
-- | Tests whether two 'Citation's are roughly equivalent given the vagueness with which patent citations are written in common usage (i.e., with the kind codes dropped) equivalentCitation :: Citation -> Citation -> Bool equivalentCitation a b = a' == b' where a' = a {_citationKind = Nothing, _citationPubDate = N...
466
equivalentCitation :: Citation -> Citation -> Bool equivalentCitation a b = a' == b' where a' = a {_citationKind = Nothing, _citationPubDate = Nothing} b' = b {_citationKind = Nothing, _citationPubDate = Nothing} -- | Formats a 'Citation' per the EPODOC standard promulgated by the EPO
296
equivalentCitation a b = a' == b' where a' = a {_citationKind = Nothing, _citationPubDate = Nothing} b' = b {_citationKind = Nothing, _citationPubDate = Nothing} -- | Formats a 'Citation' per the EPODOC standard promulgated by the EPO
245
true
true
1
7
83
73
41
32
null
null
vinit-ivar/apertium-gf
MorphDisambiguator.hs
gpl-2.0
main = do args <- getArgs if length args == 2 then do [p, l] <- getArgs pgf <- readPGF p loop $ fromMaybe (\x -> x :: String) $ (parseString pgf) <$> (readLanguage l) else do [p, l, s] <- getArgs pgf <- readPGF p putStrLn $ fromMaybe "" $ (par...
365
main = do args <- getArgs if length args == 2 then do [p, l] <- getArgs pgf <- readPGF p loop $ fromMaybe (\x -> x :: String) $ (parseString pgf) <$> (readLanguage l) else do [p, l, s] <- getArgs pgf <- readPGF p putStrLn $ fromMaybe "" $ (par...
365
main = do args <- getArgs if length args == 2 then do [p, l] <- getArgs pgf <- readPGF p loop $ fromMaybe (\x -> x :: String) $ (parseString pgf) <$> (readLanguage l) else do [p, l, s] <- getArgs pgf <- readPGF p putStrLn $ fromMaybe "" $ (par...
365
false
false
0
15
135
158
77
81
null
null
wilbowma/accelerate
Data/Array/Accelerate/CUDA/Array/Data.hs
bsd-3-clause
-- |Unset an array to never be released by a call to 'freeArray'. unbindArray :: AD.ArrayElt e => AD.ArrayData e -> CIO () unbindArray ad = basicModify ad (setL refcount (Just 0))
179
unbindArray :: AD.ArrayElt e => AD.ArrayData e -> CIO () unbindArray ad = basicModify ad (setL refcount (Just 0))
113
unbindArray ad = basicModify ad (setL refcount (Just 0))
56
true
true
0
9
31
57
27
30
null
null
NorfairKing/the-notes
src/Cryptography/SymmetricCryptography/Macro.hs
gpl-2.0
-- conccmp :: Note -> Note -> Note -- conccmp = -- | Encryption function enc_ :: Note enc_ = "e"
97
enc_ :: Note enc_ = "e"
23
enc_ = "e"
10
true
true
0
6
21
21
10
11
null
null
nushio3/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprSkolInfo (InstSC n) = text "the instance declaration" <> ifPprDebug (parens (ppr n))
94
pprSkolInfo (InstSC n) = text "the instance declaration" <> ifPprDebug (parens (ppr n))
94
pprSkolInfo (InstSC n) = text "the instance declaration" <> ifPprDebug (parens (ppr n))
94
false
false
0
10
19
38
17
21
null
null
chreekat/snowdrift
Model/User.hs
agpl-3.0
fetchNumUnviewedCommentsOnProjectWikiPagesDB :: UserId -> ProjectId -> DB (Map WikiPageId Int) fetchNumUnviewedCommentsOnProjectWikiPagesDB user_id project_id = fmap (M.fromList . map unwrapValues) $ select $ from $ \(c `InnerJoin` wp) -> do on_ (c ^. CommentDiscussion ==. wp ^. WikiPageDisc...
610
fetchNumUnviewedCommentsOnProjectWikiPagesDB :: UserId -> ProjectId -> DB (Map WikiPageId Int) fetchNumUnviewedCommentsOnProjectWikiPagesDB user_id project_id = fmap (M.fromList . map unwrapValues) $ select $ from $ \(c `InnerJoin` wp) -> do on_ (c ^. CommentDiscussion ==. wp ^. WikiPageDisc...
610
fetchNumUnviewedCommentsOnProjectWikiPagesDB user_id project_id = fmap (M.fromList . map unwrapValues) $ select $ from $ \(c `InnerJoin` wp) -> do on_ (c ^. CommentDiscussion ==. wp ^. WikiPageDiscussion) where_ $ exprWikiPageOnProject wp project_id &&. c ^. CommentId `notIn` exprUse...
503
false
true
0
15
134
197
95
102
null
null
fmapfmapfmap/amazonka
amazonka-kms/gen/Network/AWS/KMS/PutKeyPolicy.hs
mpl-2.0
-- | A unique identifier for the customer master key. This value can be a -- globally unique identifier or the fully specified ARN to a key. -- -- - Key ARN Example - -- arn:aws:kms:us-east-1:123456789012:key\/12345678-1234-1234-1234-123456789012 -- - Globally Unique Key ID Example - -- 12345678-1234-1234-1...
426
pkpKeyId :: Lens' PutKeyPolicy Text pkpKeyId = lens _pkpKeyId (\ s a -> s{_pkpKeyId = a})
89
pkpKeyId = lens _pkpKeyId (\ s a -> s{_pkpKeyId = a})
53
true
true
0
9
73
46
28
18
null
null
kadena-io/pact
src-ghc/Pact/Types/SQLite.hs
bsd-3-clause
bindParams :: Statement -> [SType] -> IO () bindParams stmt as = void $ liftEither (sequence <$> forM (zip as [1..]) ( \(a,i) -> do case a of SInt n -> bindInt64 stmt i n SDouble n -> bindDouble stmt i n SText n -> bindText stmt i n SBlob n -> bindBlob stmt i n))
309
bindParams :: Statement -> [SType] -> IO () bindParams stmt as = void $ liftEither (sequence <$> forM (zip as [1..]) ( \(a,i) -> do case a of SInt n -> bindInt64 stmt i n SDouble n -> bindDouble stmt i n SText n -> bindText stmt i n SBlob n -> bindBlob stmt i n))
309
bindParams stmt as = void $ liftEither (sequence <$> forM (zip as [1..]) ( \(a,i) -> do case a of SInt n -> bindInt64 stmt i n SDouble n -> bindDouble stmt i n SText n -> bindText stmt i n SBlob n -> bindBlob stmt i n))
265
false
true
2
16
101
153
72
81
null
null
ulyssesp/oscillare
serving/Network.hs
gpl-3.0
beatxpulse :: Float -> Tree CHOP -> Beat -> Tree CHOP beatxpulse x reset = logicCHOP (logicCHOPpreop ?~ int 6) . (:[]) . beatxcount x reset
139
beatxpulse :: Float -> Tree CHOP -> Beat -> Tree CHOP beatxpulse x reset = logicCHOP (logicCHOPpreop ?~ int 6) . (:[]) . beatxcount x reset
139
beatxpulse x reset = logicCHOP (logicCHOPpreop ?~ int 6) . (:[]) . beatxcount x reset
85
false
true
0
10
25
66
32
34
null
null
AlexanderPankiv/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
-- Note [Case MFEs] lvlMFE True env e@(_, AnnCase {}) = lvlExpr env e
71
lvlMFE True env e@(_, AnnCase {}) = lvlExpr env e
51
lvlMFE True env e@(_, AnnCase {}) = lvlExpr env e
51
true
false
2
6
15
40
17
23
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
wconfdDefRwto :: Int wconfdDefRwto = 60
39
wconfdDefRwto :: Int wconfdDefRwto = 60
39
wconfdDefRwto = 60
18
false
true
0
6
5
18
7
11
null
null
jparyani/capnproto-boostpython
compiler/src/Semantics.hs
bsd-2-clause
valueString (Int64Desc i) = show i
36
valueString (Int64Desc i) = show i
36
valueString (Int64Desc i) = show i
36
false
false
0
6
7
19
8
11
null
null
dkensinger/haskell
haskell-primes/NaiveSieveLimit.hs
gpl-3.0
primesToLimit :: Integer -> [Integer] primesToLimit n | n < 11 = takeWhile (< n) [2,3,5,7] | otherwise = 2 : 3 : 5 : 7 : lsieve n avoid2357
150
primesToLimit :: Integer -> [Integer] primesToLimit n | n < 11 = takeWhile (< n) [2,3,5,7] | otherwise = 2 : 3 : 5 : 7 : lsieve n avoid2357
150
primesToLimit n | n < 11 = takeWhile (< n) [2,3,5,7] | otherwise = 2 : 3 : 5 : 7 : lsieve n avoid2357
112
false
true
1
8
40
80
42
38
null
null
vinnymac/glot-www
Model/Language.hs
mit
toLanguage "elixir" = Elixir
28
toLanguage "elixir" = Elixir
28
toLanguage "elixir" = Elixir
28
false
false
0
5
3
9
4
5
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/tests/set-properties.hs
bsd-3-clause
prop_filter :: Set Int -> Int -> Bool prop_filter s i = partition odd s == (filter odd s, filter even s)
104
prop_filter :: Set Int -> Int -> Bool prop_filter s i = partition odd s == (filter odd s, filter even s)
104
prop_filter s i = partition odd s == (filter odd s, filter even s)
66
false
true
0
7
21
52
25
27
null
null
parapluu/encore
src/types/Typechecker/TypeError.hs
bsd-3-clause
currentContextFromBacktrace :: Backtrace -> ExecutionContext currentContextFromBacktrace [] = error "TypeError.hs: No execution context"
136
currentContextFromBacktrace :: Backtrace -> ExecutionContext currentContextFromBacktrace [] = error "TypeError.hs: No execution context"
136
currentContextFromBacktrace [] = error "TypeError.hs: No execution context"
75
false
true
0
6
12
23
11
12
null
null
JanGe/irc-dcc
src/Network/IRC/DCC/Internal.hs
mit
acceptedPosition :: DccAccept -> FileOffset acceptedPosition (Accept _ _ pos) = pos
90
acceptedPosition :: DccAccept -> FileOffset acceptedPosition (Accept _ _ pos) = pos
90
acceptedPosition (Accept _ _ pos) = pos
46
false
true
0
7
18
28
14
14
null
null
dimitri-xyz/market-model
test/Test.hs
bsd-3-clause
invertOrderbook :: (Coin p, Coin v, Eq q, Show q, Show c) => QuoteBook p v q c -> QuoteBook v p q c -> Test invertOrderbook sample result = TestCase $ do assertEqual "Applied fees mismatch expectation" result (invert sample)
228
invertOrderbook :: (Coin p, Coin v, Eq q, Show q, Show c) => QuoteBook p v q c -> QuoteBook v p q c -> Test invertOrderbook sample result = TestCase $ do assertEqual "Applied fees mismatch expectation" result (invert sample)
228
invertOrderbook sample result = TestCase $ do assertEqual "Applied fees mismatch expectation" result (invert sample)
120
false
true
0
10
44
95
46
49
null
null
pepeiborra/yices
Math/SMT/Yices/Parser.hs
bsd-3-clause
(+:) = tok "+" >> liftM2 (:+:) expY expY
40
(+:) = tok "+" >> liftM2 (:+:) expY expY
40
(+:) = tok "+" >> liftM2 (:+:) expY expY
40
false
false
3
5
8
29
13
16
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | If set, contains a pubsub label from which to extract record ids. If -- left empty, record deduplication will be strictly best effort. plIdLabel :: Lens' PubsubLocation (Maybe Text) plIdLabel = lens _plIdLabel (\ s a -> s{_plIdLabel = a})
245
plIdLabel :: Lens' PubsubLocation (Maybe Text) plIdLabel = lens _plIdLabel (\ s a -> s{_plIdLabel = a})
105
plIdLabel = lens _plIdLabel (\ s a -> s{_plIdLabel = a})
58
true
true
0
9
43
49
26
23
null
null
hvr/jhc
lib/haskell-extras/Data/List.hs
mit
groupBy :: (a -> a -> Bool) -> [a] -> [[a]] groupBy eq [] = []
89
groupBy :: (a -> a -> Bool) -> [a] -> [[a]] groupBy eq [] = []
89
groupBy eq [] = []
29
false
true
0
10
42
54
27
27
null
null
ben-schulz/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
-- | Get the list of pairs of fully-qualified names and their types that match some name lookupTyName :: Name -> Context -> [(Name, Type)] lookupTyName n ctxt = do (name, def) <- lookupCtxtName n (definitions ctxt) ty <- case tfst def of (Function ty _) -> return ty (Ty...
592
lookupTyName :: Name -> Context -> [(Name, Type)] lookupTyName n ctxt = do (name, def) <- lookupCtxtName n (definitions ctxt) ty <- case tfst def of (Function ty _) -> return ty (TyDecl _ ty) -> return ty (Operator ty _ _) -> return ty ...
503
lookupTyName n ctxt = do (name, def) <- lookupCtxtName n (definitions ctxt) ty <- case tfst def of (Function ty _) -> return ty (TyDecl _ ty) -> return ty (Operator ty _ _) -> return ty (CaseOp _ ty _ _ _ _) -> return ty r...
453
true
true
0
12
198
163
81
82
null
null
garetxe/cabal
Cabal/Distribution/Simple.hs
bsd-3-clause
autoconfUserHooks :: UserHooks autoconfUserHooks = simpleUserHooks { postConf = defaultPostConf, preBuild = \_ flags -> -- not using 'readHook' here because 'build' takes -- extra args getHookedBuildInfo $ fromFlag $ buil...
1,760
autoconfUserHooks :: UserHooks autoconfUserHooks = simpleUserHooks { postConf = defaultPostConf, preBuild = \_ flags -> -- not using 'readHook' here because 'build' takes -- extra args getHookedBuildInfo $ fromFlag $ buil...
1,760
autoconfUserHooks = simpleUserHooks { postConf = defaultPostConf, preBuild = \_ flags -> -- not using 'readHook' here because 'build' takes -- extra args getHookedBuildInfo $ fromFlag $ buildVerbosity flags, preCle...
1,729
false
true
9
13
649
328
162
166
null
null
minoki/LambdaQuest
src/LambdaQuest/Simple/TypeRecon.hs
bsd-3-clause
collectConstraints :: [UBinding] -> HTerm -> ((UTerm,UType),[(UType,UType)]) collectConstraints ctx tm = flip evalState 0 $ runWriterT $ do tm' <- assignTypeIdTm tm ((,) tm') <$> constraints ctx tm'
202
collectConstraints :: [UBinding] -> HTerm -> ((UTerm,UType),[(UType,UType)]) collectConstraints ctx tm = flip evalState 0 $ runWriterT $ do tm' <- assignTypeIdTm tm ((,) tm') <$> constraints ctx tm'
202
collectConstraints ctx tm = flip evalState 0 $ runWriterT $ do tm' <- assignTypeIdTm tm ((,) tm') <$> constraints ctx tm'
125
false
true
0
12
31
97
49
48
null
null
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/M4/CheckTypeStmt.hs
bsd-3-clause
checkStmt (GenBoolean _ _ _) = []
40
checkStmt (GenBoolean _ _ _) = []
40
checkStmt (GenBoolean _ _ _) = []
40
false
false
0
7
13
21
10
11
null
null
mikebenfield/ftensor
test/Tests/Math/Ftensor/General.hs
isc
case_index_3 = index v1 (2:-N) @?= 3
36
case_index_3 = index v1 (2:-N) @?= 3
36
case_index_3 = index v1 (2:-N) @?= 3
36
false
false
2
7
6
27
11
16
null
null
fmthoma/ghc
compiler/main/DynFlags.hs
bsd-3-clause
parseModuleName :: ReadP ModuleName parseModuleName = fmap mkModuleName $ munch1 (\c -> isAlphaNum c || c `elem` ".")
133
parseModuleName :: ReadP ModuleName parseModuleName = fmap mkModuleName $ munch1 (\c -> isAlphaNum c || c `elem` ".")
133
parseModuleName = fmap mkModuleName $ munch1 (\c -> isAlphaNum c || c `elem` ".")
97
false
true
3
10
33
49
23
26
null
null
urbanslug/ghc
compiler/utils/Util.hs
bsd-3-clause
thenCmp ordering _ = ordering
36
thenCmp ordering _ = ordering
36
thenCmp ordering _ = ordering
36
false
false
0
5
11
12
5
7
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs
bsd-3-clause
gl_INT_SAMPLER_BUFFER :: GLenum gl_INT_SAMPLER_BUFFER = 0x8DD0
62
gl_INT_SAMPLER_BUFFER :: GLenum gl_INT_SAMPLER_BUFFER = 0x8DD0
62
gl_INT_SAMPLER_BUFFER = 0x8DD0
30
false
true
0
4
5
11
6
5
null
null
afcady/servant-reflex
src/Servant/Common/Req.hs
bsd-3-clause
response (ResponseFailure _ _ x) = Just x
41
response (ResponseFailure _ _ x) = Just x
41
response (ResponseFailure _ _ x) = Just x
41
false
false
0
7
7
22
10
12
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo NotIOp = mkMonadic (fsLit "notI#") intPrimTy
55
primOpInfo NotIOp = mkMonadic (fsLit "notI#") intPrimTy
55
primOpInfo NotIOp = mkMonadic (fsLit "notI#") intPrimTy
55
false
false
0
7
6
20
9
11
null
null
kumasento/accelerate
Data/Array/Accelerate/Trafo/Sharing.hs
bsd-3-clause
makeOccMapAfun1 :: (Arrays a, Typeable b) => Config -> OccMapHash Acc -> Level -> (Acc a -> Acc b) -> IO (Acc a -> UnscopedAcc b, Int) makeOccMapAfun1 config accOccMap lvl f = do let x = Acc (Atag lvl) -- (UnscopedAcc [] body, height)...
639
makeOccMapAfun1 :: (Arrays a, Typeable b) => Config -> OccMapHash Acc -> Level -> (Acc a -> Acc b) -> IO (Acc a -> UnscopedAcc b, Int) makeOccMapAfun1 config accOccMap lvl f = do let x = Acc (Atag lvl) -- (UnscopedAcc [] body, height)...
639
makeOccMapAfun1 config accOccMap lvl f = do let x = Acc (Atag lvl) -- (UnscopedAcc [] body, height) <- makeOccMapSharingAcc config accOccMap (lvl+1) (f x) return (const (UnscopedAcc [lvl] body), height) -- Generate occupancy information for scalar functions and expressions. Helper -- functions wrapping around...
424
false
true
0
13
176
178
90
88
null
null
sixohsix/tak
src/Tak/GlobalState.hs
mit
updateRepaint :: GlobalState -> GlobalState updateRepaint = set needsRepaint True
81
updateRepaint :: GlobalState -> GlobalState updateRepaint = set needsRepaint True
81
updateRepaint = set needsRepaint True
37
false
true
0
7
9
27
11
16
null
null
paul-rouse/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
updatesToDoc :: (PersistEntity record, PersistEntityBackend record ~ DB.MongoContext) => [Update record] -> DB.Document updatesToDoc upds = map updateToMongoField upds
180
updatesToDoc :: (PersistEntity record, PersistEntityBackend record ~ DB.MongoContext) => [Update record] -> DB.Document updatesToDoc upds = map updateToMongoField upds
180
updatesToDoc upds = map updateToMongoField upds
47
false
true
0
8
31
53
26
27
null
null
Shou/Tombot
Tombot/Utils.hs
gpl-2.0
apIdiom :: (Text -> Text) -> Idiom -> Idiom mapIdiom f = mkIdiom . f . origIdiom
81
mapIdiom :: (Text -> Text) -> Idiom -> Idiom mapIdiom f = mkIdiom . f . origIdiom
81
mapIdiom f = mkIdiom . f . origIdiom
36
false
true
0
7
17
37
19
18
null
null
rueshyna/gogol
gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Exon' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'eStart' -- -- * 'eEnd' -- -- * 'eFrame' exon :: Exon exon = Exon' { _eStart = Nothing , _eEnd = Nothing , _eFrame = Nothing }
314
exon :: Exon exon = Exon' { _eStart = Nothing , _eEnd = Nothing , _eFrame = Nothing }
109
exon = Exon' { _eStart = Nothing , _eEnd = Nothing , _eFrame = Nothing }
92
true
true
1
7
84
47
29
18
null
null
alphalambda/codeworld
funblocks-client/src/Blocks/Printer.hs
apache-2.0
push :: Printer push = do PrintState (col,stack,lines) <- get put $ PrintState (col,col:stack,lines) -- Restore the old position
133
push :: Printer push = do PrintState (col,stack,lines) <- get put $ PrintState (col,col:stack,lines) -- Restore the old position
133
push = do PrintState (col,stack,lines) <- get put $ PrintState (col,col:stack,lines) -- Restore the old position
117
false
true
0
10
23
54
29
25
null
null
marcellussiegburg/autotool
collection/src/Fourier_Motzkin/Data.hs
gpl-2.0
linf = Linear $ M.fromList [(Nothing, 5%2),(Just "x",-3%7), (Just "y", 4%1)]
76
linf = Linear $ M.fromList [(Nothing, 5%2),(Just "x",-3%7), (Just "y", 4%1)]
76
linf = Linear $ M.fromList [(Nothing, 5%2),(Just "x",-3%7), (Just "y", 4%1)]
76
false
false
3
9
10
67
34
33
null
null
infotroph/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
breve 'u' = "ŭ"
15
breve 'u' = "ŭ"
15
breve 'u' = "ŭ"
15
false
false
1
5
3
13
4
9
null
null
byteally/webapi
webapi/src/WebApi/Server.hs
bsd-3-clause
mount :: forall (ns :: Symbol) c apps. ApiComponent c -> NestedApplication apps -> NestedApplication ('(ns, ApiInterface c) ': apps) mount (ApiComponent comp) (NestedApplication apps) = NestedApplication (comp:apps)
236
mount :: forall (ns :: Symbol) c apps. ApiComponent c -> NestedApplication apps -> NestedApplication ('(ns, ApiInterface c) ': apps) mount (ApiComponent comp) (NestedApplication apps) = NestedApplication (comp:apps)
236
mount (ApiComponent comp) (NestedApplication apps) = NestedApplication (comp:apps)
82
false
true
0
13
48
88
46
42
null
null
phaazon/quaazar
src/Quaazar/Render/GL/Framebuffer.hs
bsd-3-clause
attachTexture :: (MonadIO m,IsTexture t) => Target -> t -> AttachmentPoint -> m () attachTexture target tex ap = attachTextureAt target tex ap 0
144
attachTexture :: (MonadIO m,IsTexture t) => Target -> t -> AttachmentPoint -> m () attachTexture target tex ap = attachTextureAt target tex ap 0
144
attachTexture target tex ap = attachTextureAt target tex ap 0
61
false
true
0
10
23
59
29
30
null
null
krisajenkins/sigym4-geometry
tests/Sigym4/Geometry/JsonSpec.hs
bsd-3-clause
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
scslab/iterio-server
Data/IterIO/Http/Support/Action.hs
bsd-3-clause
-- |Sets a the value for \"_sess\" in the cookie to the given string. setSession :: Monad m => String -> Action t b m () setSession cookie = modify $ \s -> let cookieHeader = (S.pack "Set-Cookie", S.pack $ "_sess=" ++ cookie ++ "; path=/;") in s { actionResp = respAddHeader cookieHeader (actionResp s)}
307
setSession :: Monad m => String -> Action t b m () setSession cookie = modify $ \s -> let cookieHeader = (S.pack "Set-Cookie", S.pack $ "_sess=" ++ cookie ++ "; path=/;") in s { actionResp = respAddHeader cookieHeader (actionResp s)}
237
setSession cookie = modify $ \s -> let cookieHeader = (S.pack "Set-Cookie", S.pack $ "_sess=" ++ cookie ++ "; path=/;") in s { actionResp = respAddHeader cookieHeader (actionResp s)}
186
true
true
0
15
58
109
53
56
null
null
alios/iho-presentation
Data/IHO/S52/SVG.hs
bsd-3-clause
fromVector2 :: Vector2 -> Coordinate fromVector2 (xi,yi) = let (x, y) = (fromIntegral xi, fromIntegral yi) l = sqrt ((x*x) + (y*y)) phi = ((atan2 x y) - (pi / 2)) * (-1) in Coordinate l phi
205
fromVector2 :: Vector2 -> Coordinate fromVector2 (xi,yi) = let (x, y) = (fromIntegral xi, fromIntegral yi) l = sqrt ((x*x) + (y*y)) phi = ((atan2 x y) - (pi / 2)) * (-1) in Coordinate l phi
205
fromVector2 (xi,yi) = let (x, y) = (fromIntegral xi, fromIntegral yi) l = sqrt ((x*x) + (y*y)) phi = ((atan2 x y) - (pi / 2)) * (-1) in Coordinate l phi
168
false
true
0
13
52
124
66
58
null
null
urbanslug/ghc
compiler/specialise/Rules.hs
bsd-3-clause
match renv subst e1 (Var v2) -- Note [Expanding variables] | not (inRnEnvR rn_env v2) -- Note [Do not expand locally-bound variables] , Just e2' <- expandUnfolding_maybe (rv_unf renv v2') = match (renv { rv_lcl = nukeRnEnvR rn_env }) subst e1 e2' where v2' = lookupRnInScope rn_env v2 rn_env = rv...
528
match renv subst e1 (Var v2) -- Note [Expanding variables] | not (inRnEnvR rn_env v2) -- Note [Do not expand locally-bound variables] , Just e2' <- expandUnfolding_maybe (rv_unf renv v2') = match (renv { rv_lcl = nukeRnEnvR rn_env }) subst e1 e2' where v2' = lookupRnInScope rn_env v2 rn_env = rv...
528
match renv subst e1 (Var v2) -- Note [Expanding variables] | not (inRnEnvR rn_env v2) -- Note [Do not expand locally-bound variables] , Just e2' <- expandUnfolding_maybe (rv_unf renv v2') = match (renv { rv_lcl = nukeRnEnvR rn_env }) subst e1 e2' where v2' = lookupRnInScope rn_env v2 rn_env = rv...
528
false
false
1
11
139
119
55
64
null
null
TomMD/cryptol
src/Cryptol/TypeCheck/Solve.hs
bsd-3-clause
fromVal (Nat n) = tNum n
24
fromVal (Nat n) = tNum n
24
fromVal (Nat n) = tNum n
24
false
false
0
7
5
18
8
10
null
null
arowM/ASPico
src/ASPico/Utils.hs
mit
dayOfWeekToKanji 3 = "水"
24
dayOfWeekToKanji 3 = "水"
24
dayOfWeekToKanji 3 = "水"
24
false
false
1
5
3
13
4
9
null
null
sdiehl/ghc
testsuite/tests/typecheck/should_compile/tc217.hs
bsd-3-clause
test = 1 True
13
test = 1 True
13
test = 1 True
13
false
false
0
5
3
9
4
5
null
null
tolysz/wai
warp/Network/Wai/Handler/Warp.hs
mit
-- | Setting a log function. -- -- Since 3.X.X setLogger :: (Request -> H.Status -> Maybe Integer -> IO ()) -- ^ request, status, maybe file-size -> Settings -> Settings setLogger lgr y = y { settingsLogger = lgr }
234
setLogger :: (Request -> H.Status -> Maybe Integer -> IO ()) -- ^ request, status, maybe file-size -> Settings -> Settings setLogger lgr y = y { settingsLogger = lgr }
187
setLogger lgr y = y { settingsLogger = lgr }
44
true
true
0
11
60
61
33
28
null
null
ThoughtWorksInc/DeepDarkFantasy
DDF/Float.hs
apache-2.0
floatExp1 = app1 floatExp
25
floatExp1 = app1 floatExp
25
floatExp1 = app1 floatExp
25
false
false
0
5
3
9
4
5
null
null
nevrenato/Hets_Fork
DFOL/Morphism.hs
gpl-2.0
incompatibleViewError2 :: NAME -> TYPE -> TYPE -> Result.Diagnosis incompatibleViewError2 n t1 t2 = Result.Diag { Result.diagKind = Result.Error , Result.diagString = "Symbol\n" ++ (show $ pretty n) ++ "\nmust have type\n" ++ (show $ pretty t1) ++ "\nbut ins...
520
incompatibleViewError2 :: NAME -> TYPE -> TYPE -> Result.Diagnosis incompatibleViewError2 n t1 t2 = Result.Diag { Result.diagKind = Result.Error , Result.diagString = "Symbol\n" ++ (show $ pretty n) ++ "\nmust have type\n" ++ (show $ pretty t1) ++ "\nbut ins...
520
incompatibleViewError2 n t1 t2 = Result.Diag { Result.diagKind = Result.Error , Result.diagString = "Symbol\n" ++ (show $ pretty n) ++ "\nmust have type\n" ++ (show $ pretty t1) ++ "\nbut instead has type\n" ++ (show $ pretty t2) ++...
453
false
true
0
16
186
120
63
57
null
null
qnikst/ygruq
Handler/Logendar.hs
bsd-2-clause
datePickerAttrs :: Day -> [(Text, Text)] datePickerAttrs day = let textDay = T.pack $ showGregorian day in [ ("min", "2008-07-26") , ("max", textDay)]
174
datePickerAttrs :: Day -> [(Text, Text)] datePickerAttrs day = let textDay = T.pack $ showGregorian day in [ ("min", "2008-07-26") , ("max", textDay)]
174
datePickerAttrs day = let textDay = T.pack $ showGregorian day in [ ("min", "2008-07-26") , ("max", textDay)]
133
false
true
0
10
46
71
37
34
null
null
ZjMNZHgG5jMXw/smallcaps
src/smallcaps/Text/SmallCaps/DocumentParser.hs
bsd-3-clause
document :: Parser LaTeX document = many documentElement
56
document :: Parser LaTeX document = many documentElement
56
document = many documentElement
31
false
true
0
5
7
17
8
9
null
null
bibaijin/cis194
src/Spring13/Week7/Editor.hs
bsd-3-clause
getCommand :: Editor b Command getCommand = io $ readCom <$> getLine where readCom "" = Noop readCom inp@(c:cs) | isDigit c = maybe Noop Line (readMay inp) | toUpper c == 'L' = Load (unwords $ words cs) | c == '?' = Help | otherwise =...
415
getCommand :: Editor b Command getCommand = io $ readCom <$> getLine where readCom "" = Noop readCom inp@(c:cs) | isDigit c = maybe Noop Line (readMay inp) | toUpper c == 'L' = Load (unwords $ words cs) | c == '?' = Help | otherwise =...
415
getCommand = io $ readCom <$> getLine where readCom "" = Noop readCom inp@(c:cs) | isDigit c = maybe Noop Line (readMay inp) | toUpper c == 'L' = Load (unwords $ words cs) | c == '?' = Help | otherwise = maybe Noop read $ ...
384
false
true
12
11
183
158
73
85
null
null
sol/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
blockToOpenXML opts (OrderedList (start, numstyle, numdelim) lst) = do let marker = NumberMarker numstyle numdelim start addList marker asList $ concat `fmap` mapM (listItemToOpenXML opts marker) lst
205
blockToOpenXML opts (OrderedList (start, numstyle, numdelim) lst) = do let marker = NumberMarker numstyle numdelim start addList marker asList $ concat `fmap` mapM (listItemToOpenXML opts marker) lst
205
blockToOpenXML opts (OrderedList (start, numstyle, numdelim) lst) = do let marker = NumberMarker numstyle numdelim start addList marker asList $ concat `fmap` mapM (listItemToOpenXML opts marker) lst
205
false
false
0
10
32
76
37
39
null
null
agocorona/Workflow
Control/Workflow.old.hs
bsd-3-clause
waitUntilSTM :: TVar Bool -> STM() waitUntilSTM tv = do b <- readTVar tv if b == False then retry else return () -- | Wait until a certain clock time has passed by monitoring its flag, in the IO monad. -- See `waitUntilSTM`
243
waitUntilSTM :: TVar Bool -> STM() waitUntilSTM tv = do b <- readTVar tv if b == False then retry else return () -- | Wait until a certain clock time has passed by monitoring its flag, in the IO monad. -- See `waitUntilSTM`
243
waitUntilSTM tv = do b <- readTVar tv if b == False then retry else return () -- | Wait until a certain clock time has passed by monitoring its flag, in the IO monad. -- See `waitUntilSTM`
206
false
true
0
9
63
58
28
30
null
null
travitch/iiglue
tools/GObjectComparison.hs
bsd-3-clause
reportDiagnostic :: String -> LogM () reportDiagnostic s = modify (s:)
70
reportDiagnostic :: String -> LogM () reportDiagnostic s = modify (s:)
70
reportDiagnostic s = modify (s:)
32
false
true
0
7
10
30
15
15
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/VarSet.hs
bsd-3-clause
-- | Determines the pluralisation suffix appropriate for the length of a set -- in the same way that plural from Outputable does for lists. pluralVarSet :: VarSet -> SDoc pluralVarSet = pluralUFM
195
pluralVarSet :: VarSet -> SDoc pluralVarSet = pluralUFM
55
pluralVarSet = pluralUFM
24
true
true
0
5
32
17
10
7
null
null
prt2121/haskell-practice
cis194s13w07/src/Week07.hs
apache-2.0
flatten' :: Tree a -> [a] flatten' = treeFold [] (\l x r -> l ++ [x] ++ r)
74
flatten' :: Tree a -> [a] flatten' = treeFold [] (\l x r -> l ++ [x] ++ r)
74
flatten' = treeFold [] (\l x r -> l ++ [x] ++ r)
48
false
true
0
10
18
51
27
24
null
null
erikd/hs-tls
core/Network/TLS/Extra/Cipher.hs
bsd-3-clause
cipher_DHE_RSA_AES256GCM_SHA384 :: Cipher cipher_DHE_RSA_AES256GCM_SHA384 = Cipher { cipherID = 0x009F , cipherName = "DHE-RSA-AES256GCM-SHA384" , cipherBulk = bulk_aes256gcm , cipherHash = SHA384 , cipherPRFHash = Just SHA384 , cipherKeyExchange = CipherK...
382
cipher_DHE_RSA_AES256GCM_SHA384 :: Cipher cipher_DHE_RSA_AES256GCM_SHA384 = Cipher { cipherID = 0x009F , cipherName = "DHE-RSA-AES256GCM-SHA384" , cipherBulk = bulk_aes256gcm , cipherHash = SHA384 , cipherPRFHash = Just SHA384 , cipherKeyExchange = CipherK...
382
cipher_DHE_RSA_AES256GCM_SHA384 = Cipher { cipherID = 0x009F , cipherName = "DHE-RSA-AES256GCM-SHA384" , cipherBulk = bulk_aes256gcm , cipherHash = SHA384 , cipherPRFHash = Just SHA384 , cipherKeyExchange = CipherKeyExchange_DHE_RSA , cipherMinVer ...
340
false
true
0
8
114
65
38
27
null
null
tibbe/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
callishOp FloatTanOp = Just MO_F32_Tan
41
callishOp FloatTanOp = Just MO_F32_Tan
41
callishOp FloatTanOp = Just MO_F32_Tan
41
false
false
0
5
7
12
5
7
null
null
haskellbr/missingh
missingh-all/src/System/Time/Utils.hs
mit
timeDiffToSecs :: TimeDiff -> Integer timeDiffToSecs td = (fromIntegral $ tdSec td) + 60 * ((fromIntegral $ tdMin td) + 60 * ((fromIntegral $ tdHour td) + 24 * ((fromIntegral $ tdDay td) + 30 * ((fromIntegral $ tdMonth td) + 365 * (fro...
346
timeDiffToSecs :: TimeDiff -> Integer timeDiffToSecs td = (fromIntegral $ tdSec td) + 60 * ((fromIntegral $ tdMin td) + 60 * ((fromIntegral $ tdHour td) + 24 * ((fromIntegral $ tdDay td) + 30 * ((fromIntegral $ tdMonth td) + 365 * (fro...
346
timeDiffToSecs td = (fromIntegral $ tdSec td) + 60 * ((fromIntegral $ tdMin td) + 60 * ((fromIntegral $ tdHour td) + 24 * ((fromIntegral $ tdDay td) + 30 * ((fromIntegral $ tdMonth td) + 365 * (fromIntegral $ tdYear td)))))
308
false
true
0
17
131
130
67
63
null
null
bgamari/pandoc
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
refsToRST :: Refs -> State WriterState Doc refsToRST refs = mapM keyToRST refs >>= return . vcat
96
refsToRST :: Refs -> State WriterState Doc refsToRST refs = mapM keyToRST refs >>= return . vcat
96
refsToRST refs = mapM keyToRST refs >>= return . vcat
53
false
true
0
7
16
36
17
19
null
null
input-output-hk/cardano-sl
chain/src/Pos/Chain/Update/Poll/Types.hs
apache-2.0
bvsScriptVersion :: BlockVersionState -> Maybe ScriptVersion bvsScriptVersion = bvmScriptVersion . bvsModifier
110
bvsScriptVersion :: BlockVersionState -> Maybe ScriptVersion bvsScriptVersion = bvmScriptVersion . bvsModifier
110
bvsScriptVersion = bvmScriptVersion . bvsModifier
49
false
true
0
6
10
22
11
11
null
null
thalerjonathan/phd
public/towards/SugarScape/experimental/concurrent/src/SugarScape/Core/Discrete.hs
gpl-3.0
neighboursInNeumannDistance :: Discrete2dCoord -> Int -> Bool -> Discrete2d c -> STM [Discrete2dCell c] neighboursInNeumannDistance coord dist ic e = do l <- dimensionsDisc2d e let wrappedNs = wr...
617
neighboursInNeumannDistance :: Discrete2dCoord -> Int -> Bool -> Discrete2d c -> STM [Discrete2dCell c] neighboursInNeumannDistance coord dist ic e = do l <- dimensionsDisc2d e let wrappedNs = wr...
617
neighboursInNeumannDistance coord dist ic e = do l <- dimensionsDisc2d e let wrappedNs = wrapNeighbourhood l w ns cells <- cellsAt wrappedNs e return $ zip wrappedNs cells where n = neumann coordDeltas = foldr (\v acc -> acc ++ neighbourhoodScale n v) [] [1 .. dist] w ...
397
false
true
3
11
251
166
79
87
null
null
achirkin/qua-kit
apps/hs/qua-server/src/Foundation.hs
mit
lastExerciseId :: ReaderT SqlBackend Handler ExerciseId lastExerciseId = getVal <$> rawSql query [] where getVal (Single c:_) = c getVal [] = toSqlKey 0 query = unlines ["SELECT max(id) FROM exercise;" ]
238
lastExerciseId :: ReaderT SqlBackend Handler ExerciseId lastExerciseId = getVal <$> rawSql query [] where getVal (Single c:_) = c getVal [] = toSqlKey 0 query = unlines ["SELECT max(id) FROM exercise;" ]
238
lastExerciseId = getVal <$> rawSql query [] where getVal (Single c:_) = c getVal [] = toSqlKey 0 query = unlines ["SELECT max(id) FROM exercise;" ]
182
false
true
4
7
66
81
36
45
null
null