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
TomMD/cryptol
sbv/Data/SBV/SMT/SMTLib1.hs
bsd-3-clause
kindType KUnbounded = die "unbounded Integer"
53
kindType KUnbounded = die "unbounded Integer"
53
kindType KUnbounded = die "unbounded Integer"
53
false
false
0
5
13
13
5
8
null
null
OpenXT/manager
upgrade-db/Migrations/M_27.hs
gpl-2.0
migration = Migration { sourceVersion = 27 , targetVersion = 28 , actions = act }
131
migration = Migration { sourceVersion = 27 , targetVersion = 28 , actions = act }
131
migration = Migration { sourceVersion = 27 , targetVersion = 28 , actions = act }
131
false
false
0
6
65
26
16
10
null
null
AlexanderPankiv/ghc
compiler/simplCore/SimplUtils.hs
bsd-3-clause
------------------- contIsRhsOrArg :: SimplCont -> Bool contIsRhsOrArg (Stop {}) = True
93
contIsRhsOrArg :: SimplCont -> Bool contIsRhsOrArg (Stop {}) = True
73
contIsRhsOrArg (Stop {}) = True
37
true
true
0
6
16
31
15
16
null
null
vTurbine/w3dhs
src/Resources/Map.hs
mit
unp ls (c:t:xs) = case t of _ | t == nearTag -> if c == 0 then unp (ls ++ [head xs, t]) (tail xs) else unp (ls ++ take (fromIntegral c * 2) dbck) (tail xs) | t == farTag -> if c == 0 then unp (ls ++ [head xs, t]) (tail xs) ...
627
unp ls (c:t:xs) = case t of _ | t == nearTag -> if c == 0 then unp (ls ++ [head xs, t]) (tail xs) else unp (ls ++ take (fromIntegral c * 2) dbck) (tail xs) | t == farTag -> if c == 0 then unp (ls ++ [head xs, t]) (tail xs) ...
627
unp ls (c:t:xs) = case t of _ | t == nearTag -> if c == 0 then unp (ls ++ [head xs, t]) (tail xs) else unp (ls ++ take (fromIntegral c * 2) dbck) (tail xs) | t == farTag -> if c == 0 then unp (ls ++ [head xs, t]) (tail xs) ...
627
false
false
2
16
255
324
166
158
null
null
rahulmutt/ghcvm
compiler/Eta/Core/MkCore.hs
bsd-3-clause
nO_METHOD_BINDING_ERROR_ID = mkRuntimeErrorId noMethodBindingErrorName
75
nO_METHOD_BINDING_ERROR_ID = mkRuntimeErrorId noMethodBindingErrorName
75
nO_METHOD_BINDING_ERROR_ID = mkRuntimeErrorId noMethodBindingErrorName
75
false
false
0
5
8
9
4
5
null
null
andyfriesen/hs-sajson
tests/SajsonTest.hs
mit
case_getObjectKey :: IO () case_getObjectKey = do let o = parseObject "{\"foo\":\"bar\"}" let k = getObjectKey o 0 assertEqual "" "foo" k
149
case_getObjectKey :: IO () case_getObjectKey = do let o = parseObject "{\"foo\":\"bar\"}" let k = getObjectKey o 0 assertEqual "" "foo" k
149
case_getObjectKey = do let o = parseObject "{\"foo\":\"bar\"}" let k = getObjectKey o 0 assertEqual "" "foo" k
122
false
true
0
10
33
52
23
29
null
null
hpacheco/HAAP
src/HAAP/Test/Spec.hs
mit
haapSpecProperty ioargs (HaapSpecTestMessage io) = monadicIO $ do msg <- run $ runSpecIO ioargs "test" io throw $ HaapSpecMessage msg return ()
156
haapSpecProperty ioargs (HaapSpecTestMessage io) = monadicIO $ do msg <- run $ runSpecIO ioargs "test" io throw $ HaapSpecMessage msg return ()
156
haapSpecProperty ioargs (HaapSpecTestMessage io) = monadicIO $ do msg <- run $ runSpecIO ioargs "test" io throw $ HaapSpecMessage msg return ()
156
false
false
0
10
34
59
25
34
null
null
apyrgio/ganeti
src/Ganeti/UDSServer.hs
bsd-2-clause
connectClient :: ConnectConfig -- ^ configuration for the client -> Int -- ^ connection timeout -> FilePath -- ^ socket path -> IO Client connectClient conf tmo path = do h <- openClientSocket tmo path rf <- newIORef B.empty return Client { rsocket=h, wsocket=h, rbuf=rf, clientConf...
374
connectClient :: ConnectConfig -- ^ configuration for the client -> Int -- ^ connection timeout -> FilePath -- ^ socket path -> IO Client connectClient conf tmo path = do h <- openClientSocket tmo path rf <- newIORef B.empty return Client { rsocket=h, wsocket=h, rbuf=rf, clientConf...
374
connectClient conf tmo path = do h <- openClientSocket tmo path rf <- newIORef B.empty return Client { rsocket=h, wsocket=h, rbuf=rf, clientConfig=conf } -- | Creates and returns a server endpoint.
204
false
true
0
10
93
98
50
48
null
null
ghc-android/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
pragSpecInstD :: TypeQ -> DecQ pragSpecInstD ty = do ty1 <- ty return $ PragmaD $ SpecialiseInstP ty1
118
pragSpecInstD :: TypeQ -> DecQ pragSpecInstD ty = do ty1 <- ty return $ PragmaD $ SpecialiseInstP ty1
118
pragSpecInstD ty = do ty1 <- ty return $ PragmaD $ SpecialiseInstP ty1
87
false
true
0
9
34
45
19
26
null
null
c19/Exercism-Haskell
pangram/test/Tests.hs
mit
specs :: Spec specs = describe "isPangram" $ for_ cases test where test Case{..} = it description $ isPangram input `shouldBe` expected
141
specs :: Spec specs = describe "isPangram" $ for_ cases test where test Case{..} = it description $ isPangram input `shouldBe` expected
141
specs = describe "isPangram" $ for_ cases test where test Case{..} = it description $ isPangram input `shouldBe` expected
127
false
true
0
7
27
56
27
29
null
null
dimara/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pAutoPromote :: Field pAutoPromote = withDoc "Whether node(s) should be promoted to master candidate if\ \ necessary" $ defaultFalse "auto_promote"
161
pAutoPromote :: Field pAutoPromote = withDoc "Whether node(s) should be promoted to master candidate if\ \ necessary" $ defaultFalse "auto_promote"
161
pAutoPromote = withDoc "Whether node(s) should be promoted to master candidate if\ \ necessary" $ defaultFalse "auto_promote"
139
false
true
0
6
33
21
10
11
null
null
brendanhay/gogol
gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Get.hs
mpl-2.0
-- | Creates a value of 'TemplateGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'temeTemplateId' -- -- * 'temeTableId' templateGet :: Int32 -- ^ 'temeTemplateId' -> Text -- ^ 'temeTableId' -> TemplateGet templateGet p...
447
templateGet :: Int32 -- ^ 'temeTemplateId' -> Text -- ^ 'temeTableId' -> TemplateGet templateGet pTemeTemplateId_ pTemeTableId_ = TemplateGet' {_temeTemplateId = _Coerce # pTemeTemplateId_, _temeTableId = pTemeTableId_}
237
templateGet pTemeTemplateId_ pTemeTableId_ = TemplateGet' {_temeTemplateId = _Coerce # pTemeTemplateId_, _temeTableId = pTemeTableId_}
140
true
true
0
8
81
60
34
26
null
null
duckwork/dots
xmonad/xmonad.hs
unlicense
-- coding + writing ws4 = "docs"
32
ws4 = "docs"
12
ws4 = "docs"
12
true
false
1
5
6
11
4
7
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/ARB/shader_subroutine.txt ARB_shader_subroutine> extension supported? glGetARBShaderSubroutine :: MonadIO m => m Bool glGetARBShaderSubroutine = getExtensions >>= (return . member "GL_ARB_shader_subroutine")
258
glGetARBShaderSubroutine :: MonadIO m => m Bool glGetARBShaderSubroutine = getExtensions >>= (return . member "GL_ARB_shader_subroutine")
137
glGetARBShaderSubroutine = getExtensions >>= (return . member "GL_ARB_shader_subroutine")
89
true
true
0
8
22
36
18
18
null
null
bens/libmpd-haskell
tests/StringConn.hs
lgpl-2.1
-- | Run an action against a set of expected requests and responses, -- and an expected result. The result is Nothing if everything matched -- what was expected. If anything differed the result of the -- computation is returned along with pairs of expected and received -- requests. testMPDWithPassword :: (Eq a) ...
730
testMPDWithPassword :: (Eq a) => [(Expect, Response String)] -- ^ The expected requests and their -- ^ corresponding responses. -> Password -- ^ A password to be supplied. -> StringMPD a -- ^ The MPD action to run. ...
447
testMPDWithPassword pairs passwd m = runIdentity $ runReaderT (evalStateT (runExceptT $ runSMPD m) pairs) passwd
112
true
true
0
11
210
93
51
42
null
null
rueshyna/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Status of the variation. Possible values: \"ACTIVE\", \"INACTIVE\". -- INACTIVE variations are not served. This field may not be changed for an -- experiment whose status is ENDED. eviStatus :: Lens' ExperimentVariationsItem (Maybe Text) eviStatus = lens _eviStatus (\ s a -> s{_eviStatus = a})
301
eviStatus :: Lens' ExperimentVariationsItem (Maybe Text) eviStatus = lens _eviStatus (\ s a -> s{_eviStatus = a})
115
eviStatus = lens _eviStatus (\ s a -> s{_eviStatus = a})
58
true
true
0
9
48
50
27
23
null
null
s9gf4ult/yesod
yesod-core/Yesod/Core/Dispatch.hs
mit
serverValue :: S8.ByteString serverValue = S8.pack $ concat [ "Warp/" , Network.Wai.Handler.Warp.warpVersion , " + Yesod/" , showVersion Paths_yesod_core.version , " (core)" ]
199
serverValue :: S8.ByteString serverValue = S8.pack $ concat [ "Warp/" , Network.Wai.Handler.Warp.warpVersion , " + Yesod/" , showVersion Paths_yesod_core.version , " (core)" ]
199
serverValue = S8.pack $ concat [ "Warp/" , Network.Wai.Handler.Warp.warpVersion , " + Yesod/" , showVersion Paths_yesod_core.version , " (core)" ]
170
false
true
0
8
46
54
28
26
null
null
DanielWaterworth/Idris-dev
src/IRTS/CodegenJava.hs
bsd-3-clause
isConstCase :: [SAlt] -> Bool isConstCase ((SConstCase _ _):_) = True
69
isConstCase :: [SAlt] -> Bool isConstCase ((SConstCase _ _):_) = True
69
isConstCase ((SConstCase _ _):_) = True
39
false
true
0
9
10
36
19
17
null
null
joashc/cryptodiner
network/DcServerIO.hs
gpl-3.0
runWithState :: TMVar ServerState -> DcServer a -> IO (Either ServerError a, TMVar ServerState) runWithState state prog = runStateT (runExceptT (serve prog)) state
163
runWithState :: TMVar ServerState -> DcServer a -> IO (Either ServerError a, TMVar ServerState) runWithState state prog = runStateT (runExceptT (serve prog)) state
163
runWithState state prog = runStateT (runExceptT (serve prog)) state
67
false
true
0
9
22
64
30
34
null
null
jcristovao/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
runMongoDBPipePool :: (Trans.MonadIO m, MonadBaseControl IO m) => DB.AccessMode -> Database -> DB.Action m a -> PipePool -> m a runMongoDBPipePool accessMode db action pool = Pool.withResource pool $ \pipe -> DB.access pipe accessMode db action
246
runMongoDBPipePool :: (Trans.MonadIO m, MonadBaseControl IO m) => DB.AccessMode -> Database -> DB.Action m a -> PipePool -> m a runMongoDBPipePool accessMode db action pool = Pool.withResource pool $ \pipe -> DB.access pipe accessMode db action
246
runMongoDBPipePool accessMode db action pool = Pool.withResource pool $ \pipe -> DB.access pipe accessMode db action
118
false
true
2
10
37
97
46
51
null
null
mlitchard/haks
src/Haks/Chinese/Particulator.hs
isc
chinese_config :: ParticleConfig chinese_config = ParticleConfig { pre_processor_hc = id , tokenizer_hc = tokenizer , cleanup_hc = id , particlate_hc = particlate }
188
chinese_config :: ParticleConfig chinese_config = ParticleConfig { pre_processor_hc = id , tokenizer_hc = tokenizer , cleanup_hc = id , particlate_hc = particlate }
188
chinese_config = ParticleConfig { pre_processor_hc = id , tokenizer_hc = tokenizer , cleanup_hc = id , particlate_hc = particlate }
155
false
true
0
7
46
47
25
22
null
null
rvion/lamdu
Lamdu/Sugar/Names/Add.hs
gpl-3.0
p1cpsNameConvertor :: NameScope -> Walk.CPSNameConvertor (Pass1M tm) p1cpsNameConvertor scope mNameSrc = CPS $ \k -> do result <- pass1Result scope mNameSrc (res, storedNamesBelow) <- p1ListenStoredNames k pure (result storedNamesBelow, res) -- pass 2:
281
p1cpsNameConvertor :: NameScope -> Walk.CPSNameConvertor (Pass1M tm) p1cpsNameConvertor scope mNameSrc = CPS $ \k -> do result <- pass1Result scope mNameSrc (res, storedNamesBelow) <- p1ListenStoredNames k pure (result storedNamesBelow, res) -- pass 2:
281
p1cpsNameConvertor scope mNameSrc = CPS $ \k -> do result <- pass1Result scope mNameSrc (res, storedNamesBelow) <- p1ListenStoredNames k pure (result storedNamesBelow, res) -- pass 2:
212
false
true
2
11
61
90
42
48
null
null
mmailhot/Dumblisp
Dumblisp/Env.hs
mit
defineVar :: Env -> String -> LispVal -> IOThrowsError LispVal defineVar envRef var value = do alreadyDefined <- liftIO $ isBound envRef var if alreadyDefined then setVar envRef var value >> return value else liftIO $ do valueRef <- newIORef value env <- readIORef envRef writ...
380
defineVar :: Env -> String -> LispVal -> IOThrowsError LispVal defineVar envRef var value = do alreadyDefined <- liftIO $ isBound envRef var if alreadyDefined then setVar envRef var value >> return value else liftIO $ do valueRef <- newIORef value env <- readIORef envRef writ...
380
defineVar envRef var value = do alreadyDefined <- liftIO $ isBound envRef var if alreadyDefined then setVar envRef var value >> return value else liftIO $ do valueRef <- newIORef value env <- readIORef envRef writeIORef envRef ((var, valueRef) : env) return value
317
false
true
0
15
106
130
59
71
null
null
ocramz/slepc-hs
src/Numerical/SLEPc/Raw/InlineC.hs
lgpl-3.0
matCreate1 = matCreate'
23
matCreate1 = matCreate'
23
matCreate1 = matCreate'
23
false
false
0
4
2
6
3
3
null
null
axelexic/sgx-bunny
src/CryptoLatte/RSA.hs
bsd-3-clause
newRSAPrivateKey :: SystemRandom -- Source of randomness -> Word32 -- Modulus bit size. Must be >= 1024 -> Integer -- PublicExponent -> IO RSAPrivateKey -- Output newRSAPrivateKey rnd count expo | count < 1024 || expo < 3 = throwI...
1,149
newRSAPrivateKey :: SystemRandom -- Source of randomness -> Word32 -- Modulus bit size. Must be >= 1024 -> Integer -- PublicExponent -> IO RSAPrivateKey newRSAPrivateKey rnd count expo | count < 1024 || expo < 3 = throwIO InvalidS...
1,139
newRSAPrivateKey rnd count expo | count < 1024 || expo < 3 = throwIO InvalidSize | numBits expo >= fromIntegral count = throwIO KeyGenParametersInvalid | otherwise = newRSAPrivateKey' 20 where newRSAPrivateKey' :: Int -- Repeat count -> IO RSAPrivateKe...
908
true
true
1
15
430
328
173
155
null
null
Daniel-Diaz/arrow-par
Control/Arrow/Par.hs
bsd-3-clause
- | Feed a 'Par' arrow with an input and return the result. applyPar :: Par a b -> a -> b applyPar a = runIdentity . applyParM a
129
applyPar :: Par a b -> a -> b applyPar a = runIdentity . applyParM a
68
applyPar a = runIdentity . applyParM a
38
true
true
2
8
29
76
32
44
null
null
peddie/fingertrees
src/Data/FingerTree.hs
bsd-3-clause
head :: Meas a v => FingerTree v a -> Maybe a head t = case viewL t of (a :< _) -> Just a _ -> Nothing
113
head :: Meas a v => FingerTree v a -> Maybe a head t = case viewL t of (a :< _) -> Just a _ -> Nothing
113
head t = case viewL t of (a :< _) -> Just a _ -> Nothing
67
false
true
2
7
38
57
29
28
null
null
RayRacine/winshop
src/WinShop/Config.hs
gpl-3.0
wsHost :: Text wsHost = "www.amazon.com"
40
wsHost :: Text wsHost = "www.amazon.com"
40
wsHost = "www.amazon.com"
25
false
true
0
4
5
11
6
5
null
null
snoyberg/crypto-demo-site
src/Handler/AES.hs
mit
keyToText :: Key -> Text keyToText = decodeUtf8 . B16.encode . keyOfCtx
71
keyToText :: Key -> Text keyToText = decodeUtf8 . B16.encode . keyOfCtx
71
keyToText = decodeUtf8 . B16.encode . keyOfCtx
46
false
true
1
7
11
33
14
19
null
null
jtojnar/haste-compiler
libraries/ghc-7.8/base/GHC/IO/Handle/Text.hs
bsd-3-clause
haFD :: Handle__ -> FD haFD h_@Handle__{..} = case cast haDevice of Nothing -> error "not an FD" Just fd -> fd -- | 'hGetBufNonBlocking' @hdl buf count@ reads data from the handle @hdl@ -- into the buffer @buf@ until either EOF is reached, or -- @count@ 8-bit bytes have been read, or there...
1,004
haFD :: Handle__ -> FD haFD h_@Handle__{..} = case cast haDevice of Nothing -> error "not an FD" Just fd -> fd -- | 'hGetBufNonBlocking' @hdl buf count@ reads data from the handle @hdl@ -- into the buffer @buf@ until either EOF is reached, or -- @count@ 8-bit bytes have been read, or there...
1,004
haFD h_@Handle__{..} = case cast haDevice of Nothing -> error "not an FD" Just fd -> fd -- | 'hGetBufNonBlocking' @hdl buf count@ reads data from the handle @hdl@ -- into the buffer @buf@ until either EOF is reached, or -- @count@ 8-bit bytes have been read, or there is no more data availa...
981
false
true
0
8
193
70
43
27
null
null
vTurbine/ghc
compiler/main/DynFlags.hs
bsd-3-clause
supportedLanguagesAndExtensions :: [String] supportedLanguagesAndExtensions = supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions
152
supportedLanguagesAndExtensions :: [String] supportedLanguagesAndExtensions = supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions
152
supportedLanguagesAndExtensions = supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions
108
false
true
0
6
13
22
12
10
null
null
phischu/fragnix
builtins/base/System.IO.Error.hs
bsd-3-clause
isPermissionErrorType _ = False
31
isPermissionErrorType _ = False
31
isPermissionErrorType _ = False
31
false
false
0
4
3
10
4
6
null
null
arekfu/project_euler
p0055/p0055.hs
mit
isPalindrome n = isListPalindrome digits where digits = numberToDigits n
80
isPalindrome n = isListPalindrome digits where digits = numberToDigits n
80
isPalindrome n = isListPalindrome digits where digits = numberToDigits n
80
false
false
0
7
17
22
10
12
null
null
anttisalonen/freekick2
src/Listings.hs
gpl-3.0
showPlayerNation 141 = "Mauritius"
34
showPlayerNation 141 = "Mauritius"
34
showPlayerNation 141 = "Mauritius"
34
false
false
1
5
3
13
4
9
null
null
abramhindle/haskell-sand-game
Sand4.hs
lgpl-3.0
bumpRight c@(Cursor { center = center, left = left, right = right, above = above }) = c{ center = right, right = center }
125
bumpRight c@(Cursor { center = center, left = left, right = right, above = above }) = c{ center = right, right = center }
125
bumpRight c@(Cursor { center = center, left = left, right = right, above = above }) = c{ center = right, right = center }
125
false
false
13
5
28
53
29
24
null
null
fehu/h-logic-einstein
src/LogicProblem/Lang.hs
mit
rules :: [Rule e] -> [AtomicRule e] rules = concatMap f where f (Rule nme _ [r]) = [AtomicRule nme Nothing r] f r@(Rule _ _ []) = error $ "Rule not defined: " ++ show r f (Rule nme _ rs) = do (r, i) <- zip rs ['a'..] return $ AtomicRule nme (Just i) r
311
rules :: [Rule e] -> [AtomicRule e] rules = concatMap f where f (Rule nme _ [r]) = [AtomicRule nme Nothing r] f r@(Rule _ _ []) = error $ "Rule not defined: " ++ show r f (Rule nme _ rs) = do (r, i) <- zip rs ['a'..] return $ AtomicRule nme (Just i) r
311
rules = concatMap f where f (Rule nme _ [r]) = [AtomicRule nme Nothing r] f r@(Rule _ _ []) = error $ "Rule not defined: " ++ show r f (Rule nme _ rs) = do (r, i) <- zip rs ['a'..] return $ AtomicRule nme (Just i) r
275
false
true
2
12
116
164
79
85
null
null
abakst/liquidhaskell
docs/slides/NEU14/00_Refinements-blank.hs
bsd-3-clause
----------------------------------------------------------------------- -- | 1. Simple Refinement Types ----------------------------------------------------------------------- -- Nat {-@ type Nat = {v: Int | v >= 0} @-} -- Pos {-@ type Pos = {v: Int | v > 0} @-} -----------------------------------------------------...
545
dead :: String -> a dead = undefined
36
dead = undefined
16
true
true
0
5
69
26
19
7
null
null
rueshyna/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | Requests with any of these content labels will not match. Values are -- from content-labels.txt in the downloadable files section. pcExcludedContentLabels :: Lens' PretargetingConfig [Int64] pcExcludedContentLabels = lens _pcExcludedContentLabels (\ s a -> s{_pcExcludedContentLabels = a}) . _Default ...
335
pcExcludedContentLabels :: Lens' PretargetingConfig [Int64] pcExcludedContentLabels = lens _pcExcludedContentLabels (\ s a -> s{_pcExcludedContentLabels = a}) . _Default . _Coerce
199
pcExcludedContentLabels = lens _pcExcludedContentLabels (\ s a -> s{_pcExcludedContentLabels = a}) . _Default . _Coerce
139
true
true
2
8
61
58
29
29
null
null
cordawyn/rdf4h
src/Data/RDF/Query.hs
bsd-3-clause
expandNode _ n' = n'
29
expandNode _ n' = n'
29
expandNode _ n' = n'
29
false
false
0
5
13
11
5
6
null
null
nevrenato/Hets_Fork
Common/Keywords.hs
gpl-2.0
-- * comment keywords -- | one percent sign percentS :: String percentS = "%"
78
percentS :: String percentS = "%"
33
percentS = "%"
14
true
true
0
4
15
13
8
5
null
null
kajigor/uKanren_transformations
src/Subst.hs
bsd-3-clause
difference :: Subst -> Subst -> Subst difference (Subst x) (Subst y) = Subst $ Map.difference x y
97
difference :: Subst -> Subst -> Subst difference (Subst x) (Subst y) = Subst $ Map.difference x y
97
difference (Subst x) (Subst y) = Subst $ Map.difference x y
59
false
true
0
10
17
52
24
28
null
null
byorgey/Idris-dev
src/Core/ProofState.hs
bsd-3-clause
movelast :: Name -> RunTactic movelast n ctxt env t = do action (\ps -> let hs = holes ps in if n `elem` hs then ps { holes = (hs \\ [n]) ++ [n] } else ps) ...
338
movelast :: Name -> RunTactic movelast n ctxt env t = do action (\ps -> let hs = holes ps in if n `elem` hs then ps { holes = (hs \\ [n]) ++ [n] } else ps) ...
338
movelast n ctxt env t = do action (\ps -> let hs = holes ps in if n `elem` hs then ps { holes = (hs \\ [n]) ++ [n] } else ps) return t
308
false
true
0
19
213
103
52
51
null
null
A1kmm/test-proxy
Main.hs
bsd-3-clause
newClient :: Handle -> HostName -> PortNumber -> IO () newClient remoteHandle remoteHost pno = do runResourceT . flip runReaderT (ConnectionConsts remoteHandle remoteHost pno) $ CB.sourceIOHandle (return remoteHandle) $$ proxySink return ()
248
newClient :: Handle -> HostName -> PortNumber -> IO () newClient remoteHandle remoteHost pno = do runResourceT . flip runReaderT (ConnectionConsts remoteHandle remoteHost pno) $ CB.sourceIOHandle (return remoteHandle) $$ proxySink return ()
248
newClient remoteHandle remoteHost pno = do runResourceT . flip runReaderT (ConnectionConsts remoteHandle remoteHost pno) $ CB.sourceIOHandle (return remoteHandle) $$ proxySink return ()
193
false
true
0
12
39
84
39
45
null
null
TomMD/ghc
libraries/base/GHC/Show.hs
bsd-3-clause
-- Precedence of application: -- one more than the maximum operator precedence of 9 appPrec1 = I# 11#
127
appPrec1 = I# 11#
17
appPrec1 = I# 11#
17
true
false
1
5
43
15
6
9
null
null
kim/amazonka
amazonka-swf/gen/Network/AWS/SWF/RegisterActivityType.hs
mpl-2.0
-- | If set, specifies the default task list to use for scheduling tasks of this -- activity type. This default task list is used if a task list is not provided -- when a task is scheduled through the 'ScheduleActivityTask' 'Decision'. ratDefaultTaskList :: Lens' RegisterActivityType (Maybe TaskList) ratDefaultTaskList...
391
ratDefaultTaskList :: Lens' RegisterActivityType (Maybe TaskList) ratDefaultTaskList = lens _ratDefaultTaskList (\s a -> s { _ratDefaultTaskList = a })
155
ratDefaultTaskList = lens _ratDefaultTaskList (\s a -> s { _ratDefaultTaskList = a })
89
true
true
0
9
64
48
27
21
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1588533 = 3879
34
getValueFromProduct 1588533 = 3879
34
getValueFromProduct 1588533 = 3879
34
false
false
0
5
3
9
4
5
null
null
reinerp/hmatrix-static
Data/Packed/Static/Syntax.hs
gpl-3.0
parseVecPat s = do xs <- parseVec identifier s conP '(:|>) [ sigP wildP (decLiteralT $ fromIntegral $ length xs) , return $ ListP (map (VarP . mkName) xs) ]
186
parseVecPat s = do xs <- parseVec identifier s conP '(:|>) [ sigP wildP (decLiteralT $ fromIntegral $ length xs) , return $ ListP (map (VarP . mkName) xs) ]
186
parseVecPat s = do xs <- parseVec identifier s conP '(:|>) [ sigP wildP (decLiteralT $ fromIntegral $ length xs) , return $ ListP (map (VarP . mkName) xs) ]
186
false
false
1
15
59
83
39
44
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
maxSpillSlots :: DynFlags -> Int maxSpillSlots dflags = ((rESERVED_C_STACK_BYTES dflags - 64) `div` spillSlotSize (targetPlatform dflags)) - 1
146
maxSpillSlots :: DynFlags -> Int maxSpillSlots dflags = ((rESERVED_C_STACK_BYTES dflags - 64) `div` spillSlotSize (targetPlatform dflags)) - 1
146
maxSpillSlots dflags = ((rESERVED_C_STACK_BYTES dflags - 64) `div` spillSlotSize (targetPlatform dflags)) - 1
113
false
true
0
10
21
50
26
24
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxID_MDI_WINDOW_ARRANGE_ICONS :: Int wxID_MDI_WINDOW_ARRANGE_ICONS = 5233
73
wxID_MDI_WINDOW_ARRANGE_ICONS :: Int wxID_MDI_WINDOW_ARRANGE_ICONS = 5233
73
wxID_MDI_WINDOW_ARRANGE_ICONS = 5233
36
false
true
0
4
5
11
6
5
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
-- | Translate address prefetch operations into proper primcalls. doPrefetchAddrOp ::Int -> [CmmExpr] -> FCode () doPrefetchAddrOp locality [addr,idx] = mkBasicPrefetch locality 0 addr idx
228
doPrefetchAddrOp ::Int -> [CmmExpr] -> FCode () doPrefetchAddrOp locality [addr,idx] = mkBasicPrefetch locality 0 addr idx
162
doPrefetchAddrOp locality [addr,idx] = mkBasicPrefetch locality 0 addr idx
80
true
true
0
8
64
48
25
23
null
null
gibiansky/IHaskell
ghc-parser/src-9.0/Language/Haskell/GHC/HappyParser.hs
mit
fullImport :: P (LImportDecl GhcPs) fullImport = parseImport
60
fullImport :: P (LImportDecl GhcPs) fullImport = parseImport
60
fullImport = parseImport
24
false
true
0
7
7
20
10
10
null
null
antalsz/hs-to-coq
examples/tests/ExceptIn.hs
mit
bar :: Test1 -> Test1 bar (A I1) = A I2
39
bar :: Test1 -> Test1 bar (A I1) = A I2
39
bar (A I1) = A I2
17
false
true
0
7
10
27
13
14
null
null
spechub/Hets
HasCASL/InteractiveTests.hs
gpl-2.0
prettyNode :: DGraph -> Graph.LNode DGNodeLab -> Doc prettyNode _ (n, lbl) = pretty n <> text ":" <+> text (getDGNodeName lbl)
130
prettyNode :: DGraph -> Graph.LNode DGNodeLab -> Doc prettyNode _ (n, lbl) = pretty n <> text ":" <+> text (getDGNodeName lbl)
130
prettyNode _ (n, lbl) = pretty n <> text ":" <+> text (getDGNodeName lbl)
77
false
true
0
8
25
58
28
30
null
null
bitemyapp/amqp
Network/AMQP/Internal.hs
bsd-3-clause
watchHeartbeats :: Connection -> Int -> ThreadId -> IO ThreadId watchHeartbeats conn timeout connThread = scheduleAtFixedRate rate $ do checkSendTimeout checkReceiveTimeout where rate = timeout * 1000 * 250 -- timeout / 4 in µs receiveTimeout = (fromIntegral rate) * 4 * 2 -- 2*timeout in µs sendTi...
928
watchHeartbeats :: Connection -> Int -> ThreadId -> IO ThreadId watchHeartbeats conn timeout connThread = scheduleAtFixedRate rate $ do checkSendTimeout checkReceiveTimeout where rate = timeout * 1000 * 250 -- timeout / 4 in µs receiveTimeout = (fromIntegral rate) * 4 * 2 -- 2*timeout in µs sendTi...
928
watchHeartbeats conn timeout connThread = scheduleAtFixedRate rate $ do checkSendTimeout checkReceiveTimeout where rate = timeout * 1000 * 250 -- timeout / 4 in µs receiveTimeout = (fromIntegral rate) * 4 * 2 -- 2*timeout in µs sendTimeout = (fromIntegral rate) * 2 -- timeout/2 in µs skippedB...
864
false
true
6
13
198
248
120
128
null
null
brendanhay/gogol
gogol-games/gen/Network/Google/Games/Types/Product.hs
mpl-2.0
-- | The time span of this high score. leTimeSpan :: Lens' LeaderboardEntry (Maybe LeaderboardEntryTimeSpan) leTimeSpan = lens _leTimeSpan (\ s a -> s{_leTimeSpan = a})
170
leTimeSpan :: Lens' LeaderboardEntry (Maybe LeaderboardEntryTimeSpan) leTimeSpan = lens _leTimeSpan (\ s a -> s{_leTimeSpan = a})
131
leTimeSpan = lens _leTimeSpan (\ s a -> s{_leTimeSpan = a})
61
true
true
0
9
27
48
25
23
null
null
markus1189/xmonad-contrib-710
XMonad/Actions/FloatSnap.hs
bsd-3-clause
snapGrow :: Direction2D -- ^ What edge of the window to grow. -> Maybe Int -- ^ The distance in the orthogonal axis to look for windows to snap against. Use Nothing to snap against every window. -> Window -- ^ The window to grow. -> X () snapGrow = snapResize True
283
snapGrow :: Direction2D -- ^ What edge of the window to grow. -> Maybe Int -- ^ The distance in the orthogonal axis to look for windows to snap against. Use Nothing to snap against every window. -> Window -- ^ The window to grow. -> X () snapGrow = snapResize True
283
snapGrow = snapResize True
26
false
true
0
10
70
42
20
22
null
null
HIPERFIT/futhark
src/Futhark/CodeGen/Backends/GenericWASM.hs
isc
extToString (Imp.TransparentValue _ (Imp.ScalarValue (IntType Int32) Imp.TypeDirect _)) = "i32"
95
extToString (Imp.TransparentValue _ (Imp.ScalarValue (IntType Int32) Imp.TypeDirect _)) = "i32"
95
extToString (Imp.TransparentValue _ (Imp.ScalarValue (IntType Int32) Imp.TypeDirect _)) = "i32"
95
false
false
0
11
9
39
19
20
null
null
rubik/stack
src/Stack/Options.hs
bsd-3-clause
ghciOptsParser :: Parser GhciOpts ghciOptsParser = GhciOpts <$> switch (long "no-build" <> help "Don't build before launching GHCi") <*> fmap concat (many (argsOption (long "ghci-options" <> metavar "OPTION" <> help ...
1,194
ghciOptsParser :: Parser GhciOpts ghciOptsParser = GhciOpts <$> switch (long "no-build" <> help "Don't build before launching GHCi") <*> fmap concat (many (argsOption (long "ghci-options" <> metavar "OPTION" <> help ...
1,194
ghciOptsParser = GhciOpts <$> switch (long "no-build" <> help "Don't build before launching GHCi") <*> fmap concat (many (argsOption (long "ghci-options" <> metavar "OPTION" <> help "Additional options passed to GHCi...
1,160
false
true
24
13
548
217
103
114
null
null
rylev/blankfuck
Interpreter.hs
mit
parseIncrementValue :: Parser Instruction parseIncrementValue = tab >> return IncrementValue
92
parseIncrementValue :: Parser Instruction parseIncrementValue = tab >> return IncrementValue
92
parseIncrementValue = tab >> return IncrementValue
50
false
true
2
6
9
28
11
17
null
null
CarstenKoenig/AdventOfCode2016
Day25/Main.hs
mit
getValue :: Value -> Runtime Int getValue (Constant n) = return n
65
getValue :: Value -> Runtime Int getValue (Constant n) = return n
65
getValue (Constant n) = return n
32
false
true
0
7
11
30
14
16
null
null
stevenremot/fronsduk
src/Assembler.hs
gpl-3.0
getOperator "And" = And
23
getOperator "And" = And
23
getOperator "And" = And
23
false
false
0
5
3
9
4
5
null
null
green-haskell/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
idStrictness :: Id -> StrictSig idStrictness id = strictnessInfo (idInfo id)
76
idStrictness :: Id -> StrictSig idStrictness id = strictnessInfo (idInfo id)
76
idStrictness id = strictnessInfo (idInfo id)
44
false
true
0
7
10
27
13
14
null
null
snapframework/io-streams
src/System/IO/Streams/Handle.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | An 'OutputStream' for 'IO.stderr'. stderr :: OutputStream ByteString stderr = unsafePerformIO (handleToOutputStream IO.stderr >>= lockingOutputStream)
260
stderr :: OutputStream ByteString stderr = unsafePerformIO (handleToOutputStream IO.stderr >>= lockingOutputStream)
141
stderr = unsafePerformIO (handleToOutputStream IO.stderr >>= lockingOutputStream)
107
true
true
0
9
43
31
16
15
null
null
sgillespie/ghc
compiler/ghci/GHCi.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Misc utils mkEvalOpts :: DynFlags -> Bool -> EvalOpts mkEvalOpts dflags step = EvalOpts { useSandboxThread = gopt Opt_GhciSandbox dflags , singleStep = step , breakOnException = gopt Opt_BreakOnException dflags , brea...
361
mkEvalOpts :: DynFlags -> Bool -> EvalOpts mkEvalOpts dflags step = EvalOpts { useSandboxThread = gopt Opt_GhciSandbox dflags , singleStep = step , breakOnException = gopt Opt_BreakOnException dflags , breakOnError = gopt Opt_BreakOnError dflags }
265
mkEvalOpts dflags step = EvalOpts { useSandboxThread = gopt Opt_GhciSandbox dflags , singleStep = step , breakOnException = gopt Opt_BreakOnException dflags , breakOnError = gopt Opt_BreakOnError dflags }
222
true
true
0
7
58
67
37
30
null
null
ardumont/haskell-platform
hptool/src/OS/Win/WinPaths.hs
bsd-3-clause
-- | Additional build targets needed for the Windows version of HP winNeeds :: [FilePath] winNeeds = [ nsisFile, nsisInstDat, nsisUninstDat ] ++ winInstExtras
169
winNeeds :: [FilePath] winNeeds = [ nsisFile, nsisInstDat, nsisUninstDat ] ++ winInstExtras
102
winNeeds = [ nsisFile, nsisInstDat, nsisUninstDat ] ++ winInstExtras
79
true
true
0
6
34
28
17
11
null
null
diku-dk/futhark
src/Futhark/CodeGen/ImpGen/GPU/Base.hs
isc
virtualisedGroupScan :: Maybe (Imp.TExp Int32 -> Imp.TExp Int32 -> Imp.TExp Bool) -> Imp.TExp Int32 -> Lambda GPUMem -> [VName] -> InKernelGen () virtualisedGroupScan seg_flag w lam arrs = do groupChunkLoop w $ \chunk_start chunk_size -> do constants <- kernelConstants <$> askEnv let ltid = kernelLo...
1,176
virtualisedGroupScan :: Maybe (Imp.TExp Int32 -> Imp.TExp Int32 -> Imp.TExp Bool) -> Imp.TExp Int32 -> Lambda GPUMem -> [VName] -> InKernelGen () virtualisedGroupScan seg_flag w lam arrs = do groupChunkLoop w $ \chunk_start chunk_size -> do constants <- kernelConstants <$> askEnv let ltid = kernelLo...
1,176
virtualisedGroupScan seg_flag w lam arrs = do groupChunkLoop w $ \chunk_start chunk_size -> do constants <- kernelConstants <$> askEnv let ltid = kernelLocalThreadId constants crosses_segment = case seg_flag of Nothing -> false Just flag_true -> flag_tru...
1,020
false
true
0
22
339
389
182
207
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
ge_RDR = nameRdrName geName
44
ge_RDR = nameRdrName geName
44
ge_RDR = nameRdrName geName
44
false
false
0
5
20
9
4
5
null
null
ghcjs/ghcjs-base
test/Tests/Marshal.hs
mit
to_from_jsval_list_list :: (ToJSVal a, FromJSVal a, Eq a) => TypeName a -> [[a]] -> Property to_from_jsval_list_list _ = to_from_jsval'
135
to_from_jsval_list_list :: (ToJSVal a, FromJSVal a, Eq a) => TypeName a -> [[a]] -> Property to_from_jsval_list_list _ = to_from_jsval'
135
to_from_jsval_list_list _ = to_from_jsval'
42
false
true
0
9
18
52
27
25
null
null
eugenkiss/loopgotowhile
src/Language/LoopGotoWhile/While/Strict.hs
bsd-3-clause
parseConst :: Parser Const parseConst = liftM read (many1 digit <?> "constant")
79
parseConst :: Parser Const parseConst = liftM read (many1 digit <?> "constant")
79
parseConst = liftM read (many1 digit <?> "constant")
52
false
true
1
8
11
32
14
18
null
null
olsner/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
compareIntegerName = varQual gHC_INTEGER_TYPE (fsLit "compareInteger") compareIntegerIdKey
96
compareIntegerName = varQual gHC_INTEGER_TYPE (fsLit "compareInteger") compareIntegerIdKey
96
compareIntegerName = varQual gHC_INTEGER_TYPE (fsLit "compareInteger") compareIntegerIdKey
96
false
false
0
7
12
19
9
10
null
null
KenetJervet/reveal-hs
src/RevealHs/Options.hs
bsd-3-clause
defGroupOptions :: GroupOptions defGroupOptions = GroupOptions { groupWidth = Pixels 960 , groupCSS = "" }
168
defGroupOptions :: GroupOptions defGroupOptions = GroupOptions { groupWidth = Pixels 960 , groupCSS = "" }
168
defGroupOptions = GroupOptions { groupWidth = Pixels 960 , groupCSS = "" }
136
false
true
0
7
77
28
16
12
null
null
fonzerelly/csv-viewer
csv-viewer.hs
mit
dispatch :: [Row] -> CellOffset -> Window Int -> IO () dispatch contents offset w = do let calcVisibleCols index = length visibleRowPart + (sum (map length visibleRowPart)) where visibleRowPart = init (drop index (head contents)) handleKey offset UP | (snd offset) > 0 = ((fst offset),...
1,142
dispatch :: [Row] -> CellOffset -> Window Int -> IO () dispatch contents offset w = do let calcVisibleCols index = length visibleRowPart + (sum (map length visibleRowPart)) where visibleRowPart = init (drop index (head contents)) handleKey offset UP | (snd offset) > 0 = ((fst offset), ...
1,141
dispatch contents offset w = do let calcVisibleCols index = length visibleRowPart + (sum (map length visibleRowPart)) where visibleRowPart = init (drop index (head contents)) handleKey offset UP | (snd offset) > 0 = ((fst offset), (snd offset) - 1) | otherwise = offset ...
1,086
false
true
0
16
405
441
210
231
null
null
rvion/lamdu
Lamdu/Expr/IRef.hs
gpl-3.0
expressionBodyFrom :: MonadA m => Val (Maybe (ValI m), a) -> T m (V.Body (Val (ValI m, a))) expressionBodyFrom = traverse newValFromH . (^. V.body)
159
expressionBodyFrom :: MonadA m => Val (Maybe (ValI m), a) -> T m (V.Body (Val (ValI m, a))) expressionBodyFrom = traverse newValFromH . (^. V.body)
159
expressionBodyFrom = traverse newValFromH . (^. V.body)
55
false
true
0
13
36
81
41
40
null
null
ezyang/ghc
libraries/base/Foreign/C/Error.hs
bsd-3-clause
-- | as 'throwErrnoIfNullRetry', but checks for operations that would block. -- throwErrnoIfNullRetryMayBlock :: String -> IO (Ptr a) -> IO b -> IO (Ptr a) throwErrnoIfNullRetryMayBlock = throwErrnoIfRetryMayBlock (== nullPtr)
227
throwErrnoIfNullRetryMayBlock :: String -> IO (Ptr a) -> IO b -> IO (Ptr a) throwErrnoIfNullRetryMayBlock = throwErrnoIfRetryMayBlock (== nullPtr)
147
throwErrnoIfNullRetryMayBlock = throwErrnoIfRetryMayBlock (== nullPtr)
71
true
true
0
10
31
53
27
26
null
null
ckirkendall/hlisp
Eval.hs
gpl-2.0
evalUnquote :: Expression -> Env -> IO (Expression, Env) evalUnquote (Unquote exp) env = eval exp env
101
evalUnquote :: Expression -> Env -> IO (Expression, Env) evalUnquote (Unquote exp) env = eval exp env
101
evalUnquote (Unquote exp) env = eval exp env
44
false
true
0
10
16
50
23
27
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Framebuffer.hs
bsd-3-clause
stencilBits :: GettableStateVar GLsizei stencilBits = makeGettableStateVar $ getSizei1 id GetStencilBits
104
stencilBits :: GettableStateVar GLsizei stencilBits = makeGettableStateVar $ getSizei1 id GetStencilBits
104
stencilBits = makeGettableStateVar $ getSizei1 id GetStencilBits
64
false
true
1
6
10
26
11
15
null
null
d191562687/codeworld
codeworld-base/src/Internal/Text.hs
apache-2.0
empty :: Text -> Bool empty = T.null
36
empty :: Text -> Bool empty = T.null
36
empty = T.null
14
false
true
0
7
7
24
10
14
null
null
brendanhay/gogol
gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs
mpl-2.0
bbtpType :: Lens' BucketByTimePeriod (Maybe BucketByTimePeriodType) bbtpType = lens _bbtpType (\ s a -> s{_bbtpType = a})
121
bbtpType :: Lens' BucketByTimePeriod (Maybe BucketByTimePeriodType) bbtpType = lens _bbtpType (\ s a -> s{_bbtpType = a})
121
bbtpType = lens _bbtpType (\ s a -> s{_bbtpType = a})
53
false
true
0
9
16
45
24
21
null
null
haskell-streaming/streaming
benchmarks/old/Stream/FreeT/Prelude.hs
bsd-3-clause
-- ------- -- scanr -- ------- scanr :: Monad m => (a -> b -> b) -> b -> FreeT (Of a) m r -> FreeT (Of b) m r scanr op b = buildFreeT . F.scanr op b . foldFreeT
184
scanr :: Monad m => (a -> b -> b) -> b -> FreeT (Of a) m r -> FreeT (Of b) m r scanr op b = buildFreeT . F.scanr op b . foldFreeT
152
scanr op b = buildFreeT . F.scanr op b . foldFreeT
73
true
true
0
11
64
90
45
45
null
null
gabesoft/kapi
src/Api/Documentation.hs
bsd-3-clause
sampleUser :: Record sampleUser = setIdValue recordId sampleUserWithoutId
73
sampleUser :: Record sampleUser = setIdValue recordId sampleUserWithoutId
73
sampleUser = setIdValue recordId sampleUserWithoutId
52
false
true
0
5
7
16
8
8
null
null
facebook/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/MyService.hs
apache-2.0
-- | Translate a 'Types.ThriftVal' to a 'Query_args' to_Query_args :: Types.ThriftVal -> Query_args to_Query_args (Types.TStruct fields) = Query_args{ query_args_s = maybe (query_args_s default_Query_args) (\(_,_val5) -> (case _val5 of {Types.TStruct _val6 -> (Module_Types.to_MyStruct (Types.TStruct _val6)); _ -> err...
581
to_Query_args :: Types.ThriftVal -> Query_args to_Query_args (Types.TStruct fields) = Query_args{ query_args_s = maybe (query_args_s default_Query_args) (\(_,_val5) -> (case _val5 of {Types.TStruct _val6 -> (Module_Types.to_MyStruct (Types.TStruct _val6)); _ -> error "wrong type"})) (Map.lookup (1) fields), query_a...
528
to_Query_args (Types.TStruct fields) = Query_args{ query_args_s = maybe (query_args_s default_Query_args) (\(_,_val5) -> (case _val5 of {Types.TStruct _val6 -> (Module_Types.to_MyStruct (Types.TStruct _val6)); _ -> error "wrong type"})) (Map.lookup (1) fields), query_args_i = maybe (query_args_i default_Query_args)...
481
true
true
0
18
72
219
117
102
null
null
sheyll/b9-vm-image-builder
src/lib/B9.hs
mit
-- | Return the cabal package version of the B9 library. b9Version :: Version b9Version = version
97
b9Version :: Version b9Version = version
40
b9Version = version
19
true
true
0
6
16
19
8
11
null
null
Hara-Laboratory/subleq-toolchain
examples/Main.hs
gpl-3.0
testMult :: Integer -> Integer -> IO [IntSubleqState] testMult a b = do mo <- testMacro let (_, pos, mem) = A.loadModulePacked subleqMA 100 mo M.empty let Just addrAdd = M.lookup "mult" pos let mem' = Mem.write 1 a . Mem.write 2 b . Mem.write 4 (-1) . Mem.write 5 1 $ mem -- let (_,mem'') = runMachin...
523
testMult :: Integer -> Integer -> IO [IntSubleqState] testMult a b = do mo <- testMacro let (_, pos, mem) = A.loadModulePacked subleqMA 100 mo M.empty let Just addrAdd = M.lookup "mult" pos let mem' = Mem.write 1 a . Mem.write 2 b . Mem.write 4 (-1) . Mem.write 5 1 $ mem -- let (_,mem'') = runMachin...
523
testMult a b = do mo <- testMacro let (_, pos, mem) = A.loadModulePacked subleqMA 100 mo M.empty let Just addrAdd = M.lookup "mult" pos let mem' = Mem.write 1 a . Mem.write 2 b . Mem.write 4 (-1) . Mem.write 5 1 $ mem -- let (_,mem'') = runMachine Subleq.step (addrAdd, mem') -- putStrLn $ printf...
469
false
true
0
15
121
192
93
99
null
null
MichaelXavier/heisenberg
src/Heisenberg.hs
bsd-3-clause
------------------------------------------------------------------------------- parallelReporters :: (MonadBaseControl IO m) => ExperimentReporter m a -> ExperimentReporter m a -> ExperimentReporter m a parallelReporters a b o = restoreM =<< liftBaseWith (\runInIO -> let doConc = Concurrently . runInIO . ea...
386
parallelReporters :: (MonadBaseControl IO m) => ExperimentReporter m a -> ExperimentReporter m a -> ExperimentReporter m a parallelReporters a b o = restoreM =<< liftBaseWith (\runInIO -> let doConc = Concurrently . runInIO . eatExceptions in runConcurrently (doConc (a o) *> doConc (b o)))
306
parallelReporters a b o = restoreM =<< liftBaseWith (\runInIO -> let doConc = Concurrently . runInIO . eatExceptions in runConcurrently (doConc (a o) *> doConc (b o)))
175
true
true
0
16
60
119
57
62
null
null
aaronlevin/free-http
src/Network/HTTP/Client/Free/ArbitraryClient.hs
mit
------------------------------------------------------------------------------- -- | Peel a layer of the 'HttpF' functor and generate a random Response. iterTHttp :: ( r ~ ResponseType client , Arbitrary r , Monad m , MonadIO m ) => HttpF client (m a) ...
404
iterTHttp :: ( r ~ ResponseType client , Arbitrary r , Monad m , MonadIO m ) => HttpF client (m a) -> m a iterTHttp (HttpF _ _ next) = head <$> liftIO (sample' arbitrary) >>= next
251
iterTHttp (HttpF _ _ next) = head <$> liftIO (sample' arbitrary) >>= next
73
true
true
0
10
124
98
47
51
null
null
massysett/prednote
genCabal.hs
bsd-3-clause
tasty :: Package tasty = atLeast "tasty" [0,10]
47
tasty :: Package tasty = atLeast "tasty" [0,10]
47
tasty = atLeast "tasty" [0,10]
30
false
true
0
6
7
22
12
10
null
null
patrikja/GRACeFUL
ConstraintModelling/SATSolver.hs
bsd-3-clause
opposite _ _ = False
20
opposite _ _ = False
20
opposite _ _ = False
20
false
false
0
5
4
11
5
6
null
null
alanz/haxl-play
src/main.hs
unlicense
cFork :: (Monad m) => Thread m Bool cFork = liftF (Fork False True)
67
cFork :: (Monad m) => Thread m Bool cFork = liftF (Fork False True)
67
cFork = liftF (Fork False True)
31
false
true
0
7
13
36
18
18
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | A brief status of the snapshot creation. sdStatus :: Lens' SnapshotDetail (Maybe Text) sdStatus = lens _sdStatus (\ s a -> s{_sdStatus = a})
145
sdStatus :: Lens' SnapshotDetail (Maybe Text) sdStatus = lens _sdStatus (\ s a -> s{_sdStatus = a})
99
sdStatus = lens _sdStatus (\ s a -> s{_sdStatus = a})
53
true
true
0
9
25
46
25
21
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
pragRuleDIdKey = mkPreludeMiscIdUnique 334
53
pragRuleDIdKey = mkPreludeMiscIdUnique 334
53
pragRuleDIdKey = mkPreludeMiscIdUnique 334
53
false
false
0
5
14
9
4
5
null
null
nevrenato/Hets_Fork
Comorphisms/HetLogicGraph.hs
gpl-2.0
compute_preImageOfG_sublogics :: Map.Map String G_sublogics -- ^ initial interesting sublogics -> Map.Map String G_sublogics compute_preImageOfG_sublogics initialInterSubl = iterComor Map.empty Map.empty initialInterSubl where iterComor newSublMap alreadyTried queue ...
1,577
compute_preImageOfG_sublogics :: Map.Map String G_sublogics -- ^ initial interesting sublogics -> Map.Map String G_sublogics compute_preImageOfG_sublogics initialInterSubl = iterComor Map.empty Map.empty initialInterSubl where iterComor newSublMap alreadyTried queue ...
1,577
compute_preImageOfG_sublogics initialInterSubl = iterComor Map.empty Map.empty initialInterSubl where iterComor newSublMap alreadyTried queue | Map.null queue = newSublMap | otherwise = case Map.deleteFindMin queue of ((k,gsl),q') -> cas...
1,409
false
true
4
21
776
312
154
158
null
null
gcampax/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
ppType (TyApp (TyCon "MutableArrayArray#") [x]) = "mkMutableArrayArrayPrimTy " ++ ppType x
90
ppType (TyApp (TyCon "MutableArrayArray#") [x]) = "mkMutableArrayArrayPrimTy " ++ ppType x
90
ppType (TyApp (TyCon "MutableArrayArray#") [x]) = "mkMutableArrayArrayPrimTy " ++ ppType x
90
false
false
0
8
10
34
16
18
null
null
mitochon/hexercise
src/haskellbook/ch23/ch23.five.hs
mit
eval :: State s a -> s -> a eval (State sa) = fst . sa
54
eval :: State s a -> s -> a eval (State sa) = fst . sa
54
eval (State sa) = fst . sa
26
false
true
0
7
15
37
18
19
null
null
linusyang/barrelfish
tools/mackerel/CAbsSyntax.hs
mit
pp_binop Divide = "/"
21
pp_binop Divide = "/"
21
pp_binop Divide = "/"
21
false
false
0
5
3
9
4
5
null
null
phischu/hackage-analysis
src/Insertion.hs
bsd-3-clause
splitModuleMap :: Map ModuleName (Either ModuleError [Declaration]) -> (Map ModuleName ModuleError,Map ModuleName [Declaration]) splitModuleMap = mapEither id
158
splitModuleMap :: Map ModuleName (Either ModuleError [Declaration]) -> (Map ModuleName ModuleError,Map ModuleName [Declaration]) splitModuleMap = mapEither id
158
splitModuleMap = mapEither id
29
false
true
2
8
16
58
27
31
null
null
sdiehl/ghc
compiler/utils/UniqSet.hs
bsd-3-clause
partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a) partitionUniqSet p (UniqSet s) = coerce (partitionUFM p s)
129
partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a) partitionUniqSet p (UniqSet s) = coerce (partitionUFM p s)
129
partitionUniqSet p (UniqSet s) = coerce (partitionUFM p s)
58
false
true
0
10
21
68
32
36
null
null
notogawa/VideoCore4
src/VideoCore4/QPU/Instruction/Register.hs
bsd-3-clause
ra19 :: Register ra19 = Register 19 [AR,AW]
43
ra19 :: Register ra19 = Register 19 [AR,AW]
43
ra19 = Register 19 [AR,AW]
26
false
true
0
6
7
22
12
10
null
null
haskell-serverless/management
app/Main.hs
apache-2.0
main :: IO () main = run 8080 (api $ v1 $ packages listPackages readPackage savePackage)
88
main :: IO () main = run 8080 (api $ v1 $ packages listPackages readPackage savePackage)
88
main = run 8080 (api $ v1 $ packages listPackages readPackage savePackage)
74
false
true
0
8
15
39
19
20
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/applicatives/mcbride-paterson-applicative-programming-with-effects/APWE.hs
unlicense
s :: (Env v -> a -> b) -> (Env v -> a) -> (Env v -> b) s ef es env = (ef env) (es env)
86
s :: (Env v -> a -> b) -> (Env v -> a) -> (Env v -> b) s ef es env = (ef env) (es env)
86
s ef es env = (ef env) (es env)
31
false
true
0
11
26
81
38
43
null
null
facebookincubator/duckling
Duckling/Time/FR/Rules.hs
bsd-3-clause
ruleNCyclePassesprecedents :: Rule ruleNCyclePassesprecedents = Rule { name = "n <cycle> passes|precedents" , pattern = [ Predicate $ isIntegerBetween 2 9999 , dimension TimeGrain , regex "pass(e|è|é)(e|è|é)?s?|pr(e|é)c(e|é)dente?s?|(d')? ?avant|plus t(o|ô)t" ] , prod = \tokens -> case tokens of ...
453
ruleNCyclePassesprecedents :: Rule ruleNCyclePassesprecedents = Rule { name = "n <cycle> passes|precedents" , pattern = [ Predicate $ isIntegerBetween 2 9999 , dimension TimeGrain , regex "pass(e|è|é)(e|è|é)?s?|pr(e|é)c(e|é)dente?s?|(d')? ?avant|plus t(o|ô)t" ] , prod = \tokens -> case tokens of ...
453
ruleNCyclePassesprecedents = Rule { name = "n <cycle> passes|precedents" , pattern = [ Predicate $ isIntegerBetween 2 9999 , dimension TimeGrain , regex "pass(e|è|é)(e|è|é)?s?|pr(e|é)c(e|é)dente?s?|(d')? ?avant|plus t(o|ô)t" ] , prod = \tokens -> case tokens of (token:Token TimeGrain grain:_...
418
false
true
0
16
110
124
63
61
null
null