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
Mathnerd314/lamdu
src/Lamdu/Main.hs
gpl-3.0
-- Settings.Examples nextInfoMode Settings.Examples = Settings.None
67
nextInfoMode Settings.Examples = Settings.None
46
nextInfoMode Settings.Examples = Settings.None
46
true
false
0
6
5
14
7
7
null
null
SKA-ScienceDataProcessor/RC
MS1/distributed-dot-product/DNA/SingleThreaded.hs
apache-2.0
interpret (Generate exprN) = do n <- interpret exprN return $ DVector $ S.generate n (const 1)
98
interpret (Generate exprN) = do n <- interpret exprN return $ DVector $ S.generate n (const 1)
98
interpret (Generate exprN) = do n <- interpret exprN return $ DVector $ S.generate n (const 1)
98
false
false
0
10
20
49
22
27
null
null
idris-hackers/idris-bot
src/Main.hs
bsd-3-clause
ellipsis, returnEllipsis :: String ellipsis = applyStyle (color grey Nothing) "…"
81
ellipsis, returnEllipsis :: String ellipsis = applyStyle (color grey Nothing) "…"
81
ellipsis = applyStyle (color grey Nothing) "…"
46
false
true
0
7
10
26
14
12
null
null
kishoredbn/barrelfish
hake/RuleDefs.hs
mit
str2dep :: String -> LibDepTree str2dep str | str == "vfs" = libvfs_deps_all str | str == "vfs_ramfs" = libvfs_deps_ramfs str | str == "vfs_nonfs" = libvfs_deps_nonfs str | str == "vfs_noblockdev"= libvfs_deps_noblockdev str | str == "lwip" = liblwip_deps | str == "ne...
392
str2dep :: String -> LibDepTree str2dep str | str == "vfs" = libvfs_deps_all str | str == "vfs_ramfs" = libvfs_deps_ramfs str | str == "vfs_nonfs" = libvfs_deps_nonfs str | str == "vfs_noblockdev"= libvfs_deps_noblockdev str | str == "lwip" = liblwip_deps | str == "ne...
392
str2dep str | str == "vfs" = libvfs_deps_all str | str == "vfs_ramfs" = libvfs_deps_ramfs str | str == "vfs_nonfs" = libvfs_deps_nonfs str | str == "vfs_noblockdev"= libvfs_deps_noblockdev str | str == "lwip" = liblwip_deps | str == "netQmng" = libnetQmng_deps ...
360
false
true
6
8
125
118
53
65
null
null
shnarazk/mios
src/SAT/Mios/Main.hs
gpl-3.0
analyze :: Solver -> Clause -> IO Int analyze s@Solver{..} confl = do -- litvec reset litsLearnt pushTo litsLearnt 0 -- reserve the first place for the unassigned literal dl <- decisionLevel s let loopOnClauseChain :: Clause -> Lit -> Int -> Int -> Int -> IO Int loopOnClauseChain c p ti bl pathC = do --...
5,061
analyze :: Solver -> Clause -> IO Int analyze s@Solver{..} confl = do -- litvec reset litsLearnt pushTo litsLearnt 0 -- reserve the first place for the unassigned literal dl <- decisionLevel s let loopOnClauseChain :: Clause -> Lit -> Int -> Int -> Int -> IO Int loopOnClauseChain c p ti bl pathC = do --...
5,061
analyze s@Solver{..} confl = do -- litvec reset litsLearnt pushTo litsLearnt 0 -- reserve the first place for the unassigned literal dl <- decisionLevel s let loopOnClauseChain :: Clause -> Lit -> Int -> Int -> Int -> IO Int loopOnClauseChain c p ti bl pathC = do -- p : literal, ti = trail index, bl = b...
5,023
false
true
29
24
1,891
1,466
718
748
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Address' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'aAssociationId' -- -- * 'aInstanceId' -- -- * 'aNetworkInterfaceOwnerId' -- -- * 'aAllocationId' -- -- * 'aDomain' -- -- * 'aNetworkInterfaceId' -- -- *...
670
address :: Address address = Address' { _aAssociationId = Nothing , _aInstanceId = Nothing , _aNetworkInterfaceOwnerId = Nothing , _aAllocationId = Nothing , _aDomain = Nothing , _aNetworkInterfaceId = Nothing , _aPrivateIPAddress = Nothing , _aPublicIP = Nothing }
309
address = Address' { _aAssociationId = Nothing , _aInstanceId = Nothing , _aNetworkInterfaceOwnerId = Nothing , _aAllocationId = Nothing , _aDomain = Nothing , _aNetworkInterfaceId = Nothing , _aPrivateIPAddress = Nothing , _aPublicIP = Nothing }
286
true
true
0
6
144
80
58
22
null
null
rohitjha/MPL
src/Combinatorics.hs
bsd-2-clause
p :: Integer -> Integer -> Integer p n r | n < 1 = error "Usage - p n r, where 'n' is positive." | r < 1 = error "Usage - p n r, where 'r' is positive." | otherwise = product [(a-b+1) .. a] where a = max n r b = min n r {-| The 'permutation' function retur...
569
p :: Integer -> Integer -> Integer p n r | n < 1 = error "Usage - p n r, where 'n' is positive." | r < 1 = error "Usage - p n r, where 'r' is positive." | otherwise = product [(a-b+1) .. a] where a = max n r b = min n r {-| The 'permutation' function retur...
569
p n r | n < 1 = error "Usage - p n r, where 'n' is positive." | r < 1 = error "Usage - p n r, where 'r' is positive." | otherwise = product [(a-b+1) .. a] where a = max n r b = min n r {-| The 'permutation' function returns all possible permutations of a l...
534
false
true
1
9
188
110
53
57
null
null
jasaarim/uncrossed-paths
Main.hs
mit
{-| Regexes for the input arguments -} expectedInput :: [String] expectedInput = [ "^[a-z0-9\\._\\-]+" , "^[1-9][0-9]*" , "^\\([4-9],[4-9]\\)" , "^\\([0-3],[0-3]\\)"]
217
expectedInput :: [String] expectedInput = [ "^[a-z0-9\\._\\-]+" , "^[1-9][0-9]*" , "^\\([4-9],[4-9]\\)" , "^\\([0-3],[0-3]\\)"]
178
expectedInput = [ "^[a-z0-9\\._\\-]+" , "^[1-9][0-9]*" , "^\\([4-9],[4-9]\\)" , "^\\([0-3],[0-3]\\)"]
152
true
true
0
7
70
34
18
16
null
null
cgorski/general-games
src/Game/Game/Poker.hs
mit
-- | -- All full houses in a full deck of playing cards. -- The current implementation traverses the entire list of allPossibleHands, -- and is not efficient. allFullHouse :: [[PlayingCard]] allFullHouse = [x | x <- allPossibleHands, isFullHouse x]
248
allFullHouse :: [[PlayingCard]] allFullHouse = [x | x <- allPossibleHands, isFullHouse x]
89
allFullHouse = [x | x <- allPossibleHands, isFullHouse x]
57
true
true
0
7
39
39
23
16
null
null
samscott89/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
closeTheoryWithMaude :: SignatureWithMaude -> OpenTheory -> ClosedTheory closeTheoryWithMaude sig thy0 = do proveTheory (const True) checkProof $ Theory (L.get thyName thy0) sig cache items where cache = closeRuleCache axioms typAsms sig rules (L.get thyCache thy0) False checkProof = checkAndEx...
2,051
closeTheoryWithMaude :: SignatureWithMaude -> OpenTheory -> ClosedTheory closeTheoryWithMaude sig thy0 = do proveTheory (const True) checkProof $ Theory (L.get thyName thy0) sig cache items where cache = closeRuleCache axioms typAsms sig rules (L.get thyCache thy0) False checkProof = checkAndEx...
2,051
closeTheoryWithMaude sig thy0 = do proveTheory (const True) checkProof $ Theory (L.get thyName thy0) sig cache items where cache = closeRuleCache axioms typAsms sig rules (L.get thyCache thy0) False checkProof = checkAndExtendProver (sorryProver Nothing) -- Maude / Signature handle hnd...
1,978
false
true
2
12
523
490
248
242
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SpeechSynthesisUtterance.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance.rate Mozilla SpeechSynthesisUtterance.rate documentation> setRate :: (MonadDOM m) => SpeechSynthesisUtterance -> Float -> m () setRate self val = liftDOM (self ^. jss "rate" (toJSVal val))
277
setRate :: (MonadDOM m) => SpeechSynthesisUtterance -> Float -> m () setRate self val = liftDOM (self ^. jss "rate" (toJSVal val))
138
setRate self val = liftDOM (self ^. jss "rate" (toJSVal val))
61
true
true
0
10
36
60
30
30
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/THNames.hs
bsd-3-clause
sectionRIdKey = mkPreludeMiscIdUnique 278
45
sectionRIdKey = mkPreludeMiscIdUnique 278
45
sectionRIdKey = mkPreludeMiscIdUnique 278
45
false
false
0
5
7
9
4
5
null
null
meiersi/psqueues-old
tests/Data/PSQ/Class/Tests.hs
bsd-3-clause
test_findMin :: forall psq. (PSQ psq, TestKey (Key psq)) => Tagged psq Assertion test_findMin = Tagged $ do findMin (empty :: psq Int Char) @?= Nothing findMin (fromList [(5, 101, 'a'), (3, 100, 'b')] :: psq Int Char) @?= Just (3, 100, 'b')
264
test_findMin :: forall psq. (PSQ psq, TestKey (Key psq)) => Tagged psq Assertion test_findMin = Tagged $ do findMin (empty :: psq Int Char) @?= Nothing findMin (fromList [(5, 101, 'a'), (3, 100, 'b')] :: psq Int Char) @?= Just (3, 100, 'b')
264
test_findMin = Tagged $ do findMin (empty :: psq Int Char) @?= Nothing findMin (fromList [(5, 101, 'a'), (3, 100, 'b')] :: psq Int Char) @?= Just (3, 100, 'b')
175
false
true
2
13
66
134
69
65
null
null
haskellGardener/yusic
src/Yusic.hs
mit
--fromOctave is a function that takes an Int (our midi values) and returns a list of YNotes from all piano octaves. fromOctave :: Int -> [] YNote fromOctave 0 = A0:As_Bb0:B0 :[]
222
fromOctave :: Int -> [] YNote fromOctave 0 = A0:As_Bb0:B0 :[]
104
fromOctave 0 = A0:As_Bb0:B0 :[]
74
true
true
0
7
76
38
19
19
null
null
Palmik/data-store
src/Data/Store/Selection.hs
bsd-3-clause
resolveSD :: forall tag n krs irs ts v . SelectionDimension n tag krs irs ts -> I.Store tag krs irs ts v -> Data.IntSet.IntSet resolveSD (SelectionDimension _ (Condition False False False) _) _ = {-# SCC "resolveSD" #-} Data.IntSet.empty
258
resolveSD :: forall tag n krs irs ts v . SelectionDimension n tag krs irs ts -> I.Store tag krs irs ts v -> Data.IntSet.IntSet resolveSD (SelectionDimension _ (Condition False False False) _) _ = {-# SCC "resolveSD" #-} Data.IntSet.empty
258
resolveSD (SelectionDimension _ (Condition False False False) _) _ = {-# SCC "resolveSD" #-} Data.IntSet.empty
110
false
true
0
9
60
85
46
39
null
null
cmahon/interactive-brokers
executable/IB.hs
bsd-3-clause
ibContract :: String -> String -> IBContract ibContract sf s = future sf s Nothing GLOBEX "USD"
95
ibContract :: String -> String -> IBContract ibContract sf s = future sf s Nothing GLOBEX "USD"
95
ibContract sf s = future sf s Nothing GLOBEX "USD"
50
false
true
0
6
16
35
17
18
null
null
a5an0/brbot-frontend
src/Main.hs
bsd-3-clause
markUserBack :: ByteString -> Snap() markUserBack userId = do conn <- liftIO $ open "/tmp/brbot.sqlite3" liftIO $ execute conn "DELETE FROM away WHERE uid=(?)" (Only (replace "\"" "" $ show userId)) liftIO $ close conn writeBS "Welcome back!"
250
markUserBack :: ByteString -> Snap() markUserBack userId = do conn <- liftIO $ open "/tmp/brbot.sqlite3" liftIO $ execute conn "DELETE FROM away WHERE uid=(?)" (Only (replace "\"" "" $ show userId)) liftIO $ close conn writeBS "Welcome back!"
250
markUserBack userId = do conn <- liftIO $ open "/tmp/brbot.sqlite3" liftIO $ execute conn "DELETE FROM away WHERE uid=(?)" (Only (replace "\"" "" $ show userId)) liftIO $ close conn writeBS "Welcome back!"
213
false
true
0
13
45
88
39
49
null
null
tjakway/ghcjvm
compiler/basicTypes/OccName.hs
bsd-3-clause
mkPDatasDataConOcc = mk_simple_deriv_with dataName "VPDs:"
58
mkPDatasDataConOcc = mk_simple_deriv_with dataName "VPDs:"
58
mkPDatasDataConOcc = mk_simple_deriv_with dataName "VPDs:"
58
false
false
0
5
4
11
5
6
null
null
slpopejoy/fadno-xml
src/Fadno/MusicXml/MusicXml30.hs
bsd-2-clause
-- | Smart constructor for 'NotationsArticulations' mkNotationsArticulations :: Articulations -> ChxNotations mkNotationsArticulations a = NotationsArticulations a
163
mkNotationsArticulations :: Articulations -> ChxNotations mkNotationsArticulations a = NotationsArticulations a
111
mkNotationsArticulations a = NotationsArticulations a
53
true
true
0
5
15
22
11
11
null
null
shlevy/ghc
compiler/nativeGen/SPARC/Regs.hs
bsd-3-clause
o0 = RegReal (RealRegSingle (oReg 0))
38
o0 = RegReal (RealRegSingle (oReg 0))
38
o0 = RegReal (RealRegSingle (oReg 0))
38
false
false
1
9
6
24
10
14
null
null
wavewave/hoodle-core
src/Hoodle/Coroutine/Window.hs
gpl-3.0
deleteCanvas :: MainCoroutine () deleteCanvas = do xstate <- get let cmap = getCanvasInfoMap xstate currcid = getCurrentCanvasId xstate fstate = view frameState xstate enewfstate = removeWindow currcid fstate case enewfstate of Left _ -> return () Right Nothing -> ret...
1,393
deleteCanvas :: MainCoroutine () deleteCanvas = do xstate <- get let cmap = getCanvasInfoMap xstate currcid = getCurrentCanvasId xstate fstate = view frameState xstate enewfstate = removeWindow currcid fstate case enewfstate of Left _ -> return () Right Nothing -> retu...
1,392
deleteCanvas = do xstate <- get let cmap = getCanvasInfoMap xstate currcid = getCurrentCanvasId xstate fstate = view frameState xstate enewfstate = removeWindow currcid fstate case enewfstate of Left _ -> return () Right Nothing -> return () Right (Just fstate') ...
1,359
false
true
1
18
454
395
177
218
null
null
mitsuji/exp-CloudHaskell
app/ConsoleChatServer.hs
bsd-3-clause
main :: IO () main = do host:port:_ <- getArgs Right t <- createTransport host port defaultTCPParameters pid <- newLocalNode t initRemoteTable >>= forkMain putStrLn $ "EndPoint: " ++ (show $ nodeAddress $ processNodeId pid) _ <- getLine -- [TODO] kill pid return ()
280
main :: IO () main = do host:port:_ <- getArgs Right t <- createTransport host port defaultTCPParameters pid <- newLocalNode t initRemoteTable >>= forkMain putStrLn $ "EndPoint: " ++ (show $ nodeAddress $ processNodeId pid) _ <- getLine -- [TODO] kill pid return ()
280
main = do host:port:_ <- getArgs Right t <- createTransport host port defaultTCPParameters pid <- newLocalNode t initRemoteTable >>= forkMain putStrLn $ "EndPoint: " ++ (show $ nodeAddress $ processNodeId pid) _ <- getLine -- [TODO] kill pid return ()
266
false
true
1
11
58
109
48
61
null
null
kim/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/Types.hs
mpl-2.0
-- | 'Location' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'lLocationCode' @::@ 'Maybe' 'Text' -- -- * 'lLocationName' @::@ 'Maybe' 'Text' -- location :: Location location = Location { _lLocationCode = Nothing , _lLocationName = Nothing }
290
location :: Location location = Location { _lLocationCode = Nothing , _lLocationName = Nothing }
108
location = Location { _lLocationCode = Nothing , _lLocationName = Nothing }
87
true
true
0
7
54
43
25
18
null
null
ggkitsas/HaLVM
examples/IVC/BasicIVC/Peer1.hs
bsd-3-clause
exceptionHandler :: ErrorCode -> IO () exceptionHandler ec = do writeDebugConsole ("RIGHT: Caught exception: " ++ show ec ++ "\n")
132
exceptionHandler :: ErrorCode -> IO () exceptionHandler ec = do writeDebugConsole ("RIGHT: Caught exception: " ++ show ec ++ "\n")
132
exceptionHandler ec = do writeDebugConsole ("RIGHT: Caught exception: " ++ show ec ++ "\n")
93
false
true
0
11
21
43
20
23
null
null
lukexi/rumpus
pristine/Room/Tree.hs
bsd-3-clause
depth :: Num a => a depth = 5
30
depth :: Num a => a depth = 5
29
depth = 5
9
false
true
0
6
9
18
9
9
null
null
mrlovre/super-memory
Pro7/src/Genetic.hs
gpl-3.0
mutateLayer :: MonadRandom mr => (Bool -> Double -> mr Double) -> (Bool -> Vector Double -> mr (Vector Double)) -> NNLayer -> mr NNLayer mutateLayer mutate mutateV l = case l of NNLayerT1{..} -> do chances <- (V.fromListN t1N . map (< Configuration.mutationRate)) <$> getRandoms t1wsN <- V.zipWit...
676
mutateLayer :: MonadRandom mr => (Bool -> Double -> mr Double) -> (Bool -> Vector Double -> mr (Vector Double)) -> NNLayer -> mr NNLayer mutateLayer mutate mutateV l = case l of NNLayerT1{..} -> do chances <- (V.fromListN t1N . map (< Configuration.mutationRate)) <$> getRandoms t1wsN <- V.zipWit...
676
mutateLayer mutate mutateV l = case l of NNLayerT1{..} -> do chances <- (V.fromListN t1N . map (< Configuration.mutationRate)) <$> getRandoms t1wsN <- V.zipWithM mutateV chances t1ws ssN <- V.zipWithM mutateV chances ss return $ NNLayerT1 t1wsN ssN t1N NNLayerT2{..} -> do ...
535
false
true
2
14
170
263
123
140
null
null
ARCCN/hcprobe
src/Network/Openflow/Types.hs
bsd-3-clause
statsRequestToType (OfpPortStatsRequest _) = OFPST_PORT
64
statsRequestToType (OfpPortStatsRequest _) = OFPST_PORT
64
statsRequestToType (OfpPortStatsRequest _) = OFPST_PORT
64
false
false
0
7
13
15
7
8
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M11/D08/Solution.hs
mit
-- first, define a JSON instance for the keyphrases: {-- instance ToJSON Keyphrase where toJSON (KW strength (SQS str)) = object ["strength" .= strength, "keyphrase" .= str] -- move this definition to Y2017.M11.D07.Solution --} -- And now, save out the recommendation with score and keyphrases as JSON saveR...
462
saveRecs :: FilePath -> KeyphraseMap -> [Recommendation] -> IO () saveRecs outputfile keyphrases = BL.writeFile outputfile . showRecs keyphrases
147
saveRecs outputfile keyphrases = BL.writeFile outputfile . showRecs keyphrases
81
true
true
0
10
81
55
27
28
null
null
kapilash/hs-azure
azure-servicebus/Web/WindowsAzure/ServiceBus/Topic.hs
apache-2.0
-- | Internal low-level method for performing HTTP calls. -- -- Not exposed to the user sendTopicRequest :: String -> RequestBody -> SBContext -> IO () sendTopicRequest topicName body (SBContext baseUrl manager aContext) = do token <- acsToken manager aContext reqInit <- parseUrl (baseUrl ++ "/" ++ topicName ++ "/...
626
sendTopicRequest :: String -> RequestBody -> SBContext -> IO () sendTopicRequest topicName body (SBContext baseUrl manager aContext) = do token <- acsToken manager aContext reqInit <- parseUrl (baseUrl ++ "/" ++ topicName ++ "/messages") withSocketsDo $ httpLbs (reqInit { method = methodPost, ...
538
sendTopicRequest topicName body (SBContext baseUrl manager aContext) = do token <- acsToken manager aContext reqInit <- parseUrl (baseUrl ++ "/" ++ topicName ++ "/messages") withSocketsDo $ httpLbs (reqInit { method = methodPost, requestHeaders = [token], requestBody = b...
474
true
true
0
12
158
134
70
64
null
null
jeffreyrosenbluth/flourine
src/Fluorine/HTML.hs
bsd-3-clause
dt_ :: [HTML i] -> HTML i dt_ = dt mempty
41
dt_ :: [HTML i] -> HTML i dt_ = dt mempty
41
dt_ = dt mempty
15
false
true
0
8
10
33
14
19
null
null
lhoghu/yahoo-portfolio-manager
ypm-cli/Data/YahooPortfolioManager/Cli/Main.hs
mit
options :: [OptDescr Flag] options = [ Option ['v'] ["version"] (NoArg Version) "Show version number" , Option ['s'] ["show"] (NoArg ShowPortfolio) "Show current portfolio" , Option ['u'] ["update"] (NoArg Update) "Show the market position" , Option ['a'] ["add"] (NoArg AddSymbol)...
722
options :: [OptDescr Flag] options = [ Option ['v'] ["version"] (NoArg Version) "Show version number" , Option ['s'] ["show"] (NoArg ShowPortfolio) "Show current portfolio" , Option ['u'] ["update"] (NoArg Update) "Show the market position" , Option ['a'] ["add"] (NoArg AddSymbol)...
722
options = [ Option ['v'] ["version"] (NoArg Version) "Show version number" , Option ['s'] ["show"] (NoArg ShowPortfolio) "Show current portfolio" , Option ['u'] ["update"] (NoArg Update) "Show the market position" , Option ['a'] ["add"] (NoArg AddSymbol) "Add a symbol to the...
695
false
true
0
9
188
216
114
102
null
null
wxwxwwxxx/ghc
libraries/base/GHC/List.hs
bsd-3-clause
filterFB :: (a -> b -> b) -> (a -> Bool) -> a -> b -> b filterFB c p x r | p x = x `c` r | otherwise = r
127
filterFB :: (a -> b -> b) -> (a -> Bool) -> a -> b -> b filterFB c p x r | p x = x `c` r | otherwise = r
127
filterFB c p x r | p x = x `c` r | otherwise = r
71
false
true
0
8
55
78
39
39
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The format of the disk image being imported. -- -- Valid values: 'RAW' | 'VHD' | 'VMDK' | 'OVA' sdcFormat :: Lens' SnapshotDiskContainer (Maybe Text) sdcFormat = lens _sdcFormat (\ s a -> s{_sdcFormat = a})
211
sdcFormat :: Lens' SnapshotDiskContainer (Maybe Text) sdcFormat = lens _sdcFormat (\ s a -> s{_sdcFormat = a})
110
sdcFormat = lens _sdcFormat (\ s a -> s{_sdcFormat = a})
56
true
true
0
9
37
48
27
21
null
null
markus-git/imperative-edsl-vhdl
src/Language/Embedded/Hardware/Command/Frontend.hs
bsd-3-clause
-- | Freeze an array into an immutable one by copying. freezeArray :: (ArrayCMD :<: instr, pred a, Num (exp Integer), Monad m) => Array a -> exp Integer -> ProgramT instr (Param2 exp pred) m (IArray a) freezeArray array len = do copy <- newArray len copyArray (copy,0) (array,0) len unsafeFreezeArray copy ...
380
freezeArray :: (ArrayCMD :<: instr, pred a, Num (exp Integer), Monad m) => Array a -> exp Integer -> ProgramT instr (Param2 exp pred) m (IArray a) freezeArray array len = do copy <- newArray len copyArray (copy,0) (array,0) len unsafeFreezeArray copy -- | Thaw an immutable array into a mutable one by cop...
325
freezeArray array len = do copy <- newArray len copyArray (copy,0) (array,0) len unsafeFreezeArray copy -- | Thaw an immutable array into a mutable one by copying.
176
true
true
0
11
79
133
64
69
null
null
nushio3/Paraiso
attic/TestAxis.hs
bsd-3-clause
v :: Vec4 Double v = Vec :~ 0 :~ 1 :~ 2 :~ 3
44
v :: Vec4 Double v = Vec :~ 0 :~ 1 :~ 2 :~ 3
44
v = Vec :~ 0 :~ 1 :~ 2 :~ 3
27
false
true
8
6
14
40
16
24
null
null
plow-technologies/live-vdom
src/LiveVDom/Message.hs
mit
-- | Run all messages runMessages :: Message a -> IO a runMessages = unMessage
78
runMessages :: Message a -> IO a runMessages = unMessage
56
runMessages = unMessage
23
true
true
0
6
14
22
11
11
null
null
BartAdv/hoogle
src/Action/Server.hs
bsd-3-clause
action_server_test :: FilePath -> IO () action_server_test database = do testing "Action.Server.displayItem" $ do let expand = replace "{" "<b>" . replace "}" "</b>" . replace "<0>" "" . replace "</0>" "" contract = replace "{" "" . replace "}" "" let q === s | displayItem (parseQuery q)...
1,331
action_server_test :: FilePath -> IO () action_server_test database = do testing "Action.Server.displayItem" $ do let expand = replace "{" "<b>" . replace "}" "</b>" . replace "<0>" "" . replace "</0>" "" contract = replace "{" "" . replace "}" "" let q === s | displayItem (parseQuery q)...
1,331
action_server_test database = do testing "Action.Server.displayItem" $ do let expand = replace "{" "<b>" . replace "}" "</b>" . replace "<0>" "" . replace "</0>" "" contract = replace "{" "" . replace "}" "" let q === s | displayItem (parseQuery q) (contract s) == expand s = putChar '.' ...
1,291
false
true
0
21
338
369
170
199
null
null
hjwylde/werewolf
app/Game/Werewolf/Variant/NoRoleReveal/Engine.hs
bsd-3-clause
playerTurnedToStoneText :: Player -> Text playerTurnedToStoneText player = [iFile|variant/no-role-reveal/engine/sunrise/player-turned-to-stone.txt|]
148
playerTurnedToStoneText :: Player -> Text playerTurnedToStoneText player = [iFile|variant/no-role-reveal/engine/sunrise/player-turned-to-stone.txt|]
148
playerTurnedToStoneText player = [iFile|variant/no-role-reveal/engine/sunrise/player-turned-to-stone.txt|]
106
false
true
0
5
8
22
13
9
null
null
dgvncsz0f/nws
src/Jerimum/PostgreSQL/Types/Type.hs
bsd-3-clause
formatType (RangeType _) = error "fixme"
40
formatType (RangeType _) = error "fixme"
40
formatType (RangeType _) = error "fixme"
40
false
false
0
6
5
19
8
11
null
null
aslatter/parsec
src/Text/Parsec/Prim.hs
bsd-2-clause
token :: (Stream s Identity t) => (t -> String) -- ^ Token pretty-printing function. -> (t -> SourcePos) -- ^ Computes the position of a token. -> (t -> Maybe a) -- ^ Matching function for the token to parse. -> Parsec s u a token showToken tokpos test = tokenPrim sh...
1,289
token :: (Stream s Identity t) => (t -> String) -- ^ Token pretty-printing function. -> (t -> SourcePos) -- ^ Computes the position of a token. -> (t -> Maybe a) -- ^ Matching function for the token to parse. -> Parsec s u a token showToken tokpos test = tokenPrim sh...
1,289
token showToken tokpos test = tokenPrim showToken nextpos test where nextpos _ tok ts = case runIdentity (uncons ts) of Nothing -> tokpos tok Just (tok',_) -> tokpos tok' -- | The parser @tokenPrim showTok nextPos testTok@ accepts a token @t@ -- wit...
1,011
false
true
1
12
375
157
86
71
null
null
daleooo/barrelfish
tools/flounder/CAbsSyntax.hs
mit
pp_expr (PostInc e) = (pp_par_expr e) ++ "++"
45
pp_expr (PostInc e) = (pp_par_expr e) ++ "++"
45
pp_expr (PostInc e) = (pp_par_expr e) ++ "++"
45
false
false
0
7
7
25
12
13
null
null
comonoidial/ALFIN
Alfin/FromCore.hs
mit
introFix :: QName -> [ShapeType] -> ShapeType -> Context () introFix f as rt = do (fs,cs,xs,n) <- get put ((f,(as, FixFun rt)):fs,cs,xs,n)
142
introFix :: QName -> [ShapeType] -> ShapeType -> Context () introFix f as rt = do (fs,cs,xs,n) <- get put ((f,(as, FixFun rt)):fs,cs,xs,n)
142
introFix f as rt = do (fs,cs,xs,n) <- get put ((f,(as, FixFun rt)):fs,cs,xs,n)
82
false
true
0
13
26
99
52
47
null
null
OpenXT/manager
xenmgr/XenMgr/Config.hs
gpl-2.0
appSetSwitcherEnabled v = dbWrite "/switcher/enabled" v
55
appSetSwitcherEnabled v = dbWrite "/switcher/enabled" v
55
appSetSwitcherEnabled v = dbWrite "/switcher/enabled" v
55
false
false
0
5
5
14
6
8
null
null
mlang/haskore-braille
src/Haskore/Interface/Braille.hs
gpl-3.0
notegroup :: PVDisambiguator notegroup = do Sequential (x:xs) <- gets snd asum $ map (tryLine $ mkDistinct small x) $ spans body xs where body AmbiguousNote {ambiguousValue = av} = av == EighthOr128th body _ = False tryLine :: Distinct -> ([AmbiguousSign], [Ambiguo...
850
notegroup :: PVDisambiguator notegroup = do Sequential (x:xs) <- gets snd asum $ map (tryLine $ mkDistinct small x) $ spans body xs where body AmbiguousNote {ambiguousValue = av} = av == EighthOr128th body _ = False tryLine :: Distinct -> ([AmbiguousSign], [Ambiguo...
850
notegroup = do Sequential (x:xs) <- gets snd asum $ map (tryLine $ mkDistinct small x) $ spans body xs where body AmbiguousNote {ambiguousValue = av} = av == EighthOr128th body _ = False tryLine :: Distinct -> ([AmbiguousSign], [AmbiguousSign]) -> PVDisambiguator ...
821
false
true
0
17
340
252
121
131
null
null
typelead/epm
epm/Distribution/Client/Setup.hs
bsd-3-clause
haddockOptions :: ShowOrParseArgs -> [OptionField HaddockFlags] haddockOptions showOrParseArgs = [ opt { optionName = "haddock-" ++ name, optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map ("haddock-" ++) lflags)) descr | descr <- optionDescr opt] } | opt <- commandOption...
1,041
haddockOptions :: ShowOrParseArgs -> [OptionField HaddockFlags] haddockOptions showOrParseArgs = [ opt { optionName = "haddock-" ++ name, optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map ("haddock-" ++) lflags)) descr | descr <- optionDescr opt] } | opt <- commandOption...
1,041
haddockOptions showOrParseArgs = [ opt { optionName = "haddock-" ++ name, optionDescr = [ fmapOptFlags (\(_, lflags) -> ([], map ("haddock-" ++) lflags)) descr | descr <- optionDescr opt] } | opt <- commandOptions Cabal.haddockCommand showOrParseArgs , let name = optionNa...
977
false
true
0
14
287
388
207
181
null
null
ssaavedra/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs
bsd-3-clause
-- | /O(1)/ Unlike 'cons', 'cons\'' is -- strict in the ByteString that we are consing onto. More precisely, it forces -- the head and the first chunk. It does this because, for space efficiency, it -- may coalesce the new byte onto the first \'chunk\' rather than starting a -- new \'chunk\'. -- -- So that means you ca...
710
cons' :: Word8 -> ByteString -> ByteString cons' w (Chunk c cs) | S.length c < 16 = Chunk (S.cons w c) cs
105
cons' w (Chunk c cs) | S.length c < 16 = Chunk (S.cons w c) cs
62
true
true
0
10
137
76
43
33
null
null
alexvong1995/pandoc
src/Text/Pandoc/Options.hs
gpl-2.0
pandocExtensions :: Set Extension pandocExtensions = Set.fromList [ Ext_footnotes , Ext_inline_notes , Ext_pandoc_title_block , Ext_yaml_metadata_block , Ext_table_captions , Ext_implicit_figures , Ext_simple_tables , Ext_multiline_tables , Ext_grid_tables , Ext_pipe_tables , Ext_citations , Ext...
1,013
pandocExtensions :: Set Extension pandocExtensions = Set.fromList [ Ext_footnotes , Ext_inline_notes , Ext_pandoc_title_block , Ext_yaml_metadata_block , Ext_table_captions , Ext_implicit_figures , Ext_simple_tables , Ext_multiline_tables , Ext_grid_tables , Ext_pipe_tables , Ext_citations , Ext...
1,013
pandocExtensions = Set.fromList [ Ext_footnotes , Ext_inline_notes , Ext_pandoc_title_block , Ext_yaml_metadata_block , Ext_table_captions , Ext_implicit_figures , Ext_simple_tables , Ext_multiline_tables , Ext_grid_tables , Ext_pipe_tables , Ext_citations , Ext_raw_tex , Ext_raw_html , Ext_...
979
false
true
1
5
165
139
87
52
null
null
Warbo/quickcheck
examples/Heap_Program.hs
bsd-3-clause
prop_Unit x = unit x ==? [x]
30
prop_Unit x = unit x ==? [x]
30
prop_Unit x = unit x ==? [x]
30
false
false
0
6
8
19
9
10
null
null
mmarx/jebediah
cli/vehicle-assembly-building/Main.hs
gpl-3.0
toLead1 t = toLead Violin t
27
toLead1 t = toLead Violin t
27
toLead1 t = toLead Violin t
27
false
false
0
5
5
14
6
8
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_ENGLISH_PHILIPPINES :: Int wxLANGUAGE_ENGLISH_PHILIPPINES = 68
73
wxLANGUAGE_ENGLISH_PHILIPPINES :: Int wxLANGUAGE_ENGLISH_PHILIPPINES = 68
73
wxLANGUAGE_ENGLISH_PHILIPPINES = 68
35
false
true
0
4
5
11
6
5
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Printing/Import.hs
bsd-2-clause
neg' _ = False
33
neg' _ = False
33
neg' _ = False
33
false
false
0
4
22
10
4
6
null
null
rueshyna/gogol
gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/Delete.hs
mpl-2.0
-- | OAuth access token. odAccessToken :: Lens' OperationsDelete (Maybe Text) odAccessToken = lens _odAccessToken (\ s a -> s{_odAccessToken = a})
154
odAccessToken :: Lens' OperationsDelete (Maybe Text) odAccessToken = lens _odAccessToken (\ s a -> s{_odAccessToken = a})
129
odAccessToken = lens _odAccessToken (\ s a -> s{_odAccessToken = a})
76
true
true
0
9
29
48
25
23
null
null
egison/egison
hs-src/Language/Egison/Tensor.hs
mit
tToVector (Scalar x) = V.fromList [x]
42
tToVector (Scalar x) = V.fromList [x]
42
tToVector (Scalar x) = V.fromList [x]
42
false
false
0
7
10
23
11
12
null
null
ml9951/ghc
compiler/main/HscTypes.hs
bsd-3-clause
implicitTyThings (ACoAxiom _cc) = []
36
implicitTyThings (ACoAxiom _cc) = []
36
implicitTyThings (ACoAxiom _cc) = []
36
false
false
0
7
4
17
8
9
null
null
ekmett/stackage
Stackage/Util.hs
mit
dataDir = (</> "share") . sandboxRoot
37
dataDir = (</> "share") . sandboxRoot
37
dataDir = (</> "share") . sandboxRoot
37
false
false
2
5
5
19
8
11
null
null
Chobbes/Juicy.Pixels
src/Codec/Picture/Gif.hs
bsd-3-clause
disposalMethodOfCode :: Word8 -> DisposalMethod disposalMethodOfCode v = case v of 0 -> DisposalAny 1 -> DisposalDoNot 2 -> DisposalRestoreBackground 3 -> DisposalRestorePrevious n -> DisposalUnknown n
221
disposalMethodOfCode :: Word8 -> DisposalMethod disposalMethodOfCode v = case v of 0 -> DisposalAny 1 -> DisposalDoNot 2 -> DisposalRestoreBackground 3 -> DisposalRestorePrevious n -> DisposalUnknown n
221
disposalMethodOfCode v = case v of 0 -> DisposalAny 1 -> DisposalDoNot 2 -> DisposalRestoreBackground 3 -> DisposalRestorePrevious n -> DisposalUnknown n
173
false
true
2
5
46
39
23
16
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 224939 = 270
32
getValueFromProduct 224939 = 270
32
getValueFromProduct 224939 = 270
32
false
false
0
5
3
9
4
5
null
null
bergey/plots
examples/scatter-2.hs
bsd-3-clause
mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6, V2 3.5 5]
54
mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6, V2 3.5 5]
54
mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6, V2 3.5 5]
54
false
false
1
6
13
41
19
22
null
null
gbwey/persistent
persistent-template/Database/Persist/TH.hs
mit
unKeyName :: EntityDef -> Name unKeyName t = mkName $ "un" `mappend` keyString t
80
unKeyName :: EntityDef -> Name unKeyName t = mkName $ "un" `mappend` keyString t
80
unKeyName t = mkName $ "un" `mappend` keyString t
49
false
true
0
6
13
31
16
15
null
null
acfoltzer/off-simple
Graphics/Formats/OFF/Simple.hs
bsd-3-clause
-- | Parse a line of vertex coordinates. parseVertex :: Parser Vertex parseVertex = do [x, y, z] <- count 3 (parseDouble <* spaces) return (x, y, z) <?> "x, y, z coordinates"
184
parseVertex :: Parser Vertex parseVertex = do [x, y, z] <- count 3 (parseDouble <* spaces) return (x, y, z) <?> "x, y, z coordinates"
143
parseVertex = do [x, y, z] <- count 3 (parseDouble <* spaces) return (x, y, z) <?> "x, y, z coordinates"
114
true
true
2
10
42
69
34
35
null
null
denisshevchenko/breadu.info
src/lib/BreadU/Pages/Content/Errors/HTTP404.hs
mit
http404Content De = ContentHTTP404 { error404PageTitle = "404 Fehler" , error404Description = "Die von Ihnen gesuchte Seite existiert nicht." , error404GoToIndexPage = "Bitte gehen Sie zurück zur" , error404IndexPageName = "Homepage" }
261
http404Content De = ContentHTTP404 { error404PageTitle = "404 Fehler" , error404Description = "Die von Ihnen gesuchte Seite existiert nicht." , error404GoToIndexPage = "Bitte gehen Sie zurück zur" , error404IndexPageName = "Homepage" }
261
http404Content De = ContentHTTP404 { error404PageTitle = "404 Fehler" , error404Description = "Die von Ihnen gesuchte Seite existiert nicht." , error404GoToIndexPage = "Bitte gehen Sie zurück zur" , error404IndexPageName = "Homepage" }
261
false
false
0
7
57
39
22
17
null
null
glutamate/cmdtheline
src/System/Console/CmdTheLine/Err.hs
mit
-- | Fail with an arbitrary message on failure. msgFail :: Doc -> Err a msgFail = throwError . MsgFail
102
msgFail :: Doc -> Err a msgFail = throwError . MsgFail
54
msgFail = throwError . MsgFail
30
true
true
0
7
19
29
13
16
null
null
iblumenfeld/saw-core
src/Verifier/SAW/TypedAST.hs
bsd-3-clause
lift2 :: (a -> b) -> (b -> b -> c) -> a -> a -> c lift2 f h x y = h (f x) (f y)
79
lift2 :: (a -> b) -> (b -> b -> c) -> a -> a -> c lift2 f h x y = h (f x) (f y)
79
lift2 f h x y = h (f x) (f y)
29
false
true
0
9
27
71
36
35
null
null
Persi/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readGlob3 = isOk readGlob "[a[:alpha:]]"
45
prop_readGlob3 = isOk readGlob "[a[:alpha:]]"
45
prop_readGlob3 = isOk readGlob "[a[:alpha:]]"
45
false
false
0
5
4
11
5
6
null
null
vikraman/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
dynamicLinkerLabelInfo _ = Nothing
41
dynamicLinkerLabelInfo _ = Nothing
41
dynamicLinkerLabelInfo _ = Nothing
41
false
false
0
5
10
9
4
5
null
null
wginolas/playground
haskell/happstack-test/dist/build/autogen/Paths_happstack_test.hs
lgpl-3.0
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
75
false
true
0
10
22
45
21
24
null
null
diku-dk/futhark
src/Language/Futhark/Prop.hs
isc
-- | The type scheme of a value binding, comprising the type -- parameters and the actual type. valBindTypeScheme :: ValBindBase Info VName -> ([TypeParamBase VName], StructType) valBindTypeScheme vb = ( valBindTypeParams vb, funType (valBindParams vb) (unInfo (valBindRetType vb)) )
291
valBindTypeScheme :: ValBindBase Info VName -> ([TypeParamBase VName], StructType) valBindTypeScheme vb = ( valBindTypeParams vb, funType (valBindParams vb) (unInfo (valBindRetType vb)) )
195
valBindTypeScheme vb = ( valBindTypeParams vb, funType (valBindParams vb) (unInfo (valBindRetType vb)) )
112
true
true
0
10
47
69
36
33
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 267197 = 2208
33
getValueFromProduct 267197 = 2208
33
getValueFromProduct 267197 = 2208
33
false
false
0
5
3
9
4
5
null
null
wiggly/workshop
app/Context.hs
bsd-3-clause
functionYourNumbers :: (Int -> Int) -> [Int] -> [Int] functionYourNumbers fn = map fn
85
functionYourNumbers :: (Int -> Int) -> [Int] -> [Int] functionYourNumbers fn = map fn
85
functionYourNumbers fn = map fn
31
false
true
0
7
13
38
20
18
null
null
rimmington/unordered-containers
Data/HashMap/Base.hs
bsd-3-clause
isLeafOrCollision :: HashMap k v -> Bool isLeafOrCollision (Leaf _ _) = True
81
isLeafOrCollision :: HashMap k v -> Bool isLeafOrCollision (Leaf _ _) = True
81
isLeafOrCollision (Leaf _ _) = True
40
false
true
0
7
17
31
15
16
null
null
verement/etamoo
src/MOO/Compiler.hs
bsd-3-clause
_ `remain` _ = raise E_TYPE
35
_ `remain` _ = raise E_TYPE
35
_ `remain` _ = raise E_TYPE
35
false
false
0
5
13
17
8
9
null
null
steve-chavez/postgrest
src/PostgREST/DbStructure.hs
mit
decodeTables :: HD.Result [Table] decodeTables = HD.rowList tblRow where tblRow = Table <$> column HD.text <*> column HD.text <*> nullableColumn HD.text <*> column HD.bool <*> column HD.bool <*> column HD.bool
299
decodeTables :: HD.Result [Table] decodeTables = HD.rowList tblRow where tblRow = Table <$> column HD.text <*> column HD.text <*> nullableColumn HD.text <*> column HD.bool <*> column HD.bool <*> column HD.bool
299
decodeTables = HD.rowList tblRow where tblRow = Table <$> column HD.text <*> column HD.text <*> nullableColumn HD.text <*> column HD.bool <*> column HD.bool <*> column HD.bool
265
false
true
18
7
119
111
51
60
null
null
rvion/lamdu
Lamdu/Sugar/Convert/ParamList.hs
gpl-3.0
mkFuncType :: Infer.Payload -> ParamList -> Infer Type mkFuncType inferred paramList = T.TFun <$> (T.TRecord <$> foldr step (pure T.CEmpty) paramList) <*> Infer.freshInferredVar scope "l" where scope = inferred ^. Infer.plScope step tag rest = T.CExtend tag <$> Infer.freshInferredVar sco...
335
mkFuncType :: Infer.Payload -> ParamList -> Infer Type mkFuncType inferred paramList = T.TFun <$> (T.TRecord <$> foldr step (pure T.CEmpty) paramList) <*> Infer.freshInferredVar scope "l" where scope = inferred ^. Infer.plScope step tag rest = T.CExtend tag <$> Infer.freshInferredVar sco...
335
mkFuncType inferred paramList = T.TFun <$> (T.TRecord <$> foldr step (pure T.CEmpty) paramList) <*> Infer.freshInferredVar scope "l" where scope = inferred ^. Infer.plScope step tag rest = T.CExtend tag <$> Infer.freshInferredVar scope "t" <*> rest
280
false
true
0
12
74
113
55
58
null
null
dmbarbour/awelon
hsrc_util/ShowEnv.hs
bsd-3-clause
showNamedStacks v = showString "???: " . shows v . showChar '\n'
69
showNamedStacks v = showString "???: " . shows v . showChar '\n'
69
showNamedStacks v = showString "???: " . shows v . showChar '\n'
69
false
false
1
7
16
29
11
18
null
null
spechub/Hets
Common/Keywords.hs
gpl-2.0
floatingS :: String floatingS = "floating"
42
floatingS :: String floatingS = "floating"
42
floatingS = "floating"
22
false
true
0
6
5
18
7
11
null
null
biegunka/biegunka
test/spec/Control/Biegunka/Source/GitSpec.hs
mit
addNewFile :: FilePath -> IO () addNewFile fp = () <$ do setCredentials fp let anotherFile = fp </> "another-file" writeFile anotherFile "something" Git.runGit fp ["add", anotherFile] Git.runGit fp ["commit", "-m", "add new file"]
240
addNewFile :: FilePath -> IO () addNewFile fp = () <$ do setCredentials fp let anotherFile = fp </> "another-file" writeFile anotherFile "something" Git.runGit fp ["add", anotherFile] Git.runGit fp ["commit", "-m", "add new file"]
240
addNewFile fp = () <$ do setCredentials fp let anotherFile = fp </> "another-file" writeFile anotherFile "something" Git.runGit fp ["add", anotherFile] Git.runGit fp ["commit", "-m", "add new file"]
208
false
true
0
11
43
91
43
48
null
null
kumasento/accelerate-cuda
Data/Array/Accelerate/CUDA/CodeGen.hs
bsd-3-clause
codegenFloatingScalar (TypeDouble _) x = C.Const (C.DoubleConst (show x) (toRational x) noLoc) noLoc
101
codegenFloatingScalar (TypeDouble _) x = C.Const (C.DoubleConst (show x) (toRational x) noLoc) noLoc
101
codegenFloatingScalar (TypeDouble _) x = C.Const (C.DoubleConst (show x) (toRational x) noLoc) noLoc
101
false
false
0
9
13
48
23
25
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_PACK_SKIP_ROWS :: GLenum gl_PACK_SKIP_ROWS = 0x0D03
54
gl_PACK_SKIP_ROWS :: GLenum gl_PACK_SKIP_ROWS = 0x0D03
54
gl_PACK_SKIP_ROWS = 0x0D03
26
false
true
0
4
5
11
6
5
null
null
timjs/spl-compiler
src/Language/SPL/Data/Instruction.hs
bsd-3-clause
tabstop :: Int tabstop = 16
27
tabstop :: Int tabstop = 16
27
tabstop = 16
12
false
true
0
6
5
18
7
11
null
null
jystic/mothership
src/Snap/Util.hs
bsd-3-clause
cacheForever :: MonadSnap m => m () cacheForever = expires 31536000
67
cacheForever :: MonadSnap m => m () cacheForever = expires 31536000
67
cacheForever = expires 31536000
31
false
true
0
7
10
26
12
14
null
null
astro/haskell-torrent
src/BCode.hs
bsd-2-clause
search (PInt i : rest) (BArray bs) | i < 0 || i > length bs = Nothing | otherwise = search rest (bs!!i)
138
search (PInt i : rest) (BArray bs) | i < 0 || i > length bs = Nothing | otherwise = search rest (bs!!i)
138
search (PInt i : rest) (BArray bs) | i < 0 || i > length bs = Nothing | otherwise = search rest (bs!!i)
138
false
false
1
10
58
69
32
37
null
null
holzensp/ghc
compiler/cmm/PprC.hs
bsd-3-clause
te_Lit _ = return ()
20
te_Lit _ = return ()
20
te_Lit _ = return ()
20
false
false
0
6
4
14
6
8
null
null
keithshep/txt-sushi
Database/TxtSushi/SQLParser.hs
bsd-3-clause
maybeParseGroupByPart :: GenParser Char st (Maybe ([Expression], Maybe Expression)) maybeParseGroupByPart = ifParseThen -- if we see a "GROUP BY" (parseToken "GROUP") -- then parse the expressions (parseToken "BY" >> parseGroupBy) where parseGroupBy = do ...
487
maybeParseGroupByPart :: GenParser Char st (Maybe ([Expression], Maybe Expression)) maybeParseGroupByPart = ifParseThen -- if we see a "GROUP BY" (parseToken "GROUP") -- then parse the expressions (parseToken "BY" >> parseGroupBy) where parseGroupBy = do ...
487
maybeParseGroupByPart = ifParseThen -- if we see a "GROUP BY" (parseToken "GROUP") -- then parse the expressions (parseToken "BY" >> parseGroupBy) where parseGroupBy = do groupExprs <- atLeastOneExpr maybeHavingExpr <- ifParseThen (pa...
403
false
true
0
10
143
104
52
52
null
null
vu3rdd/functorrent
src/FuncTorrent/Peer.hs
gpl-3.0
doHandshake :: Bool -> Handle -> Peer -> ByteString -> String -> IO () doHandshake True h p infohash peerid = do let hs = genHandshakeMsg infohash peerid hPut h hs putStrLn $ "--> handhake to peer: " ++ show p hsMsg <- hGet h (length (unpack hs)) putStrLn $ "<-- handshake from peer: " ++ show p infoPieceMap...
516
doHandshake :: Bool -> Handle -> Peer -> ByteString -> String -> IO () doHandshake True h p infohash peerid = do let hs = genHandshakeMsg infohash peerid hPut h hs putStrLn $ "--> handhake to peer: " ++ show p hsMsg <- hGet h (length (unpack hs)) putStrLn $ "<-- handshake from peer: " ++ show p infoPieceMap...
516
doHandshake True h p infohash peerid = do let hs = genHandshakeMsg infohash peerid hPut h hs putStrLn $ "--> handhake to peer: " ++ show p hsMsg <- hGet h (length (unpack hs)) putStrLn $ "<-- handshake from peer: " ++ show p infoPieceMap <- newEmptyMVar metadataMsgLoop h $ InfoState infoPieceMap return ...
445
false
true
0
13
116
159
72
87
null
null
kite-lang/kite
src/Kite/CodegenJS.hs
mit
emit (PBool val) = if val then "true" else "false"
50
emit (PBool val) = if val then "true" else "false"
50
emit (PBool val) = if val then "true" else "false"
50
false
false
0
6
9
24
12
12
null
null
semaj/hademlia
src/Utils.hs
bsd-3-clause
zeroPad :: Int -> String -> String zeroPad i s = pad ++ s where pad = replicate (i - length s) '0'
101
zeroPad :: Int -> String -> String zeroPad i s = pad ++ s where pad = replicate (i - length s) '0'
101
zeroPad i s = pad ++ s where pad = replicate (i - length s) '0'
66
false
true
3
8
25
60
26
34
null
null
tibbe/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l)
52
toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l)
52
toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l)
52
false
false
0
7
6
20
9
11
null
null
ivan-m/servant-auth-token
servant-auth-token-leveldb/src/Servant/Server/Auth/Token/LevelDB/Schema.hs
bsd-3-clause
load :: (MonadResource m, Key i a, SafeCopy a) => LevelDBEnv -> i -> m (Maybe a) load (LevelDBEnv db ropts _ _) i = do mbs <- get db ropts (encodeKey i) return $ decodeExWith safeGet <$> mbs -- | Store object by id in leveldb
230
load :: (MonadResource m, Key i a, SafeCopy a) => LevelDBEnv -> i -> m (Maybe a) load (LevelDBEnv db ropts _ _) i = do mbs <- get db ropts (encodeKey i) return $ decodeExWith safeGet <$> mbs -- | Store object by id in leveldb
230
load (LevelDBEnv db ropts _ _) i = do mbs <- get db ropts (encodeKey i) return $ decodeExWith safeGet <$> mbs -- | Store object by id in leveldb
149
false
true
0
10
51
103
50
53
null
null
green-haskell/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
dsCmd ids local_vars stack_ty res_ty (HsCmdLet binds body) env_ids = do let defined_vars = mkVarSet (collectLocalBinders binds) local_vars' = defined_vars `unionVarSet` local_vars (core_body, _free_vars, env_ids') <- dsfixCmd ids local_vars' stack_ty res_ty body stack_id <- newSysLocalDs st...
1,033
dsCmd ids local_vars stack_ty res_ty (HsCmdLet binds body) env_ids = do let defined_vars = mkVarSet (collectLocalBinders binds) local_vars' = defined_vars `unionVarSet` local_vars (core_body, _free_vars, env_ids') <- dsfixCmd ids local_vars' stack_ty res_ty body stack_id <- newSysLocalDs st...
1,033
dsCmd ids local_vars stack_ty res_ty (HsCmdLet binds body) env_ids = do let defined_vars = mkVarSet (collectLocalBinders binds) local_vars' = defined_vars `unionVarSet` local_vars (core_body, _free_vars, env_ids') <- dsfixCmd ids local_vars' stack_ty res_ty body stack_id <- newSysLocalDs st...
1,033
false
false
0
12
307
184
93
91
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_BASHKIR :: Int wxLANGUAGE_BASHKIR = 31
49
wxLANGUAGE_BASHKIR :: Int wxLANGUAGE_BASHKIR = 31
49
wxLANGUAGE_BASHKIR = 31
23
false
true
0
4
5
11
6
5
null
null
ezyang/ghc
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
getHpUsage :: FCode HeapUsage getHpUsage = do state <- getState return $ cgs_hp_usg state
105
getHpUsage :: FCode HeapUsage getHpUsage = do state <- getState return $ cgs_hp_usg state
105
getHpUsage = do state <- getState return $ cgs_hp_usg state
75
false
true
0
8
29
31
14
17
null
null
haskell-distributed/distributed-process-async
src/Control/Distributed/Process/Async.hs
bsd-3-clause
-- | Like 'cancelWith' but sends a @kill@ instruction instead of an exit. cancelKill :: String -> Async a -> Process () cancelKill reason hAsync = kill (_asyncWorker hAsync) reason
180
cancelKill :: String -> Async a -> Process () cancelKill reason hAsync = kill (_asyncWorker hAsync) reason
106
cancelKill reason hAsync = kill (_asyncWorker hAsync) reason
60
true
true
0
8
29
44
21
23
null
null
CRogers/bananasnake
src/Render.hs
mit
render :: Game -> IO () render game = do let rows = map (renderLine game) [0..(gameHeight game - 1)] traverse_ putStrLn rows scrollToFit (length rows)
156
render :: Game -> IO () render game = do let rows = map (renderLine game) [0..(gameHeight game - 1)] traverse_ putStrLn rows scrollToFit (length rows)
156
render game = do let rows = map (renderLine game) [0..(gameHeight game - 1)] traverse_ putStrLn rows scrollToFit (length rows)
132
false
true
0
15
31
83
37
46
null
null
sbditto85/parsedsltest
src/Algebra.hs
apache-2.0
-- | concat a stringconcat concatStringConcat :: IdentStorage -> StringConcat -> String concatStringConcat identStorage (StrIdentConcat (Ident fromIdent) stringConcat') = let fromIdentValue = MAP.lookupDefault "" fromIdent identStorage rest = concatStringConcat identStorage stringConcat' in fromIdentVal...
330
concatStringConcat :: IdentStorage -> StringConcat -> String concatStringConcat identStorage (StrIdentConcat (Ident fromIdent) stringConcat') = let fromIdentValue = MAP.lookupDefault "" fromIdent identStorage rest = concatStringConcat identStorage stringConcat' in fromIdentValue ++ rest
303
concatStringConcat identStorage (StrIdentConcat (Ident fromIdent) stringConcat') = let fromIdentValue = MAP.lookupDefault "" fromIdent identStorage rest = concatStringConcat identStorage stringConcat' in fromIdentValue ++ rest
242
true
true
0
10
50
73
36
37
null
null
ekmett/wxHaskell
wx/src/Graphics/UI/WX/Controls.hs
lgpl-2.1
wizardPageSimple :: Wizard a -> [Prop (WizardPageSimple ())] -> IO (WizardPageSimple ()) wizardPageSimple parent props = do w <- wizardPageSimpleCreate parent set w props return w
193
wizardPageSimple :: Wizard a -> [Prop (WizardPageSimple ())] -> IO (WizardPageSimple ()) wizardPageSimple parent props = do w <- wizardPageSimpleCreate parent set w props return w
193
wizardPageSimple parent props = do w <- wizardPageSimpleCreate parent set w props return w
104
false
true
0
11
39
76
34
42
null
null
rfranek/duckling
tests/Duckling/Testing/Asserts.hs
bsd-3-clause
withTargets :: [Some Dimension] -> (Text, a) -> (Text, [Some Dimension], a) withTargets targets (input, expected) = (input, targets, expected)
142
withTargets :: [Some Dimension] -> (Text, a) -> (Text, [Some Dimension], a) withTargets targets (input, expected) = (input, targets, expected)
142
withTargets targets (input, expected) = (input, targets, expected)
66
false
true
0
9
19
71
39
32
null
null
haskell-pkg-janitors/feed
Text/RSS/Import.hs
bsd-3-clause
pQNodes :: Name -> [XML.Element] -> [XML.Element] pQNodes x es = filter ((x==) . elementName) es
104
pQNodes :: Name -> [XML.Element] -> [XML.Element] pQNodes x es = filter ((x==) . elementName) es
104
pQNodes x es = filter ((x==) . elementName) es
48
false
true
0
10
23
57
28
29
null
null
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/WBTree.hs
bsd-3-clause
singleR :: WBTree a -> a -> WBTree a -> WBTree a singleR (Node _ ll lx lr) x r = node ll lx (node lr x r)
105
singleR :: WBTree a -> a -> WBTree a -> WBTree a singleR (Node _ ll lx lr) x r = node ll lx (node lr x r)
105
singleR (Node _ ll lx lr) x r = node ll lx (node lr x r)
56
false
true
0
8
27
68
32
36
null
null
MasseR/xmonadcontrib
XMonad/Util/XSelection.hs
bsd-3-clause
safePromptSelection app = join $ io $ liftM (safeSpawn app . return) getSelection
81
safePromptSelection app = join $ io $ liftM (safeSpawn app . return) getSelection
81
safePromptSelection app = join $ io $ liftM (safeSpawn app . return) getSelection
81
false
false
0
9
12
32
15
17
null
null
vikraman/ghc
compiler/basicTypes/Avail.hs
bsd-3-clause
avail :: Name -> AvailInfo avail n = Avail NotPatSyn n
54
avail :: Name -> AvailInfo avail n = Avail NotPatSyn n
54
avail n = Avail NotPatSyn n
27
false
true
0
5
10
23
11
12
null
null