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
wkoiking/fieldequip
src/Backend.hs
bsd-3-clause
drawAntenna (AntennaData n pos WRSSingleShield) = translateX pos antenna where antenna = centerY (img === strutY 5 === img) === km km = rotate (1/4 @@ turn) (textDef (showKm pos) # lwG 0.05) img = antennaImg red "WRS"
232
drawAntenna (AntennaData n pos WRSSingleShield) = translateX pos antenna where antenna = centerY (img === strutY 5 === img) === km km = rotate (1/4 @@ turn) (textDef (showKm pos) # lwG 0.05) img = antennaImg red "WRS"
232
drawAntenna (AntennaData n pos WRSSingleShield) = translateX pos antenna where antenna = centerY (img === strutY 5 === img) === km km = rotate (1/4 @@ turn) (textDef (showKm pos) # lwG 0.05) img = antennaImg red "WRS"
232
false
false
2
10
52
110
50
60
null
null
tomahawkins/mecha
attic/Visual.hs
bsd-3-clause
redraw :: IO () redraw = do clear [ColorBuffer, DepthBuffer] loadIdentity -- XXX flush swapBuffers
108
redraw :: IO () redraw = do clear [ColorBuffer, DepthBuffer] loadIdentity -- XXX flush swapBuffers
108
redraw = do clear [ColorBuffer, DepthBuffer] loadIdentity -- XXX flush swapBuffers
92
false
true
0
8
24
38
18
20
null
null
WSCU/JSEuterpea
Euterpea Examples/SimpleEuterpea.hs
gpl-3.0
owbell = simplePerc E.Cowbell
30
cowbell = simplePerc E.Cowbell
30
cowbell = simplePerc E.Cowbell
30
false
false
0
6
4
11
5
6
null
null
shlomobauer/BuildIT
src/OutBuild.hs
apache-2.0
passConv h a = do writeBuildIT h "" writeBuildIT h "# user/password to secure strings" writeBuildIT h "" writeBuildIT h ("$" ++ a ++ "_converted_pass = ConvertTo-SecureString \"$" ++ a ++ "_pass\" -AsPlainText -Force") writeBuildIT h ("$" ++ a ++ "_converted_cred = New-Object System.Management.Automation.PSCreden...
410
passConv h a = do writeBuildIT h "" writeBuildIT h "# user/password to secure strings" writeBuildIT h "" writeBuildIT h ("$" ++ a ++ "_converted_pass = ConvertTo-SecureString \"$" ++ a ++ "_pass\" -AsPlainText -Force") writeBuildIT h ("$" ++ a ++ "_converted_cred = New-Object System.Management.Automation.PSCreden...
410
passConv h a = do writeBuildIT h "" writeBuildIT h "# user/password to secure strings" writeBuildIT h "" writeBuildIT h ("$" ++ a ++ "_converted_pass = ConvertTo-SecureString \"$" ++ a ++ "_pass\" -AsPlainText -Force") writeBuildIT h ("$" ++ a ++ "_converted_cred = New-Object System.Management.Automation.PSCreden...
410
false
false
0
14
59
98
45
53
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/SUN/mesh_array.txt SUN_mesh_array> extension supported? -- Note that in the presence of multiple contexts with different capabilities, -- this might be wrong. Use 'glGetSUNMeshArray' in those cases instead. gl_SUN_mesh_array :: Bool gl_SUN_mesh_array = member "GL_SUN_m...
341
gl_SUN_mesh_array :: Bool gl_SUN_mesh_array = member "GL_SUN_mesh_array" extensions
83
gl_SUN_mesh_array = member "GL_SUN_mesh_array" extensions
57
true
true
0
5
38
19
11
8
null
null
google-research/dex-lang
src/Dex/Foreign/Serialize.hs
bsd-3-clause
dexFromCAtom :: Ptr CAtom -> IO (Ptr AtomEx) dexFromCAtom catomPtr = do catom <- peek catomPtr case catom of CLit lit -> toStablePtr $ AtomEx $ Con $ Lit lit CRectArray _ _ _ -> unsupported where unsupported = setError "Unsupported CAtom" $> nullPtr
275
dexFromCAtom :: Ptr CAtom -> IO (Ptr AtomEx) dexFromCAtom catomPtr = do catom <- peek catomPtr case catom of CLit lit -> toStablePtr $ AtomEx $ Con $ Lit lit CRectArray _ _ _ -> unsupported where unsupported = setError "Unsupported CAtom" $> nullPtr
275
dexFromCAtom catomPtr = do catom <- peek catomPtr case catom of CLit lit -> toStablePtr $ AtomEx $ Con $ Lit lit CRectArray _ _ _ -> unsupported where unsupported = setError "Unsupported CAtom" $> nullPtr
230
false
true
1
12
69
106
46
60
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The slicer that should be added to the spreadsheet, including the -- position where it should be placed. The slicerId field is optional; if -- one is not set, an id will be randomly generated. (It is an error to -- specify the ID of a slicer that already exists.) asrSlicer :: Lens' AddSlicerRequest (Maybe Slicer) ...
378
asrSlicer :: Lens' AddSlicerRequest (Maybe Slicer) asrSlicer = lens _asrSlicer (\ s a -> s{_asrSlicer = a})
109
asrSlicer = lens _asrSlicer (\ s a -> s{_asrSlicer = a})
58
true
true
1
9
70
55
28
27
null
null
hy-zhang/parser
experimental/DTC/Lib.hs
bsd-3-clause
tAddParser q@(p, n) (xs :::: xss) = let mb = myCast p (fst $ head xs) in case mb of Nothing -> xs :::: tAddParser q xss Just _ -> (q : map (mapFst (fromJust . myCast p)) xs) :::: xss -- Library functions for typed lists
233
tAddParser q@(p, n) (xs :::: xss) = let mb = myCast p (fst $ head xs) in case mb of Nothing -> xs :::: tAddParser q xss Just _ -> (q : map (mapFst (fromJust . myCast p)) xs) :::: xss -- Library functions for typed lists
233
tAddParser q@(p, n) (xs :::: xss) = let mb = myCast p (fst $ head xs) in case mb of Nothing -> xs :::: tAddParser q xss Just _ -> (q : map (mapFst (fromJust . myCast p)) xs) :::: xss -- Library functions for typed lists
233
false
false
1
18
60
121
57
64
null
null
siddhanathan/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
certainlyWillInline _ _ = Nothing
35
certainlyWillInline _ _ = Nothing
35
certainlyWillInline _ _ = Nothing
35
false
false
0
5
6
11
5
6
null
null
brendanhay/gogol
gogol-storage-transfer/gen/Network/Google/StorageTransfer/Types/Product.hs
mpl-2.0
-- | Creates a value of 'RunTransferJobRequest' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rtjrProjectId' runTransferJobRequest :: RunTransferJobRequest runTransferJobRequest = RunTransferJobRequest' {_rtjrProjectId = Nothing...
321
runTransferJobRequest :: RunTransferJobRequest runTransferJobRequest = RunTransferJobRequest' {_rtjrProjectId = Nothing}
124
runTransferJobRequest = RunTransferJobRequest' {_rtjrProjectId = Nothing}
73
true
true
1
7
46
28
16
12
null
null
ml9951/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (SL fmt reg1 reg2 ri) = let op = case fmt of II32 -> "slw" II64 -> "sld" _ -> panic "PPC.Ppr.pprInstr: shift illegal size" in pprLogic (sLit op) reg1 reg2 (limitShiftRI fmt ri)
275
pprInstr (SL fmt reg1 reg2 ri) = let op = case fmt of II32 -> "slw" II64 -> "sld" _ -> panic "PPC.Ppr.pprInstr: shift illegal size" in pprLogic (sLit op) reg1 reg2 (limitShiftRI fmt ri)
275
pprInstr (SL fmt reg1 reg2 ri) = let op = case fmt of II32 -> "slw" II64 -> "sld" _ -> panic "PPC.Ppr.pprInstr: shift illegal size" in pprLogic (sLit op) reg1 reg2 (limitShiftRI fmt ri)
275
false
false
0
12
124
81
38
43
null
null
mattias-lundell/timber-llvm
src/Scp.hs
bsd-3-clause
var _ = False
13
var _ = False
13
var _ = False
13
false
false
0
4
3
10
4
6
null
null
miguelpagano/equ
Equ/Parser/Types.hs
gpl-3.0
-- Booleanos. bool :: String bool = "Bool"
42
bool :: String bool = "Bool"
28
bool = "Bool"
13
true
true
0
6
7
19
8
11
null
null
spechub/Hets
CSL/AS_BASIC_CSL.hs
gpl-2.0
getEPVarRef _ = Nothing
23
getEPVarRef _ = Nothing
23
getEPVarRef _ = Nothing
23
false
false
0
4
3
10
4
6
null
null
CarstenKoenig/Holidays2013
Mandelbrot/main.hs
unlicense
defaultSettings :: Settings defaultSettings = Settings defaultRes defaultZoom defaultSteps where defaultRes = Size 1024 711 defaultSteps = 1024 defaultZoom = 4
184
defaultSettings :: Settings defaultSettings = Settings defaultRes defaultZoom defaultSteps where defaultRes = Size 1024 711 defaultSteps = 1024 defaultZoom = 4
184
defaultSettings = Settings defaultRes defaultZoom defaultSteps where defaultRes = Size 1024 711 defaultSteps = 1024 defaultZoom = 4
156
false
true
0
5
45
41
21
20
null
null
anttisalonen/starrover2
src/SpaceState/City.hs
mit
updateAvailableMission :: AObject -> StateT SpaceState IO () updateAvailableMission lc = do state <- State.get let malleg = colonyOwner lc case malleg of Nothing -> return () Just alleg -> do case possibleMissionType (allegAttitude alleg state) of Nothing -> return () Just m ...
354
updateAvailableMission :: AObject -> StateT SpaceState IO () updateAvailableMission lc = do state <- State.get let malleg = colonyOwner lc case malleg of Nothing -> return () Just alleg -> do case possibleMissionType (allegAttitude alleg state) of Nothing -> return () Just m ...
354
updateAvailableMission lc = do state <- State.get let malleg = colonyOwner lc case malleg of Nothing -> return () Just alleg -> do case possibleMissionType (allegAttitude alleg state) of Nothing -> return () Just m -> createMission m alleg lc
293
false
true
1
18
98
120
54
66
null
null
dorchard/gram_lang
interpreter/src/Language/Granule/Interpreter.hs
bsd-3-clause
keepBackup :: GrConfig -> Bool keepBackup = fromMaybe False . grKeepBackup
74
keepBackup :: GrConfig -> Bool keepBackup = fromMaybe False . grKeepBackup
74
keepBackup = fromMaybe False . grKeepBackup
43
false
true
0
7
10
29
12
17
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
ssMasterIp :: String ssMasterIp = "master_ip"
45
ssMasterIp :: String ssMasterIp = "master_ip"
45
ssMasterIp = "master_ip"
24
false
true
0
6
5
18
7
11
null
null
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/03_07.hs
mit
-- 5. Using the take and drop functions we looked at above, see if you can write -- a function called rvrs (an abbreviation of ‘reverse’ used because there is a -- function called ‘reverse’ already in Prelude, so if you call your function -- the same name, you’ll get an error message). rvrs should take the string -- “C...
790
rvrs x = drop 9 x ++ take 4 (drop 5 x) ++ take 5 x
50
rvrs x = drop 9 x ++ take 4 (drop 5 x) ++ take 5 x
50
true
false
0
9
153
50
28
22
null
null
leptonyu/mint
corn/src/Service.hs
bsd-3-clause
applicationInfo :: HasServer api '[BaseContext] => Proxy api -> BaseContext -> Text applicationInfo proxy = layoutWithContext proxy . (:. EmptyContext)
151
applicationInfo :: HasServer api '[BaseContext] => Proxy api -> BaseContext -> Text applicationInfo proxy = layoutWithContext proxy . (:. EmptyContext)
151
applicationInfo proxy = layoutWithContext proxy . (:. EmptyContext)
67
false
true
0
8
19
50
25
25
null
null
oldmanmike/ghc
compiler/utils/Maybes.hs
bsd-3-clause
-- | Flipped version of @fromMaybe@, useful for chaining. orElse :: Maybe a -> a -> a orElse = flip fromMaybe
109
orElse :: Maybe a -> a -> a orElse = flip fromMaybe
51
orElse = flip fromMaybe
23
true
true
0
6
20
26
13
13
null
null
tamarin-prover/tamarin-prover
lib/sapic/src/Sapic/SecretChannels.hs
gpl-3.0
getSecretChannels (ProcessAction (ChOut _ t2) _ p) candidates = let c = S.difference candidates (getTermVariables t2) in getSecretChannels p c
148
getSecretChannels (ProcessAction (ChOut _ t2) _ p) candidates = let c = S.difference candidates (getTermVariables t2) in getSecretChannels p c
148
getSecretChannels (ProcessAction (ChOut _ t2) _ p) candidates = let c = S.difference candidates (getTermVariables t2) in getSecretChannels p c
148
false
false
0
11
25
58
27
31
null
null
tlunter/MacFinder
src/MacFinder/Controllers/Index.hs
mit
buildMac :: Either R.Reply [(B.ByteString, B.ByteString)] -> Maybe M.Mac buildMac (Left _) = Nothing
101
buildMac :: Either R.Reply [(B.ByteString, B.ByteString)] -> Maybe M.Mac buildMac (Left _) = Nothing
101
buildMac (Left _) = Nothing
28
false
true
0
10
14
54
26
28
null
null
hvr/vector
Data/Vector/Generic.hs
bsd-3-clause
prescanr' f z = unstreamR . inplace (S.prescanl' (flip f) z) id . streamR
73
prescanr' f z = unstreamR . inplace (S.prescanl' (flip f) z) id . streamR
73
prescanr' f z = unstreamR . inplace (S.prescanl' (flip f) z) id . streamR
73
false
false
0
11
13
40
19
21
null
null
chreekat/stack
src/Stack/Build/Execute.hs
bsd-3-clause
stripCharacterReturn :: ByteString -> ByteString stripCharacterReturn = S8.filter (not . (=='\r'))
98
stripCharacterReturn :: ByteString -> ByteString stripCharacterReturn = S8.filter (not . (=='\r'))
98
stripCharacterReturn = S8.filter (not . (=='\r'))
49
false
true
0
8
10
31
17
14
null
null
brendanhay/gogol
gogol-storage/gen/Network/Google/Resource/Storage/Objects/List.hs
mpl-2.0
-- | Name of the bucket in which to look for objects. olBucket :: Lens' ObjectsList Text olBucket = lens _olBucket (\ s a -> s{_olBucket = a})
142
olBucket :: Lens' ObjectsList Text olBucket = lens _olBucket (\ s a -> s{_olBucket = a})
88
olBucket = lens _olBucket (\ s a -> s{_olBucket = a})
53
true
true
1
9
27
43
22
21
null
null
energyflowanalysis/efa-2.1
attic/src/EFA2/Example/Circular.hs
bsd-3-clause
sigs (PowerIdx 4 1) = return (replicate numOf 2.4)
50
sigs (PowerIdx 4 1) = return (replicate numOf 2.4)
50
sigs (PowerIdx 4 1) = return (replicate numOf 2.4)
50
false
false
0
7
8
28
13
15
null
null
fmapfmapfmap/amazonka
amazonka-sns/gen/Network/AWS/SNS/DeletePlatformApplication.hs
mpl-2.0
-- | PlatformApplicationArn of platform application object to delete. dpaPlatformApplicationARN :: Lens' DeletePlatformApplication Text dpaPlatformApplicationARN = lens _dpaPlatformApplicationARN (\ s a -> s{_dpaPlatformApplicationARN = a})
240
dpaPlatformApplicationARN :: Lens' DeletePlatformApplication Text dpaPlatformApplicationARN = lens _dpaPlatformApplicationARN (\ s a -> s{_dpaPlatformApplicationARN = a})
170
dpaPlatformApplicationARN = lens _dpaPlatformApplicationARN (\ s a -> s{_dpaPlatformApplicationARN = a})
104
true
true
0
9
24
40
22
18
null
null
Julianporter/Haskell-MapReduce
src/Control/Monad2/Trans/MapReduce.hs
bsd-3-clause
bind :: (Monad m) => MapReduceT m b b -- ^ The projection operator, should be idempotent -> MapReduceT m a b -- ^ first argument -> (b -> MapReduceT m b c) -- ^ second argument -> MapReduceT m a c bind p f g = MR (\ x -> left x P.>>= right x) where ...
582
bind :: (Monad m) => MapReduceT m b b -- ^ The projection operator, should be idempotent -> MapReduceT m a b -- ^ first argument -> (b -> MapReduceT m b c) -- ^ second argument -> MapReduceT m a c bind p f g = MR (\ x -> left x P.>>= right x) where ...
582
bind p f g = MR (\ x -> left x P.>>= right x) where left x = (f >>> p) -< x right x y = (f >>> g y) -< x -- | Make 'MapReduceT' a 'Monad2' -- -- * 'return' lifts a value @x@ to the constant function whose value in @m.a@ is @'return'x@ -- -- * '>>=' is just @'bind' 'id'@...
342
false
true
0
11
221
150
78
72
null
null
danipozodg/dependency
haskell_test.hs
gpl-3.0
unwrapLabel :: Maybe String -> String unwrapLabel (Just s) = s
62
unwrapLabel :: Maybe String -> String unwrapLabel (Just s) = s
62
unwrapLabel (Just s) = s
24
false
true
0
7
10
27
13
14
null
null
Vlix/wechat
Web/WeChat/XMLPrint.hs
mit
printOutArticle :: OutRichArticle -> Element printOutArticle (OutRichArticle mbTitle mbDescr mbPicURL mbURL) = eltTag "item" $ mbTag (textTag "Title") mbTitle ++ mbTag (textTag "Description") mbDescr ++ mbTag (textTag "PicUrl") mbPicURL ++ mbTag (textTag "Url") mbURL
283
printOutArticle :: OutRichArticle -> Element printOutArticle (OutRichArticle mbTitle mbDescr mbPicURL mbURL) = eltTag "item" $ mbTag (textTag "Title") mbTitle ++ mbTag (textTag "Description") mbDescr ++ mbTag (textTag "PicUrl") mbPicURL ++ mbTag (textTag "Url") mbURL
283
printOutArticle (OutRichArticle mbTitle mbDescr mbPicURL mbURL) = eltTag "item" $ mbTag (textTag "Title") mbTitle ++ mbTag (textTag "Description") mbDescr ++ mbTag (textTag "PicUrl") mbPicURL ++ mbTag (textTag "Url") mbURL
238
false
true
0
11
49
93
44
49
null
null
danr/hipspec
examples/Challenges/SameFringe.hs
gpl-3.0
(++) :: List -> List -> List Cons x xs ++ ys = Cons x (xs ++ ys)
64
(++) :: List -> List -> List Cons x xs ++ ys = Cons x (xs ++ ys)
64
Cons x xs ++ ys = Cons x (xs ++ ys)
35
false
true
0
9
17
47
23
24
null
null
ku-fpg/wakarusa
wakarusa-examples/sunroof-lite/JavaScript.hs
bsd-3-clause
pretty (Indent n doc) = unlines $ map (take n (cycle " ") ++) $ lines $ pretty doc
83
pretty (Indent n doc) = unlines $ map (take n (cycle " ") ++) $ lines $ pretty doc
83
pretty (Indent n doc) = unlines $ map (take n (cycle " ") ++) $ lines $ pretty doc
83
false
false
0
12
19
50
24
26
null
null
romanb/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types.hs
mpl-2.0
-- | 'AccountQuota' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'aqAccountQuotaName' @::@ 'Maybe' 'Text' -- -- * 'aqMax' @::@ 'Maybe' 'Integer' -- -- * 'aqUsed' @::@ 'Maybe' 'Integer' -- accountQuota :: AccountQuota accountQuota = AccountQuota { _aqAccountQuotaName = Nothing ...
396
accountQuota :: AccountQuota accountQuota = AccountQuota { _aqAccountQuotaName = Nothing , _aqUsed = Nothing , _aqMax = Nothing }
170
accountQuota = AccountQuota { _aqAccountQuotaName = Nothing , _aqUsed = Nothing , _aqMax = Nothing }
141
true
true
0
6
94
41
29
12
null
null
Twinside/hit-simple
Data/Git/Loose.hs
bsd-3-clause
looseRead :: FilePath -> Ref -> IO GitObject looseRead repoPath ref = looseUnmarshall <$> L.readFile (objectPathOfRef repoPath ref)
131
looseRead :: FilePath -> Ref -> IO GitObject looseRead repoPath ref = looseUnmarshall <$> L.readFile (objectPathOfRef repoPath ref)
131
looseRead repoPath ref = looseUnmarshall <$> L.readFile (objectPathOfRef repoPath ref)
86
false
true
0
8
17
44
21
23
null
null
HaskellForCats/HaskellForCats
MenaBeginning/Ch004/ch4Probs2.hs
mit
-- note that b should be either a True or False -- 4.8.6 -- using an earlier example as a guide dada4 = \x -> \y -> x + y
133
dada4 = \x -> \y -> x + y
34
dada4 = \x -> \y -> x + y
34
true
false
0
7
41
23
14
9
null
null
rfranek/duckling
Duckling/TimeGrain/HE/Rules.hs
bsd-3-clause
rules :: [Rule] rules = map go grains where go (name, regexPattern, grain) = Rule { name = name , pattern = [regex regexPattern] , prod = \_ -> Just $ Token TimeGrain grain }
204
rules :: [Rule] rules = map go grains where go (name, regexPattern, grain) = Rule { name = name , pattern = [regex regexPattern] , prod = \_ -> Just $ Token TimeGrain grain }
204
rules = map go grains where go (name, regexPattern, grain) = Rule { name = name , pattern = [regex regexPattern] , prod = \_ -> Just $ Token TimeGrain grain }
188
false
true
0
9
64
78
44
34
null
null
luisnavarrodelangel/InnerEar
src/InnerEarServer.hs
gpl-3.0
processRequest s i (GetAllExerciseEvents h e) = withServer s $ getAllExerciseEvents i h e
89
processRequest s i (GetAllExerciseEvents h e) = withServer s $ getAllExerciseEvents i h e
89
processRequest s i (GetAllExerciseEvents h e) = withServer s $ getAllExerciseEvents i h e
89
false
false
0
6
13
38
16
22
null
null
jyrimatti/alava
src-lib/HtmlPrint.hs
mit
term (Def tname b) = wrap "def" $ name tname <> keyword " = " <> term b
91
term (Def tname b) = wrap "def" $ name tname <> keyword " = " <> term b
91
term (Def tname b) = wrap "def" $ name tname <> keyword " = " <> term b
91
false
false
0
8
37
42
18
24
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/WindowGo.hs
bsd-2-clause
{- $usage Import the module into your @~\/.xmonad\/xmonad.hs@: > import XMonad.Actions.WindowGo and define appropriate key bindings: > , ((modm .|. shiftMask, xK_g), raise (className =? "Firefox")) > , ((modm .|. shiftMask, xK_b), runOrRaise "firefox" (className =? "Firefox")) (Note that Firefox v3 and up have a c...
1,151
ifWindows :: Query Bool -> ([Window] -> X ()) -> X () -> X () ifWindows qry f el = withWindowSet $ \wins -> do matches <- filterM (runQuery qry) $ W.allWindows wins case matches of [] -> el ws -> f ws -- | The same as ifWindows, but applies a ManageHook to the first match -- instead and discards the other ...
327
ifWindows qry f el = withWindowSet $ \wins -> do matches <- filterM (runQuery qry) $ W.allWindows wins case matches of [] -> el ws -> f ws -- | The same as ifWindows, but applies a ManageHook to the first match -- instead and discards the other matches
265
true
true
0
13
200
122
61
61
null
null
drets/scheme-haskell-48h
src/Scheme/Eval.hs
bsd-3-clause
substring _ _ _ = throwError $ Default "substring error"
82
substring _ _ _ = throwError $ Default "substring error"
82
substring _ _ _ = throwError $ Default "substring error"
82
false
false
0
6
35
20
9
11
null
null
suhailshergill/research
haskell/src/Research/Algorithms/Data/Zseq.hs
bsd-3-clause
showSeq :: (Eq (impl base Char), Show a, AbsSeqImpl impl base, AbsSeq (impl base)) => List a -> impl base Char showSeq xs = case (deCons xs) of Nothing -> cons '[' (cons ']' nil) Just(h, t) -> let Just(p, s) = deCons(showSeq t) in cons p (string2Seq(show h) ++ (if s == (c...
576
showSeq :: (Eq (impl base Char), Show a, AbsSeqImpl impl base, AbsSeq (impl base)) => List a -> impl base Char showSeq xs = case (deCons xs) of Nothing -> cons '[' (cons ']' nil) Just(h, t) -> let Just(p, s) = deCons(showSeq t) in cons p (string2Seq(show h) ++ (if s == (c...
576
showSeq xs = case (deCons xs) of Nothing -> cons '[' (cons ']' nil) Just(h, t) -> let Just(p, s) = deCons(showSeq t) in cons p (string2Seq(show h) ++ (if s == (cons ']' nil) then s else cons ',' nil ++ s)) -- }}} -- {{{ List -- | the traditional list datatype. not...
434
false
true
2
14
182
201
101
100
null
null
athanclark/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
writeIBC :: FilePath -> FilePath -> Idris () writeIBC src f = do logLvl 1 $ "Writing ibc " ++ show f i <- getIState -- case (Data.List.map fst (idris_metavars i)) \\ primDefs of -- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables" -- [] -> retur...
808
writeIBC :: FilePath -> FilePath -> Idris () writeIBC src f = do logLvl 1 $ "Writing ibc " ++ show f i <- getIState -- case (Data.List.map fst (idris_metavars i)) \\ primDefs of -- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables" -- [] -> retur...
808
writeIBC src f = do logLvl 1 $ "Writing ibc " ++ show f i <- getIState -- case (Data.List.map fst (idris_metavars i)) \\ primDefs of -- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables" -- [] -> return () resetNameIdx ibcf <- m...
763
false
true
0
15
267
175
81
94
null
null
EFulmer/haskell-scheme-wikibook
src/Exercises/Ch2/Pt1/Ex2.hs
bsd-3-clause
spaces :: Parser () spaces = skipMany1 space
44
spaces :: Parser () spaces = skipMany1 space
44
spaces = skipMany1 space
24
false
true
0
6
7
19
9
10
null
null
phaazon/linear
src/Linear/V3.hs
bsd-3-clause
ez :: R3 t => E t ez = E _z
27
ez :: R3 t => E t ez = E _z
27
ez = E _z
9
false
true
0
7
10
29
12
17
null
null
donatello/plivo-haskell
Plivo/XML.hs
bsd-3-clause
makeRecord :: [Attrib] -> Either PlivoXMLError Node makeRecord attrs = makeNode Record attrs ""
95
makeRecord :: [Attrib] -> Either PlivoXMLError Node makeRecord attrs = makeNode Record attrs ""
95
makeRecord attrs = makeNode Record attrs ""
43
false
true
0
6
13
33
16
17
null
null
kazu-yamamoto/easy-file
System/EasyFile/Missing.hs
bsd-3-clause
accessTime :: (UTCTime,UTCTime,UTCTime) -> UTCTime accessTime (_,atime,_) = atime
81
accessTime :: (UTCTime,UTCTime,UTCTime) -> UTCTime accessTime (_,atime,_) = atime
81
accessTime (_,atime,_) = atime
30
false
true
0
6
8
36
21
15
null
null
rudyardrichter/MCTS
src/MCTS/Games/Confrontation.hs
mit
lightPieces :: [Piece] lightPieces = [ Aragorn , Boromir , Frodo , Gandalf , Gimli , Legolas , Merry , Pippin , Sam ]
243
lightPieces :: [Piece] lightPieces = [ Aragorn , Boromir , Frodo , Gandalf , Gimli , Legolas , Merry , Pippin , Sam ]
243
lightPieces = [ Aragorn , Boromir , Frodo , Gandalf , Gimli , Legolas , Merry , Pippin , Sam ]
220
false
true
0
5
149
41
26
15
null
null
markuspf/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LExternal se) [] | se == sUN "prim__stderr" = v ++ "MKPTR(vm, stderr)"
78
doOp v (LExternal se) [] | se == sUN "prim__stderr" = v ++ "MKPTR(vm, stderr)"
78
doOp v (LExternal se) [] | se == sUN "prim__stderr" = v ++ "MKPTR(vm, stderr)"
78
false
false
2
9
14
41
17
24
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/DiffCheck.hs
bsd-3-clause
sigVars :: [Int] -> GhcSpec -> M.HashMap Var (Located SpecType) sigVars ls sp = M.fromList $ filter (ok . snd) $ specSigs sp where ok = not . isDiff ls
164
sigVars :: [Int] -> GhcSpec -> M.HashMap Var (Located SpecType) sigVars ls sp = M.fromList $ filter (ok . snd) $ specSigs sp where ok = not . isDiff ls
164
sigVars ls sp = M.fromList $ filter (ok . snd) $ specSigs sp where ok = not . isDiff ls
100
false
true
2
10
42
86
39
47
null
null
fryguybob/LaTeXGrapher
src/LaTeXGrapher/Parser/Markup.hs
bsd-3-clause
parseSegment :: Parser Markup parseSegment = do try $ symbol "Segment" p <- listOfPairs return $ Segment p
142
parseSegment :: Parser Markup parseSegment = do try $ symbol "Segment" p <- listOfPairs return $ Segment p
142
parseSegment = do try $ symbol "Segment" p <- listOfPairs return $ Segment p
112
false
true
1
9
53
45
18
27
null
null
ghc-android/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
pprPrefixName :: NamedThing a => a -> SDoc pprPrefixName thing | name `hasKey` liftedTypeKindTyConKey = ppr name -- See Note [Special treatment for kind *] | otherwise = pprPrefixVar (isSymOcc (nameOccName name)) (ppr name) where name = getName thing {- Note [Special treatment for kind *] ~~~~~~~~~~~~~~~~~~...
757
pprPrefixName :: NamedThing a => a -> SDoc pprPrefixName thing | name `hasKey` liftedTypeKindTyConKey = ppr name -- See Note [Special treatment for kind *] | otherwise = pprPrefixVar (isSymOcc (nameOccName name)) (ppr name) where name = getName thing {- Note [Special treatment for kind *] ~~~~~~~~~~~~~~~~~~...
757
pprPrefixName thing | name `hasKey` liftedTypeKindTyConKey = ppr name -- See Note [Special treatment for kind *] | otherwise = pprPrefixVar (isSymOcc (nameOccName name)) (ppr name) where name = getName thing {- Note [Special treatment for kind *] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do not put parens around ...
714
false
true
0
10
136
87
42
45
null
null
thchittenden/GeoChat
src/Chat/Session.hs
mit
recvAction :: SessionAction () recvAction = forever $ do alias <- getAlias clientPacket <- recvClient case clientPacket of ClientMessage msg -> sendChannel (ServerMessage alias msg) -- Creates a thread that sends pings every n seconds to the -- client. This keeps sockets from closing on some browse...
323
recvAction :: SessionAction () recvAction = forever $ do alias <- getAlias clientPacket <- recvClient case clientPacket of ClientMessage msg -> sendChannel (ServerMessage alias msg) -- Creates a thread that sends pings every n seconds to the -- client. This keeps sockets from closing on some browse...
323
recvAction = forever $ do alias <- getAlias clientPacket <- recvClient case clientPacket of ClientMessage msg -> sendChannel (ServerMessage alias msg) -- Creates a thread that sends pings every n seconds to the -- client. This keeps sockets from closing on some browsers.
292
false
true
1
14
67
67
30
37
null
null
walck/cyclotomic
test/Properties.hs
gpl-3.0
---------------- -- Properties -- ---------------- prop_square_sqrtRat :: Int -> Bool prop_square_sqrtRat n = sqrtRat (fromIntegral n) ^ (2::Int) == fromIntegral n
164
prop_square_sqrtRat :: Int -> Bool prop_square_sqrtRat n = sqrtRat (fromIntegral n) ^ (2::Int) == fromIntegral n
112
prop_square_sqrtRat n = sqrtRat (fromIntegral n) ^ (2::Int) == fromIntegral n
77
true
true
0
9
21
47
25
22
null
null
oldmanmike/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
tickSameFileOnly :: TickishType -> Bool tickSameFileOnly HpcTicks = True
72
tickSameFileOnly :: TickishType -> Bool tickSameFileOnly HpcTicks = True
72
tickSameFileOnly HpcTicks = True
32
false
true
0
5
8
18
9
9
null
null
m00nlight/99-problems
haskell/p-39.hs
bsd-3-clause
primeR :: Integral a => a -> a -> [a] primeR a b = filter isPrime [a..b]
76
primeR :: Integral a => a -> a -> [a] primeR a b = filter isPrime [a..b]
76
primeR a b = filter isPrime [a..b]
38
false
true
0
8
20
44
22
22
null
null
FranklinChen/IHaskell
src/IHaskell/Eval/Evaluate.hs
mit
evalCommand _ (TypeSignature sig) state = wrapExecution state $ -- We purposefully treat this as a "success" because that way execution continues. Empty type -- signatures are likely due to a parse error later on, and we want that to be displayed. return $ displayError $ "The type signature " ++ sig ++ "\nlacks a...
344
evalCommand _ (TypeSignature sig) state = wrapExecution state $ -- We purposefully treat this as a "success" because that way execution continues. Empty type -- signatures are likely due to a parse error later on, and we want that to be displayed. return $ displayError $ "The type signature " ++ sig ++ "\nlacks a...
344
evalCommand _ (TypeSignature sig) state = wrapExecution state $ -- We purposefully treat this as a "success" because that way execution continues. Empty type -- signatures are likely due to a parse error later on, and we want that to be displayed. return $ displayError $ "The type signature " ++ sig ++ "\nlacks a...
344
false
false
0
10
62
44
22
22
null
null
olorin/amazonka
amazonka-s3/test/Test/AWS/Gen/S3.hs
mpl-2.0
testPutBucketTagging :: PutBucketTagging -> TestTree testPutBucketTagging = req "PutBucketTagging" "fixture/PutBucketTagging.yaml"
138
testPutBucketTagging :: PutBucketTagging -> TestTree testPutBucketTagging = req "PutBucketTagging" "fixture/PutBucketTagging.yaml"
138
testPutBucketTagging = req "PutBucketTagging" "fixture/PutBucketTagging.yaml"
85
false
true
0
5
17
21
10
11
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_ASN1_KEYWORD :: Int wxSTC_ASN1_KEYWORD = 6
48
wxSTC_ASN1_KEYWORD :: Int wxSTC_ASN1_KEYWORD = 6
48
wxSTC_ASN1_KEYWORD = 6
22
false
true
0
4
5
11
6
5
null
null
text-utf8/text
benchmarks/haskell/Benchmarks.hs
bsd-2-clause
main :: IO () main = benchmarks >>= defaultMain
47
main :: IO () main = benchmarks >>= defaultMain
47
main = benchmarks >>= defaultMain
33
false
true
0
6
8
20
10
10
null
null
siddhanathan/ghc
testsuite/tests/rename/should_compile/timing001.hs
bsd-3-clause
a424 = a425
11
a424 = a425
11
a424 = a425
11
false
false
1
5
2
10
3
7
null
null
urbanslug/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Return a 403 permission denied page. permissionDenied :: MonadHandler m => Text -> m a permissionDenied = hcError . PermissionDenied
137
permissionDenied :: MonadHandler m => Text -> m a permissionDenied = hcError . PermissionDenied
95
permissionDenied = hcError . PermissionDenied
45
true
true
0
7
21
30
15
15
null
null
gbataille/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
pipeTableHeaderPart :: Parser [Char] st Alignment pipeTableHeaderPart = try $ do skipMany spaceChar left <- optionMaybe (char ':') many1 (char '-') right <- optionMaybe (char ':') skipMany spaceChar return $ case (left,right) of (Nothing,Nothing) -> AlignDefault (Just _,Nothing) -> AlignLef...
448
pipeTableHeaderPart :: Parser [Char] st Alignment pipeTableHeaderPart = try $ do skipMany spaceChar left <- optionMaybe (char ':') many1 (char '-') right <- optionMaybe (char ':') skipMany spaceChar return $ case (left,right) of (Nothing,Nothing) -> AlignDefault (Just _,Nothing) -> AlignLef...
448
pipeTableHeaderPart = try $ do skipMany spaceChar left <- optionMaybe (char ':') many1 (char '-') right <- optionMaybe (char ':') skipMany spaceChar return $ case (left,right) of (Nothing,Nothing) -> AlignDefault (Just _,Nothing) -> AlignLeft (Nothing,Just _) -> AlignRight (Jus...
398
false
true
0
13
102
159
78
81
null
null
da-x/lamdu
Lamdu/Sugar/Names/Add.hs
gpl-3.0
setName :: Monad tm => UUID -> StoredName -> T tm () setName = Transaction.setP . assocNameRef
94
setName :: Monad tm => UUID -> StoredName -> T tm () setName = Transaction.setP . assocNameRef
94
setName = Transaction.setP . assocNameRef
41
false
true
0
9
16
39
19
20
null
null
futufeld/eclogues
eclogues-impl/gen-hs/ReadOnlyScheduler.hs
bsd-3-clause
encode_GetTasksStatus_result :: (T.Protocol p, T.Transport t) => p t -> GetTasksStatus_result -> LBS.ByteString encode_GetTasksStatus_result oprot record = T.serializeVal oprot $ from_GetTasksStatus_result record
212
encode_GetTasksStatus_result :: (T.Protocol p, T.Transport t) => p t -> GetTasksStatus_result -> LBS.ByteString encode_GetTasksStatus_result oprot record = T.serializeVal oprot $ from_GetTasksStatus_result record
212
encode_GetTasksStatus_result oprot record = T.serializeVal oprot $ from_GetTasksStatus_result record
100
false
true
0
8
21
60
29
31
null
null
mydaum/cabal
Cabal/Distribution/Simple/Doctest.hs
bsd-3-clause
runDoctest :: Verbosity -> Compiler -> Platform -> ConfiguredProgram -> DoctestArgs -> IO () runDoctest verbosity comp platform doctestProg args = do renderArgs verbosity comp platform args $ \(flags, files) -> do runProgram verbosity doctestProg (flags...
330
runDoctest :: Verbosity -> Compiler -> Platform -> ConfiguredProgram -> DoctestArgs -> IO () runDoctest verbosity comp platform doctestProg args = do renderArgs verbosity comp platform args $ \(flags, files) -> do runProgram verbosity doctestProg (flags...
330
runDoctest verbosity comp platform doctestProg args = do renderArgs verbosity comp platform args $ \(flags, files) -> do runProgram verbosity doctestProg (flags <> files)
182
false
true
0
14
104
96
46
50
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/Key.hs
bsd-3-clause
-- | Translate key from a GTK string description to our internal key type. -- To be used, in particular, for the command bindings and macros -- in the config file. -- -- See <https://github.com/twobob/gtk-/blob/master/gdk/keynames.txt> keyTranslate :: String -> Key keyTranslate "less" = Char '<'
305
keyTranslate :: String -> Key keyTranslate "less" = Char '<'
69
keyTranslate "less" = Char '<'
39
true
true
0
5
53
26
15
11
null
null
higgsd/euler
hs/122.hs
bsd-2-clause
genMults = genPath xs xs (0:0:replicate (nn-1) nn) where xs = [1]
69
genMults = genPath xs xs (0:0:replicate (nn-1) nn) where xs = [1]
69
genMults = genPath xs xs (0:0:replicate (nn-1) nn) where xs = [1]
69
false
false
0
10
15
47
24
23
null
null
gsdlab/claferIG
src/Language/Clafer/IG/Process.hs
mit
getMessage :: MonadIO m => Process -> m String getMessage proce = liftIO $ do len <- read `liftM` hGetLine (stdOut proce) mapM hGetChar $ replicate len (stdOut proce)
186
getMessage :: MonadIO m => Process -> m String getMessage proce = liftIO $ do len <- read `liftM` hGetLine (stdOut proce) mapM hGetChar $ replicate len (stdOut proce)
186
getMessage proce = liftIO $ do len <- read `liftM` hGetLine (stdOut proce) mapM hGetChar $ replicate len (stdOut proce)
139
false
true
0
12
48
75
35
40
null
null
elieux/ghc
compiler/main/HscTypes.hs
bsd-3-clause
typeEnvPatSyns env = [ps | AConLike (PatSynCon ps) <- typeEnvElts env]
71
typeEnvPatSyns env = [ps | AConLike (PatSynCon ps) <- typeEnvElts env]
71
typeEnvPatSyns env = [ps | AConLike (PatSynCon ps) <- typeEnvElts env]
71
false
false
0
10
11
32
15
17
null
null
fmapfmapfmap/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/GetMLModel.hs
mpl-2.0
-- | A list of the training parameters in the 'MLModel'. The list is -- implemented as a map of key\/value pairs. -- -- The following is the current set of training parameters: -- -- - 'sgd.l1RegularizationAmount' - Coefficient regularization L1 norm. -- It controls overfitting the data by penalizing large coeffi...
1,914
gmlmrsTrainingParameters :: Lens' GetMLModelResponse (HashMap Text Text) gmlmrsTrainingParameters = lens _gmlmrsTrainingParameters (\ s a -> s{_gmlmrsTrainingParameters = a}) . _Default . _Map
192
gmlmrsTrainingParameters = lens _gmlmrsTrainingParameters (\ s a -> s{_gmlmrsTrainingParameters = a}) . _Default . _Map
119
true
true
0
11
391
91
65
26
null
null
markandrus/jwt-haskell
src/Text/JSON/JWS.hs
bsd-3-clause
toBase64URL :: BS.ByteString -> Encoded a toBase64URL = Encoded . C.takeWhile ((/=) '=') . B64.encode
101
toBase64URL :: BS.ByteString -> Encoded a toBase64URL = Encoded . C.takeWhile ((/=) '=') . B64.encode
101
toBase64URL = Encoded . C.takeWhile ((/=) '=') . B64.encode
59
false
true
0
9
14
43
22
21
null
null
zinfra/khan
khan/src/Khan/Prelude/Log.hs
mpl-2.0
debug_ :: Text -> AWS () debug_ = whenDebug . log_
50
debug_ :: Text -> AWS () debug_ = whenDebug . log_
50
debug_ = whenDebug . log_
25
false
true
1
8
10
31
13
18
null
null
kawu/concraft-pl
src/NLP/Concraft/Polish/Maca.hs
bsd-2-clause
doMacaPar :: Maca -> T.Text -> IO [Sent Tag] doMacaPar (Maca (inCh, outCh)) par = do let par' = T.intercalate " " (T.lines par) `T.append` "\n" writeChan inCh par' restoreSpaces par <$> readChan outCh -- | Restore info abouts spaces from a text and insert them -- to a parsed paragraph.
301
doMacaPar :: Maca -> T.Text -> IO [Sent Tag] doMacaPar (Maca (inCh, outCh)) par = do let par' = T.intercalate " " (T.lines par) `T.append` "\n" writeChan inCh par' restoreSpaces par <$> readChan outCh -- | Restore info abouts spaces from a text and insert them -- to a parsed paragraph.
301
doMacaPar (Maca (inCh, outCh)) par = do let par' = T.intercalate " " (T.lines par) `T.append` "\n" writeChan inCh par' restoreSpaces par <$> readChan outCh -- | Restore info abouts spaces from a text and insert them -- to a parsed paragraph.
256
false
true
0
14
65
102
50
52
null
null
travitch/language-python-builder
src/Language/Python/Common/Builder.hs
bsd-3-clause
callE :: (Monoid annot) => ExprQ annot -> [ArgumentQ annot] -> ExprQ annot callE = callAE mempty
96
callE :: (Monoid annot) => ExprQ annot -> [ArgumentQ annot] -> ExprQ annot callE = callAE mempty
96
callE = callAE mempty
21
false
true
0
9
16
43
21
22
null
null
niteria/haddock
haddock-api/src/Haddock/Convert.hs
bsd-2-clause
synifyType s forallty@(ForAllTy _tv _ty) = let (tvs, ctx, tau) = tcSplitSigmaTy forallty sPhi = HsQualTy { hst_ctxt = synifyCtx ctx , hst_body = synifyType WithinType tau } in case s of DeleteTopLevelQuantification -> synifyType ImplicitizeForAll tau WithinType -> noLoc $ ...
471
synifyType s forallty@(ForAllTy _tv _ty) = let (tvs, ctx, tau) = tcSplitSigmaTy forallty sPhi = HsQualTy { hst_ctxt = synifyCtx ctx , hst_body = synifyType WithinType tau } in case s of DeleteTopLevelQuantification -> synifyType ImplicitizeForAll tau WithinType -> noLoc $ ...
471
synifyType s forallty@(ForAllTy _tv _ty) = let (tvs, ctx, tau) = tcSplitSigmaTy forallty sPhi = HsQualTy { hst_ctxt = synifyCtx ctx , hst_body = synifyType WithinType tau } in case s of DeleteTopLevelQuantification -> synifyType ImplicitizeForAll tau WithinType -> noLoc $ ...
471
false
false
0
13
153
129
66
63
null
null
ekmett/bitwise
src/Data/Array/BitArray.hs
bsd-3-clause
false :: Ix i => (i, i) {- ^ bounds -} -> BitArray i false bs = fill bs False
77
false :: Ix i => (i, i) {- ^ bounds -} -> BitArray i false bs = fill bs False
77
false bs = fill bs False
24
false
true
0
7
19
43
21
22
null
null
hepek/ErrorProp
src/Math/Symbolic.hs
gpl-2.0
d x (Neg a) = -(d x a)
25
d x (Neg a) = -(d x a)
25
d x (Neg a) = -(d x a)
25
false
false
0
7
10
29
13
16
null
null
olsner/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
elemVarEnvByKey :: Unique -> VarEnv a -> Bool elemVarEnv = elemUFM
75
elemVarEnvByKey :: Unique -> VarEnv a -> Bool elemVarEnv = elemUFM
74
elemVarEnv = elemUFM
26
false
true
0
7
19
22
11
11
null
null
luigy/stack
src/Stack/Options.hs
bsd-3-clause
logLevelOptsParser :: Bool -> Maybe LogLevel -> Parser (Maybe LogLevel) logLevelOptsParser hide defLogLevel = fmap (Just . parse) (strOption (long "verbosity" <> metavar "VERBOSITY" <> help "Verbosity: silent, error, warn, info, debug" <> hideMods hide))...
1,017
logLevelOptsParser :: Bool -> Maybe LogLevel -> Parser (Maybe LogLevel) logLevelOptsParser hide defLogLevel = fmap (Just . parse) (strOption (long "verbosity" <> metavar "VERBOSITY" <> help "Verbosity: silent, error, warn, info, debug" <> hideMods hide))...
1,017
logLevelOptsParser hide defLogLevel = fmap (Just . parse) (strOption (long "verbosity" <> metavar "VERBOSITY" <> help "Verbosity: silent, error, warn, info, debug" <> hideMods hide)) <|> flag' (Just verboseLevel) (short 'v' <> long "verbose" <> ...
945
false
true
2
15
370
253
120
133
null
null
nushio3/ghc
compiler/typecheck/TcBinds.hs
bsd-3-clause
tcSpecPrags :: Id -> [LSig Name] -> TcM [LTcSpecPrag] -- Add INLINE and SPECIALSE pragmas -- INLINE prags are added to the (polymorphic) Id directly -- SPECIALISE prags are passed to the desugarer via TcSpecPrags -- Pre-condition: the poly_id is zonked -- Reason: required by tcSubExp tcSpecPrags poly_...
920
tcSpecPrags :: Id -> [LSig Name] -> TcM [LTcSpecPrag] tcSpecPrags poly_id prag_sigs = do { traceTc "tcSpecPrags" (ppr poly_id <+> ppr spec_sigs) ; unless (null bad_sigs) warn_discarded_sigs ; pss <- mapAndRecoverM (wrapLocM (tcSpecPrag poly_id)) spec_sigs ; return $ concatMap (\(L l p...
683
tcSpecPrags poly_id prag_sigs = do { traceTc "tcSpecPrags" (ppr poly_id <+> ppr spec_sigs) ; unless (null bad_sigs) warn_discarded_sigs ; pss <- mapAndRecoverM (wrapLocM (tcSpecPrag poly_id)) spec_sigs ; return $ concatMap (\(L l ps) -> map (L l) ps) pss } where spec_sigs = filter isSpecLSi...
617
true
true
3
13
215
243
122
121
null
null
ytakano/tsukuyomi
tests/typeinfer/SmallML.hs
bsd-3-clause
expr2str (ExprVar s) = s
24
expr2str (ExprVar s) = s
24
expr2str (ExprVar s) = s
24
false
false
0
7
4
15
7
8
null
null
spacekitteh/smcghc
compiler/nativeGen/SPARC/CodeGen.hs
bsd-3-clause
arg_to_int_vregs' :: DynFlags -> CmmExpr -> NatM (OrdList Instr, [Reg]) arg_to_int_vregs' dflags arg -- If the expr produces a 64 bit int, then we can just use iselExpr64 | isWord64 (cmmExprType dflags arg) = do (ChildCode64 code r_lo) <- iselExpr64 arg let r_hi ...
2,201
arg_to_int_vregs' :: DynFlags -> CmmExpr -> NatM (OrdList Instr, [Reg]) arg_to_int_vregs' dflags arg -- If the expr produces a 64 bit int, then we can just use iselExpr64 | isWord64 (cmmExprType dflags arg) = do (ChildCode64 code r_lo) <- iselExpr64 arg let r_hi ...
2,201
arg_to_int_vregs' dflags arg -- If the expr produces a 64 bit int, then we can just use iselExpr64 | isWord64 (cmmExprType dflags arg) = do (ChildCode64 code r_lo) <- iselExpr64 arg let r_hi = getHiVRegFromLo r_lo return (code, [r_hi, r_lo]) ...
2,129
false
true
0
28
1,215
441
220
221
null
null
christiannolte/tip-toi-reveng
src/Utils.hs
mit
forMn :: Monad m => [a] -> (Int -> a -> m b) -> m [b] forMn l f = forM (zip l [0..]) $ \(x,n) -> f n x
102
forMn :: Monad m => [a] -> (Int -> a -> m b) -> m [b] forMn l f = forM (zip l [0..]) $ \(x,n) -> f n x
102
forMn l f = forM (zip l [0..]) $ \(x,n) -> f n x
48
false
true
0
11
29
92
46
46
null
null
prSquirrel/to-utf8
app/Main.hs
bsd-3-clause
options :: [OptDescr (Options -> IO Options)] options = [ Option "u" [ "unicode" ] (ReqArg (\arg _ -> do let utf8 = convertSingle (read arg :: Word) putStr "UTF-8 bytes: " print $ asHex...
1,360
options :: [OptDescr (Options -> IO Options)] options = [ Option "u" [ "unicode" ] (ReqArg (\arg _ -> do let utf8 = convertSingle (read arg :: Word) putStr "UTF-8 bytes: " print $ asHex...
1,360
options = [ Option "u" [ "unicode" ] (ReqArg (\arg _ -> do let utf8 = convertSingle (read arg :: Word) putStr "UTF-8 bytes: " print $ asHex utf8 putStrLn...
1,314
false
true
0
18
814
279
137
142
null
null
goldfirere/th-desugar
Test/Run.hs
bsd-3-clause
test_mkName :: Bool test_mkName = and [ hasSameType (Proxy :: Proxy FuzzSyn) (Proxy :: Proxy Fuzz) , hasSameType (Proxy :: Proxy FuzzDataSyn) (Proxy :: Proxy 'Fuzz) ]
184
test_mkName :: Bool test_mkName = and [ hasSameType (Proxy :: Proxy FuzzSyn) (Proxy :: Proxy Fuzz) , hasSameType (Proxy :: Proxy FuzzDataSyn) (Proxy :: Proxy 'Fuzz) ]
184
test_mkName = and [ hasSameType (Proxy :: Proxy FuzzSyn) (Proxy :: Proxy Fuzz) , hasSameType (Proxy :: Proxy FuzzDataSyn) (Proxy :: Proxy 'Fuzz) ]
164
false
true
0
10
44
75
37
38
null
null
yesodweb/persistent
persistent-sqlite/Database/Sqlite.hs
mit
-- | Sets SQLite global configuration parameter. See SQLite documentation for the <https://www.sqlite.org/c3ref/config.html sqlite3_config> function. -- In short, this must be called prior to any other SQLite function if you want the call to succeed. -- -- @since 2.1.4 config :: Config -> IO () config c = case c of C...
563
config :: Config -> IO () config c = case c of ConfigLogFn (LogFunction rawLogFn) -> do e <- fmap decodeError $ set_logC rawLogFn nullPtr case e of ErrorOK -> return () _ -> sqlError Nothing "sqlite3_config" e -- | Return type of the 'status' function -- -- @since 2.6.1
293
config c = case c of ConfigLogFn (LogFunction rawLogFn) -> do e <- fmap decodeError $ set_logC rawLogFn nullPtr case e of ErrorOK -> return () _ -> sqlError Nothing "sqlite3_config" e -- | Return type of the 'status' function -- -- @since 2.6.1
267
true
true
1
12
111
100
49
51
null
null
trenttobler/hs-asteroids
test/Spec.hs
bsd-3-clause
main :: IO Counts main = runTestTT tests
41
main :: IO Counts main = runTestTT tests
40
main = runTestTT tests
22
false
true
0
6
8
23
9
14
null
null
peterokagey/haskellOEIS
src/KthDifferences/A327460.hs
apache-2.0
a328071_list :: [Integer] a328071_list = concat a328071_rows
60
a328071_list :: [Integer] a328071_list = concat a328071_rows
60
a328071_list = concat a328071_rows
34
false
true
0
5
6
17
9
8
null
null
juodaspaulius/clafer
src/Language/Clafer/Intermediate/TypeSystem.hs
mit
numeric (TMap _ ta') = numeric ta'
34
numeric (TMap _ ta') = numeric ta'
34
numeric (TMap _ ta') = numeric ta'
34
false
false
0
6
6
21
9
12
null
null
teozkr/GearScript
src/GearScript/Parser.hs
mit
localVariable :: Parser String localVariable = satisfyM takeVar where takeVar (L.LocalVariable n) = Just n takeVar _ = Nothing
140
localVariable :: Parser String localVariable = satisfyM takeVar where takeVar (L.LocalVariable n) = Just n takeVar _ = Nothing
140
localVariable = satisfyM takeVar where takeVar (L.LocalVariable n) = Just n takeVar _ = Nothing
109
false
true
1
8
32
46
22
24
null
null
aburnett88/HSat
tests-src/TestUtils.hs
mit
mkWordNonZero :: Gen Word mkWordNonZero = choose (1,maxBound)
61
mkWordNonZero :: Gen Word mkWordNonZero = choose (1,maxBound)
61
mkWordNonZero = choose (1,maxBound)
35
false
true
1
6
7
26
12
14
null
null
uduki/hsQt
Qtc/Enums/Core/QChar.hs
bsd-2-clause
eIsolated :: Decomposition eIsolated = ieDecomposition $ 7
60
eIsolated :: Decomposition eIsolated = ieDecomposition $ 7
60
eIsolated = ieDecomposition $ 7
33
false
true
0
6
9
18
8
10
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/FastBool.hs
bsd-3-clause
isFastTrue 0# = False
21
isFastTrue 0# = False
21
isFastTrue 0# = False
21
false
false
0
5
3
9
4
5
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSIZE_USE_EXISTING :: Int wxSIZE_USE_EXISTING = 0
50
wxSIZE_USE_EXISTING :: Int wxSIZE_USE_EXISTING = 0
50
wxSIZE_USE_EXISTING = 0
23
false
true
0
4
5
11
6
5
null
null
HaskellCNOrg/snap-web
src/Views/SharedSplices.hs
bsd-3-clause
genNextPageParam :: AppHandler BS.ByteString genNextPageParam = liftM (gen . rqURI) getRequest where gen uri | uri == "/" = "" | otherwise = foldr1 BS.append ["?", nextPageParam, "=", uri] -- | current URI
228
genNextPageParam :: AppHandler BS.ByteString genNextPageParam = liftM (gen . rqURI) getRequest where gen uri | uri == "/" = "" | otherwise = foldr1 BS.append ["?", nextPageParam, "=", uri] -- | current URI
228
genNextPageParam = liftM (gen . rqURI) getRequest where gen uri | uri == "/" = "" | otherwise = foldr1 BS.append ["?", nextPageParam, "=", uri] -- | current URI
183
false
true
0
8
55
77
39
38
null
null
ShigekiKarita/haskellSDL2Examples
src/lesson13.hs
gpl-2.0
applyEvent world _ = world
26
applyEvent world _ = world
26
applyEvent world _ = world
26
false
false
0
5
4
11
5
6
null
null
tomahawkins/cil
attic/GenCIL.hs
bsd-3-clause
dumpcilPlugin :: [(TypeName, TypeDef)] -> String dumpcilPlugin types = unlines [ "open Ast" , "open Cil_types" , "open File" , "open Lexing" , "open List" , "open String" , "open Int64" , "open Char" , "" , "let string a = \"\\\"\" ^ a ^ \"\\\"\" (* XXX Doesn't handle '\\' or '\"' chars in string. *...
3,657
dumpcilPlugin :: [(TypeName, TypeDef)] -> String dumpcilPlugin types = unlines [ "open Ast" , "open Cil_types" , "open File" , "open Lexing" , "open List" , "open String" , "open Int64" , "open Char" , "" , "let string a = \"\\\"\" ^ a ^ \"\\\"\" (* XXX Doesn't handle '\\' or '\"' chars in string. *...
3,657
dumpcilPlugin types = unlines [ "open Ast" , "open Cil_types" , "open File" , "open Lexing" , "open List" , "open String" , "open Int64" , "open Char" , "" , "let string a = \"\\\"\" ^ a ^ \"\\\"\" (* XXX Doesn't handle '\\' or '\"' chars in string. *)" , "let position t = \"Position \\\"\" ^ t.po...
3,608
false
true
0
24
914
1,127
597
530
null
null
jkozlowski/kdb-haskell
src/Database/Kdb/Internal/IPC.hs
mit
vectorParser !e !t !len | t == KT.timeVT = KTimeV <$> SV.replicateM len (int32 e)
91
vectorParser !e !t !len | t == KT.timeVT = KTimeV <$> SV.replicateM len (int32 e)
91
vectorParser !e !t !len | t == KT.timeVT = KTimeV <$> SV.replicateM len (int32 e)
91
false
false
2
9
24
47
20
27
null
null
ghcjs/ghcjs
src/Compiler/Compat.hs
mit
getPackageHsLibs :: DynFlags -> UnitId -> [String] getPackageHsLibs dflags = maybe [] hsLibraries . lookupPackage dflags
122
getPackageHsLibs :: DynFlags -> UnitId -> [String] getPackageHsLibs dflags = maybe [] hsLibraries . lookupPackage dflags
122
getPackageHsLibs dflags = maybe [] hsLibraries . lookupPackage dflags
71
false
true
0
9
17
45
20
25
null
null