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
rueshyna/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Creates a value of 'UpdateShapePropertiesRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'usprObjectId' -- -- * 'usprShapeProperties' -- -- * 'usprFields' updateShapePropertiesRequest :: UpdateShapePropertiesRequest u...
484
updateShapePropertiesRequest :: UpdateShapePropertiesRequest updateShapePropertiesRequest = UpdateShapePropertiesRequest' { _usprObjectId = Nothing , _usprShapeProperties = Nothing , _usprFields = Nothing }
230
updateShapePropertiesRequest = UpdateShapePropertiesRequest' { _usprObjectId = Nothing , _usprShapeProperties = Nothing , _usprFields = Nothing }
165
true
true
0
6
84
40
28
12
null
null
advancedtelematic/quickcheck-state-machine-model
test/ProcessRegistry.hs
bsd-3-clause
ioKill :: Pid -> IO () ioKill pid = IORef.modifyIORef killedPidsRef (pid :)
77
ioKill :: Pid -> IO () ioKill pid = IORef.modifyIORef killedPidsRef (pid :)
77
ioKill pid = IORef.modifyIORef killedPidsRef (pid :)
54
false
true
0
7
14
34
17
17
null
null
jwiegley/github
src/GitHub/Data.hs
bsd-3-clause
fromUserId :: Id User -> Id Owner fromUserId = Id . untagId
59
fromUserId :: Id User -> Id Owner fromUserId = Id . untagId
59
fromUserId = Id . untagId
25
false
true
1
7
11
32
13
19
null
null
olsner/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
-- See Note [Kind-changing of (~) and Coercible] in libraries/ghc-prim/GHC/Types.hs coercibleTyConName, coercibleDataConName, coercibleSCSelIdName :: Name coercibleTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Coercible") coercibleTyConKey coercibleTyCon
275
coercibleTyConName, coercibleDataConName, coercibleSCSelIdName :: Name coercibleTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Coercible") coercibleTyConKey coercibleTyCon
191
coercibleTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Coercible") coercibleTyConKey coercibleTyCon
120
true
true
3
7
30
40
19
21
null
null
mikeizbicki/HerbiePlugin
test/Tests.hs
bsd-3-clause
example74 x y z = cos(sqrt(x*x+y*y+z*z))
40
example74 x y z = cos(sqrt(x*x+y*y+z*z))
40
example74 x y z = cos(sqrt(x*x+y*y+z*z))
40
false
false
0
13
5
45
22
23
null
null
rimmington/pipes-cliff
lib/Pipes/Cliff/Core.hs
bsd-3-clause
pipeInputOutputError :: ( MonadSafe mi, MonadCatch (Base mi), MonadSafe mo, MonadCatch (Base mo), MonadSafe me, MonadCatch (Base me)) => CreateProcess -> IO ( ( Consumer ByteString mi ExitCode , Producer ByteString mo ExitCode , Producer ByteString me ExitCode ) ...
706
pipeInputOutputError :: ( MonadSafe mi, MonadCatch (Base mi), MonadSafe mo, MonadCatch (Base mo), MonadSafe me, MonadCatch (Base me)) => CreateProcess -> IO ( ( Consumer ByteString mi ExitCode , Producer ByteString mo ExitCode , Producer ByteString me ExitCode ) ...
590
pipeInputOutputError cp = do pnl <- newProcessHandle Nothing Nothing Nothing cp let csmr = runInputHandle pnl pdcrOut = runOutputHandle Output pnl pdcrErr = runOutputHandle Error pnl return ((csmr, pdcrOut, pdcrErr), pnl)
241
true
true
0
11
184
190
95
95
null
null
spechub/Hets
OWL2/Parse.hs
gpl-2.0
iquery :: CharParser st String iquery = ifragment
49
iquery :: CharParser st String iquery = ifragment
49
iquery = ifragment
18
false
true
0
5
7
16
8
8
null
null
Undeterminant/taffybar
src/System/Taffybar/Widgets/Graph.hs
bsd-3-clause
renderGraph :: [Seq Double] -> GraphConfig -> Int -> Int -> Double -> C.Render () renderGraph hists cfg w h xStep = do renderFrameAndBackground cfg w h C.setLineWidth 0.1 let pad = fromIntegral $ graphPadding cfg let framePad = fromIntegral $ graphBorderWidth cfg -- Make the new origin be inside the frame ...
1,721
renderGraph :: [Seq Double] -> GraphConfig -> Int -> Int -> Double -> C.Render () renderGraph hists cfg w h xStep = do renderFrameAndBackground cfg w h C.setLineWidth 0.1 let pad = fromIntegral $ graphPadding cfg let framePad = fromIntegral $ graphBorderWidth cfg -- Make the new origin be inside the frame ...
1,721
renderGraph hists cfg w h xStep = do renderFrameAndBackground cfg w h C.setLineWidth 0.1 let pad = fromIntegral $ graphPadding cfg let framePad = fromIntegral $ graphBorderWidth cfg -- Make the new origin be inside the frame and then scale the -- drawing area so that all operations in terms of width and ...
1,639
false
true
0
20
530
538
254
284
null
null
kosmoskatten/ghost-lang
ghost-lang/test/GhostLang/InterpreterProps.hs
mit
patternName :: Pattern a -> Text patternName (Pattern _ name _ _) = name
72
patternName :: Pattern a -> Text patternName (Pattern _ name _ _) = name
72
patternName (Pattern _ name _ _) = name
39
false
true
0
7
13
33
16
17
null
null
tekul/cryptonite
Crypto/PubKey/RSA/PKCS15.hs
bsd-3-clause
unpad :: ByteArray bytearray => bytearray -> Either Error bytearray unpad packed | paddingSuccess = Right m | otherwise = Left MessageNotRecognized where (zt, ps0m) = B.splitAt 2 packed (ps, zm) = B.span (/= 0) ps0m (z, m) = B.splitAt 1 zm paddingSuccess = and'...
787
unpad :: ByteArray bytearray => bytearray -> Either Error bytearray unpad packed | paddingSuccess = Right m | otherwise = Left MessageNotRecognized where (zt, ps0m) = B.splitAt 2 packed (ps, zm) = B.span (/= 0) ps0m (z, m) = B.splitAt 1 zm paddingSuccess = and'...
787
unpad packed | paddingSuccess = Right m | otherwise = Left MessageNotRecognized where (zt, ps0m) = B.splitAt 2 packed (ps, zm) = B.span (/= 0) ps0m (z, m) = B.splitAt 1 zm paddingSuccess = and' [ zt `B.constEq` (B.pack [0,2] :: Bytes) ...
719
false
true
4
10
268
178
97
81
null
null
dbushenko/trurl
devrepo/servant/src/Lib.hs
bsd-3-clause
configFileName :: String configFileName = "application.conf"
60
configFileName :: String configFileName = "application.conf"
60
configFileName = "application.conf"
35
false
true
0
4
5
11
6
5
null
null
glguy/ssh-hans
src/Network/SSH/Mac.hs
bsd-3-clause
mac_umac_64 :: Named (L.ByteString -> Mac) mac_umac_64 = mk_umac UMAC.compute64 "umac-64@openssh.com" False
107
mac_umac_64 :: Named (L.ByteString -> Mac) mac_umac_64 = mk_umac UMAC.compute64 "umac-64@openssh.com" False
107
mac_umac_64 = mk_umac UMAC.compute64 "umac-64@openssh.com" False
64
false
true
0
8
11
32
16
16
null
null
csabahruska/quake3
game/Monads.hs
bsd-3-clause
runCollectMT :: Monad m => PureMT -> CollectMT m a -> m (Collected_Objects, PureMT) runCollectMT randGen collector = runRandT (execWriterT collector) randGen
157
runCollectMT :: Monad m => PureMT -> CollectMT m a -> m (Collected_Objects, PureMT) runCollectMT randGen collector = runRandT (execWriterT collector) randGen
157
runCollectMT randGen collector = runRandT (execWriterT collector) randGen
73
false
true
0
9
21
56
27
29
null
null
fpco/cabal
Cabal/Distribution/Simple/JHC.hs
bsd-3-clause
buildExe :: Verbosity -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () buildExe verbosity _pkg_descr lbi exe clbi = do let Just jhcProg = lookupProgram jhcProgram (withPrograms lbi) let exeBi = buildInfo exe let out = buildDir lbi </> exeNam...
477
buildExe :: Verbosity -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () buildExe verbosity _pkg_descr lbi exe clbi = do let Just jhcProg = lookupProgram jhcProgram (withPrograms lbi) let exeBi = buildInfo exe let out = buildDir lbi </> exeNam...
477
buildExe verbosity _pkg_descr lbi exe clbi = do let Just jhcProg = lookupProgram jhcProgram (withPrograms lbi) let exeBi = buildInfo exe let out = buildDir lbi </> exeName exe let args = constructJHCCmdLine lbi exeBi clbi (buildDir lbi) verbosity rawSystemProgram verbosity jhcProg (["-o",out] ++ args ++ [m...
335
false
true
0
12
104
161
75
86
null
null
HeinrichApfelmus/operational
doc/examples/LogicT.hs
bsd-3-clause
-- split in the base monad split :: Monad m => LogicT m a -> m (Maybe (a, LogicT m a)) split = eval <=< viewT where -- apply the laws for msplit eval :: Monad m => ProgramViewT (MPlus m) m a -> m (Maybe (a, LogicT m a)) eval (Return v) = return (Just (v, mzero)) eval (MZero :>>= k) = r...
881
split :: Monad m => LogicT m a -> m (Maybe (a, LogicT m a)) split = eval <=< viewT where -- apply the laws for msplit eval :: Monad m => ProgramViewT (MPlus m) m a -> m (Maybe (a, LogicT m a)) eval (Return v) = return (Just (v, mzero)) eval (MZero :>>= k) = return Nothing eval (MPlu...
853
split = eval <=< viewT where -- apply the laws for msplit eval :: Monad m => ProgramViewT (MPlus m) m a -> m (Maybe (a, LogicT m a)) eval (Return v) = return (Just (v, mzero)) eval (MZero :>>= k) = return Nothing eval (MPlus m n :>>= k) = do ma <- split (m >>= k) cas...
793
true
true
0
15
370
259
134
125
null
null
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Instances/Update.hs
mpl-2.0
-- | Creates a value of 'InstancesUpdate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'iuXgafv' -- -- * 'iuUploadProtocol' -- -- * 'iuProject' -- -- * 'iuAccessToken' -- -- * 'iuUploadType' -- -- * 'iuPayload' -- -- * 'iuCallback' ...
802
instancesUpdate :: Text -- ^ 'iuProject' -> DatabaseInstance -- ^ 'iuPayload' -> Text -- ^ 'iuInstance' -> InstancesUpdate instancesUpdate pIuProject_ pIuPayload_ pIuInstance_ = InstancesUpdate' { _iuXgafv = Nothing , _iuUploadProtocol = Nothing , _iuProject = pIuProject_ , _iuAccessTo...
461
instancesUpdate pIuProject_ pIuPayload_ pIuInstance_ = InstancesUpdate' { _iuXgafv = Nothing , _iuUploadProtocol = Nothing , _iuProject = pIuProject_ , _iuAccessToken = Nothing , _iuUploadType = Nothing , _iuPayload = pIuPayload_ , _iuCallback = Nothing , _iuInstance = pIuInstance_ ...
322
true
true
0
9
172
111
72
39
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/StopInstances.hs
mpl-2.0
-- | 'StopInstances' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'siDryRun' @::@ 'Maybe' 'Bool' -- -- * 'siForce' @::@ 'Maybe' 'Bool' -- -- * 'siInstanceIds' @::@ ['Text'] -- stopInstances :: StopInstances stopInstances = StopInstances { _siDryRun = Nothing , _siInsta...
372
stopInstances :: StopInstances stopInstances = StopInstances { _siDryRun = Nothing , _siInstanceIds = mempty , _siForce = Nothing }
158
stopInstances = StopInstances { _siDryRun = Nothing , _siInstanceIds = mempty , _siForce = Nothing }
127
true
true
0
7
79
45
30
15
null
null
arianvp/binary-serialise-cbor
bench/Macro/Load.hs
bsd-3-clause
runP :: LineNo -> String -> ReadP a -> String -> ParseResult a runP line fieldname p s = case [ x | (x,"") <- results ] of [a] -> ParseOk (utf8Warnings line fieldname s) a --TODO: what is this double parse thing all about? -- Can't we just do the all isSpace test the first time? [] -> case [ x |...
672
runP :: LineNo -> String -> ReadP a -> String -> ParseResult a runP line fieldname p s = case [ x | (x,"") <- results ] of [a] -> ParseOk (utf8Warnings line fieldname s) a --TODO: what is this double parse thing all about? -- Can't we just do the all isSpace test the first time? [] -> case [ x |...
672
runP line fieldname p s = case [ x | (x,"") <- results ] of [a] -> ParseOk (utf8Warnings line fieldname s) a --TODO: what is this double parse thing all about? -- Can't we just do the all isSpace test the first time? [] -> case [ x | (x,ys) <- results, all isSpace ys ] of [a] -> Par...
609
false
true
1
13
185
225
111
114
null
null
mitchellwrosen/hive
app/Hive/Impl/Console/WebSocketClientMain.hs
bsd-3-clause
main = undefined
16
main = undefined
16
main = undefined
16
false
false
0
4
2
6
3
3
null
null
fpco/statistics
Statistics/Matrix.hs
bsd-2-clause
-- | Given row and column numbers, calculate the offset into the flat -- row-major vector. bounds :: (Vector -> Int -> r) -> Matrix -> Int -> Int -> r bounds k (Matrix rs cs _ v) r c | r < 0 || r >= rs = error "row out of bounds" | c < 0 || c >= cs = error "column out of bounds" | otherwise = k v $! r * cs...
324
bounds :: (Vector -> Int -> r) -> Matrix -> Int -> Int -> r bounds k (Matrix rs cs _ v) r c | r < 0 || r >= rs = error "row out of bounds" | c < 0 || c >= cs = error "column out of bounds" | otherwise = k v $! r * cs + c
233
bounds k (Matrix rs cs _ v) r c | r < 0 || r >= rs = error "row out of bounds" | c < 0 || c >= cs = error "column out of bounds" | otherwise = k v $! r * cs + c
173
true
true
1
10
91
131
64
67
null
null
dennis84/collab-haskell
test/Collab/Test/FunctionalTests.hs
mit
loopA conn = do (event, _, _) <- parseMessage <$> receiveData conn print $ "Client A: " ++ unpack event loopA conn
120
loopA conn = do (event, _, _) <- parseMessage <$> receiveData conn print $ "Client A: " ++ unpack event loopA conn
120
loopA conn = do (event, _, _) <- parseMessage <$> receiveData conn print $ "Client A: " ++ unpack event loopA conn
120
false
false
0
9
27
52
24
28
null
null
vincenthz/cabal-browser
Browser.hs
bsd-3-clause
modelRefresh model l = treeStoreInsertForest model [] 0 l
57
modelRefresh model l = treeStoreInsertForest model [] 0 l
57
modelRefresh model l = treeStoreInsertForest model [] 0 l
57
false
false
0
6
8
22
10
12
null
null
keera-studios/hsQt
Qtc/Gui/QAbstractSlider.hs
bsd-2-clause
qAbstractSlider_deleteLater :: QAbstractSlider a -> IO () qAbstractSlider_deleteLater x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QAbstractSlider_deleteLater cobj_x0
167
qAbstractSlider_deleteLater :: QAbstractSlider a -> IO () qAbstractSlider_deleteLater x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QAbstractSlider_deleteLater cobj_x0
167
qAbstractSlider_deleteLater x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QAbstractSlider_deleteLater cobj_x0
109
false
true
0
7
22
41
19
22
null
null
ocean0yohsuke/deepcontrol
DeepControl/Applicative.hs
bsd-3-clause
(|--***) :: (Applicative f1, Applicative f2, Applicative f3, Applicative f4, Applicative f5) => f1 (f2 (f3 (f4 (f5 (a -> b))))) -> f1 (f2 a) -> f1 (f2 (f3 (f4 (f5 b)))) f |--*** x = f |*>>>>> (--***) x
201
(|--***) :: (Applicative f1, Applicative f2, Applicative f3, Applicative f4, Applicative f5) => f1 (f2 (f3 (f4 (f5 (a -> b))))) -> f1 (f2 a) -> f1 (f2 (f3 (f4 (f5 b)))) f |--*** x = f |*>>>>> (--***) x
201
f |--*** x = f |*>>>>> (--***) x
32
false
true
0
18
39
139
70
69
null
null
owickstrom/websub
src/Network/HTTP/WebSub/Subscriber.hs
mpl-2.0
removePending :: Subscriptions c -> SubscriptionId -> IO () removePending subscriptions subscriptionId = modifyMVar_ (pending subscriptions) (return . HM.delete subscriptionId)
178
removePending :: Subscriptions c -> SubscriptionId -> IO () removePending subscriptions subscriptionId = modifyMVar_ (pending subscriptions) (return . HM.delete subscriptionId)
178
removePending subscriptions subscriptionId = modifyMVar_ (pending subscriptions) (return . HM.delete subscriptionId)
118
false
true
0
9
21
55
26
29
null
null
atodorov/bdcs
src/BDCS/Exceptions.hs
lgpl-2.1
isBadNameException _ = False
38
isBadNameException _ = False
38
isBadNameException _ = False
38
false
false
0
4
13
10
4
6
null
null
phischu/fragnix
builtins/ghc-prim/GHC.PrimopWrappers.hs
bsd-3-clause
indexFloatArray# :: ByteArray# -> Int# -> Float# indexFloatArray# a1 a2 = (GHC.Prim.indexFloatArray#) a1 a2
107
indexFloatArray# :: ByteArray# -> Int# -> Float# indexFloatArray# a1 a2 = (GHC.Prim.indexFloatArray#) a1 a2
107
indexFloatArray# a1 a2 = (GHC.Prim.indexFloatArray#) a1 a2
58
false
true
0
7
13
35
18
17
null
null
transtone/transconfig
.xmonad/xmonad.hs
mit
myHiddenCornerColor = "#DC322F"
41
myHiddenCornerColor = "#DC322F"
41
myHiddenCornerColor = "#DC322F"
41
false
false
0
4
12
6
3
3
null
null
ryakad/rock-paper-scissors
RockPaperScissors.hs
mit
convertMove :: Char -> Move convertMove x | x `elem` "Rr" = Rock | x `elem` "Pp" = Paper | x `elem` "Ss" = Scissors
127
convertMove :: Char -> Move convertMove x | x `elem` "Rr" = Rock | x `elem` "Pp" = Paper | x `elem` "Ss" = Scissors
127
convertMove x | x `elem` "Rr" = Rock | x `elem` "Pp" = Paper | x `elem` "Ss" = Scissors
99
false
true
0
8
36
70
34
36
null
null
davidlazar/PCPL
src/Language/PCPL/Solver.hs
mit
updateConf :: Configuration -> Domino -> Maybe Configuration updateConf (Top ts) (Domino xs ys) = reconfigure (Top $ ts ++ xs) (Bottom ys)
138
updateConf :: Configuration -> Domino -> Maybe Configuration updateConf (Top ts) (Domino xs ys) = reconfigure (Top $ ts ++ xs) (Bottom ys)
138
updateConf (Top ts) (Domino xs ys) = reconfigure (Top $ ts ++ xs) (Bottom ys)
77
false
true
0
8
22
63
31
32
null
null
Javran/misc
gaussian-elim/test/ParserSpec.hs
mit
spec :: Spec spec = describe "fromRawString" $ do specify "example (square 4)" $ fromRawString (unlines [ "4" , "square 4" , "3 1 3 2" , "0 0 3 3" , "3 2 3 0" , "3 0 2 0" ]) `shouldBe` Just Puzzle ...
1,249
spec :: Spec spec = describe "fromRawString" $ do specify "example (square 4)" $ fromRawString (unlines [ "4" , "square 4" , "3 1 3 2" , "0 0 3 3" , "3 2 3 0" , "3 0 2 0" ]) `shouldBe` Just Puzzle ...
1,249
spec = describe "fromRawString" $ do specify "example (square 4)" $ fromRawString (unlines [ "4" , "square 4" , "3 1 3 2" , "0 0 3 3" , "3 2 3 0" , "3 0 2 0" ]) `shouldBe` Just Puzzle { opMod =...
1,236
false
true
0
13
761
357
221
136
null
null
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/SqlValue.hs
mit
{- | Attempts to decode a 'SqlValue' as a Haskell 'Int32' value. If decoding fails 'Nothing' is returned. -} toInt32 :: SqlValue -> Either String Int32 toInt32 = toParsedValue (AttoB8.signed AttoB8.decimal)
212
toInt32 :: SqlValue -> Either String Int32 toInt32 = toParsedValue (AttoB8.signed AttoB8.decimal)
99
toInt32 = toParsedValue (AttoB8.signed AttoB8.decimal)
56
true
true
0
8
36
40
18
22
null
null
vladimir-ipatov/ganeti
src/Ganeti/Query/Job.hs
gpl-2.0
-- | The node fields map. fieldsMap :: FieldMap JobId RuntimeData fieldsMap = Map.fromList $ map (\v@(f, _, _) -> (fdefName f, v)) jobFields
142
fieldsMap :: FieldMap JobId RuntimeData fieldsMap = Map.fromList $ map (\v@(f, _, _) -> (fdefName f, v)) jobFields
116
fieldsMap = Map.fromList $ map (\v@(f, _, _) -> (fdefName f, v)) jobFields
76
true
true
0
10
25
57
32
25
null
null
andrewcchen/matasano-cryptopals-solutions
set1/Challange7.hs
bsd-3-clause
main = do putStrLn "=== Challange7 ===" handle <- openFile "7.txt" ReadMode enc <- fmap (base64Decode . filter (/= '\n')) $ hGetContents handle putStr $ vecToStr $ decryptECB (strToVec "YELLOW SUBMARINE") enc
212
main = do putStrLn "=== Challange7 ===" handle <- openFile "7.txt" ReadMode enc <- fmap (base64Decode . filter (/= '\n')) $ hGetContents handle putStr $ vecToStr $ decryptECB (strToVec "YELLOW SUBMARINE") enc
212
main = do putStrLn "=== Challange7 ===" handle <- openFile "7.txt" ReadMode enc <- fmap (base64Decode . filter (/= '\n')) $ hGetContents handle putStr $ vecToStr $ decryptECB (strToVec "YELLOW SUBMARINE") enc
212
false
false
1
14
35
81
35
46
null
null
alphalambda/codeworld
funblocks-client/src/Blocks/Printer.hs
apache-2.0
run mon = let (_,PrintState (_,_,ans)) = S.runState mon (PrintState (0,[],"")) in ans
85
run mon = let (_,PrintState (_,_,ans)) = S.runState mon (PrintState (0,[],"")) in ans
85
run mon = let (_,PrintState (_,_,ans)) = S.runState mon (PrintState (0,[],"")) in ans
85
false
false
0
13
12
63
33
30
null
null
bjpop/blip
blipcompiler/src/Blip/Compiler/Utils.hs
bsd-3-clause
spanToScopeIdentifier (SpanMultiLine {..}) = (span_start_row, span_start_column, span_end_row, span_end_column)
114
spanToScopeIdentifier (SpanMultiLine {..}) = (span_start_row, span_start_column, span_end_row, span_end_column)
114
spanToScopeIdentifier (SpanMultiLine {..}) = (span_start_row, span_start_column, span_end_row, span_end_column)
114
false
false
0
8
10
30
17
13
null
null
ghorn/dynobud
dynobud-typevecs/src/Dyno/TypeVecs.hs
lgpl-3.0
mkVec' :: KnownNat n => [a] -> Vec n a mkVec' = devectorize . V.fromList
72
mkVec' :: KnownNat n => [a] -> Vec n a mkVec' = devectorize . V.fromList
72
mkVec' = devectorize . V.fromList
33
false
true
0
8
14
42
19
23
null
null
kawu/earley-facile
src/NLP/EarleyFacile/GrammarParser.hs
bsd-2-clause
parseElem x@(c:_) = Just $ if C.isUpper c then Left x else Right x
68
parseElem x@(c:_) = Just $ if C.isUpper c then Left x else Right x
68
parseElem x@(c:_) = Just $ if C.isUpper c then Left x else Right x
68
false
false
0
8
15
42
21
21
null
null
matteosister/haskell-exercises
List3.hs
mit
-- 21 insertAt :: a -> [a] -> Int -> [a] insertAt _ _ 0 = error "0 is not a valid position"
93
insertAt :: a -> [a] -> Int -> [a] insertAt _ _ 0 = error "0 is not a valid position"
85
insertAt _ _ 0 = error "0 is not a valid position"
50
true
true
4
10
24
49
24
25
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
fakeOpMasterTurnup :: String fakeOpMasterTurnup = "OP_CLUSTER_IP_TURNUP"
72
fakeOpMasterTurnup :: String fakeOpMasterTurnup = "OP_CLUSTER_IP_TURNUP"
72
fakeOpMasterTurnup = "OP_CLUSTER_IP_TURNUP"
43
false
true
0
6
5
18
7
11
null
null
george-steel/maxent-learner
maxent-learner-hw/src/Text/PhonotacticLearner/MaxentGrammar.hs
gpl-2.0
-- | Retrieve length distribution as a normalized probability mass function. Probabilities add up to 1. lengthPdf :: Lexicon sigma -> [(Length, Double)] lengthPdf wfs = assocs . fmap fracOfTotal . lengthFreqs $ wfs where fracOfTotal k = fromIntegral k / fromIntegral (totalWords wfs)
287
lengthPdf :: Lexicon sigma -> [(Length, Double)] lengthPdf wfs = assocs . fmap fracOfTotal . lengthFreqs $ wfs where fracOfTotal k = fromIntegral k / fromIntegral (totalWords wfs)
183
lengthPdf wfs = assocs . fmap fracOfTotal . lengthFreqs $ wfs where fracOfTotal k = fromIntegral k / fromIntegral (totalWords wfs)
134
true
true
0
8
47
72
36
36
null
null
ssaavedra/liquidhaskell
tests/pos/Product.hs
bsd-3-clause
zipWith f (x:xs) (y:ys) = f x y : zipWith f xs ys
49
zipWith f (x:xs) (y:ys) = f x y : zipWith f xs ys
49
zipWith f (x:xs) (y:ys) = f x y : zipWith f xs ys
49
false
false
0
7
12
43
21
22
null
null
rranelli/rrfuncprog
week4/lab.hs
unlicense
ex6 = sum $ squares' 10 0
25
ex6 = sum $ squares' 10 0
25
ex6 = sum $ squares' 10 0
25
false
false
1
6
6
18
7
11
null
null
three/codeworld
codeworld-server/src/Main.hs
apache-2.0
loadProjectHandler :: ClientId -> Snap () loadProjectHandler clientId = do mode <- getBuildMode user <- getUser clientId Just name <- getParam "name" let projectName = T.decodeUtf8 name let projectId = nameToProjectId projectName Just path <- fmap (splitDirectories . BC.unpack) <$> get...
660
loadProjectHandler :: ClientId -> Snap () loadProjectHandler clientId = do mode <- getBuildMode user <- getUser clientId Just name <- getParam "name" let projectName = T.decodeUtf8 name let projectId = nameToProjectId projectName Just path <- fmap (splitDirectories . BC.unpack) <$> get...
660
loadProjectHandler clientId = do mode <- getBuildMode user <- getUser clientId Just name <- getParam "name" let projectName = T.decodeUtf8 name let projectId = nameToProjectId projectName Just path <- fmap (splitDirectories . BC.unpack) <$> getParam "path" let dirIds = map (nameToD...
618
false
true
0
14
141
218
96
122
null
null
anton-k/language-css
src/Language/Css/Build/Idents.hs
bsd-3-clause
-- | max-height maxHeight :: Idents a => a maxHeight = ident "max-height"
73
maxHeight :: Idents a => a maxHeight = ident "max-height"
57
maxHeight = ident "max-height"
30
true
true
0
6
12
22
11
11
null
null
abakst/liquidhaskell
benchmarks/icfp15/neg/DataBase.hs
bsd-3-clause
{-@ assume (Prelude.++) :: xs:[a] -> ys:[a] -> {v:[a] | listElts v = Set_cup (listElts xs) (listElts ys)} @-} {-@ assume elem :: x:a -> xs:[a] -> {v:Bool | Prop v <=> Set_mem x (listElts xs)} @-} elem :: a -> [a] -> Bool elem = undefined
238
elem :: a -> [a] -> Bool elem = undefined
41
elem = undefined
16
true
true
0
7
47
24
14
10
null
null
isomorphism/hackage2
Distribution/Server/Features/BuildReports/BuildReports.hs
bsd-3-clause
setBuildLog :: PackageId -> BuildReportId -> Maybe BuildLog -> BuildReports -> Maybe BuildReports setBuildLog pkgid reportId buildLog buildReports = case Map.lookup pkgid (reportsIndex buildReports) of Nothing -> Nothing Just pkgReports -> case Map.lookup reportId (reports pkgReports) of Nothing -> Noth...
621
setBuildLog :: PackageId -> BuildReportId -> Maybe BuildLog -> BuildReports -> Maybe BuildReports setBuildLog pkgid reportId buildLog buildReports = case Map.lookup pkgid (reportsIndex buildReports) of Nothing -> Nothing Just pkgReports -> case Map.lookup reportId (reports pkgReports) of Nothing -> Noth...
621
setBuildLog pkgid reportId buildLog buildReports = case Map.lookup pkgid (reportsIndex buildReports) of Nothing -> Nothing Just pkgReports -> case Map.lookup reportId (reports pkgReports) of Nothing -> Nothing Just (rlog, _) -> let pkgReports' = pkgReports { reports = Map.insert reportId (rlog, ...
523
false
true
2
16
125
185
92
93
null
null
brendanhay/gogol
gogol-bigquerydatatransfer/gen/Network/Google/BigQueryDataTransfer/Types/Product.hs
mpl-2.0
-- | Specific run_time for a transfer run to be started. The -- requested_run_time must not be in the future. smtrrRequestedRunTime :: Lens' StartManualTransferRunsRequest (Maybe UTCTime) smtrrRequestedRunTime = lens _smtrrRequestedRunTime (\ s a -> s{_smtrrRequestedRunTime = a}) . mapping _DateTime
314
smtrrRequestedRunTime :: Lens' StartManualTransferRunsRequest (Maybe UTCTime) smtrrRequestedRunTime = lens _smtrrRequestedRunTime (\ s a -> s{_smtrrRequestedRunTime = a}) . mapping _DateTime
204
smtrrRequestedRunTime = lens _smtrrRequestedRunTime (\ s a -> s{_smtrrRequestedRunTime = a}) . mapping _DateTime
126
true
true
1
8
53
58
29
29
null
null
lpeterse/koka
src/Core/GenDoc.hs
apache-2.0
subTOC fmts = doctag "ul" "toc" $ concat fmts
53
subTOC fmts = doctag "ul" "toc" $ concat fmts
53
subTOC fmts = doctag "ul" "toc" $ concat fmts
53
false
false
0
6
16
21
9
12
null
null
ntc2/cryptol
src/Cryptol/Symbolic/Prims.hs
bsd-3-clause
replicateV n _ x = VSeq False (genericReplicate n x)
71
replicateV n _ x = VSeq False (genericReplicate n x)
71
replicateV n _ x = VSeq False (genericReplicate n x)
71
false
false
0
7
28
26
12
14
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
plus_RDR = varQual_RDR gHC_NUM (fsLit "+")
57
plus_RDR = varQual_RDR gHC_NUM (fsLit "+")
57
plus_RDR = varQual_RDR gHC_NUM (fsLit "+")
57
false
false
0
7
20
17
8
9
null
null
bitemyapp/ganeti
src/Ganeti/Objects.hs
bsd-2-clause
-- | Converts an address into its ordinal number. -- This is needed for indexing IP adresses in reservation pools. ip4AddressToNumber :: Ip4Address -> Integer ip4AddressToNumber = foldl (\n i -> 256 * n + toInteger i) 0 . ip4AddressToList
238
ip4AddressToNumber :: Ip4Address -> Integer ip4AddressToNumber = foldl (\n i -> 256 * n + toInteger i) 0 . ip4AddressToList
123
ip4AddressToNumber = foldl (\n i -> 256 * n + toInteger i) 0 . ip4AddressToList
79
true
true
0
10
39
47
25
22
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VGN.runPrim' vgn_runPrim = VGN.runPrim
43
vgn_runPrim = VGN.runPrim
25
vgn_runPrim = VGN.runPrim
25
true
false
0
5
4
9
5
4
null
null
z0isch/advent-of-code
src/Day7.hs
bsd-3-clause
partOne = do m <- input return $ eval m "a"
47
partOne = do m <- input return $ eval m "a"
47
partOne = do m <- input return $ eval m "a"
47
false
false
1
9
14
29
11
18
null
null
distillation/language-core
Language/Core/Syntax.hs
gpl-3.0
shift i d (Tuple es) = Tuple (map (shift i d) es)
49
shift i d (Tuple es) = Tuple (map (shift i d) es)
49
shift i d (Tuple es) = Tuple (map (shift i d) es)
49
false
false
0
9
11
40
18
22
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
mz2TankMachinegun16 = 19 :: Int
31
mz2TankMachinegun16 = 19 :: Int
31
mz2TankMachinegun16 = 19 :: Int
31
false
false
0
4
4
9
5
4
null
null
haskell/haddock
haddock-api/src/Haddock/Interface/AttachInstances.hs
bsd-2-clause
-- | We say that an instance is «hidden» iff its class or any (part) -- of its type(s) is hidden. isInstanceHidden :: ExportInfo -> Class -> [Type] -> Bool isInstanceHidden expInfo cls tys = instClassHidden || instTypeHidden where instClassHidden :: Bool instClassHidden = isNameHidden expInfo $ getName cl...
401
isInstanceHidden :: ExportInfo -> Class -> [Type] -> Bool isInstanceHidden expInfo cls tys = instClassHidden || instTypeHidden where instClassHidden :: Bool instClassHidden = isNameHidden expInfo $ getName cls instTypeHidden :: Bool instTypeHidden = any (isTypeHidden expInfo) tys
303
isInstanceHidden expInfo cls tys = instClassHidden || instTypeHidden where instClassHidden :: Bool instClassHidden = isNameHidden expInfo $ getName cls instTypeHidden :: Bool instTypeHidden = any (isTypeHidden expInfo) tys
245
true
true
3
8
80
85
43
42
null
null
budgefeeney/amixtureofmusings
Site/Index.hs
gpl-3.0
indexPageUrl :: Int -> FilePath indexPageUrl 1 = "/index.html"
62
indexPageUrl :: Int -> FilePath indexPageUrl 1 = "/index.html"
62
indexPageUrl 1 = "/index.html"
30
false
true
0
5
8
18
9
9
null
null
emilaxelsson/ag-graph
examples/TypeInf.hs
bsd-3-clause
typeInf' env (LitI _) = Just IntType
56
typeInf' env (LitI _) = Just IntType
56
typeInf' env (LitI _) = Just IntType
56
false
false
0
6
26
22
9
13
null
null
m4lvin/HasCacBDD
Setup.hs
gpl-2.0
copyExtLib :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO () copyExtLib _ flags pkg_descr lbi = do let libPref = libdir . absoluteInstallDirs pkg_descr lbi . fromFlag . copyDest $ flags let verbosity = fromFlag $ copyVerbosity flags installExecutableFile v...
372
copyExtLib :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO () copyExtLib _ flags pkg_descr lbi = do let libPref = libdir . absoluteInstallDirs pkg_descr lbi . fromFlag . copyDest $ flags let verbosity = fromFlag $ copyVerbosity flags installExecutableFile v...
372
copyExtLib _ flags pkg_descr lbi = do let libPref = libdir . absoluteInstallDirs pkg_descr lbi . fromFlag . copyDest $ flags let verbosity = fromFlag $ copyVerbosity flags installExecutableFile verbosity "c/libCacBDD.a" (libPref ++ "/libCacBDD.a")
291
false
true
0
14
89
104
49
55
null
null
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/Create.hs
mpl-2.0
-- | V1 error format. pidcXgafv :: Lens' ProjectsInstancesDatabasesCreate (Maybe Xgafv) pidcXgafv = lens _pidcXgafv (\ s a -> s{_pidcXgafv = a})
146
pidcXgafv :: Lens' ProjectsInstancesDatabasesCreate (Maybe Xgafv) pidcXgafv = lens _pidcXgafv (\ s a -> s{_pidcXgafv = a})
124
pidcXgafv = lens _pidcXgafv (\ s a -> s{_pidcXgafv = a})
58
true
true
0
9
23
48
25
23
null
null
andrewMacmurray/haskell-book-solutions
src/ch6/excercises.hs
mit
-- jung :: Ord a => [a] -> a jung :: [Int] -> Int jung xs = head $ sort xs
74
jung :: [Int] -> Int jung xs = head $ sort xs
45
jung xs = head $ sort xs
24
true
true
0
6
20
32
16
16
null
null
yav/smtLib
src/SMTLib1/AST.hs
mit
logic :: Ident -> Command logic = CmdLogic
42
logic :: Ident -> Command logic = CmdLogic
42
logic = CmdLogic
16
false
true
0
7
7
22
9
13
null
null
noteed/concepted
Concepted/State.hs
bsd-3-clause
nail :: MonadState s m => GN s a -> a -> m () nail (_, f) = modify . flip f
75
nail :: MonadState s m => GN s a -> a -> m () nail (_, f) = modify . flip f
75
nail (_, f) = modify . flip f
29
false
true
0
9
21
54
26
28
null
null
imuli/treehash
perf/Blake2s1.hs
unlicense
main :: IO () main = do start <- getCurrentTime print $ getHash n zero end <- getCurrentTime let sec :: Float sec = realToFrac (diffUTCTime end start) khps :: Float khps = (fromIntegral n) / (sec * 1000) mbps :: Float mbps = 64 * khps / 1000 in putStr $ (show khps) ++ "KH/s (" +...
347
main :: IO () main = do start <- getCurrentTime print $ getHash n zero end <- getCurrentTime let sec :: Float sec = realToFrac (diffUTCTime end start) khps :: Float khps = (fromIntegral n) / (sec * 1000) mbps :: Float mbps = 64 * khps / 1000 in putStr $ (show khps) ++ "KH/s (" +...
347
main = do start <- getCurrentTime print $ getHash n zero end <- getCurrentTime let sec :: Float sec = realToFrac (diffUTCTime end start) khps :: Float khps = (fromIntegral n) / (sec * 1000) mbps :: Float mbps = 64 * khps / 1000 in putStr $ (show khps) ++ "KH/s (" ++ (show mbps) ...
333
false
true
0
14
103
145
72
73
null
null
da-x/lamdu
Lamdu/GUI/VersionControl.hs
gpl-3.0
choiceWidgetConfig :: VersionControl.Config -> Anim.Layer -> Choice.Config choiceWidgetConfig VersionControl.Config{..} choiceBGLayer = Choice.Config { Choice.cwcFDConfig = FocusDelegator.Config { FocusDelegator.focusChildKeys = [ModKey mempty GLFW.Key'Enter] , FocusDelegator.focusChildDoc =...
669
choiceWidgetConfig :: VersionControl.Config -> Anim.Layer -> Choice.Config choiceWidgetConfig VersionControl.Config{..} choiceBGLayer = Choice.Config { Choice.cwcFDConfig = FocusDelegator.Config { FocusDelegator.focusChildKeys = [ModKey mempty GLFW.Key'Enter] , FocusDelegator.focusChildDoc =...
669
choiceWidgetConfig VersionControl.Config{..} choiceBGLayer = Choice.Config { Choice.cwcFDConfig = FocusDelegator.Config { FocusDelegator.focusChildKeys = [ModKey mempty GLFW.Key'Enter] , FocusDelegator.focusChildDoc = E.Doc ["Branches", "Select"] , FocusDelegator.focusParentKeys = [M...
594
false
true
0
12
123
163
89
74
null
null
bixuanzju/fcore
lib/BackEnd.hs
bsd-2-clause
-- adaptUnbox :: forall (m :: * -> *) t t1. -- (t -> t1 -> UnboxTranslate m) -> t -> t1 -> Translate m -- adaptUnbox mix' this super = toUT $ mix' this super -- Stack + Apply + Naive stackApplyNew :: (MonadState Int m, MonadReader Int m, MonadReader Bool m, MonadReader OB.InitVars m) => ApplyOptTranslat...
390
stackApplyNew :: (MonadState Int m, MonadReader Int m, MonadReader Bool m, MonadReader OB.InitVars m) => ApplyOptTranslate m stackApplyNew = new ((transAS <.> adaptStack transSA) $> OB.trans)
191
stackApplyNew = new ((transAS <.> adaptStack transSA) $> OB.trans)
66
true
true
0
10
83
83
42
41
null
null
bos/statistics
dense-linear-algebra/src/Statistics/Matrix/Function.hs
bsd-2-clause
-- | Multiply a number by itself. square :: Double -> Double square x = x * x
77
square :: Double -> Double square x = x * x
43
square x = x * x
16
true
true
1
7
17
30
13
17
null
null
Numberartificial/workflow
snipets/.stack-work/intero/intero30430pB0.hs
mit
ins' x l@(y:ys) | x <= y = x:l | otherwise = y: (ins' x ys)
64
ins' x l@(y:ys) | x <= y = x:l | otherwise = y: (ins' x ys)
64
ins' x l@(y:ys) | x <= y = x:l | otherwise = y: (ins' x ys)
64
false
false
1
8
20
55
27
28
null
null
graninas/Haskell-Algorithms
Programs/GameOfLifeComonad/Universe.hs
gpl-3.0
takeRange :: (Int, Int) -> Universe a -> [a] takeRange (a, b) (Universe v _) | a < 0 = V.toList $ V.slice (1 - a) (b - a + 1) v
128
takeRange :: (Int, Int) -> Universe a -> [a] takeRange (a, b) (Universe v _) | a < 0 = V.toList $ V.slice (1 - a) (b - a + 1) v
128
takeRange (a, b) (Universe v _) | a < 0 = V.toList $ V.slice (1 - a) (b - a + 1) v
83
false
true
0
10
32
93
48
45
null
null
da-x/lamdu
test/InferTests.hs
gpl-3.0
getFieldTests = testGroup "GetField tests" [ testGroup "missing fields" [ let isExpectedError InferErr.TypesDoNotUnity {} = True isExpectedError _ = False in testCase name . inferFailsAssertion "GetMissingField" isExpectedError $ reco `P.getField` get...
1,666
getFieldTests = testGroup "GetField tests" [ testGroup "missing fields" [ let isExpectedError InferErr.TypesDoNotUnity {} = True isExpectedError _ = False in testCase name . inferFailsAssertion "GetMissingField" isExpectedError $ reco `P.getField` get...
1,666
getFieldTests = testGroup "GetField tests" [ testGroup "missing fields" [ let isExpectedError InferErr.TypesDoNotUnity {} = True isExpectedError _ = False in testCase name . inferFailsAssertion "GetMissingField" isExpectedError $ reco `P.getField` get...
1,666
false
false
0
15
582
374
192
182
null
null
amccausl/Swish
Swish/HaskellUtils/ParseURI.hs
lgpl-2.1
-- sect 3.1 scheme :: Parser Char String scheme = parseSequence ( isAlpha, (isOneOf (alphanumCh++"+-.")) )
116
scheme :: Parser Char String scheme = parseSequence ( isAlpha, (isOneOf (alphanumCh++"+-.")) )
94
scheme = parseSequence ( isAlpha, (isOneOf (alphanumCh++"+-.")) )
65
true
true
1
10
25
43
21
22
null
null
ZacharyKamerling/Canvas
src/DataParsers.hs
mit
parsePlaces :: IO (Map.Map String (Float,Float,Float,Float)) parsePlaces = mapParser "Places.txt" . many $ do whitespace char '\"' str <- some $ matchChar (/='\"') char '\"' whitespace >> char ',' >> whitespace x1 <- fmap read number whitespace >> char ',' >> whitespace y1 <- fmap read number whitespace >> ch...
491
parsePlaces :: IO (Map.Map String (Float,Float,Float,Float)) parsePlaces = mapParser "Places.txt" . many $ do whitespace char '\"' str <- some $ matchChar (/='\"') char '\"' whitespace >> char ',' >> whitespace x1 <- fmap read number whitespace >> char ',' >> whitespace y1 <- fmap read number whitespace >> ch...
491
parsePlaces = mapParser "Places.txt" . many $ do whitespace char '\"' str <- some $ matchChar (/='\"') char '\"' whitespace >> char ',' >> whitespace x1 <- fmap read number whitespace >> char ',' >> whitespace y1 <- fmap read number whitespace >> char ',' >> whitespace x2 <- fmap read number whitespace >> c...
430
false
true
2
12
92
230
103
127
null
null
mrd/camfort
src/Camfort/Specification/Stencils/InferenceFrontend.hs
apache-2.0
indicesToRelativisedOffsets :: FAD.InductionVarMapByASTBlock -> Variable -> [Neighbour] -> [[F.Index (FA.Analysis Annotation)]] -> Writer EvalLog (Maybe (Bool, [[Int]])) indicesToRelativisedOffsets ivs a lhs ...
1,867
indicesToRelativisedOffsets :: FAD.InductionVarMapByASTBlock -> Variable -> [Neighbour] -> [[F.Index (FA.Analysis Annotation)]] -> Writer EvalLog (Maybe (Bool, [[Int]])) indicesToRelativisedOffsets ivs a lhs ...
1,867
indicesToRelativisedOffsets ivs a lhs ixs = do -- Convert indices to neighbourhood representation let rhses = map (map (ixToNeighbour ivs)) ixs -- As an optimisation, do duplicate check in front-end first -- so that duplicate indices don't get passed into the main engine let (rhses', mult) = hasDuplicates r...
1,585
false
true
0
19
535
384
198
186
null
null
ndmitchell/qed
src/Proof/QED.hs
bsd-3-clause
addDecl :: Decl -> QED () addDecl (PatBind _ (PVar name) (UnGuardedRhs bod) (BDecls [])) = addDefinition (V $ fromName name) (fromExp bod)
138
addDecl :: Decl -> QED () addDecl (PatBind _ (PVar name) (UnGuardedRhs bod) (BDecls [])) = addDefinition (V $ fromName name) (fromExp bod)
138
addDecl (PatBind _ (PVar name) (UnGuardedRhs bod) (BDecls [])) = addDefinition (V $ fromName name) (fromExp bod)
112
false
true
0
9
22
80
38
42
null
null
elieux/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
typeErrorVAppendDataConName = dcQual gHC_TYPELITS (fsLit ":$$:") typeErrorVAppendDataConKey
93
typeErrorVAppendDataConName = dcQual gHC_TYPELITS (fsLit ":$$:") typeErrorVAppendDataConKey
93
typeErrorVAppendDataConName = dcQual gHC_TYPELITS (fsLit ":$$:") typeErrorVAppendDataConKey
93
false
false
0
7
8
19
9
10
null
null
alpmestan/gloss-juicy
Graphics/Gloss/Juicy.hs
bsd-3-clause
-- | Creation of a gloss 'Picture' by promoting (through 'promoteImage') the 'PixelYCbCr8' image to 'PixelRGBA8' and calling 'fromImageRGBA8'. fromImageYCbCr8 :: Image PixelYCbCr8 -> Picture fromImageYCbCr8 = fromImageRGB8 . convertImage
237
fromImageYCbCr8 :: Image PixelYCbCr8 -> Picture fromImageYCbCr8 = fromImageRGB8 . convertImage
94
fromImageYCbCr8 = fromImageRGB8 . convertImage
46
true
true
0
7
29
30
13
17
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/GlobalEventHandlers.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onwebkitwillrevealtop Mozilla GlobalEventHandlers.onwebkitwillrevealtop documentation> webKitWillRevealTop :: (IsGlobalEventHandlers self, IsEventTarget self) => EventName self Event webKitWillRevealTop...
375
webKitWillRevealTop :: (IsGlobalEventHandlers self, IsEventTarget self) => EventName self Event webKitWillRevealTop = unsafeEventName (toJSString "webkitwillrevealtop")
212
webKitWillRevealTop = unsafeEventName (toJSString "webkitwillrevealtop")
74
true
true
0
7
65
47
22
25
null
null
RaminHAL9001/inf-interval
tests/Interval.hs
gpl-3.0
checkEqISets :: EqISets -> Bool checkEqISets (EqISets (ISet a) (SetOfI b)) = and $ do i <- everyI return $ Iv.member b i == (0 /= i2byte i .&. a)
149
checkEqISets :: EqISets -> Bool checkEqISets (EqISets (ISet a) (SetOfI b)) = and $ do i <- everyI return $ Iv.member b i == (0 /= i2byte i .&. a)
149
checkEqISets (EqISets (ISet a) (SetOfI b)) = and $ do i <- everyI return $ Iv.member b i == (0 /= i2byte i .&. a)
117
false
true
0
13
33
86
40
46
null
null
alexander-at-github/eta
compiler/ETA/Types/TyCon.hs
bsd-3-clause
makeTyConAbstract tc = pprPanic "makeTyConAbstract" (ppr tc)
60
makeTyConAbstract tc = pprPanic "makeTyConAbstract" (ppr tc)
60
makeTyConAbstract tc = pprPanic "makeTyConAbstract" (ppr tc)
60
false
false
0
7
6
20
9
11
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
unwarily = id
13
unwarily = id
13
unwarily = id
13
false
false
0
4
2
6
3
3
null
null
ciderpunx/project_euler_in_haskell
euler035.hs
gpl-2.0
-- Get all rotations of a list (a string usually) eg ["197"] -> ["971", "719", "197"] -- I /was/ doing a permute, but actually only need a rotate. rots :: [a] -> [[a]] rots xs = tail $ zipWith (++) (tails xs) (inits xs)
220
rots :: [a] -> [[a]] rots xs = tail $ zipWith (++) (tails xs) (inits xs)
72
rots xs = tail $ zipWith (++) (tails xs) (inits xs)
51
true
true
2
9
44
62
31
31
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
datatypeName_RDR = varQual_RDR gHC_GENERICS (fsLit "datatypeName")
67
datatypeName_RDR = varQual_RDR gHC_GENERICS (fsLit "datatypeName")
67
datatypeName_RDR = varQual_RDR gHC_GENERICS (fsLit "datatypeName")
67
false
false
0
7
6
17
8
9
null
null
kazu-yamamoto/http2
bench-priority/RingOfQueuesSTM.hs
bsd-3-clause
-- | Changing the item of an entry. renewEntry :: Entry a -> b -> Entry b renewEntry ent x = ent { item = x }
109
renewEntry :: Entry a -> b -> Entry b renewEntry ent x = ent { item = x }
73
renewEntry ent x = ent { item = x }
35
true
true
0
7
26
39
20
19
null
null
zhangyz/llvm-slicing
src/LLVM/Slicing/Util/ValueTest.hs
apache-2.0
-- "@__isoc99_fscanf" isC99Read = isExtFuns ["@fread","@_IO_getc","@gets"]
74
isC99Read = isExtFuns ["@fread","@_IO_getc","@gets"]
52
isC99Read = isExtFuns ["@fread","@_IO_getc","@gets"]
52
true
false
1
6
5
22
11
11
null
null
mattias-lundell/timber-llvm
src/Core2Kindle.hs
bsd-3-clause
-- ========================================================================================= -- Translating commands -- ========================================================================================= -- Translate a Core.Cmd into a Kindle.Cmd cCmd env (CRet e) = do (bf,te,e) <- freezeSta...
995
cCmd env (CRet e) = do (bf,te,e) <- freezeState env e (bf',t,e) <- cValExp (addTEnv te env) e if Kindle.simpleExp e then -- No state references or non-termination in e ...
742
cCmd env (CRet e) = do (bf,te,e) <- freezeState env e (bf',t,e) <- cValExp (addTEnv te env) e if Kindle.simpleExp e then -- No state references or non-termination in e ...
742
true
false
0
21
443
198
101
97
null
null
solarus/quickgen
report/API.hs
gpl-3.0
main = putStrLn "Hello world!"
30
main = putStrLn "Hello world!"
30
main = putStrLn "Hello world!"
30
false
false
0
5
4
9
4
5
null
null
geraldus/lambdacms
lambdacms-core/LambdaCms/Core/Message.hs
mit
dutchMessage (LogDeactivatedUser name) = "Heeft gebruiker \"" `mappend` name `mappend` "\" gedeactiveerd"
111
dutchMessage (LogDeactivatedUser name) = "Heeft gebruiker \"" `mappend` name `mappend` "\" gedeactiveerd"
111
dutchMessage (LogDeactivatedUser name) = "Heeft gebruiker \"" `mappend` name `mappend` "\" gedeactiveerd"
111
false
false
0
7
17
27
15
12
null
null
shlevy/ghc
libraries/base/Control/Concurrent.hs
bsd-3-clause
-- --------------------------------------------------------------------------- -- threadWaitRead/threadWaitWrite -- | Block the current thread until data is available to read on the -- given file descriptor (GHC only). -- -- This will throw an 'IOError' if the file descriptor was closed -- while this thread was blocke...
1,545
threadWaitRead :: Fd -> IO () threadWaitRead fd #if defined(mingw32_HOST_OS) -- we have no IO manager implementing threadWaitRead on Windows. -- fdReady does the right thing, but we have to call it in a -- separate thread, otherwise threadWaitRead won't be interruptible, -- and this only works with -threaded. ...
1,111
threadWaitRead fd #if defined(mingw32_HOST_OS) -- we have no IO manager implementing threadWaitRead on Windows. -- fdReady does the right thing, but we have to call it in a -- separate thread, otherwise threadWaitRead won't be interruptible, -- and this only works with -threaded. | threaded = withThread (wai...
1,081
true
true
0
14
348
124
69
55
null
null
green-haskell/ghc
libraries/base/GHC/List.hs
bsd-3-clause
scanl' :: (b -> a -> b) -> b -> [a] -> [b] -- This peculiar form is needed to prevent scanl' from being rewritten -- in its own right hand side. scanl' = scanlGo' where scanlGo' :: (b -> a -> b) -> b -> [a] -> [b] scanlGo' f !q ls = q : (case ls of [] -> []...
411
scanl' :: (b -> a -> b) -> b -> [a] -> [b] scanl' = scanlGo' where scanlGo' :: (b -> a -> b) -> b -> [a] -> [b] scanlGo' f !q ls = q : (case ls of [] -> [] x:xs -> scanlGo' f (f q x) xs) -- Note [scanl rewrite rules]
309
scanl' = scanlGo' where scanlGo' :: (b -> a -> b) -> b -> [a] -> [b] scanlGo' f !q ls = q : (case ls of [] -> [] x:xs -> scanlGo' f (f q x) xs) -- Note [scanl rewrite rules]
256
true
true
4
12
167
139
74
65
null
null
allanderek/ipclib
Ipc/Ipc.hs
gpl-2.0
isSourceInitialOption :: CliOption a -> Bool isSourceInitialOption (CliSourceInitial) = True
92
isSourceInitialOption :: CliOption a -> Bool isSourceInitialOption (CliSourceInitial) = True
92
isSourceInitialOption (CliSourceInitial) = True
47
false
true
0
6
9
24
12
12
null
null
sighingnow/mxnet-haskell
mxnet/src/MXNet/Core/Base/HMap.hs
mit
-- | Infix version of @get@. (.->.) :: forall (k :: Symbol) v kvs. InDict k v kvs => HMap kvs -> v (.->.) = get @k
114
(.->.) :: forall (k :: Symbol) v kvs. InDict k v kvs => HMap kvs -> v (.->.) = get @k
85
(.->.) = get @k
15
true
true
0
8
26
52
30
22
null
null
wavewave/hoodle-core
src/Hoodle/Coroutine/Draw.hs
gpl-3.0
-- | invalidateAll :: MainCoroutine () invalidateAll = invalidateAllInBBox Nothing Clear >> liftIO (putStrLn "The SLOW invalidateAll Called")
143
invalidateAll :: MainCoroutine () invalidateAll = invalidateAllInBBox Nothing Clear >> liftIO (putStrLn "The SLOW invalidateAll Called")
136
invalidateAll = invalidateAllInBBox Nothing Clear >> liftIO (putStrLn "The SLOW invalidateAll Called")
102
true
true
0
8
19
35
17
18
null
null
green-haskell/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
hsExplicitTvs _ = []
56
hsExplicitTvs _ = []
56
hsExplicitTvs _ = []
56
false
false
0
5
39
11
5
6
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Upgrade.hs
mit
mineralsBase ArgusTalisman = 150
32
mineralsBase ArgusTalisman = 150
32
mineralsBase ArgusTalisman = 150
32
false
false
0
5
3
9
4
5
null
null
kRITZCREEK/dash-haskell
src/Options.hs
lgpl-3.0
parser :: Parser Options parser = Options <$> (strOption $ long "output" <> short 'o' <> metavar "<dir>" <> value "./docsets" <> help "the directory to write created docsets to") <*> switch (long "quiet" <> short 'q' <> help "set to quiet output") <*> option (Just <$> readerAsk) ...
1,927
parser :: Parser Options parser = Options <$> (strOption $ long "output" <> short 'o' <> metavar "<dir>" <> value "./docsets" <> help "the directory to write created docsets to") <*> switch (long "quiet" <> short 'q' <> help "set to quiet output") <*> option (Just <$> readerAsk) ...
1,927
parser = Options <$> (strOption $ long "output" <> short 'o' <> metavar "<dir>" <> value "./docsets" <> help "the directory to write created docsets to") <*> switch (long "quiet" <> short 'q' <> help "set to quiet output") <*> option (Just <$> readerAsk) (long "cabal" <> sho...
1,902
false
true
38
12
598
545
263
282
null
null
aslatter/xhb
Graphics/XHB/Shared.hs
bsd-3-clause
getInt16host :: Get Int16 getInt16host = liftM fromIntegral getWord16host
73
getInt16host :: Get Int16 getInt16host = liftM fromIntegral getWord16host
73
getInt16host = liftM fromIntegral getWord16host
47
false
true
0
5
8
19
9
10
null
null
scslab/ssh
src/SSH.hs
bsd-3-clause
newKeys :: Session () newKeys = do sendPacket (byte 21) send StartEncrypting modify (\ss -> ss { ssGotNEWKEYS = True })
131
newKeys :: Session () newKeys = do sendPacket (byte 21) send StartEncrypting modify (\ss -> ss { ssGotNEWKEYS = True })
131
newKeys = do sendPacket (byte 21) send StartEncrypting modify (\ss -> ss { ssGotNEWKEYS = True })
109
false
true
0
11
32
56
27
29
null
null
mstksg/hledger
bin/hledger-register-match.hs
gpl-3.0
match :: CliOpts -> Journal -> IO () match opts@CliOpts{rawopts_=rawopts,reportopts_=ropts} j = do let args' = listofstringopt "args" rawopts case args' of [desc] -> do d <- getCurrentDay let q = queryFromOptsOnly d ropts (_,pris) = postingsReport ropts q j ps = [p | (_,...
909
match :: CliOpts -> Journal -> IO () match opts@CliOpts{rawopts_=rawopts,reportopts_=ropts} j = do let args' = listofstringopt "args" rawopts case args' of [desc] -> do d <- getCurrentDay let q = queryFromOptsOnly d ropts (_,pris) = postingsReport ropts q j ps = [p | (_,...
909
match opts@CliOpts{rawopts_=rawopts,reportopts_=ropts} j = do let args' = listofstringopt "args" rawopts case args' of [desc] -> do d <- getCurrentDay let q = queryFromOptsOnly d ropts (_,pris) = postingsReport ropts q j ps = [p | (_,_,_,p,_) <- pris] case simila...
872
false
true
1
24
341
262
134
128
null
null
prt2121/haskell-practice
chap15/src/Main.hs
apache-2.0
genFirst :: Arbitrary a => Gen (First' a) genFirst = do x <- arbitrary return First' { getFirst' = x }
112
genFirst :: Arbitrary a => Gen (First' a) genFirst = do x <- arbitrary return First' { getFirst' = x }
112
genFirst = do x <- arbitrary return First' { getFirst' = x }
70
false
true
0
10
30
54
24
30
null
null