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
GaloisInc/halvm-ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
-- | Represents the type constructor of parallel arrays -- -- * This must match the definition in @PrelPArr@ -- -- NB: Although the constructor is given here, it will not be accessible in -- user code as it is not in the environment of any compiled module except -- @PrelPArr@. -- parrTyCon :: TyCon parrTyCon ...
387
parrTyCon :: TyCon parrTyCon = pcNonRecDataTyCon parrTyConName Nothing alpha_tyvar [parrDataCon]
97
parrTyCon = pcNonRecDataTyCon parrTyConName Nothing alpha_tyvar [parrDataCon]
78
true
true
0
6
71
31
20
11
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1ConfigMapKeySelectorName' Lens v1ConfigMapKeySelectorNameL :: Lens_' V1ConfigMapKeySelector (Maybe Text) v1ConfigMapKeySelectorNameL f V1ConfigMapKeySelector{..} = (\v1ConfigMapKeySelectorName -> V1ConfigMapKeySelector { v1ConfigMapKeySelectorName, ..} ) <$> f v1ConfigMapKeySelectorName
295
v1ConfigMapKeySelectorNameL :: Lens_' V1ConfigMapKeySelector (Maybe Text) v1ConfigMapKeySelectorNameL f V1ConfigMapKeySelector{..} = (\v1ConfigMapKeySelectorName -> V1ConfigMapKeySelector { v1ConfigMapKeySelectorName, ..} ) <$> f v1ConfigMapKeySelectorName
256
v1ConfigMapKeySelectorNameL f V1ConfigMapKeySelector{..} = (\v1ConfigMapKeySelectorName -> V1ConfigMapKeySelector { v1ConfigMapKeySelectorName, ..} ) <$> f v1ConfigMapKeySelectorName
182
true
true
0
8
23
57
30
27
null
null
deepakjois/hs-logo
src/Logo/Builtins/Arithmetic.hs
bsd-3-clause
arctan _ = error "Invalid arguments for cos"
44
arctan _ = error "Invalid arguments for cos"
44
arctan _ = error "Invalid arguments for cos"
44
false
false
0
5
7
12
5
7
null
null
eric-stanley/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
configCompilerAux' :: ConfigFlags -> IO (Compiler, Platform, ProgramConfiguration) configCompilerAux' configFlags = configCompilerAuxEx configFlags --FIXME: make configCompilerAux use a sensible verbosity { configVerbosity = fmap lessVerbose (configVerbosity configFlags) }
302
configCompilerAux' :: ConfigFlags -> IO (Compiler, Platform, ProgramConfiguration) configCompilerAux' configFlags = configCompilerAuxEx configFlags --FIXME: make configCompilerAux use a sensible verbosity { configVerbosity = fmap lessVerbose (configVerbosity configFlags) }
302
configCompilerAux' configFlags = configCompilerAuxEx configFlags --FIXME: make configCompilerAux use a sensible verbosity { configVerbosity = fmap lessVerbose (configVerbosity configFlags) }
200
false
true
0
10
56
57
29
28
null
null
DavidAlphaFox/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Return a 403 permission denied page. permissionDeniedI :: (RenderMessage (HandlerSite m) msg, MonadHandler m) => msg -> m a permissionDeniedI msg = do mr <- getMessageRender permissionDenied $ mr msg -- | Return a 400 invalid arguments page.
291
permissionDeniedI :: (RenderMessage (HandlerSite m) msg, MonadHandler m) => msg -> m a permissionDeniedI msg = do mr <- getMessageRender permissionDenied $ mr msg -- | Return a 400 invalid arguments page.
249
permissionDeniedI msg = do mr <- getMessageRender permissionDenied $ mr msg -- | Return a 400 invalid arguments page.
126
true
true
0
8
84
63
31
32
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Event/PSQ.hs
bsd-3-clause
left, right :: LTree a -> LTree a left Start = moduleError "left" "empty loser tree"
100
left, right :: LTree a -> LTree a left Start = moduleError "left" "empty loser tree"
99
left Start = moduleError "left" "empty loser tree"
65
false
true
2
6
31
35
15
20
null
null
bitemyapp/sdl2
src/SDL/Video/Renderer.hs
bsd-3-clause
-- | Draw a line on the current rendering target. -- -- See @<https://wiki.libsdl.org/SDL_RenderDrawLine SDL_RenderDrawLine>@ for C documentation. renderDrawLine :: (Functor m,MonadIO m) => Renderer -> Point V2 CInt -- ^ The start point of the line -> Point V2 CInt -- ^ The ...
519
renderDrawLine :: (Functor m,MonadIO m) => Renderer -> Point V2 CInt -- ^ The start point of the line -> Point V2 CInt -- ^ The end point of the line -> m () renderDrawLine (Renderer r) (P (V2 x y)) (P (V2 x' y')) = throwIfNeg_ "SDL.Video.renderDrawLine" "SD...
372
renderDrawLine (Renderer r) (P (V2 x y)) (P (V2 x' y')) = throwIfNeg_ "SDL.Video.renderDrawLine" "SDL_RenderDrawLine" $ Raw.renderDrawLine r x y x' y'
154
true
true
0
14
137
128
62
66
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/Control.hs
mpl-2.0
-- | The walltime parameter specifies the wall clock time at which the -- specified slate change will occur. The value is specified in ISO 8601 -- (YYYY-MM-DDThh:mm:ss.sssZ) format. lbcWalltime :: Lens' LiveBroadcastsControl (Maybe UTCTime) lbcWalltime = lens _lbcWalltime (\ s a -> s{_lbcWalltime = a}) . mappin...
331
lbcWalltime :: Lens' LiveBroadcastsControl (Maybe UTCTime) lbcWalltime = lens _lbcWalltime (\ s a -> s{_lbcWalltime = a}) . mapping _DateTime
149
lbcWalltime = lens _lbcWalltime (\ s a -> s{_lbcWalltime = a}) . mapping _DateTime
90
true
true
0
10
56
57
30
27
null
null
flowbox-public/fgl
Data/Graph/Inductive/Query/BFS.hs
bsd-3-clause
suci c i = zip (suc' c) (repeat i)
34
suci c i = zip (suc' c) (repeat i)
34
suci c i = zip (suc' c) (repeat i)
34
false
false
0
7
8
28
13
15
null
null
acowley/ghc
compiler/typecheck/TcPatSyn.hs
bsd-3-clause
isUnidirectional ImplicitBidirectional = False
48
isUnidirectional ImplicitBidirectional = False
48
isUnidirectional ImplicitBidirectional = False
48
false
false
0
5
5
9
4
5
null
null
juhp/stack
src/Stack/Options/NewParser.hs
bsd-3-clause
-- | Parser for @stack new@. newOptsParser :: Parser (NewOpts,InitOpts) newOptsParser = (,) <$> newOpts <*> initOptsParser where newOpts = NewOpts <$> packageNameArgument (metavar "PACKAGE_NAME" <> help "A valid package name.") <*> switch (long "bare" <> ...
1,123
newOptsParser :: Parser (NewOpts,InitOpts) newOptsParser = (,) <$> newOpts <*> initOptsParser where newOpts = NewOpts <$> packageNameArgument (metavar "PACKAGE_NAME" <> help "A valid package name.") <*> switch (long "bare" <> help "Do not create a subdi...
1,094
newOptsParser = (,) <$> newOpts <*> initOptsParser where newOpts = NewOpts <$> packageNameArgument (metavar "PACKAGE_NAME" <> help "A valid package name.") <*> switch (long "bare" <> help "Do not create a subdirectory for the project") <*> optio...
1,051
true
true
0
15
420
156
75
81
null
null
MasseR/RedditWallpaper
RedditWallpaper.hs
bsd-3-clause
withFile :: FilePath -> (Handle -> IO ()) -> IO () withFile path f = bracket (openTempFile "/tmp" "img.png") (\(p,h) -> hClose h >> copyFile p path >> removeFile p) (\(_,h) -> f h)
186
withFile :: FilePath -> (Handle -> IO ()) -> IO () withFile path f = bracket (openTempFile "/tmp" "img.png") (\(p,h) -> hClose h >> copyFile p path >> removeFile p) (\(_,h) -> f h)
186
withFile path f = bracket (openTempFile "/tmp" "img.png") (\(p,h) -> hClose h >> copyFile p path >> removeFile p) (\(_,h) -> f h)
135
false
true
0
10
39
108
54
54
null
null
ducis/scraper-dsl-open-snapshot
Example.hs
gpl-2.0
priority AddOp = 2
21
priority AddOp = 2
21
priority AddOp = 2
21
false
false
0
5
6
9
4
5
null
null
michaelt/streaming-bytestring
Data/ByteString/Streaming.hs
bsd-3-clause
{-| /O(n)/ Convert an effectful byte stream into a single lazy 'ByteString' with the same internal chunk structure. See @toLazy@ which preserve connectedness by keeping the return value of the effectful bytestring. -} toLazy_ :: Monad m => ByteString m r -> m BI.ByteString toLazy_ bs = dematerialize bs ...
424
toLazy_ :: Monad m => ByteString m r -> m BI.ByteString toLazy_ bs = dematerialize bs (\_ -> return (BI.Empty)) (\b mx -> liftM (BI.Chunk b) mx) join
197
toLazy_ bs = dematerialize bs (\_ -> return (BI.Empty)) (\b mx -> liftM (BI.Chunk b) mx) join
141
true
true
0
10
117
92
43
49
null
null
lamefun/haddock
haddock-api/src/Haddock/Backends/LaTeX.hs
bsd-2-clause
tyvarNames :: LHsTyVarBndrs DocName -> [Name] tyvarNames = map getName . hsLTyVarNames
86
tyvarNames :: LHsTyVarBndrs DocName -> [Name] tyvarNames = map getName . hsLTyVarNames
86
tyvarNames = map getName . hsLTyVarNames
40
false
true
0
6
11
28
14
14
null
null
nickng/gong
GoTypes.hs
apache-2.0
checkFinite debug defEnv pRecs ys zs cDef (OChoice l) = do foldM (\acc t -> do b <- checkFinite debug defEnv pRecs ys zs cDef t return $ b && acc) True l
276
checkFinite debug defEnv pRecs ys zs cDef (OChoice l) = do foldM (\acc t -> do b <- checkFinite debug defEnv pRecs ys zs cDef t return $ b && acc) True l
276
checkFinite debug defEnv pRecs ys zs cDef (OChoice l) = do foldM (\acc t -> do b <- checkFinite debug defEnv pRecs ys zs cDef t return $ b && acc) True l
276
false
false
0
13
155
81
38
43
null
null
Ferdinand-vW/sessiontypes
src/Control/SessionTypes/Debug.hs
gpl-3.0
rec64 = rec32 . rec32
21
rec64 = rec32 . rec32
21
rec64 = rec32 . rec32
21
false
false
2
5
4
15
5
10
null
null
SwiftsNamesake/Southpaw
lib/Southpaw/Picasso/Palette.hs
mit
sgibrightgray = (0.77254900, 0.75686300, 0.66666700, 1.0)
64
sgibrightgray = (0.77254900, 0.75686300, 0.66666700, 1.0)
64
sgibrightgray = (0.77254900, 0.75686300, 0.66666700, 1.0)
64
false
false
0
5
12
18
11
7
null
null
DavidAlphaFox/darcs
src/Darcs/Repository/Format.hs
gpl-2.0
noWorkingDirFormat, rebaseInProgressFormat :: String darcs1Format = "darcs-1.0"
80
noWorkingDirFormat, rebaseInProgressFormat :: String darcs1Format = "darcs-1.0"
79
darcs1Format = "darcs-1.0"
26
false
true
2
6
7
21
8
13
null
null
ant0nsc/bond
compiler/src/Language/Bond/Codegen/TypeMapping.hs
mit
-- | Returns the namespace for the 'MappingContext'. The namespace may be -- different than specified in the schema definition file due to -- <#namespace-mapping namespace mapping>. getNamespace :: MappingContext -> QualifiedName getNamespace c@MappingContext {..} = resolveNamespace c namespaces
296
getNamespace :: MappingContext -> QualifiedName getNamespace c@MappingContext {..} = resolveNamespace c namespaces
114
getNamespace c@MappingContext {..} = resolveNamespace c namespaces
66
true
true
3
5
38
36
20
16
null
null
intolerable/dota2
src/WebAPI/Dota.hs
bsd-3-clause
getHeroMap :: MonadIO m => WebAPIT m (Map HeroID Hero) getHeroMap = do HeroListing hs <- getHeroes return $ Map.fromList $ map (\x -> (view identifier x, x)) hs
164
getHeroMap :: MonadIO m => WebAPIT m (Map HeroID Hero) getHeroMap = do HeroListing hs <- getHeroes return $ Map.fromList $ map (\x -> (view identifier x, x)) hs
164
getHeroMap = do HeroListing hs <- getHeroes return $ Map.fromList $ map (\x -> (view identifier x, x)) hs
109
false
true
0
12
32
78
38
40
null
null
beala/regexpand
src/Regex.hs
mit
reduceRichRegex RichEmpty = Empty
33
reduceRichRegex RichEmpty = Empty
33
reduceRichRegex RichEmpty = Empty
33
false
false
0
4
3
10
4
6
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.Lazy.hs
bsd-3-clause
-- | Map a function over a 'ByteString' and concatenate the results concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString concatMap _ Empty = Empty
163
concatMap :: (Word8 -> ByteString) -> ByteString -> ByteString concatMap _ Empty = Empty
95
concatMap _ Empty = Empty
32
true
true
0
7
32
32
17
15
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/CLI/FileTree/Parser.hs
mit
fileTrees :: IndentStream s Char => IndentParser s u [FileTree] fileTrees = skipToBOL *> option [] (same *> block fileTree)
123
fileTrees :: IndentStream s Char => IndentParser s u [FileTree] fileTrees = skipToBOL *> option [] (same *> block fileTree)
123
fileTrees = skipToBOL *> option [] (same *> block fileTree)
59
false
true
0
9
19
51
25
26
null
null
pbv/codex
src/Codex/Page.hs
mit
docWarnings msgs = Pandoc mempty [Div ("", ["warnings"], []) [Para [Str "WARNING:", Space, Str (show msg)] | msg <- msgs]]
134
docWarnings msgs = Pandoc mempty [Div ("", ["warnings"], []) [Para [Str "WARNING:", Space, Str (show msg)] | msg <- msgs]]
134
docWarnings msgs = Pandoc mempty [Div ("", ["warnings"], []) [Para [Str "WARNING:", Space, Str (show msg)] | msg <- msgs]]
134
false
false
0
12
31
72
37
35
null
null
chreekat/yesod
yesod-core/test/YesodCoreTest/CleanPath.hs
bsd-2-clause
runner :: Session () -> IO () runner f = toWaiApp Y >>= runSession f
68
runner :: Session () -> IO () runner f = toWaiApp Y >>= runSession f
68
runner f = toWaiApp Y >>= runSession f
38
false
true
0
7
14
38
17
21
null
null
matthewleon/libmpd-haskell
src/Network/MPD/Applicative/Output.hs
mit
-- | Get information about all available output devices. outputs :: Command [Device] outputs = Command (liftParser parseOutputs) ["outputs"]
140
outputs :: Command [Device] outputs = Command (liftParser parseOutputs) ["outputs"]
83
outputs = Command (liftParser parseOutputs) ["outputs"]
55
true
true
0
7
18
32
17
15
null
null
seereason/cabal
cabal-install/Distribution/Client/IndexUtils.hs
bsd-3-clause
readIndexCacheEntry :: BSS.ByteString -> Maybe IndexCacheEntry readIndexCacheEntry = \line -> case BSS.words line of [key, pkgnamestr, pkgverstr, sep, blocknostr] | key == BSS.pack packageKey && sep == BSS.pack blocknoKey -> case (parseName pkgnamestr, parseVer pkgverstr [], parseBlockNo b...
1,772
readIndexCacheEntry :: BSS.ByteString -> Maybe IndexCacheEntry readIndexCacheEntry = \line -> case BSS.words line of [key, pkgnamestr, pkgverstr, sep, blocknostr] | key == BSS.pack packageKey && sep == BSS.pack blocknoKey -> case (parseName pkgnamestr, parseVer pkgverstr [], parseBlockNo b...
1,772
readIndexCacheEntry = \line -> case BSS.words line of [key, pkgnamestr, pkgverstr, sep, blocknostr] | key == BSS.pack packageKey && sep == BSS.pack blocknoKey -> case (parseName pkgnamestr, parseVer pkgverstr [], parseBlockNo blocknostr) of (Just pkgname, Just pkgver, Just blockno)...
1,709
false
true
3
20
552
588
287
301
null
null
yairchu/peakachu
src/Control/Concurrent/MVar/YC.hs
bsd-3-clause
writeMVar :: MVar a -> a -> IO () writeMVar mvar = modifyMVarPure mvar . const
78
writeMVar :: MVar a -> a -> IO () writeMVar mvar = modifyMVarPure mvar . const
78
writeMVar mvar = modifyMVarPure mvar . const
44
false
true
0
9
15
41
18
23
null
null
andreagenso/java2scala
src/J2s/Ast/Syntax.hs
apache-2.0
sem_PrimaryNNA_PrimNNATypeClassPrimitiveType = PrimNNATypeClassPrimitiveType
77
sem_PrimaryNNA_PrimNNATypeClassPrimitiveType = PrimNNATypeClassPrimitiveType
77
sem_PrimaryNNA_PrimNNATypeClassPrimitiveType = PrimNNATypeClassPrimitiveType
77
false
false
0
4
3
6
3
3
null
null
rightfold/snek
src/SNEK/Type.hs
bsd-3-clause
(~->~) :: T -> T -> T t ~->~ u = ApplyT (ApplyT FuncT t) u
58
(~->~) :: T -> T -> T t ~->~ u = ApplyT (ApplyT FuncT t) u
58
t ~->~ u = ApplyT (ApplyT FuncT t) u
36
false
true
0
9
15
41
20
21
null
null
limansky/wbxml
src/Wbxml/Tables.hs
bsd-3-clause
wtawml12AttrValueTable :: WbxmlAttrValueTable wtawml12AttrValueTable = -- Code Page 0 (WML 1.2) [ (0x00, [ (0x85, ".com/") , (0x86, ".edu/") , (0x87, ".net/") , (0x88, ".org/") , (0x89, "accept") , (0x8a, "bottom") , (0x8b, "clear") ...
1,004
wtawml12AttrValueTable :: WbxmlAttrValueTable wtawml12AttrValueTable = -- Code Page 0 (WML 1.2) [ (0x00, [ (0x85, ".com/") , (0x86, ".edu/") , (0x87, ".net/") , (0x88, ".org/") , (0x89, "accept") , (0x8a, "bottom") , (0x8b, "clear") ...
1,004
wtawml12AttrValueTable = -- Code Page 0 (WML 1.2) [ (0x00, [ (0x85, ".com/") , (0x86, ".edu/") , (0x87, ".net/") , (0x88, ".org/") , (0x89, "accept") , (0x8a, "bottom") , (0x8b, "clear") , (0x8c, "delete") , ...
958
false
true
0
8
458
264
175
89
null
null
bitemyapp/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- Adds a newline defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () defaultLogActionHPutStrDoc dflags h d sty = Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc where -- Don't add a newline at the end, so that successive -- calls to this log-action can output all on t...
381
defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () defaultLogActionHPutStrDoc dflags h d sty = Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc where -- Don't add a newline at the end, so that successive -- calls to this log-action can output all on the same line do...
362
defaultLogActionHPutStrDoc dflags h d sty = Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc where -- Don't add a newline at the end, so that successive -- calls to this log-action can output all on the same line doc = runSDoc d (initSDocContext dflags sty)
284
true
true
1
10
79
87
42
45
null
null
utdemir/wai
warp/Network/Wai/Handler/Warp/Types.hs
mit
timeoutManager0 :: InternalInfo0 -> T.Manager timeoutManager0 (InternalInfo0 tm _ _ _) = tm
91
timeoutManager0 :: InternalInfo0 -> T.Manager timeoutManager0 (InternalInfo0 tm _ _ _) = tm
91
timeoutManager0 (InternalInfo0 tm _ _ _) = tm
45
false
true
0
6
12
36
17
19
null
null
yiannist/ganeti
src/Ganeti/HTools/Node.hs
bsd-2-clause
calcNewFreeSpindlesForth :: Bool -- Action: True = adding instance, -- False = removing -> Node -> Instance.Instance -> Int calcNewFreeSpindlesForth _ (Node {exclStorage = False}) _ = 0
251
calcNewFreeSpindlesForth :: Bool -- Action: True = adding instance, -- False = removing -> Node -> Instance.Instance -> Int calcNewFreeSpindlesForth _ (Node {exclStorage = False}) _ = 0
251
calcNewFreeSpindlesForth _ (Node {exclStorage = False}) _ = 0
61
false
true
0
9
93
46
25
21
null
null
DavidAlphaFox/ghc
libraries/hoopl/src/Compiler/Hoopl/Graph.hs
bsd-3-clause
gUnitCC :: NonLocal (block n) => block n C C -> Graph' block n C C gUnitOO b = GUnit b
86
gUnitCC :: NonLocal (block n) => block n C C -> Graph' block n C C gUnitOO b = GUnit b
86
gUnitOO b = GUnit b
19
false
true
0
8
20
50
23
27
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2540 = 2539
11
2540 = 2539
11
2540 = 2539
11
false
false
1
5
2
10
3
7
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Constants.hs
bsd-2-clause
-- * 'autoconf' enable/disable enableConfd :: Bool enableConfd = AutoConf.enableConfd
86
enableConfd :: Bool enableConfd = AutoConf.enableConfd
54
enableConfd = AutoConf.enableConfd
34
true
true
0
5
10
14
8
6
null
null
myuon/hakoniwa
src/main.hs
mit
ix :: (ToAny b, FromAny b) => Int -> Lens' (IM.IntMap b) b ix n = lens (IM.! n) (\l x -> IM.insert n x l)
105
ix :: (ToAny b, FromAny b) => Int -> Lens' (IM.IntMap b) b ix n = lens (IM.! n) (\l x -> IM.insert n x l)
105
ix n = lens (IM.! n) (\l x -> IM.insert n x l)
46
false
true
0
11
25
82
40
42
null
null
tekul/cryptonite
Crypto/Data/AFIS.hs
bsd-3-clause
split hashAlg rng expandTimes src | expandTimes <= 1 = error "invalid expandTimes value" | otherwise = unsafeDoIO $ do (rng', bs) <- B.allocRet diffusedLen runOp return (bs, rng') where diffusedLen = blockSize * expandTimes blockSize = B.length src runOp dstPtr = do ...
1,187
split hashAlg rng expandTimes src | expandTimes <= 1 = error "invalid expandTimes value" | otherwise = unsafeDoIO $ do (rng', bs) <- B.allocRet diffusedLen runOp return (bs, rng') where diffusedLen = blockSize * expandTimes blockSize = B.length src runOp dstPtr = do ...
1,187
split hashAlg rng expandTimes src | expandTimes <= 1 = error "invalid expandTimes value" | otherwise = unsafeDoIO $ do (rng', bs) <- B.allocRet diffusedLen runOp return (bs, rng') where diffusedLen = blockSize * expandTimes blockSize = B.length src runOp dstPtr = do ...
1,187
false
false
3
14
347
360
163
197
null
null
brendanhay/gogol
gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/Reset.hs
mpl-2.0
-- | Creates a value of 'ScoresReset' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'srXgafv' -- -- * 'srUploadProtocol' -- -- * 'srAccessToken' -- -- * 'srUploadType' -- -- * 'srLeaderboardId' -- -- * 'srCallback' scoresReset ::...
611
scoresReset :: Text -- ^ 'srLeaderboardId' -> ScoresReset scoresReset pSrLeaderboardId_ = ScoresReset' { _srXgafv = Nothing , _srUploadProtocol = Nothing , _srAccessToken = Nothing , _srUploadType = Nothing , _srLeaderboardId = pSrLeaderboardId_ , _srCallback = Nothing }
309
scoresReset pSrLeaderboardId_ = ScoresReset' { _srXgafv = Nothing , _srUploadProtocol = Nothing , _srAccessToken = Nothing , _srUploadType = Nothing , _srLeaderboardId = pSrLeaderboardId_ , _srCallback = Nothing }
243
true
true
0
7
128
81
52
29
null
null
ony/hledger
hledger-lib/Hledger/Query.hs
gpl-3.0
filterQuery' p (Or qs) = Or $ map (filterQuery p) qs
52
filterQuery' p (Or qs) = Or $ map (filterQuery p) qs
52
filterQuery' p (Or qs) = Or $ map (filterQuery p) qs
52
false
false
0
8
10
34
15
19
null
null
aisamanra/activitystreams-aeson
Codec/ActivityStream/Schema.hs
bsd-3-clause
-- | An Array of other Task objects that are superseded by this task object. tsSupersedes :: Lens' Object (Maybe [Object]) tsSupersedes = makeAesonLensMb "supersedes" oRest
172
tsSupersedes :: Lens' Object (Maybe [Object]) tsSupersedes = makeAesonLensMb "supersedes" oRest
95
tsSupersedes = makeAesonLensMb "supersedes" oRest
49
true
true
0
8
25
31
16
15
null
null
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/System/Tuner/Algebraic.hs
bsd-3-clause
seqSpecification :: Handle -> (String -> Int) -> PSpec -> String -> IO () seqSpecification hout find' spec st = do hPrint hout (2 :: Int) -- # of constructors writeListLn hout ([] :: [Int]) -- empty sequence constructor let offset = 1 + numFreqs spec writeListLn hout [ (1, offset + find' st) :: (Int, I...
394
seqSpecification :: Handle -> (String -> Int) -> PSpec -> String -> IO () seqSpecification hout find' spec st = do hPrint hout (2 :: Int) -- # of constructors writeListLn hout ([] :: [Int]) -- empty sequence constructor let offset = 1 + numFreqs spec writeListLn hout [ (1, offset + find' st) :: (Int, In...
393
seqSpecification hout find' spec st = do hPrint hout (2 :: Int) -- # of constructors writeListLn hout ([] :: [Int]) -- empty sequence constructor let offset = 1 + numFreqs spec writeListLn hout [ (1, offset + find' st) :: (Int, Int) , (1, offset + numTypes spec + find' st) ] -- cons constructor
319
false
true
0
12
94
156
81
75
null
null
shlevy/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getOperand (CmmLoad mem pk) = do is32Bit <- is32BitPlatform use_sse2 <- sse2Enabled if (not (isFloatType pk) || use_sse2) && (if is32Bit then not (isWord64 pk) else True) then do Amode src mem_code <- getAmode mem return (OpAddr src, mem_code) else getOperand_generic (CmmLoad mem pk...
321
getOperand (CmmLoad mem pk) = do is32Bit <- is32BitPlatform use_sse2 <- sse2Enabled if (not (isFloatType pk) || use_sse2) && (if is32Bit then not (isWord64 pk) else True) then do Amode src mem_code <- getAmode mem return (OpAddr src, mem_code) else getOperand_generic (CmmLoad mem pk...
321
getOperand (CmmLoad mem pk) = do is32Bit <- is32BitPlatform use_sse2 <- sse2Enabled if (not (isFloatType pk) || use_sse2) && (if is32Bit then not (isWord64 pk) else True) then do Amode src mem_code <- getAmode mem return (OpAddr src, mem_code) else getOperand_generic (CmmLoad mem pk...
321
false
false
0
13
80
124
59
65
null
null
beni55/combinatorrent
src/Process/PeerMgr.hs
bsd-2-clause
addPeer :: (InfoHash, Peer) -> Process CF ST ThreadId addPeer (ih, (Peer addr)) = do ppid <- gets peerId pool <- asks peerPool mgrC <- asks mgrCh cm <- gets cmMap v <- asks chokeRTV liftIO $ connect (addr, ppid, ih) pool mgrC v cm
259
addPeer :: (InfoHash, Peer) -> Process CF ST ThreadId addPeer (ih, (Peer addr)) = do ppid <- gets peerId pool <- asks peerPool mgrC <- asks mgrCh cm <- gets cmMap v <- asks chokeRTV liftIO $ connect (addr, ppid, ih) pool mgrC v cm
259
addPeer (ih, (Peer addr)) = do ppid <- gets peerId pool <- asks peerPool mgrC <- asks mgrCh cm <- gets cmMap v <- asks chokeRTV liftIO $ connect (addr, ppid, ih) pool mgrC v cm
205
false
true
0
9
73
120
57
63
null
null
drets/scheme-haskell-48h
src/Scheme/Parser.hs
bsd-3-clause
parseNumberWithRadix :: Parser LispValue parseNumberWithRadix = choice [ char 'o' >> parseOctal , char 'b' >> parseBinary , char 'x' >> parseHex , char 'd' >> parseDecimal ]
211
parseNumberWithRadix :: Parser LispValue parseNumberWithRadix = choice [ char 'o' >> parseOctal , char 'b' >> parseBinary , char 'x' >> parseHex , char 'd' >> parseDecimal ]
211
parseNumberWithRadix = choice [ char 'o' >> parseOctal , char 'b' >> parseBinary , char 'x' >> parseHex , char 'd' >> parseDecimal ]
170
false
true
0
7
65
57
28
29
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE :: Int wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE
96
wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE :: Int wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE
96
wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE
56
false
true
0
4
5
11
6
5
null
null
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/List.hs
mpl-2.0
-- | Identifies the user in the API request. The value can be the user\'s -- primary email address, alias email address, or unique user ID. tlUserKey :: Lens' TokensList Text tlUserKey = lens _tlUserKey (\ s a -> s{_tlUserKey = a})
233
tlUserKey :: Lens' TokensList Text tlUserKey = lens _tlUserKey (\ s a -> s{_tlUserKey = a})
93
tlUserKey = lens _tlUserKey (\ s a -> s{_tlUserKey = a})
58
true
true
0
9
43
48
24
24
null
null
DavidAlphaFox/bittorrent
tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs
bsd-3-clause
isSomeException :: SomeException -> Bool isSomeException _ = True
65
isSomeException :: SomeException -> Bool isSomeException _ = True
65
isSomeException _ = True
24
false
true
0
5
8
18
9
9
null
null
dnvriend/study-category-theory
haskell/learn_a_haskell/ch1/baby.hs
apache-2.0
-- plot (PNG "tan.png") tan -- plot (PNG "sin.png") sin -- plot (PNG "cos.png") cos main :: IO () main = do echo "doubleMe 5: " $ show $ doubleMe 5 echo "doubleSmallNumber 100: " $ show $ doubleSmallNumber 100 echo "doubleSmallNumber 101: " $ show $ doubleSmallNumber 101 echo "conc...
832
main :: IO () main = do echo "doubleMe 5: " $ show $ doubleMe 5 echo "doubleSmallNumber 100: " $ show $ doubleSmallNumber 100 echo "doubleSmallNumber 101: " $ show $ doubleSmallNumber 101 echo "concat' [1,2] [3,4]: " $ show $ concat' [1,2] [3,4] echo "length' [1,2,3]: " $ show $ lengt...
738
main = do echo "doubleMe 5: " $ show $ doubleMe 5 echo "doubleSmallNumber 100: " $ show $ doubleSmallNumber 100 echo "doubleSmallNumber 101: " $ show $ doubleSmallNumber 101 echo "concat' [1,2] [3,4]: " $ show $ concat' [1,2] [3,4] echo "length' [1,2,3]: " $ show $ length' [1,2,3] ...
724
true
true
0
10
222
282
138
144
null
null
timthelion/haskarrow
dist/build/autogen/Paths_haskarrow.hs
gpl-3.0
getDataDir = catchIO (getEnv "haskarrow_datadir") (\_ -> return datadir)
72
getDataDir = catchIO (getEnv "haskarrow_datadir") (\_ -> return datadir)
72
getDataDir = catchIO (getEnv "haskarrow_datadir") (\_ -> return datadir)
72
false
false
1
8
8
32
14
18
null
null
lslah/kis-proto
test/KisSpec.hs
bsd-3-clause
customKis :: Kis IO customKis = Kis customKisFunction realTimeClock
71
customKis :: Kis IO customKis = Kis customKisFunction realTimeClock
71
customKis = Kis customKisFunction realTimeClock
51
false
true
0
5
12
19
9
10
null
null
ramaciotti/dependent-types
src/lib/DependentTypes/Semantic.hs
gpl-3.0
evalToplevel action env print@(Print exp) = do e <- readIORef env evalExp <- forM exp $ evalExpression e action $ showExpressions evalExp -- | Checks if a signature for a type is valid.
192
evalToplevel action env print@(Print exp) = do e <- readIORef env evalExp <- forM exp $ evalExpression e action $ showExpressions evalExp -- | Checks if a signature for a type is valid.
192
evalToplevel action env print@(Print exp) = do e <- readIORef env evalExp <- forM exp $ evalExpression e action $ showExpressions evalExp -- | Checks if a signature for a type is valid.
192
false
false
0
9
39
60
27
33
null
null
phischu/animations
src/BallExample.hs
bsd-3-clause
collision :: Wall -> Ball -> Push Collision collision (HorizontalWall p1) (Ball (V2 x1 _) (V2 v1 _)) = case compare v1 0 of GT -> let t = (p1 - x1 - ballRadius) / v1 in waitForeverIfPast t HorizontalCollision EQ -> waitForever LT -> let t = (p1 - x1 + ballRadius) / v1 in waitForeverIfPast t Ho...
337
collision :: Wall -> Ball -> Push Collision collision (HorizontalWall p1) (Ball (V2 x1 _) (V2 v1 _)) = case compare v1 0 of GT -> let t = (p1 - x1 - ballRadius) / v1 in waitForeverIfPast t HorizontalCollision EQ -> waitForever LT -> let t = (p1 - x1 + ballRadius) / v1 in waitForeverIfPast t Ho...
337
collision (HorizontalWall p1) (Ball (V2 x1 _) (V2 v1 _)) = case compare v1 0 of GT -> let t = (p1 - x1 - ballRadius) / v1 in waitForeverIfPast t HorizontalCollision EQ -> waitForever LT -> let t = (p1 - x1 + ballRadius) / v1 in waitForeverIfPast t HorizontalCollision
293
false
true
3
13
84
151
71
80
null
null
ezyang/ghc
testsuite/tests/simplCore/should_compile/T13543.hs
bsd-3-clause
g (p,q) = p+q
13
g (p,q) = p+q
13
g (p,q) = p+q
13
false
false
0
5
3
20
10
10
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
datatypeClassName = clsQual gHC_GENERICS (fsLit "Datatype") datatypeClassKey
82
datatypeClassName = clsQual gHC_GENERICS (fsLit "Datatype") datatypeClassKey
82
datatypeClassName = clsQual gHC_GENERICS (fsLit "Datatype") datatypeClassKey
82
false
false
0
7
12
19
9
10
null
null
itteerde/OpenCourseWare
Computer Science/Programming Languages/Haskell/Haskell - the craft of functional programming/FirstScript.hs
unlicense
doublesquare :: Integer -> Integer doublesquare n = double ( square (n))
72
doublesquare :: Integer -> Integer doublesquare n = double ( square (n))
72
doublesquare n = double ( square (n))
37
false
true
0
8
11
30
15
15
null
null
xicesky/sky-haskell-playground
src/Sky/Ideas/Types.hs
bsd-3-clause
showSTypeConstructor :: TypeConstructor -> ShowS showSTypeConstructor (_, name) = showString name
97
showSTypeConstructor :: TypeConstructor -> ShowS showSTypeConstructor (_, name) = showString name
97
showSTypeConstructor (_, name) = showString name
48
false
true
0
6
10
27
14
13
null
null
romanb/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/CreateClusterParameterGroup.hs
mpl-2.0
-- | A description of the parameter group. ccpgDescription :: Lens' CreateClusterParameterGroup Text ccpgDescription = lens _ccpgDescription (\s a -> s { _ccpgDescription = a })
177
ccpgDescription :: Lens' CreateClusterParameterGroup Text ccpgDescription = lens _ccpgDescription (\s a -> s { _ccpgDescription = a })
134
ccpgDescription = lens _ccpgDescription (\s a -> s { _ccpgDescription = a })
76
true
true
0
9
25
40
22
18
null
null
nh2/quickcheck
Test/QuickCheck/Function.hs
bsd-3-clause
shrinkFun :: (c -> [c]) -> (a :-> c) -> [a :-> c] shrinkFun shr (Pair p) = [ pair p' | p' <- shrinkFun (\q -> shrinkFun shr q) p ] where pair Nil = Nil pair p = Pair p
176
shrinkFun :: (c -> [c]) -> (a :-> c) -> [a :-> c] shrinkFun shr (Pair p) = [ pair p' | p' <- shrinkFun (\q -> shrinkFun shr q) p ] where pair Nil = Nil pair p = Pair p
176
shrinkFun shr (Pair p) = [ pair p' | p' <- shrinkFun (\q -> shrinkFun shr q) p ] where pair Nil = Nil pair p = Pair p
126
false
true
0
11
50
108
55
53
null
null
bananu7/Turnip
Test/TestParser.hs
mit
spec :: Spec spec = do describe "Parser.parseLua" $ do describe "literals" $ do it "should parse integers" $ parse "return 5" `shouldBe` Block [Return [Number 5.0]] describe "should parse decimals" $ do it "regular decimal" $ parse "return 4.2" `shouldBe` Block [Retur...
11,960
spec :: Spec spec = do describe "Parser.parseLua" $ do describe "literals" $ do it "should parse integers" $ parse "return 5" `shouldBe` Block [Return [Number 5.0]] describe "should parse decimals" $ do it "regular decimal" $ parse "return 4.2" `shouldBe` Block [Retur...
11,960
spec = do describe "Parser.parseLua" $ do describe "literals" $ do it "should parse integers" $ parse "return 5" `shouldBe` Block [Return [Number 5.0]] describe "should parse decimals" $ do it "regular decimal" $ parse "return 4.2" `shouldBe` Block [Return [Number 4.2...
11,947
false
true
0
29
4,310
3,886
1,921
1,965
null
null
MedeaMelana/custard
Mud.hs
bsd-3-clause
prompt :: Id Player -> Mud () prompt p = do computePrompt <- getA (mPlayers .> byId p .> pContext .> cPrompt) computePrompt >>= tell p
138
prompt :: Id Player -> Mud () prompt p = do computePrompt <- getA (mPlayers .> byId p .> pContext .> cPrompt) computePrompt >>= tell p
138
prompt p = do computePrompt <- getA (mPlayers .> byId p .> pContext .> cPrompt) computePrompt >>= tell p
108
false
true
0
14
29
69
30
39
null
null
forste/haReFork
refactorer/RefacDupTrans.hs
bsd-3-clause
compareExp pats e@(Exp (HsParen e1)) (Exp (HsParen e2)) = Exp (HsParen (compareExp pats e1 e2))
96
compareExp pats e@(Exp (HsParen e1)) (Exp (HsParen e2)) = Exp (HsParen (compareExp pats e1 e2))
96
compareExp pats e@(Exp (HsParen e1)) (Exp (HsParen e2)) = Exp (HsParen (compareExp pats e1 e2))
96
false
false
0
9
15
64
29
35
null
null
aartifact/aartifact-verifier
src/ContextRelations.hs
mit
considRels (e0@(App e1 e2)) (aux,eqs,rs) = let ([i0,i1,i2], eqs') = ixsEqv [e0,e1,e2] eqs in [(PW $ SLC Eql Apply, [i0,i1,i2])] |=> (aux,eqs', rs)
150
considRels (e0@(App e1 e2)) (aux,eqs,rs) = let ([i0,i1,i2], eqs') = ixsEqv [e0,e1,e2] eqs in [(PW $ SLC Eql Apply, [i0,i1,i2])] |=> (aux,eqs', rs)
150
considRels (e0@(App e1 e2)) (aux,eqs,rs) = let ([i0,i1,i2], eqs') = ixsEqv [e0,e1,e2] eqs in [(PW $ SLC Eql Apply, [i0,i1,i2])] |=> (aux,eqs', rs)
150
false
false
0
11
26
115
66
49
null
null
daleooo/barrelfish
tools/flounder/RPCClient.hs
mit
------------------------------------------------------------------------ -- Language mapping: C identifier names ------------------------------------------------------------------------ -- Name of the binding struct rpc_bind_type :: String -> String rpc_bind_type ifn = ifscope ifn "rpc_client"
295
rpc_bind_type :: String -> String rpc_bind_type ifn = ifscope ifn "rpc_client"
78
rpc_bind_type ifn = ifscope ifn "rpc_client"
44
true
true
0
5
25
27
15
12
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxDB_GRANT_SELECT :: Int wxDB_GRANT_SELECT = 1
46
wxDB_GRANT_SELECT :: Int wxDB_GRANT_SELECT = 1
46
wxDB_GRANT_SELECT = 1
21
false
true
0
6
5
18
7
11
null
null
MichielDerhaeg/stack
src/Stack/SetupCmd.hs
bsd-3-clause
cabalUpgradeParser :: OA.Parser UpgradeTo cabalUpgradeParser = Specific <$> version' <|> latestParser where versionReader = do s <- OA.readerAsk case parseVersion (T.pack s) of Nothing -> OA.readerError $ "Invalid version: " ++ s Just v -> return v ...
633
cabalUpgradeParser :: OA.Parser UpgradeTo cabalUpgradeParser = Specific <$> version' <|> latestParser where versionReader = do s <- OA.readerAsk case parseVersion (T.pack s) of Nothing -> OA.readerError $ "Invalid version: " ++ s Just v -> return v ...
633
cabalUpgradeParser = Specific <$> version' <|> latestParser where versionReader = do s <- OA.readerAsk case parseVersion (T.pack s) of Nothing -> OA.readerError $ "Invalid version: " ++ s Just v -> return v version' = OA.option versionReader (...
591
false
true
2
12
207
160
73
87
null
null
mcmaniac/ghc
compiler/cmm/OldPprCmm.hs
bsd-3-clause
-- -------------------------------------------------------------------------- -- Conditional. [1], section 6.4 -- -- if (expr) { goto lbl; } -- genCondBranch :: Platform -> CmmExpr -> BlockId -> SDoc genCondBranch platform expr ident = hsep [ ptext (sLit "if") , parens(pprPlatform platform expr) ...
375
genCondBranch :: Platform -> CmmExpr -> BlockId -> SDoc genCondBranch platform expr ident = hsep [ ptext (sLit "if") , parens(pprPlatform platform expr) , ptext (sLit "goto") , ppr ident <> semi ]
227
genCondBranch platform expr ident = hsep [ ptext (sLit "if") , parens(pprPlatform platform expr) , ptext (sLit "goto") , ppr ident <> semi ]
171
true
true
0
9
83
91
46
45
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/Format/Elf/PreHeader.hs
bsd-3-clause
getGetters :: PreHeader -> (Get Word8, Get Word16, Get Word32, Get Word64, Get Word64) getGetters i = (gw8, gw16, gw32, gw64, gwN) where ExtendedWordGetters gw8 gw16 gw32 gw64 gwN = getExtendedWordGetters (preHeaderEndianness i) (preHeaderWordSize i) -- | Get the putters appropriate for the ELF file
319
getGetters :: PreHeader -> (Get Word8, Get Word16, Get Word32, Get Word64, Get Word64) getGetters i = (gw8, gw16, gw32, gw64, gwN) where ExtendedWordGetters gw8 gw16 gw32 gw64 gwN = getExtendedWordGetters (preHeaderEndianness i) (preHeaderWordSize i) -- | Get the putters appropriate for the ELF file
319
getGetters i = (gw8, gw16, gw32, gw64, gwN) where ExtendedWordGetters gw8 gw16 gw32 gw64 gwN = getExtendedWordGetters (preHeaderEndianness i) (preHeaderWordSize i) -- | Get the putters appropriate for the ELF file
232
false
true
1
9
63
114
53
61
null
null
brendanhay/gogol
gogol-texttospeech/gen/Network/Google/Resource/TextToSpeech/Voices/List.hs
mpl-2.0
-- | JSONP vlCallback :: Lens' VoicesList (Maybe Text) vlCallback = lens _vlCallback (\ s a -> s{_vlCallback = a})
116
vlCallback :: Lens' VoicesList (Maybe Text) vlCallback = lens _vlCallback (\ s a -> s{_vlCallback = a})
105
vlCallback = lens _vlCallback (\ s a -> s{_vlCallback = a})
61
true
true
0
9
21
48
25
23
null
null
randen/cabal
Cabal/tests/Test/Distribution/Version.hs
bsd-3-clause
-------------------------------- -- Parsing and pretty printing -- prop_parse_disp1 :: VersionRange -> Bool prop_parse_disp1 vr = fmap stripParens (simpleParse (display vr)) == Just (canonicalise vr) where canonicalise = swizzle . swap swizzle (UnionVersionRanges (UnionVersionRanges v1 v2) v3) ...
1,764
prop_parse_disp1 :: VersionRange -> Bool prop_parse_disp1 vr = fmap stripParens (simpleParse (display vr)) == Just (canonicalise vr) where canonicalise = swizzle . swap swizzle (UnionVersionRanges (UnionVersionRanges v1 v2) v3) | not (isOrLaterVersion v1 v2) && not (isOrEarlierVersion v1 v2) ...
1,696
prop_parse_disp1 vr = fmap stripParens (simpleParse (display vr)) == Just (canonicalise vr) where canonicalise = swizzle . swap swizzle (UnionVersionRanges (UnionVersionRanges v1 v2) v3) | not (isOrLaterVersion v1 v2) && not (isOrEarlierVersion v1 v2) = swizzle (UnionVersionRanges v1 (Unio...
1,655
true
true
0
11
480
483
237
246
null
null
input-output-hk/pos-haskell-prototype
crypto/Pos/Crypto/Orphans.hs
mit
fromByteStringToBytes :: BS.ByteString -> BA.Bytes fromByteStringToBytes = BA.convert
85
fromByteStringToBytes :: BS.ByteString -> BA.Bytes fromByteStringToBytes = BA.convert
85
fromByteStringToBytes = BA.convert
34
false
true
0
6
7
21
11
10
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
button8Count :: String -> ControlPattern button8Count name = pStateF "button8" name (maybe 0 (+1))
98
button8Count :: String -> ControlPattern button8Count name = pStateF "button8" name (maybe 0 (+1))
98
button8Count name = pStateF "button8" name (maybe 0 (+1))
57
false
true
0
8
13
45
20
25
null
null
green-haskell/ghc
compiler/types/TypeRep.hs
bsd-3-clause
pprTyThingCategory (AnId _) = ptext (sLit "Identifier")
59
pprTyThingCategory (AnId _) = ptext (sLit "Identifier")
59
pprTyThingCategory (AnId _) = ptext (sLit "Identifier")
59
false
false
0
7
10
24
11
13
null
null
eb-gh-cr/XMonadContrib1
XMonad/Hooks/EwmhDesktops.hs
bsd-3-clause
-- | -- An event hook to handle applications that wish to fullscreen using the -- _NET_WM_STATE protocol. This includes users of the gtk_window_fullscreen() -- function, such as Totem, Evince and OpenOffice.org. -- -- Note this is not included in 'ewmh'. fullscreenEventHook :: Event -> X All fullscreenEventHook (Client...
1,160
fullscreenEventHook :: Event -> X All fullscreenEventHook (ClientMessageEvent _ _ _ dpy win typ (action:dats)) = do wmstate <- getAtom "_NET_WM_STATE" fullsc <- getAtom "_NET_WM_STATE_FULLSCREEN" wstate <- fromMaybe [] `fmap` getProp32 wmstate win let isFull = fromIntegral fullsc `elem` wstate -- Consta...
905
fullscreenEventHook (ClientMessageEvent _ _ _ dpy win typ (action:dats)) = do wmstate <- getAtom "_NET_WM_STATE" fullsc <- getAtom "_NET_WM_STATE_FULLSCREEN" wstate <- fromMaybe [] `fmap` getProp32 wmstate win let isFull = fromIntegral fullsc `elem` wstate -- Constants for the _NET_WM_STATE protocol: ...
867
true
true
0
16
264
345
169
176
null
null
creichert/persistent
persistent-postgresql/Database/Persist/Postgresql.hs
mit
showSqlType :: SqlType -> Text showSqlType SqlString = "VARCHAR"
64
showSqlType :: SqlType -> Text showSqlType SqlString = "VARCHAR"
64
showSqlType SqlString = "VARCHAR"
33
false
true
0
7
8
24
10
14
null
null
mankyKitty/SimplyEasy
src/first/SimplyTyped.hs
mit
typeInf :: Int -> Context -> Inferable -> Result Type typeInf i c (Ann e t) = do kindOut c t Star typeOut i c e t return t
176
typeInf :: Int -> Context -> Inferable -> Result Type typeInf i c (Ann e t) = do kindOut c t Star typeOut i c e t return t
176
typeInf i c (Ann e t) = do kindOut c t Star typeOut i c e t return t
122
false
true
0
8
82
69
31
38
null
null
dnaq/crypto-sodium
test/Tests/Sodium/Stream/Xsalsa20.hs
mit
testVector3 :: TestTree -- corresponding to tests/stream3.c -- and tests/stream7.cpp from NaCl testVector3 = testCase "vector 3" $ do let firstkey = mkKey' [ 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4 , 0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7 , 0...
3,002
testVector3 :: TestTree testVector3 = testCase "vector 3" $ do let firstkey = mkKey' [ 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4 , 0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7 , 0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2 , 0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x...
2,907
testVector3 = testCase "vector 3" $ do let firstkey = mkKey' [ 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4 , 0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7 , 0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2 , 0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89 ] ...
2,883
true
true
0
12
1,125
1,136
742
394
null
null
Gurrt/software-testing
week-4/Lab4.hs
mit
differenceSet :: (Ord a) => Set a -> Set a -> Set a differenceSet set1 (Set []) = set1
86
differenceSet :: (Ord a) => Set a -> Set a -> Set a differenceSet set1 (Set []) = set1
86
differenceSet set1 (Set []) = set1
34
false
true
0
8
18
50
24
26
null
null
Peaker/Algorithm-W-Step-By-Step
src/Lamdu/Infer/Internal/Monad.hs
gpl-3.0
listenSubst :: Infer a -> Infer (a, Subst) listenSubst x = listen x <&> _2 %~ _subst
84
listenSubst :: Infer a -> Infer (a, Subst) listenSubst x = listen x <&> _2 %~ _subst
84
listenSubst x = listen x <&> _2 %~ _subst
41
false
true
4
8
16
49
22
27
null
null
arekfu/project_euler
p0079/p0079.hs
mit
pairs :: String -> [(Char, CharSet)] pairs string = zipWith (\c1 c2 -> (c1, S.singleton c2)) string (tail string)
113
pairs :: String -> [(Char, CharSet)] pairs string = zipWith (\c1 c2 -> (c1, S.singleton c2)) string (tail string)
113
pairs string = zipWith (\c1 c2 -> (c1, S.singleton c2)) string (tail string)
76
false
true
0
10
18
61
33
28
null
null
pascalpoizat/veca-haskell
src/Examples/Rover/Model.hs
apache-2.0
-- (#) :: VName -> Operation -> JoinPoint n # o = JoinPoint n o
63
(#) :: VName -> Operation -> JoinPoint n # o = JoinPoint n o
60
n # o = JoinPoint n o
21
true
true
0
9
14
34
17
17
null
null
mauroblanco/fpnla-examples
src/FPNLA/Utils.hs
bsd-3-clause
splitSlice _ [] = []
20
splitSlice _ [] = []
20
splitSlice _ [] = []
20
false
false
0
6
4
19
8
11
null
null
rfranek/duckling
Duckling/Time/DA/Rules.hs
bsd-3-clause
ruleLastCycleOfTime :: Rule ruleLastCycleOfTime = Rule { name = "last <cycle> of <time>" , pattern = [ regex "sidste" , dimension TimeGrain , regex "af|i" , dimension Time ] , prod = \tokens -> case tokens of (_:Token TimeGrain grain:_:Token Time td:_) -> tt $ cycleLastOf grain t...
344
ruleLastCycleOfTime :: Rule ruleLastCycleOfTime = Rule { name = "last <cycle> of <time>" , pattern = [ regex "sidste" , dimension TimeGrain , regex "af|i" , dimension Time ] , prod = \tokens -> case tokens of (_:Token TimeGrain grain:_:Token Time td:_) -> tt $ cycleLastOf grain t...
344
ruleLastCycleOfTime = Rule { name = "last <cycle> of <time>" , pattern = [ regex "sidste" , dimension TimeGrain , regex "af|i" , dimension Time ] , prod = \tokens -> case tokens of (_:Token TimeGrain grain:_:Token Time td:_) -> tt $ cycleLastOf grain td _ -> Nothing }
316
false
true
0
17
99
124
62
62
null
null
rueshyna/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProFileUserLinks/List.hs
mpl-2.0
-- | An index of the first profile-user link to retrieve. Use this parameter -- as a pagination mechanism along with the max-results parameter. mpfullStartIndex :: Lens' ManagementProFileUserLinksList (Maybe Int32) mpfullStartIndex = lens _mpfullStartIndex (\ s a -> s{_mpfullStartIndex = a}) . mapping _Co...
324
mpfullStartIndex :: Lens' ManagementProFileUserLinksList (Maybe Int32) mpfullStartIndex = lens _mpfullStartIndex (\ s a -> s{_mpfullStartIndex = a}) . mapping _Coerce
180
mpfullStartIndex = lens _mpfullStartIndex (\ s a -> s{_mpfullStartIndex = a}) . mapping _Coerce
109
true
true
2
8
57
60
29
31
null
null
duplode/threepenny-gui
src/Graphics/UI/Threepenny/Internal.hs
bsd-3-clause
getWindow :: Element -> IO Window getWindow = return . elWindow
63
getWindow :: Element -> IO Window getWindow = return . elWindow
63
getWindow = return . elWindow
29
false
true
0
6
10
22
11
11
null
null
haskell-distributed/distributed-process-platform
src/Control/Distributed/Process/Platform/Execution/Exchange/Router.hs
bsd-3-clause
route :: Serializable m => Exchange -> m -> Process () route = post
67
route :: Serializable m => Exchange -> m -> Process () route = post
67
route = post
12
false
true
0
9
13
31
15
16
null
null
jhrcek/jdex
src/Jdex/Parse.hs
bsd-3-clause
-- TODO - only valid for classes directKnownSubclasses :: FilePath -> IO [Link] directKnownSubclasses javadocFile = extractInfo javadocFile subclassesArrow where subclassesArrow = getXPathTrees "//h2/following-sibling::dl/dt/b[contains(text(),'Direct Known Subclasses')]/../../dd" >>> getLinks
297
directKnownSubclasses :: FilePath -> IO [Link] directKnownSubclasses javadocFile = extractInfo javadocFile subclassesArrow where subclassesArrow = getXPathTrees "//h2/following-sibling::dl/dt/b[contains(text(),'Direct Known Subclasses')]/../../dd" >>> getLinks
264
directKnownSubclasses javadocFile = extractInfo javadocFile subclassesArrow where subclassesArrow = getXPathTrees "//h2/following-sibling::dl/dt/b[contains(text(),'Direct Known Subclasses')]/../../dd" >>> getLinks
217
true
true
1
7
31
52
23
29
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxITEM_SEPARATOR :: Int wxITEM_SEPARATOR = (-1)
47
wxITEM_SEPARATOR :: Int wxITEM_SEPARATOR = (-1)
47
wxITEM_SEPARATOR = (-1)
23
false
true
0
6
5
16
9
7
null
null
thalerjonathan/phd
coding/prototyping/haskell/HerosAndCowards/src/Utils.hs
gpl-3.0
{- NOTE: for testing-purposes main :: IO () main = do let g = mkStdGen 42 drawRandomTest 10 g drawRandomTest :: (RandomGen g) => Int -> g -> IO () drawRandomTest steps g = do let (x, g') = Utils.drawRandomIgnoring g [0..10] [0,2,4,6,8,10] putStrLn (show x) if steps == 0 then putStrLn "finis...
1,911
drawRandomIgnoring :: (RandomGen g, Eq a) => g -> [a] -> [a] -> (a, g) drawRandomIgnoring g xs is | any (==randElem) is = drawRandomIgnoring g' xs is | otherwise = (randElem, g') where (randIdx, g') = randomR(0, length xs - 1) g randElem = xs !! randIdx
293
drawRandomIgnoring g xs is | any (==randElem) is = drawRandomIgnoring g' xs is | otherwise = (randElem, g') where (randIdx, g') = randomR(0, length xs - 1) g randElem = xs !! randIdx
222
true
true
1
10
544
141
78
63
null
null
mLuby/triviaskell
src/Server.hs
mit
runDb :: SqlPersistT (ResourceT (LoggingT IO)) a -> IO a runDb query = runStderrLoggingT . runResourceT . withMySQLConn defaultConnectInfo . runSqlConn $ query
159
runDb :: SqlPersistT (ResourceT (LoggingT IO)) a -> IO a runDb query = runStderrLoggingT . runResourceT . withMySQLConn defaultConnectInfo . runSqlConn $ query
159
runDb query = runStderrLoggingT . runResourceT . withMySQLConn defaultConnectInfo . runSqlConn $ query
102
false
true
0
10
22
61
28
33
null
null
walck/learn-physics
examples/src/eFieldLine3D.hs
bsd-3-clause
main :: IO () main = display myOptions drawFun
46
main :: IO () main = display myOptions drawFun
46
main = display myOptions drawFun
32
false
true
1
6
8
24
10
14
null
null
facebookincubator/duckling
Duckling/Time/BG/Rules.hs
bsd-3-clause
ruleHONumeral :: Rule ruleHONumeral = Rule { name = "<hour-of-day> <integer>" , pattern = [ Predicate isAnHourOfDay , Predicate $ isIntegerBetween 1 59 ] , prod = \case (Token Time TimeData{TTime.form = Just (TTime.TimeOfDay (Just hours) is12H) ,TTime.latent = isLatent}...
526
ruleHONumeral :: Rule ruleHONumeral = Rule { name = "<hour-of-day> <integer>" , pattern = [ Predicate isAnHourOfDay , Predicate $ isIntegerBetween 1 59 ] , prod = \case (Token Time TimeData{TTime.form = Just (TTime.TimeOfDay (Just hours) is12H) ,TTime.latent = isLatent}...
526
ruleHONumeral = Rule { name = "<hour-of-day> <integer>" , pattern = [ Predicate isAnHourOfDay , Predicate $ isIntegerBetween 1 59 ] , prod = \case (Token Time TimeData{TTime.form = Just (TTime.TimeOfDay (Just hours) is12H) ,TTime.latent = isLatent}: token: ...
504
false
true
0
21
177
168
86
82
null
null
FPtje/GLuaFixer
src/GLua/Lexer.hs
lgpl-2.1
parseNumberSuffix :: LParser String parseNumberSuffix = imaginary <<|> extension where imaginary = (:[]) <$> (pSym 'i' <<|> pSym 'I') extension = (\e s d -> e : s ++ d) <$> (pSym 'e' <<|> pSym 'E' <<|> pSym 'p' <<|> pSym 'P') <*> opt (pToken "+" <<|> pToken "-") "" <*> pSome...
498
parseNumberSuffix :: LParser String parseNumberSuffix = imaginary <<|> extension where imaginary = (:[]) <$> (pSym 'i' <<|> pSym 'I') extension = (\e s d -> e : s ++ d) <$> (pSym 'e' <<|> pSym 'E' <<|> pSym 'p' <<|> pSym 'P') <*> opt (pToken "+" <<|> pToken "-") "" <*> pSome...
498
parseNumberSuffix = imaginary <<|> extension where imaginary = (:[]) <$> (pSym 'i' <<|> pSym 'I') extension = (\e s d -> e : s ++ d) <$> (pSym 'e' <<|> pSym 'E' <<|> pSym 'p' <<|> pSym 'P') <*> opt (pToken "+" <<|> pToken "-") "" <*> pSome pDigit -- | Parse a keyword. Note:...
462
false
true
9
10
128
152
72
80
null
null
input-output-hk/pos-haskell-prototype
infra/src/Pos/Infra/Recovery/Info.hs
mit
needTriggerRecovery :: SyncStatus -> Bool needTriggerRecovery = \case SSKindaSynced -> False SSDoingRecovery -> False SSInFuture{} -> False _ -> True
184
needTriggerRecovery :: SyncStatus -> Bool needTriggerRecovery = \case SSKindaSynced -> False SSDoingRecovery -> False SSInFuture{} -> False _ -> True
184
needTriggerRecovery = \case SSKindaSynced -> False SSDoingRecovery -> False SSInFuture{} -> False _ -> True
142
false
true
0
8
54
45
23
22
null
null
arnizamani/aiw
Instances.hs
gpl-2.0
matchingAxiom func (Axiom (_,_,_,_,_,ax)) = matchExpExp (fst' ax) func
70
matchingAxiom func (Axiom (_,_,_,_,_,ax)) = matchExpExp (fst' ax) func
70
matchingAxiom func (Axiom (_,_,_,_,_,ax)) = matchExpExp (fst' ax) func
70
false
false
0
7
8
48
25
23
null
null
GaloisInc/tower
tower-mini/src/Tower/Mini/Component.hs
bsd-3-clause
inputPort :: (IvoryArea a, IvoryZero a) => String -> String -> ComponentM e (ChanOutput a) inputPort sym hdr = do (chan_in, chan_out) <- tower channel inputPort' chan_in sym hdr return chan_out
209
inputPort :: (IvoryArea a, IvoryZero a) => String -> String -> ComponentM e (ChanOutput a) inputPort sym hdr = do (chan_in, chan_out) <- tower channel inputPort' chan_in sym hdr return chan_out
209
inputPort sym hdr = do (chan_in, chan_out) <- tower channel inputPort' chan_in sym hdr return chan_out
108
false
true
0
11
46
87
40
47
null
null
bravit/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LExternal mpt) [p] | mpt == sUN "prim__asPtr" = v ++ "MKPTR(vm, GETMPTR("++ creg p ++"))"
101
doOp v (LExternal mpt) [p] | mpt == sUN "prim__asPtr" = v ++ "MKPTR(vm, GETMPTR("++ creg p ++"))"
101
doOp v (LExternal mpt) [p] | mpt == sUN "prim__asPtr" = v ++ "MKPTR(vm, GETMPTR("++ creg p ++"))"
101
false
false
0
9
21
50
23
27
null
null
sgillespie/ghc
compiler/types/InstEnv.hs
bsd-3-clause
mkImportedInstance :: Name -- ^ the name of the class -> [Maybe Name] -- ^ the types which the class was applied to -> Name -- ^ the 'Name' of the dictionary binding -> DFunId -- ^ the 'Id' of the dictionary. -> OverlapFla...
3,494
mkImportedInstance :: Name -- ^ the name of the class -> [Maybe Name] -- ^ the types which the class was applied to -> Name -- ^ the 'Name' of the dictionary binding -> DFunId -- ^ the 'Id' of the dictionary. -> OverlapFla...
3,274
mkImportedInstance cls_nm mb_tcs dfun_name dfun oflag orphan = ClsInst { is_flag = oflag, is_dfun = dfun , is_tvs = tvs, is_tys = tys , is_dfun_name = dfun_name , is_cls_nm = cls_nm, is_cls = cls, is_tcs = mb_tcs , is_orphan = orphan } where (tvs, _, cls, tys) = t...
2,821
true
true
0
10
936
152
93
59
null
null