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
HaskellForCats/HaskellForCats
MenaBeginning/002mena/session01/2014-0228ifThenElse.hs
mit
-- : set number linebreak expandtab ts=4 -- syntax enable -- retab posOrNeg x = if x >= 0 then "Pos" else "Neg"
129
posOrNeg x = if x >= 0 then "Pos" else "Neg"
60
posOrNeg x = if x >= 0 then "Pos" else "Neg"
60
true
false
0
6
40
24
14
10
null
null
k0001/haskell-opaleye
Opaleye/Order.hs
bsd-3-clause
asc :: (a -> C.Column b) -> O.OrderSpec a asc = O.orderSpec HPQ.OpAsc
69
asc :: (a -> C.Column b) -> O.OrderSpec a asc = O.orderSpec HPQ.OpAsc
69
asc = O.orderSpec HPQ.OpAsc
27
false
true
0
10
12
45
20
25
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_327 (46#) = happyGoto action_189
39
action_327 (46#) = happyGoto action_189
39
action_327 (46#) = happyGoto action_189
39
false
false
0
6
4
15
7
8
null
null
HackerFoo/peg
Peg/Constraints.hs
gpl-3.0
op21 :: (ValueT a, ValueT b, ValueT c, Eq c) => (a -> b -> c) -> Value -> Value -> Value -> Peg Bool op21 op x y z | Just x' <- fromValue x, Just y' <- fromValue y = ensure z $ x' `op` y' | otherwise = return False
218
op21 :: (ValueT a, ValueT b, ValueT c, Eq c) => (a -> b -> c) -> Value -> Value -> Value -> Peg Bool op21 op x y z | Just x' <- fromValue x, Just y' <- fromValue y = ensure z $ x' `op` y' | otherwise = return False
218
op21 op x y z | Just x' <- fromValue x, Just y' <- fromValue y = ensure z $ x' `op` y' | otherwise = return False
117
false
true
0
11
56
138
65
73
null
null
ihc/futhark
src/Futhark/CodeGen/Backends/GenericPython.hs
isc
-- The value returned will be used when reading binary arrays, to indicate what -- the expected type is readTypeEnum :: PrimType -> Imp.Signedness -> String readTypeEnum (IntType Int8) Imp.TypeUnsigned = "FUTHARK_UINT8"
220
readTypeEnum :: PrimType -> Imp.Signedness -> String readTypeEnum (IntType Int8) Imp.TypeUnsigned = "FUTHARK_UINT8"
116
readTypeEnum (IntType Int8) Imp.TypeUnsigned = "FUTHARK_UINT8"
63
true
true
0
7
32
36
19
17
null
null
yuroyoro/stashh
src/Stashh/Repos/List.hs
bsd-3-clause
modeRepos :: Mode (CmdArgs ReposCommand) modeRepos = cmdArgsMode $ ReposCommand { projectKey = "" &= argPos 0 &= typ "PROJECT_KEY" , cmdargs = [] &= args } &= name "repos"
182
modeRepos :: Mode (CmdArgs ReposCommand) modeRepos = cmdArgsMode $ ReposCommand { projectKey = "" &= argPos 0 &= typ "PROJECT_KEY" , cmdargs = [] &= args } &= name "repos"
182
modeRepos = cmdArgsMode $ ReposCommand { projectKey = "" &= argPos 0 &= typ "PROJECT_KEY" , cmdargs = [] &= args } &= name "repos"
141
false
true
2
10
40
67
34
33
null
null
kyl27/htree
htree.hs
gpl-3.0
main :: IO () main = do args <- getArgs case args of arg:_ -> putStrLn "Header include tree:" >> getFullPath arg >>= htree 0 [] -> putStrLn "Must provide file name in current directory."
213
main :: IO () main = do args <- getArgs case args of arg:_ -> putStrLn "Header include tree:" >> getFullPath arg >>= htree 0 [] -> putStrLn "Must provide file name in current directory."
213
main = do args <- getArgs case args of arg:_ -> putStrLn "Header include tree:" >> getFullPath arg >>= htree 0 [] -> putStrLn "Must provide file name in current directory."
199
false
true
0
12
61
68
31
37
null
null
brendanhay/gogol
gogol-cloudkms/gen/Network/Google/CloudKMS/Types/Product.hs
mpl-2.0
-- | Specifies cloud audit logging configuration for this policy. pAuditConfigs :: Lens' Policy [AuditConfig] pAuditConfigs = lens _pAuditConfigs (\ s a -> s{_pAuditConfigs = a}) . _Default . _Coerce
219
pAuditConfigs :: Lens' Policy [AuditConfig] pAuditConfigs = lens _pAuditConfigs (\ s a -> s{_pAuditConfigs = a}) . _Default . _Coerce
153
pAuditConfigs = lens _pAuditConfigs (\ s a -> s{_pAuditConfigs = a}) . _Default . _Coerce
109
true
true
0
11
49
53
28
25
null
null
MikePors/FizzBuzzWarz
src/GameMechanics.hs
bsd-3-clause
executeAiTurn :: GameState Int -> Int -> GameState (Clue Int) executeAiTurn gameState seed = let human = humanPlayer gameState dmg = length $ filter ((>0).playerHealth) $ aiPlayers gameState damagedHuman = damagePlayer human dmg ...
879
executeAiTurn :: GameState Int -> Int -> GameState (Clue Int) executeAiTurn gameState seed = let human = humanPlayer gameState dmg = length $ filter ((>0).playerHealth) $ aiPlayers gameState damagedHuman = damagePlayer human dmg ...
879
executeAiTurn gameState seed = let human = humanPlayer gameState dmg = length $ filter ((>0).playerHealth) $ aiPlayers gameState damagedHuman = damagePlayer human dmg livingAis = filter isAlive $ aiPlayer...
817
false
true
0
14
346
212
106
106
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The status. issStatus :: Lens' InstanceStatusSummary (Maybe SummaryStatus) issStatus = lens _issStatus (\s a -> s { _issStatus = a })
138
issStatus :: Lens' InstanceStatusSummary (Maybe SummaryStatus) issStatus = lens _issStatus (\s a -> s { _issStatus = a })
121
issStatus = lens _issStatus (\s a -> s { _issStatus = a })
58
true
true
0
9
22
46
25
21
null
null
ctlab/gShell
src/Gshell/Run.hs
mit
findProjectRoot path = (path, undefined)
40
findProjectRoot path = (path, undefined)
40
findProjectRoot path = (path, undefined)
40
false
false
0
5
4
15
8
7
null
null
mcschroeder/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
smallArrayPrimTyCon = pcPrimTyCon smallArrayPrimTyConName [Representational] PtrRep
97
smallArrayPrimTyCon = pcPrimTyCon smallArrayPrimTyConName [Representational] PtrRep
97
smallArrayPrimTyCon = pcPrimTyCon smallArrayPrimTyConName [Representational] PtrRep
97
false
false
0
6
19
16
8
8
null
null
hdbc/hdbc-sqlite3
testsrc/Testbasics.hs
bsd-3-clause
testExecuteMany = dbTestCase (\dbh -> do sth <- prepare dbh "INSERT INTO hdbctest1 VALUES ('multi',?,?,?)" executeMany sth rows commit dbh sth <- prepare dbh "SELECT testid, testint, testtext FROM hdbctest1 WHERE testname = 'multi'" execute sth [] r <- fetchAllRows sth asse...
514
testExecuteMany = dbTestCase (\dbh -> do sth <- prepare dbh "INSERT INTO hdbctest1 VALUES ('multi',?,?,?)" executeMany sth rows commit dbh sth <- prepare dbh "SELECT testid, testint, testtext FROM hdbctest1 WHERE testname = 'multi'" execute sth [] r <- fetchAllRows sth asse...
514
testExecuteMany = dbTestCase (\dbh -> do sth <- prepare dbh "INSERT INTO hdbctest1 VALUES ('multi',?,?,?)" executeMany sth rows commit dbh sth <- prepare dbh "SELECT testid, testint, testtext FROM hdbctest1 WHERE testname = 'multi'" execute sth [] r <- fetchAllRows sth asse...
514
false
false
0
11
174
142
69
73
null
null
fredmorcos/attic
projects/pet/archive/pet_haskell_master_complete/Expense.hs
isc
allMonths :: [Expense] -> [(Month, Year)] allMonths l = unique $ map (\e -> (monthOf e, yearOf e)) l
100
allMonths :: [Expense] -> [(Month, Year)] allMonths l = unique $ map (\e -> (monthOf e, yearOf e)) l
100
allMonths l = unique $ map (\e -> (monthOf e, yearOf e)) l
58
false
true
0
10
18
59
32
27
null
null
verement/etamoo
src/MOO/Types.hs
bsd-3-clause
toBuilder' (Waf x) = TLB.fromString (show x)
44
toBuilder' (Waf x) = TLB.fromString (show x)
44
toBuilder' (Waf x) = TLB.fromString (show x)
44
false
false
0
7
6
26
12
14
null
null
castaway/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
-- | Convert inline element to ConTeXt inlineToConTeXt :: Inline -- ^ Inline to convert -> State WriterState Doc inlineToConTeXt (Emph lst) = do contents <- inlineListToConTeXt lst return $ braces $ "\\em " <> contents
242
inlineToConTeXt :: Inline -- ^ Inline to convert -> State WriterState Doc inlineToConTeXt (Emph lst) = do contents <- inlineListToConTeXt lst return $ braces $ "\\em " <> contents
203
inlineToConTeXt (Emph lst) = do contents <- inlineListToConTeXt lst return $ braces $ "\\em " <> contents
110
true
true
0
9
59
56
27
29
null
null
stevezhee/pec
src/PecGen.hs
bsd-3-clause
hModule :: FilePath -> P.Module -> H.Module hModule outdir (P.Module a bs cs hs ds es fs) = H.Module nl (ModuleName a) hPragmas Nothing (Just $ map hExport bs) (map hImport_ (["Pec.Base"] ++ [ "Cnt" ++ h | CountD h <- hs]) ++ map hImport cs) (mainD outdir a cs fs : map hDataDecl ds ++ map hInstD es...
405
hModule :: FilePath -> P.Module -> H.Module hModule outdir (P.Module a bs cs hs ds es fs) = H.Module nl (ModuleName a) hPragmas Nothing (Just $ map hExport bs) (map hImport_ (["Pec.Base"] ++ [ "Cnt" ++ h | CountD h <- hs]) ++ map hImport cs) (mainD outdir a cs fs : map hDataDecl ds ++ map hInstD es...
405
hModule outdir (P.Module a bs cs hs ds es fs) = H.Module nl (ModuleName a) hPragmas Nothing (Just $ map hExport bs) (map hImport_ (["Pec.Base"] ++ [ "Cnt" ++ h | CountD h <- hs]) ++ map hImport cs) (mainD outdir a cs fs : map hDataDecl ds ++ map hInstD es ++ catMaybes (map hTyped ds) ++ catMa...
361
false
true
0
13
102
202
96
106
null
null
AlexanderPankiv/ghc
compiler/prelude/THNames.hs
bsd-3-clause
-- data InjectivityAnn = ... injectivityAnnName :: Name injectivityAnnName = libFun (fsLit "injectivityAnn") injectivityAnnIdKey
128
injectivityAnnName :: Name injectivityAnnName = libFun (fsLit "injectivityAnn") injectivityAnnIdKey
99
injectivityAnnName = libFun (fsLit "injectivityAnn") injectivityAnnIdKey
72
true
true
0
7
13
29
13
16
null
null
jsinglet/Paradox
src/TypeCheck.hs
gpl-3.0
checkFunctionAlreadyDefined :: Ident -> BlockStatement-> TCParserState Env () checkFunctionAlreadyDefined ident node = do cl <- currLevel found <- getIdentAtLevel ident cl case found of (Just _) -> throw (VarAlreadyDefined $ "Variable already defined: " ++ chomp (unparse node 0 "") ++ " [checkAlreadyDefine...
350
checkFunctionAlreadyDefined :: Ident -> BlockStatement-> TCParserState Env () checkFunctionAlreadyDefined ident node = do cl <- currLevel found <- getIdentAtLevel ident cl case found of (Just _) -> throw (VarAlreadyDefined $ "Variable already defined: " ++ chomp (unparse node 0 "") ++ " [checkAlreadyDefine...
350
checkFunctionAlreadyDefined ident node = do cl <- currLevel found <- getIdentAtLevel ident cl case found of (Just _) -> throw (VarAlreadyDefined $ "Variable already defined: " ++ chomp (unparse node 0 "") ++ " [checkAlreadyDefined]") Nothing -> return ()
272
false
true
0
16
64
111
52
59
null
null
Pold87/Haggressive
testsuite/tests/My.hs
gpl-2.0
testFrequency3 = H.frequency vec3 HU.~?= M.empty
48
testFrequency3 = H.frequency vec3 HU.~?= M.empty
48
testFrequency3 = H.frequency vec3 HU.~?= M.empty
48
false
false
0
7
5
19
9
10
null
null
snoyberg/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isAtomicHsExpr (HsPar e) = isAtomicHsExpr (unLoc e)
59
isAtomicHsExpr (HsPar e) = isAtomicHsExpr (unLoc e)
59
isAtomicHsExpr (HsPar e) = isAtomicHsExpr (unLoc e)
59
false
false
0
7
14
24
11
13
null
null
geraldus/yesod
yesod-core/src/Yesod/Core/Handler.hs
mit
-- | Clear all session variables. -- -- @since: 1.0.1 clearSession :: MonadHandler m => m () clearSession = modify $ \x -> x { ghsSession = Map.empty }
151
clearSession :: MonadHandler m => m () clearSession = modify $ \x -> x { ghsSession = Map.empty }
97
clearSession = modify $ \x -> x { ghsSession = Map.empty }
58
true
true
0
9
28
45
25
20
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLFrameElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFrameElement.width Mozilla HTMLFrameElement.width documentation> getWidth :: (MonadDOM m) => HTMLFrameElement -> m Int getWidth self = liftDOM (round <$> ((self ^. js "width") >>= valToNumber))
255
getWidth :: (MonadDOM m) => HTMLFrameElement -> m Int getWidth self = liftDOM (round <$> ((self ^. js "width") >>= valToNumber))
130
getWidth self = liftDOM (round <$> ((self ^. js "width") >>= valToNumber))
76
true
true
0
12
29
63
31
32
null
null
egaburov/funstuff
Haskell/tytag/xproblem_src/samples/expressions/Haskell/FunctorialStyle/Functor.hs
apache-2.0
unIn (In x) = x
15
unIn (In x) = x
15
unIn (In x) = x
15
false
false
0
6
4
16
7
9
null
null
tidalcycles/tidal-midi
Sound/Tidal/MIDI/Blofeld.hs
gpl-3.0
(osc3detune, osc3detune_p) = pF "osc3detune" (Just 0)
53
(osc3detune, osc3detune_p) = pF "osc3detune" (Just 0)
53
(osc3detune, osc3detune_p) = pF "osc3detune" (Just 0)
53
false
false
0
7
6
24
12
12
null
null
fmthoma/ghc
compiler/main/HscMain.hs
bsd-3-clause
genericHscFrontend :: ModSummary -> Hsc TcGblEnv genericHscFrontend mod_summary = getHooked hscFrontendHook genericHscFrontend' >>= ($ mod_summary)
149
genericHscFrontend :: ModSummary -> Hsc TcGblEnv genericHscFrontend mod_summary = getHooked hscFrontendHook genericHscFrontend' >>= ($ mod_summary)
149
genericHscFrontend mod_summary = getHooked hscFrontendHook genericHscFrontend' >>= ($ mod_summary)
100
false
true
0
6
16
34
17
17
null
null
alanz/Blobs
lib/DData/IntMap.hs
lgpl-2.1
insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> IntMap a -> (Maybe a, IntMap a) insertLookupWithKey f k x t = case t of Bin p m l r | nomatch k p m -> (Nothing,join k (Tip k x) p t) | zero k m -> let (found,l') = insertLookupWithKey f k x l in (found,Bin p m l' r) | othe...
915
insertLookupWithKey :: (Key -> a -> a -> a) -> Key -> a -> IntMap a -> (Maybe a, IntMap a) insertLookupWithKey f k x t = case t of Bin p m l r | nomatch k p m -> (Nothing,join k (Tip k x) p t) | zero k m -> let (found,l') = insertLookupWithKey f k x l in (found,Bin p m l' r) | othe...
915
insertLookupWithKey f k x t = case t of Bin p m l r | nomatch k p m -> (Nothing,join k (Tip k x) p t) | zero k m -> let (found,l') = insertLookupWithKey f k x l in (found,Bin p m l' r) | otherwise -> let (found,r') = insertLookupWithKey f k x r in (found,Bin p m l r') Tip...
824
false
true
0
13
242
331
161
170
null
null
urbanslug/ghc
testsuite/tests/programs/andy_cherry/InterpUtils.hs
bsd-3-clause
findAMove :: Piece -> ExBoardPos -> ExBoardPos -> Board -> (String,Board) findAMove move_piece move_src move_dest brd@(Board arr mv _) = debug (move_txt,new_brd) where move_colour = getMoveColour mv debug = {- trace ( {- userFormat brd...
1,980
findAMove :: Piece -> ExBoardPos -> ExBoardPos -> Board -> (String,Board) findAMove move_piece move_src move_dest brd@(Board arr mv _) = debug (move_txt,new_brd) where move_colour = getMoveColour mv debug = {- trace ( {- userFormat brd +...
1,978
findAMove move_piece move_src move_dest brd@(Board arr mv _) = debug (move_txt,new_brd) where move_colour = getMoveColour mv debug = {- trace ( {- userFormat brd ++ -} userFormat (getMoveColour mv) ++ " (" ++ {- userFormat absmove ++ -} ")" ++...
1,867
false
true
1
16
761
314
160
154
null
null
rueshyna/gogol
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs
mpl-2.0
-- | Creates a value of 'DocumentationRule' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'drSelector' -- -- * 'drDeprecationDescription' -- -- * 'drDescription' documentationRule :: DocumentationRule documentationRule = Docu...
441
documentationRule :: DocumentationRule documentationRule = DocumentationRule' { _drSelector = Nothing , _drDeprecationDescription = Nothing , _drDescription = Nothing }
192
documentationRule = DocumentationRule' { _drSelector = Nothing , _drDeprecationDescription = Nothing , _drDescription = Nothing }
149
true
true
0
6
84
40
28
12
null
null
databrary/databrary
src/Service/Notification.hs
agpl-3.0
triggerNotifications :: Maybe Period -> Notifications -> IO () triggerNotifications p Notifications{ notificationsTrigger = t } = write p where -- poor man's LVar: would be much simpler with a nested MVar, but then the reader is harder (and ours is dumb anyway) write x = do r <- tryPutMVar t x unless r $ do...
376
triggerNotifications :: Maybe Period -> Notifications -> IO () triggerNotifications p Notifications{ notificationsTrigger = t } = write p where -- poor man's LVar: would be much simpler with a nested MVar, but then the reader is harder (and ours is dumb anyway) write x = do r <- tryPutMVar t x unless r $ do...
376
triggerNotifications p Notifications{ notificationsTrigger = t } = write p where -- poor man's LVar: would be much simpler with a nested MVar, but then the reader is harder (and ours is dumb anyway) write x = do r <- tryPutMVar t x unless r $ do y <- tryTakeMVar t write $ maybe id max y x
313
false
true
3
12
90
108
48
60
null
null
GaloisInc/saw-script
cryptol-saw-core/src/Verifier/SAW/CryptolEnv.hs
bsd-3-clause
declareName :: (?fileReader :: FilePath -> IO ByteString) => CryptolEnv -> P.ModName -> String -> IO (T.Name, CryptolEnv) declareName env mname input = do let pname = P.mkUnqual (packIdent input) let modEnv = eModuleEnv env (cname, modEnv') <- liftModuleM modEnv $ MM.interactive $ MN.liftSupply (MN.mk...
476
declareName :: (?fileReader :: FilePath -> IO ByteString) => CryptolEnv -> P.ModName -> String -> IO (T.Name, CryptolEnv) declareName env mname input = do let pname = P.mkUnqual (packIdent input) let modEnv = eModuleEnv env (cname, modEnv') <- liftModuleM modEnv $ MM.interactive $ MN.liftSupply (MN.mk...
476
declareName env mname input = do let pname = P.mkUnqual (packIdent input) let modEnv = eModuleEnv env (cname, modEnv') <- liftModuleM modEnv $ MM.interactive $ MN.liftSupply (MN.mkDeclared C.NSValue (C.TopModule mname) MN.UserName (P.getIdent pname) Nothing P.emptyRange) let env' = env { eModuleEnv = mo...
350
false
true
0
14
86
191
95
96
null
null
meiersi/scyther-proof
src/Scyther/Message.hs
gpl-3.0
splitNonTrivial m = do guard (not $ trivial m) return m ------------------------------------------------------------------------------ -- ISAR Output ------------------------------------------------------------------------------ -- | Textual symbolic application of the substitution. -- TODO: Remove h...
368
splitNonTrivial m = do guard (not $ trivial m) return m ------------------------------------------------------------------------------ -- ISAR Output ------------------------------------------------------------------------------ -- | Textual symbolic application of the substitution. -- TODO: Remove h...
368
splitNonTrivial m = do guard (not $ trivial m) return m ------------------------------------------------------------------------------ -- ISAR Output ------------------------------------------------------------------------------ -- | Textual symbolic application of the substitution. -- TODO: Remove h...
368
false
false
0
10
52
36
18
18
null
null
tcoenraad/functioneel-programmeren
practica/serie1/6.my-list.hs
mit
myconcat :: [[n]] -> [n] myconcat [] = []
41
myconcat :: [[n]] -> [n] myconcat [] = []
41
myconcat [] = []
16
false
true
0
7
8
35
18
17
null
null
allegroCoder/scenco-1
Test.hs
bsd-3-clause
techLibPath :: FilePath techLibPath = (testPath </> "90nm.genlib")
66
techLibPath :: FilePath techLibPath = (testPath </> "90nm.genlib")
66
techLibPath = (testPath </> "90nm.genlib")
42
false
true
0
6
7
18
10
8
null
null
aelve/json-x
tests/Encoders.hs
bsd-3-clause
thApproxToJsonDefault :: Approx String -> Json thApproxToJsonDefault = $(mkToJson defaultOptions ''Approx)
106
thApproxToJsonDefault :: Approx String -> Json thApproxToJsonDefault = $(mkToJson defaultOptions ''Approx)
106
thApproxToJsonDefault = $(mkToJson defaultOptions ''Approx)
59
false
true
0
8
10
29
14
15
null
null
dawedawe/kripkeweb
src/WebSpider.hs
bsd-3-clause
spider :: Maybe Proxy -> Int -> (S.Set T.Text, S.Set OneToN) -> T.Text -> IO (S.Set T.Text, S.Set OneToN) spider prx i (v, aSets) u | transparentUrls dom `S.intersection` v /= S.empty = do putStrLn ("already visited " ++ T.unpack dom) return (v, aSets) | i == 1 ...
983
spider :: Maybe Proxy -> Int -> (S.Set T.Text, S.Set OneToN) -> T.Text -> IO (S.Set T.Text, S.Set OneToN) spider prx i (v, aSets) u | transparentUrls dom `S.intersection` v /= S.empty = do putStrLn ("already visited " ++ T.unpack dom) return (v, aSets) | i == 1 ...
983
spider prx i (v, aSets) u | transparentUrls dom `S.intersection` v /= S.empty = do putStrLn ("already visited " ++ T.unpack dom) return (v, aSets) | i == 1 = do as <- accessabilitySet prx u return (S.insert dom v, S.insert as aSets) ...
867
false
true
2
13
352
330
154
176
null
null
paf31/typescript-docs
src/Main.hs
mit
inputFiles :: Term [FilePath] inputFiles = nonEmpty $ posAny [] $ posInfo { posDoc = "The input .d.ts file" }
114
inputFiles :: Term [FilePath] inputFiles = nonEmpty $ posAny [] $ posInfo { posDoc = "The input .d.ts file" }
114
inputFiles = nonEmpty $ posAny [] $ posInfo { posDoc = "The input .d.ts file" }
84
false
true
0
8
24
42
21
21
null
null
facebookincubator/duckling
Duckling/Time/BG/Rules.hs
bsd-3-clause
ruleNthTimeAfterTime :: Rule ruleNthTimeAfterTime = Rule { name = "nth <time> after <time>" , pattern = [ dimension Ordinal , dimension Time , regex "след|от" , dimension Time ] , prod = \case (Token Ordinal od:Token Time td1:_:Token Time td2:_) -> tt $ predNthAfter (TOrdinal.val...
361
ruleNthTimeAfterTime :: Rule ruleNthTimeAfterTime = Rule { name = "nth <time> after <time>" , pattern = [ dimension Ordinal , dimension Time , regex "след|от" , dimension Time ] , prod = \case (Token Ordinal od:Token Time td1:_:Token Time td2:_) -> tt $ predNthAfter (TOrdinal.val...
361
ruleNthTimeAfterTime = Rule { name = "nth <time> after <time>" , pattern = [ dimension Ordinal , dimension Time , regex "след|от" , dimension Time ] , prod = \case (Token Ordinal od:Token Time td1:_:Token Time td2:_) -> tt $ predNthAfter (TOrdinal.value od - 1) td1 td2 _ ->...
332
false
true
0
16
101
130
66
64
null
null
spechub/Hets
Maude/Maude2DG.hs
gpl-2.0
insertSpecs (s : ss) pdg ptim tim vm ths dg = insertSpecs ss pdg ptim' tim' vm' ths' dg' where (ptim', tim', vm', ths', dg') = insertSpec s pdg ptim tim vm ths dg
166
insertSpecs (s : ss) pdg ptim tim vm ths dg = insertSpecs ss pdg ptim' tim' vm' ths' dg' where (ptim', tim', vm', ths', dg') = insertSpec s pdg ptim tim vm ths dg
166
insertSpecs (s : ss) pdg ptim tim vm ths dg = insertSpecs ss pdg ptim' tim' vm' ths' dg' where (ptim', tim', vm', ths', dg') = insertSpec s pdg ptim tim vm ths dg
166
false
false
0
7
37
81
42
39
null
null
mdunsmuir/routequery-service
src/Com/Google/Transit/Realtime/Alert/Cause.hs
gpl-3.0
toMaybe'Enum 12 = Prelude'.Just MEDICAL_EMERGENCY
49
toMaybe'Enum 12 = Prelude'.Just MEDICAL_EMERGENCY
49
toMaybe'Enum 12 = Prelude'.Just MEDICAL_EMERGENCY
49
false
false
0
6
4
14
6
8
null
null
phischu/fragnix
builtins/base/System.Environment.hs
bsd-3-clause
{-| 'withArgs' @args act@ - while executing action @act@, have 'getArgs' return @args@. -} withArgs :: [String] -> IO a -> IO a withArgs xs act = do p <- System.Environment.getProgName withArgv (p:xs) act {-| 'withProgName' @name act@ - while executing action @act@, have 'getProgName' return @name@. -}
310
withArgs :: [String] -> IO a -> IO a withArgs xs act = do p <- System.Environment.getProgName withArgv (p:xs) act {-| 'withProgName' @name act@ - while executing action @act@, have 'getProgName' return @name@. -}
219
withArgs xs act = do p <- System.Environment.getProgName withArgv (p:xs) act {-| 'withProgName' @name act@ - while executing action @act@, have 'getProgName' return @name@. -}
182
true
true
0
9
54
60
30
30
null
null
portnov/simple-stacked-vm
Language/SSVM/Interpreter.hs
lgpl-3.0
interpretOne _ (SString x) = push x >> step
44
interpretOne _ (SString x) = push x >> step
44
interpretOne _ (SString x) = push x >> step
44
false
false
1
6
9
27
11
16
null
null
jspahrsummers/RxHaskell
Disposable.hs
mit
-- | Creates a set of disposables. newDisposableSet :: IO DisposableSet newDisposableSet = do mref <- newIORef $ Just Seq.empty return $ DisposableSet mref -- | Converts a set of disposables into a disposable. -- The constructed disposable will dispose of all disposables in the set.
294
newDisposableSet :: IO DisposableSet newDisposableSet = do mref <- newIORef $ Just Seq.empty return $ DisposableSet mref -- | Converts a set of disposables into a disposable. -- The constructed disposable will dispose of all disposables in the set.
259
newDisposableSet = do mref <- newIORef $ Just Seq.empty return $ DisposableSet mref -- | Converts a set of disposables into a disposable. -- The constructed disposable will dispose of all disposables in the set.
222
true
true
0
10
56
43
21
22
null
null
black0range/BufferedSocket
Network/BufferedSocket/Writer.hs
mit
sendLazy :: BS.BufferedSocket -> BL.ByteString -> IO () sendLazy bSocket lazyBytestring = sendLazyReal bSocket $ BL.toChunks lazyBytestring
139
sendLazy :: BS.BufferedSocket -> BL.ByteString -> IO () sendLazy bSocket lazyBytestring = sendLazyReal bSocket $ BL.toChunks lazyBytestring
139
sendLazy bSocket lazyBytestring = sendLazyReal bSocket $ BL.toChunks lazyBytestring
83
false
true
0
8
16
45
21
24
null
null
sitewisely/zellige
src/Data/Geometry/GeoJsonStreamingToMvt.hs
apache-2.0
vtToBytes :: TypesConfig.Config -> TypesMvtFeatures.StreamingLayer -> ByteString.ByteString vtToBytes config sl = ByteStringLazy.toStrict . WireMessage.messagePut $ createTileFromStreamingLayer config sl
203
vtToBytes :: TypesConfig.Config -> TypesMvtFeatures.StreamingLayer -> ByteString.ByteString vtToBytes config sl = ByteStringLazy.toStrict . WireMessage.messagePut $ createTileFromStreamingLayer config sl
203
vtToBytes config sl = ByteStringLazy.toStrict . WireMessage.messagePut $ createTileFromStreamingLayer config sl
111
false
true
0
7
17
47
23
24
null
null
SumAll/haskell-concurrent-lists
src/Control/Concurrent/ConcurrentLists.hs
apache-2.0
concurrentN_ :: Int -> [IO a] -> IO () concurrentN_ n = -- we could probably be more memory efficient here. void . concurrentN n
132
concurrentN_ :: Int -> [IO a] -> IO () concurrentN_ n = -- we could probably be more memory efficient here. void . concurrentN n
132
concurrentN_ n = -- we could probably be more memory efficient here. void . concurrentN n
93
false
true
1
8
28
42
20
22
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/lab6.hs
unlicense
num2 = mappend (Sum 3) (mappend mempty (mappend (mappend (mappend (Sum 2) mempty) (Sum (-1))) (Sum 3)))
103
num2 = mappend (Sum 3) (mappend mempty (mappend (mappend (mappend (Sum 2) mempty) (Sum (-1))) (Sum 3)))
103
num2 = mappend (Sum 3) (mappend mempty (mappend (mappend (mappend (Sum 2) mempty) (Sum (-1))) (Sum 3)))
103
false
false
0
15
16
72
36
36
null
null
uduki/hsQt
Qtc/ClassTypes/Opengl.hs
bsd-2-clause
qCast_QGL :: Object a -> IO (QGL ()) qCast_QGL _qobj = return (objectCast _qobj)
82
qCast_QGL :: Object a -> IO (QGL ()) qCast_QGL _qobj = return (objectCast _qobj)
82
qCast_QGL _qobj = return (objectCast _qobj)
45
false
true
0
10
15
46
20
26
null
null
mapinguari/SC_HS_Proxy
src/Hope.hs
mit
astarF' :: (WeightedGraph g b, Real b) => g a b -> Node -> Heuristic b -> [(Node,Maybe Node)] astarF' g s h = loop (adjaWeights g) h (decrease (s,(F 0,Nothing)) q0) where q0 = fromList [v :-> (Inf,Nothing) | v <- nodes g]
223
astarF' :: (WeightedGraph g b, Real b) => g a b -> Node -> Heuristic b -> [(Node,Maybe Node)] astarF' g s h = loop (adjaWeights g) h (decrease (s,(F 0,Nothing)) q0) where q0 = fromList [v :-> (Inf,Nothing) | v <- nodes g]
223
astarF' g s h = loop (adjaWeights g) h (decrease (s,(F 0,Nothing)) q0) where q0 = fromList [v :-> (Inf,Nothing) | v <- nodes g]
129
false
true
0
11
45
138
71
67
null
null
xpika/chord-diagrams
Music/Instrument/Backend/Diagrams/Guitar.hs
gpl-3.0
dotGrid = foldr1 (|||) (map vdots (zip ( map (map show) (frettedGuitarStrings standardTuning) ) [0..]) )
104
dotGrid = foldr1 (|||) (map vdots (zip ( map (map show) (frettedGuitarStrings standardTuning) ) [0..]) )
104
dotGrid = foldr1 (|||) (map vdots (zip ( map (map show) (frettedGuitarStrings standardTuning) ) [0..]) )
104
false
false
1
13
15
55
27
28
null
null
leshchevds/ganeti
src/Ganeti/HTools/Loader.hs
bsd-2-clause
-- | Update instance with desired location tags list. updateDesiredLocationTags :: [String] -> Instance.Instance -> Instance.Instance updateDesiredLocationTags tl inst = let allTags = Instance.allTags inst dsrdLocTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags in inst { Instance.dsrdLocTags = Set.fr...
340
updateDesiredLocationTags :: [String] -> Instance.Instance -> Instance.Instance updateDesiredLocationTags tl inst = let allTags = Instance.allTags inst dsrdLocTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags in inst { Instance.dsrdLocTags = Set.fromList dsrdLocTags }
286
updateDesiredLocationTags tl inst = let allTags = Instance.allTags inst dsrdLocTags = filter (\tag -> any (`isPrefixOf` tag) tl) allTags in inst { Instance.dsrdLocTags = Set.fromList dsrdLocTags }
206
true
true
0
13
52
92
49
43
null
null
ozgurakgun/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
defined :: PDecl -> [Name] defined (PFix _ _ _) = []
81
defined :: PDecl -> [Name] defined (PFix _ _ _) = []
81
defined (PFix _ _ _) = []
54
false
true
0
6
40
37
18
19
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
unmarshalStringIdKey = mkPreludeMiscIdUnique 153
57
unmarshalStringIdKey = mkPreludeMiscIdUnique 153
57
unmarshalStringIdKey = mkPreludeMiscIdUnique 153
57
false
false
0
5
12
9
4
5
null
null
mplamann/magic-spieler
src/CardSelector.hs
mit
selectType :: Type -> CardSelector selectType t _ = pred where pred (CardTarget cID) = use (nonRecursiveCard cID) >>= \c -> return (t `elem` c^.cardType) pred (PlayerTarget _) = return False
210
selectType :: Type -> CardSelector selectType t _ = pred where pred (CardTarget cID) = use (nonRecursiveCard cID) >>= \c -> return (t `elem` c^.cardType) pred (PlayerTarget _) = return False
210
selectType t _ = pred where pred (CardTarget cID) = use (nonRecursiveCard cID) >>= \c -> return (t `elem` c^.cardType) pred (PlayerTarget _) = return False
175
false
true
1
10
50
86
44
42
null
null
amccausl/Swish
Swish/HaskellRDF/RDFGraphTest.hs
lgpl-2.1
testClass78 = testClass "testClass78" isBlank cm1 False
64
testClass78 = testClass "testClass78" isBlank cm1 False
64
testClass78 = testClass "testClass78" isBlank cm1 False
64
false
false
0
5
15
15
7
8
null
null
acowley/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isRhoTy (ForAllTy {}) = False
29
isRhoTy (ForAllTy {}) = False
29
isRhoTy (ForAllTy {}) = False
29
false
false
0
6
4
17
8
9
null
null
nevrenato/HetsAlloy
VSE/Prove.hs
gpl-2.0
parseSymbol :: Parser SExpr parseSymbol = skipWhite $ fmap SSymbol $ many1 $ satisfy $ \ c -> not (isSpace c || elem c "()")
126
parseSymbol :: Parser SExpr parseSymbol = skipWhite $ fmap SSymbol $ many1 $ satisfy $ \ c -> not (isSpace c || elem c "()")
126
parseSymbol = skipWhite $ fmap SSymbol $ many1 $ satisfy $ \ c -> not (isSpace c || elem c "()")
98
false
true
2
10
26
57
27
30
null
null
twittner/cql-io
src/Database/CQL/IO/Jobs.hs
mpl-2.0
destroy :: MonadIO m => Jobs k -> m () destroy (Jobs d) = liftIO $ do items <- Map.elems <$> atomically (swapTVar d Map.empty) mapM_ f items where f (Running _ a) = ignore (cancel a) f _ = return ()
228
destroy :: MonadIO m => Jobs k -> m () destroy (Jobs d) = liftIO $ do items <- Map.elems <$> atomically (swapTVar d Map.empty) mapM_ f items where f (Running _ a) = ignore (cancel a) f _ = return ()
228
destroy (Jobs d) = liftIO $ do items <- Map.elems <$> atomically (swapTVar d Map.empty) mapM_ f items where f (Running _ a) = ignore (cancel a) f _ = return ()
189
false
true
0
13
71
120
54
66
null
null
candu/haskellbook
ch12/binaryTree.hs
mit
main :: IO () main = do print $ treeBuild 2
45
main :: IO () main = do print $ treeBuild 2
45
main = do print $ treeBuild 2
31
false
true
0
8
12
26
12
14
null
null
Skyfold/postgrest
src/PostgREST/DbRequestBuilder.hs
mit
readRequest :: Maybe Integer -> [Relation] -> M.HashMap Text ProcDescription -> ApiRequest -> Either Response ReadRequest readRequest maxRows allRels allProcs apiRequest = mapLeft apiRequestError $ treeRestrictRange maxRows =<< augumentRequestWithJoin schema relations =<< parseReadRequest where (schema, ...
1,608
readRequest :: Maybe Integer -> [Relation] -> M.HashMap Text ProcDescription -> ApiRequest -> Either Response ReadRequest readRequest maxRows allRels allProcs apiRequest = mapLeft apiRequestError $ treeRestrictRange maxRows =<< augumentRequestWithJoin schema relations =<< parseReadRequest where (schema, ...
1,608
readRequest maxRows allRels allProcs apiRequest = mapLeft apiRequestError $ treeRestrictRange maxRows =<< augumentRequestWithJoin schema relations =<< parseReadRequest where (schema, rootTableName) = fromJust $ -- Make it safe let target = iTarget apiRequest in case target of (TargetI...
1,486
false
true
1
20
426
429
208
221
null
null
sdiehl/ghc
compiler/prelude/THNames.hs
bsd-3-clause
{- ********************************************************************* * * Id keys * * ********************************************************************* -}...
710
returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey, mkNameIdKey, mkNameG_vIdKey, mkNameG_dIdKey, mkNameG_tcIdKey, mkNameLIdKey, mkNameSIdKey, unTypeIdKey, unTypeQIdKey, unsafeTExpCoerceIdKey, liftTypedIdKey :: Unique returnQIdKey = mkPreludeMiscIdUnique 200
291
returnQIdKey = mkPreludeMiscIdUnique 200
47
true
true
0
5
227
45
38
7
null
null
andyhorng/phpns
src/Parser.hs
mit
parseStatement :: Parser Statement parseStatement = parseNamespace <|> parseUse <|> parseClass
123
parseStatement :: Parser Statement parseStatement = parseNamespace <|> parseUse <|> parseClass
123
parseStatement = parseNamespace <|> parseUse <|> parseClass
88
false
true
0
6
39
22
11
11
null
null
kelnage/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/Contradictions.hs
gpl-3.0
-- | All CR-rules reducing a constraint system to *⟂* represented as a list of -- trivial contradictions. Note that some constraint systems are also removed -- because they have no unifier. This is part of unification. Note also that -- *S_{¬,\@}* is handled as part of *S_∀*. contradictions :: ProofContext -> System ->...
1,984
contradictions :: ProofContext -> System -> [Contradiction] contradictions ctxt sys = F.asum -- CR-rule ** [ guard (D.cyclic $ rawLessRel sys) *> pure Cyclic -- CR-rule *N1* , guard (hasNonNormalTerms sig sys) *> pure NonNormalTerms -- FIXME: add CR-rule , guard (hasForbi...
1,707
contradictions ctxt sys = F.asum -- CR-rule ** [ guard (D.cyclic $ rawLessRel sys) *> pure Cyclic -- CR-rule *N1* , guard (hasNonNormalTerms sig sys) *> pure NonNormalTerms -- FIXME: add CR-rule , guard (hasForbiddenKD sys) *> pure ForbiddenKD -- FI...
1,647
true
true
1
14
483
333
170
163
null
null
bitemyapp/Haskell-Turtle-Library
src/Turtle/Prelude.hs
bsd-3-clause
-- | Retrieve all environment variables env :: MonadIO io => io [(Text, Text)] env = liftIO (fmap (fmap toTexts) getEnvironment) where toTexts (key, val) = (pack key, pack val) -- | Change the current directory
217
env :: MonadIO io => io [(Text, Text)] env = liftIO (fmap (fmap toTexts) getEnvironment) where toTexts (key, val) = (pack key, pack val) -- | Change the current directory
177
env = liftIO (fmap (fmap toTexts) getEnvironment) where toTexts (key, val) = (pack key, pack val) -- | Change the current directory
138
true
true
0
9
42
84
42
42
null
null
Teaspot-Studio/netwire
Control/Wire/Event.hs
bsd-3-clause
takeE n = fix $ \again -> mkSFN $ \mev -> (mev, if occurred mev then takeE (pred n) else again)
111
takeE n = fix $ \again -> mkSFN $ \mev -> (mev, if occurred mev then takeE (pred n) else again)
111
takeE n = fix $ \again -> mkSFN $ \mev -> (mev, if occurred mev then takeE (pred n) else again)
111
false
false
0
13
36
53
28
25
null
null
sdiehl/ghc
utils/genapply/Main.hs
bsd-3-clause
mkBitmap :: [ArgRep] -> Word32 mkBitmap args = foldr f 0 args where f arg bm | isPtr arg = bm `shiftL` 1 | otherwise = (bm `shiftL` size) .|. ((1 `shiftL` size) - 1) where size = argSize arg -- ----------------------------------------------------------------------------- -- Generating ...
1,179
mkBitmap :: [ArgRep] -> Word32 mkBitmap args = foldr f 0 args where f arg bm | isPtr arg = bm `shiftL` 1 | otherwise = (bm `shiftL` size) .|. ((1 `shiftL` size) - 1) where size = argSize arg -- ----------------------------------------------------------------------------- -- Generating ...
1,179
mkBitmap args = foldr f 0 args where f arg bm | isPtr arg = bm `shiftL` 1 | otherwise = (bm `shiftL` size) .|. ((1 `shiftL` size) - 1) where size = argSize arg -- ----------------------------------------------------------------------------- -- Generating the application functions -- A...
1,148
false
true
0
10
243
120
71
49
null
null
vTurbine/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
divModIntegerName = varQual gHC_INTEGER_TYPE (fsLit "divModInteger") divModIntegerIdKey
95
divModIntegerName = varQual gHC_INTEGER_TYPE (fsLit "divModInteger") divModIntegerIdKey
95
divModIntegerName = varQual gHC_INTEGER_TYPE (fsLit "divModInteger") divModIntegerIdKey
95
false
false
0
7
14
19
9
10
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ChannelContentOwnerDetails' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ccodTimeLinked' -- -- * 'ccodContentOwner' channelContentOwnerDetails :: ChannelContentOwnerDetails channelContentOwnerDetails = ...
423
channelContentOwnerDetails :: ChannelContentOwnerDetails channelContentOwnerDetails = ChannelContentOwnerDetails' { _ccodTimeLinked = Nothing , _ccodContentOwner = Nothing }
193
channelContentOwnerDetails = ChannelContentOwnerDetails' { _ccodTimeLinked = Nothing , _ccodContentOwner = Nothing }
132
true
true
0
6
72
32
22
10
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x2F9CC' = "\x27966"
35
decomposeChar '\x2F9CC' = "\x27966"
35
decomposeChar '\x2F9CC' = "\x27966"
35
false
false
1
5
3
13
4
9
null
null
CarstenKoenig/DOS2015
CountdownGame/src/web/CountdownGame/Database.hs
unlicense
getPlayersMap :: ConnectionPool -> IO P.PlayersMap getPlayersMap pool = do ps <- map (\ p -> (P.playerId p, p)) <$> getPlayers pool return $ M.fromList ps
158
getPlayersMap :: ConnectionPool -> IO P.PlayersMap getPlayersMap pool = do ps <- map (\ p -> (P.playerId p, p)) <$> getPlayers pool return $ M.fromList ps
158
getPlayersMap pool = do ps <- map (\ p -> (P.playerId p, p)) <$> getPlayers pool return $ M.fromList ps
107
false
true
0
14
29
71
34
37
null
null
pepincho/Functional-Programming
Homework-1/45121-homework-solution.hs
mit
--Task 4 intercalate' str [x] = x
34
intercalate' str [x] = x
24
intercalate' str [x] = x
24
true
false
0
6
7
15
8
7
null
null
ihc/futhark
src/Futhark/Pass/ExtractKernels/Distribution.hs
isc
ppNestings :: Nestings -> String ppNestings (nesting, nestings) = unlines $ map ppNesting $ nestings ++ [nesting] where ppNesting (Nesting _ loop) = ppLoopNesting loop
181
ppNestings :: Nestings -> String ppNestings (nesting, nestings) = unlines $ map ppNesting $ nestings ++ [nesting] where ppNesting (Nesting _ loop) = ppLoopNesting loop
181
ppNestings (nesting, nestings) = unlines $ map ppNesting $ nestings ++ [nesting] where ppNesting (Nesting _ loop) = ppLoopNesting loop
148
false
true
0
8
38
63
32
31
null
null
ekmett/concurrent
src/Concurrent/Capability/LocalArray.hs
bsd-2-clause
withSmallLocalArray :: forall m a r. ReifiesCapability m => SmallLocalArray a -> (SmallMutableArray RealWorld a -> m r) -> m r withSmallLocalArray l f = f $ untag (reflectSmallLocalArray l :: Tagged m (SmallMutableArray RealWorld a))
233
withSmallLocalArray :: forall m a r. ReifiesCapability m => SmallLocalArray a -> (SmallMutableArray RealWorld a -> m r) -> m r withSmallLocalArray l f = f $ untag (reflectSmallLocalArray l :: Tagged m (SmallMutableArray RealWorld a))
233
withSmallLocalArray l f = f $ untag (reflectSmallLocalArray l :: Tagged m (SmallMutableArray RealWorld a))
106
false
true
0
11
35
88
43
45
null
null
cbpark/hep-kinematics
src/HEP/Kinematics/Vector/TwoVector.hs
bsd-3-clause
setPtPhi :: Double -> Double -> TwoVector Double setPtPhi pt phi = let !px = pt * cos phi !py = pt * sin phi in TwoVector (V2 px py)
172
setPtPhi :: Double -> Double -> TwoVector Double setPtPhi pt phi = let !px = pt * cos phi !py = pt * sin phi in TwoVector (V2 px py)
172
setPtPhi pt phi = let !px = pt * cos phi !py = pt * sin phi in TwoVector (V2 px py)
123
false
true
0
10
69
76
33
43
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Model/Formula.hs
gpl-3.0
quantify :: (Ord c, Ord v, Functor syn) => v -> ProtoFormula syn s c v -> ProtoFormula syn s c v quantify x = mapAtoms (\i a -> fmap (mapLits (fmap (>>= subst i))) a) where subst i v | v == x = Bound i | otherwise = Free v -- | Create a universal quantification with a sort hint for the bound...
330
quantify :: (Ord c, Ord v, Functor syn) => v -> ProtoFormula syn s c v -> ProtoFormula syn s c v quantify x = mapAtoms (\i a -> fmap (mapLits (fmap (>>= subst i))) a) where subst i v | v == x = Bound i | otherwise = Free v -- | Create a universal quantification with a sort hint for the bound...
330
quantify x = mapAtoms (\i a -> fmap (mapLits (fmap (>>= subst i))) a) where subst i v | v == x = Bound i | otherwise = Free v -- | Create a universal quantification with a sort hint for the bound variable.
233
false
true
0
14
93
137
66
71
null
null
swamp-agr/an-pro.org
site.hs
mit
-------------------------------------------------------------------------------- postsP :: Pattern postsP = fromGlob "posts/*"
127
postsP :: Pattern postsP = fromGlob "posts/*"
45
postsP = fromGlob "posts/*"
27
true
true
0
5
8
15
8
7
null
null
MichaelXavier/Bucketeer
Bucketeer/Testing/Persistence.hs
bsd-2-clause
describe_deleteFeature :: Connection -> Specs describe_deleteFeature conn = describe "Bucketeer.Persistence.deleteFeature" [ it "when key is missing: keeps the key missing?" $ withCleanup conn $ do overwriteKey conn "2" doDeleteFeature conn cns $ Feature "...
952
describe_deleteFeature :: Connection -> Specs describe_deleteFeature conn = describe "Bucketeer.Persistence.deleteFeature" [ it "when key is missing: keeps the key missing?" $ withCleanup conn $ do overwriteKey conn "2" doDeleteFeature conn cns $ Feature "...
952
describe_deleteFeature conn = describe "Bucketeer.Persistence.deleteFeature" [ it "when key is missing: keeps the key missing?" $ withCleanup conn $ do overwriteKey conn "2" doDeleteFeature conn cns $ Feature "wat" assertDeletedBucket conn $ Feature "wat...
880
false
true
6
10
349
236
96
140
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Types.hs
bsd-3-clause
info (CString _ _ i) = i
24
info (CString _ _ i) = i
24
info (CString _ _ i) = i
24
false
false
0
6
6
20
9
11
null
null
k0001/gtk2hs
pango/Gtk2HsSetup.hs
gpl-3.0
generateMacros :: [PackageId] -> String generateMacros cPkgs = concat $ "/* DO NOT EDIT: This file is automatically generated by Gtk2HsSetup.hs */\n\n" : [ concat ["/* package ",display pkgid," */\n" ,"#define VERSION_",pkgname," ",show (display version),"\n" ,"#define MIN_VERSION_",pkgname,"(major1,maj...
967
generateMacros :: [PackageId] -> String generateMacros cPkgs = concat $ "/* DO NOT EDIT: This file is automatically generated by Gtk2HsSetup.hs */\n\n" : [ concat ["/* package ",display pkgid," */\n" ,"#define VERSION_",pkgname," ",show (display version),"\n" ,"#define MIN_VERSION_",pkgname,"(major1,maj...
967
generateMacros cPkgs = concat $ "/* DO NOT EDIT: This file is automatically generated by Gtk2HsSetup.hs */\n\n" : [ concat ["/* package ",display pkgid," */\n" ,"#define VERSION_",pkgname," ",show (display version),"\n" ,"#define MIN_VERSION_",pkgname,"(major1,major2,minor) (\\\n" ," (major1) < ",...
927
false
true
2
14
216
237
132
105
null
null
elieux/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
collectStmtBinders :: StmtLR idL idR body -> [idL] -- Id Binders for a Stmt... [but what about pattern-sig type vars]? collectStmtBinders (BindStmt pat _ _ _) = collectPatBinders pat
185
collectStmtBinders :: StmtLR idL idR body -> [idL] collectStmtBinders (BindStmt pat _ _ _) = collectPatBinders pat
115
collectStmtBinders (BindStmt pat _ _ _) = collectPatBinders pat
64
true
true
0
9
31
49
23
26
null
null
jseaton/ttasm
Instructions.hs
gpl-3.0
sround = byte 0x76
20
sround = byte 0x76
20
sround = byte 0x76
20
false
false
0
5
5
9
4
5
null
null
alexander-at-github/eta
compiler/ETA/TypeCheck/TcGenGenerics.hs
bsd-3-clause
mkM1_P :: LPat RdrName -> LPat RdrName mkM1_P p = m1DataCon_RDR `nlConPat` [p]
78
mkM1_P :: LPat RdrName -> LPat RdrName mkM1_P p = m1DataCon_RDR `nlConPat` [p]
78
mkM1_P p = m1DataCon_RDR `nlConPat` [p]
39
false
true
0
6
12
33
17
16
null
null
ddssff/pretty-listlike
src/Text/PrettyPrint/HughesPJClass.hs
bsd-3-clause
prettyParen :: Bool -> Doc -> Doc prettyParen = maybeParens
59
prettyParen :: Bool -> Doc -> Doc prettyParen = maybeParens
59
prettyParen = maybeParens
25
false
true
0
8
9
26
11
15
null
null
nushio3/ghc
compiler/typecheck/FamInst.hs
bsd-3-clause
checkFamInstConsistency :: [Module] -> [Module] -> TcM () checkFamInstConsistency famInstMods directlyImpMods = do { dflags <- getDynFlags ; (eps, hpt) <- getEpsAndHpt ; let { -- Fetch the iface of a given module. Must succeed as -- all directly imported modules must already have bee...
1,991
checkFamInstConsistency :: [Module] -> [Module] -> TcM () checkFamInstConsistency famInstMods directlyImpMods = do { dflags <- getDynFlags ; (eps, hpt) <- getEpsAndHpt ; let { -- Fetch the iface of a given module. Must succeed as -- all directly imported modules must already have bee...
1,991
checkFamInstConsistency famInstMods directlyImpMods = do { dflags <- getDynFlags ; (eps, hpt) <- getEpsAndHpt ; let { -- Fetch the iface of a given module. Must succeed as -- all directly imported modules must already have been loaded. modIface mod = c...
1,933
false
true
0
16
758
424
220
204
null
null
jkff/timeplot
Tools/TimePlot.hs
bsd-3-clause
-- Assume events are sorted. -- Pass 1: -- * Compute min/max times -- * Compute unique track names -- -- Then map track names to plotters (track types). -- -- Pass 2: -- * Generate plot data (one-pass multiplexed to tracks) -- makeChart :: (S.ByteString -> [(ChartKind LocalTime, S.ByteString)]) -> I...
2,388
makeChart :: (S.ByteString -> [(ChartKind LocalTime, S.ByteString)]) -> IO (ParseResult LocalTime) -> Maybe LocalTime -> Maybe LocalTime -> (LocalTime -> String -> String) -> IO (Renderable ()) makeChart chartKindF parseEvents minT maxT transformLabel = do ParseRe...
2,155
makeChart chartKindF parseEvents minT maxT transformLabel = do ParseResult events unparseable <- parseEvents when (not (null unparseable)) $ do putStrLn $ "Unparseable lines found" ++ (if null (drop 10 unparseable) then ":" else " (showing first 10):") mapM_ (putStrLn . S.unpack) (take 10 unparseable) if ...
1,907
true
true
0
20
645
854
438
416
null
null
dogweather/nevada-revised-statutes-parser
src/Models/Section.hs
bsd-3-clause
parseName :: Text -> Text parseName = normalizeWhiteSpace . removeAnnotation where removeAnnotation = T.takeWhile isLegalNameChar
131
parseName :: Text -> Text parseName = normalizeWhiteSpace . removeAnnotation where removeAnnotation = T.takeWhile isLegalNameChar
131
parseName = normalizeWhiteSpace . removeAnnotation where removeAnnotation = T.takeWhile isLegalNameChar
105
false
true
0
7
16
38
17
21
null
null
chaosim/peasy
coffee/samples/latex.hs
mit
acute 'r' = "ŕ"
15
acute 'r' = "ŕ"
15
acute 'r' = "ŕ"
15
false
false
1
5
3
13
4
9
null
null
nyirog/cis194
lec04.hs
unlicense
maze3 (C (-5) (-4)) = Wall
26
maze3 (C (-5) (-4)) = Wall
26
maze3 (C (-5) (-4)) = Wall
26
false
false
0
9
5
27
14
13
null
null
spechub/Hets
Propositional/Analysis.hs
gpl-2.0
symbToSymbol :: AS_BASIC.SYMB -> Symbol.Symbol symbToSymbol (AS_BASIC.Symb_id tok) = Symbol.Symbol {Symbol.symName = Id.simpleIdToId tok}
141
symbToSymbol :: AS_BASIC.SYMB -> Symbol.Symbol symbToSymbol (AS_BASIC.Symb_id tok) = Symbol.Symbol {Symbol.symName = Id.simpleIdToId tok}
141
symbToSymbol (AS_BASIC.Symb_id tok) = Symbol.Symbol {Symbol.symName = Id.simpleIdToId tok}
94
false
true
0
8
17
47
24
23
null
null
stevely/hspirv
src/SpirV/Builder/Raw.hs
bsd-3-clause
-- Id 1: Result type, must be float type -- Id 2: Operand fWidthFine :: Id -> Id -> Builder Id fWidthFine = threeOp OpFwidthFine
128
fWidthFine :: Id -> Id -> Builder Id fWidthFine = threeOp OpFwidthFine
70
fWidthFine = threeOp OpFwidthFine
33
true
true
0
7
24
27
14
13
null
null
jtdubs/Light
src/Light/Geometry/Quaternion.hs
mit
(Quaternion v w) @-@ (Quaternion x y) = Quaternion (v ^-^ x) (w+y)
66
(Quaternion v w) @-@ (Quaternion x y) = Quaternion (v ^-^ x) (w+y)
66
(Quaternion v w) @-@ (Quaternion x y) = Quaternion (v ^-^ x) (w+y)
66
false
false
0
7
12
47
23
24
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/UI/LineEdit.hs
mit
lineEditIsTextCopyable :: (Parent LineEdit a, Pointer ptr a, MonadIO m) => ptr -- ^ Pointer to Text or ascentor -> m Bool lineEditIsTextCopyable p = liftIO $ do let ptr = parentPointer p toBool <$> [C.exp| int { (int)$(LineEdit* ptr)->IsTextCopyable() } |] -- | Return text element. -- Text* GetTextElement() co...
341
lineEditIsTextCopyable :: (Parent LineEdit a, Pointer ptr a, MonadIO m) => ptr -- ^ Pointer to Text or ascentor -> m Bool lineEditIsTextCopyable p = liftIO $ do let ptr = parentPointer p toBool <$> [C.exp| int { (int)$(LineEdit* ptr)->IsTextCopyable() } |] -- | Return text element. -- Text* GetTextElement() co...
341
lineEditIsTextCopyable p = liftIO $ do let ptr = parentPointer p toBool <$> [C.exp| int { (int)$(LineEdit* ptr)->IsTextCopyable() } |] -- | Return text element. -- Text* GetTextElement() const { return text_; }
215
false
true
0
11
63
79
41
38
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/Delete.hs
mpl-2.0
-- | Project ID for this request. ddProject :: Lens' DisksDelete Text ddProject = lens _ddProject (\ s a -> s{_ddProject = a})
128
ddProject :: Lens' DisksDelete Text ddProject = lens _ddProject (\ s a -> s{_ddProject = a})
94
ddProject = lens _ddProject (\ s a -> s{_ddProject = a})
58
true
true
0
9
24
42
22
20
null
null
kazu-yamamoto/network-uri
tests/uri001.hs
bsd-3-clause
testURIRef107 = testURIRef InvRf "http://example.org/abc#[2010:836B:4179::836B:4179]"
85
testURIRef107 = testURIRef InvRf "http://example.org/abc#[2010:836B:4179::836B:4179]"
85
testURIRef107 = testURIRef InvRf "http://example.org/abc#[2010:836B:4179::836B:4179]"
85
false
false
0
5
4
11
5
6
null
null
scturtle/turtlelang
Codegen.hs
unlicense
phi :: Type -> [(Operand, Name)] -> Codegen Operand phi ty incoming = instr $ Phi ty incoming []
96
phi :: Type -> [(Operand, Name)] -> Codegen Operand phi ty incoming = instr $ Phi ty incoming []
96
phi ty incoming = instr $ Phi ty incoming []
44
false
true
0
8
18
49
25
24
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
alignType strLst len = let nonempties = filter (not . null) $ map trimr strLst (leftSpace, rightSpace) = case sortBy (comparing length) nonempties of (x:_) -> (head x `elem` " \t", length x < len) [] -> (False, False) in case (leftSpace, rightSpace) of ...
535
alignType strLst len = let nonempties = filter (not . null) $ map trimr strLst (leftSpace, rightSpace) = case sortBy (comparing length) nonempties of (x:_) -> (head x `elem` " \t", length x < len) [] -> (False, False) in case (leftSpace, rightSpace) of ...
535
alignType strLst len = let nonempties = filter (not . null) $ map trimr strLst (leftSpace, rightSpace) = case sortBy (comparing length) nonempties of (x:_) -> (head x `elem` " \t", length x < len) [] -> (False, False) in case (leftSpace, rightSpace) of ...
535
false
false
1
14
177
181
95
86
null
null
jmtd/rdifffs
RDiffFS.hs
bsd-3-clause
unRdiffBackup :: RdiffBackup -> String unRdiffBackup (Current x) = x
68
unRdiffBackup :: RdiffBackup -> String unRdiffBackup (Current x) = x
68
unRdiffBackup (Current x) = x
29
false
true
0
7
9
24
12
12
null
null
ttmtran/efficient-library
src/Knights problem in Haskell/knightsProblem.hs
mit
removeKnightPositions [] board = board
38
removeKnightPositions [] board = board
38
removeKnightPositions [] board = board
38
false
false
0
6
4
13
6
7
null
null
c089/haskell-craft3e
Chapter9.hs
mit
-- (++.1) (w:ws) ++ zs = w:(ws++zs)
35
(w:ws) ++ zs = w:(ws++zs)
25
(w:ws) ++ zs = w:(ws++zs)
25
true
false
0
7
6
31
16
15
null
null
rbonifacio/funsat
src/Funsat/Circuit.hs
bsd-3-clause
lseHash, trueHash :: CircuitHash falseHash = 0 t
48
falseHash, trueHash :: CircuitHash falseHash = 0
48
falseHash = 0
13
false
true
0
4
7
16
9
7
null
null