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
ekmett/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayUnsetGeneralFlags _ WayPar = []
39
wayUnsetGeneralFlags _ WayPar = []
39
wayUnsetGeneralFlags _ WayPar = []
39
false
false
1
6
9
15
6
9
null
null
rsasse/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/ProofMethod.hs
gpl-3.0
oracleSmartRanking :: String -> ProofContext -> System -> [AnnotatedGoal] -> [AnnotatedGoal] oracleSmartRanking oracleName ctxt _sys ags0 -- | AvoidInduction == (L.get pcUseInduction ctxt) = ags0 | otherwise = unsafePerformIO $ do let ags = smartRank...
1,332
oracleSmartRanking :: String -> ProofContext -> System -> [AnnotatedGoal] -> [AnnotatedGoal] oracleSmartRanking oracleName ctxt _sys ags0 -- | AvoidInduction == (L.get pcUseInduction ctxt) = ags0 | otherwise = unsafePerformIO $ do let ags = smartRank...
1,332
oracleSmartRanking oracleName ctxt _sys ags0 -- | AvoidInduction == (L.get pcUseInduction ctxt) = ags0 | otherwise = unsafePerformIO $ do let ags = smartRanking ctxt False _sys ags0 let inp = unlines (map (\(i,ag) -> show i ++": "++ (concat . lines . render $ pgoal ag)) ...
1,182
false
true
2
19
439
320
161
159
null
null
benzrf/cas
src/ProofCas/Backends/SFP/Paths.hs
gpl-3.0
-- not actually very useful - just for interface demo purposes! swap :: StPath -> StPath -> Status -> Status swap stpa stpa' = ap fromMaybe $ execStateT $ do guard $ not (stpa `ancestor` stpa' || stpa' `ancestor` stpa) a <- preuse (stpath stpa) >>= lift b <- preuse (stpath stpa') >>= lift stpath stpa .= b ...
337
swap :: StPath -> StPath -> Status -> Status swap stpa stpa' = ap fromMaybe $ execStateT $ do guard $ not (stpa `ancestor` stpa' || stpa' `ancestor` stpa) a <- preuse (stpath stpa) >>= lift b <- preuse (stpath stpa') >>= lift stpath stpa .= b stpath stpa' .= a
273
swap stpa stpa' = ap fromMaybe $ execStateT $ do guard $ not (stpa `ancestor` stpa' || stpa' `ancestor` stpa) a <- preuse (stpath stpa) >>= lift b <- preuse (stpath stpa') >>= lift stpath stpa .= b stpath stpa' .= a
228
true
true
0
13
74
134
63
71
null
null
oldmanmike/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_quasi :: OutputableBndr id => id -> id -> FastString -> SDoc ppr_quasi n quoter quote = ifPprDebug (brackets (ppr n)) <> char '[' <> ppr quoter <> vbar <> ppr quote <> text "|]"
235
ppr_quasi :: OutputableBndr id => id -> id -> FastString -> SDoc ppr_quasi n quoter quote = ifPprDebug (brackets (ppr n)) <> char '[' <> ppr quoter <> vbar <> ppr quote <> text "|]"
235
ppr_quasi n quoter quote = ifPprDebug (brackets (ppr n)) <> char '[' <> ppr quoter <> vbar <> ppr quote <> text "|]"
170
false
true
0
14
88
84
39
45
null
null
mocnik-science/osm-vis
data-mining/osm-node-changes-per-area/tool.hs
gpl-3.0
urlState :: String urlState = "https://planet.openstreetmap.org/replication/day/state.txt"
90
urlState :: String urlState = "https://planet.openstreetmap.org/replication/day/state.txt"
90
urlState = "https://planet.openstreetmap.org/replication/day/state.txt"
71
false
true
0
4
5
11
6
5
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/Intents/BatchUpdate.hs
mpl-2.0
-- | Required. The name of the agent to update or create intents in. Format: -- \`projects\/\/agent\`. paibuParent :: Lens' ProjectsAgentIntentsBatchUpdate Text paibuParent = lens _paibuParent (\ s a -> s{_paibuParent = a})
225
paibuParent :: Lens' ProjectsAgentIntentsBatchUpdate Text paibuParent = lens _paibuParent (\ s a -> s{_paibuParent = a})
122
paibuParent = lens _paibuParent (\ s a -> s{_paibuParent = a})
64
true
true
1
9
34
47
23
24
null
null
rgaiacs/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
section :: Attr -> Int -> LP Blocks section (ident, classes, kvs) lvl = do hasChapters <- stateHasChapters `fmap` getState let lvl' = if hasChapters then lvl + 1 else lvl skipopts contents <- grouped inline lab <- option ident $ try (spaces >> controlSeq "label" >> spaces >> braced) attr' <- registerHeader ...
390
section :: Attr -> Int -> LP Blocks section (ident, classes, kvs) lvl = do hasChapters <- stateHasChapters `fmap` getState let lvl' = if hasChapters then lvl + 1 else lvl skipopts contents <- grouped inline lab <- option ident $ try (spaces >> controlSeq "label" >> spaces >> braced) attr' <- registerHeader ...
390
section (ident, classes, kvs) lvl = do hasChapters <- stateHasChapters `fmap` getState let lvl' = if hasChapters then lvl + 1 else lvl skipopts contents <- grouped inline lab <- option ident $ try (spaces >> controlSeq "label" >> spaces >> braced) attr' <- registerHeader (lab, classes, kvs) contents retur...
354
false
true
0
14
76
153
75
78
null
null
giorgidze/Hydra
src/Hydra/Utils/LLVM.hs
bsd-3-clause
createInterpreter :: LLVM.ModuleRef -> IO EE createInterpreter m = do mp <- LLVM.createModuleProviderForExistingModule m ee <- FFI.malloc _ <- LLVM.createInterpreter ee mp FFI.nullPtr return (EE ee m)
208
createInterpreter :: LLVM.ModuleRef -> IO EE createInterpreter m = do mp <- LLVM.createModuleProviderForExistingModule m ee <- FFI.malloc _ <- LLVM.createInterpreter ee mp FFI.nullPtr return (EE ee m)
208
createInterpreter m = do mp <- LLVM.createModuleProviderForExistingModule m ee <- FFI.malloc _ <- LLVM.createInterpreter ee mp FFI.nullPtr return (EE ee m)
163
false
true
0
9
34
76
34
42
null
null
alexander-at-github/eta
libraries/base/Data/Typeable/Internal.hs
bsd-3-clause
typeOf6 :: forall t (a :: *) (b :: *) (c :: *) (d :: *) (e :: *) (f :: *). Typeable t => t a b c d e f -> TypeRep typeOf6 _ = typeRep (Proxy :: Proxy t)
168
typeOf6 :: forall t (a :: *) (b :: *) (c :: *) (d :: *) (e :: *) (f :: *). Typeable t => t a b c d e f -> TypeRep typeOf6 _ = typeRep (Proxy :: Proxy t)
168
typeOf6 _ = typeRep (Proxy :: Proxy t)
38
false
true
0
9
57
102
58
44
null
null
jfeltz/tasty-integrate
ide-format/Main.hs
bsd-2-clause
fromResult _ (Test t (Right (Success msg))) = t ++ "\n " ++ msg
66
fromResult _ (Test t (Right (Success msg))) = t ++ "\n " ++ msg
66
fromResult _ (Test t (Right (Success msg))) = t ++ "\n " ++ msg
66
false
false
5
10
16
44
19
25
null
null
erikd/yesod
yesod-bin/Devel.hs
mit
removeLock :: DevelOpts -> IO () removeLock _opts = do removeFileIfExists lockFile removeFileIfExists "dist/devel-terminate" -- for compatibility with old devel.hs
172
removeLock :: DevelOpts -> IO () removeLock _opts = do removeFileIfExists lockFile removeFileIfExists "dist/devel-terminate" -- for compatibility with old devel.hs
172
removeLock _opts = do removeFileIfExists lockFile removeFileIfExists "dist/devel-terminate" -- for compatibility with old devel.hs
139
false
true
0
7
28
36
16
20
null
null
geocurnoff/nikki
src/Physics/Chipmunk/ContactRef.hs
lgpl-3.0
sSolidInPresolve :: Permeability -> Bool isSolidInPresolve Solid = True
72
isSolidInPresolve :: Permeability -> Bool isSolidInPresolve Solid = True
72
isSolidInPresolve Solid = True
30
false
true
0
5
9
18
9
9
null
null
wetneb/yanker
src/TypeHierarchy.hs
gpl-3.0
termLSwhiteSpace = whiteSpaceL >> termLS
40
termLSwhiteSpace = whiteSpaceL >> termLS
40
termLSwhiteSpace = whiteSpaceL >> termLS
40
false
false
0
5
4
10
5
5
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
happyReduction_235 (HappyTerminal (T_literal happy_var_2)) _ = HappyAbsSyn18 ((let x = mkBitField "" happy_var_2 in BitFieldId x (Id "")) )
182
happyReduction_235 (HappyTerminal (T_literal happy_var_2)) _ = HappyAbsSyn18 ((let x = mkBitField "" happy_var_2 in BitFieldId x (Id "")) )
182
happyReduction_235 (HappyTerminal (T_literal happy_var_2)) _ = HappyAbsSyn18 ((let x = mkBitField "" happy_var_2 in BitFieldId x (Id "")) )
182
false
false
0
12
61
59
28
31
null
null
qnikst/ygruq
Settings.hs
bsd-2-clause
widgetFile :: String -> Q Exp widgetFile = (if development then widgetFileReload else widgetFileNoReload) widgetFileSettings
167
widgetFile :: String -> Q Exp widgetFile = (if development then widgetFileReload else widgetFileNoReload) widgetFileSettings
167
widgetFile = (if development then widgetFileReload else widgetFileNoReload) widgetFileSettings
137
false
true
0
7
57
32
17
15
null
null
TomMD/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
-- | Check whether a type constructor is the constructor for parallel arrays isPArrTyCon :: TyCon -> Bool isPArrTyCon tc = tyConName tc == parrTyConName
156
isPArrTyCon :: TyCon -> Bool isPArrTyCon tc = tyConName tc == parrTyConName
79
isPArrTyCon tc = tyConName tc == parrTyConName
47
true
true
0
6
28
26
13
13
null
null
markus1189/lambda-feed
src/LambdaFeed.hs
gpl-3.0
showItemsFor :: Channel -> LF () showItemsFor chan = do lfCurrentChannel ?= chan widget <- view (lfWidgets . itemWidget) vis <- use lfVisibility items <- queryAcid (GetItems vis chan) switchAction <- view (lfSwitch . switchToItems) void . liftIO $ schedule $ do clearList widget for_ (zip [1..] (toLi...
421
showItemsFor :: Channel -> LF () showItemsFor chan = do lfCurrentChannel ?= chan widget <- view (lfWidgets . itemWidget) vis <- use lfVisibility items <- queryAcid (GetItems vis chan) switchAction <- view (lfSwitch . switchToItems) void . liftIO $ schedule $ do clearList widget for_ (zip [1..] (toLi...
421
showItemsFor chan = do lfCurrentChannel ?= chan widget <- view (lfWidgets . itemWidget) vis <- use lfVisibility items <- queryAcid (GetItems vis chan) switchAction <- view (lfSwitch . switchToItems) void . liftIO $ schedule $ do clearList widget for_ (zip [1..] (toList items)) $ \(i,itm) -> pl...
388
false
true
0
15
90
179
82
97
null
null
Fermat/Gottlob
Language/Preprocess.hs
bsd-3-clause
getFirstPos (TIota x p) = getFirstPos p
40
getFirstPos (TIota x p) = getFirstPos p
40
getFirstPos (TIota x p) = getFirstPos p
40
false
false
0
7
7
20
9
11
null
null
acowley/language-c
src/Language/C/Analysis/TypeCheck.hs
bsd-3-clause
constType (CCharConst (CChar _ False) _) = return $ DirectType (TyIntegral TyChar) noTypeQuals noAttributes
109
constType (CCharConst (CChar _ False) _) = return $ DirectType (TyIntegral TyChar) noTypeQuals noAttributes
109
constType (CCharConst (CChar _ False) _) = return $ DirectType (TyIntegral TyChar) noTypeQuals noAttributes
109
false
false
0
9
15
42
20
22
null
null
mb21/qua-kit
apps/hs/qua-server/src/Application.hs
mit
-- | The @main@ function for an executable running this site. appMain :: IO () appMain = do -- Get the settings from all relevant sources settings <- loadYamlSettingsArgs -- fall back to compile-time values, set to [] to require values at runtime [configSettingsYmlValue] -- allow enviro...
822
appMain :: IO () appMain = do -- Get the settings from all relevant sources settings <- loadYamlSettingsArgs -- fall back to compile-time values, set to [] to require values at runtime [configSettingsYmlValue] -- allow environment variables to override useEnv -- Generate th...
760
appMain = do -- Get the settings from all relevant sources settings <- loadYamlSettingsArgs -- fall back to compile-time values, set to [] to require values at runtime [configSettingsYmlValue] -- allow environment variables to override useEnv -- Generate the foundation from...
743
true
true
0
10
167
81
40
41
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/Colors.hs
bsd-3-clause
-------------------------------------------------------------------------------- spotExponent :: Light -> StateVar GLfloat spotExponent = makeLightVar glGetLightfv glLightfv SpotExponent
187
spotExponent :: Light -> StateVar GLfloat spotExponent = makeLightVar glGetLightfv glLightfv SpotExponent
105
spotExponent = makeLightVar glGetLightfv glLightfv SpotExponent
63
true
true
0
6
13
26
13
13
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F01.hs
bsd-3-clause
ptr_glBindTextureEXT :: FunPtr (GLenum -> GLuint -> IO ()) ptr_glBindTextureEXT = unsafePerformIO $ getCommand "glBindTextureEXT"
129
ptr_glBindTextureEXT :: FunPtr (GLenum -> GLuint -> IO ()) ptr_glBindTextureEXT = unsafePerformIO $ getCommand "glBindTextureEXT"
129
ptr_glBindTextureEXT = unsafePerformIO $ getCommand "glBindTextureEXT"
70
false
true
0
11
14
42
19
23
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nodeEvacSec :: String nodeEvacSec = Types.evacModeToRaw ChangeSecondary
71
nodeEvacSec :: String nodeEvacSec = Types.evacModeToRaw ChangeSecondary
71
nodeEvacSec = Types.evacModeToRaw ChangeSecondary
49
false
true
0
6
6
22
9
13
null
null
SimSaladin/haikubot
Haikubot/Main.hs
bsd-3-clause
-- | Default configuration. defaultConfig :: Config defaultConfig = Config { cRootPrefix = "@" , cPlugins = fromList [ ("Basics", MkPlugin Basics) , ("runot" , MkPlugin runot) ] }
242
defaultConfig :: Config defaultConfig = Config { cRootPrefix = "@" , cPlugins = fromList [ ("Basics", MkPlugin Basics) , ("runot" , MkPlugin runot) ] }
214
defaultConfig = Config { cRootPrefix = "@" , cPlugins = fromList [ ("Basics", MkPlugin Basics) , ("runot" , MkPlugin runot) ] }
190
true
true
0
11
91
63
33
30
null
null
project-horizon/framework
src/lib/Language/PolyDSL/Transformation/JavaScript/GADTs.hs
mit
genAssignment 0 as = as
23
genAssignment 0 as = as
23
genAssignment 0 as = as
23
false
false
1
5
4
13
5
8
null
null
ohua-dev/ohua-core
core/src/Ohua/Util.hs
epl-1.0
-- | Throw a canonical compiler error with a callstack appended. throwErrorSD :: (HasCallStack, MonadError Text m) => PP.Doc ann -> m a throwErrorSD msg = throwError $ ohuaDefaultLayoutDoc $ PP.vcat [msg, fromString cs] where cs = callStackToStr callStack
261
throwErrorSD :: (HasCallStack, MonadError Text m) => PP.Doc ann -> m a throwErrorSD msg = throwError $ ohuaDefaultLayoutDoc $ PP.vcat [msg, fromString cs] where cs = callStackToStr callStack
196
throwErrorSD msg = throwError $ ohuaDefaultLayoutDoc $ PP.vcat [msg, fromString cs] where cs = callStackToStr callStack
125
true
true
1
8
44
78
37
41
null
null
sumitsahrawat/IHaskell
src/tests/IHaskell/Test/Eval.hs
mit
pages :: String -> [String] -> IO () pages string expected = evaluationComparing comparison string where comparison (results, pageOut) = strip (stripHtml pageOut) `shouldBe` strip (fixQuotes $ unlines expected) -- A very, very hacky method for removing HTML stripHtml str = go str where ...
990
pages :: String -> [String] -> IO () pages string expected = evaluationComparing comparison string where comparison (results, pageOut) = strip (stripHtml pageOut) `shouldBe` strip (fixQuotes $ unlines expected) -- A very, very hacky method for removing HTML stripHtml str = go str where ...
990
pages string expected = evaluationComparing comparison string where comparison (results, pageOut) = strip (stripHtml pageOut) `shouldBe` strip (fixQuotes $ unlines expected) -- A very, very hacky method for removing HTML stripHtml str = go str where go ('<':str) = case strip...
953
false
true
0
11
338
287
142
145
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
jstringDataConKey = mkPreludeDataConUnique 39
45
jstringDataConKey = mkPreludeDataConUnique 39
45
jstringDataConKey = mkPreludeDataConUnique 39
45
false
false
1
5
3
12
4
8
null
null
chwthewke/hackup
src/Hackup/Opts.hs
mit
parseCommandLine :: [String] -> IO (Either String Opts) parseCommandLine args = case execParserPure (prefs idm) parserInfo args of Success opts -> return $ Right opts Failure f -> liftM (Left . fst . execFailure f) getProgName CompletionInvoked _ -> return $ Left "unexpected complet...
332
parseCommandLine :: [String] -> IO (Either String Opts) parseCommandLine args = case execParserPure (prefs idm) parserInfo args of Success opts -> return $ Right opts Failure f -> liftM (Left . fst . execFailure f) getProgName CompletionInvoked _ -> return $ Left "unexpected complet...
332
parseCommandLine args = case execParserPure (prefs idm) parserInfo args of Success opts -> return $ Right opts Failure f -> liftM (Left . fst . execFailure f) getProgName CompletionInvoked _ -> return $ Left "unexpected completion invoked"
276
false
true
0
11
81
109
51
58
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
int64PrimTyConKey = mkPreludeTyConUnique 20
65
int64PrimTyConKey = mkPreludeTyConUnique 20
65
int64PrimTyConKey = mkPreludeTyConUnique 20
65
false
false
0
5
25
9
4
5
null
null
Denommus/stack
src/Stack/Types/Config.hs
bsd-3-clause
bindirSuffix :: Path Rel Dir bindirSuffix = $(mkRelDir "bin")
61
bindirSuffix :: Path Rel Dir bindirSuffix = $(mkRelDir "bin")
61
bindirSuffix = $(mkRelDir "bin")
32
false
true
0
7
8
23
11
12
null
null
romanb/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/Types.hs
mpl-2.0
-- | 'Subnet' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'sSubnetAvailabilityZone' @::@ 'Maybe' 'AvailabilityZone' -- -- * 'sSubnetIdentifier' @::@ 'Maybe' 'Text' -- -- * 'sSubnetStatus' @::@ 'Maybe' 'Text' -- subnet :: Subnet subnet = Subnet { _sSubnetIdentifier = Noth...
411
subnet :: Subnet subnet = Subnet { _sSubnetIdentifier = Nothing , _sSubnetAvailabilityZone = Nothing , _sSubnetStatus = Nothing }
161
subnet = Subnet { _sSubnetIdentifier = Nothing , _sSubnetAvailabilityZone = Nothing , _sSubnetStatus = Nothing }
144
true
true
0
6
85
41
29
12
null
null
dongarerahul/edx-haskell
chapter-8-hw.hs
apache-2.0
mapMM'' f (a : as) = f a >>= \ b -> do bs <- mapMM'' f as return (bs ++ [b])
139
mapMM'' f (a : as) = f a >>= \ b -> do bs <- mapMM'' f as return (bs ++ [b])
139
mapMM'' f (a : as) = f a >>= \ b -> do bs <- mapMM'' f as return (bs ++ [b])
139
false
false
0
12
84
60
28
32
null
null
wereHamster/google-cloud
src/Google/Cloud.hs
mit
-- | Create a new 'Handle' with sensible defaults. The defaults are such that -- the 'Handle' works out of the box when the application is running on an -- instance in the Google cloud. createHandle :: IO Handle createHandle = do manager <- newManager tlsManagerSettings mkHandle manager defaultMetadataToken ...
384
createHandle :: IO Handle createHandle = do manager <- newManager tlsManagerSettings mkHandle manager defaultMetadataToken -- | Create a new 'Handle' with your own configuration options.
197
createHandle = do manager <- newManager tlsManagerSettings mkHandle manager defaultMetadataToken -- | Create a new 'Handle' with your own configuration options.
171
true
true
0
8
71
36
18
18
null
null
qnikst/distributed-process
src/Control/Distributed/Process/Internal/Types.hs
bsd-3-clause
-- | Turn any serializable term into an unencoded/local message createUnencodedMessage :: Serializable a => a -> Message createUnencodedMessage a = let encoded = encode a in BSL.length encoded `seq` UnencodedMessage (fingerprint a) a
235
createUnencodedMessage :: Serializable a => a -> Message createUnencodedMessage a = let encoded = encode a in BSL.length encoded `seq` UnencodedMessage (fingerprint a) a
171
createUnencodedMessage a = let encoded = encode a in BSL.length encoded `seq` UnencodedMessage (fingerprint a) a
114
true
true
0
10
35
62
30
32
null
null
atsukotakahashi/wi
src/library/Yi/Buffer/Undo.hs
gpl-2.0
-- | Insert an initial interactive point, if there is none addIP xs@(InteractivePoint:_) = xs
93
addIP xs@(InteractivePoint:_) = xs
34
addIP xs@(InteractivePoint:_) = xs
34
true
false
0
8
14
20
11
9
null
null
zhiyuanshi/fcore
examples/case_studies/FeatherWeightJava.hs
bsd-2-clause
move t@(New cn ts) ma = if ts == [] then t else New cn (map helper ts) where helper = (\x -> move x ma)
147
move t@(New cn ts) ma = if ts == [] then t else New cn (map helper ts) where helper = (\x -> move x ma)
147
move t@(New cn ts) ma = if ts == [] then t else New cn (map helper ts) where helper = (\x -> move x ma)
147
false
false
1
9
69
76
36
40
null
null
jeremyjh/free-agent
core/src/FreeAgent/Core/Internal/Types.hs
bsd-3-clause
wrappedTypeName (WrappedExists type' _) = type'
47
wrappedTypeName (WrappedExists type' _) = type'
47
wrappedTypeName (WrappedExists type' _) = type'
47
false
false
0
6
5
18
8
10
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/Vector.hs
bsd-3-clause
computeTrajectory :: Int -> Int -> Int -> [Point] -> ([Vector], (Speed, Int)) computeTrajectory weight throwVelocity throwLinger path = let speed = speedFromWeight weight throwVelocity trange = rangeFromSpeedAndLinger speed throwLinger btrajectory = pathToTrajectory $ take (trange + 1) path in (btraject...
341
computeTrajectory :: Int -> Int -> Int -> [Point] -> ([Vector], (Speed, Int)) computeTrajectory weight throwVelocity throwLinger path = let speed = speedFromWeight weight throwVelocity trange = rangeFromSpeedAndLinger speed throwLinger btrajectory = pathToTrajectory $ take (trange + 1) path in (btraject...
341
computeTrajectory weight throwVelocity throwLinger path = let speed = speedFromWeight weight throwVelocity trange = rangeFromSpeedAndLinger speed throwLinger btrajectory = pathToTrajectory $ take (trange + 1) path in (btrajectory, (speed, trange))
263
false
true
0
12
58
118
62
56
null
null
573/leksah
src/IDE/Package.hs
gpl-2.0
testMainPath (TestSuiteExeV10 _ f) = [f]
40
testMainPath (TestSuiteExeV10 _ f) = [f]
40
testMainPath (TestSuiteExeV10 _ f) = [f]
40
false
false
0
6
5
21
10
11
null
null
Taeradan/hahp
src/HAHP/Generator.hs
gpl-3.0
generateAlternative :: [IndicatorName] -> Int -> Alternative generateAlternative indNames index = Alternative name values where name = "Alternative " ++ show index values = fromList $ zip indNames randomValues randomValues = unsafePerformIO . sequence . re...
380
generateAlternative :: [IndicatorName] -> Int -> Alternative generateAlternative indNames index = Alternative name values where name = "Alternative " ++ show index values = fromList $ zip indNames randomValues randomValues = unsafePerformIO . sequence . re...
380
generateAlternative indNames index = Alternative name values where name = "Alternative " ++ show index values = fromList $ zip indNames randomValues randomValues = unsafePerformIO . sequence . replicate (length indNames) . randomRIO $ (1, 100) -- * Tools
279
false
true
2
11
110
100
50
50
null
null
urbanslug/ghc
testsuite/tests/numeric/should_run/numrun012.hs
bsd-3-clause
ain :: IO () main = do -- The reported case putStrLn (show (map log2 vals)) -- Smaller failing cases print (fromIntegral ((2^31) :: Int) :: Double) if_not_32 $ print (round ((2^33) :: Double) :: Int) print (fromIntegral ((2^31) :: Int) :: Float) if_not_32 $ pr...
915
main :: IO () main = do -- The reported case putStrLn (show (map log2 vals)) -- Smaller failing cases print (fromIntegral ((2^31) :: Int) :: Double) if_not_32 $ print (round ((2^33) :: Double) :: Int) print (fromIntegral ((2^31) :: Int) :: Float) if_not_32 $ p...
915
main = do -- The reported case putStrLn (show (map log2 vals)) -- Smaller failing cases print (fromIntegral ((2^31) :: Int) :: Double) if_not_32 $ print (round ((2^33) :: Double) :: Int) print (fromIntegral ((2^31) :: Int) :: Float) if_not_32 $ print (round ((...
901
false
true
1
13
265
282
143
139
null
null
phischu/fragnix
tests/packages/scotty/Data.Binary.Class.hs
bsd-3-clause
roll :: (Integral a, Bits a) => [Word8] -> a roll = foldl' unstep 0 . reverse where unstep a b = a `shiftL` 8 .|. fromIntegral b -- Fixed-size type for a subset of Natural
180
roll :: (Integral a, Bits a) => [Word8] -> a roll = foldl' unstep 0 . reverse where unstep a b = a `shiftL` 8 .|. fromIntegral b -- Fixed-size type for a subset of Natural
180
roll = foldl' unstep 0 . reverse where unstep a b = a `shiftL` 8 .|. fromIntegral b -- Fixed-size type for a subset of Natural
135
false
true
0
7
44
68
36
32
null
null
jbedo/LinProg
Math/LinProg/LPSolve/FFI.hs
bsd-3-clause
setTimeout :: LPRec -> Integer -> IO () setTimeout lp x = c_set_timeout lp (fromIntegral x)
91
setTimeout :: LPRec -> Integer -> IO () setTimeout lp x = c_set_timeout lp (fromIntegral x)
91
setTimeout lp x = c_set_timeout lp (fromIntegral x)
51
false
true
0
9
15
44
20
24
null
null
atsukotakahashi/wi
src/tests/Generic/TestPureBufferManipulations.hs
gpl-2.0
discoverTests :: FilePath -> KeyEval -> IO [KeymapTest] discoverTests topdir ev = do dirs <- getRecursiveDirectories topdir testDirs <- filterM containsTest dirs testFiles <- fmap (filter (isSuffixOf ".test")) $ getRecursiveFiles topdir testsFromDirs <- mapM (`loadTestFromDirectory` ev) testDirs tes...
418
discoverTests :: FilePath -> KeyEval -> IO [KeymapTest] discoverTests topdir ev = do dirs <- getRecursiveDirectories topdir testDirs <- filterM containsTest dirs testFiles <- fmap (filter (isSuffixOf ".test")) $ getRecursiveFiles topdir testsFromDirs <- mapM (`loadTestFromDirectory` ev) testDirs tes...
418
discoverTests topdir ev = do dirs <- getRecursiveDirectories topdir testDirs <- filterM containsTest dirs testFiles <- fmap (filter (isSuffixOf ".test")) $ getRecursiveFiles topdir testsFromDirs <- mapM (`loadTestFromDirectory` ev) testDirs testsFromFiles <- mapM (`loadTestFromFile` ev) testFiles ...
362
false
true
0
13
71
128
62
66
null
null
DanielWaterworth/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
substSC :: Name -> Name -> SC -> SC substSC n repl (Case n' alts) | n == n' = Case repl (map (substAlt n repl) alts) | otherwise = Case n' (map (substAlt n repl) alts)
179
substSC :: Name -> Name -> SC -> SC substSC n repl (Case n' alts) | n == n' = Case repl (map (substAlt n repl) alts) | otherwise = Case n' (map (substAlt n repl) alts)
179
substSC n repl (Case n' alts) | n == n' = Case repl (map (substAlt n repl) alts) | otherwise = Case n' (map (substAlt n repl) alts)
143
false
true
0
11
48
106
49
57
null
null
mrakgr/futhark
src/Futhark/CodeGen/Backends/SimpleRepresentation.hs
bsd-3-clause
intTypeToCType Int16 = [C.cty|typename int16_t|]
48
intTypeToCType Int16 = [C.cty|typename int16_t|]
48
intTypeToCType Int16 = [C.cty|typename int16_t|]
48
false
false
0
5
4
16
9
7
null
null
sergsr/algos-and-data-structs
haskell/misc/PairingHeap.hs
mit
-- | Get a list of all keys in acsending order ascendingKeys :: (Ord k) => PairingHeap k -> [k] ascendingKeys = unfoldr getAndDelMin
132
ascendingKeys :: (Ord k) => PairingHeap k -> [k] ascendingKeys = unfoldr getAndDelMin
85
ascendingKeys = unfoldr getAndDelMin
36
true
true
0
7
23
34
18
16
null
null
romanb/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/Types.hs
mpl-2.0
-- | The checksum of the archive computed by Amazon Glacier. acoChecksum :: Lens' ArchiveCreationOutput (Maybe Text) acoChecksum = lens _acoChecksum (\s a -> s { _acoChecksum = a })
181
acoChecksum :: Lens' ArchiveCreationOutput (Maybe Text) acoChecksum = lens _acoChecksum (\s a -> s { _acoChecksum = a })
120
acoChecksum = lens _acoChecksum (\s a -> s { _acoChecksum = a })
64
true
true
1
9
29
52
25
27
null
null
zeyuanxy/haskell-playground
write-yourself-a-scheme/chap7/main.hs
mit
showVal (Bool True) = "#t"
26
showVal (Bool True) = "#t"
26
showVal (Bool True) = "#t"
26
false
false
0
7
4
15
7
8
null
null
vTurbine/ghc
compiler/utils/Pretty.hs
bsd-3-clause
layLeft _ _ = panic "layLeft: Unhandled case"
62
layLeft _ _ = panic "layLeft: Unhandled case"
62
layLeft _ _ = panic "layLeft: Unhandled case"
62
false
false
0
5
24
14
6
8
null
null
accraze/discogs-haskell
src/Discogs/Actions/Artist.hs
mit
-- | Get all release information exposed for an artist with specified id -- -- GET \/artists\/:artistId\/releases -- -- @ -- runDiscogsAnon $ Discogs.Actions.getArtistReleases $ ArtistID "108713" -- @ getArtistReleases :: Monad m => ArtistID -> DiscogsT m ReleaseList getArtistReleases = runRoute . Route.getArtistRe...
326
getArtistReleases :: Monad m => ArtistID -> DiscogsT m ReleaseList getArtistReleases = runRoute . Route.getArtistReleases
121
getArtistReleases = runRoute . Route.getArtistReleases
54
true
true
0
8
47
46
24
22
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
hvstCpuTotal :: String hvstCpuTotal = "cpu_total"
49
hvstCpuTotal :: String hvstCpuTotal = "cpu_total"
49
hvstCpuTotal = "cpu_total"
26
false
true
0
4
5
11
6
5
null
null
dawedawe/kripkeweb
src/PostProcessing.hs
bsd-3-clause
isSubsiteUrl :: T.Text -> Bool isSubsiteUrl url = url /= getDomainAsText url
76
isSubsiteUrl :: T.Text -> Bool isSubsiteUrl url = url /= getDomainAsText url
76
isSubsiteUrl url = url /= getDomainAsText url
45
false
true
0
6
11
30
14
16
null
null
mrakgr/futhark
src/Futhark/Representation/Kernels/Kernel.hs
bsd-3-clause
consumedByKernelStm (GroupReduce _ _ _ input) = HS.fromList $ map snd input
77
consumedByKernelStm (GroupReduce _ _ _ input) = HS.fromList $ map snd input
77
consumedByKernelStm (GroupReduce _ _ _ input) = HS.fromList $ map snd input
77
false
false
0
7
13
32
15
17
null
null
jtapolczai/wumpus
Main.hs
apache-2.0
takeIncrementally :: Int -> (WorldStats -> WorldStats -> IO WorldStats) -> WorldStats -> MList IO (World, WorldStats) -> IO [WorldStats] takeIncrementally n _ _ _ | n <= 0 = return []
255
takeIncrementally :: Int -> (WorldStats -> WorldStats -> IO WorldStats) -> WorldStats -> MList IO (World, WorldStats) -> IO [WorldStats] takeIncrementally n _ _ _ | n <= 0 = return []
255
takeIncrementally n _ _ _ | n <= 0 = return []
46
false
true
0
10
103
82
40
42
null
null
dimara/ganeti
src/Ganeti/Utils.hs
bsd-2-clause
-- | Helper for 'niceSort'. Computes the key element for a given string. extractKey :: [Either Integer String] -- ^ Current (partial) key, reversed -> String -- ^ Remaining string -> ([Either Integer String], String) extractKey ek [] = (reverse ek, [])
293
extractKey :: [Either Integer String] -- ^ Current (partial) key, reversed -> String -- ^ Remaining string -> ([Either Integer String], String) extractKey ek [] = (reverse ek, [])
220
extractKey ek [] = (reverse ek, [])
35
true
true
0
9
82
62
34
28
null
null
jtdaugherty/vty
src/Graphics/Vty/Attributes/Color.hs
bsd-3-clause
cyan = ISOColor 6
19
cyan = ISOColor 6
19
cyan = ISOColor 6
19
false
false
1
5
5
13
4
9
null
null
danstiner/hfmt
src/Language/Haskell/Format/Utilities.hs
mit
showDiff :: HaskellSource -> HaskellSource -> String showDiff (HaskellSource _ a) (HaskellSource _ b) = render (toDoc diff) where toDoc = prettyContextDiff (text "Original") (text "Reformatted") text diff = getContextDiff linesOfContext (lines a) (lines b) linesOfContext = 1
289
showDiff :: HaskellSource -> HaskellSource -> String showDiff (HaskellSource _ a) (HaskellSource _ b) = render (toDoc diff) where toDoc = prettyContextDiff (text "Original") (text "Reformatted") text diff = getContextDiff linesOfContext (lines a) (lines b) linesOfContext = 1
289
showDiff (HaskellSource _ a) (HaskellSource _ b) = render (toDoc diff) where toDoc = prettyContextDiff (text "Original") (text "Reformatted") text diff = getContextDiff linesOfContext (lines a) (lines b) linesOfContext = 1
236
false
true
0
7
51
105
52
53
null
null
YueLiPicasso/unification
GenerateFOTE.hs
gpl-3.0
cNUFOTEc :: Gen NewFOTE -- Constant Symbol = Constant Symbol (different names) -- competition : 1 -> 1 cNUFOTEc = do c <- randomConstant let c2 = Constant (getName c ++ "o") return $ NF (c, c2)
205
cNUFOTEc :: Gen NewFOTE cNUFOTEc = do c <- randomConstant let c2 = Constant (getName c ++ "o") return $ NF (c, c2)
126
cNUFOTEc = do c <- randomConstant let c2 = Constant (getName c ++ "o") return $ NF (c, c2)
102
true
true
0
13
48
61
30
31
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
-- | The number of fields in the /representation/ of the constructor -- AFTER taking into account the unpacking of any unboxed tuple fields dataConRepRepArity :: DataCon -> RepArity dataConRepRepArity dc = typeRepArity (dataConRepArity dc) (dataConRepType dc)
259
dataConRepRepArity :: DataCon -> RepArity dataConRepRepArity dc = typeRepArity (dataConRepArity dc) (dataConRepType dc)
119
dataConRepRepArity dc = typeRepArity (dataConRepArity dc) (dataConRepType dc)
77
true
true
0
7
36
37
19
18
null
null
corajr/scalar-convert
src/Text/Pandoc/Readers/Scalar.hs
bsd-3-clause
-- | Read Scalar RDF/XML from an input string and return a Pandoc document. readScalar :: ReaderOptions -- ^ Pandoc HTML reader options -> ScalarOptions -- ^ Scalar options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> ScalarM Pandoc readScalar rOpts sOpts s = ...
482
readScalar :: ReaderOptions -- ^ Pandoc HTML reader options -> ScalarOptions -- ^ Scalar options -> String -- ^ String to parse (assuming @'\n'@ line endings) -> ScalarM Pandoc readScalar rOpts sOpts s = do rdf <- readScalarString s scalar <- parseScalar rdf sOpts scalarToP...
406
readScalar rOpts sOpts s = do rdf <- readScalarString s scalar <- parseScalar rdf sOpts scalarToPandoc rOpts scalar -- | Read Scalar RDF/XML from a file and return a Pandoc document.
189
true
true
0
8
120
68
33
35
null
null
YoEight/personal-site
Web/Controller.hs
gpl-3.0
loadArticleNames :: IO [String] loadArticleNames = do xs <- getDirectoryContents "articles" let filt path = path /= "." && path /= ".." cleaned = filter filt xs return cleaned
212
loadArticleNames :: IO [String] loadArticleNames = do xs <- getDirectoryContents "articles" let filt path = path /= "." && path /= ".." cleaned = filter filt xs return cleaned
212
loadArticleNames = do xs <- getDirectoryContents "articles" let filt path = path /= "." && path /= ".." cleaned = filter filt xs return cleaned
180
false
true
0
12
65
69
31
38
null
null
pack-it-forms/msgfmt
src/PackItForms/ICS213.hs
apache-2.0
fromMsgFmt :: ICS213Body a => MF.MsgFmt -> Msg a fromMsgFmt m = withFldFns m fromMsgFmtWithFldFns where fromMsgFmtWithFldFns fld fldE fldR eFld _ eFldR = Msg header body footer where header = Header { stationRole = role , myMsgNo = toMMN sdtpl_msgno ...
7,595
fromMsgFmt :: ICS213Body a => MF.MsgFmt -> Msg a fromMsgFmt m = withFldFns m fromMsgFmtWithFldFns where fromMsgFmtWithFldFns fld fldE fldR eFld _ eFldR = Msg header body footer where header = Header { stationRole = role , myMsgNo = toMMN sdtpl_msgno ...
7,595
fromMsgFmt m = withFldFns m fromMsgFmtWithFldFns where fromMsgFmtWithFldFns fld fldE fldR eFld _ eFldR = Msg header body footer where header = Header { stationRole = role , myMsgNo = toMMN sdtpl_msgno , otherMsgNo = sdtpl_othermsgno ...
7,546
false
true
0
15
4,201
1,607
805
802
null
null
0gajun/mal
haskell/step5_tco.hs
mpl-2.0
apply_ast ast@(MalList (MalSymbol "def!" : args) _) env = do case args of (a1@(MalSymbol _): a2 : []) -> do evaled <- eval a2 env liftIO $ env_set env a1 evaled _ -> throwStr "invalid def!"
235
apply_ast ast@(MalList (MalSymbol "def!" : args) _) env = do case args of (a1@(MalSymbol _): a2 : []) -> do evaled <- eval a2 env liftIO $ env_set env a1 evaled _ -> throwStr "invalid def!"
235
apply_ast ast@(MalList (MalSymbol "def!" : args) _) env = do case args of (a1@(MalSymbol _): a2 : []) -> do evaled <- eval a2 env liftIO $ env_set env a1 evaled _ -> throwStr "invalid def!"
235
false
false
0
14
81
102
49
53
null
null
imccoy/utopia
src/Lam.hs
mit
topLevelBindingNames :: (Ord i) => [BindingWithId i] -> Map Name i topLevelBindingNames = Map.fromList . catMaybes . map (\(Id.WithId topLevelId (Identity (Binding name contents))) -> (name,) <$> bindingContentsId topLevelId contents) where bindingContentsId _ (BindingExp exp) = Just . expTopId $ exp ...
444
topLevelBindingNames :: (Ord i) => [BindingWithId i] -> Map Name i topLevelBindingNames = Map.fromList . catMaybes . map (\(Id.WithId topLevelId (Identity (Binding name contents))) -> (name,) <$> bindingContentsId topLevelId contents) where bindingContentsId _ (BindingExp exp) = Just . expTopId $ exp ...
444
topLevelBindingNames = Map.fromList . catMaybes . map (\(Id.WithId topLevelId (Identity (Binding name contents))) -> (name,) <$> bindingContentsId topLevelId contents) where bindingContentsId _ (BindingExp exp) = Just . expTopId $ exp bindingContentsId topLevelId (BindingTypeish (Record _)) = Just to...
377
false
true
3
14
89
166
79
87
null
null
fmapfmapfmap/amazonka
amazonka-elb/gen/Network/AWS/ELB/CreateLoadBalancerListeners.hs
mpl-2.0
-- | The listeners. clblListeners :: Lens' CreateLoadBalancerListeners [Listener] clblListeners = lens _clblListeners (\ s a -> s{_clblListeners = a}) . _Coerce
160
clblListeners :: Lens' CreateLoadBalancerListeners [Listener] clblListeners = lens _clblListeners (\ s a -> s{_clblListeners = a}) . _Coerce
140
clblListeners = lens _clblListeners (\ s a -> s{_clblListeners = a}) . _Coerce
78
true
true
0
10
21
47
26
21
null
null
wangbj/haskell
quicksort.hs
bsd-2-clause
quicksort' a p r = do g <- getStdGen quicksortst a p r g return () --
75
quicksort' a p r = do g <- getStdGen quicksortst a p r g return () --
75
quicksort' a p r = do g <- getStdGen quicksortst a p r g return () --
75
false
false
0
8
22
41
18
23
null
null
ghorn/rawesome
wtfviz/src/KiteSim.hs
lgpl-3.0
planeZ :: Double planeZ = 1
27
planeZ :: Double planeZ = 1
27
planeZ = 1
10
false
true
0
4
5
11
6
5
null
null
travitch/language-python-builder
src/Language/Python/Common/Builder.hs
bsd-3-clause
funAS :: annot -> Ident annot -> [ParameterQ annot] -> Maybe (ExprQ annot) -> [StatementQ annot] -> StatementQ annot funAS annot name args resAnnot body = do args' <- sequence args resAnnot' <- T.sequence resAnnot body' <- sequence body return $ Fun name args' resAnnot' body' annot -- | A class declaration sta...
369
funAS :: annot -> Ident annot -> [ParameterQ annot] -> Maybe (ExprQ annot) -> [StatementQ annot] -> StatementQ annot funAS annot name args resAnnot body = do args' <- sequence args resAnnot' <- T.sequence resAnnot body' <- sequence body return $ Fun name args' resAnnot' body' annot -- | A class declaration sta...
369
funAS annot name args resAnnot body = do args' <- sequence args resAnnot' <- T.sequence resAnnot body' <- sequence body return $ Fun name args' resAnnot' body' annot -- | A class declaration statement -- -- > class Foo(superclass): -- > body
252
false
true
0
11
71
123
58
65
null
null
forste/haReFork
refactorer/RefacSimplify.hs
bsd-3-clause
convertModName m@(MainModule f) = modNameToStr m
48
convertModName m@(MainModule f) = modNameToStr m
48
convertModName m@(MainModule f) = modNameToStr m
48
false
false
0
8
5
21
10
11
null
null
jameshsmith/HRL
Server/Core/FOV.hs
mit
updateSeen :: UArray (Row, Col) Bool -> UArray (Row, Col) Bool -> UArray (Row, Col) Bool updateSeen visible seen = runSTUArray $ do seen' <- thaw seen forM_ (indices seen) $ \i -> when (visible ! i) (writeArray seen' i True) return seen' -- | Draw a bresenham line from a point to another point. Returns a ...
502
updateSeen :: UArray (Row, Col) Bool -> UArray (Row, Col) Bool -> UArray (Row, Col) Bool updateSeen visible seen = runSTUArray $ do seen' <- thaw seen forM_ (indices seen) $ \i -> when (visible ! i) (writeArray seen' i True) return seen' -- | Draw a bresenham line from a point to another point. Returns a ...
502
updateSeen visible seen = runSTUArray $ do seen' <- thaw seen forM_ (indices seen) $ \i -> when (visible ! i) (writeArray seen' i True) return seen' -- | Draw a bresenham line from a point to another point. Returns a -- list such that the first element is the first point, and the last -- is the last eleme...
413
false
true
0
12
106
124
63
61
null
null
bitemyapp/Haskell-Turtle-Library
src/Turtle/Prelude.hs
bsd-3-clause
procStrict :: MonadIO io => Text -- ^ Command -> [Text] -- ^ Arguments -> Shell Text -- ^ Lines of standard input -> io (ExitCode, Text) -- ^ Exit code and stdout procStrict cmd args = systemStrict (Process.proc (Text.unpack cmd) (map Text.unpack args))
293
procStrict :: MonadIO io => Text -- ^ Command -> [Text] -- ^ Arguments -> Shell Text -- ^ Lines of standard input -> io (ExitCode, Text) procStrict cmd args = systemStrict (Process.proc (Text.unpack cmd) (map Text.unpack args))
263
procStrict cmd args = systemStrict (Process.proc (Text.unpack cmd) (map Text.unpack args))
94
true
true
0
11
83
89
45
44
null
null
sopvop/snap-core
src/Snap/Internal/Parsing.hs
bsd-3-clause
----------------------- -- utility functions -- ----------------------- ------------------------------------------------------------------------------ unsafeFromHex :: (Enum a, Num a, Bits a) => ByteString -> a unsafeFromHex = S.foldl' f 0 where #if MIN_VERSION...
730
unsafeFromHex :: (Enum a, Num a, Bits a) => ByteString -> a unsafeFromHex = S.foldl' f 0 where #if MIN_VERSION_base(4,5,0) sl = unsafeShiftL #else sl = shiftL #endif f !cnt !i = sl cnt 4 .|. nybble i nybble c | c >= '0' && c <= '9' = toEnum $! fromEnum c - fromEnum '0' | c >= 'a' && c <...
522
unsafeFromHex = S.foldl' f 0 where #if MIN_VERSION_base(4,5,0) sl = unsafeShiftL #else sl = shiftL #endif f !cnt !i = sl cnt 4 .|. nybble i nybble c | c >= '0' && c <= '9' = toEnum $! fromEnum c - fromEnum '0' | c >= 'a' && c <= 'f' = toEnum $! 10 + fromEnum c - fromEnum 'a' ...
462
true
true
0
10
238
223
107
116
null
null
ezyang/ghc
compiler/vectorise/Vectorise/Utils/Hoisting.hs
bsd-3-clause
takeHoisted :: VM [(Var, CoreExpr)] takeHoisted = do env <- readGEnv id setGEnv $ env { global_bindings = [] } return $ global_bindings env
159
takeHoisted :: VM [(Var, CoreExpr)] takeHoisted = do env <- readGEnv id setGEnv $ env { global_bindings = [] } return $ global_bindings env
159
takeHoisted = do env <- readGEnv id setGEnv $ env { global_bindings = [] } return $ global_bindings env
123
false
true
1
11
43
64
30
34
null
null
brendanhay/gogol
gogol-androiddeviceprovisioning/gen/Network/Google/AndroidDeviceProvisioning/Types/Product.hs
mpl-2.0
-- | Required. The section type of the device\'s provisioning record. udrSectionType :: Lens' UnclaimDeviceRequest (Maybe UnclaimDeviceRequestSectionType) udrSectionType = lens _udrSectionType (\ s a -> s{_udrSectionType = a})
234
udrSectionType :: Lens' UnclaimDeviceRequest (Maybe UnclaimDeviceRequestSectionType) udrSectionType = lens _udrSectionType (\ s a -> s{_udrSectionType = a})
164
udrSectionType = lens _udrSectionType (\ s a -> s{_udrSectionType = a})
79
true
true
0
9
35
48
25
23
null
null
xmonad/xmonad-contrib
XMonad/Util/Stack.hs
bsd-3-clause
-- ** Extraction -- | Get the focused element getFocusZ :: Zipper a -> Maybe a getFocusZ = fmap W.focus
104
getFocusZ :: Zipper a -> Maybe a getFocusZ = fmap W.focus
57
getFocusZ = fmap W.focus
24
true
true
0
6
20
28
14
14
null
null
unclechu/xlib-keys-hack
src/Types.hs
gpl-3.0
numberToAlternativeModeLevel _ = Nothing
40
numberToAlternativeModeLevel _ = Nothing
40
numberToAlternativeModeLevel _ = Nothing
40
false
false
0
5
3
9
4
5
null
null
Lainepress/hledger
hledger-lib/Hledger/Data/Matching.hs
gpl-3.0
matchesTransaction (MatchNone) _ = False
40
matchesTransaction (MatchNone) _ = False
40
matchesTransaction (MatchNone) _ = False
40
false
false
0
5
4
16
7
9
null
null
yamadapc/butter-core
src/Butter/Core/Peer.hs
mit
sendCancel (BlockId idx bgn end) = sendPeerMessage (PWCancel idx bgn end)
75
sendCancel (BlockId idx bgn end) = sendPeerMessage (PWCancel idx bgn end)
75
sendCancel (BlockId idx bgn end) = sendPeerMessage (PWCancel idx bgn end)
75
false
false
0
7
12
33
15
18
null
null
MoritzR/CurseOfDestiny
app/Main.hs
gpl-3.0
toInt :: String -> Int toInt = read
35
toInt :: String -> Int toInt = read
35
toInt = read
12
false
true
0
5
7
15
8
7
null
null
uduki/hsQt
Qtc/Gui/QKeySequence.hs
bsd-2-clause
qKeySequenceKeyBindings :: ((StandardKey)) -> IO ([QKeySequence ()]) qKeySequenceKeyBindings (x1) = withQListObjectRefResult $ \arr -> qtc_QKeySequence_keyBindings (toCLong $ qEnum_toInt x1) arr
200
qKeySequenceKeyBindings :: ((StandardKey)) -> IO ([QKeySequence ()]) qKeySequenceKeyBindings (x1) = withQListObjectRefResult $ \arr -> qtc_QKeySequence_keyBindings (toCLong $ qEnum_toInt x1) arr
200
qKeySequenceKeyBindings (x1) = withQListObjectRefResult $ \arr -> qtc_QKeySequence_keyBindings (toCLong $ qEnum_toInt x1) arr
131
false
true
0
10
25
65
34
31
null
null
Peaker/bitmap
Data/Bitmap/Pure.hs
bsd-3-clause
ilinearResampleChannel :: PixelComponent t => Bitmap t -- ^ source image -> Int -- ^ source channel indexe -> Size -- ^ target image size -> Maybe Alignment -- ^ target image row alignment -> Bitmap t bilinearResampleChannel bm j siz malign = unsafePerformIO $ ...
364
bilinearResampleChannel :: PixelComponent t => Bitmap t -- ^ source image -> Int -- ^ source channel indexe -> Size -- ^ target image size -> Maybe Alignment -- ^ target image row alignment -> Bitmap t bilinearResampleChannel bm j siz malign = unsafePerformIO $ ...
362
bilinearResampleChannel bm j siz malign = unsafePerformIO $ IO.bilinearResampleChannel bm j siz malign
105
false
true
0
11
110
75
36
39
null
null
skeuchel/CoqPP
Language/Coq/Pretty.hs
bsd-3-clause
prettyType (Just tm) = [colon, pretty tm]
41
prettyType (Just tm) = [colon, pretty tm]
41
prettyType (Just tm) = [colon, pretty tm]
41
false
false
0
6
6
25
12
13
null
null
jean-edouard/manager
xenmgr/XenMgr/Expose/VmDiskObject.hs
gpl-2.0
_SetSnapshot id s = _modify_disk id $ \d -> d { diskSnapshotMode = Just $ enumMarshallReverse_ s }
103
_SetSnapshot id s = _modify_disk id $ \d -> d { diskSnapshotMode = Just $ enumMarshallReverse_ s }
103
_SetSnapshot id s = _modify_disk id $ \d -> d { diskSnapshotMode = Just $ enumMarshallReverse_ s }
103
false
false
0
10
22
39
19
20
null
null
ecaustin/haskhol-math
src/HaskHOL/Lib/IndTypes/Base.hs
bsd-2-clause
extendRectypeNet :: WFCtxt thry => (Text, (Int, HOLThm, HOLThm)) -> HOL Theory thry () extendRectypeNet (tyname, (_, _, rth)) = do ths1 <- liftM (:[]) (proveConstructorsDistinct rth) <|> return [] ths2 <- liftM (:[]) (proveConstructorsInjective rth) <|> return [] acid1 <- openLocalSt...
606
extendRectypeNet :: WFCtxt thry => (Text, (Int, HOLThm, HOLThm)) -> HOL Theory thry () extendRectypeNet (tyname, (_, _, rth)) = do ths1 <- liftM (:[]) (proveConstructorsDistinct rth) <|> return [] ths2 <- liftM (:[]) (proveConstructorsInjective rth) <|> return [] acid1 <- openLocalSt...
606
extendRectypeNet (tyname, (_, _, rth)) = do ths1 <- liftM (:[]) (proveConstructorsDistinct rth) <|> return [] ths2 <- liftM (:[]) (proveConstructorsInjective rth) <|> return [] acid1 <- openLocalStateHOL (DistinctnessStore []) updateHOL acid1 (AddDistinctnessStore tyname ths1) closeAcidS...
501
false
true
0
11
141
213
103
110
null
null
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Compiler/JMacro/Base.hs
mit
opText BAndOp = "&"
26
opText BAndOp = "&"
26
opText BAndOp = "&"
26
false
false
0
5
10
9
4
5
null
null
ComputationWithBoundedResources/tct-trs
src/Tct/Trs/Data/Rewriting.hs
bsd-3-clause
rewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Term f v -> [Term f v] rewrite trs = map RS.result . RS.fullRewrite trs
121
rewrite :: (Ord v', Eq v, Eq f) => [Rule f v'] -> Term f v -> [Term f v] rewrite trs = map RS.result . RS.fullRewrite trs
121
rewrite trs = map RS.result . RS.fullRewrite trs
48
false
true
0
9
27
78
38
40
null
null
arkon/courseography
hs/WebParsing/HtmlTable.hs
gpl-3.0
maybeFromAttrib str (Just tag) = Just $ fromAttrib str (head tag)
65
maybeFromAttrib str (Just tag) = Just $ fromAttrib str (head tag)
65
maybeFromAttrib str (Just tag) = Just $ fromAttrib str (head tag)
65
false
false
0
8
10
34
15
19
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CreateVpnConnectionRoute.hs
mpl-2.0
-- | 'CreateVpnConnectionRoute' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'cvcrDestinationCidrBlock' @::@ 'Text' -- -- * 'cvcrVpnConnectionId' @::@ 'Text' -- createVpnConnectionRoute :: Text -- ^ 'cvcrVpnConnectionId' -> Text -- ^ 'cvcrDestinationCidrBlo...
514
createVpnConnectionRoute :: Text -- ^ 'cvcrVpnConnectionId' -> Text -- ^ 'cvcrDestinationCidrBlock' -> CreateVpnConnectionRoute createVpnConnectionRoute p1 p2 = CreateVpnConnectionRoute { _cvcrVpnConnectionId = p1 , _cvcrDestinationCidrBlock = p2 }
315
createVpnConnectionRoute p1 p2 = CreateVpnConnectionRoute { _cvcrVpnConnectionId = p1 , _cvcrDestinationCidrBlock = p2 }
137
true
true
0
7
119
52
32
20
null
null
soenkehahn/quickcheck
Test/QuickCheck/All.hs
bsd-3-clause
-- | Test a polymorphic property, defaulting all type variables to 'Integer'. -- This is just a convenience function that combines 'verboseCheck' and 'monomorphic'. -- -- If you want to use 'polyVerboseCheck' in the same file where you defined the -- property, the same scoping problems pop up as in 'quickCheckAll': -- ...
447
polyVerboseCheck :: Name -> ExpQ polyVerboseCheck x = [| verboseCheck $(monomorphic x) |]
89
polyVerboseCheck x = [| verboseCheck $(monomorphic x) |]
56
true
true
0
5
71
27
18
9
null
null
lordxist/uroboro
src/Uroboro/Checker.hs
mit
checkPQ p (PQDes loc name args inner) s = do tinner <- checkPQ p inner s case find (match (tqReturnType tinner)) (destructors p) of Nothing -> failAt loc $ "Missing Definition: " ++ (typeName $ tqReturnType tinner) ++ "." ++ name Just (PTDes loc' returnType _ argTypes _) -> do ...
550
checkPQ p (PQDes loc name args inner) s = do tinner <- checkPQ p inner s case find (match (tqReturnType tinner)) (destructors p) of Nothing -> failAt loc $ "Missing Definition: " ++ (typeName $ tqReturnType tinner) ++ "." ++ name Just (PTDes loc' returnType _ argTypes _) -> do ...
550
checkPQ p (PQDes loc name args inner) s = do tinner <- checkPQ p inner s case find (match (tqReturnType tinner)) (destructors p) of Nothing -> failAt loc $ "Missing Definition: " ++ (typeName $ tqReturnType tinner) ++ "." ++ name Just (PTDes loc' returnType _ argTypes _) -> do ...
550
false
false
0
15
155
207
98
109
null
null
parapluu/encore
src/ir/AST/AST.hs
bsd-3-clause
capabilityFromTraitComposition (Just Disjunction{tcleft, tcright}) = capabilityFromTraitComposition (Just tcleft) `disjunctiveType` capabilityFromTraitComposition (Just tcright)
185
capabilityFromTraitComposition (Just Disjunction{tcleft, tcright}) = capabilityFromTraitComposition (Just tcleft) `disjunctiveType` capabilityFromTraitComposition (Just tcright)
185
capabilityFromTraitComposition (Just Disjunction{tcleft, tcright}) = capabilityFromTraitComposition (Just tcleft) `disjunctiveType` capabilityFromTraitComposition (Just tcright)
185
false
false
0
9
19
48
24
24
null
null
DanielWaterworth/Idris-dev
src/IRTS/CodegenLLVM.hs
bsd-3-clause
cgConst' (TT.B32V v) = C.Vector (map ((C.Int 32) . fromIntegral) . V.toList $ v)
80
cgConst' (TT.B32V v) = C.Vector (map ((C.Int 32) . fromIntegral) . V.toList $ v)
80
cgConst' (TT.B32V v) = C.Vector (map ((C.Int 32) . fromIntegral) . V.toList $ v)
80
false
false
0
14
13
53
26
27
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
inicParamsTypes :: Map String VType inicParamsTypes = Map.fromList [(inicBridge, VTypeMaybeString), (inicIp, VTypeMaybeString), (inicLink, VTypeString), (inicMac, VTypeString), (inicMode, VTypeString), (inicName, VTypeMaybeString), ...
408
inicParamsTypes :: Map String VType inicParamsTypes = Map.fromList [(inicBridge, VTypeMaybeString), (inicIp, VTypeMaybeString), (inicLink, VTypeString), (inicMac, VTypeString), (inicMode, VTypeString), (inicName, VTypeMaybeString), ...
408
inicParamsTypes = Map.fromList [(inicBridge, VTypeMaybeString), (inicIp, VTypeMaybeString), (inicLink, VTypeString), (inicMac, VTypeString), (inicMode, VTypeString), (inicName, VTypeMaybeString), (inicNetwork, VTypeMaybeSt...
372
false
true
0
7
137
93
58
35
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Creates a value of 'UnGroupObjectsRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ugorObjectIds' unGroupObjectsRequest :: UnGroupObjectsRequest unGroupObjectsRequest = UnGroupObjectsRequest' {_ugorObjectIds = Nothing...
321
unGroupObjectsRequest :: UnGroupObjectsRequest unGroupObjectsRequest = UnGroupObjectsRequest' {_ugorObjectIds = Nothing}
124
unGroupObjectsRequest = UnGroupObjectsRequest' {_ugorObjectIds = Nothing}
73
true
true
0
6
46
24
16
8
null
null
JerrySun/league-famous
Application.hs
bsd-2-clause
-- This function allocates resources (such as a database connection pool), -- performs initialization and creates a WAI application. This is also the -- place to put your migrate statements to have automatic database -- migrations handled by Yesod. makeApplication :: AcidState AppState -> AppConfig DefaultEnv Extra -> ...
731
makeApplication :: AcidState AppState -> AppConfig DefaultEnv Extra -> Logger -> IO Application makeApplication acid conf logger = do foundation <- makeFoundation acid conf setLogger app <- toWaiApp foundation return . logWare $ app where #ifdef DEVELOPMENT logWare = logCallbackDev (logBS setLogger) ...
482
makeApplication acid conf logger = do foundation <- makeFoundation acid conf setLogger app <- toWaiApp foundation return . logWare $ app where #ifdef DEVELOPMENT logWare = logCallbackDev (logBS setLogger) setLogger = logger #else setLogger = toProduction logger -- by default the logger is set ...
386
true
true
1
8
133
105
51
54
null
null
vTurbine/w3dhs
src/Resources/Map.hs
mit
unp ls [] = ls
20
unp ls [] = ls
20
unp ls [] = ls
20
false
false
0
6
10
13
6
7
null
null
keithodulaigh/Hets
CASL/RunMixfixParser.hs
gpl-2.0
myIdSets :: IdSets myIdSets = mkIdSets Set.empty (mkIds stdOpsL) stdPreds
73
myIdSets :: IdSets myIdSets = mkIdSets Set.empty (mkIds stdOpsL) stdPreds
73
myIdSets = mkIdSets Set.empty (mkIds stdOpsL) stdPreds
54
false
true
0
7
9
26
13
13
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/CycleRecentWS.hs
bsd-2-clause
-- $usage -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@ file: -- -- > import XMonad.Actions.CycleRecentWS -- > -- > , ((modm, xK_Tab), cycleRecentWS [xK_Alt_L] xK_Tab xK_grave) -- -- For detailed instructions on editing your key bindings, see -- "XMonad.Doc.Extending#Editing_key_bindin...
1,415
cycleRecentWS :: [KeySym] -- ^ A list of modifier keys used when invoking this action. -- As soon as one of them is released, the final switch is made. -> KeySym -- ^ Key used to switch to next (less recent) workspace. -> KeySym -- ^ Key used to switch to prev...
643
cycleRecentWS = cycleWindowSets options where options w = map (view `flip` w) (recentTags w) recentTags w = map tag $ tail (workspaces w) ++ [head (workspaces w)]
170
true
true
4
10
339
139
73
66
null
null