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
AubreyEAnderson/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readIfClause5 = isOk readIfClause "if false; then true; else\nif true; then echo lol; fi; fi"
98
prop_readIfClause5 = isOk readIfClause "if false; then true; else\nif true; then echo lol; fi; fi"
98
prop_readIfClause5 = isOk readIfClause "if false; then true; else\nif true; then echo lol; fi; fi"
98
false
false
0
5
14
11
5
6
null
null
kazu-yamamoto/rpf
RPF/Parser.hs
bsd-3-clause
actionCond :: Parser ActionCond actionCond = do pos <- getPosition let l = sourceLine pos act <- action cnd <- option Nothing condition void semi return $ ActionCond l cnd act where action :: Parser Action action = sym2enum actionWords [minBound..maxBound] condition = do vo...
440
actionCond :: Parser ActionCond actionCond = do pos <- getPosition let l = sourceLine pos act <- action cnd <- option Nothing condition void semi return $ ActionCond l cnd act where action :: Parser Action action = sym2enum actionWords [minBound..maxBound] condition = do vo...
440
actionCond = do pos <- getPosition let l = sourceLine pos act <- action cnd <- option Nothing condition void semi return $ ActionCond l cnd act where action :: Parser Action action = sym2enum actionWords [minBound..maxBound] condition = do void colon cnd <- cond ...
408
false
true
1
10
116
142
59
83
null
null
sgillespie/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
atomPrimRep other = pprPanic "atomPrimRep" (ppr (deAnnotate' other))
68
atomPrimRep other = pprPanic "atomPrimRep" (ppr (deAnnotate' other))
68
atomPrimRep other = pprPanic "atomPrimRep" (ppr (deAnnotate' other))
68
false
false
0
9
7
26
12
14
null
null
roberth/uu-helium
test/testinstallation/Base.hs
gpl-3.0
frth5 :: (a,b,c,d,e) -> d frth5 (u,v,x,y,z) = y
47
frth5 :: (a,b,c,d,e) -> d frth5 (u,v,x,y,z) = y
47
frth5 (u,v,x,y,z) = y
21
false
true
0
6
8
48
29
19
null
null
jfischoff/hs-mitsuba
tests/Tests/Mitsuba/Types.hs
bsd-3-clause
case_uniform_scale_toXML = toXML (SUniformScale 5.0) @?= [xmlQQ| <scale value="5.0" /> |]
96
case_uniform_scale_toXML = toXML (SUniformScale 5.0) @?= [xmlQQ| <scale value="5.0" /> |]
96
case_uniform_scale_toXML = toXML (SUniformScale 5.0) @?= [xmlQQ| <scale value="5.0" /> |]
96
false
false
3
7
17
31
15
16
null
null
jgardella/nancy
src/Nancy/Core/Language.hs
mit
mapExpr f (Plus leftExpr rightExpr) = Plus (f leftExpr) (f rightExpr)
71
mapExpr f (Plus leftExpr rightExpr) = Plus (f leftExpr) (f rightExpr)
71
mapExpr f (Plus leftExpr rightExpr) = Plus (f leftExpr) (f rightExpr)
71
false
false
0
7
12
36
17
19
null
null
romanb/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/UploadMultipartPart.hs
mpl-2.0
-- | 'UploadMultipartPart' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'umpAccountId' @::@ 'Text' -- -- * 'umpBody' @::@ 'RqBody' -- -- * 'umpChecksum' @::@ 'Maybe' 'Text' -- -- * 'umpRange' @::@ 'Maybe' 'Text' -- -- * 'umpUploadId' @::@ 'Text' -- -- * 'umpVaultName' @::@ 'Text' -...
772
uploadMultipartPart :: Text -- ^ 'umpAccountId' -> Text -- ^ 'umpVaultName' -> Text -- ^ 'umpUploadId' -> RqBody -- ^ 'umpBody' -> UploadMultipartPart uploadMultipartPart p1 p2 p3 p4 = UploadMultipartPart { _umpAccountId = p1 , _ump...
450
uploadMultipartPart p1 p2 p3 p4 = UploadMultipartPart { _umpAccountId = p1 , _umpVaultName = p2 , _umpUploadId = p3 , _umpBody = p4 , _umpChecksum = Nothing , _umpRange = Nothing }
219
true
true
0
10
225
103
65
38
null
null
Melvar/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
psubst :: Eq n => n -> TT n -> TT n -> TT n psubst n v tm = s' 0 tm where s' i (V x) | x > i = V (x - 1) | x == i = v | otherwise = V x s' i (P _ x _) | n == x = v s' i (Bind x b sc) | n == x = Bind x (fmap (s' i) b) sc | otherwise = Bind x (fmap (s' i) b) (s' ...
542
psubst :: Eq n => n -> TT n -> TT n -> TT n psubst n v tm = s' 0 tm where s' i (V x) | x > i = V (x - 1) | x == i = v | otherwise = V x s' i (P _ x _) | n == x = v s' i (Bind x b sc) | n == x = Bind x (fmap (s' i) b) sc | otherwise = Bind x (fmap (s' i) b) (s' ...
542
psubst n v tm = s' 0 tm where s' i (V x) | x > i = V (x - 1) | x == i = v | otherwise = V x s' i (P _ x _) | n == x = v s' i (Bind x b sc) | n == x = Bind x (fmap (s' i) b) sc | otherwise = Bind x (fmap (s' i) b) (s' (i+1) sc) s' i (App st f a) = App st (s' ...
498
false
true
1
10
209
359
159
200
null
null
lexml/lexml-linker
src/main/haskell/LexML/Linker/ParserBase.hs
gpl-2.0
shouldParseConstituicaoSimples :: LinkerParserMonad Bool shouldParseConstituicaoSimples = lift $ gets lpsConstituicaoSimples
124
shouldParseConstituicaoSimples :: LinkerParserMonad Bool shouldParseConstituicaoSimples = lift $ gets lpsConstituicaoSimples
124
shouldParseConstituicaoSimples = lift $ gets lpsConstituicaoSimples
67
false
true
0
6
9
21
10
11
null
null
genos/online_problems
advent_of_code_2018/day18/src/Main.hs
mit
parseInput :: (Int, Int) -> (Int, Int) -> String -> Forest parseInput ys xs input = M.fromList $ do (y, l) <- zip (range ys) $ lines input (x, c) <- zip (range xs) l let yx = V2 y x case c of '.' -> [(yx, Open)] '|' -> [(yx, Tree)] '#' -> [(yx, Yard)] _ -> []
285
parseInput :: (Int, Int) -> (Int, Int) -> String -> Forest parseInput ys xs input = M.fromList $ do (y, l) <- zip (range ys) $ lines input (x, c) <- zip (range xs) l let yx = V2 y x case c of '.' -> [(yx, Open)] '|' -> [(yx, Tree)] '#' -> [(yx, Yard)] _ -> []
285
parseInput ys xs input = M.fromList $ do (y, l) <- zip (range ys) $ lines input (x, c) <- zip (range xs) l let yx = V2 y x case c of '.' -> [(yx, Open)] '|' -> [(yx, Tree)] '#' -> [(yx, Yard)] _ -> []
226
false
true
0
13
84
182
93
89
null
null
plaprade/haskoin
haskoin-core/test/Regtest.hs
unlicense
splitBest :: Assertion splitBest = 4035 @=? nodeHeight bb where bb = withChain $ splitChain >> getBestBlockHeader -- 0 → → 2015 → → → → → → → 4031 -- ↓ -- → → 2035 → → → → → → 4035* -- ↓ -- → → 2185
241
splitBest :: Assertion splitBest = 4035 @=? nodeHeight bb where bb = withChain $ splitChain >> getBestBlockHeader -- 0 → → 2015 → → → → → → → 4031 -- ↓ -- → → 2035 → → → → → → 4035* -- ↓ -- → → 2185
241
splitBest = 4035 @=? nodeHeight bb where bb = withChain $ splitChain >> getBestBlockHeader -- 0 → → 2015 → → → → → → → 4031 -- ↓ -- → → 2035 → → → → → → 4035* -- ↓ -- → → 2185
218
false
true
0
6
91
39
22
17
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/CelloMuted.hs
bsd-3-clause
note1 :: Note note1 = Note (Pitch 69.296 25 "c#2") 2 (Range (NoteRange (NoteRangeAmplitude 9632.14 139 4.0e-2) (NoteRangeHarmonicFreq 1 69.29)) (NoteRange (NoteRangeAmplitude 207.88 3 6555.0) (NoteRangeHarmonicFreq 144 9978.62))) [Harmonic ...
4,607
note1 :: Note note1 = Note (Pitch 69.296 25 "c#2") 2 (Range (NoteRange (NoteRangeAmplitude 9632.14 139 4.0e-2) (NoteRangeHarmonicFreq 1 69.29)) (NoteRange (NoteRangeAmplitude 207.88 3 6555.0) (NoteRangeHarmonicFreq 144 9978.62))) [Harmonic ...
4,607
note1 = Note (Pitch 69.296 25 "c#2") 2 (Range (NoteRange (NoteRangeAmplitude 9632.14 139 4.0e-2) (NoteRangeHarmonicFreq 1 69.29)) (NoteRange (NoteRangeAmplitude 207.88 3 6555.0) (NoteRangeHarmonicFreq 144 9978.62))) [Harmonic 1 (-1.246) 207...
4,593
false
true
0
11
1,255
1,870
969
901
null
null
k32/visualsgsn
src/Text/LogMerger/Logs/Util.hs
unlicense
-- | Read time in form "hh:mm:ss" hhmmss ∷ Parser DiffTime hhmmss = do hh ← decimal <* ":" <?> "hours" mm ← decimal <* ":" <?> "minutes" ss ← decimal <?> "seconds" return $ secondsToDiffTime $ (hh * 3600) + (mm * 60) + ss
229
hhmmss ∷ Parser DiffTime hhmmss = do hh ← decimal <* ":" <?> "hours" mm ← decimal <* ":" <?> "minutes" ss ← decimal <?> "seconds" return $ secondsToDiffTime $ (hh * 3600) + (mm * 60) + ss
195
hhmmss = do hh ← decimal <* ":" <?> "hours" mm ← decimal <* ":" <?> "minutes" ss ← decimal <?> "seconds" return $ secondsToDiffTime $ (hh * 3600) + (mm * 60) + ss
170
true
true
0
11
53
89
44
45
null
null
MichaelXavier/vigilance
src/Utils/Vigilance/Sweeper.hs
bsd-2-clause
secondsInterval (Every n Days) = n * 86400
45
secondsInterval (Every n Days) = n * 86400
45
secondsInterval (Every n Days) = n * 86400
45
false
false
0
6
10
22
10
12
null
null
IreneKnapp/direct-opengl
Graphics/Rendering/OpenGL/GL/Fog.hs
bsd-3-clause
setFogMode (Exp2 density) = do fogi FogMode (marshalFogMode' Exp2') fogf FogDensity density --------------------------------------------------------------------------------
179
setFogMode (Exp2 density) = do fogi FogMode (marshalFogMode' Exp2') fogf FogDensity density --------------------------------------------------------------------------------
179
setFogMode (Exp2 density) = do fogi FogMode (marshalFogMode' Exp2') fogf FogDensity density --------------------------------------------------------------------------------
179
false
false
0
9
19
38
17
21
null
null
uduki/hsQt
Qtc/Enums/Network/QAbstractSocket.hs
bsd-2-clause
eConnectionRefusedError :: SocketError eConnectionRefusedError = ieSocketError $ 0
84
eConnectionRefusedError :: SocketError eConnectionRefusedError = ieSocketError $ 0
84
eConnectionRefusedError = ieSocketError $ 0
45
false
true
0
6
9
18
8
10
null
null
brendanhay/gogol
gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs
mpl-2.0
-- | The label for the button to show only a few lines of a snippet rfsSnippetCollapseButtonLabel :: Lens' RendererFormattedStrings (Maybe Text) rfsSnippetCollapseButtonLabel = lens _rfsSnippetCollapseButtonLabel (\ s a -> s{_rfsSnippetCollapseButtonLabel = a})
269
rfsSnippetCollapseButtonLabel :: Lens' RendererFormattedStrings (Maybe Text) rfsSnippetCollapseButtonLabel = lens _rfsSnippetCollapseButtonLabel (\ s a -> s{_rfsSnippetCollapseButtonLabel = a})
201
rfsSnippetCollapseButtonLabel = lens _rfsSnippetCollapseButtonLabel (\ s a -> s{_rfsSnippetCollapseButtonLabel = a})
124
true
true
0
8
40
49
25
24
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
mpl-2.0
-- | Token to retrieve the next page of results, or empty if there are no -- more results in the list. ldsrNextPageToken :: Lens' ListDataSetsResponse (Maybe Text) ldsrNextPageToken = lens _ldsrNextPageToken (\ s a -> s{_ldsrNextPageToken = a})
252
ldsrNextPageToken :: Lens' ListDataSetsResponse (Maybe Text) ldsrNextPageToken = lens _ldsrNextPageToken (\ s a -> s{_ldsrNextPageToken = a})
149
ldsrNextPageToken = lens _ldsrNextPageToken (\ s a -> s{_ldsrNextPageToken = a})
88
true
true
1
9
46
53
26
27
null
null
cchalmers/geometry
src/Geometry/TwoD/Shapes.hs
bsd-3-clause
-- | A regular dodecagon, with sides of the given length and base -- parallel to the x-axis. -- -- <<diagrams/src_Geometry_TwoD_Shapes_dodecagonEx.svg#diagram=dodecagonEx&width=100>> dodecagon :: (InSpace V2 n t, FromTrail t, OrderedField n) => n -> t dodecagon = regPoly 12
278
dodecagon :: (InSpace V2 n t, FromTrail t, OrderedField n) => n -> t dodecagon = regPoly 12
91
dodecagon = regPoly 12
22
true
true
0
6
42
47
26
21
null
null
nickbart1980/pandoc-citeproc
src/Text/CSL/Proc.hs
bsd-3-clause
-- | With a 'Style' and the list of 'Reference's produce the -- 'Formatted' for the bibliography. processBibliography :: ProcOpts -> Style -> [Reference] -> [Formatted] processBibliography ops s rs = bibliography $ citeproc ops s rs [map (\r -> emptyCite { citeId = unLiteral $ refId r}) rs]
295
processBibliography :: ProcOpts -> Style -> [Reference] -> [Formatted] processBibliography ops s rs = bibliography $ citeproc ops s rs [map (\r -> emptyCite { citeId = unLiteral $ refId r}) rs]
197
processBibliography ops s rs = bibliography $ citeproc ops s rs [map (\r -> emptyCite { citeId = unLiteral $ refId r}) rs]
126
true
true
2
13
52
88
45
43
null
null
DavidAlphaFox/darcs
hashed-storage/Storage/Hashed/Darcs.hs
gpl-2.0
--------------------------------------------------------------------- -- Utilities for coping with the darcs directory format. -- -- | 'darcsDecodeWhite' interprets the Darcs-specific \"encoded\" filenames -- produced by 'darcsEncodeWhite' -- -- > darcsDecodeWhite "hello\32\there" == "hello there" -- > darcsDeco...
643
darcsDecodeWhite :: String -> FilePath darcsDecodeWhite ('\\':cs) = case break (=='\\') cs of (theord, '\\':rest) -> chr (read theord) : darcsDecodeWhite rest _ -> error "malformed filename"
210
darcsDecodeWhite ('\\':cs) = case break (=='\\') cs of (theord, '\\':rest) -> chr (read theord) : darcsDecodeWhite rest _ -> error "malformed filename"
171
true
true
0
11
103
92
50
42
null
null
k0001/gtk2hs
gtk/demo/buttonbox/ButtonBox.hs
gpl-3.0
main :: IO () main = do initGUI -- Create a new window window <- windowNew -- Here we connect the "destroy" event to a signal handler. on window objectDestroy mainQuit -- Sets the border width of the window. set window [ containerBorderWidth := 10 ] hbuttonbox <- hButtonBoxNew set window [ contai...
1,485
main :: IO () main = do initGUI -- Create a new window window <- windowNew -- Here we connect the "destroy" event to a signal handler. on window objectDestroy mainQuit -- Sets the border width of the window. set window [ containerBorderWidth := 10 ] hbuttonbox <- hButtonBoxNew set window [ contai...
1,485
main = do initGUI -- Create a new window window <- windowNew -- Here we connect the "destroy" event to a signal handler. on window objectDestroy mainQuit -- Sets the border width of the window. set window [ containerBorderWidth := 10 ] hbuttonbox <- hButtonBoxNew set window [ containerChild := hb...
1,471
false
true
0
11
325
184
92
92
null
null
lukexi/ghc-7.8-arm64
compiler/main/DynFlags.hs
bsd-3-clause
defaultFatalMessager :: FatalMessager defaultFatalMessager = hPutStrLn stderr
77
defaultFatalMessager :: FatalMessager defaultFatalMessager = hPutStrLn stderr
77
defaultFatalMessager = hPutStrLn stderr
39
false
true
0
5
6
14
7
7
null
null
danr/hipspec
examples/old-examples/hip/ZenoLists.hs
gpl-3.0
map :: (a -> b) -> [a] -> [b] map f [] = []
43
map :: (a -> b) -> [a] -> [b] map f [] = []
43
map f [] = []
13
false
true
0
9
13
47
23
24
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/fromDouble_1.hs
mit
primDivNatS0 x y MyTrue = Succ (primDivNatS (primMinusNatS x y) (Succ y))
73
primDivNatS0 x y MyTrue = Succ (primDivNatS (primMinusNatS x y) (Succ y))
73
primDivNatS0 x y MyTrue = Succ (primDivNatS (primMinusNatS x y) (Succ y))
73
false
false
0
9
11
41
18
23
null
null
capitanbatata/sandbox
haddock-re-exports/app/Main.hs
gpl-3.0
b :: B b = B
12
b :: B b = B
12
b = B
5
false
true
0
6
5
18
7
11
null
null
apyrgio/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nodeEvacAll :: String nodeEvacAll = Types.evacModeToRaw ChangeAll
65
nodeEvacAll :: String nodeEvacAll = Types.evacModeToRaw ChangeAll
65
nodeEvacAll = Types.evacModeToRaw ChangeAll
43
false
true
0
6
6
16
8
8
null
null
leepike/copilot-language
src/Copilot/Language/Operators/Constant.hs
bsd-3-clause
constI8 :: Int8 -> Stream Int8 constI8 = constant
51
constI8 :: Int8 -> Stream Int8 constI8 = constant
51
constI8 = constant
19
false
true
0
6
10
18
9
9
null
null
tchagnon/cs636-raytracer
a5/Math.hs
apache-2.0
dot :: Vec3f -> Vec3f -> RealT dot (Vec3f a b c) (Vec3f d e f) = a*d + b*e + c*f
86
dot :: Vec3f -> Vec3f -> RealT dot (Vec3f a b c) (Vec3f d e f) = a*d + b*e + c*f
86
dot (Vec3f a b c) (Vec3f d e f) = a*d + b*e + c*f
51
false
true
0
9
27
64
32
32
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Utils.hs
gpl-2.0
mkBindingY :: VimMode -> (Event, YiM (), VimState -> VimState) -> VimBinding mkBindingY mode (event, action, mutate) = VimBindingY f where f evs vs = combineAction action mutate Drop <$ matchFromBool (vsMode vs == mode && evs == eventToEventString event)
279
mkBindingY :: VimMode -> (Event, YiM (), VimState -> VimState) -> VimBinding mkBindingY mode (event, action, mutate) = VimBindingY f where f evs vs = combineAction action mutate Drop <$ matchFromBool (vsMode vs == mode && evs == eventToEventString event)
279
mkBindingY mode (event, action, mutate) = VimBindingY f where f evs vs = combineAction action mutate Drop <$ matchFromBool (vsMode vs == mode && evs == eventToEventString event)
202
false
true
0
11
64
101
51
50
null
null
akhileshs/stack
src/Data/Aeson/Extended.hs
bsd-3-clause
logJSONWarnings :: MonadLogger m => FilePath -> [JSONWarning] -> m () logJSONWarnings fp = mapM_ (\w -> $logWarn ("Warning: " <> T.pack fp <> ": " <> T.pack (show w)))
179
logJSONWarnings :: MonadLogger m => FilePath -> [JSONWarning] -> m () logJSONWarnings fp = mapM_ (\w -> $logWarn ("Warning: " <> T.pack fp <> ": " <> T.pack (show w)))
179
logJSONWarnings fp = mapM_ (\w -> $logWarn ("Warning: " <> T.pack fp <> ": " <> T.pack (show w)))
101
false
true
0
14
41
86
41
45
null
null
sdiehl/ghc
libraries/base/GHC/TopHandler.hs
bsd-3-clause
exitHelper exitKind r = shutdownHaskellAndExit (fromIntegral r) exitKind >> unreachable
89
exitHelper exitKind r = shutdownHaskellAndExit (fromIntegral r) exitKind >> unreachable
89
exitHelper exitKind r = shutdownHaskellAndExit (fromIntegral r) exitKind >> unreachable
89
false
false
1
8
11
32
12
20
null
null
ak1211/tractor
src/SBIsecCoJp/Broker.hs
agpl-3.0
noticeOfBrokerageAnnouncement :: M.MonadIO m => Conf.InfoSBIsecCoJp -> MySQL.ConnectInfo -> Conf.UserAgent -> C.ConduitT () TL.Text m () noticeOfBrokerageAnnouncement conf _ userAgent = do ...
821
noticeOfBrokerageAnnouncement :: M.MonadIO m => Conf.InfoSBIsecCoJp -> MySQL.ConnectInfo -> Conf.UserAgent -> C.ConduitT () TL.Text m () noticeOfBrokerageAnnouncement conf _ userAgent = do ...
821
noticeOfBrokerageAnnouncement conf _ userAgent = do r <- M.liftIO . MR.runResourceT . siteConn conf userAgent $ go C.yield r where go :: BB.HTTPSession -> IO TL.Text go sess = TL.pack . maybe "マーケット情報の取得に失敗しました。" show <$> runMaybeT (goMarketInfoPage sess) -- | -- トップ -> マーケット...
554
false
true
5
11
274
214
99
115
null
null
d3zd3z/sudoku
Sudoku/Simple.hs
bsd-3-clause
possibleFromList :: [Int] -> Possible possibleFromList = Possible . conv where conv [] = 0 conv (a:as) = (1 `shiftL` (a - 1)) .|. conv as -- Possible set difference. Remove the values in 'b' from the -- possibilities in 'a'.
232
possibleFromList :: [Int] -> Possible possibleFromList = Possible . conv where conv [] = 0 conv (a:as) = (1 `shiftL` (a - 1)) .|. conv as -- Possible set difference. Remove the values in 'b' from the -- possibilities in 'a'.
232
possibleFromList = Possible . conv where conv [] = 0 conv (a:as) = (1 `shiftL` (a - 1)) .|. conv as -- Possible set difference. Remove the values in 'b' from the -- possibilities in 'a'.
194
false
true
0
11
48
74
41
33
null
null
j-mueller/virtual-hom
src/VirtualHom/Html.hs
bsd-3-clause
article :: Elem cb () article = elm "article"
45
article :: Elem cb () article = elm "article"
45
article = elm "article"
23
false
true
0
6
8
21
10
11
null
null
daleooo/barrelfish
tools/flounder/THCStubsBackend.hs
mit
intf_s2c_idc_bind_var = "_idc_binding"
38
intf_s2c_idc_bind_var = "_idc_binding"
38
intf_s2c_idc_bind_var = "_idc_binding"
38
false
false
0
4
2
6
3
3
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Creates a value of 'HashClientIdResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'hcirClientId' -- -- * 'hcirWebPropertyId' -- -- * 'hcirKind' -- -- * 'hcirHashedClientId' hashClientIdResponse :: HashClientIdResponse ...
524
hashClientIdResponse :: HashClientIdResponse hashClientIdResponse = HashClientIdResponse' { _hcirClientId = Nothing , _hcirWebPropertyId = Nothing , _hcirKind = "analytics#hashClientIdResponse" , _hcirHashedClientId = Nothing }
253
hashClientIdResponse = HashClientIdResponse' { _hcirClientId = Nothing , _hcirWebPropertyId = Nothing , _hcirKind = "analytics#hashClientIdResponse" , _hcirHashedClientId = Nothing }
204
true
true
1
7
94
55
35
20
null
null
keera-studios/hsQt
extra-pkgs/Glome/Qt/Glome/Glome.hs
bsd-2-clause
msl [] = ""
11
msl [] = ""
11
msl [] = ""
11
false
false
0
5
3
12
5
7
null
null
plow-technologies/rtsp-types
test/Network/RTSP/TypesSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
112
spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
112
spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
99
false
true
0
13
30
40
19
21
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Constraint/Solver/ProofMethod.hs
gpl-3.0
oracleSmartRanking :: Oracle -> ProofContext -> System -> [AnnotatedGoal] -> [AnnotatedGoal] oracleSmartRanking oracle ctxt _sys ags0 -- | AvoidInduction == (L.get pcUseInduction ctxt) = ags0 | otherwise = unsafePerformIO $ do let ags = smartRanking ...
1,282
oracleSmartRanking :: Oracle -> ProofContext -> System -> [AnnotatedGoal] -> [AnnotatedGoal] oracleSmartRanking oracle ctxt _sys ags0 -- | AvoidInduction == (L.get pcUseInduction ctxt) = ags0 | otherwise = unsafePerformIO $ do let ags = smartRanking ...
1,282
oracleSmartRanking oracle ctxt _sys ags0 -- | AvoidInduction == (L.get pcUseInduction ctxt) = ags0 | otherwise = unsafePerformIO $ do let ags = smartRanking ctxt False _sys ags0 let inp = unlines (map (\(i,ag) -> show i ++": "++ (concat . lines . render $ pgoal ag)) ...
1,132
false
true
2
19
430
325
163
162
null
null
sebug/tpg_sandbox
Cfg.hs
bsd-3-clause
getApiKey :: Maybe Config -> Maybe String getApiKey Nothing = Nothing
69
getApiKey :: Maybe Config -> Maybe String getApiKey Nothing = Nothing
69
getApiKey Nothing = Nothing
27
false
true
0
6
10
24
11
13
null
null
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Macros.hs
gpl-2.0
-- TODO move to some shared utility module -- | macros without arguments myAliases :: R Macro myAliases = aliasMacro sendText myAliasesList
140
myAliases :: R Macro myAliases = aliasMacro sendText myAliasesList
66
myAliases = aliasMacro sendText myAliasesList
45
true
true
0
5
22
21
11
10
null
null
frenetic-lang/nettle-openflow
src/Nettle/OpenFlow/MessagesBinary.hs
bsd-3-clause
getHeader :: Get OFPHeader getHeader = do v <- getWord8 t <- getWord8 l <- getWord16be x <- getWord32be return $ OFPHeader v t l x
191
getHeader :: Get OFPHeader getHeader = do v <- getWord8 t <- getWord8 l <- getWord16be x <- getWord32be return $ OFPHeader v t l x
191
getHeader = do v <- getWord8 t <- getWord8 l <- getWord16be x <- getWord32be return $ OFPHeader v t l x
164
false
true
0
8
86
58
26
32
null
null
gbwey/persistentold
persistent-template/Database/Persist/TH.hs
mit
mkFromPersistValues mps t@(EntityDef { entitySum = True }) = do nothing <- [|Left $(liftT $ "Invalid fromPersistValues input: sum type with all nulls. Entity: " `mappend` entName)|] clauses <- mkClauses [] $ entityFields t return $ clauses `mappend` [Clause [WildP] (NormalB nothing) []] where entName ...
1,032
mkFromPersistValues mps t@(EntityDef { entitySum = True }) = do nothing <- [|Left $(liftT $ "Invalid fromPersistValues input: sum type with all nulls. Entity: " `mappend` entName)|] clauses <- mkClauses [] $ entityFields t return $ clauses `mappend` [Clause [WildP] (NormalB nothing) []] where entName ...
1,032
mkFromPersistValues mps t@(EntityDef { entitySum = True }) = do nothing <- [|Left $(liftT $ "Invalid fromPersistValues input: sum type with all nulls. Entity: " `mappend` entName)|] clauses <- mkClauses [] $ entityFields t return $ clauses `mappend` [Clause [WildP] (NormalB nothing) []] where entName ...
1,032
false
false
0
17
321
361
182
179
null
null
kadena-io/pact
src-ghc/Pact/GasModel/GasTests.hs
bsd-3-clause
listModulesTests :: NativeDefName -> GasUnitTests listModulesTests = defGasUnitTests allExprs where listModulesExpr = defPactExpression [text| (list-modules) |] allExprs = listModulesExpr :| []
210
listModulesTests :: NativeDefName -> GasUnitTests listModulesTests = defGasUnitTests allExprs where listModulesExpr = defPactExpression [text| (list-modules) |] allExprs = listModulesExpr :| []
210
listModulesTests = defGasUnitTests allExprs where listModulesExpr = defPactExpression [text| (list-modules) |] allExprs = listModulesExpr :| []
160
false
true
1
6
37
45
24
21
null
null
santifa/haskellstuff
Stuff/AutomaticCalculator/Parser.hs
unlicense
many :: Parser a -> Parser [a] many p = force(some p `orelse` return [])
72
many :: Parser a -> Parser [a] many p = force(some p `orelse` return [])
72
many p = force(some p `orelse` return [])
41
false
true
0
9
14
51
24
27
null
null
brendanhay/gogol
gogol-bigtableadmin/gen/Network/Google/BigtableAdmin/Types/Product.hs
mpl-2.0
-- | A list of messages that carry the error details. There is a common set -- of message types for APIs to use. sDetails :: Lens' Status [StatusDetailsItem] sDetails = lens _sDetails (\ s a -> s{_sDetails = a}) . _Default . _Coerce
246
sDetails :: Lens' Status [StatusDetailsItem] sDetails = lens _sDetails (\ s a -> s{_sDetails = a}) . _Default . _Coerce
133
sDetails = lens _sDetails (\ s a -> s{_sDetails = a}) . _Default . _Coerce
88
true
true
0
11
57
54
29
25
null
null
yi-editor/yi
yi-core/src/Yi/Eval.hs
gpl-2.0
-- * Miscellaneous interpreter -- | Jumps to specified position in a given file. jumpToE :: FilePath -- ^ Filename to make the jump in. -> Int -- ^ Line to jump to. -> Int -- ^ Column to jump to. -> YiM () jumpToE filename line column = openingNewFile filename $ gotoLn line >> moveXorEol colu...
322
jumpToE :: FilePath -- ^ Filename to make the jump in. -> Int -- ^ Line to jump to. -> Int -- ^ Column to jump to. -> YiM () jumpToE filename line column = openingNewFile filename $ gotoLn line >> moveXorEol column
240
jumpToE filename line column = openingNewFile filename $ gotoLn line >> moveXorEol column
91
true
true
0
9
83
57
29
28
null
null
beni55/cryptol
src/Cryptol/ModuleSystem/Renamer.hs
bsd-3-clause
-- | Rename a type operator, mapping it to a real type function. When isProp is -- True, it's assumed that the renaming is happening in the context of a Prop, -- which allows unresolved operators to propagate without an error. They will -- be resolved in the CType case for Prop. renameTypeOp :: Bool -> Located QName ...
986
renameTypeOp :: Bool -> Located QName -> RenameM (TOp,Fixity) renameTypeOp isProp op = do let sym = unqual (thing op) props = [ mkName "==", mkName ">=", mkName "<=" ] lkp = do n <- Map.lookup (thing op) tfunNames (fAssoc,fLevel) <- Map.lookup n tBinOpPrec ...
704
renameTypeOp isProp op = do let sym = unqual (thing op) props = [ mkName "==", mkName ">=", mkName "<=" ] lkp = do n <- Map.lookup (thing op) tfunNames (fAssoc,fLevel) <- Map.lookup n tBinOpPrec return (n,Fixity { .. }) case lkp of ...
642
true
true
0
18
319
309
158
151
null
null
RomainGehrig/ConsoleChess
src/ConsoleChess/Moves.hs
mit
-- | Create an infinite path in a certain direction from a starting point pathFromStart :: Num a => (a, a) -> Coordinate a -> [Coordinate a] pathFromStart direction start = iterate (updateCoordWithDirection direction) start
223
pathFromStart :: Num a => (a, a) -> Coordinate a -> [Coordinate a] pathFromStart direction start = iterate (updateCoordWithDirection direction) start
149
pathFromStart direction start = iterate (updateCoordWithDirection direction) start
82
true
true
0
9
34
58
29
29
null
null
ony/hledger
hledger-lib/Hledger/Read.hs
gpl-3.0
-- | Given zero or more latest dates (all the same, representing the -- latest previously seen transaction date, and how many transactions -- were seen on that date), remove transactions with earlier dates -- from the journal, and the same number of transactions on the -- latest date, if any, leaving only transactions ...
571
journalFilterSinceLatestDates :: LatestDates -> Journal -> (Journal, LatestDates) journalFilterSinceLatestDates [] j = (j, latestDates $ map tdate $ jtxns j)
164
journalFilterSinceLatestDates [] j = (j, latestDates $ map tdate $ jtxns j)
82
true
true
0
9
97
64
34
30
null
null
safwank/HaskellKata
src/Kata02/Chop1.hs
apache-2.0
chop x xs = let start = 0 end = (length xs) - 1 in chop' x xs start end
81
chop x xs = let start = 0 end = (length xs) - 1 in chop' x xs start end
81
chop x xs = let start = 0 end = (length xs) - 1 in chop' x xs start end
81
false
false
0
11
29
46
22
24
null
null
rueshyna/gogol
gogol-maps-coordinate/gen/Network/Google/MapsCoordinate/Types/Product.hs
mpl-2.0
-- | Identifies this object as a job change. jcKind :: Lens' JobChange Text jcKind = lens _jcKind (\ s a -> s{_jcKind = a})
123
jcKind :: Lens' JobChange Text jcKind = lens _jcKind (\ s a -> s{_jcKind = a})
78
jcKind = lens _jcKind (\ s a -> s{_jcKind = a})
47
true
true
0
9
24
40
22
18
null
null
ihc/futhark
src/Futhark/Representation/SOACS/Simplify.hs
isc
removeReplicateMapping _ _ = cannotSimplify
43
removeReplicateMapping _ _ = cannotSimplify
43
removeReplicateMapping _ _ = cannotSimplify
43
false
false
0
5
4
11
5
6
null
null
ulricha/dsh-tpc-h
Queries/TPCH/Standard/Q1.hs
bsd-3-clause
withFlagStatus :: Q LineItem -> Q (Text, Text) withFlagStatus li = tup2 (l_returnflagQ li) (l_linestatusQ li)
109
withFlagStatus :: Q LineItem -> Q (Text, Text) withFlagStatus li = tup2 (l_returnflagQ li) (l_linestatusQ li)
109
withFlagStatus li = tup2 (l_returnflagQ li) (l_linestatusQ li)
62
false
true
0
7
15
47
23
24
null
null
dschalk/JS-monads-part4
dist/build/autogen/Paths_JS_monads_part5.hs
mit
libexecdir = "/home/d/.cabal/libexec"
37
libexecdir = "/home/d/.cabal/libexec"
37
libexecdir = "/home/d/.cabal/libexec"
37
false
false
1
5
2
10
3
7
null
null
keithodulaigh/Hets
RelationalScheme/Keywords.hs
gpl-2.0
rsStringId :: Id rsStringId = stringToId rsString
49
rsStringId :: Id rsStringId = stringToId rsString
49
rsStringId = stringToId rsString
32
false
true
0
6
6
21
8
13
null
null
taruti/diagrams-cairo-raster
example/Benchmarks.hs
bsd-3-clause
noisePlain :: Int -> PlainF noisePlain !seed = let noise = noiseValue (perlin seed 6 4 0.5) fn c = fromIntegral (c+1) / fromIntegral (div (w + h) 2) f !x !y = let !c = round ((1 + noise (fn x, fn y, 0)) * 127) in crgb 255 c (c :: Int) in f
260
noisePlain :: Int -> PlainF noisePlain !seed = let noise = noiseValue (perlin seed 6 4 0.5) fn c = fromIntegral (c+1) / fromIntegral (div (w + h) 2) f !x !y = let !c = round ((1 + noise (fn x, fn y, 0)) * 127) in crgb 255 c (c :: Int) in f
260
noisePlain !seed = let noise = noiseValue (perlin seed 6 4 0.5) fn c = fromIntegral (c+1) / fromIntegral (div (w + h) 2) f !x !y = let !c = round ((1 + noise (fn x, fn y, 0)) * 127) in crgb 255 c (c :: Int) in f
232
false
true
0
20
76
158
76
82
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
blockToRST (Plain inlines) = inlineListToRST inlines
52
blockToRST (Plain inlines) = inlineListToRST inlines
52
blockToRST (Plain inlines) = inlineListToRST inlines
52
false
false
0
6
5
19
8
11
null
null
bos/mwc-random
mwc-random-bench/test/MWC/ChiSquare.hs
bsd-2-clause
-- | Apply chi square test for a distribution sampleTest :: String -- ^ Name of test -> Generator -- ^ Generator to test -> Int -- ^ N of events -> MWC.GenIO -- ^ PRNG state -> Test.Framework.Test sampleTest nm (Generator{..}) ...
647
sampleTest :: String -- ^ Name of test -> Generator -- ^ Generator to test -> Int -- ^ N of events -> MWC.GenIO -- ^ PRNG state -> Test.Framework.Test sampleTest nm (Generator{..}) n g = testCase nm $ do let size = U.length $...
601
sampleTest nm (Generator{..}) n g = testCase nm $ do let size = U.length $ probabilites h <- histogram (generator g) size n let w = U.map (* fromIntegral n) probabilites Just t = chi2test 0 $ U.zip h w case isSignificant (mkPValue 0.01) t of Significant -> assertFailure ("Significant: " ++ sho...
357
true
true
0
14
220
191
93
98
null
null
syanidar/Sophy
src/Foundation/Move.hs
bsd-3-clause
getPromotionPiece :: Move -> PieceType getPromotionPiece x = toEnum.fromIntegral $ (x.&.0x000c)`shiftR`2 + 1
108
getPromotionPiece :: Move -> PieceType getPromotionPiece x = toEnum.fromIntegral $ (x.&.0x000c)`shiftR`2 + 1
108
getPromotionPiece x = toEnum.fromIntegral $ (x.&.0x000c)`shiftR`2 + 1
69
false
true
0
9
12
47
23
24
null
null
ChShersh/rogue-lang
src/Rogue/LLVM/Emitter.hs
bsd-3-clause
codegenStatement (S.Ret (Just retExpr)) = do retExprOperand <- cgenExpr retExpr ret $ Just retExprOperand return ()
127
codegenStatement (S.Ret (Just retExpr)) = do retExprOperand <- cgenExpr retExpr ret $ Just retExprOperand return ()
127
codegenStatement (S.Ret (Just retExpr)) = do retExprOperand <- cgenExpr retExpr ret $ Just retExprOperand return ()
127
false
false
0
9
27
51
22
29
null
null
urbanslug/ghc
compiler/utils/Outputable.hs
bsd-3-clause
-- Colours colType :: PprColour colType = PprColour "\27[34m"
62
colType :: PprColour colType = PprColour "\27[34m"
50
colType = PprColour "\27[34m"
29
true
true
0
6
9
22
9
13
null
null
keera-studios/hsQt
Qtc/Gui/QStyleOptionTab.hs
bsd-2-clause
qStyleOptionTab_delete :: QStyleOptionTab a -> IO () qStyleOptionTab_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QStyleOptionTab_delete cobj_x0
152
qStyleOptionTab_delete :: QStyleOptionTab a -> IO () qStyleOptionTab_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QStyleOptionTab_delete cobj_x0
152
qStyleOptionTab_delete x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QStyleOptionTab_delete cobj_x0
99
false
true
0
7
22
41
19
22
null
null
acowley/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkNPlusKPat id lit = NPlusKPat id lit noSyntaxExpr noSyntaxExpr
63
mkNPlusKPat id lit = NPlusKPat id lit noSyntaxExpr noSyntaxExpr
63
mkNPlusKPat id lit = NPlusKPat id lit noSyntaxExpr noSyntaxExpr
63
false
false
0
5
8
20
9
11
null
null
rahulmutt/ghcvm
compiler/Eta/SimplCore/CSE.hs
bsd-3-clause
cseExpr env (Lam b e) = let (env', b') = addBinder env b in Lam b' (cseExpr env' e)
133
cseExpr env (Lam b e) = let (env', b') = addBinder env b in Lam b' (cseExpr env' e)
133
cseExpr env (Lam b e) = let (env', b') = addBinder env b in Lam b' (cseExpr env' e)
133
false
false
0
9
68
55
26
29
null
null
edsko/ChinesePodAPI
src/Servant/ChinesePod/Vocab/V2.hs
bsd-3-clause
extractLevel (Just (API.LevelOther "Upper-Intermediate")) = Right UpperIntermediate
83
extractLevel (Just (API.LevelOther "Upper-Intermediate")) = Right UpperIntermediate
83
extractLevel (Just (API.LevelOther "Upper-Intermediate")) = Right UpperIntermediate
83
false
false
0
10
6
26
12
14
null
null
aniketd/learn.haskell
haskellbook/sumAll.hs
unlicense
mulBySum :: (Integral a) => a -> a -> a mulBySum 0 0 = 0
57
mulBySum :: (Integral a) => a -> a -> a mulBySum 0 0 = 0
56
mulBySum 0 0 = 0
16
false
true
0
7
15
33
17
16
null
null
romanofski/gtfsbrisbane
src/GTFS/Schedule.hs
bsd-3-clause
-- | Converts the delay to a more readable format -- -- We convert the delay to a current time from midnight and then use the common -- formatTime function to produce the user friendly format. That doesn't work -- for negative values (in cases the service is running ahead of it's schedule). -- To work with negative val...
1,028
humanReadableDelay :: ScheduleItem -> Maybe String humanReadableDelay x | depDelay == 0 = Nothing | depDelay < 60 = Just $ formatTime defaultTimeLocale (prefix ++ "%Ss") t | depDelay < 60 * 60 = Just $ formatTime defaultTimeLocale (prefix ++ "%M:%S") t | otherwise = Just $ formatTime defaultTimeLocale (prefix +...
591
humanReadableDelay x | depDelay == 0 = Nothing | depDelay < 60 = Just $ formatTime defaultTimeLocale (prefix ++ "%Ss") t | depDelay < 60 * 60 = Just $ formatTime defaultTimeLocale (prefix ++ "%M:%S") t | otherwise = Just $ formatTime defaultTimeLocale (prefix ++ "%k:%M:%S") t where t = timeToTimeOfDay $ s...
540
true
true
3
9
222
184
93
91
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpCanFail WriteByteArrayOp_StablePtr = True
47
primOpCanFail WriteByteArrayOp_StablePtr = True
47
primOpCanFail WriteByteArrayOp_StablePtr = True
47
false
false
0
4
3
10
4
6
null
null
DavidAlphaFox/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
mapE f (CM { cm_var = cvar, cm_lit = clit , cm_co = cco, cm_type = ctype , cm_cast = ccast , cm_app = capp , cm_lam = clam, cm_letn = cletn , cm_letr = cletr, cm_case = ccase , cm_ecase = cecase, cm_tick = ctick }) = CM { cm_var = mapTM f cvar, cm_lit = mapTM f c...
689
mapE f (CM { cm_var = cvar, cm_lit = clit , cm_co = cco, cm_type = ctype , cm_cast = ccast , cm_app = capp , cm_lam = clam, cm_letn = cletn , cm_letr = cletr, cm_case = ccase , cm_ecase = cecase, cm_tick = ctick }) = CM { cm_var = mapTM f cvar, cm_lit = mapTM f c...
689
mapE f (CM { cm_var = cvar, cm_lit = clit , cm_co = cco, cm_type = ctype , cm_cast = ccast , cm_app = capp , cm_lam = clam, cm_letn = cletn , cm_letr = cletr, cm_case = ccase , cm_ecase = cecase, cm_tick = ctick }) = CM { cm_var = mapTM f cvar, cm_lit = mapTM f c...
689
false
false
0
12
217
289
160
129
null
null
goens/rand-code-graph
src/LevelGraphs.hs
mit
elemWithProbList :: MonadRandom m => [(a,Rational)] -> m [a] elemWithProbList [] = return []
92
elemWithProbList :: MonadRandom m => [(a,Rational)] -> m [a] elemWithProbList [] = return []
92
elemWithProbList [] = return []
31
false
true
0
9
13
52
25
27
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/Coverage.hs
bsd-3-clause
addTickCmdStmt stmt@(RecStmt {}) = do { stmts' <- addTickLCmdStmts (recS_stmts stmt) ; ret' <- addTickSyntaxExpr hpcSrcSpan (recS_ret_fn stmt) ; mfix' <- addTickSyntaxExpr hpcSrcSpan (recS_mfix_fn stmt) ; bind' <- addTickSyntaxExpr hpcSrcSpan (recS_bind_fn stmt) ; return (stmt { recS_s...
425
addTickCmdStmt stmt@(RecStmt {}) = do { stmts' <- addTickLCmdStmts (recS_stmts stmt) ; ret' <- addTickSyntaxExpr hpcSrcSpan (recS_ret_fn stmt) ; mfix' <- addTickSyntaxExpr hpcSrcSpan (recS_mfix_fn stmt) ; bind' <- addTickSyntaxExpr hpcSrcSpan (recS_bind_fn stmt) ; return (stmt { recS_s...
425
addTickCmdStmt stmt@(RecStmt {}) = do { stmts' <- addTickLCmdStmts (recS_stmts stmt) ; ret' <- addTickSyntaxExpr hpcSrcSpan (recS_ret_fn stmt) ; mfix' <- addTickSyntaxExpr hpcSrcSpan (recS_mfix_fn stmt) ; bind' <- addTickSyntaxExpr hpcSrcSpan (recS_bind_fn stmt) ; return (stmt { recS_s...
425
false
false
0
10
106
130
68
62
null
null
markwright/antlrc-examples
src/tapl/arith/Semantic.hs
bsd-3-clause
eval1 (TmIsZero _ (TmZero i)) = Just (TmTrue i)
47
eval1 (TmIsZero _ (TmZero i)) = Just (TmTrue i)
47
eval1 (TmIsZero _ (TmZero i)) = Just (TmTrue i)
47
false
false
0
9
8
32
15
17
null
null
jcgruenhage/dendrite
vendor/src/github.com/apache/thrift/test/hs/TestClient.hs
apache-2.0
parseFlags [] opts = Just opts
30
parseFlags [] opts = Just opts
30
parseFlags [] opts = Just opts
30
false
false
0
6
5
16
7
9
null
null
kearnh/HToyRayTracer
src/Object/Object.hs
bsd-3-clause
-- Finds the intersection with the smallest positive distance in a list of -- Intersections. closest :: [Intersection] -> Maybe Intersection closest [] = Nothing
161
closest :: [Intersection] -> Maybe Intersection closest [] = Nothing
68
closest [] = Nothing
20
true
true
0
6
24
28
15
13
null
null
ml9951/ghc
libraries/pastm/examples/multipleTVars.hs
bsd-3-clause
numIters = (1000 :: Int)
24
numIters = (1000 :: Int)
24
numIters = (1000 :: Int)
24
false
false
0
5
4
12
7
5
null
null
tlaitinen/servant-cookie-hmac-auth-example
src/Config.hs
bsd-3-clause
envPool :: Environment -> Int envPool Test = 1
46
envPool :: Environment -> Int envPool Test = 1
46
envPool Test = 1
16
false
true
0
7
8
24
10
14
null
null
balodja/sesyrel
src/Sesyrel/Texify.hs
bsd-3-clause
texify :: Texifiable a => a -> T.Text texify = T.toStrict . TB.toLazyText . texify'
83
texify :: Texifiable a => a -> T.Text texify = T.toStrict . TB.toLazyText . texify'
83
texify = T.toStrict . TB.toLazyText . texify'
45
false
true
0
7
14
36
18
18
null
null
bananu7/Turnip
src/Turnip/Eval/Eval.hs
mit
opOr :: Value -> AST.Expr -> LuaM [Value] opOr a rhs = do if coerceToBool [a] then return [a] else (:[]) <$> evalHead rhs
145
opOr :: Value -> AST.Expr -> LuaM [Value] opOr a rhs = do if coerceToBool [a] then return [a] else (:[]) <$> evalHead rhs
145
opOr a rhs = do if coerceToBool [a] then return [a] else (:[]) <$> evalHead rhs
103
false
true
0
10
47
68
35
33
null
null
termite2/tsl
Abstract/Predicate.hs
bsd-3-clause
avarWidth (AVarBool _) = 1
26
avarWidth (AVarBool _) = 1
26
avarWidth (AVarBool _) = 1
26
false
false
0
6
4
16
7
9
null
null
a-ford/notghc
Llvm/Types.hs
bsd-3-clause
i8 = LMInt 8
17
i8 = LMInt 8
17
i8 = LMInt 8
17
false
false
0
5
8
9
4
5
null
null
mjakob/hgrib
test/Data/GribSpec.hs
gpl-3.0
spec :: Spec spec = do describe "runGribIO" $ do it "should return the results of the actions" $ runGribIO testUuidPath (getLong "topLevel") `shouldReturn` [1, 2] it "should fail with DoesNotExistError for a non-existing file" $ runGribIO "doesnotexist" (return ()) `shouldThrow` isDoesNotExistErr...
4,778
spec :: Spec spec = do describe "runGribIO" $ do it "should return the results of the actions" $ runGribIO testUuidPath (getLong "topLevel") `shouldReturn` [1, 2] it "should fail with DoesNotExistError for a non-existing file" $ runGribIO "doesnotexist" (return ()) `shouldThrow` isDoesNotExistErr...
4,778
spec = do describe "runGribIO" $ do it "should return the results of the actions" $ runGribIO testUuidPath (getLong "topLevel") `shouldReturn` [1, 2] it "should fail with DoesNotExistError for a non-existing file" $ runGribIO "doesnotexist" (return ()) `shouldThrow` isDoesNotExistError it "s...
4,765
false
true
0
18
1,104
1,045
496
549
null
null
haBuu/tfs-website
Handler/User.hs
mit
postAddUserR :: Handler Html postAddUserR = do ((result, _), _) <- runFormPost newUserForm formHandler result $ \user -> do runDB $ insert_ =<< setPassword (fromJust $ userPassword user) user setMessageI MsgUserAdded redirect UsersR
246
postAddUserR :: Handler Html postAddUserR = do ((result, _), _) <- runFormPost newUserForm formHandler result $ \user -> do runDB $ insert_ =<< setPassword (fromJust $ userPassword user) user setMessageI MsgUserAdded redirect UsersR
246
postAddUserR = do ((result, _), _) <- runFormPost newUserForm formHandler result $ \user -> do runDB $ insert_ =<< setPassword (fromJust $ userPassword user) user setMessageI MsgUserAdded redirect UsersR
217
false
true
0
15
46
89
42
47
null
null
schell/blocks
src/App/Input.hs
bsd-3-clause
getKeyEventsBetween :: [Key] -> [Key] -> [InputEvent] getKeyEventsBetween = makeEventsBetween (KeyButtonDown, KeyButtonUp)
122
getKeyEventsBetween :: [Key] -> [Key] -> [InputEvent] getKeyEventsBetween = makeEventsBetween (KeyButtonDown, KeyButtonUp)
122
getKeyEventsBetween = makeEventsBetween (KeyButtonDown, KeyButtonUp)
68
false
true
0
9
11
43
22
21
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1608717 = 3454
34
getValueFromProduct 1608717 = 3454
34
getValueFromProduct 1608717 = 3454
34
false
false
0
5
3
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
-- | The ID of the 'ActivityTaskScheduled' event that was recorded when this -- activity task was scheduled. This information can be useful for -- diagnosing problems by tracing back the chain of events leading up to -- this event. attoeaScheduledEventId :: Lens' ActivityTaskTimedOutEventAttributes Integer attoeaSchedu...
403
attoeaScheduledEventId :: Lens' ActivityTaskTimedOutEventAttributes Integer attoeaScheduledEventId = lens _attoeaScheduledEventId (\ s a -> s{_attoeaScheduledEventId = a})
171
attoeaScheduledEventId = lens _attoeaScheduledEventId (\ s a -> s{_attoeaScheduledEventId = a})
95
true
true
0
9
55
43
25
18
null
null
krgn/hamdrill
src/Network/API/Mandrill/Exports.hs
mit
-- | Returns information about an export job. If the export job's state is -- 'complete', the returned data will include a URL you can use to fetch the -- results. Every export job produces a zip archive, but the format of the -- archive is distinct for each job type. The api calls that initiate exports -- include...
523
info :: (MonadIO m) => ExportId -> MandrillT m (Either ApiError Export) info i = performRequest "/exports/info.json" [ "id" .= i ]
146
info i = performRequest "/exports/info.json" [ "id" .= i ]
58
true
true
0
9
111
57
31
26
null
null
Mahdi89/eTeak
src/SimPN.hs
bsd-3-clause
teakR :: Chan -> MkPNMonad SimFlow SimValue () teakR (_, (outR, _outA)) = withLabel "R" $ do initPlace <- withLabel "init" $ newBlackPlace [token] withLabel "or" $ newTrans [initPlace] [outR] [PNLiteral token] return ()
247
teakR :: Chan -> MkPNMonad SimFlow SimValue () teakR (_, (outR, _outA)) = withLabel "R" $ do initPlace <- withLabel "init" $ newBlackPlace [token] withLabel "or" $ newTrans [initPlace] [outR] [PNLiteral token] return ()
243
teakR (_, (outR, _outA)) = withLabel "R" $ do initPlace <- withLabel "init" $ newBlackPlace [token] withLabel "or" $ newTrans [initPlace] [outR] [PNLiteral token] return ()
196
false
true
0
12
61
107
51
56
null
null
ezyang/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isEvaldUnfolding :: Unfolding -> Bool -- Returns True for OtherCon isEvaldUnfolding (OtherCon _) = True
141
isEvaldUnfolding :: Unfolding -> Bool isEvaldUnfolding (OtherCon _) = True
104
isEvaldUnfolding (OtherCon _) = True
66
true
true
0
7
52
25
13
12
null
null
andir/ganeti
src/Ganeti/Query/Common.hs
bsd-2-clause
-- | Hvparams optimised lookup map. hvParamTypes :: Map.Map String FieldType hvParamTypes = Map.map vTypeToQFT C.hvsParameterTypes
130
hvParamTypes :: Map.Map String FieldType hvParamTypes = Map.map vTypeToQFT C.hvsParameterTypes
94
hvParamTypes = Map.map vTypeToQFT C.hvsParameterTypes
53
true
true
0
6
15
28
14
14
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- LATIN SMALL LETTER E WITH CARON switch 'G' '>' = '\x011C'
60
switch 'G' '>' = '\x011C'
25
switch 'G' '>' = '\x011C'
25
true
false
0
5
11
12
6
6
null
null
rdnetto/powerline-hs
src/Rendering.hs
apache-2.0
toChunkFormatter "underline" = underline
40
toChunkFormatter "underline" = underline
40
toChunkFormatter "underline" = underline
40
false
false
0
5
3
9
4
5
null
null
ekr/tamarin-prover
lib/theory/src/Theory/Text/Pretty.hs
gpl-3.0
lineComment_ :: HighlightDocument d => String -> d lineComment_ = lineComment . text
84
lineComment_ :: HighlightDocument d => String -> d lineComment_ = lineComment . text
84
lineComment_ = lineComment . text
33
false
true
0
6
12
26
13
13
null
null
AlexanderPankiv/ghc
compiler/llvmGen/Llvm/Types.hs
bsd-3-clause
-- | Lower a variable of 'LMPointer' type. pVarLower :: LlvmVar -> LlvmVar pVarLower (LMGlobalVar s t l x a c) = LMGlobalVar s (pLower t) l x a c
145
pVarLower :: LlvmVar -> LlvmVar pVarLower (LMGlobalVar s t l x a c) = LMGlobalVar s (pLower t) l x a c
102
pVarLower (LMGlobalVar s t l x a c) = LMGlobalVar s (pLower t) l x a c
70
true
true
0
7
29
54
27
27
null
null
apunktbau/co4
src/CO4/THUtil.hs
gpl-3.0
lamE' :: Namelike n => [n] -> TH.Exp -> TH.Exp lamE' ns = TH.LamE $ map varP ns
79
lamE' :: Namelike n => [n] -> TH.Exp -> TH.Exp lamE' ns = TH.LamE $ map varP ns
79
lamE' ns = TH.LamE $ map varP ns
32
false
true
2
10
17
53
24
29
null
null
ulricha/dsh
src/Database/DSH/NKL/Quote.hs
bsd-3-clause
parseType :: String -> TypeQ parseType i = case parse typ "" i of Left e -> error $ show e Right t -> t
136
parseType :: String -> TypeQ parseType i = case parse typ "" i of Left e -> error $ show e Right t -> t
136
parseType i = case parse typ "" i of Left e -> error $ show e Right t -> t
107
false
true
0
9
57
60
26
34
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs
bsd-3-clause
ldProgram :: Program ldProgram = simpleProgram "ld"
51
ldProgram :: Program ldProgram = simpleProgram "ld"
51
ldProgram = simpleProgram "ld"
30
false
true
0
5
6
14
7
7
null
null
lukexi/ghc
compiler/codeGen/StgCmmLayout.hs
bsd-3-clause
directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind -- (directCall f n args) -- calls f(arg1, ..., argn), and applies the result to the remaining args -- The function f has arity n, and there are guaranteed at least n args -- Both arity and args include void args directCall conv lbl arity stg...
432
directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind directCall conv lbl arity stg_args = do { argreps <- getArgRepsAmodes stg_args ; direct_call "directCall" conv lbl arity argreps }
220
directCall conv lbl arity stg_args = do { argreps <- getArgRepsAmodes stg_args ; direct_call "directCall" conv lbl arity argreps }
141
true
true
0
9
83
73
38
35
null
null
facebookincubator/duckling
Duckling/Time/DA/Rules.hs
bsd-3-clause
ruleLastDayofweekOfTime :: Rule ruleLastDayofweekOfTime = Rule { name = "last <day-of-week> of <time>" , pattern = [ regex "sidste" , Predicate isADayOfWeek , regex "af|i" , dimension Time ] , prod = \tokens -> case tokens of (_:Token Time td1:_:Token Time td2:_) -> tt $ predLast...
353
ruleLastDayofweekOfTime :: Rule ruleLastDayofweekOfTime = Rule { name = "last <day-of-week> of <time>" , pattern = [ regex "sidste" , Predicate isADayOfWeek , regex "af|i" , dimension Time ] , prod = \tokens -> case tokens of (_:Token Time td1:_:Token Time td2:_) -> tt $ predLast...
353
ruleLastDayofweekOfTime = Rule { name = "last <day-of-week> of <time>" , pattern = [ regex "sidste" , Predicate isADayOfWeek , regex "af|i" , dimension Time ] , prod = \tokens -> case tokens of (_:Token Time td1:_:Token Time td2:_) -> tt $ predLastOf td1 td2 _ -> Nothing ...
321
false
true
0
17
99
118
61
57
null
null