Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
DavidAlphaFox/ghc
utils/haddock/haddock-api/src/Haddock/GhcUtils.hs
bsd-3-clause
sigNameNoLoc (PatSynSig n _ _ _ _) = [unLoc n]
50
sigNameNoLoc (PatSynSig n _ _ _ _) = [unLoc n]
50
sigNameNoLoc (PatSynSig n _ _ _ _) = [unLoc n]
50
false
false
0
7
13
29
14
15
null
null
mcschroeder/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
-- Match a list of expressions against a list of patterns, left-to-right. matchSimplys :: [CoreExpr] -- Scrutinees -> HsMatchContext Name -- Match kind -> [LPat Id] -- Patterns they should match -> CoreExpr -- Return this if they all ...
492
matchSimplys :: [CoreExpr] -- Scrutinees -> HsMatchContext Name -- Match kind -> [LPat Id] -- Patterns they should match -> CoreExpr -- Return this if they all match -> CoreExpr -- Return this if they don't ...
417
matchSimplys [] _ctxt [] result_expr _fail_expr = return result_expr
68
true
true
0
12
186
74
38
36
null
null
YoEight/eventstore
Database/EventStore/Internal/ConnectionManager.hs
bsd-3-clause
onArrived :: Internal -> PackageArrived -> EventStore () onArrived self@Internal{..} (PackageArrived conn pkg@Package{..}) = do -- FIXME - We can merge those two `readIORef` calls into one. -- It's done on 2019's refactoring. cur <- readIORef _stage unless (closedOrInit cur) $ incrPackageNumber self -- /F...
1,994
onArrived :: Internal -> PackageArrived -> EventStore () onArrived self@Internal{..} (PackageArrived conn pkg@Package{..}) = do -- FIXME - We can merge those two `readIORef` calls into one. -- It's done on 2019's refactoring. cur <- readIORef _stage unless (closedOrInit cur) $ incrPackageNumber self -- /F...
1,994
onArrived self@Internal{..} (PackageArrived conn pkg@Package{..}) = do -- FIXME - We can merge those two `readIORef` calls into one. -- It's done on 2019's refactoring. cur <- readIORef _stage unless (closedOrInit cur) $ incrPackageNumber self -- /FIXME readIORef _stage >>= \case (onAuthentication ...
1,937
false
true
16
19
459
555
270
285
null
null
dlilja/hxsc
src/Numeric/HXSC/Real.hs
bsd-3-clause
maxIntU = fromIntU (maxBound :: Int)
36
maxIntU = fromIntU (maxBound :: Int)
36
maxIntU = fromIntU (maxBound :: Int)
36
false
false
0
6
5
15
8
7
null
null
hvr/unordered-containers
tests/HashMapProperties.hs
bsd-3-clause
UnionWith :: [(Key, Int)] -> [(Key, Int)] -> Bool pUnionWith xs ys = M.unionWith (-) (M.fromList xs) `eq_` HM.unionWith (-) (HM.fromList xs) $ ys
165
pUnionWith :: [(Key, Int)] -> [(Key, Int)] -> Bool pUnionWith xs ys = M.unionWith (-) (M.fromList xs) `eq_` HM.unionWith (-) (HM.fromList xs) $ ys
165
pUnionWith xs ys = M.unionWith (-) (M.fromList xs) `eq_` HM.unionWith (-) (HM.fromList xs) $ ys
114
false
true
0
10
43
88
48
40
null
null
drhodes/jade2hdl
jade-decode/src/Jade/Decode/ModTest.hs
bsd-3-clause
acreteCycleLine filename mt lineNum line = case parse cycleLine filename line of Left msg -> mt Right p -> mt { modCycleLine = Just p }
145
acreteCycleLine filename mt lineNum line = case parse cycleLine filename line of Left msg -> mt Right p -> mt { modCycleLine = Just p }
145
acreteCycleLine filename mt lineNum line = case parse cycleLine filename line of Left msg -> mt Right p -> mt { modCycleLine = Just p }
145
false
false
0
10
35
58
26
32
null
null
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/FormulaSyn.hs
bsd-3-clause
isQuote _ = False
17
isQuote _ = False
17
isQuote _ = False
17
false
false
0
4
3
10
4
6
null
null
sw17ch/plunge
src/Plunge/Printers/PreprocessorOutput.hs
bsd-3-clause
originalDirectiveFlag :: DirectiveFlag -> Doc originalDirectiveFlag EnterFile = char '1'
91
originalDirectiveFlag :: DirectiveFlag -> Doc originalDirectiveFlag EnterFile = char '1'
91
originalDirectiveFlag EnterFile = char '1'
45
false
true
0
5
12
25
11
14
null
null
siddhanathan/ghc
testsuite/tests/parser/should_compile/read002.hs
bsd-3-clause
x `f` y = x
11
x `f` y = x
11
x `f` y = x
11
false
false
0
5
4
18
8
10
null
null
vTurbine/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkConInfoTableLabel name c = IdLabel name c ConInfoTable
63
mkConInfoTableLabel name c = IdLabel name c ConInfoTable
63
mkConInfoTableLabel name c = IdLabel name c ConInfoTable
63
false
false
0
5
14
18
8
10
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/Bare/Measure.hs
bsd-3-clause
makeHaskellInlines :: [CoreBind] -> ModName -> (ModName, Ms.BareSpec) -> BareM () makeHaskellInlines _ name' (name, _ ) | name /= name' = return mempty
157
makeHaskellInlines :: [CoreBind] -> ModName -> (ModName, Ms.BareSpec) -> BareM () makeHaskellInlines _ name' (name, _ ) | name /= name' = return mempty
157
makeHaskellInlines _ name' (name, _ ) | name /= name' = return mempty
75
false
true
0
9
29
65
33
32
null
null
bjpop/blip
blipinterpreter/src/Blip/Interpreter/HashTable/Utils.hs
bsd-3-clause
numElemsInCacheLine :: Int numElemsInCacheLine = z where !z = cacheLineSize `div` (bitSize (0::Elem) `div` 8) -- | What you have to mask an integer index by to tell if it's -- cacheline-aligned
201
numElemsInCacheLine :: Int numElemsInCacheLine = z where !z = cacheLineSize `div` (bitSize (0::Elem) `div` 8) -- | What you have to mask an integer index by to tell if it's -- cacheline-aligned
201
numElemsInCacheLine = z where !z = cacheLineSize `div` (bitSize (0::Elem) `div` 8) -- | What you have to mask an integer index by to tell if it's -- cacheline-aligned
174
false
true
0
9
39
47
27
20
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/index_4.hs
mit
rangeOrdering :: Tup2 Ordering Ordering -> (List Ordering) rangeOrdering (Tup2 x y) = concatMap (range0 y x) (Cons LT (Cons EQ (Cons GT Nil)))
144
rangeOrdering :: Tup2 Ordering Ordering -> (List Ordering) rangeOrdering (Tup2 x y) = concatMap (range0 y x) (Cons LT (Cons EQ (Cons GT Nil)))
144
rangeOrdering (Tup2 x y) = concatMap (range0 y x) (Cons LT (Cons EQ (Cons GT Nil)))
83
false
true
0
11
25
79
37
42
null
null
wuzzeb/yesod
yesod-core/Yesod/Core/Handler.hs
mit
cached :: (MonadHandler m, Typeable a) => m a -> m a cached action = do gs <- get eres <- Cache.cached (ghsCache gs) action case eres of Right res -> return res Left (newCache, res) -> do put $ gs { ghsCache = newCache } return res -- | a per-request cache. jus...
855
cached :: (MonadHandler m, Typeable a) => m a -> m a cached action = do gs <- get eres <- Cache.cached (ghsCache gs) action case eres of Right res -> return res Left (newCache, res) -> do put $ gs { ghsCache = newCache } return res -- | a per-request cache. jus...
855
cached action = do gs <- get eres <- Cache.cached (ghsCache gs) action case eres of Right res -> return res Left (newCache, res) -> do put $ gs { ghsCache = newCache } return res -- | a per-request cache. just like 'cached'. -- 'cached' can only cache a single value per type...
788
false
true
0
14
210
131
67
64
null
null
lifengsun/haskell-exercise
scheme/05/conditionalparser.hs
gpl-3.0
parseQuoted :: Parser LispVal parseQuoted = do char '\'' e <- parseExpr return $ List [Atom "quote", e]
109
parseQuoted :: Parser LispVal parseQuoted = do char '\'' e <- parseExpr return $ List [Atom "quote", e]
109
parseQuoted = do char '\'' e <- parseExpr return $ List [Atom "quote", e]
79
false
true
0
10
23
46
21
25
null
null
Happy0/snowdrift
Handler/Widget.hs
agpl-3.0
getWidgetR :: Text -> Handler Html getWidgetR project_handle = do (project, pledges) <- runYDB $ do Entity project_id project <- getBy404 $ UniqueProjectHandle project_handle pledges <- getProjectShares project_id return (project, pledges) let share_value = projectShareValue project ...
493
getWidgetR :: Text -> Handler Html getWidgetR project_handle = do (project, pledges) <- runYDB $ do Entity project_id project <- getBy404 $ UniqueProjectHandle project_handle pledges <- getProjectShares project_id return (project, pledges) let share_value = projectShareValue project ...
493
getWidgetR project_handle = do (project, pledges) <- runYDB $ do Entity project_id project <- getBy404 $ UniqueProjectHandle project_handle pledges <- getProjectShares project_id return (project, pledges) let share_value = projectShareValue project users = fromIntegral $ length ...
458
false
true
0
13
117
137
64
73
null
null
hecrj/haskell-format
test/specs/function-simple/input.hs
bsd-3-clause
add :: Int -> Int -> Int add a b = a + b
40
add :: Int -> Int -> Int add a b = a + b
40
add a b = a + b
15
false
true
0
6
13
33
15
18
null
null
kmels/hledger
hledger/Hledger/Cli/Accounts.hs
gpl-3.0
tests_Hledger_Cli_Accounts = TestList []
40
tests_Hledger_Cli_Accounts = TestList []
40
tests_Hledger_Cli_Accounts = TestList []
40
false
false
0
6
3
11
5
6
null
null
elieux/ghc
compiler/utils/Maybes.hs
bsd-3-clause
liftMaybeT :: Monad m => m a -> MaybeT m a liftMaybeT act = MaybeT $ Just `liftM` act
85
liftMaybeT :: Monad m => m a -> MaybeT m a liftMaybeT act = MaybeT $ Just `liftM` act
85
liftMaybeT act = MaybeT $ Just `liftM` act
42
false
true
0
7
18
43
21
22
null
null
aviaviavi/legion
src/Lib.hs
mit
-- checks whether the provided block hash satisfies -- our PoW requirement satisfiesPow :: String -> Bool satisfiesPow bHash = maybe (error $ "Something is wrong with the provided hash: " ++ bHash) (< difficultyTarget) (readMaybe ("0x" ++ bHash) :: Maybe Integer)
277
satisfiesPow :: String -> Bool satisfiesPow bHash = maybe (error $ "Something is wrong with the provided hash: " ++ bHash) (< difficultyTarget) (readMaybe ("0x" ++ bHash) :: Maybe Integer)
202
satisfiesPow bHash = maybe (error $ "Something is wrong with the provided hash: " ++ bHash) (< difficultyTarget) (readMaybe ("0x" ++ bHash) :: Maybe Integer)
171
true
true
0
8
55
63
33
30
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/OrdList.hs
bsd-3-clause
foldlOL k z (Cons x xs) = foldlOL k (k z x) xs
46
foldlOL k z (Cons x xs) = foldlOL k (k z x) xs
46
foldlOL k z (Cons x xs) = foldlOL k (k z x) xs
46
false
false
0
7
12
36
17
19
null
null
harrisi/on-being-better
list-expansion/Haskell/foocabal/Main.hs
cc0-1.0
allItems :: IO (Maybe [String]) allItems = scrapeURL "https://www2.portofportland.com/PDX/Flights?Day=Today&TimeFrom=12%3A00+AM&TimeTo=11%3A59+PM&Type=D&FlightNum=&CityFromTo=&Airline=" items where items :: Scraper String [String] items = chroots ("tr" // "td") item item :: Scraper String String item...
332
allItems :: IO (Maybe [String]) allItems = scrapeURL "https://www2.portofportland.com/PDX/Flights?Day=Today&TimeFrom=12%3A00+AM&TimeTo=11%3A59+PM&Type=D&FlightNum=&CityFromTo=&Airline=" items where items :: Scraper String [String] items = chroots ("tr" // "td") item item :: Scraper String String item...
332
allItems = scrapeURL "https://www2.portofportland.com/PDX/Flights?Day=Today&TimeFrom=12%3A00+AM&TimeTo=11%3A59+PM&Type=D&FlightNum=&CityFromTo=&Airline=" items where items :: Scraper String [String] items = chroots ("tr" // "td") item item :: Scraper String String item = text "td"
300
false
true
3
8
50
79
40
39
null
null
brendanhay/gogol
gogol-poly/gen/Network/Google/Resource/Poly/Users/Likedassets/List.hs
mpl-2.0
-- | Creates a value of 'UsersLikedassetsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ullXgafv' -- -- * 'ullUploadProtocol' -- -- * 'ullOrderBy' -- -- * 'ullAccessToken' -- -- * 'ullFormat' -- -- * 'ullUploadType' -- -- * 'ul...
826
usersLikedassetsList :: Text -- ^ 'ullName' -> UsersLikedassetsList usersLikedassetsList pUllName_ = UsersLikedassetsList' { _ullXgafv = Nothing , _ullUploadProtocol = Nothing , _ullOrderBy = Nothing , _ullAccessToken = Nothing , _ullFormat = Nothing , _ullUploadType = Nothing , _u...
432
usersLikedassetsList pUllName_ = UsersLikedassetsList' { _ullXgafv = Nothing , _ullUploadProtocol = Nothing , _ullOrderBy = Nothing , _ullAccessToken = Nothing , _ullFormat = Nothing , _ullUploadType = Nothing , _ullName = pUllName_ , _ullPageToken = Nothing , _ullPageSize = Nothin...
356
true
true
0
7
176
113
76
37
null
null
urbit/urbit
pkg/hs/urbit-king/lib/Urbit/Vere/Eyre/Serv.hs
mit
onSniHdr :: HasLogFunc e => e -> MultiTlsConfig -> Maybe String -> IO Credentials onSniHdr env (MTC mtls) mHos = do tabl <- atomically (readTVar mtls) runRIO env $ logDbg ctx (tabl, mHos) ship <- hostShip (encodeUtf8 . pack <$> mHos) runRIO env $ logDbg ctx ship tcfg <- lookup ship tabl & maybe (notRunning ...
500
onSniHdr :: HasLogFunc e => e -> MultiTlsConfig -> Maybe String -> IO Credentials onSniHdr env (MTC mtls) mHos = do tabl <- atomically (readTVar mtls) runRIO env $ logDbg ctx (tabl, mHos) ship <- hostShip (encodeUtf8 . pack <$> mHos) runRIO env $ logDbg ctx ship tcfg <- lookup ship tabl & maybe (notRunning ...
500
onSniHdr env (MTC mtls) mHos = do tabl <- atomically (readTVar mtls) runRIO env $ logDbg ctx (tabl, mHos) ship <- hostShip (encodeUtf8 . pack <$> mHos) runRIO env $ logDbg ctx ship tcfg <- lookup ship tabl & maybe (notRunning ship) (pure . snd) runRIO env $ logDbg ctx tcfg pure (Credentials [tcfg]) where...
416
false
true
0
11
105
228
106
122
null
null
nejla/auth-service
service/src/Audit.hs
bsd-3-clause
auditLogUser AuditUserDeactivated {auditUserID = uid} = Just uid
71
auditLogUser AuditUserDeactivated {auditUserID = uid} = Just uid
71
auditLogUser AuditUserDeactivated {auditUserID = uid} = Just uid
71
false
false
0
8
14
21
10
11
null
null
hpacheco/HAAP
examples/plab/svn/2017li1g183/src/Tarefa1_2017li1g183.hs
mit
coloca :: a -> Posicao -> [[a]] -> [[a]] coloca peca (0,0) ((_:l):ls) = (peca:l):ls
83
coloca :: a -> Posicao -> [[a]] -> [[a]] coloca peca (0,0) ((_:l):ls) = (peca:l):ls
83
coloca peca (0,0) ((_:l):ls) = (peca:l):ls
42
false
true
0
9
14
73
41
32
null
null
siddhanathan/ghc
includes/CodeGen.Platform.hs
bsd-3-clause
globalRegMaybe HpLim = Just (RealRegSingle REG_HpLim)
72
globalRegMaybe HpLim = Just (RealRegSingle REG_HpLim)
72
globalRegMaybe HpLim = Just (RealRegSingle REG_HpLim)
72
false
false
0
7
24
18
8
10
null
null
spacekitteh/smcghc
testsuite/tests/numeric/should_run/T7014.hs
bsd-3-clause
test_subf :: Float -> Float test_subf x = x - 0
47
test_subf :: Float -> Float test_subf x = x - 0
47
test_subf x = x - 0
19
false
true
0
5
10
22
11
11
null
null
gust/feature-creature
users-service/test/Helpers/RequestSpecHelpers.hs
mit
putJson :: (ToJSON a) => ByteString -> a -> WaiSession SResponse putJson path = request methodPut path [("Content-Type", "application/json")] . encode
152
putJson :: (ToJSON a) => ByteString -> a -> WaiSession SResponse putJson path = request methodPut path [("Content-Type", "application/json")] . encode
152
putJson path = request methodPut path [("Content-Type", "application/json")] . encode
87
false
true
0
8
22
54
28
26
null
null
HJvT/com
System/Win32/Com/Exception.hs
bsd-3-clause
mARSHAL_S_FIRST :: HRESULT mARSHAL_S_FIRST = word32ToInt32 (0x00040120 ::Word32)
80
mARSHAL_S_FIRST :: HRESULT mARSHAL_S_FIRST = word32ToInt32 (0x00040120 ::Word32)
80
mARSHAL_S_FIRST = word32ToInt32 (0x00040120 ::Word32)
53
false
true
0
6
7
26
12
14
null
null
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeEventSubscriptions.hs
mpl-2.0
-- | The maximum number of records to include in the response. If more records -- exist than the specified 'MaxRecords' value, a pagination token called a marker -- is included in the response so that the remaining results can be retrieved. -- -- Default: 100 -- -- Constraints: minimum 20, maximum 100 des1MaxRecords ::...
439
des1MaxRecords :: Lens' DescribeEventSubscriptions (Maybe Int) des1MaxRecords = lens _des1MaxRecords (\s a -> s { _des1MaxRecords = a })
136
des1MaxRecords = lens _des1MaxRecords (\s a -> s { _des1MaxRecords = a })
73
true
true
0
9
71
52
31
21
null
null
WraithM/CoreCompiler
src/GraphReduction/Machine.hs
bsd-3-clause
unaryArithmetic :: (Int -> Int) -> (GmState -> GmState) unaryArithmetic = unaryPrimitive boxInt unboxInt
104
unaryArithmetic :: (Int -> Int) -> (GmState -> GmState) unaryArithmetic = unaryPrimitive boxInt unboxInt
104
unaryArithmetic = unaryPrimitive boxInt unboxInt
48
false
true
0
7
13
34
18
16
null
null
olorin/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ClusterParameterGroupStatus' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cpgsClusterParameterStatusList' -- -- * 'cpgsParameterApplyStatus' -- -- * 'cpgsParameterGroupName' clusterParameterGroupStatus ...
549
clusterParameterGroupStatus :: ClusterParameterGroupStatus clusterParameterGroupStatus = ClusterParameterGroupStatus' { _cpgsClusterParameterStatusList = Nothing , _cpgsParameterApplyStatus = Nothing , _cpgsParameterGroupName = Nothing }
261
clusterParameterGroupStatus = ClusterParameterGroupStatus' { _cpgsClusterParameterStatusList = Nothing , _cpgsParameterApplyStatus = Nothing , _cpgsParameterGroupName = Nothing }
198
true
true
1
7
84
47
29
18
null
null
tadeuzagallo/verve-lang
src/Syntax/Lexer.hs
mit
angles :: Parser a -> Parser a angles p = lexeme $ between (char '<' <* anySpace) (anySpace *> char '>') p
106
angles :: Parser a -> Parser a angles p = lexeme $ between (char '<' <* anySpace) (anySpace *> char '>') p
106
angles p = lexeme $ between (char '<' <* anySpace) (anySpace *> char '>') p
75
false
true
0
9
21
59
27
32
null
null
bocuma/users-service
src/Database/UserManager.hs
mit
authenticate :: User.User -> IO Bool authenticate user = do collection <- getConfig "MONGO_CL" dbUser <- performDBAction (findOne (select ["email" =: (User.email user)] collection)) case dbUser of Just u -> do return $ verifyPassword (B.pack (User.password user)) (B.pack (at "password" u)) Nothing ...
335
authenticate :: User.User -> IO Bool authenticate user = do collection <- getConfig "MONGO_CL" dbUser <- performDBAction (findOne (select ["email" =: (User.email user)] collection)) case dbUser of Just u -> do return $ verifyPassword (B.pack (User.password user)) (B.pack (at "password" u)) Nothing ...
335
authenticate user = do collection <- getConfig "MONGO_CL" dbUser <- performDBAction (findOne (select ["email" =: (User.email user)] collection)) case dbUser of Just u -> do return $ verifyPassword (B.pack (User.password user)) (B.pack (at "password" u)) Nothing -> return False
298
false
true
0
18
65
141
66
75
null
null
silverweed/ketchup
Ketchup/Httpd.hs
mit
createAcceptorPool :: Socket -> Int -> Handler -> IO () createAcceptorPool sock 0 cback = acceptAll sock cback
113
createAcceptorPool :: Socket -> Int -> Handler -> IO () createAcceptorPool sock 0 cback = acceptAll sock cback
112
createAcceptorPool sock 0 cback = acceptAll sock cback
56
false
true
0
9
20
40
19
21
null
null
cameronbwhite/ComputationalStructures
Haskell/RegExp.hs
bsd-3-clause
parseAnd :: Parser LogicExp parseAnd = parseBinary And "&"
58
parseAnd :: Parser LogicExp parseAnd = parseBinary And "&"
58
parseAnd = parseBinary And "&"
30
false
true
0
5
8
19
9
10
null
null
plow-technologies/plow-extras
plow-extras-time/src/Plow/Extras/Time.hs
mit
-- | Get the current epoch time in seconds. getCurrentEpochTime :: IO Int getCurrentEpochTime = utcTimeToInt <$> getCurrentTime
127
getCurrentEpochTime :: IO Int getCurrentEpochTime = utcTimeToInt <$> getCurrentTime
83
getCurrentEpochTime = utcTimeToInt <$> getCurrentTime
53
true
true
0
5
17
19
10
9
null
null
TomMD/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
{- Note [Suppressing kinds] ~~~~~~~~~~~~~~~~~~~~~~~~ We use the IfaceTcArgs to specify which of the arguments to a type constructor instantiate a for-all, and which are regular kind args. This in turn used to control kind-suppression when printing types, under the control of -fprint-explicit-kinds. See also TypeRep.su...
1,098
pprIfaceInfixApp :: (TyPrec -> a -> SDoc) -> TyPrec -> SDoc -> a -> a -> SDoc pprIfaceInfixApp pp p pp_tc ty1 ty2 = maybeParen p FunPrec $ sep [pp FunPrec ty1, pprInfixVar True pp_tc <+> pp FunPrec ty2]
208
pprIfaceInfixApp pp p pp_tc ty1 ty2 = maybeParen p FunPrec $ sep [pp FunPrec ty1, pprInfixVar True pp_tc <+> pp FunPrec ty2]
130
true
true
0
9
333
91
45
46
null
null
spockwangs/scheme.in.haskell
list4.3.hs
unlicense
unwordsList :: [LispVal] -> String unwordsList = unwords . map show
67
unwordsList :: [LispVal] -> String unwordsList = unwords . map show
67
unwordsList = unwords . map show
32
false
true
0
7
10
31
14
17
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nvHvparams :: String nvHvparams = "hvparms"
43
nvHvparams :: String nvHvparams = "hvparms"
43
nvHvparams = "hvparms"
22
false
true
0
6
5
18
7
11
null
null
enolan/cabal
cabal-install/Distribution/Client/Manpage.hs
bsd-3-clause
commandDetailsLines :: String -> CommandSpec action -> [String] commandDetailsLines pname (CommandSpec ui _ NormalCommand) = [ ".B " ++ pname ++ " " ++ (commandName ui) , "" , commandUsage ui pname , "" ] ++ optional commandDescription ++ optional commandNotes ++ [ "Flags:" , ".RS" ] ++ optionsLi...
465
commandDetailsLines :: String -> CommandSpec action -> [String] commandDetailsLines pname (CommandSpec ui _ NormalCommand) = [ ".B " ++ pname ++ " " ++ (commandName ui) , "" , commandUsage ui pname , "" ] ++ optional commandDescription ++ optional commandNotes ++ [ "Flags:" , ".RS" ] ++ optionsLi...
465
commandDetailsLines pname (CommandSpec ui _ NormalCommand) = [ ".B " ++ pname ++ " " ++ (commandName ui) , "" , commandUsage ui pname , "" ] ++ optional commandDescription ++ optional commandNotes ++ [ "Flags:" , ".RS" ] ++ optionsLines ui ++ [ ".RE" , "" ] where optional field = ...
401
false
true
4
9
132
163
81
82
null
null
marcellussiegburg/autotool
test/src/Extract.hs
gpl-2.0
forEinsendung _ _ _ = return ()
31
forEinsendung _ _ _ = return ()
31
forEinsendung _ _ _ = return ()
31
false
false
0
6
6
18
8
10
null
null
sapek/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
mathChars :: LP String mathChars = concat <$> many ( many1 (satisfy (\c -> c /= '$' && c /='\\')) <|> (\c -> ['\\',c]) <$> (try $ char '\\' *> anyChar) )
170
mathChars :: LP String mathChars = concat <$> many ( many1 (satisfy (\c -> c /= '$' && c /='\\')) <|> (\c -> ['\\',c]) <$> (try $ char '\\' *> anyChar) )
170
mathChars = concat <$> many ( many1 (satisfy (\c -> c /= '$' && c /='\\')) <|> (\c -> ['\\',c]) <$> (try $ char '\\' *> anyChar) )
147
false
true
0
17
48
89
47
42
null
null
zloster/FrameworkBenchmarks
frameworks/Haskell/warp/shared/tfb-mysql-haskell/TFB/Db.hs
bsd-3-clause
decodeFortune (_:[]) = Left "MarshalError: Expected 2 columns for Fortune, found 1"
83
decodeFortune (_:[]) = Left "MarshalError: Expected 2 columns for Fortune, found 1"
83
decodeFortune (_:[]) = Left "MarshalError: Expected 2 columns for Fortune, found 1"
83
false
false
0
8
11
21
10
11
null
null
jecisc/TP_PF_L3
PF-TP5/src/PF-TP_Interprete_Fini_FerlicotDelbecque_Cyril/Main.hs
mit
interpreteA :: Environnement ValeurA -> Expression -> ValeurA interpreteA _ (Lit a) = VLitteralA a
98
interpreteA :: Environnement ValeurA -> Expression -> ValeurA interpreteA _ (Lit a) = VLitteralA a
98
interpreteA _ (Lit a) = VLitteralA a
36
false
true
0
10
14
41
18
23
null
null
iteloo/tsuru-sample
iteratee-0.8.9.6/src/Data/Iteratee/PTerm.hs
bsd-3-clause
-- ------------------------------------- -- ListLike variants -- | A variant of 'Data.Iteratee.ListLike.breakE' that passes 'EOF's. breakEPT :: (LL.ListLike s el, NullPoint s) => (el -> Bool) -> Enumeratee s s m a breakEPT cpred = eneeCheckIfDonePass (icont . step) where step k (Chunk s) | LL.null s = ...
603
breakEPT :: (LL.ListLike s el, NullPoint s) => (el -> Bool) -> Enumeratee s s m a breakEPT cpred = eneeCheckIfDonePass (icont . step) where step k (Chunk s) | LL.null s = liftI (step k) | otherwise = case LL.break cpred s of (str', tail') | LL.null tail' -> eneeCheckIfDonePass (...
470
breakEPT cpred = eneeCheckIfDonePass (icont . step) where step k (Chunk s) | LL.null s = liftI (step k) | otherwise = case LL.break cpred s of (str', tail') | LL.null tail' -> eneeCheckIfDonePass (icont . step) . k $ Chunk str' | otherwise -> idone (k $ Chunk str') (Chun...
382
true
true
0
14
160
224
107
117
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Bookshelves/Get.hs
mpl-2.0
-- | ID of bookshelf to retrieve. mlbgShelf :: Lens' MyLibraryBookshelvesGet Text mlbgShelf = lens _mlbgShelf (\ s a -> s{_mlbgShelf = a})
140
mlbgShelf :: Lens' MyLibraryBookshelvesGet Text mlbgShelf = lens _mlbgShelf (\ s a -> s{_mlbgShelf = a})
106
mlbgShelf = lens _mlbgShelf (\ s a -> s{_mlbgShelf = a})
58
true
true
0
9
24
42
22
20
null
null
jaalonso/I1M-Cod-Temas
src/Tema_9.hs
gpl-2.0
p4 = Impl (Conj (Var 'A') (Impl (Var 'A') (Var 'B'))) (Var 'B')
63
p4 = Impl (Conj (Var 'A') (Impl (Var 'A') (Var 'B'))) (Var 'B')
63
p4 = Impl (Conj (Var 'A') (Impl (Var 'A') (Var 'B'))) (Var 'B')
63
false
false
1
11
12
55
25
30
null
null
cchens/courseography
hs/Css/Constants.hs
gpl-3.0
lightGrey :: T.Text lightGrey = "#CCCCCC"
41
lightGrey :: T.Text lightGrey = "#CCCCCC"
41
lightGrey = "#CCCCCC"
21
false
true
0
5
5
13
7
6
null
null
boojinks/cis194-solutions
src/HW02/LogAnalysis.hs
bsd-3-clause
-- Exercise 5 isSevereError :: LogMessage -> Bool isSevereError (LogMessage (Error sev) _ _) = sev >= 50
105
isSevereError :: LogMessage -> Bool isSevereError (LogMessage (Error sev) _ _) = sev >= 50
90
isSevereError (LogMessage (Error sev) _ _) = sev >= 50
54
true
true
0
9
18
39
20
19
null
null
jsdw/hs-thirdlight-api
src/ThirdLight/Api.hs
bsd-3-clause
runApi' :: URL -> ApiReader a -> IO a runApi' url r = withSession url "" (\s -> runApi s r)
91
runApi' :: URL -> ApiReader a -> IO a runApi' url r = withSession url "" (\s -> runApi s r)
91
runApi' url r = withSession url "" (\s -> runApi s r)
53
false
true
0
8
20
54
25
29
null
null
zerobuzz/servant
servant-server/test/Servant/ServerSpec.hs
bsd-3-clause
-- * comprehensive api test -- This declaration simply checks that all instances are in place. _ = serveWithContext comprehensiveAPI comprehensiveApiContext
157
_ = serveWithContext comprehensiveAPI comprehensiveApiContext
61
_ = serveWithContext comprehensiveAPI comprehensiveApiContext
61
true
false
0
5
21
14
7
7
null
null
nevrenato/Hets_Fork
OWL2/XML.hs
gpl-2.0
-- | put an "f" for float if not there already (eg. 123.45 --> 123.45f) correctLit :: Literal -> Literal correctLit l = case l of Literal lf (Typed dt) -> let nlf = if isSuffixOf "float" (localPart dt) && last lf /= 'f' then lf ++ "f" else lf in Literal nlf (Typed dt)...
331
correctLit :: Literal -> Literal correctLit l = case l of Literal lf (Typed dt) -> let nlf = if isSuffixOf "float" (localPart dt) && last lf /= 'f' then lf ++ "f" else lf in Literal nlf (Typed dt) _ -> l
259
correctLit l = case l of Literal lf (Typed dt) -> let nlf = if isSuffixOf "float" (localPart dt) && last lf /= 'f' then lf ++ "f" else lf in Literal nlf (Typed dt) _ -> l
226
true
true
0
17
113
108
51
57
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
coVarDetails :: IdDetails coVarDetails = CoVarId
48
coVarDetails :: IdDetails coVarDetails = CoVarId
48
coVarDetails = CoVarId
22
false
true
0
4
5
11
6
5
null
null
NCrashed/PowerCom
src/powercom/Application/Layer.hs
gpl-3.0
userConnectHandler :: GuiApi -> (ProcessId, String, String) -> Process Bool userConnectHandler api (_, _, name) = do liftIO $ addUser api name return True -- | Handler for incoming remote disconnecting event.
219
userConnectHandler :: GuiApi -> (ProcessId, String, String) -> Process Bool userConnectHandler api (_, _, name) = do liftIO $ addUser api name return True -- | Handler for incoming remote disconnecting event.
219
userConnectHandler api (_, _, name) = do liftIO $ addUser api name return True -- | Handler for incoming remote disconnecting event.
143
false
true
0
9
42
69
34
35
null
null
merijn/GPU-benchmarks
benchmark-analysis/src/OptionParsers.hs
gpl-3.0
optionEnumerationHelp :: String -> [String] -> Doc optionEnumerationHelp metaVar names = preamble </> quoteValues names where preamble :: Doc preamble = reflow $ "The possible values of " <> metaVar <> " are" quote :: String -> Doc quote = Help.squotes . Help.string quoteValues :: [String] -> Do...
513
optionEnumerationHelp :: String -> [String] -> Doc optionEnumerationHelp metaVar names = preamble </> quoteValues names where preamble :: Doc preamble = reflow $ "The possible values of " <> metaVar <> " are" quote :: String -> Doc quote = Help.squotes . Help.string quoteValues :: [String] -> Do...
513
optionEnumerationHelp metaVar names = preamble </> quoteValues names where preamble :: Doc preamble = reflow $ "The possible values of " <> metaVar <> " are" quote :: String -> Doc quote = Help.squotes . Help.string quoteValues :: [String] -> Doc quoteValues l = case l of [] -> mempt...
462
false
true
0
12
130
181
91
90
null
null
rahulmutt/ghcvm
libraries/eta-meta/Language/Eta/Meta/PprLib.hs
bsd-3-clause
punctuate p (d:ds) = go d ds where go d' [] = [d'] go d' (e:es) = (d' <> p) : go e es
146
punctuate p (d:ds) = go d ds where go d' [] = [d'] go d' (e:es) = (d' <> p) : go e es
146
punctuate p (d:ds) = go d ds where go d' [] = [d'] go d' (e:es) = (d' <> p) : go e es
146
false
false
0
9
84
75
37
38
null
null
mbakke/ganeti
test/hs/Test/Ganeti/SlotMap.hs
bsd-2-clause
-- | Tests properties of `SlotMap`s being filled up. prop_occupySlots :: Property prop_occupySlots = forAll arbitrary $ \(sm :: SlotMap Int, cm :: CountMap Int) -> let smOcc = sm `occupySlots` cm in conjoin [ counterexample "input keys are preserved" $ all (`member` smOcc) (keyUnion sm c...
462
prop_occupySlots :: Property prop_occupySlots = forAll arbitrary $ \(sm :: SlotMap Int, cm :: CountMap Int) -> let smOcc = sm `occupySlots` cm in conjoin [ counterexample "input keys are preserved" $ all (`member` smOcc) (keyUnion sm cm) , counterexample "all keys must come from...
409
prop_occupySlots = forAll arbitrary $ \(sm :: SlotMap Int, cm :: CountMap Int) -> let smOcc = sm `occupySlots` cm in conjoin [ counterexample "input keys are preserved" $ all (`member` smOcc) (keyUnion sm cm) , counterexample "all keys must come from the input keys" $ ...
380
true
true
2
10
128
135
68
67
null
null
DavidAlphaFox/darcs
hashed-storage/Storage/Hashed/Plain.hs
gpl-2.0
readPlainDir :: FilePath -> IO [(FilePath, FileStatus)] readPlainDir dir = withCurrentDirectory dir $ do items <- getDirectoryContents "." sequence [ do st <- getFileStatus s return (s, st) | s <- items, s `notElem` [ ".", ".." ] ]
284
readPlainDir :: FilePath -> IO [(FilePath, FileStatus)] readPlainDir dir = withCurrentDirectory dir $ do items <- getDirectoryContents "." sequence [ do st <- getFileStatus s return (s, st) | s <- items, s `notElem` [ ".", ".." ] ]
284
readPlainDir dir = withCurrentDirectory dir $ do items <- getDirectoryContents "." sequence [ do st <- getFileStatus s return (s, st) | s <- items, s `notElem` [ ".", ".." ] ]
228
false
true
2
13
91
108
52
56
null
null
brendanhay/gogol
gogol-cloudprivatecatalog/gen/Network/Google/Resource/CloudPrivateCatalog/Folders/Products/Search.hs
mpl-2.0
-- | JSONP fpsCallback :: Lens' FoldersProductsSearch (Maybe Text) fpsCallback = lens _fpsCallback (\ s a -> s{_fpsCallback = a})
131
fpsCallback :: Lens' FoldersProductsSearch (Maybe Text) fpsCallback = lens _fpsCallback (\ s a -> s{_fpsCallback = a})
120
fpsCallback = lens _fpsCallback (\ s a -> s{_fpsCallback = a})
64
true
true
0
9
21
48
25
23
null
null
mikeplus64/plissken
src/OBJ.hs
gpl-3.0
parseUseMTL :: Parser ObjCommand parseUseMTL = do string "usemtl " UseMTL `fmap` A.takeTill isEndOfLine
111
parseUseMTL :: Parser ObjCommand parseUseMTL = do string "usemtl " UseMTL `fmap` A.takeTill isEndOfLine
111
parseUseMTL = do string "usemtl " UseMTL `fmap` A.takeTill isEndOfLine
78
false
true
0
9
21
34
16
18
null
null
NorfairKing/super-user-spark
app/Main.hs
mit
main :: IO () main = spark
26
main :: IO () main = spark
26
main = spark
12
false
true
0
6
6
16
8
8
null
null
PuZZleDucK/Hls
GOptions.hs
gpl-3.0
timeToFloat (GnuTime unit Minutes) = unit
41
timeToFloat (GnuTime unit Minutes) = unit
41
timeToFloat (GnuTime unit Minutes) = unit
41
false
false
0
7
5
17
8
9
null
null
dylanmc/cryptol
src/Cryptol/ModuleSystem/Base.hs
bsd-3-clause
renameExpr :: P.Expr -> ModuleM P.Expr renameExpr e = do env <- getFocusedEnv rename (R.namingEnv env) e -- NoPat ----------------------------------------------------------------------- -- | Run the noPat pass.
217
renameExpr :: P.Expr -> ModuleM P.Expr renameExpr e = do env <- getFocusedEnv rename (R.namingEnv env) e -- NoPat ----------------------------------------------------------------------- -- | Run the noPat pass.
217
renameExpr e = do env <- getFocusedEnv rename (R.namingEnv env) e -- NoPat ----------------------------------------------------------------------- -- | Run the noPat pass.
178
false
true
0
10
32
50
24
26
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/Permissions.hs
bsd-3-clause
cjoin :: CtxMonad m => m (m f) ctx -> m f ctx cjoin m = cbind m (\_ -> id)
74
cjoin :: CtxMonad m => m (m f) ctx -> m f ctx cjoin m = cbind m (\_ -> id)
74
cjoin m = cbind m (\_ -> id)
28
false
true
0
9
20
57
27
30
null
null
dambaev/hproxyrules
src/Data/HProxy/Session.hs
gpl-2.0
matchSessionRule' !helper@(MatchHelper{ matchedByGroupSID = Nothing}) !session@(ProxySession{ sessionGroupsSIDs = groupSIDs}) !rule@(Rule{ ruleSIDs = Nothing} ) = let !newhelper = helper{matchedByGroupSID = Just True} in matchSessionRule' newhelper session rule
291
matchSessionRule' !helper@(MatchHelper{ matchedByGroupSID = Nothing}) !session@(ProxySession{ sessionGroupsSIDs = groupSIDs}) !rule@(Rule{ ruleSIDs = Nothing} ) = let !newhelper = helper{matchedByGroupSID = Just True} in matchSessionRule' newhelper session rule
291
matchSessionRule' !helper@(MatchHelper{ matchedByGroupSID = Nothing}) !session@(ProxySession{ sessionGroupsSIDs = groupSIDs}) !rule@(Rule{ ruleSIDs = Nothing} ) = let !newhelper = helper{matchedByGroupSID = Just True} in matchSessionRule' newhelper session rule
291
false
false
2
11
56
96
49
47
null
null
dfordivam/lava
Lava/Property.hs
bsd-3-clause
zipWith7' f [] ys zs vs ws ps qs = zipWith7' f ["?"] ys zs vs ws ps qs
98
zipWith7' f [] ys zs vs ws ps qs = zipWith7' f ["?"] ys zs vs ws ps qs
98
zipWith7' f [] ys zs vs ws ps qs = zipWith7' f ["?"] ys zs vs ws ps qs
98
false
false
0
6
46
50
22
28
null
null
tranma/optparse-th
Options/Applicative/TH.hs
bsd-3-clause
optName :: Opt n -> Name optName (L x) = optName x
53
optName :: Opt n -> Name optName (L x) = optName x
53
optName (L x) = optName x
28
false
true
0
7
14
30
14
16
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/AudioContext.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createChannelMerger Mozilla AudioContext.createChannelMerger documentation> createChannelMerger_ :: (MonadDOM m, IsAudioContext self) => self -> Maybe Word -> m () createChannelMerger_ self numberOfInputs = liftDOM (void ...
418
createChannelMerger_ :: (MonadDOM m, IsAudioContext self) => self -> Maybe Word -> m () createChannelMerger_ self numberOfInputs = liftDOM (void ((toAudioContext self) ^. jsf "createChannelMerger" [toJSVal numberOfInputs]))
273
createChannelMerger_ self numberOfInputs = liftDOM (void ((toAudioContext self) ^. jsf "createChannelMerger" [toJSVal numberOfInputs]))
164
true
true
0
12
83
81
40
41
null
null
mystor/matrix-detex
MatrixDetex.hs
mit
main :: IO () main = do input <- getClipboard putStrLn $ "Got input: \n" ++ input ++ "\n" let result = parse wrappedMatrix "matrix" $ trim input case result of Left e -> putStrLn $ "Failed to parse input:\n" ++ show e Right mat -> do let s = wolfram $ cleanUp mat...
422
main :: IO () main = do input <- getClipboard putStrLn $ "Got input: \n" ++ input ++ "\n" let result = parse wrappedMatrix "matrix" $ trim input case result of Left e -> putStrLn $ "Failed to parse input:\n" ++ show e Right mat -> do let s = wolfram $ cleanUp mat...
422
main = do input <- getClipboard putStrLn $ "Got input: \n" ++ input ++ "\n" let result = parse wrappedMatrix "matrix" $ trim input case result of Left e -> putStrLn $ "Failed to parse input:\n" ++ show e Right mat -> do let s = wolfram $ cleanUp mat ...
408
false
true
0
16
151
134
58
76
null
null
rahulmutt/ghcvm
compiler/Eta/Main/DriverPhases.hs
bsd-3-clause
-- phaseInputExt JJava = "java" -- phaseInputExt JClass = "class" phaseInputExt Cc = "c"
132
phaseInputExt Cc = "c"
39
phaseInputExt Cc = "c"
39
true
false
0
4
57
12
6
6
null
null
jakespringer/loka
Server/src/Loka.hs
lgpl-3.0
checkMove (MovePiece (RookMove dir dist) (Piece x y Rook pieceColor)) state = isCardinal dir && checkCanTraverseBoard where checkCanTraverseBoard = canTraverseBoard (Piece x y Rook pieceColor) dir dist state
219
checkMove (MovePiece (RookMove dir dist) (Piece x y Rook pieceColor)) state = isCardinal dir && checkCanTraverseBoard where checkCanTraverseBoard = canTraverseBoard (Piece x y Rook pieceColor) dir dist state
219
checkMove (MovePiece (RookMove dir dist) (Piece x y Rook pieceColor)) state = isCardinal dir && checkCanTraverseBoard where checkCanTraverseBoard = canTraverseBoard (Piece x y Rook pieceColor) dir dist state
219
false
false
0
9
39
75
36
39
null
null
DavidRutqvist/ParserOperators-D7012E-Lab2
src/Expr.hs
bsd-3-clause
bldOp e (oper,e') = oper e e'
29
bldOp e (oper,e') = oper e e'
29
bldOp e (oper,e') = oper e e'
29
false
false
0
5
6
24
11
13
null
null
cgswords/Grift
Compiler/EnforceConventions.hs
mit
effects ((EIf test con alt):es) tail binds = do conLbl <- uniqueLabel "true" altLbl <- uniqueLabel "false" jmpLbl <- uniqueLabel "jump" let jmpTail = (TBegin [] $ TPrim $ L jmpLbl) (conBody, cbind) <- effects [con] jmpTail [] (altBody, abind) <- effects [alt] jmpTail [] (...
682
effects ((EIf test con alt):es) tail binds = do conLbl <- uniqueLabel "true" altLbl <- uniqueLabel "false" jmpLbl <- uniqueLabel "jump" let jmpTail = (TBegin [] $ TPrim $ L jmpLbl) (conBody, cbind) <- effects [con] jmpTail [] (altBody, abind) <- effects [alt] jmpTail [] (...
682
effects ((EIf test con alt):es) tail binds = do conLbl <- uniqueLabel "true" altLbl <- uniqueLabel "false" jmpLbl <- uniqueLabel "jump" let jmpTail = (TBegin [] $ TPrim $ L jmpLbl) (conBody, cbind) <- effects [con] jmpTail [] (altBody, abind) <- effects [alt] jmpTail [] (...
682
false
false
0
15
262
251
127
124
null
null
keithodulaigh/Hets
THF/PrintTHF.hs
gpl-2.0
prettyNameList :: NameList -> Doc prettyNameList = sepByCommas . map pretty
75
prettyNameList :: NameList -> Doc prettyNameList = sepByCommas . map pretty
75
prettyNameList = sepByCommas . map pretty
41
false
true
0
7
10
28
12
16
null
null
ezyang/ghc
compiler/specialise/Rules.hs
bsd-3-clause
{- Note [Where rules are found] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The rules for an Id come from two places: (a) the ones it is born with, stored inside the Id iself (idCoreRules fn), (b) rules added in other modules, stored in the global RuleBase (imp_rules) It's tempting to think that - LocalIds have only (a) ...
1,109
emptyRuleBase :: RuleBase emptyRuleBase = emptyNameEnv
54
emptyRuleBase = emptyNameEnv
28
true
true
0
6
339
20
9
11
null
null
brendanhay/gogol
gogol-searchconsole/gen/Network/Google/Resource/Webmasters/Searchanalytics/Query.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). sqUploadProtocol :: Lens' SearchanalyticsQuery (Maybe Text) sqUploadProtocol = lens _sqUploadProtocol (\ s a -> s{_sqUploadProtocol = a})
207
sqUploadProtocol :: Lens' SearchanalyticsQuery (Maybe Text) sqUploadProtocol = lens _sqUploadProtocol (\ s a -> s{_sqUploadProtocol = a})
145
sqUploadProtocol = lens _sqUploadProtocol (\ s a -> s{_sqUploadProtocol = a})
85
true
true
1
9
33
51
25
26
null
null
andorp/grin
grin/src/Reducer/LLVM/TypeGen.hs
bsd-3-clause
stringStructType :: LLVM.Type stringStructType = LLVM.StructureType False [ptr i8, i64]
87
stringStructType :: LLVM.Type stringStructType = LLVM.StructureType False [ptr i8, i64]
87
stringStructType = LLVM.StructureType False [ptr i8, i64]
57
false
true
0
7
9
29
15
14
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpHasSideEffects ReadByteArrayOp_Int = True
47
primOpHasSideEffects ReadByteArrayOp_Int = True
47
primOpHasSideEffects ReadByteArrayOp_Int = True
47
false
false
0
5
3
9
4
5
null
null
choener/BenchmarkHistory
BenchmarkHistory.hs
gpl-3.0
benchmark :: (NFData e, NFData a, NFData b) => Int -- ^ multiplicity of the benchmark run -> String -- ^ name of the benchmark file -> (a -> e) -- ^ environment generator (not benched) -> (e -> a -> b) -- ^ given environment, input, create output -> a -- ^ input -> I...
1,210
benchmark :: (NFData e, NFData a, NFData b) => Int -- ^ multiplicity of the benchmark run -> String -- ^ name of the benchmark file -> (a -> e) -- ^ environment generator (not benched) -> (e -> a -> b) -- ^ given environment, input, create output -> a -- ^ input -> I...
1,148
benchmark mul' file env fun x = do let mul = max 1 mul' dfe <- doesFileExist file (h,xs) <- if dfe then do BSL.readFile file >>= (return . either error (second V.toList) . decodeByName) else do return (V.empty,[]) :: IO (Header, [Stats]) time <- fmap zonedTimeToLocalTime getZonedTime...
817
true
true
0
18
319
469
225
244
null
null
hermish/courseography
app/Svg/Builder.hs
gpl-3.0
-- | Return shape tolerance according to type of shape. -- BoolNode is with 20.0 tolerance, which Node and Hybrid are with 9.0 tolerance. shapeTolerance :: Shape -> Double shapeTolerance s = case shapeType_ s of BoolNode -> 20.0 _ -> 9.0
247
shapeTolerance :: Shape -> Double shapeTolerance s = case shapeType_ s of BoolNode -> 20.0 _ -> 9.0
109
shapeTolerance s = case shapeType_ s of BoolNode -> 20.0 _ -> 9.0
75
true
true
0
7
51
39
20
19
null
null
mpitid/scheme48
src/Scheme48/Core.hs
mit
xtractValue :: ThrowsError a -> a extractValue (Right val) = val
65
extractValue :: ThrowsError a -> a extractValue (Right val) = val
65
extractValue (Right val) = val
30
false
true
0
7
11
27
13
14
null
null
opqdonut/nikls
test/Test.hs
gpl-3.0
prop_Sum_monoid :: Sum -> Property prop_Sum_monoid = monoid
59
prop_Sum_monoid :: Sum -> Property prop_Sum_monoid = monoid
59
prop_Sum_monoid = monoid
24
false
true
0
5
7
15
8
7
null
null
rahulmutt/ghcvm
libraries/base/GHC/Word.hs
bsd-3-clause
(W16# x) `geWord16` (W16# y) = isTrue# (x `geWord#` y)
54
(W16# x) `geWord16` (W16# y) = isTrue# (x `geWord#` y)
54
(W16# x) `geWord16` (W16# y) = isTrue# (x `geWord#` y)
54
false
false
0
7
9
38
20
18
null
null
ndmitchell/qed
v1/Simplify.hs
bsd-3-clause
cheap (Var _) = True
20
cheap (Var _) = True
20
cheap (Var _) = True
20
false
false
0
7
4
15
7
8
null
null
hdgarrood/bower-json
src/Web/Bower/PackageMeta/Internal.hs
mit
stripWrapper :: Text -> Text -> Text -> Maybe Text stripWrapper start end = T.stripPrefix start >>> fmap T.reverse >=> T.stripPrefix (T.reverse end) >>> fmap T.reverse
181
stripWrapper :: Text -> Text -> Text -> Maybe Text stripWrapper start end = T.stripPrefix start >>> fmap T.reverse >=> T.stripPrefix (T.reverse end) >>> fmap T.reverse
181
stripWrapper start end = T.stripPrefix start >>> fmap T.reverse >=> T.stripPrefix (T.reverse end) >>> fmap T.reverse
130
false
true
6
8
39
75
34
41
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrelNames.hs
bsd-3-clause
firstAName = varQual aRROW (fsLit "first") firstAIdKey
66
firstAName = varQual aRROW (fsLit "first") firstAIdKey
66
firstAName = varQual aRROW (fsLit "first") firstAIdKey
66
false
false
0
7
18
19
9
10
null
null
pacak/cuddly-bassoon
hashable-1.2.6.0/tests/Properties.hs
bsd-3-clause
-- | Content equality implies hash equality. pTextLazy :: TL.Text -> TL.Text -> Bool pTextLazy a b = if (a == b) then (hash a == hash b) else True
146
pTextLazy :: TL.Text -> TL.Text -> Bool pTextLazy a b = if (a == b) then (hash a == hash b) else True
101
pTextLazy a b = if (a == b) then (hash a == hash b) else True
61
true
true
0
8
29
57
30
27
null
null
silky/bibtexier
src/Text/BibTeX/Parse.hs
bsd-3-clause
braces, lexeme :: CharParser st a -> CharParser st a braces = T.braces lexer
76
braces, lexeme :: CharParser st a -> CharParser st a braces = T.braces lexer
76
braces = T.braces lexer
23
false
true
0
6
13
32
16
16
null
null
HIPERFIT/futhark
src/Futhark/IR/Primitive.hs
isc
-- | The size of a value of a given integer type in eight-bit bytes. intByteSize :: Num a => IntType -> a intByteSize Int8 = 1
126
intByteSize :: Num a => IntType -> a intByteSize Int8 = 1
57
intByteSize Int8 = 1
20
true
true
0
8
26
32
14
18
null
null
tonyday567/mvc-extended
src/Pipes/Extended.hs
mit
-- ----------------------------------------------------------------------------- branching pipes dupP :: (Monad m) => Pipe a (a, a) m r dupP = Pipes.map dup where dup a = (a, a)
183
dupP :: (Monad m) => Pipe a (a, a) m r dupP = Pipes.map dup where dup a = (a, a)
86
dupP = Pipes.map dup where dup a = (a, a)
47
true
true
1
8
30
66
32
34
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/Outputable.hs
bsd-3-clause
neverQualifyModules :: QueryQualifyModule neverQualifyModules _ = False
71
neverQualifyModules :: QueryQualifyModule neverQualifyModules _ = False
71
neverQualifyModules _ = False
29
false
true
0
5
6
14
7
7
null
null
k-bx/riak-haskell-client
protobuf/src/Network/Riak/Protocol/MapUpdate/FlagOp.hs
apache-2.0
toMaybe'Enum _ = Prelude'.Nothing
33
toMaybe'Enum _ = Prelude'.Nothing
33
toMaybe'Enum _ = Prelude'.Nothing
33
false
false
0
5
3
12
5
7
null
null
JakeWheat/Chaos-2010
Games/Chaos2010/Database/Fields.hs
bsd-3-clause
remaining_walk :: Remaining_walk remaining_walk = proxy
55
remaining_walk :: Remaining_walk remaining_walk = proxy
55
remaining_walk = proxy
22
false
true
0
4
5
11
6
5
null
null
andrewaguiar/s99-haskell
p17.hs
mit
lastPart :: Int -> [a] -> [a] lastPart _ [] = []
48
lastPart :: Int -> [a] -> [a] lastPart _ [] = []
48
lastPart _ [] = []
18
false
true
0
7
11
34
18
16
null
null
Tatsuki-I/Vihs
src/Delete.hs
apache-2.0
deleteLine :: [String] -> Int -> Int ->[String] deleteLine str line times | line <= length str && line >= 0 && line - 1 <= length str = take (line - 1) str ++ (reverse . take ...
533
deleteLine :: [String] -> Int -> Int ->[String] deleteLine str line times | line <= length str && line >= 0 && line - 1 <= length str = take (line - 1) str ++ (reverse . take ...
533
deleteLine str line times | line <= length str && line >= 0 && line - 1 <= length str = take (line - 1) str ++ (reverse . take (length str - line ...
471
false
true
0
15
346
132
64
68
null
null
krisajenkins/kashmir
src/Kashmir/Github/Api.hs
epl-1.0
postGithub :: (ToJSON a,FromJSON b) => Sitemap -> a -> ReaderT AccessToken IO b postGithub uri = postRaw (makeGithubUrl uri)
128
postGithub :: (ToJSON a,FromJSON b) => Sitemap -> a -> ReaderT AccessToken IO b postGithub uri = postRaw (makeGithubUrl uri)
128
postGithub uri = postRaw (makeGithubUrl uri)
44
false
true
0
9
23
57
27
30
null
null
akuraru/the_fun_of_programming
1_heap_tree/1.1_binary_heap_trees.hs
mit
join6 (Fork e l r) t = Fork e (merge l r) t
43
join6 (Fork e l r) t = Fork e (merge l r) t
43
join6 (Fork e l r) t = Fork e (merge l r) t
43
false
false
0
7
12
36
17
19
null
null
shepheb/hork
Hork/Objects.hs
bsd-3-clause
setAttr :: Word16 -> Word16 -> Hork () setAttr obj attr = handleAttr (const True) obj attr >> return ()
103
setAttr :: Word16 -> Word16 -> Hork () setAttr obj attr = handleAttr (const True) obj attr >> return ()
103
setAttr obj attr = handleAttr (const True) obj attr >> return ()
64
false
true
0
8
19
51
24
27
null
null