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
ion1/swtor-ui
src/SWTOR/UIProfile/Layout.hs
mit
quickBar4 = QuickBar4{ elemScale = 1 , elemNumVisible = 12 , elemNumPerRow = 12 , elemBGVisible = True , elemOffset = (0,0) }
230
quickBar4 = QuickBar4{ elemScale = 1 , elemNumVisible = 12 , elemNumPerRow = 12 , elemBGVisible = True , elemOffset = (0,0) }
230
quickBar4 = QuickBar4{ elemScale = 1 , elemNumVisible = 12 , elemNumPerRow = 12 , elemBGVisible = True , elemOffset = (0,0) }
230
false
false
0
7
127
44
28
16
null
null
stevezhee/shootout
src/Shoot.hs
bsd-3-clause
err :: String -> M () err x = str ("error:" ++ x) >>= puts
58
err :: String -> M () err x = str ("error:" ++ x) >>= puts
58
err x = str ("error:" ++ x) >>= puts
36
false
true
0
8
14
37
18
19
null
null
cliffano/swaggy-jenkins
clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs
mit
-- | 'pipelinelatestRunartifactsSize' Lens pipelinelatestRunartifactsSizeL :: Lens_' PipelinelatestRunartifacts (Maybe Int) pipelinelatestRunartifactsSizeL f PipelinelatestRunartifacts{..} = (\pipelinelatestRunartifactsSize -> PipelinelatestRunartifacts { pipelinelatestRunartifactsSize, ..} ) <$> f pipelinelatestRunart...
330
pipelinelatestRunartifactsSizeL :: Lens_' PipelinelatestRunartifacts (Maybe Int) pipelinelatestRunartifactsSizeL f PipelinelatestRunartifacts{..} = (\pipelinelatestRunartifactsSize -> PipelinelatestRunartifacts { pipelinelatestRunartifactsSize, ..} ) <$> f pipelinelatestRunartifactsSize
287
pipelinelatestRunartifactsSizeL f PipelinelatestRunartifacts{..} = (\pipelinelatestRunartifactsSize -> PipelinelatestRunartifacts { pipelinelatestRunartifactsSize, ..} ) <$> f pipelinelatestRunartifactsSize
206
true
true
0
8
23
57
30
27
null
null
keera-studios/hsQt
Qtc/Enums/Opengl/QGL.hs
bsd-2-clause
fColorIndex :: FormatOptions fColorIndex = ifFormatOptions $ 262144
69
fColorIndex :: FormatOptions fColorIndex = ifFormatOptions $ 262144
69
fColorIndex = ifFormatOptions $ 262144
40
false
true
0
6
9
18
8
10
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/div_1.hs
mit
primDivInt (Neg x) (Pos (Succ y)) = Neg (primDivNatP x (Succ y))
64
primDivInt (Neg x) (Pos (Succ y)) = Neg (primDivNatP x (Succ y))
64
primDivInt (Neg x) (Pos (Succ y)) = Neg (primDivNatP x (Succ y))
64
false
false
0
9
11
48
22
26
null
null
pascal-knodel/haskell-craft
_/links/E'5'30.hs
mit
{- GHCi> books' exampleDB' "Alice" -} -- [ "Tintin" , "Asterix" ] makeLoan' :: Database' -> Person -> Book -> Database' makeLoan' database person book = [ (Loan person book) ] ++ database
195
makeLoan' :: Database' -> Person -> Book -> Database' makeLoan' database person book = [ (Loan person book) ] ++ database
124
makeLoan' database person book = [ (Loan person book) ] ++ database
70
true
true
0
8
40
47
25
22
null
null
wizzup/advent_of_code
2016/4/part1.hs
mit
common5 :: String -> String common5 xs = take 5 ps where ss = group . sort $ xs cs = map length ss hs = map head ss -- ps = zipWith (curry fst) ss cs ps = map fst . sortBy (flip compare `on` snd) $ zip hs cs
265
common5 :: String -> String common5 xs = take 5 ps where ss = group . sort $ xs cs = map length ss hs = map head ss -- ps = zipWith (curry fst) ss cs ps = map fst . sortBy (flip compare `on` snd) $ zip hs cs
265
common5 xs = take 5 ps where ss = group . sort $ xs cs = map length ss hs = map head ss -- ps = zipWith (curry fst) ss cs ps = map fst . sortBy (flip compare `on` snd) $ zip hs cs
237
false
true
3
10
108
97
48
49
null
null
brendanhay/gogol
gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs
mpl-2.0
-- | DS advertiser ID. cAdvertiserId :: Lens' Conversion (Maybe Int64) cAdvertiserId = lens _cAdvertiserId (\ s a -> s{_cAdvertiserId = a}) . mapping _Coerce
171
cAdvertiserId :: Lens' Conversion (Maybe Int64) cAdvertiserId = lens _cAdvertiserId (\ s a -> s{_cAdvertiserId = a}) . mapping _Coerce
148
cAdvertiserId = lens _cAdvertiserId (\ s a -> s{_cAdvertiserId = a}) . mapping _Coerce
100
true
true
0
10
38
55
28
27
null
null
jsavatgy/hatupist
code/aboutDialog.hs
gpl-2.0
createGUI gsRef = do gs <- readIORef gsRef window <- windowNew style <- widgetGetStyle window onDestroy window (quitProgram gsRef) extrmVBox <- vBoxNew False 0 outerHBox <- hBoxNew False 0 outerVBox <- vBoxNew False 0 middleHBox <- hBoxNew False 0 innerVBox1 <- vBoxNew False 0 innerVBox2 <- vBo...
2,459
createGUI gsRef = do gs <- readIORef gsRef window <- windowNew style <- widgetGetStyle window onDestroy window (quitProgram gsRef) extrmVBox <- vBoxNew False 0 outerHBox <- hBoxNew False 0 outerVBox <- vBoxNew False 0 middleHBox <- hBoxNew False 0 innerVBox1 <- vBoxNew False 0 innerVBox2 <- vBo...
2,459
createGUI gsRef = do gs <- readIORef gsRef window <- windowNew style <- widgetGetStyle window onDestroy window (quitProgram gsRef) extrmVBox <- vBoxNew False 0 outerHBox <- hBoxNew False 0 outerVBox <- vBoxNew False 0 middleHBox <- hBoxNew False 0 innerVBox1 <- vBoxNew False 0 innerVBox2 <- vBo...
2,459
false
false
1
12
479
678
302
376
null
null
naoto-ogawa/h-xproto-mysql
src/DataBase/MySQLX/Model.hs
mit
-- | Server message NO : conn_capabilities = 2 s_conn_capabilities = 2 :: Int
97
s_conn_capabilities = 2 :: Int
50
s_conn_capabilities = 2 :: Int
50
true
false
0
4
33
10
6
4
null
null
nevrenato/HetsAlloy
Common/Lib/Graph.hs
gpl-2.0
-- | delete a labeled node delLNode :: (a -> a -> Bool) -> LNode a -> Gr a b -> Gr a b delLNode eq (v, l) (Gr m) = let err = "Common.Lib.Graph.delLNode: node " ++ show v in case Map.lookup v m of Just c -> if isIsolated c && null (loops c) then if eq l $ nodeLabel c then Gr (Map.delete v m) ...
563
delLNode :: (a -> a -> Bool) -> LNode a -> Gr a b -> Gr a b delLNode eq (v, l) (Gr m) = let err = "Common.Lib.Graph.delLNode: node " ++ show v in case Map.lookup v m of Just c -> if isIsolated c && null (loops c) then if eq l $ nodeLabel c then Gr (Map.delete v m) else err...
536
delLNode eq (v, l) (Gr m) = let err = "Common.Lib.Graph.delLNode: node " ++ show v in case Map.lookup v m of Just c -> if isIsolated c && null (loops c) then if eq l $ nodeLabel c then Gr (Map.delete v m) else error $ err ++ " has a different label" else erro...
476
true
true
0
15
178
191
94
97
null
null
peti/funcmp
FMP/Symbols.hs
gpl-3.0
symNNames names n d = SymNUnion3 (symNUnions [ SymNName name n 0 | name <- names]) (symNUnions [ SymNHier name n d | ...
375
symNNames names n d = SymNUnion3 (symNUnions [ SymNName name n 0 | name <- names]) (symNUnions [ SymNHier name n d | ...
375
symNNames names n d = SymNUnion3 (symNUnions [ SymNName name n 0 | name <- names]) (symNUnions [ SymNHier name n d | ...
375
false
false
1
10
267
73
33
40
null
null
CulpaBS/wbBach
src/Futhark/Optimise/Fusion.hs
bsd-3-clause
fusionGatherExp _ (Op Futhark.Reduce{}) = errorIllegal "reduce"
63
fusionGatherExp _ (Op Futhark.Reduce{}) = errorIllegal "reduce"
63
fusionGatherExp _ (Op Futhark.Reduce{}) = errorIllegal "reduce"
63
false
false
0
9
6
26
12
14
null
null
rvion/stack
test/integration/tests/multi-test/Main.hs
bsd-3-clause
main :: IO () main = do stack ["build"] stack ["test"] -- FIXME: Make fforce-recomp unnecessary (see #1411) stackCheckStderr ["test", "--coverage", "--ghc-options", "-fforce-recomp"] $ \out -> do unless ("The coverage report for multi-test-suite's test-suite \"multi-test-suite-test\" is availabl...
742
main :: IO () main = do stack ["build"] stack ["test"] -- FIXME: Make fforce-recomp unnecessary (see #1411) stackCheckStderr ["test", "--coverage", "--ghc-options", "-fforce-recomp"] $ \out -> do unless ("The coverage report for multi-test-suite's test-suite \"multi-test-suite-test\" is availabl...
742
main = do stack ["build"] stack ["test"] -- FIXME: Make fforce-recomp unnecessary (see #1411) stackCheckStderr ["test", "--coverage", "--ghc-options", "-fforce-recomp"] $ \out -> do unless ("The coverage report for multi-test-suite's test-suite \"multi-test-suite-test\" is available at" `isInfix...
728
false
true
0
15
156
140
68
72
null
null
brianshourd/adventOfCode2015
src/Day16.hs
mit
day16' :: String -> Int day16' input = case parseInput input of (Left _) -> -1 (Right ms) -> fromMaybe (-2) $ playGuessWho' allClues' ms -- Input
156
day16' :: String -> Int day16' input = case parseInput input of (Left _) -> -1 (Right ms) -> fromMaybe (-2) $ playGuessWho' allClues' ms -- Input
156
day16' input = case parseInput input of (Left _) -> -1 (Right ms) -> fromMaybe (-2) $ playGuessWho' allClues' ms -- Input
132
false
true
3
8
37
71
34
37
null
null
haasn/colour
Data/Colour/Names.hs
mit
readColourName x = fail $ "Data.Colour.Names.readColourName: Unknown colour name "++show x
93
readColourName x = fail $ "Data.Colour.Names.readColourName: Unknown colour name "++show x
93
readColourName x = fail $ "Data.Colour.Names.readColourName: Unknown colour name "++show x
93
false
false
3
6
13
24
9
15
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Config/Dmwit.hs
bsd-2-clause
sinkFocus = peek >>= maybe id sink
37
sinkFocus = peek >>= maybe id sink
37
sinkFocus = peek >>= maybe id sink
37
false
false
0
6
9
15
7
8
null
null
aslatter/smallarray
tests/Benchmark.hs
bsd-3-clause
word8sBounds :: (Int, Int) word8sBounds = (1, length word8s)
60
word8sBounds :: (Int, Int) word8sBounds = (1, length word8s)
60
word8sBounds = (1, length word8s)
33
false
true
0
7
8
33
16
17
null
null
HIPERFIT/futhark
src/Futhark/CodeGen/Backends/COpenCL.hs
isc
-- It is often faster to do a blocking clEnqueueReadBuffer() than to -- do an async clEnqueueReadBuffer() followed by a clFinish(), even -- with an in-order command queue. This is safe if and only if there -- are no possible outstanding failures. readOpenCLScalar :: GC.ReadScalar OpenCL () readOpenCLScalar mem i t "de...
984
readOpenCLScalar :: GC.ReadScalar OpenCL () readOpenCLScalar mem i t "device" _ = do val <- newVName "read_res" GC.decl [C.cdecl|$ty:t $id:val;|] GC.stm [C.cstm|OPENCL_SUCCEED_OR_RETURN( clEnqueueReadBuffer(ctx->opencl.queue, $exp:mem, ctx->failure_is_...
736
readOpenCLScalar mem i t "device" _ = do val <- newVName "read_res" GC.decl [C.cdecl|$ty:t $id:val;|] GC.stm [C.cstm|OPENCL_SUCCEED_OR_RETURN( clEnqueueReadBuffer(ctx->opencl.queue, $exp:mem, ctx->failure_is_an_option ? CL_FALSE : CL_TRUE, ...
692
true
true
0
8
322
99
54
45
null
null
vollmerm/shallow-fission
Data/Array/Accelerate/Fission.hs
bsd-3-clause
caseSliceFixed :: forall ix b . A.Slice ix => A.Exp ix -> (forall ix0 . (Slice ix0, ix ~ (ix0 A.:. Int)) => b) -> b -> b caseSliceFixed = error "caseSliceFixed - Trevor can probably figure out how to implement this"
260
caseSliceFixed :: forall ix b . A.Slice ix => A.Exp ix -> (forall ix0 . (Slice ix0, ix ~ (ix0 A.:. Int)) => b) -> b -> b caseSliceFixed = error "caseSliceFixed - Trevor can probably figure out how to implement this"
260
caseSliceFixed = error "caseSliceFixed - Trevor can probably figure out how to implement this"
94
false
true
0
15
86
80
42
38
null
null
tittoassini/flat
test/Test/Data/Values.hs
bsd-3-clause
asciiTextT = ("asciiText", T.pack $ longS english )
51
asciiTextT = ("asciiText", T.pack $ longS english )
51
asciiTextT = ("asciiText", T.pack $ longS english )
51
false
false
0
7
7
21
11
10
null
null
tmcdonell/hfx
src/haskell/Spectrum/DTA.hs
bsd-3-clause
-- -- Encase the values read from the DTA file into a data structure -- mkSpec :: FilePath -> [(Float,Float)] -> Either String MS2Data mkSpec name [] = Left ("Error parsing file: " ++ show name ++ "\nempty spectrum")
222
mkSpec :: FilePath -> [(Float,Float)] -> Either String MS2Data mkSpec name [] = Left ("Error parsing file: " ++ show name ++ "\nempty spectrum")
150
mkSpec name [] = Left ("Error parsing file: " ++ show name ++ "\nempty spectrum")
87
true
true
0
9
44
60
32
28
null
null
tjakway/ghcjvm
compiler/cmm/CmmCommonBlockElim.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Eliminate common blocks -- If two blocks are identical except for the label on the first node, -- then we can eliminate one of the blocks. To ensure that the semantics -- of the program are preserved, we have to rewrite each predecesso...
1,709
elimCommonBlocks :: CmmGraph -> CmmGraph elimCommonBlocks g = replaceLabels env $ copyTicks env g where env = iterate mapEmpty blocks_with_key groups = groupByInt hash_block (postorderDfs g) blocks_with_key = [ [ (successors b, [b]) | b <- bs] | bs <- groups] -- Invariant: The blocks in the list are p...
371
elimCommonBlocks g = replaceLabels env $ copyTicks env g where env = iterate mapEmpty blocks_with_key groups = groupByInt hash_block (postorderDfs g) blocks_with_key = [ [ (successors b, [b]) | b <- bs] | bs <- groups] -- Invariant: The blocks in the list are pairwise distinct -- (so avoid comparing t...
330
true
true
0
8
317
125
77
48
null
null
fmapfmapfmap/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/DescribeDataSources.hs
mpl-2.0
-- | The less than operator. The 'DataSource' results will have -- 'FilterVariable' values that are less than the value specified with -- 'LT'. ddsLT :: Lens' DescribeDataSources (Maybe Text) ddsLT = lens _ddsLT (\ s a -> s{_ddsLT = a})
236
ddsLT :: Lens' DescribeDataSources (Maybe Text) ddsLT = lens _ddsLT (\ s a -> s{_ddsLT = a})
92
ddsLT = lens _ddsLT (\ s a -> s{_ddsLT = a})
44
true
true
1
9
40
54
27
27
null
null
MateVM/harpy
Harpy/X86CodeGen.hs
gpl-2.0
-- dreg = rm * imm x86_imul_reg_reg_imm :: Word8 -> Word8 -> Word32 -> CodeGen e s () x86_imul_reg_reg_imm dreg reg imm = if x86_is_imm8 imm then emit8 0x6b >> x86_reg_emit dreg reg >> x86_imm_emit8 (fromIntegral imm) else emit8 0x69 >> x86_reg_emit dreg reg >> x86_imm_emit3...
325
x86_imul_reg_reg_imm :: Word8 -> Word8 -> Word32 -> CodeGen e s () x86_imul_reg_reg_imm dreg reg imm = if x86_is_imm8 imm then emit8 0x6b >> x86_reg_emit dreg reg >> x86_imm_emit8 (fromIntegral imm) else emit8 0x69 >> x86_reg_emit dreg reg >> x86_imm_emit32 imm
305
x86_imul_reg_reg_imm dreg reg imm = if x86_is_imm8 imm then emit8 0x6b >> x86_reg_emit dreg reg >> x86_imm_emit8 (fromIntegral imm) else emit8 0x69 >> x86_reg_emit dreg reg >> x86_imm_emit32 imm
238
true
true
0
9
91
95
45
50
null
null
sjakobi/brick
programs/SuspendAndResumeDemo.hs
bsd-3-clause
main :: IO () main = void $ defaultMain theApp initialState
63
main :: IO () main = void $ defaultMain theApp initialState
63
main = void $ defaultMain theApp initialState
49
false
true
1
6
14
28
12
16
null
null
Hi-Angel/yi
yi-keymap-vim/src/Yi/Keymap/Vim/ExMap.hs
gpl-2.0
dropToLastWordOf :: T.Text -> T.Text -> T.Text dropToLastWordOf s = case reverse . T.split isWordSep $ s of [] -> id [_] -> id _ : ws -> T.drop . succ . T.length . T.unwords $ ws where isWordSep :: Char -> Bool isWordSep c = isPathSeparator c || isSpace c
278
dropToLastWordOf :: T.Text -> T.Text -> T.Text dropToLastWordOf s = case reverse . T.split isWordSep $ s of [] -> id [_] -> id _ : ws -> T.drop . succ . T.length . T.unwords $ ws where isWordSep :: Char -> Bool isWordSep c = isPathSeparator c || isSpace c
278
dropToLastWordOf s = case reverse . T.split isWordSep $ s of [] -> id [_] -> id _ : ws -> T.drop . succ . T.length . T.unwords $ ws where isWordSep :: Char -> Bool isWordSep c = isPathSeparator c || isSpace c
231
false
true
0
12
73
124
61
63
null
null
cnr/haskellirc
IRC/Bot.hs
mit
readMessages :: Handle -> [BotHandler] -> Bot () readMessages handle parts = do contents <- liftIO $ hGetContents handle go parts contents where go :: [BotHandler] -> T.Text -> Bot () go parts t = case parse ircParser t of Done t r -> do ...
571
readMessages :: Handle -> [BotHandler] -> Bot () readMessages handle parts = do contents <- liftIO $ hGetContents handle go parts contents where go :: [BotHandler] -> T.Text -> Bot () go parts t = case parse ircParser t of Done t r -> do ...
571
readMessages handle parts = do contents <- liftIO $ hGetContents handle go parts contents where go :: [BotHandler] -> T.Text -> Bot () go parts t = case parse ircParser t of Done t r -> do let msg = rawToIRCMessage r ...
522
false
true
4
11
274
176
85
91
null
null
keithodulaigh/Hets
OWL2/Keywords.hs
gpl-2.0
incompatibleWith :: String incompatibleWith = "incompatibleWith"
64
incompatibleWith :: String incompatibleWith = "incompatibleWith"
64
incompatibleWith = "incompatibleWith"
37
false
true
0
4
5
11
6
5
null
null
brendanhay/gogol
gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs
mpl-2.0
-- | Creates a value of 'AudiencesFeed' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'audTotalItems' -- -- * 'audEtag' -- -- * 'audNextPageToken' -- -- * 'audKind' -- -- * 'audItems' audiencesFeed :: AudiencesFeed audiencesFeed ...
498
audiencesFeed :: AudiencesFeed audiencesFeed = AudiencesFeed' { _audTotalItems = Nothing , _audEtag = Nothing , _audNextPageToken = Nothing , _audKind = "plus#audiencesFeed" , _audItems = Nothing }
227
audiencesFeed = AudiencesFeed' { _audTotalItems = Nothing , _audEtag = Nothing , _audNextPageToken = Nothing , _audKind = "plus#audiencesFeed" , _audItems = Nothing }
192
true
true
1
7
106
63
41
22
null
null
Munksgaard/SFOT
Asm/Parser.hs
mit
tay :: Parser Operation tay = do token "TAY" return TAY
59
tay :: Parser Operation tay = do token "TAY" return TAY
59
tay = do token "TAY" return TAY
35
false
true
0
7
14
26
11
15
null
null
jean-edouard/manager
apptool/GenEnv.hs
gpl-2.0
mkisofs isopath root = void$ readProcessOrDie "mkisofs" ["-r", "-J", "-o", isopath, root] ""
92
mkisofs isopath root = void$ readProcessOrDie "mkisofs" ["-r", "-J", "-o", isopath, root] ""
92
mkisofs isopath root = void$ readProcessOrDie "mkisofs" ["-r", "-J", "-o", isopath, root] ""
92
false
false
0
7
12
38
20
18
null
null
ardumont/haskell-lab
test/LoadAndUpdateIniTests.hs
gpl-2.0
-- *ParseIni2> parseTest section "[not-a-section" -- parse error at (line 1, column 15): -- unexpected end of input -- expecting "]" -- *ParseIni2> parseTest section "[unfinished-a-section" -- parse error at (line 1, column 22): -- unexpected end of input -- expecting "]" testParseLine1 :: Test.HUnit.Test testParseLin...
738
testParseLine1 :: Test.HUnit.Test testParseLine1 = Just ("Extension0","/home/tony/.mozilla/firefox/vfazausl.default/extensions/{DDC359D1-844A-42a7-9AA1-88A850A938A8}.xpi") ~=? parseRightExtract (parse line "Extension0=/home/tony/.mozilla/firefox/vfazausl.default/extensions/{DDC359D1-84...
464
testParseLine1 = Just ("Extension0","/home/tony/.mozilla/firefox/vfazausl.default/extensions/{DDC359D1-844A-42a7-9AA1-88A850A938A8}.xpi") ~=? parseRightExtract (parse line "Extension0=/home/tony/.mozilla/firefox/vfazausl.default/extensions/{DDC359D1-844A-42a7-9AA1-88A850A938A8}.xpi" "E...
430
true
true
0
8
89
48
29
19
null
null
supki/directory-layout
test/System/Directory/Layout/InterpreterSpec.hs
bsd-3-clause
fileOwnerGID :: FilePath -> IO Posix.GroupID fileOwnerGID = fmap Posix.fileGroup . Posix.getSymbolicLinkStatus
110
fileOwnerGID :: FilePath -> IO Posix.GroupID fileOwnerGID = fmap Posix.fileGroup . Posix.getSymbolicLinkStatus
110
fileOwnerGID = fmap Posix.fileGroup . Posix.getSymbolicLinkStatus
65
false
true
0
7
11
31
15
16
null
null
mdsteele/fallback
src/Fallback/View/Dialog.hs
gpl-3.0
newDialogBackgroundView :: (MonadDraw m) => m (View a b) newDialogBackgroundView = wallView . const <$> newBackgroundPaint "gui/dialog-background.png" 0 0 8 8 64 64
166
newDialogBackgroundView :: (MonadDraw m) => m (View a b) newDialogBackgroundView = wallView . const <$> newBackgroundPaint "gui/dialog-background.png" 0 0 8 8 64 64
166
newDialogBackgroundView = wallView . const <$> newBackgroundPaint "gui/dialog-background.png" 0 0 8 8 64 64
109
false
true
0
8
24
54
27
27
null
null
exercism/xhaskell
exercises/practice/palindrome-products/.meta/examples/success-standard/src/Palindromes.hs
mit
revDigitsBase :: Integral a => a -> a -> [a] revDigitsBase base = go where go n = case n `quotRem` base of (0, r) -> [r] (q, r) -> r : go q
161
revDigitsBase :: Integral a => a -> a -> [a] revDigitsBase base = go where go n = case n `quotRem` base of (0, r) -> [r] (q, r) -> r : go q
161
revDigitsBase base = go where go n = case n `quotRem` base of (0, r) -> [r] (q, r) -> r : go q
116
false
true
0
9
55
86
46
40
null
null
olsner/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
tidyType env (TyConApp tycon tys) = let args = tidyTypes env tys in args `seqList` TyConApp tycon args
138
tidyType env (TyConApp tycon tys) = let args = tidyTypes env tys in args `seqList` TyConApp tycon args
138
tidyType env (TyConApp tycon tys) = let args = tidyTypes env tys in args `seqList` TyConApp tycon args
138
false
false
0
9
53
46
22
24
null
null
jasonzoladz/persistent
persistent-postgresql/Database/Persist/Postgresql.hs
mit
openSimpleConn :: LogFunc -> PG.Connection -> IO SqlBackend openSimpleConn logFunc conn = do smap <- newIORef $ Map.empty return SqlBackend { connPrepare = prepare' conn , connStmtMap = smap , connInsertSql = insertSql' , connInsertManySql = Just insertManySql' , c...
763
openSimpleConn :: LogFunc -> PG.Connection -> IO SqlBackend openSimpleConn logFunc conn = do smap <- newIORef $ Map.empty return SqlBackend { connPrepare = prepare' conn , connStmtMap = smap , connInsertSql = insertSql' , connInsertManySql = Just insertManySql' , c...
763
openSimpleConn logFunc conn = do smap <- newIORef $ Map.empty return SqlBackend { connPrepare = prepare' conn , connStmtMap = smap , connInsertSql = insertSql' , connInsertManySql = Just insertManySql' , connClose = PG.close conn , connMigrateSql = mig...
703
false
true
0
13
255
180
97
83
null
null
RobinKrom/fasths
src/Codec/Fast/Encoder.hs
bsd-3-clause
bytevecF2Cop :: (Primitive a, Eq a) => FieldInstrContent -> Maybe ByteVectorLength -> FEncoder (Maybe a) bytevecF2Cop (FieldInstrContent fname Nothing maybe_op) len = bytevecF2Cop (FieldInstrContent fname (Just Mandatory) maybe_op) len
241
bytevecF2Cop :: (Primitive a, Eq a) => FieldInstrContent -> Maybe ByteVectorLength -> FEncoder (Maybe a) bytevecF2Cop (FieldInstrContent fname Nothing maybe_op) len = bytevecF2Cop (FieldInstrContent fname (Just Mandatory) maybe_op) len
240
bytevecF2Cop (FieldInstrContent fname Nothing maybe_op) len = bytevecF2Cop (FieldInstrContent fname (Just Mandatory) maybe_op) len
135
false
true
0
11
34
87
41
46
null
null
twopoint718/haifa
src/Text/XML/Schema/Org/Xmlsoap/Schemas/Soap/Envelope.hs
gpl-2.0
defaultPrefix = "soapenv"
25
defaultPrefix = "soapenv"
25
defaultPrefix = "soapenv"
25
false
false
0
4
2
6
3
3
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/HTML/Print.hs
bsd-2-clause
pOps Neg = "&minus;"
25
pOps Neg = "&minus;"
25
pOps Neg = "&minus;"
25
false
false
1
5
8
13
4
9
null
null
azapps/nlp.hs
src/NLP/Index/Index.hs
gpl-3.0
countOccurrence :: (Ord a) => [a] -> M.Map a Int countOccurrence xs = M.fromListWith (+) . zip xs $ repeat 1
108
countOccurrence :: (Ord a) => [a] -> M.Map a Int countOccurrence xs = M.fromListWith (+) . zip xs $ repeat 1
108
countOccurrence xs = M.fromListWith (+) . zip xs $ repeat 1
59
false
true
0
8
20
58
29
29
null
null
ekmett/reactor
Reactor/Deque.hs
bsd-3-clause
bufferWithCapacity :: MArray a e IO => Int -> IO (Buffer a e) bufferWithCapacity i = Buffer i <$> newArray_ (0, (minimumCapacity `max` i) - 1)
145
bufferWithCapacity :: MArray a e IO => Int -> IO (Buffer a e) bufferWithCapacity i = Buffer i <$> newArray_ (0, (minimumCapacity `max` i) - 1)
145
bufferWithCapacity i = Buffer i <$> newArray_ (0, (minimumCapacity `max` i) - 1)
83
false
true
0
10
28
69
35
34
null
null
a143753/AOJ
0197.hs
apache-2.0
ans' n x y = ans' (n+1) y (x`mod`y)
35
ans' n x y = ans' (n+1) y (x`mod`y)
35
ans' n x y = ans' (n+1) y (x`mod`y)
35
false
false
0
7
8
38
19
19
null
null
wavewave/HFastJet
oldsrc/HEP/Jet/FastJet/TypeCast.hs
lgpl-2.1
xform6 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y xform6 f a x1 x2 x3 x4 x5 x6 = f (ca...
408
xform6 :: (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable x4 cx4, Castable x5 cx5, Castable x6 cx6, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> cx4 -> cx5 -> cx6 -> IO cy) -> a -> x1 -> x2 -> x3 -> x4 -> x5 -> x6 -> IO y xform6 f a x1 x2 x3 x4 x5 x6 = f (ca...
408
xform6 f a x1 x2 x3 x4 x5 x6 = f (cast a) (cast x1) (cast x2) (cast x3) (cast x4) (cast x5) (cast x6) >>= return . uncast
127
false
true
2
15
124
232
115
117
null
null
snoyberg/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
tickString SimplifierDone = "SimplifierDone"
58
tickString SimplifierDone = "SimplifierDone"
58
tickString SimplifierDone = "SimplifierDone"
58
false
false
0
5
17
9
4
5
null
null
rahulmutt/ghcvm
compiler/Eta/StgSyn/StgLint.hs
bsd-3-clause
lintStgExpr (StgOpApp _ args res_ty) = runMaybeT $ do -- We don't have enough type information to check -- the application for StgFCallOp and StgPrimCallOp; ToDo _maybe_arg_tys <- mapM (MaybeT . lintStgArg) args return res_ty
249
lintStgExpr (StgOpApp _ args res_ty) = runMaybeT $ do -- We don't have enough type information to check -- the application for StgFCallOp and StgPrimCallOp; ToDo _maybe_arg_tys <- mapM (MaybeT . lintStgArg) args return res_ty
249
lintStgExpr (StgOpApp _ args res_ty) = runMaybeT $ do -- We don't have enough type information to check -- the application for StgFCallOp and StgPrimCallOp; ToDo _maybe_arg_tys <- mapM (MaybeT . lintStgArg) args return res_ty
249
false
false
0
11
58
51
24
27
null
null
gcross/Privateer
src/Algorithm/GlobalVariablePrivatization/Privatization.hs
bsd-3-clause
processToplevelDeclaration :: String -> Set String -> (String -> Allocation) -> (String -> Maybe (String -> Allocation)) -> CExtDecl -> [CExtDecl] processToplevelDeclaration _ _ _ _ decl@(CAsmExt _) = [decl]
207
processToplevelDeclaration :: String -> Set String -> (String -> Allocation) -> (String -> Maybe (String -> Allocation)) -> CExtDecl -> [CExtDecl] processToplevelDeclaration _ _ _ _ decl@(CAsmExt _) = [decl]
207
processToplevelDeclaration _ _ _ _ decl@(CAsmExt _) = [decl]
60
false
true
0
13
29
84
44
40
null
null
michalrus/hstatusbar
src/HStatusBar/Time.hs
apache-2.0
-- TODO: make the µs algo more correct, now it’s +1.5 ms off common :: Bool -> Text -> Module common zoned fmt ch = forever $ do now <- getCurrentTime let µs = (diffTimeToPicoseconds (utctDayTime now) `mod` (1000000 * 1000000)) `div` 1000000 output :: Text <- pack <$> let f...
562
common :: Bool -> Text -> Module common zoned fmt ch = forever $ do now <- getCurrentTime let µs = (diffTimeToPicoseconds (utctDayTime now) `mod` (1000000 * 1000000)) `div` 1000000 output :: Text <- pack <$> let fmt' = unpack fmt in if zoned then formatTime...
501
common zoned fmt ch = forever $ do now <- getCurrentTime let µs = (diffTimeToPicoseconds (utctDayTime now) `mod` (1000000 * 1000000)) `div` 1000000 output :: Text <- pack <$> let fmt' = unpack fmt in if zoned then formatTime defaultTimeLocale fmt' <$> utcTo...
468
true
true
0
16
161
160
78
82
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | The price delta against the COGS. E.g. 2 means $2 more of the COGS. rrcogsrPriceDelta :: Lens' RepricingRuleCostOfGoodsSaleRule (Maybe Text) rrcogsrPriceDelta = lens _rrcogsrPriceDelta (\ s a -> s{_rrcogsrPriceDelta = a})
234
rrcogsrPriceDelta :: Lens' RepricingRuleCostOfGoodsSaleRule (Maybe Text) rrcogsrPriceDelta = lens _rrcogsrPriceDelta (\ s a -> s{_rrcogsrPriceDelta = a})
161
rrcogsrPriceDelta = lens _rrcogsrPriceDelta (\ s a -> s{_rrcogsrPriceDelta = a})
88
true
true
0
9
40
48
25
23
null
null
xmonad/xmonad-contrib
XMonad/Hooks/DynamicLog.hs
bsd-3-clause
xmobar :: LayoutClass l Window => XConfig l -- ^ The base config -> IO (XConfig (ModifiedLayout AvoidStruts l)) xmobar = statusBar "xmobar" xmobarPP toggleStrutsKey
179
xmobar :: LayoutClass l Window => XConfig l -- ^ The base config -> IO (XConfig (ModifiedLayout AvoidStruts l)) xmobar = statusBar "xmobar" xmobarPP toggleStrutsKey
179
xmobar = statusBar "xmobar" xmobarPP toggleStrutsKey
52
false
true
0
11
39
52
25
27
null
null
izgzhen/RuScript
rusc/src/Language/RuScript/Codegen.hs
mit
inLoop :: Pos -> Label -> Codegen a -> Codegen a inLoop pos lbl gen = do e <- use enclosed enclosed .= Just (pos, lbl) a <- gen enclosed .= e return a
170
inLoop :: Pos -> Label -> Codegen a -> Codegen a inLoop pos lbl gen = do e <- use enclosed enclosed .= Just (pos, lbl) a <- gen enclosed .= e return a
170
inLoop pos lbl gen = do e <- use enclosed enclosed .= Just (pos, lbl) a <- gen enclosed .= e return a
121
false
true
0
10
53
87
38
49
null
null
ocharles/hackage-server
Distribution/Server/Features/Security.hs
bsd-3-clause
securityFeature :: ServerEnv -> StateComponent AcidState SecurityState -> AsyncCache SecurityFileCache -> AsyncCache SecurityCache -> SecurityFeature securityFeature env securityState securityFileCache securityCache = SecurityFeature{..} where se...
2,219
securityFeature :: ServerEnv -> StateComponent AcidState SecurityState -> AsyncCache SecurityFileCache -> AsyncCache SecurityCache -> SecurityFeature securityFeature env securityState securityFileCache securityCache = SecurityFeature{..} where se...
2,219
securityFeature env securityState securityFileCache securityCache = SecurityFeature{..} where securityFeatureInterface = (emptyHackageFeature "security") { featureDesc = "TUF Security" , featureState = [abstractAcidStateComponent securityState] , featureReloadFiles = prodAsync...
2,005
false
true
14
10
607
426
239
187
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CancelSpotInstanceRequests.hs
mpl-2.0
-- | Creates a value of 'CancelSpotInstanceRequests' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'csirDryRun' -- -- * 'csirSpotInstanceRequestIds' cancelSpotInstanceRequests :: CancelSpotInstanceRequests cancelSpotInstanceReque...
434
cancelSpotInstanceRequests :: CancelSpotInstanceRequests cancelSpotInstanceRequests = CancelSpotInstanceRequests' { _csirDryRun = Nothing , _csirSpotInstanceRequestIds = mempty }
198
cancelSpotInstanceRequests = CancelSpotInstanceRequests' { _csirDryRun = Nothing , _csirSpotInstanceRequestIds = mempty }
137
true
true
1
7
72
39
23
16
null
null
mrakgr/futhark
src/Futhark/Representation/ExplicitMemory.hs
bsd-3-clause
expReturns (AST.PrimOp (Reshape _ newshape v)) = do (et, _, mem, ixfun) <- arrayVarReturns v return [ReturnsArray et (ExtShape $ map (Free . newDim) newshape) NoUniqueness $ Just $ ReturnsInBlock mem $ IxFun.reshape ixfun $ map (fmap SE.intSubExpToScalExp) newshape]
290
expReturns (AST.PrimOp (Reshape _ newshape v)) = do (et, _, mem, ixfun) <- arrayVarReturns v return [ReturnsArray et (ExtShape $ map (Free . newDim) newshape) NoUniqueness $ Just $ ReturnsInBlock mem $ IxFun.reshape ixfun $ map (fmap SE.intSubExpToScalExp) newshape]
290
expReturns (AST.PrimOp (Reshape _ newshape v)) = do (et, _, mem, ixfun) <- arrayVarReturns v return [ReturnsArray et (ExtShape $ map (Free . newDim) newshape) NoUniqueness $ Just $ ReturnsInBlock mem $ IxFun.reshape ixfun $ map (fmap SE.intSubExpToScalExp) newshape]
290
false
false
0
18
62
122
59
63
null
null
CristiBalu/HaskellWorkshops
Laboratory2/applist.hs
mit
applist [] xs = xs
20
applist [] xs = xs
20
applist [] xs = xs
20
false
false
1
5
6
18
6
12
null
null
harendra-kumar/asyncly
benchmark/StreamDOps.hs
bsd-3-clause
mapMaybeM n = composeN n $ S.mapMaybeM (\x -> if Prelude.odd x then return Nothing else return $ Just x)
112
mapMaybeM n = composeN n $ S.mapMaybeM (\x -> if Prelude.odd x then return Nothing else return $ Just x)
112
mapMaybeM n = composeN n $ S.mapMaybeM (\x -> if Prelude.odd x then return Nothing else return $ Just x)
112
false
false
0
9
27
52
25
27
null
null
hjwylde/qux-haskell
src/Language/Qux/Llvm/Generator.hs
bsd-3-clause
local :: Type -> Name -> Operand local = LocalReference
55
local :: Type -> Name -> Operand local = LocalReference
55
local = LocalReference
22
false
true
0
8
9
26
11
15
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 355570 = 3864
33
getValueFromProduct 355570 = 3864
33
getValueFromProduct 355570 = 3864
33
false
false
0
5
3
9
4
5
null
null
anton-dessiatov/stack
src/Stack/Dot.hs
bsd-3-clause
-- | Convert a package name to a graph node name. nodeName :: PackageName -> Text nodeName name = "\"" <> packageNameText name <> "\""
134
nodeName :: PackageName -> Text nodeName name = "\"" <> packageNameText name <> "\""
84
nodeName name = "\"" <> packageNameText name <> "\""
52
true
true
0
7
24
30
15
15
null
null
bitemyapp/hakaru
Tests/Lazy.hs
bsd-3-clause
pair1fstSwap :: (Mochastic repr) => Cond repr HUnit (HMeasure (HPair HProb HBool)) pair1fstSwap = \u -> ununit u $ liftM swap_ $ beta 1 1 `bind` \bias -> bern bias `bind` \coin -> dirac (pair coin bias)
270
pair1fstSwap :: (Mochastic repr) => Cond repr HUnit (HMeasure (HPair HProb HBool)) pair1fstSwap = \u -> ununit u $ liftM swap_ $ beta 1 1 `bind` \bias -> bern bias `bind` \coin -> dirac (pair coin bias)
270
pair1fstSwap = \u -> ununit u $ liftM swap_ $ beta 1 1 `bind` \bias -> bern bias `bind` \coin -> dirac (pair coin bias)
179
false
true
0
12
104
101
52
49
null
null
fmapfmapfmap/amazonka
amazonka-cloudwatch/gen/Network/AWS/CloudWatch/DescribeAlarmHistory.hs
mpl-2.0
-- | A string that marks the start of the next batch of returned results. dahrsNextToken :: Lens' DescribeAlarmHistoryResponse (Maybe Text) dahrsNextToken = lens _dahrsNextToken (\ s a -> s{_dahrsNextToken = a})
211
dahrsNextToken :: Lens' DescribeAlarmHistoryResponse (Maybe Text) dahrsNextToken = lens _dahrsNextToken (\ s a -> s{_dahrsNextToken = a})
137
dahrsNextToken = lens _dahrsNextToken (\ s a -> s{_dahrsNextToken = a})
71
true
true
0
9
31
46
25
21
null
null
thoferon/seakale
seakale-tests/src/Database/Seakale/Tests/Mock.hs
bsd-3-clause
runQueryPredicate :: QueryPredicate -> BSL.ByteString -> Bool runQueryPredicate p req = case p of QPredPlain req' -> req == req' QPredFunction f -> f req
157
runQueryPredicate :: QueryPredicate -> BSL.ByteString -> Bool runQueryPredicate p req = case p of QPredPlain req' -> req == req' QPredFunction f -> f req
157
runQueryPredicate p req = case p of QPredPlain req' -> req == req' QPredFunction f -> f req
95
false
true
0
8
28
55
26
29
null
null
d0kt0r0/estuary
client/src/Estuary/Types/Terminal.hs
gpl-3.0
parseCommand :: T.Text -> Either (Span, Text) Command parseCommand s | (s' == "") || (T.head s' /= '!') = Right $ Chat s | otherwise = parseTerminalCommand $ removeExclamation s' where s' = T.strip s
208
parseCommand :: T.Text -> Either (Span, Text) Command parseCommand s | (s' == "") || (T.head s' /= '!') = Right $ Chat s | otherwise = parseTerminalCommand $ removeExclamation s' where s' = T.strip s
208
parseCommand s | (s' == "") || (T.head s' /= '!') = Right $ Chat s | otherwise = parseTerminalCommand $ removeExclamation s' where s' = T.strip s
154
false
true
2
12
44
102
48
54
null
null
lancelet/inner-change
src/Network/InnerChange/XML/Types.hs
bsd-3-clause
symbolText :: (KnownSymbol s) => Proxy s -> Text symbolText = Text.pack . symbolVal
83
symbolText :: (KnownSymbol s) => Proxy s -> Text symbolText = Text.pack . symbolVal
83
symbolText = Text.pack . symbolVal
34
false
true
0
7
13
33
17
16
null
null
nikita-volkov/deque
library/Deque/Lazy/Defs.hs
mit
-- | -- \(\mathcal{O}(1)\), occasionally \(\mathcal{O}(n)\). -- Get the last element if deque is not empty. last :: Deque a -> Maybe a last = fmap fst . unsnoc
159
last :: Deque a -> Maybe a last = fmap fst . unsnoc
51
last = fmap fst . unsnoc
24
true
true
0
6
28
31
16
15
null
null
rvion/lamdu
test/InferAssert.hs
gpl-3.0
inferFailsAssertion :: String -> (Error -> Bool) -> Val () -> HUnit.Assertion inferFailsAssertion errorName isExpectedError val = expectLeft errorName verifyError $ (fmap . fmap) (^. _1 . Infer.plType) $ runNewContext $ loadInferDef val where verifyError err | isExpectedError err = r...
441
inferFailsAssertion :: String -> (Error -> Bool) -> Val () -> HUnit.Assertion inferFailsAssertion errorName isExpectedError val = expectLeft errorName verifyError $ (fmap . fmap) (^. _1 . Infer.plType) $ runNewContext $ loadInferDef val where verifyError err | isExpectedError err = r...
441
inferFailsAssertion errorName isExpectedError val = expectLeft errorName verifyError $ (fmap . fmap) (^. _1 . Infer.plType) $ runNewContext $ loadInferDef val where verifyError err | isExpectedError err = return () | otherwise = error $ errorName ++ " error ex...
359
false
true
0
11
122
138
66
72
null
null
monsanto/hie
Hie/Language/Haskell/Exts/Parser.hs
gpl-3.0
-- | Parse of a string containing a Haskell type, using an explicit mode. parseTypeWithMode :: ParseMode -> String -> ParseResult S.Type parseTypeWithMode = (fmap sType .) . P.parseTypeWithMode
195
parseTypeWithMode :: ParseMode -> String -> ParseResult S.Type parseTypeWithMode = (fmap sType .) . P.parseTypeWithMode
119
parseTypeWithMode = (fmap sType .) . P.parseTypeWithMode
56
true
true
0
8
30
38
20
18
null
null
balangs/eTeak
src/Traverse.hs
bsd-3-clause
descendSNN :: (ParseTreeTraverse e1, ParseTreeTraverse e2) => Apply context accum result -> (String -> e1 -> e2 -> node) -> String -> e1 -> e2 -> Descend context accum result node descendSNN apply cons str e1 e2 = descend apply cons $ stepD apply e2 . stepD apply e1 . stringD apply s...
322
descendSNN :: (ParseTreeTraverse e1, ParseTreeTraverse e2) => Apply context accum result -> (String -> e1 -> e2 -> node) -> String -> e1 -> e2 -> Descend context accum result node descendSNN apply cons str e1 e2 = descend apply cons $ stepD apply e2 . stepD apply e1 . stringD apply str
318
descendSNN apply cons str e1 e2 = descend apply cons $ stepD apply e2 . stepD apply e1 . stringD apply str
114
false
true
0
12
88
121
58
63
null
null
spacekitteh/smcghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags [res] CasByteArrayOp_Int [mba, ix, old, new] = doCasByteArray res mba ix (bWord dflags) old new
117
emitPrimOp dflags [res] CasByteArrayOp_Int [mba, ix, old, new] = doCasByteArray res mba ix (bWord dflags) old new
117
emitPrimOp dflags [res] CasByteArrayOp_Int [mba, ix, old, new] = doCasByteArray res mba ix (bWord dflags) old new
117
false
false
0
7
20
55
26
29
null
null
ocean0yohsuke/Scheme
src/Scheme/Action/Env.hs
bsd-3-clause
newLEnv :: MLEnv -> Scm LEnv newLEnv mlenv = do case mlenv of Nothing -> newVarRef (Vm M.empty) Just lenv -> lenv >- (readVarRef >=> newVarRef) -- -- Global Environment --
190
newLEnv :: MLEnv -> Scm LEnv newLEnv mlenv = do case mlenv of Nothing -> newVarRef (Vm M.empty) Just lenv -> lenv >- (readVarRef >=> newVarRef) -- -- Global Environment --
190
newLEnv mlenv = do case mlenv of Nothing -> newVarRef (Vm M.empty) Just lenv -> lenv >- (readVarRef >=> newVarRef) -- -- Global Environment --
161
false
true
0
14
49
74
35
39
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Parse.hs
bsd-3-clause
freshIntP :: Parser Integer freshIntP = do n <- getState updateState (+ 1) return n --------------------------------------------------------------------- -- Standalone SMTLIB2 commands -------------------------------------- -----------------------------------------------------------------...
324
freshIntP :: Parser Integer freshIntP = do n <- getState updateState (+ 1) return n --------------------------------------------------------------------- -- Standalone SMTLIB2 commands -------------------------------------- -----------------------------------------------------------------...
324
freshIntP = do n <- getState updateState (+ 1) return n --------------------------------------------------------------------- -- Standalone SMTLIB2 commands -------------------------------------- ---------------------------------------------------------------------
296
false
true
1
9
52
44
20
24
null
null
Kludgy/polyparse-fork
src/Text/ParserCombinators/Poly/StateText.hs
lgpl-2.1
-- | @many1Satisfy p@ is a more efficient fused version of @many1 (satisfy p)@ many1Satisfy :: (Char->Bool) -> Parser s Text many1Satisfy f = do x <- manySatisfy f if T.null x then fail "Parse.many1Satisfy: failed" else return x --------------------------------------...
405
many1Satisfy :: (Char->Bool) -> Parser s Text many1Satisfy f = do x <- manySatisfy f if T.null x then fail "Parse.many1Satisfy: failed" else return x ------------------------------------------------------------------------ -- State handling -- | Update the internal ...
326
many1Satisfy f = do x <- manySatisfy f if T.null x then fail "Parse.many1Satisfy: failed" else return x ------------------------------------------------------------------------ -- State handling -- | Update the internal state.
280
true
true
0
10
102
71
34
37
null
null
termite2/synthesis
Synthesis/CG.hs
bsd-3-clause
iMapM :: Monad m => (a -> m b) -> IteratorM m a -> m (IteratorM m b) iMapM func Empty = return Empty
105
iMapM :: Monad m => (a -> m b) -> IteratorM m a -> m (IteratorM m b) iMapM func Empty = return Empty
105
iMapM func Empty = return Empty
36
false
true
0
11
28
64
29
35
null
null
oldmanmike/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType substIfaceTyVar env tv | Just ty <- lookupFsEnv env tv = ty | otherwise = IfaceTyVar tv
169
substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType substIfaceTyVar env tv | Just ty <- lookupFsEnv env tv = ty | otherwise = IfaceTyVar tv
169
substIfaceTyVar env tv | Just ty <- lookupFsEnv env tv = ty | otherwise = IfaceTyVar tv
111
false
true
1
9
47
52
24
28
null
null
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Storelayoutclusters/Update.hs
mpl-2.0
-- | The ID of the cluster. suuClusterId :: Lens' StorelayoutclustersUpdate Text suuClusterId = lens _suuClusterId (\ s a -> s{_suuClusterId = a})
148
suuClusterId :: Lens' StorelayoutclustersUpdate Text suuClusterId = lens _suuClusterId (\ s a -> s{_suuClusterId = a})
120
suuClusterId = lens _suuClusterId (\ s a -> s{_suuClusterId = a})
67
true
true
1
9
24
44
22
22
null
null
Bolpat/CardGames
src/Schafkopf/AI.hs
gpl-3.0
stupidOverbid hands game@(Rufspiel calledSuit) = (defaultState hands normalTrumps) { no = 0, player = Just 0, mate = findIndex (elem $ Card calledSuit Ace) hands, game = game, rules = playerRulesRS calledSuit hands, condRS = flip...
370
stupidOverbid hands game@(Rufspiel calledSuit) = (defaultState hands normalTrumps) { no = 0, player = Just 0, mate = findIndex (elem $ Card calledSuit Ace) hands, game = game, rules = playerRulesRS calledSuit hands, condRS = flip...
370
stupidOverbid hands game@(Rufspiel calledSuit) = (defaultState hands normalTrumps) { no = 0, player = Just 0, mate = findIndex (elem $ Card calledSuit Ace) hands, game = game, rules = playerRulesRS calledSuit hands, condRS = flip...
370
false
false
0
11
137
109
57
52
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
repTyConName = tcQual gHC_GENERICS (fsLit "Rep") repTyConKey
62
repTyConName = tcQual gHC_GENERICS (fsLit "Rep") repTyConKey
62
repTyConName = tcQual gHC_GENERICS (fsLit "Rep") repTyConKey
62
false
false
0
7
8
19
9
10
null
null
ditto/ditto
src/Ditto/Conv.hs
gpl-3.0
---------------------------------------------------------------------- millerPattern :: MName -> Args -> Exp -> TCM (Maybe Tel) millerPattern x as a = (sequence <$> mapM varName as) >>= \case Just _As | linearNames _As && flexInScope x a -> solInScope _As a otherwise -> return Nothing
290
millerPattern :: MName -> Args -> Exp -> TCM (Maybe Tel) millerPattern x as a = (sequence <$> mapM varName as) >>= \case Just _As | linearNames _As && flexInScope x a -> solInScope _As a otherwise -> return Nothing
218
millerPattern x as a = (sequence <$> mapM varName as) >>= \case Just _As | linearNames _As && flexInScope x a -> solInScope _As a otherwise -> return Nothing
161
true
true
0
13
45
99
46
53
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\x014F' = "\x006F\x0306"
39
decomposeChar '\x014F' = "\x006F\x0306"
39
decomposeChar '\x014F' = "\x006F\x0306"
39
false
false
1
5
3
13
4
9
null
null
RossMeikleham/GPC
src/GPC/Interpreter.hs
bsd-2-clause
performBinNumOp :: (forall a. Num a => (a -> a -> a)) -> Literal -> Literal -> Either String Expr performBinNumOp operation (Number (Left n1)) (Number (Left n2)) = Right $ ExpLit $ Number $ Left $ n1 `operation` n2
219
performBinNumOp :: (forall a. Num a => (a -> a -> a)) -> Literal -> Literal -> Either String Expr performBinNumOp operation (Number (Left n1)) (Number (Left n2)) = Right $ ExpLit $ Number $ Left $ n1 `operation` n2
219
performBinNumOp operation (Number (Left n1)) (Number (Left n2)) = Right $ ExpLit $ Number $ Left $ n1 `operation` n2
120
false
true
0
11
44
107
55
52
null
null
MathiasVP/syntax-checker-checker
unparse.hs
mit
unparseCondClause :: CondClause -> String unparseCondClause (Immediate e) = "[" ++ unparseExpr e ++ "]"
103
unparseCondClause :: CondClause -> String unparseCondClause (Immediate e) = "[" ++ unparseExpr e ++ "]"
103
unparseCondClause (Immediate e) = "[" ++ unparseExpr e ++ "]"
61
false
true
0
7
14
35
17
18
null
null
CindyLinz/Haskell.js
trans/src/Desugar/Tuple.hs
mit
deTuplePat (PViewPat l exp pat) = PViewPat (id l) (deTupleExp exp) (deTuplePat pat)
83
deTuplePat (PViewPat l exp pat) = PViewPat (id l) (deTupleExp exp) (deTuplePat pat)
83
deTuplePat (PViewPat l exp pat) = PViewPat (id l) (deTupleExp exp) (deTuplePat pat)
83
false
false
0
7
12
45
21
24
null
null
atupal/xmonad-mirror
xmonad/src/XMonad/Main.hs
mit
-- trace (eventName e) -- ignoring -- --------------------------------------------------------------------- -- IO stuff. Doesn't require any X state -- Most of these things run only on startup (bar grabkeys) -- | scan for any new windows to manage. If they're already managed, -- this should be idempotent. scan :: Di...
950
scan :: Display -> Window -> IO [Window] scan dpy rootw = do (_, _, ws) <- queryTree dpy rootw filterM ok ws -- TODO: scan for windows that are either 'IsViewable' or where WM_STATE == -- Iconic where ok w = do wa <- getWindowAttributes dpy w a <- internAtom dpy "WM_STATE" False ...
640
scan dpy rootw = do (_, _, ws) <- queryTree dpy rootw filterM ok ws -- TODO: scan for windows that are either 'IsViewable' or where WM_STATE == -- Iconic where ok w = do wa <- getWindowAttributes dpy w a <- internAtom dpy "WM_STATE" False p <- getWindowProperty32 dpy ...
599
true
true
1
15
314
196
94
102
null
null
mainland/nikola
src/Data/Vector/CUDA/Storable.hs
bsd-3-clause
init = G.init
13
init = G.init
13
init = G.init
13
false
false
0
5
2
8
4
4
null
null
bestian/haskell-sandbox
h99.hs
unlicense
rnd_select xs count = do r <- randomRIO (0, (length xs)-1) rest <- rnd_select ((snd . removeAt (r+1)) xs) (count-1) return ((xs!!r) : rest) --Problem 24 --Lotto: Draw N different random numbers from the set 1..M.
263
rnd_select xs count = do r <- randomRIO (0, (length xs)-1) rest <- rnd_select ((snd . removeAt (r+1)) xs) (count-1) return ((xs!!r) : rest) --Problem 24 --Lotto: Draw N different random numbers from the set 1..M.
263
rnd_select xs count = do r <- randomRIO (0, (length xs)-1) rest <- rnd_select ((snd . removeAt (r+1)) xs) (count-1) return ((xs!!r) : rest) --Problem 24 --Lotto: Draw N different random numbers from the set 1..M.
263
false
false
1
16
86
106
51
55
null
null
martin-kolinek/stack
src/Stack/Types/VersionIntervals.hs
bsd-3-clause
fromVersionRange :: C.VersionRange -> VersionIntervals fromVersionRange = fromCabal . C.toVersionIntervals
106
fromVersionRange :: C.VersionRange -> VersionIntervals fromVersionRange = fromCabal . C.toVersionIntervals
106
fromVersionRange = fromCabal . C.toVersionIntervals
51
false
true
0
6
9
23
12
11
null
null
rodrigo-machado/verigraph
tests/Abstract/Rewriting/DPO/ProcessSpec.hs
gpl-3.0
kToRMappingGetDataResult = buildGraphMorphism kGetDataResult rGetDataResult [(52,62),(53,63),(54,64)] [(55,65)]
138
kToRMappingGetDataResult = buildGraphMorphism kGetDataResult rGetDataResult [(52,62),(53,63),(54,64)] [(55,65)]
138
kToRMappingGetDataResult = buildGraphMorphism kGetDataResult rGetDataResult [(52,62),(53,63),(54,64)] [(55,65)]
138
false
false
1
7
33
56
31
25
null
null
rpeszek/GraphPlay
play/Deprecated/DiGraph/TreeMonoidFoldOnSimpleGraph.hs
bsd-3-clause
countTreeEdges :: MonoidFoldAccLogic v e (Sum Int) countTreeEdges = defaultMonoidFoldAccLogic { applyEdge = const (Sum 1) }
165
countTreeEdges :: MonoidFoldAccLogic v e (Sum Int) countTreeEdges = defaultMonoidFoldAccLogic { applyEdge = const (Sum 1) }
165
countTreeEdges = defaultMonoidFoldAccLogic { applyEdge = const (Sum 1) }
113
false
true
0
9
58
41
21
20
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp WriteOffAddrOp_Addr = _ILIT(308)
45
tagOf_PrimOp WriteOffAddrOp_Addr = _ILIT(308)
45
tagOf_PrimOp WriteOffAddrOp_Addr = _ILIT(308)
45
false
false
0
6
3
15
7
8
null
null
TomMD/ghc
compiler/types/OptCoercion.hs
bsd-3-clause
etaTyConAppCo_maybe :: TyCon -> Coercion -> Maybe [Coercion] -- If possible, split a coercion -- g :: T s1 .. sn ~ T t1 .. tn -- into [ Nth 0 g :: s1~t1, ..., Nth (n-1) g :: sn~tn ] etaTyConAppCo_maybe tc (TyConAppCo _ tc2 cos2) = ASSERT( tc == tc2 ) Just cos2
268
etaTyConAppCo_maybe :: TyCon -> Coercion -> Maybe [Coercion] etaTyConAppCo_maybe tc (TyConAppCo _ tc2 cos2) = ASSERT( tc == tc2 ) Just cos2
141
etaTyConAppCo_maybe tc (TyConAppCo _ tc2 cos2) = ASSERT( tc == tc2 ) Just cos2
80
true
true
0
8
62
57
30
27
null
null
green-haskell/ghc
compiler/utils/Outputable.hs
bsd-3-clause
unicodeSyntax :: SDoc -> SDoc -> SDoc unicodeSyntax unicode plain = sdocWithDynFlags $ \dflags -> if useUnicode dflags && useUnicodeSyntax dflags then unicode else plain
181
unicodeSyntax :: SDoc -> SDoc -> SDoc unicodeSyntax unicode plain = sdocWithDynFlags $ \dflags -> if useUnicode dflags && useUnicodeSyntax dflags then unicode else plain
181
unicodeSyntax unicode plain = sdocWithDynFlags $ \dflags -> if useUnicode dflags && useUnicodeSyntax dflags then unicode else plain
143
false
true
0
9
36
51
26
25
null
null
KommuSoft/dep-software
Dep.Algorithms.Cpu.hs
gpl-3.0
instRegs :: Instr -> [Int] instRegs Clr{} = [0]
48
instRegs :: Instr -> [Int] instRegs Clr{} = [0]
48
instRegs Clr{} = [0]
21
false
true
0
6
9
28
15
13
null
null
plow-technologies/ircbrowse
src/Ircbrowse/View/Nicks.hs
bsd-3-clause
nicklist :: Channel -> [(Text,Int)] -> Text -> Html nicklist c ns mode = do tabNav $ do li !. (if mode == "recent" then "active" else "") $ a ! href (lnk "recent") $ "Recent" li !. (if mode == "all" then "active" else "") $ a ! href (lnk "all") $ "All Time" table !. "table" $ do thead $ tr $ do th...
589
nicklist :: Channel -> [(Text,Int)] -> Text -> Html nicklist c ns mode = do tabNav $ do li !. (if mode == "recent" then "active" else "") $ a ! href (lnk "recent") $ "Recent" li !. (if mode == "all" then "active" else "") $ a ! href (lnk "all") $ "All Time" table !. "table" $ do thead $ tr $ do th...
589
nicklist c ns mode = do tabNav $ do li !. (if mode == "recent" then "active" else "") $ a ! href (lnk "recent") $ "Recent" li !. (if mode == "all" then "active" else "") $ a ! href (lnk "all") $ "All Time" table !. "table" $ do thead $ tr $ do th "Nick" th "Messages" tbody $ ...
537
false
true
0
23
185
279
136
143
null
null
romac/mental
src/Mental/Parser.hs
bsd-3-clause
pIntLit :: Parser UntypedTree pIntLit = withPos' (IntLit <$> integer) <?> "integer"
83
pIntLit :: Parser UntypedTree pIntLit = withPos' (IntLit <$> integer) <?> "integer"
83
pIntLit = withPos' (IntLit <$> integer) <?> "integer"
53
false
true
0
8
11
28
14
14
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck.hs
bsd-3-clause
mkGrdTreeRhs :: Located SDoc -> GrdVec -> GrdTree mkGrdTreeRhs sdoc = foldr Guard (Rhs sdoc)
92
mkGrdTreeRhs :: Located SDoc -> GrdVec -> GrdTree mkGrdTreeRhs sdoc = foldr Guard (Rhs sdoc)
92
mkGrdTreeRhs sdoc = foldr Guard (Rhs sdoc)
42
false
true
0
7
14
36
17
19
null
null
nushio3/ghc
compiler/typecheck/TcBinds.hs
bsd-3-clause
tcVectDecls :: [LVectDecl Name] -> TcM ([LVectDecl TcId]) tcVectDecls decls = do { decls' <- mapM (wrapLocM tcVect) decls ; let ids = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl] dups = findDupsEq (==) ids ; mapM_ reportVectDups dups ; traceTcConstraints "End of t...
571
tcVectDecls :: [LVectDecl Name] -> TcM ([LVectDecl TcId]) tcVectDecls decls = do { decls' <- mapM (wrapLocM tcVect) decls ; let ids = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl] dups = findDupsEq (==) ids ; mapM_ reportVectDups dups ; traceTcConstraints "End of t...
571
tcVectDecls decls = do { decls' <- mapM (wrapLocM tcVect) decls ; let ids = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl] dups = findDupsEq (==) ids ; mapM_ reportVectDups dups ; traceTcConstraints "End of tcVectDecls" ; return decls' } where re...
513
false
true
1
13
150
183
90
93
null
null
andorp/hs-bluesnap
src/Bluesnap/API/Request.hs
gpl-3.0
elementCustom_param_title :: XMLParser Xsd.XsdString elementCustom_param_title = parseSchemaType "custom-param-title"
117
elementCustom_param_title :: XMLParser Xsd.XsdString elementCustom_param_title = parseSchemaType "custom-param-title"
117
elementCustom_param_title = parseSchemaType "custom-param-title"
64
false
true
0
6
7
19
9
10
null
null
goodlyrottenapple/CTLModelChecker
Parser.hs
mit
TokenParser{ parens = m_parens , identifier = m_identifier , reservedOp = m_reservedOp , reserved = m_reserved , semiSep1 = m_semiSep1 , whiteSpace = m_whiteSpace } = makeTokenParser def
241
TokenParser{ parens = m_parens , identifier = m_identifier , reservedOp = m_reservedOp , reserved = m_reserved , semiSep1 = m_semiSep1 , whiteSpace = m_whiteSpace } = makeTokenParser def
241
TokenParser{ parens = m_parens , identifier = m_identifier , reservedOp = m_reservedOp , reserved = m_reserved , semiSep1 = m_semiSep1 , whiteSpace = m_whiteSpace } = makeTokenParser def
241
false
false
1
7
82
53
30
23
null
null
uuhan/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCErrRev t) f = return f { ibc_errRev = t : ibc_errRev f }
66
ibc i (IBCErrRev t) f = return f { ibc_errRev = t : ibc_errRev f }
66
ibc i (IBCErrRev t) f = return f { ibc_errRev = t : ibc_errRev f }
66
false
false
1
9
15
46
19
27
null
null