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
craynafinal/cs557_functional_languages
hw2/ch6.hs
mit
halve :: [a] -> ([a],[a]) halve xs = (take (midPoint xs) xs, drop (midPoint xs) xs)
83
halve :: [a] -> ([a],[a]) halve xs = (take (midPoint xs) xs, drop (midPoint xs) xs)
83
halve xs = (take (midPoint xs) xs, drop (midPoint xs) xs)
57
false
true
0
9
15
67
34
33
null
null
HIPERFIT/futhark
src/Futhark/Internalise/AccurateSizes.hs
isc
ensureResultExtShapeNoCtx :: ErrorMsg SubExp -> SrcLoc -> [ExtType] -> Result -> InternaliseM Result ensureResultExtShapeNoCtx msg loc rettype es = do es_ts <- mapM subExpResType es let ext_mapping = shapeExtMapping rettype es_ts rettype' = foldr (uncurry fixExt) rettype $ M.toList ext_mapping assertProperShape t (SubExpRes cs se) = let name = "result_proper_shape" in SubExpRes cs <$> ensureExtShape msg loc t name se zipWithM assertProperShape rettype' es
504
ensureResultExtShapeNoCtx :: ErrorMsg SubExp -> SrcLoc -> [ExtType] -> Result -> InternaliseM Result ensureResultExtShapeNoCtx msg loc rettype es = do es_ts <- mapM subExpResType es let ext_mapping = shapeExtMapping rettype es_ts rettype' = foldr (uncurry fixExt) rettype $ M.toList ext_mapping assertProperShape t (SubExpRes cs se) = let name = "result_proper_shape" in SubExpRes cs <$> ensureExtShape msg loc t name se zipWithM assertProperShape rettype' es
504
ensureResultExtShapeNoCtx msg loc rettype es = do es_ts <- mapM subExpResType es let ext_mapping = shapeExtMapping rettype es_ts rettype' = foldr (uncurry fixExt) rettype $ M.toList ext_mapping assertProperShape t (SubExpRes cs se) = let name = "result_proper_shape" in SubExpRes cs <$> ensureExtShape msg loc t name se zipWithM assertProperShape rettype' es
393
false
true
0
13
108
153
71
82
null
null
ChShersh/rogue-lang
src/Rogue/Verify/Verifier.hs
bsd-3-clause
verifyExpr (VarOrCall name args) = do globalFunNames <- ask if HS.member name globalFunNames then do validArgs <- mapM verifyExpr args return $ VarOrCall name validArgs else if not $ null args then error $ name ++ " is variable but applied to " ++ show args -- TODO: monadic exception else return $ VarExpr name
362
verifyExpr (VarOrCall name args) = do globalFunNames <- ask if HS.member name globalFunNames then do validArgs <- mapM verifyExpr args return $ VarOrCall name validArgs else if not $ null args then error $ name ++ " is variable but applied to " ++ show args -- TODO: monadic exception else return $ VarExpr name
362
verifyExpr (VarOrCall name args) = do globalFunNames <- ask if HS.member name globalFunNames then do validArgs <- mapM verifyExpr args return $ VarOrCall name validArgs else if not $ null args then error $ name ++ " is variable but applied to " ++ show args -- TODO: monadic exception else return $ VarExpr name
362
false
false
0
11
105
105
49
56
null
null
notogawa/VideoCore4
src/VideoCore4/QPU/Instruction/SemaphoreId.hs
bsd-3-clause
semaphore_14 :: SemaphoreId semaphore_14 = SemaphoreId 14
57
semaphore_14 :: SemaphoreId semaphore_14 = SemaphoreId 14
57
semaphore_14 = SemaphoreId 14
29
false
true
0
5
6
14
7
7
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M10/D26/Exercise.hs
mit
readArts :: FilePath -> IO [ArticleClass] readArts csvfile = undefined
70
readArts :: FilePath -> IO [ArticleClass] readArts csvfile = undefined
70
readArts csvfile = undefined
28
false
true
0
8
9
29
13
16
null
null
rueshyna/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
mpl-2.0
-- | [Required] BigQuery SQL query to execute. jcqQuery :: Lens' JobConfigurationQuery (Maybe Text) jcqQuery = lens _jcqQuery (\ s a -> s{_jcqQuery = a})
153
jcqQuery :: Lens' JobConfigurationQuery (Maybe Text) jcqQuery = lens _jcqQuery (\ s a -> s{_jcqQuery = a})
106
jcqQuery = lens _jcqQuery (\ s a -> s{_jcqQuery = a})
53
true
true
0
9
24
46
25
21
null
null
DougBurke/swish
tests/N3ParserTest.hs
lgpl-2.1
ds3 = Res $ makeNSScopedName dbase "s3"
39
ds3 = Res $ makeNSScopedName dbase "s3"
39
ds3 = Res $ makeNSScopedName dbase "s3"
39
false
false
3
5
6
20
7
13
null
null
5outh/Molecule
Parser.hs
gpl-2.0
opTable = [ [ binary "+" (:+:) AssocLeft , binary "|" (:|:) AssocLeft] , [app] ]
87
opTable = [ [ binary "+" (:+:) AssocLeft , binary "|" (:|:) AssocLeft] , [app] ]
87
opTable = [ [ binary "+" (:+:) AssocLeft , binary "|" (:|:) AssocLeft] , [app] ]
87
false
false
1
8
22
43
23
20
null
null
genos/Programming
workbench/ebmc/src/Main.hs
mit
url :: URL url = "https://twitter.com/search?q=from:%40evilbmcats"
66
url :: URL url = "https://twitter.com/search?q=from:%40evilbmcats"
66
url = "https://twitter.com/search?q=from:%40evilbmcats"
55
false
true
0
6
5
18
7
11
null
null
bennofs/vplan
src/Data/VPlan/Modifier/Limit.hs
gpl-3.0
-- | Limit another schedule to all the indices heigher than the given one greater :: (Ord i) => i -> s c i v -> Limit s c i v greater = Limit GT
144
greater :: (Ord i) => i -> s c i v -> Limit s c i v greater = Limit GT
70
greater = Limit GT
18
true
true
0
8
34
48
24
24
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFields/Delete.hs
mpl-2.0
-- | Creative Field ID cfdId :: Lens' CreativeFieldsDelete Int64 cfdId = lens _cfdId (\ s a -> s{_cfdId = a}) . _Coerce
121
cfdId :: Lens' CreativeFieldsDelete Int64 cfdId = lens _cfdId (\ s a -> s{_cfdId = a}) . _Coerce
98
cfdId = lens _cfdId (\ s a -> s{_cfdId = a}) . _Coerce
56
true
true
0
10
24
46
24
22
null
null
yyotti/euler_haskell
test/P035Spec.hs
mit
spec :: Spec spec = do describe "rotate" $ it "循環させる" $ do let input = [1, 10, 11, 12, 100, 101, 110, 211] let expected = [[1], [10, 1], [11, 11], [12, 21], [100, 1, 10], [101, 11, 110], [110, 101, 11], [211, 112, 121]] map P.rotate input `shouldBe` expected describe "solveBasic" $ it "N以下の循環素数の個数" $ map P.solveBasic [1,10,20,50,100] `shouldBe` [0,4,7,9,13]
550
spec :: Spec spec = do describe "rotate" $ it "循環させる" $ do let input = [1, 10, 11, 12, 100, 101, 110, 211] let expected = [[1], [10, 1], [11, 11], [12, 21], [100, 1, 10], [101, 11, 110], [110, 101, 11], [211, 112, 121]] map P.rotate input `shouldBe` expected describe "solveBasic" $ it "N以下の循環素数の個数" $ map P.solveBasic [1,10,20,50,100] `shouldBe` [0,4,7,9,13]
550
spec = do describe "rotate" $ it "循環させる" $ do let input = [1, 10, 11, 12, 100, 101, 110, 211] let expected = [[1], [10, 1], [11, 11], [12, 21], [100, 1, 10], [101, 11, 110], [110, 101, 11], [211, 112, 121]] map P.rotate input `shouldBe` expected describe "solveBasic" $ it "N以下の循環素数の個数" $ map P.solveBasic [1,10,20,50,100] `shouldBe` [0,4,7,9,13]
537
false
true
0
14
252
228
133
95
null
null
romanb/wai-route
src/Network/Wai/Route.hs
mpl-2.0
-- | An application that always yields an empty 400 Bad Request response. app400 :: App m app400 _rq k = k $ responseLBS status400 [] mempty
140
app400 :: App m app400 _rq k = k $ responseLBS status400 [] mempty
66
app400 _rq k = k $ responseLBS status400 [] mempty
50
true
true
2
6
26
39
17
22
null
null
mohsen3/Haskell4ScalaDevelopers
src/GettingStarted/IsSorted.hs
bsd-3-clause
isSorted (x:y:rest) ordered = ordered x y && isSorted (y:rest) ordered
70
isSorted (x:y:rest) ordered = ordered x y && isSorted (y:rest) ordered
70
isSorted (x:y:rest) ordered = ordered x y && isSorted (y:rest) ordered
70
false
false
0
8
10
44
21
23
null
null
janschulz/pandoc
src/Text/Pandoc/Parsing.hs
gpl-2.0
gridTableSplitLine :: [Int] -> String -> [String] gridTableSplitLine indices line = map removeFinalBar $ tail $ splitStringByIndices (init indices) $ trimr line
162
gridTableSplitLine :: [Int] -> String -> [String] gridTableSplitLine indices line = map removeFinalBar $ tail $ splitStringByIndices (init indices) $ trimr line
162
gridTableSplitLine indices line = map removeFinalBar $ tail $ splitStringByIndices (init indices) $ trimr line
112
false
true
0
7
23
61
29
32
null
null
siddhanathan/ghc
testsuite/tests/rename/should_fail/T2901.hs
bsd-3-clause
f = F.Foo { F.field = "" }
26
f = F.Foo { F.field = "" }
26
f = F.Foo { F.field = "" }
26
false
false
1
6
7
21
10
11
null
null
DaMSL/K3
src/Language/K3/Analysis/HMTypes/Inference.hs
apache-2.0
tdvext :: TDVEnv -> Identifier -> QTVarId -> TDVEnv tdvext env x v = BEnv.push env x v
86
tdvext :: TDVEnv -> Identifier -> QTVarId -> TDVEnv tdvext env x v = BEnv.push env x v
86
tdvext env x v = BEnv.push env x v
34
false
true
0
9
17
45
20
25
null
null
jgoerzen/hpodder
Utils.hs
gpl-2.0
lock func = do appdir <- getAppDir lockh <- openFile (appdir ++ "/.lock") WriteMode lockfd <- handleToFd lockh catch (placelock lockfd) errorhandler r <- finally func (releaselock lockfd) return r where placelock lockfd = setLock lockfd (WriteLock, AbsoluteSeek, 0, 0) releaselock lockfd = do setLock lockfd (Unlock, AbsoluteSeek, 0, 0) closeFd lockfd errorhandler _ = do putStrLn "Aborting because another hpodder is already running" exitFailure
571
lock func = do appdir <- getAppDir lockh <- openFile (appdir ++ "/.lock") WriteMode lockfd <- handleToFd lockh catch (placelock lockfd) errorhandler r <- finally func (releaselock lockfd) return r where placelock lockfd = setLock lockfd (WriteLock, AbsoluteSeek, 0, 0) releaselock lockfd = do setLock lockfd (Unlock, AbsoluteSeek, 0, 0) closeFd lockfd errorhandler _ = do putStrLn "Aborting because another hpodder is already running" exitFailure
571
lock func = do appdir <- getAppDir lockh <- openFile (appdir ++ "/.lock") WriteMode lockfd <- handleToFd lockh catch (placelock lockfd) errorhandler r <- finally func (releaselock lockfd) return r where placelock lockfd = setLock lockfd (WriteLock, AbsoluteSeek, 0, 0) releaselock lockfd = do setLock lockfd (Unlock, AbsoluteSeek, 0, 0) closeFd lockfd errorhandler _ = do putStrLn "Aborting because another hpodder is already running" exitFailure
571
false
false
2
10
189
162
75
87
null
null
ulricha/dsh
src/Database/DSH/Frontend/TupleTypes.hs
bsd-3-clause
mkTranslateTupleTerm :: Int -> Q Exp mkTranslateTupleTerm maxWidth = do lamArgName <- newName "tupleConst" matches <- mapM mkTranslateTermMatch [2..maxWidth] let lamBody = CaseE (VarE lamArgName) matches return $ LamE [VarP lamArgName] lamBody -------------------------------------------------------------------------------- -- Translation function for tuple types {- \t -> case t of Tuple3T t1 t2 t3 -> T.TupleT [translateType t1, translateType t2, translateType t3] -}
497
mkTranslateTupleTerm :: Int -> Q Exp mkTranslateTupleTerm maxWidth = do lamArgName <- newName "tupleConst" matches <- mapM mkTranslateTermMatch [2..maxWidth] let lamBody = CaseE (VarE lamArgName) matches return $ LamE [VarP lamArgName] lamBody -------------------------------------------------------------------------------- -- Translation function for tuple types {- \t -> case t of Tuple3T t1 t2 t3 -> T.TupleT [translateType t1, translateType t2, translateType t3] -}
497
mkTranslateTupleTerm maxWidth = do lamArgName <- newName "tupleConst" matches <- mapM mkTranslateTermMatch [2..maxWidth] let lamBody = CaseE (VarE lamArgName) matches return $ LamE [VarP lamArgName] lamBody -------------------------------------------------------------------------------- -- Translation function for tuple types {- \t -> case t of Tuple3T t1 t2 t3 -> T.TupleT [translateType t1, translateType t2, translateType t3] -}
460
false
true
0
12
84
89
42
47
null
null
jsavatgy/hatupist
code/helperCanvas.hs
gpl-2.0
zeroInterval = Interval { iNum = -1, iMrks = 0, iErrs = 0 }
61
zeroInterval = Interval { iNum = -1, iMrks = 0, iErrs = 0 }
61
zeroInterval = Interval { iNum = -1, iMrks = 0, iErrs = 0 }
61
false
false
0
7
15
28
17
11
null
null
homam/fsm-conversational-ui
src/QnA51.hs
bsd-3-clause
whatIsYourSizeQ :: Question Size whatIsYourSizeQ = Question "What is your size?" read
85
whatIsYourSizeQ :: Question Size whatIsYourSizeQ = Question "What is your size?" read
85
whatIsYourSizeQ = Question "What is your size?" read
52
false
true
1
5
11
22
9
13
null
null
ShigekiKarita/haskellSDL2Examples
src/lesson19.hs
gpl-2.0
size :: ScreenSize size = (640, 480)
36
size :: ScreenSize size = (640, 480)
36
size = (640, 480)
17
false
true
0
5
6
17
10
7
null
null
olive/antiqua-prime
src/Antiqua/Data/Array2d.hs
mit
-- | Fold left with index. foldl :: (a -> (XY, b) -> a) -> a -> Array2d b -> a foldl f x arr = Vec.foldl f x $ (toVec . zipWithIndex) arr
137
foldl :: (a -> (XY, b) -> a) -> a -> Array2d b -> a foldl f x arr = Vec.foldl f x $ (toVec . zipWithIndex) arr
110
foldl f x arr = Vec.foldl f x $ (toVec . zipWithIndex) arr
58
true
true
2
10
33
79
38
41
null
null
rglew/cis194
src/Week6Tests.hs
mit
main = do tastyTests
20
main = do tastyTests
20
main = do tastyTests
20
false
false
1
7
3
13
4
9
null
null
DanielSchiavini/ampersand
src/Database/Design/Ampersand/Test/Parser/QuickChecks.hs
gpl-3.0
prop_pretty :: P_Context -> Bool prop_pretty ctx = testParse prettyCtx eq where eq p = ctx == p || trace ("Printed versions are different: " ++ prettyCtx ++ "\n\n---------\n\n" ++ prettyPrint p) False prettyCtx = prettyPrint ctx
250
prop_pretty :: P_Context -> Bool prop_pretty ctx = testParse prettyCtx eq where eq p = ctx == p || trace ("Printed versions are different: " ++ prettyCtx ++ "\n\n---------\n\n" ++ prettyPrint p) False prettyCtx = prettyPrint ctx
250
prop_pretty ctx = testParse prettyCtx eq where eq p = ctx == p || trace ("Printed versions are different: " ++ prettyCtx ++ "\n\n---------\n\n" ++ prettyPrint p) False prettyCtx = prettyPrint ctx
217
false
true
0
12
58
72
35
37
null
null
yaxu/smooth
Pattern.hs
gpl-3.0
bits (_, Just 0) = []
21
bits (_, Just 0) = []
21
bits (_, Just 0) = []
21
false
false
0
7
5
20
10
10
null
null
epaulson10/HaskellDES
DES.hs
gpl-3.0
xorBool :: Bool -> Bool -> Bool xorBool True False = True
57
xorBool :: Bool -> Bool -> Bool xorBool True False = True
57
xorBool True False = True
25
false
true
0
6
11
24
12
12
null
null
tjakway/ghcjvm
compiler/ghci/ByteCodeInstr.hs
bsd-3-clause
bciStackUse CCALL{} = 0
37
bciStackUse CCALL{} = 0
37
bciStackUse CCALL{} = 0
37
false
false
0
6
17
13
6
7
null
null
nevrenato/Hets_Fork
Driver/WriteLibDefn.hs
gpl-2.0
writeShATermFile :: ShATermLG a => FilePath -> a -> IO () writeShATermFile fp atcon = toShATermString atcon >>= writeFile fp
124
writeShATermFile :: ShATermLG a => FilePath -> a -> IO () writeShATermFile fp atcon = toShATermString atcon >>= writeFile fp
124
writeShATermFile fp atcon = toShATermString atcon >>= writeFile fp
66
false
true
0
9
19
46
21
25
null
null
sunjay/reversi
src/Reversi/AI/Negamax.hs
mit
-- | Gets a move that the currentPiece should make for the given situation negamax :: Int -> AI negamax targetDepth rng game = fromJust $ snd $ negamax' (fst $ Rand.random rng) targetDepth (R.currentPiece game) $ gameTree game
226
negamax :: Int -> AI negamax targetDepth rng game = fromJust $ snd $ negamax' (fst $ Rand.random rng) targetDepth (R.currentPiece game) $ gameTree game
151
negamax targetDepth rng game = fromJust $ snd $ negamax' (fst $ Rand.random rng) targetDepth (R.currentPiece game) $ gameTree game
130
true
true
0
11
38
65
32
33
null
null
yemi/toon
app/Main.hs
bsd-3-clause
handleResource :: Maybe Resource -> IO (Maybe [Resource]) handleResource maybeResource = case maybeResource of Nothing -> return Nothing Just resource -> case resource of track@Track {} -> do withMPD clear addTrackToPlaylist track fetchRelatedTracks track _ -> return Nothing
305
handleResource :: Maybe Resource -> IO (Maybe [Resource]) handleResource maybeResource = case maybeResource of Nothing -> return Nothing Just resource -> case resource of track@Track {} -> do withMPD clear addTrackToPlaylist track fetchRelatedTracks track _ -> return Nothing
305
handleResource maybeResource = case maybeResource of Nothing -> return Nothing Just resource -> case resource of track@Track {} -> do withMPD clear addTrackToPlaylist track fetchRelatedTracks track _ -> return Nothing
247
false
true
2
10
67
100
45
55
null
null
evanrinehart/broccoli
Control/Broccoli/Eval.hs
bsd-3-clause
prop_snapshot3 :: Bool prop_snapshot3 = occs (SnapshotE 0 NowMinus (,) x e) == ans where e = occurs [(0, 'a'), (1, 'b'), (2, 'c')] x = TrapX 'z' (occurs [(0,'d'), (1,'e'), (2,'f')]) ans = [(0, ('z','a')), (1, ('d','b')), (2, ('e','c'))]
242
prop_snapshot3 :: Bool prop_snapshot3 = occs (SnapshotE 0 NowMinus (,) x e) == ans where e = occurs [(0, 'a'), (1, 'b'), (2, 'c')] x = TrapX 'z' (occurs [(0,'d'), (1,'e'), (2,'f')]) ans = [(0, ('z','a')), (1, ('d','b')), (2, ('e','c'))]
242
prop_snapshot3 = occs (SnapshotE 0 NowMinus (,) x e) == ans where e = occurs [(0, 'a'), (1, 'b'), (2, 'c')] x = TrapX 'z' (occurs [(0,'d'), (1,'e'), (2,'f')]) ans = [(0, ('z','a')), (1, ('d','b')), (2, ('e','c'))]
219
false
true
0
9
45
164
100
64
null
null
jdreaver/eventful
examples/bank/src/Bank/CLI/Options.hs
mit
parseOptions :: Parser Options parseOptions = Options <$> parseDatabaseFileOption <*> subparser ( command "create-customer" (info (helper <*> parseCreateCustomer) (progDesc "Create a customer")) <> command "view-account" (info (helper <*> parseViewAccount) (progDesc "View an account")) <> command "view-customer-accounts" (info (helper <*> parseViewCustomerAccounts) (progDesc "View all customer accounts")) <> command "open-account" (info (helper <*> parseOpenAccount) (progDesc "Open a new account")) <> command "transfer" (info (helper <*> parseTransfer) (progDesc "Transfer funds to an account")) )
631
parseOptions :: Parser Options parseOptions = Options <$> parseDatabaseFileOption <*> subparser ( command "create-customer" (info (helper <*> parseCreateCustomer) (progDesc "Create a customer")) <> command "view-account" (info (helper <*> parseViewAccount) (progDesc "View an account")) <> command "view-customer-accounts" (info (helper <*> parseViewCustomerAccounts) (progDesc "View all customer accounts")) <> command "open-account" (info (helper <*> parseOpenAccount) (progDesc "Open a new account")) <> command "transfer" (info (helper <*> parseTransfer) (progDesc "Transfer funds to an account")) )
631
parseOptions = Options <$> parseDatabaseFileOption <*> subparser ( command "create-customer" (info (helper <*> parseCreateCustomer) (progDesc "Create a customer")) <> command "view-account" (info (helper <*> parseViewAccount) (progDesc "View an account")) <> command "view-customer-accounts" (info (helper <*> parseViewCustomerAccounts) (progDesc "View all customer accounts")) <> command "open-account" (info (helper <*> parseOpenAccount) (progDesc "Open a new account")) <> command "transfer" (info (helper <*> parseTransfer) (progDesc "Transfer funds to an account")) )
600
false
true
0
16
98
174
87
87
null
null
nikki-and-the-robots/nikki
src/Base/Animation.hs
lgpl-3.0
-- | Returns the first element of the Animation. animationHead :: Animation a -> a animationHead (Animation (a : _) _ _ _ _) = a
128
animationHead :: Animation a -> a animationHead (Animation (a : _) _ _ _ _) = a
79
animationHead (Animation (a : _) _ _ _ _) = a
45
true
true
0
11
25
49
23
26
null
null
tjakway/ghcjvm
testsuite/tests/dependent/should_compile/dynamic-paper.hs
bsd-3-clause
lookupLessTyped :: forall a. Typeable a => TyMapLessTyped -> Maybe a lookupLessTyped = fromDynamic <=< Map.lookup (TypeRepX (typeRep :: TypeRep a))
152
lookupLessTyped :: forall a. Typeable a => TyMapLessTyped -> Maybe a lookupLessTyped = fromDynamic <=< Map.lookup (TypeRepX (typeRep :: TypeRep a))
152
lookupLessTyped = fromDynamic <=< Map.lookup (TypeRepX (typeRep :: TypeRep a))
81
false
true
0
10
25
54
27
27
null
null
urbanslug/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getRegister' dflags _ (CmmLit lit) = do let format = cmmTypeFormat (cmmLitType dflags lit) imm = litToImm lit code dst = unitOL (MOV format (OpImm imm) (OpReg dst)) return (Any format code)
220
getRegister' dflags _ (CmmLit lit) = do let format = cmmTypeFormat (cmmLitType dflags lit) imm = litToImm lit code dst = unitOL (MOV format (OpImm imm) (OpReg dst)) return (Any format code)
220
getRegister' dflags _ (CmmLit lit) = do let format = cmmTypeFormat (cmmLitType dflags lit) imm = litToImm lit code dst = unitOL (MOV format (OpImm imm) (OpReg dst)) return (Any format code)
220
false
false
0
14
62
94
44
50
null
null
x-y-z/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
-- | Reinstall those add-source dependencies that have been modified since -- we've last installed them. Assumes that we're working inside a sandbox. reinstallAddSourceDeps :: Verbosity -> ConfigFlags -> ConfigExFlags -> InstallFlags -> GlobalFlags -> FilePath -> IO WereDepsReinstalled reinstallAddSourceDeps verbosity configFlags' configExFlags installFlags globalFlags sandboxDir = topHandler' $ do let sandboxDistPref = sandboxBuildDir sandboxDir configFlags = configFlags' { configDistPref = Flag sandboxDistPref } haddockFlags = mempty { haddockDistPref = Flag sandboxDistPref } (comp, platform, conf) <- configCompilerAux' configFlags retVal <- newIORef NoDepsReinstalled withSandboxPackageInfo verbosity configFlags globalFlags comp platform conf sandboxDir $ \sandboxPkgInfo -> unless (null $ modifiedAddSourceDependencies sandboxPkgInfo) $ do let args :: InstallArgs args = ((configPackageDB' configFlags) ,(globalRepos globalFlags) ,comp, platform, conf ,UseSandbox sandboxDir, Just sandboxPkgInfo ,globalFlags, configFlags, configExFlags, installFlags ,haddockFlags) -- This can actually be replaced by a call to 'install', but we use a -- lower-level API because of layer separation reasons. Additionally, we -- might want to use some lower-level features this in the future. withSandboxBinDirOnSearchPath sandboxDir $ do installContext <- makeInstallContext verbosity args Nothing installPlan <- foldProgress logMsg die' return =<< makeInstallPlan verbosity args installContext processInstallPlan verbosity args installContext installPlan writeIORef retVal ReinstalledSomeDeps readIORef retVal where die' message = die (message ++ installFailedInSandbox) -- TODO: use a better error message, remove duplication. installFailedInSandbox = "Note: when using a sandbox, all packages are required to have consistent dependencies. Try reinstalling/unregistering the offending packages or recreating the sandbox." logMsg message rest = debugNoWrap verbosity message >> rest topHandler' = topHandlerWith $ \_ -> do warn verbosity "Couldn't reinstall some add-source dependencies." -- Here we can't know whether any deps have been reinstalled, so we have -- to be conservative. return ReinstalledSomeDeps -- | Produce a 'SandboxPackageInfo' and feed it to the given action. Note that -- we don't update the timestamp file here - this is done in -- 'postInstallActions'.
2,913
reinstallAddSourceDeps :: Verbosity -> ConfigFlags -> ConfigExFlags -> InstallFlags -> GlobalFlags -> FilePath -> IO WereDepsReinstalled reinstallAddSourceDeps verbosity configFlags' configExFlags installFlags globalFlags sandboxDir = topHandler' $ do let sandboxDistPref = sandboxBuildDir sandboxDir configFlags = configFlags' { configDistPref = Flag sandboxDistPref } haddockFlags = mempty { haddockDistPref = Flag sandboxDistPref } (comp, platform, conf) <- configCompilerAux' configFlags retVal <- newIORef NoDepsReinstalled withSandboxPackageInfo verbosity configFlags globalFlags comp platform conf sandboxDir $ \sandboxPkgInfo -> unless (null $ modifiedAddSourceDependencies sandboxPkgInfo) $ do let args :: InstallArgs args = ((configPackageDB' configFlags) ,(globalRepos globalFlags) ,comp, platform, conf ,UseSandbox sandboxDir, Just sandboxPkgInfo ,globalFlags, configFlags, configExFlags, installFlags ,haddockFlags) -- This can actually be replaced by a call to 'install', but we use a -- lower-level API because of layer separation reasons. Additionally, we -- might want to use some lower-level features this in the future. withSandboxBinDirOnSearchPath sandboxDir $ do installContext <- makeInstallContext verbosity args Nothing installPlan <- foldProgress logMsg die' return =<< makeInstallPlan verbosity args installContext processInstallPlan verbosity args installContext installPlan writeIORef retVal ReinstalledSomeDeps readIORef retVal where die' message = die (message ++ installFailedInSandbox) -- TODO: use a better error message, remove duplication. installFailedInSandbox = "Note: when using a sandbox, all packages are required to have consistent dependencies. Try reinstalling/unregistering the offending packages or recreating the sandbox." logMsg message rest = debugNoWrap verbosity message >> rest topHandler' = topHandlerWith $ \_ -> do warn verbosity "Couldn't reinstall some add-source dependencies." -- Here we can't know whether any deps have been reinstalled, so we have -- to be conservative. return ReinstalledSomeDeps -- | Produce a 'SandboxPackageInfo' and feed it to the given action. Note that -- we don't update the timestamp file here - this is done in -- 'postInstallActions'.
2,763
reinstallAddSourceDeps verbosity configFlags' configExFlags installFlags globalFlags sandboxDir = topHandler' $ do let sandboxDistPref = sandboxBuildDir sandboxDir configFlags = configFlags' { configDistPref = Flag sandboxDistPref } haddockFlags = mempty { haddockDistPref = Flag sandboxDistPref } (comp, platform, conf) <- configCompilerAux' configFlags retVal <- newIORef NoDepsReinstalled withSandboxPackageInfo verbosity configFlags globalFlags comp platform conf sandboxDir $ \sandboxPkgInfo -> unless (null $ modifiedAddSourceDependencies sandboxPkgInfo) $ do let args :: InstallArgs args = ((configPackageDB' configFlags) ,(globalRepos globalFlags) ,comp, platform, conf ,UseSandbox sandboxDir, Just sandboxPkgInfo ,globalFlags, configFlags, configExFlags, installFlags ,haddockFlags) -- This can actually be replaced by a call to 'install', but we use a -- lower-level API because of layer separation reasons. Additionally, we -- might want to use some lower-level features this in the future. withSandboxBinDirOnSearchPath sandboxDir $ do installContext <- makeInstallContext verbosity args Nothing installPlan <- foldProgress logMsg die' return =<< makeInstallPlan verbosity args installContext processInstallPlan verbosity args installContext installPlan writeIORef retVal ReinstalledSomeDeps readIORef retVal where die' message = die (message ++ installFailedInSandbox) -- TODO: use a better error message, remove duplication. installFailedInSandbox = "Note: when using a sandbox, all packages are required to have consistent dependencies. Try reinstalling/unregistering the offending packages or recreating the sandbox." logMsg message rest = debugNoWrap verbosity message >> rest topHandler' = topHandlerWith $ \_ -> do warn verbosity "Couldn't reinstall some add-source dependencies." -- Here we can't know whether any deps have been reinstalled, so we have -- to be conservative. return ReinstalledSomeDeps -- | Produce a 'SandboxPackageInfo' and feed it to the given action. Note that -- we don't update the timestamp file here - this is done in -- 'postInstallActions'.
2,521
true
true
0
18
842
398
201
197
null
null
expipiplus1/vulkan
src/Vulkan/Core10/Queue.hs
bsd-3-clause
deviceWaitIdle :: forall io . (MonadIO io) => -- | @device@ is the logical device to idle. Device -> io () deviceWaitIdle = deviceWaitIdleSafeOrUnsafe mkVkDeviceWaitIdleUnsafe
239
deviceWaitIdle :: forall io . (MonadIO io) => -- | @device@ is the logical device to idle. Device -> io () deviceWaitIdle = deviceWaitIdleSafeOrUnsafe mkVkDeviceWaitIdleUnsafe
239
deviceWaitIdle = deviceWaitIdleSafeOrUnsafe mkVkDeviceWaitIdleUnsafe
68
false
true
0
9
88
38
20
18
null
null
SavinaRoja/SavinaRoja.github.io
assets/centraldogma_algebraic.hs
mit
geneticCode (Codon Cytosine Guanosine Adenine ) = Arginine
60
geneticCode (Codon Cytosine Guanosine Adenine ) = Arginine
60
geneticCode (Codon Cytosine Guanosine Adenine ) = Arginine
60
false
false
0
7
9
19
9
10
null
null
mikeizbicki/histogram
src/dev.hs
bsd-3-clause
main=adv
8
main=adv
8
main=adv
8
false
false
0
4
0
6
3
3
null
null
tjakway/ghcjvm
compiler/llvmGen/LlvmCodeGen/Base.hs
bsd-3-clause
-- | Pointer width llvmPtrBits :: DynFlags -> Int llvmPtrBits dflags = widthInBits $ typeWidth $ gcWord dflags
110
llvmPtrBits :: DynFlags -> Int llvmPtrBits dflags = widthInBits $ typeWidth $ gcWord dflags
91
llvmPtrBits dflags = widthInBits $ typeWidth $ gcWord dflags
60
true
true
0
6
17
30
15
15
null
null
flocknroll/haskell_cis194
H12/Risk.hs
mit
makeRolls :: Int -> Rand StdGen [Int] makeRolls 0 = return []
61
makeRolls :: Int -> Rand StdGen [Int] makeRolls 0 = return []
61
makeRolls 0 = return []
23
false
true
0
7
11
31
15
16
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
elogDelayTest :: String elogDelayTest = Types.eLogTypeToRaw ELogDelayTest
73
elogDelayTest :: String elogDelayTest = Types.eLogTypeToRaw ELogDelayTest
73
elogDelayTest = Types.eLogTypeToRaw ELogDelayTest
49
false
true
0
6
6
16
8
8
null
null
ignuki/projecteuler
5/problem5.hs
gpl-3.0
runprogram :: Program s c a -> s -> c -> IO (a, s) runprogram p s c = runReaderT (runStateT p s) c
98
runprogram :: Program s c a -> s -> c -> IO (a, s) runprogram p s c = runReaderT (runStateT p s) c
98
runprogram p s c = runReaderT (runStateT p s) c
47
false
true
0
10
23
63
30
33
null
null
abailly/hsgames
game-server/src/GameServer/Clients/Player.hs
apache-2.0
playerLoop :: LoggerEnv IO -> ServerConnection IO -> Id -> InOut IO -> IO () playerLoop logger handle player io = do dat <- (fromJust . decode) `fmap` receive handle logInfo logger $ "[playing] received message " <> show dat <> " from server" m <- handleCommand dat io case m of Just response -> do logInfo logger $ "[playing] sending message " <> show response <> " to server" send handle (encode response) Nothing -> return () playerLoop logger handle player io
499
playerLoop :: LoggerEnv IO -> ServerConnection IO -> Id -> InOut IO -> IO () playerLoop logger handle player io = do dat <- (fromJust . decode) `fmap` receive handle logInfo logger $ "[playing] received message " <> show dat <> " from server" m <- handleCommand dat io case m of Just response -> do logInfo logger $ "[playing] sending message " <> show response <> " to server" send handle (encode response) Nothing -> return () playerLoop logger handle player io
499
playerLoop logger handle player io = do dat <- (fromJust . decode) `fmap` receive handle logInfo logger $ "[playing] received message " <> show dat <> " from server" m <- handleCommand dat io case m of Just response -> do logInfo logger $ "[playing] sending message " <> show response <> " to server" send handle (encode response) Nothing -> return () playerLoop logger handle player io
422
false
true
0
16
118
181
81
100
null
null
bergmark/purescript
src/Language/PureScript/CodeGen/Common.hs
mit
identCharToString '<' = "$less"
31
identCharToString '<' = "$less"
31
identCharToString '<' = "$less"
31
false
false
0
5
3
9
4
5
null
null
IreneKnapp/Faction
libfaction/tests/Test/Distribution/Version.hs
bsd-3-clause
-- | 'unionVersionIntervals' is commutative -- prop_unionVersionIntervals_commutative :: VersionIntervals -> VersionIntervals -> Bool prop_unionVersionIntervals_commutative = Laws.commutative unionVersionIntervals
254
prop_unionVersionIntervals_commutative :: VersionIntervals -> VersionIntervals -> Bool prop_unionVersionIntervals_commutative = Laws.commutative unionVersionIntervals
207
prop_unionVersionIntervals_commutative = Laws.commutative unionVersionIntervals
81
true
true
0
6
57
26
14
12
null
null
smaccm/capDL-tool
CapDL/PrintIsabelle.hs
bsd-2-clause
getObject :: ObjID -> ObjMap Word -> Maybe (KernelObject Word) getObject = Map.lookup
85
getObject :: ObjID -> ObjMap Word -> Maybe (KernelObject Word) getObject = Map.lookup
85
getObject = Map.lookup
22
false
true
0
9
12
33
16
17
null
null
alexliew/learn_you_a_haskell
code/hof.hs
unlicense
foldr' f initial (x:xs) = f x (foldr' f initial xs)
51
foldr' f initial (x:xs) = f x (foldr' f initial xs)
51
foldr' f initial (x:xs) = f x (foldr' f initial xs)
51
false
false
0
7
10
35
17
18
null
null
cies/gelatin
gelatin-gl/src/Gelatin/GL/Renderer.hs
bsd-3-clause
withVAO :: (GLuint -> IO b) -> IO b withVAO f = do [vao] <- allocaArray 1 $ \ptr -> do glGenVertexArrays 1 ptr peekArray 1 ptr glBindVertexArray vao r <- f vao glBindVertexArray vao return r
226
withVAO :: (GLuint -> IO b) -> IO b withVAO f = do [vao] <- allocaArray 1 $ \ptr -> do glGenVertexArrays 1 ptr peekArray 1 ptr glBindVertexArray vao r <- f vao glBindVertexArray vao return r
226
withVAO f = do [vao] <- allocaArray 1 $ \ptr -> do glGenVertexArrays 1 ptr peekArray 1 ptr glBindVertexArray vao r <- f vao glBindVertexArray vao return r
190
false
true
0
12
72
97
42
55
null
null
kmate/raw-feldspar
tests/Compilation.hs
bsd-3-clause
test_optionM :: Run () test_optionM = do vec <- manifestFresh $ fmap i2n (1...10) i <- readStd caseOptionM (funO vec i) printf (printf "%d\n")
172
test_optionM :: Run () test_optionM = do vec <- manifestFresh $ fmap i2n (1...10) i <- readStd caseOptionM (funO vec i) printf (printf "%d\n")
172
test_optionM = do vec <- manifestFresh $ fmap i2n (1...10) i <- readStd caseOptionM (funO vec i) printf (printf "%d\n")
149
false
true
0
11
53
70
33
37
null
null
Frefreak/hnem
src/Player.hs
bsd-3-clause
seekRelative :: Int -> MVar MpObject -> IO () seekRelative n = sendCommand ("seek " ++ show n ++ " 0")
102
seekRelative :: Int -> MVar MpObject -> IO () seekRelative n = sendCommand ("seek " ++ show n ++ " 0")
102
seekRelative n = sendCommand ("seek " ++ show n ++ " 0")
56
false
true
0
9
20
51
23
28
null
null
josefs/autosar
sem/tool/LaTeX.hs
bsd-3-clause
run :: (Print a, Show a) => Verbosity -> ParseFun a -> String -> IO () run v p s = let ts = P.myLexer s in case p ts of E.Bad s -> do putStrLn "\nParse Failed...\n" putStrLnV v "Tokens:" putStrLnV v $ show ts putStrLn s Sys.exitFailure E.Ok tree -> do putStrLnV v "\nParse Successful!" putStrLn (printTree tree) Sys.exitSuccess
534
run :: (Print a, Show a) => Verbosity -> ParseFun a -> String -> IO () run v p s = let ts = P.myLexer s in case p ts of E.Bad s -> do putStrLn "\nParse Failed...\n" putStrLnV v "Tokens:" putStrLnV v $ show ts putStrLn s Sys.exitFailure E.Ok tree -> do putStrLnV v "\nParse Successful!" putStrLn (printTree tree) Sys.exitSuccess
534
run v p s = let ts = P.myLexer s in case p ts of E.Bad s -> do putStrLn "\nParse Failed...\n" putStrLnV v "Tokens:" putStrLnV v $ show ts putStrLn s Sys.exitFailure E.Ok tree -> do putStrLnV v "\nParse Successful!" putStrLn (printTree tree) Sys.exitSuccess
463
false
true
0
14
267
166
71
95
null
null
tilltheis/propositional-logic
src/App.hs
bsd-3-clause
analyzeFormula _ = do formulaStr <- withElem "formulaInput" $ \el -> getProp el "value" case formula formulaStr of Left (pos, msg) -> alert $ "error at character " ++ show pos ++ ": " ++ msg Right x -> let normal = mkNormal x nnf = mkNNF normal cnf = mkCNF nnf scnf = simplifyCNF cnf dnf = mkDNF nnf sdnf = simplifyDNF dnf simplified = simplify x in do withElem "cnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString cnf withElem "scnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString scnf withElem "dnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString dnf withElem "sdnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString sdnf withElem "nnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString nnf withElem "simplifiedCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString simplified
1,147
analyzeFormula _ = do formulaStr <- withElem "formulaInput" $ \el -> getProp el "value" case formula formulaStr of Left (pos, msg) -> alert $ "error at character " ++ show pos ++ ": " ++ msg Right x -> let normal = mkNormal x nnf = mkNNF normal cnf = mkCNF nnf scnf = simplifyCNF cnf dnf = mkDNF nnf sdnf = simplifyDNF dnf simplified = simplify x in do withElem "cnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString cnf withElem "scnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString scnf withElem "dnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString dnf withElem "sdnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString sdnf withElem "nnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString nnf withElem "simplifiedCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString simplified
1,147
analyzeFormula _ = do formulaStr <- withElem "formulaInput" $ \el -> getProp el "value" case formula formulaStr of Left (pos, msg) -> alert $ "error at character " ++ show pos ++ ": " ++ msg Right x -> let normal = mkNormal x nnf = mkNNF normal cnf = mkCNF nnf scnf = simplifyCNF cnf dnf = mkDNF nnf sdnf = simplifyDNF dnf simplified = simplify x in do withElem "cnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString cnf withElem "scnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString scnf withElem "dnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString dnf withElem "sdnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString sdnf withElem "nnfCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString nnf withElem "simplifiedCode" $ \el -> setProp el "innerHTML" $ prettyFormulaString simplified
1,147
false
false
0
17
450
311
142
169
null
null
kumasento/accelerate
Data/Array/Accelerate/Analysis/Match.hs
bsd-3-clause
matchPrimFun' (PrimExpFloating _) (PrimExpFloating _) = Just REFL
71
matchPrimFun' (PrimExpFloating _) (PrimExpFloating _) = Just REFL
71
matchPrimFun' (PrimExpFloating _) (PrimExpFloating _) = Just REFL
71
false
false
0
7
13
26
12
14
null
null
capitanbatata/sandbox
receiving-strings-via-sockets/test/Network/TextViaSocketsSpec.hs
gpl-3.0
blockedOnSTM :: Selector BlockedIndefinitelyOnSTM blockedOnSTM = const True
75
blockedOnSTM :: Selector BlockedIndefinitelyOnSTM blockedOnSTM = const True
75
blockedOnSTM = const True
25
false
true
1
5
7
20
8
12
null
null
Michaelt293/Lipid-Haskell
src/Lipid/Parsers/Blocks.hs
gpl-3.0
threeCombinedRadylsP :: Parser a -> Parser (ThreeCombinedRadyls a) threeCombinedRadylsP p = do (ls, cs, numDb, dbs) <- combinedRadylP p return . ThreeCombinedRadyls ls $ ThreeCombinedChains cs numDb dbs
206
threeCombinedRadylsP :: Parser a -> Parser (ThreeCombinedRadyls a) threeCombinedRadylsP p = do (ls, cs, numDb, dbs) <- combinedRadylP p return . ThreeCombinedRadyls ls $ ThreeCombinedChains cs numDb dbs
206
threeCombinedRadylsP p = do (ls, cs, numDb, dbs) <- combinedRadylP p return . ThreeCombinedRadyls ls $ ThreeCombinedChains cs numDb dbs
139
false
true
0
9
31
73
35
38
null
null
m-lopez/jack
test/EvaluatorSpec.hs
mit
mkPassingEvalTest :: EvalEqTest -> Test mkPassingEvalTest x = TestCase $ assertBool name cond where e = getUneval x v = evalExpr builtinsCtx e expe = getExpectedValue x name = show e ++ " --> " ++ show expe cond = applyRelation areStructurallyEqualExpr (mkSuccess expe) v
299
mkPassingEvalTest :: EvalEqTest -> Test mkPassingEvalTest x = TestCase $ assertBool name cond where e = getUneval x v = evalExpr builtinsCtx e expe = getExpectedValue x name = show e ++ " --> " ++ show expe cond = applyRelation areStructurallyEqualExpr (mkSuccess expe) v
299
mkPassingEvalTest x = TestCase $ assertBool name cond where e = getUneval x v = evalExpr builtinsCtx e expe = getExpectedValue x name = show e ++ " --> " ++ show expe cond = applyRelation areStructurallyEqualExpr (mkSuccess expe) v
259
false
true
0
7
72
93
45
48
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLSourceElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLSourceElement.type Mozilla HTMLSourceElement.type documentation> setType :: (MonadDOM m, ToJSString val) => HTMLSourceElement -> val -> m () setType self val = liftDOM (self ^. jss "type" (toJSVal val))
270
setType :: (MonadDOM m, ToJSString val) => HTMLSourceElement -> val -> m () setType self val = liftDOM (self ^. jss "type" (toJSVal val))
145
setType self val = liftDOM (self ^. jss "type" (toJSVal val))
61
true
true
0
10
38
70
34
36
null
null
synsem/texhs
src/Text/TeX/Context/Walk.hs
gpl-3.0
-- | @sepBy p sep@ parses one or more occurrences of @p@, -- separated by @sep@. Returns a list of values returned by @p@. sepBy1 :: Parser a -> Parser b -> Parser [a] sepBy1 p sep = (:) <$> p <*> list sep p
207
sepBy1 :: Parser a -> Parser b -> Parser [a] sepBy1 p sep = (:) <$> p <*> list sep p
84
sepBy1 p sep = (:) <$> p <*> list sep p
39
true
true
0
8
44
53
27
26
null
null
dmbarbour/Sirea
src/Sirea/Internal/B0Dynamic.hs
bsd-3-clause
-- regular updates dynSigUpdate :: (Monad m) => Dyn m a -> StableT -> T -> Sig a -> m () dynSigUpdate d@(Dyn rf) tS tU su = readRef rf >>= \ dyn -> let st = dyn_signal dyn in assert (st_expect st) $ let bWait = dyn_btouch dyn in let st' = st_update tS tU su st in let tmup' = Just $! maybe tU (min tU) (dyn_tmup dyn) in let dyn' = dyn { dyn_signal = st', dyn_tmup = tmup' } in writeRef' rf dyn' >> unless bWait (dynEmit d)
458
dynSigUpdate :: (Monad m) => Dyn m a -> StableT -> T -> Sig a -> m () dynSigUpdate d@(Dyn rf) tS tU su = readRef rf >>= \ dyn -> let st = dyn_signal dyn in assert (st_expect st) $ let bWait = dyn_btouch dyn in let st' = st_update tS tU su st in let tmup' = Just $! maybe tU (min tU) (dyn_tmup dyn) in let dyn' = dyn { dyn_signal = st', dyn_tmup = tmup' } in writeRef' rf dyn' >> unless bWait (dynEmit d)
439
dynSigUpdate d@(Dyn rf) tS tU su = readRef rf >>= \ dyn -> let st = dyn_signal dyn in assert (st_expect st) $ let bWait = dyn_btouch dyn in let st' = st_update tS tU su st in let tmup' = Just $! maybe tU (min tU) (dyn_tmup dyn) in let dyn' = dyn { dyn_signal = st', dyn_tmup = tmup' } in writeRef' rf dyn' >> unless bWait (dynEmit d)
369
true
true
0
21
127
220
106
114
null
null
rueshyna/gogol
gogol-youtube-reporting/gen/Network/Google/Resource/YouTubeReporting/Media/Download.hs
mpl-2.0
-- | V1 error format. mdXgafv :: Lens' MediaDownload' (Maybe Xgafv) mdXgafv = lens _mdXgafv (\ s a -> s{_mdXgafv = a})
118
mdXgafv :: Lens' MediaDownload' (Maybe Xgafv) mdXgafv = lens _mdXgafv (\ s a -> s{_mdXgafv = a})
96
mdXgafv = lens _mdXgafv (\ s a -> s{_mdXgafv = a})
50
true
true
1
9
21
52
25
27
null
null
nickspinale/24-bit
src/Data/Word/Word24/Utils.hs
mit
fromOctets :: Word8 -> Word8 -> Word8 -> Word24 fromOctets a b c = fromIntegral a .|. (fromIntegral b `shiftR` 8) .|. (fromIntegral c `shiftR` 16)
179
fromOctets :: Word8 -> Word8 -> Word8 -> Word24 fromOctets a b c = fromIntegral a .|. (fromIntegral b `shiftR` 8) .|. (fromIntegral c `shiftR` 16)
179
fromOctets a b c = fromIntegral a .|. (fromIntegral b `shiftR` 8) .|. (fromIntegral c `shiftR` 16)
131
false
true
0
9
58
65
34
31
null
null
jeffreyrosenbluth/Othello
src/AI.hs
bsd-3-clause
frontierY :: Array Int Int frontierY = listArray (1, 8) [0, 1, 1, 1, 0, -1, -1, -1]
83
frontierY :: Array Int Int frontierY = listArray (1, 8) [0, 1, 1, 1, 0, -1, -1, -1]
83
frontierY = listArray (1, 8) [0, 1, 1, 1, 0, -1, -1, -1]
56
false
true
0
7
17
57
33
24
null
null
ryantrinkle/ghcjs
src/Gen2/Prim.hs
mit
genPrim _ _ ReadOffAddrOp_WideChar [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getUint32(`o`+(`i`<<2),true); |]
112
genPrim _ _ ReadOffAddrOp_WideChar [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getUint32(`o`+(`i`<<2),true); |]
112
genPrim _ _ ReadOffAddrOp_WideChar [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getUint32(`o`+(`i`<<2),true); |]
112
false
false
3
6
15
39
21
18
null
null
alvisespano/Lw
extras/hml-prototype/PPrint.hs
gpl-3.0
column f = Column f
26
column f = Column f
26
column f = Column f
26
false
false
0
5
11
12
5
7
null
null
atemerev/icfpc2013
src/sexp-select/sexp-select.hs
apache-2.0
-- Special case for record field select (Named name) (List [Atom key, value]) | key == name = return value
106
select (Named name) (List [Atom key, value]) | key == name = return value
73
select (Named name) (List [Atom key, value]) | key == name = return value
73
true
false
0
8
19
48
22
26
null
null
tabemann/botwars
src/Robots/Genetic/HunterKiller/Intrinsics.hs
bsd-3-clause
valueEqual (RobotFloat x) (RobotFloat y) = x == y
49
valueEqual (RobotFloat x) (RobotFloat y) = x == y
49
valueEqual (RobotFloat x) (RobotFloat y) = x == y
49
false
false
1
8
8
31
13
18
null
null
acowley/ghc
compiler/utils/Serialized.hs
bsd-3-clause
serializeConstr (FloatConstr r) = serializeWord8 3 . serializeRational r
73
serializeConstr (FloatConstr r) = serializeWord8 3 . serializeRational r
73
serializeConstr (FloatConstr r) = serializeWord8 3 . serializeRational r
73
false
false
0
7
9
25
11
14
null
null
wavewave/lhc-analysis-collection
lib/HEP/Physics/Analysis/Common/XSecNTotNum.hs
gpl-3.0
getXSecNCount :: XSecType -> WebDAVConfig -> WebDAVRemoteDir -> String -> IO (Maybe CrossSectionAndCount) getXSecNCount xsectyp wdavcfg wdavrdir bname = do print bname runMaybeT $ do x <- MaybeT $ xsec xsectyp wdavcfg wdavrdir bname c <- MaybeT $ count wdavcfg wdavrdir bname return (CrossSectionAndCount x c) -- | get cross section in pb unit
404
getXSecNCount :: XSecType -> WebDAVConfig -> WebDAVRemoteDir -> String -> IO (Maybe CrossSectionAndCount) getXSecNCount xsectyp wdavcfg wdavrdir bname = do print bname runMaybeT $ do x <- MaybeT $ xsec xsectyp wdavcfg wdavrdir bname c <- MaybeT $ count wdavcfg wdavrdir bname return (CrossSectionAndCount x c) -- | get cross section in pb unit
404
getXSecNCount xsectyp wdavcfg wdavrdir bname = do print bname runMaybeT $ do x <- MaybeT $ xsec xsectyp wdavcfg wdavrdir bname c <- MaybeT $ count wdavcfg wdavrdir bname return (CrossSectionAndCount x c) -- | get cross section in pb unit
298
false
true
0
13
114
116
52
64
null
null
gfontenot/hfold
src/Reflow/Parser.hs
mit
pgpBlock :: Parser Content pgpBlock = fmap PGPBlock $ blockContents pgpBlockStart pgpBlockContents pgpBlockEnd
114
pgpBlock :: Parser Content pgpBlock = fmap PGPBlock $ blockContents pgpBlockStart pgpBlockContents pgpBlockEnd
114
pgpBlock = fmap PGPBlock $ blockContents pgpBlockStart pgpBlockContents pgpBlockEnd
87
false
true
3
5
16
32
13
19
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebGL2RenderingContext.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext.getFragDataLocation Mozilla WebGL2RenderingContext.getFragDataLocation documentation> getFragDataLocation_ :: (MonadDOM m, ToJSString name) => WebGL2RenderingContext -> Maybe WebGLProgram -> name -> m () getFragDataLocation_ self program name = liftDOM (void (self ^. jsf "getFragDataLocation" [toJSVal program, toJSVal name]))
479
getFragDataLocation_ :: (MonadDOM m, ToJSString name) => WebGL2RenderingContext -> Maybe WebGLProgram -> name -> m () getFragDataLocation_ self program name = liftDOM (void (self ^. jsf "getFragDataLocation" [toJSVal program, toJSVal name]))
314
getFragDataLocation_ self program name = liftDOM (void (self ^. jsf "getFragDataLocation" [toJSVal program, toJSVal name]))
152
true
true
0
11
110
87
43
44
null
null
bixuanzju/fcore
lib/archive/ClosureFNew.hs
bsd-2-clause
prettyExpr p i (Lam _ e) = nest 2 (text "Lam(" <$> prettyScope p i e) <$> text ")"
82
prettyExpr p i (Lam _ e) = nest 2 (text "Lam(" <$> prettyScope p i e) <$> text ")"
82
prettyExpr p i (Lam _ e) = nest 2 (text "Lam(" <$> prettyScope p i e) <$> text ")"
82
false
false
0
9
18
50
23
27
null
null
awpr/wai
wai-extra/Network/Wai/Middleware/RequestLogger.hs
mit
recordChunks :: IORef B.Builder -> Response -> IO Response recordChunks i (ResponseStream s h sb) = return . ResponseStream s h $ (\send flush -> sb (\b -> modifyIORef i (<> b) >> send b) flush)
196
recordChunks :: IORef B.Builder -> Response -> IO Response recordChunks i (ResponseStream s h sb) = return . ResponseStream s h $ (\send flush -> sb (\b -> modifyIORef i (<> b) >> send b) flush)
196
recordChunks i (ResponseStream s h sb) = return . ResponseStream s h $ (\send flush -> sb (\b -> modifyIORef i (<> b) >> send b) flush)
137
false
true
0
13
37
94
47
47
null
null
toddmohney/tracker_radiator
Pivotal/Test.hs
mit
getJSON :: IO BS.ByteString getJSON = BS.readFile "simple.json"
66
getJSON :: IO BS.ByteString getJSON = BS.readFile "simple.json"
64
getJSON = BS.readFile "simple.json"
36
false
true
0
7
10
27
11
16
null
null
nomicflux/threals
src/Threal/Threals.hs
gpl-2.0
blueArrow = Threal [tzero] [tzero] [star]
41
blueArrow = Threal [tzero] [tzero] [star]
41
blueArrow = Threal [tzero] [tzero] [star]
41
false
false
0
6
5
22
12
10
null
null
aelve/ilist
src/Data/List/Index.hs
bsd-3-clause
{- Left to do: Functions ~~~~~~~~~ alterF or something? iscanl iscanl' iscanl1 iscanr iscanr1 iiterate? backpermute? minIndex/maxIndex? -} {- | 'indexed' pairs each element with its index. >>> indexed "hello" [(0,'h'),(1,'e'),(2,'l'),(3,'l'),(4,'o')] /Subject to fusion./ -} indexed :: [a] -> [(Int, a)] indexed xs = go 0# xs where go i (a:as) = (I# i, a) : go (i +# 1#) as go _ _ = []
409
indexed :: [a] -> [(Int, a)] indexed xs = go 0# xs where go i (a:as) = (I# i, a) : go (i +# 1#) as go _ _ = []
126
indexed xs = go 0# xs where go i (a:as) = (I# i, a) : go (i +# 1#) as go _ _ = []
97
true
true
0
8
89
94
50
44
null
null
beni55/cartel
lib/Cartel/Ast.hs
bsd-3-clause
bsd4 = BSD4
11
bsd4 = BSD4
11
bsd4 = BSD4
11
false
false
0
4
2
6
3
3
null
null
emaphis/Haskell-Practice
cis194/src/Misc/Dates.hs
bsd-3-clause
-- (2008,10,22) sd2 :: String sd2 = show d1
45
sd2 :: String sd2 = show d1
28
sd2 = show d1
14
true
true
0
6
10
22
9
13
null
null
timsears/species
Math/Combinatorics/Species/Types.hs
bsd-3-clause
liftCI2 :: (MVP.T Rational -> MVP.T Rational -> MVP.T Rational) -> CycleIndex -> CycleIndex -> CycleIndex liftCI2 f (CI x) (CI y) = CI (f x y)
150
liftCI2 :: (MVP.T Rational -> MVP.T Rational -> MVP.T Rational) -> CycleIndex -> CycleIndex -> CycleIndex liftCI2 f (CI x) (CI y) = CI (f x y)
150
liftCI2 f (CI x) (CI y) = CI (f x y)
36
false
true
0
10
34
79
38
41
null
null
qsn/rhcalc
src/Core.hs
mit
findfct :: String -> Maybe CoreFct findfct name = Map.lookup name functions
75
findfct :: String -> Maybe CoreFct findfct name = Map.lookup name functions
75
findfct name = Map.lookup name functions
40
false
true
0
7
11
33
14
19
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
buildTime SpecialCrashedNoradII = 4800
38
buildTime SpecialCrashedNoradII = 4800
38
buildTime SpecialCrashedNoradII = 4800
38
false
false
0
5
3
9
4
5
null
null
olsner/ghc
compiler/basicTypes/NameSet.hs
bsd-3-clause
plusFVs = unionNameSets
27
plusFVs = unionNameSets
27
plusFVs = unionNameSets
27
false
false
1
5
6
10
3
7
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Dictionary.hs
gpl-3.0
bodypartexamined :: String -> Element bodypartexamined = cs $ tag (TagGroup 0x0018) (TagElement 0x0015)
103
bodypartexamined :: String -> Element bodypartexamined = cs $ tag (TagGroup 0x0018) (TagElement 0x0015)
103
bodypartexamined = cs $ tag (TagGroup 0x0018) (TagElement 0x0015)
65
false
true
2
7
13
43
19
24
null
null
uuhan/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
processInput :: String -> IState -> [FilePath] -> FilePath -> Idris (Maybe [FilePath]) processInput cmd orig inputs efile = do i <- getIState let opts = idris_options i let quiet = opt_quiet opts let fn = fromMaybe "" (listToMaybe inputs) c <- colourise case parseCmd i "(input)" cmd of Failure (ErrInfo err _) -> do iputStrLn $ show (fixColour c err) return (Just inputs) Success (Right Reload) -> reload orig inputs Success (Right Watch) -> if null inputs then do iputStrLn "No loaded files to watch." return (Just inputs) else do iputStrLn efile iputStrLn $ "Watching for .idr changes in " ++ show inputs ++ ", press enter to cancel." watch orig inputs Success (Right (Load f toline)) -> -- The $!! here prevents a space leak on reloading. -- This isn't a solution - but it's a temporary stopgap. -- See issue #2386 do putIState $!! orig { idris_options = idris_options i , idris_colourTheme = idris_colourTheme i } clearErr mod <- loadInputs [f] toline return (Just mod) Success (Right (ModImport f)) -> do clearErr fmod <- loadModule f (IBC_REPL True) return (Just (inputs ++ maybe [] (:[]) fmod)) Success (Right Edit) -> do -- takeMVar stvar edit efile orig return (Just inputs) Success (Right Proofs) -> do proofs orig return (Just inputs) Success (Right Quit) -> do when (not quiet) (iputStrLn "Bye bye") return Nothing Success (Right cmd ) -> do idrisCatch (process fn cmd) (\e -> do msg <- showErr e ; iputStrLn msg) return (Just inputs) Success (Left err) -> do runIO $ putStrLn err return (Just inputs)
2,403
processInput :: String -> IState -> [FilePath] -> FilePath -> Idris (Maybe [FilePath]) processInput cmd orig inputs efile = do i <- getIState let opts = idris_options i let quiet = opt_quiet opts let fn = fromMaybe "" (listToMaybe inputs) c <- colourise case parseCmd i "(input)" cmd of Failure (ErrInfo err _) -> do iputStrLn $ show (fixColour c err) return (Just inputs) Success (Right Reload) -> reload orig inputs Success (Right Watch) -> if null inputs then do iputStrLn "No loaded files to watch." return (Just inputs) else do iputStrLn efile iputStrLn $ "Watching for .idr changes in " ++ show inputs ++ ", press enter to cancel." watch orig inputs Success (Right (Load f toline)) -> -- The $!! here prevents a space leak on reloading. -- This isn't a solution - but it's a temporary stopgap. -- See issue #2386 do putIState $!! orig { idris_options = idris_options i , idris_colourTheme = idris_colourTheme i } clearErr mod <- loadInputs [f] toline return (Just mod) Success (Right (ModImport f)) -> do clearErr fmod <- loadModule f (IBC_REPL True) return (Just (inputs ++ maybe [] (:[]) fmod)) Success (Right Edit) -> do -- takeMVar stvar edit efile orig return (Just inputs) Success (Right Proofs) -> do proofs orig return (Just inputs) Success (Right Quit) -> do when (not quiet) (iputStrLn "Bye bye") return Nothing Success (Right cmd ) -> do idrisCatch (process fn cmd) (\e -> do msg <- showErr e ; iputStrLn msg) return (Just inputs) Success (Left err) -> do runIO $ putStrLn err return (Just inputs)
2,403
processInput cmd orig inputs efile = do i <- getIState let opts = idris_options i let quiet = opt_quiet opts let fn = fromMaybe "" (listToMaybe inputs) c <- colourise case parseCmd i "(input)" cmd of Failure (ErrInfo err _) -> do iputStrLn $ show (fixColour c err) return (Just inputs) Success (Right Reload) -> reload orig inputs Success (Right Watch) -> if null inputs then do iputStrLn "No loaded files to watch." return (Just inputs) else do iputStrLn efile iputStrLn $ "Watching for .idr changes in " ++ show inputs ++ ", press enter to cancel." watch orig inputs Success (Right (Load f toline)) -> -- The $!! here prevents a space leak on reloading. -- This isn't a solution - but it's a temporary stopgap. -- See issue #2386 do putIState $!! orig { idris_options = idris_options i , idris_colourTheme = idris_colourTheme i } clearErr mod <- loadInputs [f] toline return (Just mod) Success (Right (ModImport f)) -> do clearErr fmod <- loadModule f (IBC_REPL True) return (Just (inputs ++ maybe [] (:[]) fmod)) Success (Right Edit) -> do -- takeMVar stvar edit efile orig return (Just inputs) Success (Right Proofs) -> do proofs orig return (Just inputs) Success (Right Quit) -> do when (not quiet) (iputStrLn "Bye bye") return Nothing Success (Right cmd ) -> do idrisCatch (process fn cmd) (\e -> do msg <- showErr e ; iputStrLn msg) return (Just inputs) Success (Left err) -> do runIO $ putStrLn err return (Just inputs)
2,300
false
true
28
15
1,149
610
292
318
null
null
sinelaw/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/FocusDelegator.hs
gpl-3.0
make :: Applicative f => IsDelegating -- ^ Start state, enter from direction state -> Maybe IsDelegating -- ^ Current state -> Widget.Id -- ^ Enter/Stop delegating value -> Env -- ^ FocusDelegator configuration -> Widget f -> Widget f make isDelegating Nothing focusSelf env w = w & Widget.wMaybeEnter %~ mEnter isDelegating (w ^. Widget.wSize) & updateEventMap isDelegating where updateEventMap NotDelegating = useStartDelegatingEventMap (config env) updateEventMap Delegating = id mEnter NotDelegating wholeSize _ = Just . const $ takeFocus wholeSize mEnter _ _ Nothing = Nothing mEnter Delegating wholeSize (Just enterChild) = Just $ handleDir enterChild wholeSize handleDir _ wholeSize Direction.Outside = takeFocus wholeSize handleDir enterChild _ dir = enterChild dir takeFocus wholeSize = Widget.EnterResult (Rect 0 wholeSize) . pure $ Widget.eventResultFromCursor focusSelf
941
make :: Applicative f => IsDelegating -- ^ Start state, enter from direction state -> Maybe IsDelegating -- ^ Current state -> Widget.Id -- ^ Enter/Stop delegating value -> Env -- ^ FocusDelegator configuration -> Widget f -> Widget f make isDelegating Nothing focusSelf env w = w & Widget.wMaybeEnter %~ mEnter isDelegating (w ^. Widget.wSize) & updateEventMap isDelegating where updateEventMap NotDelegating = useStartDelegatingEventMap (config env) updateEventMap Delegating = id mEnter NotDelegating wholeSize _ = Just . const $ takeFocus wholeSize mEnter _ _ Nothing = Nothing mEnter Delegating wholeSize (Just enterChild) = Just $ handleDir enterChild wholeSize handleDir _ wholeSize Direction.Outside = takeFocus wholeSize handleDir enterChild _ dir = enterChild dir takeFocus wholeSize = Widget.EnterResult (Rect 0 wholeSize) . pure $ Widget.eventResultFromCursor focusSelf
941
make isDelegating Nothing focusSelf env w = w & Widget.wMaybeEnter %~ mEnter isDelegating (w ^. Widget.wSize) & updateEventMap isDelegating where updateEventMap NotDelegating = useStartDelegatingEventMap (config env) updateEventMap Delegating = id mEnter NotDelegating wholeSize _ = Just . const $ takeFocus wholeSize mEnter _ _ Nothing = Nothing mEnter Delegating wholeSize (Just enterChild) = Just $ handleDir enterChild wholeSize handleDir _ wholeSize Direction.Outside = takeFocus wholeSize handleDir enterChild _ dir = enterChild dir takeFocus wholeSize = Widget.EnterResult (Rect 0 wholeSize) . pure $ Widget.eventResultFromCursor focusSelf
694
false
true
12
12
183
276
122
154
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Compiler.hs
bsd-3-clause
compileProcedure (IfThenElseIFloat e cb1 cb2) = compileIfThenElseEitherProcedure IntType FloatType e cb1 cb2
112
compileProcedure (IfThenElseIFloat e cb1 cb2) = compileIfThenElseEitherProcedure IntType FloatType e cb1 cb2
112
compileProcedure (IfThenElseIFloat e cb1 cb2) = compileIfThenElseEitherProcedure IntType FloatType e cb1 cb2
112
false
false
0
7
15
30
14
16
null
null
vikraman/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
mkPrimTc :: FastString -> Unique -> TyCon -> Name mkPrimTc fs unique tycon = mkWiredInName gHC_PRIM (mkTcOccFS fs) unique (ATyCon tycon) -- Relevant TyCon UserSyntax
228
mkPrimTc :: FastString -> Unique -> TyCon -> Name mkPrimTc fs unique tycon = mkWiredInName gHC_PRIM (mkTcOccFS fs) unique (ATyCon tycon) -- Relevant TyCon UserSyntax
228
mkPrimTc fs unique tycon = mkWiredInName gHC_PRIM (mkTcOccFS fs) unique (ATyCon tycon) -- Relevant TyCon UserSyntax
178
false
true
0
9
87
64
28
36
null
null
hnfmr/beginning_haskell
ex8.2/src/Main.hs
mit
main :: IO () main = do ys <- replicateM 10 randomYear print $ nub ys stYs <- newTVarIO $ nub ys forkDelay 10 $ randomYear >>= \y -> atomically $ sim stYs y `orElse` return ()
194
main :: IO () main = do ys <- replicateM 10 randomYear print $ nub ys stYs <- newTVarIO $ nub ys forkDelay 10 $ randomYear >>= \y -> atomically $ sim stYs y `orElse` return ()
194
main = do ys <- replicateM 10 randomYear print $ nub ys stYs <- newTVarIO $ nub ys forkDelay 10 $ randomYear >>= \y -> atomically $ sim stYs y `orElse` return ()
180
false
true
0
11
55
91
42
49
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SubtleCrypto.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WebKitSubtleCrypto.wrapKey Mozilla WebKitSubtleCrypto.wrapKey documentation> wrapKey_ :: (MonadDOM m, ToJSString format, ToJSString wrapAlgorithm) => SubtleCrypto -> format -> CryptoKey -> CryptoKey -> wrapAlgorithm -> m () wrapKey_ self format key wrappingKey wrapAlgorithm = liftDOM (void (self ^. jsf "wrapKey" [toJSVal format, toJSVal key, toJSVal wrappingKey, toJSVal wrapAlgorithm]))
520
wrapKey_ :: (MonadDOM m, ToJSString format, ToJSString wrapAlgorithm) => SubtleCrypto -> format -> CryptoKey -> CryptoKey -> wrapAlgorithm -> m () wrapKey_ self format key wrappingKey wrapAlgorithm = liftDOM (void (self ^. jsf "wrapKey" [toJSVal format, toJSVal key, toJSVal wrappingKey, toJSVal wrapAlgorithm]))
387
wrapKey_ self format key wrappingKey wrapAlgorithm = liftDOM (void (self ^. jsf "wrapKey" [toJSVal format, toJSVal key, toJSVal wrappingKey, toJSVal wrapAlgorithm]))
207
true
true
0
13
123
119
58
61
null
null
Charlesetc/haskell-parsing
src/Pear/Operator/Concrete.hs
bsd-3-clause
lexeme :: Parser a -> Parser a lexeme p = whiteSpace *> p <* whiteSpace
71
lexeme :: Parser a -> Parser a lexeme p = whiteSpace *> p <* whiteSpace
71
lexeme p = whiteSpace *> p <* whiteSpace
40
false
true
0
6
14
32
15
17
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getPartSkinTemperatureStreamReq :: KRPCHS.SpaceCenter.Part -> KRPCStreamReq (Double) getPartSkinTemperatureStreamReq thisArg = let req = makeRequest "SpaceCenter" "Part_get_SkinTemperature" [makeArgument 0 thisArg] in makeStream req
241
getPartSkinTemperatureStreamReq :: KRPCHS.SpaceCenter.Part -> KRPCStreamReq (Double) getPartSkinTemperatureStreamReq thisArg = let req = makeRequest "SpaceCenter" "Part_get_SkinTemperature" [makeArgument 0 thisArg] in makeStream req
241
getPartSkinTemperatureStreamReq thisArg = let req = makeRequest "SpaceCenter" "Part_get_SkinTemperature" [makeArgument 0 thisArg] in makeStream req
156
false
true
0
11
29
60
28
32
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
blessedly = id
14
blessedly = id
14
blessedly = id
14
false
false
0
4
2
6
3
3
null
null
abdulrahimnizamani/OccamStar
interpreter.hs
gpl-2.0
matchExpExp lx w d t (HsParen p) (HsParen e) = matchExpExp lx w d t p e
71
matchExpExp lx w d t (HsParen p) (HsParen e) = matchExpExp lx w d t p e
71
matchExpExp lx w d t (HsParen p) (HsParen e) = matchExpExp lx w d t p e
71
false
false
0
7
16
44
21
23
null
null
Ruide/angr-dev
vex/orig_amd64/SortedToOrig.hs
bsd-2-clause
foo [] = []
11
foo [] = []
11
foo [] = []
11
false
false
0
6
3
13
6
7
null
null
rumblesan/proviz
src/Language/Interpreter/Types.hs
bsd-3-clause
getGlobalNames :: InterpreterProcess (S.Set String) getGlobalNames = uses globals M.keysSet
91
getGlobalNames :: InterpreterProcess (S.Set String) getGlobalNames = uses globals M.keysSet
91
getGlobalNames = uses globals M.keysSet
39
false
true
0
8
9
29
14
15
null
null
triplepointfive/hogldev
tutorial17/Tutorial17.hs
mit
createVertexBuffer :: IO BufferObject createVertexBuffer = do vbo <- genObjectName bindBuffer ArrayBuffer $= Just vbo withArray vertices $ \ptr -> bufferData ArrayBuffer $= (size, ptr, StaticDraw) return vbo where vertices :: [TexturedVertex] vertices = [ TexturedVertex (Vertex3 (-1) (-1) 0) (TexCoord2 0 0) , TexturedVertex (Vertex3 0 (-1) 1) (TexCoord2 0.5 0) , TexturedVertex (Vertex3 1 (-1) 0) (TexCoord2 1 0) , TexturedVertex (Vertex3 0 1 0) (TexCoord2 0.5 1)] numVertices = length vertices vertexSize = sizeOf (head vertices) size = fromIntegral (numVertices * vertexSize)
695
createVertexBuffer :: IO BufferObject createVertexBuffer = do vbo <- genObjectName bindBuffer ArrayBuffer $= Just vbo withArray vertices $ \ptr -> bufferData ArrayBuffer $= (size, ptr, StaticDraw) return vbo where vertices :: [TexturedVertex] vertices = [ TexturedVertex (Vertex3 (-1) (-1) 0) (TexCoord2 0 0) , TexturedVertex (Vertex3 0 (-1) 1) (TexCoord2 0.5 0) , TexturedVertex (Vertex3 1 (-1) 0) (TexCoord2 1 0) , TexturedVertex (Vertex3 0 1 0) (TexCoord2 0.5 1)] numVertices = length vertices vertexSize = sizeOf (head vertices) size = fromIntegral (numVertices * vertexSize)
695
createVertexBuffer = do vbo <- genObjectName bindBuffer ArrayBuffer $= Just vbo withArray vertices $ \ptr -> bufferData ArrayBuffer $= (size, ptr, StaticDraw) return vbo where vertices :: [TexturedVertex] vertices = [ TexturedVertex (Vertex3 (-1) (-1) 0) (TexCoord2 0 0) , TexturedVertex (Vertex3 0 (-1) 1) (TexCoord2 0.5 0) , TexturedVertex (Vertex3 1 (-1) 0) (TexCoord2 1 0) , TexturedVertex (Vertex3 0 1 0) (TexCoord2 0.5 1)] numVertices = length vertices vertexSize = sizeOf (head vertices) size = fromIntegral (numVertices * vertexSize)
657
false
true
0
10
200
250
125
125
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/pred_3.hs
mit
fromEnumMyBool :: MyBool -> MyInt fromEnumMyBool MyFalse = Pos Zero
69
fromEnumMyBool :: MyBool -> MyInt fromEnumMyBool MyFalse = Pos Zero
69
fromEnumMyBool MyFalse = Pos Zero
33
false
true
0
5
11
21
10
11
null
null
gcampax/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isAutoRule :: CoreRule -> Bool isAutoRule (BuiltinRule {}) = False
66
isAutoRule :: CoreRule -> Bool isAutoRule (BuiltinRule {}) = False
66
isAutoRule (BuiltinRule {}) = False
35
false
true
0
7
9
25
13
12
null
null
kojiromike/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
getConsts (_ : xs) = getConsts xs
52
getConsts (_ : xs) = getConsts xs
52
getConsts (_ : xs) = getConsts xs
52
false
false
0
6
25
20
9
11
null
null