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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bredelings/BAli-Phy | haskell/Bio/Alignment.hs | gpl-2.0 | sequence_lengths (AlignmentOnTree _ _ ls _) = ls | 51 | sequence_lengths (AlignmentOnTree _ _ ls _) = ls | 51 | sequence_lengths (AlignmentOnTree _ _ ls _) = ls | 51 | false | false | 0 | 7 | 10 | 21 | 10 | 11 | null | null |
lukexi/haskell-opencv | bench/bench.hs | bsd-3-clause | nfArrayIO :: (Repa.Source r e, Repa.Shape sh) => IO (Repa.Array r sh e) -> Benchmarkable
nfArrayIO m = nfIO $ do
a <- m
evaluate $ Repa.deepSeqArray a () | 186 | nfArrayIO :: (Repa.Source r e, Repa.Shape sh) => IO (Repa.Array r sh e) -> Benchmarkable
nfArrayIO m = nfIO $ do
a <- m
evaluate $ Repa.deepSeqArray a () | 186 | nfArrayIO m = nfIO $ do
a <- m
evaluate $ Repa.deepSeqArray a () | 96 | false | true | 2 | 11 | 61 | 88 | 40 | 48 | null | null |
zarazek/concurrency-simulator | Concurrency/Simulator.hs | bsd-3-clause | addToMultimap :: Ord (ErasedTypeVar var) => BlockedMap m var-> var a -> Thread m var b -> BlockedMap m var
addToMultimap map var thr = M.alter f (wrapVar var) map
where f Nothing = Just [wrapThread thr]
f (Just thrs) = Just (wrapThread thr : thrs) | 257 | addToMultimap :: Ord (ErasedTypeVar var) => BlockedMap m var-> var a -> Thread m var b -> BlockedMap m var
addToMultimap map var thr = M.alter f (wrapVar var) map
where f Nothing = Just [wrapThread thr]
f (Just thrs) = Just (wrapThread thr : thrs) | 257 | addToMultimap map var thr = M.alter f (wrapVar var) map
where f Nothing = Just [wrapThread thr]
f (Just thrs) = Just (wrapThread thr : thrs) | 150 | false | true | 1 | 9 | 55 | 123 | 58 | 65 | null | null |
alcidesv/ReH | hs-src/Rede/SpdyProtocol/Framing/AnyFrame.hs | bsd-3-clause | -- Returns 0 if no valid id is present...
streamIdFromAnyFrame :: AnyFrame -> Int
streamIdFromAnyFrame anyframe = case anyframe of
AnyControl_AF anycontrol -> case anycontrol of
(WindowUpdateFrame_ACF frame) -> streamIdFromFrame frame
(SynStream_ACF frame) -> streamI... | 601 | streamIdFromAnyFrame :: AnyFrame -> Int
streamIdFromAnyFrame anyframe = case anyframe of
AnyControl_AF anycontrol -> case anycontrol of
(WindowUpdateFrame_ACF frame) -> streamIdFromFrame frame
(SynStream_ACF frame) -> streamIdFromFrame frame
(SynReplyFrame_ACF ... | 556 | streamIdFromAnyFrame anyframe = case anyframe of
AnyControl_AF anycontrol -> case anycontrol of
(WindowUpdateFrame_ACF frame) -> streamIdFromFrame frame
(SynStream_ACF frame) -> streamIdFromFrame frame
(SynReplyFrame_ACF frame) -> streamIdFromFrame ... | 516 | true | true | 0 | 12 | 205 | 114 | 54 | 60 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | getCommandSequences (T_IfExpression _ thens elses) = map snd thens ++ [elses] | 77 | getCommandSequences (T_IfExpression _ thens elses) = map snd thens ++ [elses] | 77 | getCommandSequences (T_IfExpression _ thens elses) = map snd thens ++ [elses] | 77 | false | false | 0 | 7 | 10 | 31 | 15 | 16 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/Types.hs | apache-2.0 | fieldSize (BaseType JDouble) = 2 | 33 | fieldSize (BaseType JDouble) = 2 | 33 | fieldSize (BaseType JDouble) = 2 | 33 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
thielema/gitit | Network/Gitit/Handlers.hs | gpl-2.0 | fileListToHtml :: String -> String -> [Resource] -> Html
fileListToHtml base' prefix files =
let fileLink (FSFile f) | isPageFile f =
li ! [theclass "page" ] <<
anchor ! [href $ base' ++ urlForPage (prefix ++ dropExtension f)] <<
dropExtension f
fileLink (FSFile f) =
li ! ... | 1,124 | fileListToHtml :: String -> String -> [Resource] -> Html
fileListToHtml base' prefix files =
let fileLink (FSFile f) | isPageFile f =
li ! [theclass "page" ] <<
anchor ! [href $ base' ++ urlForPage (prefix ++ dropExtension f)] <<
dropExtension f
fileLink (FSFile f) =
li ! ... | 1,124 | fileListToHtml base' prefix files =
let fileLink (FSFile f) | isPageFile f =
li ! [theclass "page" ] <<
anchor ! [href $ base' ++ urlForPage (prefix ++ dropExtension f)] <<
dropExtension f
fileLink (FSFile f) =
li ! [theclass "upload"] << anchor ! [href $ base' ++ urlForPa... | 1,067 | false | true | 0 | 23 | 467 | 371 | 185 | 186 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 3835 = 3834 | 11 | 3835 = 3834 | 11 | 3835 = 3834 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
expipiplus1/minizinc | src/Language/MiniZinc/Builder/Internal.hs | mit | reifyExpression (ArrComp gs f e) = S.ArrayComp (reifyExpression e)
(reifyGenerator <$> gs)
(reifyExpression f) | 204 | reifyExpression (ArrComp gs f e) = S.ArrayComp (reifyExpression e)
(reifyGenerator <$> gs)
(reifyExpression f) | 204 | reifyExpression (ArrComp gs f e) = S.ArrayComp (reifyExpression e)
(reifyGenerator <$> gs)
(reifyExpression f) | 204 | false | false | 0 | 7 | 107 | 47 | 23 | 24 | null | null |
tau-tao/FPGAIPFilter | test/FtdiTestPktProcMoore.hs | bsd-3-clause | stateRead :: (StateT UsbBlasterState) IO (Maybe PPState)
stateRead = do
rd <- readVdr
_ <- virWrite virAddrOff
let rn = bitsToState <$> rd
case rn of
Just r -> putStrLn $ "R:" ++ show r -- ++ ", " ++ show rd
Nothing -> putStrLn ("Error nothing read"::Text)
pure $ join rn | 291 | stateRead :: (StateT UsbBlasterState) IO (Maybe PPState)
stateRead = do
rd <- readVdr
_ <- virWrite virAddrOff
let rn = bitsToState <$> rd
case rn of
Just r -> putStrLn $ "R:" ++ show r -- ++ ", " ++ show rd
Nothing -> putStrLn ("Error nothing read"::Text)
pure $ join rn | 291 | stateRead = do
rd <- readVdr
_ <- virWrite virAddrOff
let rn = bitsToState <$> rd
case rn of
Just r -> putStrLn $ "R:" ++ show r -- ++ ", " ++ show rd
Nothing -> putStrLn ("Error nothing read"::Text)
pure $ join rn | 234 | false | true | 3 | 9 | 71 | 98 | 50 | 48 | null | null |
ben-schulz/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyTTConstApp f (Constant c@(B8 _))
| f == reflm "B8" = return c | 83 | reifyTTConstApp f (Constant c@(B8 _))
| f == reflm "B8" = return c | 83 | reifyTTConstApp f (Constant c@(B8 _))
| f == reflm "B8" = return c | 83 | false | false | 0 | 10 | 29 | 42 | 19 | 23 | null | null |
stevely/hspirv | src/SpirV/Builder/Raw.hs | bsd-3-clause | -- Id 1: Result type, must be integer type
-- Id 2: First operand
-- Id 3: Second operand
shiftLeftLogical :: Id -> Id -> Id -> Builder Id
shiftLeftLogical = fourOp OpShiftLeftLogical | 183 | shiftLeftLogical :: Id -> Id -> Id -> Builder Id
shiftLeftLogical = fourOp OpShiftLeftLogical | 93 | shiftLeftLogical = fourOp OpShiftLeftLogical | 44 | true | true | 0 | 8 | 32 | 32 | 17 | 15 | null | null |
zhensydow/ljcsandbox | edx/fp101x/test3.hs | gpl-3.0 | halve6 xs = splitAt (div (length xs) 2) xs | 42 | halve6 xs = splitAt (div (length xs) 2) xs | 42 | halve6 xs = splitAt (div (length xs) 2) xs | 42 | false | false | 1 | 9 | 8 | 31 | 13 | 18 | null | null |
jystic/QuickSpec | qs1/Trie.hs | bsd-3-clause | insert' (k:ks) v t = Trie (modify (insert' ks v) k a) vs
where Trie a vs = extend k t
modify f k a = a // [(k, f (a ! k))] | 136 | insert' (k:ks) v t = Trie (modify (insert' ks v) k a) vs
where Trie a vs = extend k t
modify f k a = a // [(k, f (a ! k))] | 136 | insert' (k:ks) v t = Trie (modify (insert' ks v) k a) vs
where Trie a vs = extend k t
modify f k a = a // [(k, f (a ! k))] | 136 | false | false | 5 | 10 | 46 | 114 | 48 | 66 | null | null |
hamsal/DM-AtariAI | src/Main.hs | mit | train toC fromC screens actions rewards frmsPlyd nnEnv = do
nnEnvRet <- NN.nnTrain toC fromC screens actions rewards nnEnv
return nnEnvRet | 146 | train toC fromC screens actions rewards frmsPlyd nnEnv = do
nnEnvRet <- NN.nnTrain toC fromC screens actions rewards nnEnv
return nnEnvRet | 146 | train toC fromC screens actions rewards frmsPlyd nnEnv = do
nnEnvRet <- NN.nnTrain toC fromC screens actions rewards nnEnv
return nnEnvRet | 146 | false | false | 0 | 9 | 28 | 49 | 22 | 27 | null | null |
icyfork/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkSingleQuotedVariables10= verify checkSingleQuotedVariables "echo '`pwd`'" | 83 | prop_checkSingleQuotedVariables10= verify checkSingleQuotedVariables "echo '`pwd`'" | 83 | prop_checkSingleQuotedVariables10= verify checkSingleQuotedVariables "echo '`pwd`'" | 83 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
TristanAllwood/lazyCrossCheck | LazyCrossCheck/ComparisonTable.hs | bsd-3-clause | partitionRelatedness Unrelated a = ([], [], [], [a]) | 55 | partitionRelatedness Unrelated a = ([], [], [], [a]) | 55 | partitionRelatedness Unrelated a = ([], [], [], [a]) | 55 | false | false | 0 | 6 | 10 | 34 | 18 | 16 | null | null |
Motions/motions | src/Bio/Motions/Representation/Common.hs | apache-2.0 | chainNeighbours :: BeadSignature -> BeadSignature -> Bool
chainNeighbours b1 b2 = b1 ^. beadChain == b2 ^. beadChain
&& abs (b1 ^. beadIndexOnChain - b2 ^. beadIndexOnChain) == 1 | 199 | chainNeighbours :: BeadSignature -> BeadSignature -> Bool
chainNeighbours b1 b2 = b1 ^. beadChain == b2 ^. beadChain
&& abs (b1 ^. beadIndexOnChain - b2 ^. beadIndexOnChain) == 1 | 199 | chainNeighbours b1 b2 = b1 ^. beadChain == b2 ^. beadChain
&& abs (b1 ^. beadIndexOnChain - b2 ^. beadIndexOnChain) == 1 | 141 | false | true | 0 | 11 | 49 | 62 | 31 | 31 | null | null |
liamoc/tea-hs | Tea/Input.hs | bsd-3-clause | sdlKey SDL.SDLK_LMETA = KeyLMeta | 39 | sdlKey SDL.SDLK_LMETA = KeyLMeta | 39 | sdlKey SDL.SDLK_LMETA = KeyLMeta | 39 | false | false | 0 | 6 | 10 | 11 | 5 | 6 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_17_my_note.hs | mit | none :: Parse a b
none _ = [] | 32 | none :: Parse a b
none _ = [] | 32 | none _ = [] | 14 | false | true | 1 | 6 | 11 | 27 | 10 | 17 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/HTools/Program/Hspace.hs | gpl-2.0 | -- | 'Cluster.CStats' formatting information including spindles
clusterDataSpn :: [(String, Cluster.CStats -> String)]
clusterDataSpn = clusterData ++ [("SPN", printf "%.0f" . Cluster.csTspn)] | 192 | clusterDataSpn :: [(String, Cluster.CStats -> String)]
clusterDataSpn = clusterData ++ [("SPN", printf "%.0f" . Cluster.csTspn)] | 128 | clusterDataSpn = clusterData ++ [("SPN", printf "%.0f" . Cluster.csTspn)] | 73 | true | true | 2 | 10 | 21 | 57 | 29 | 28 | null | null |
nfjinjing/level5 | src/MusicPad/Model/Track.hs | bsd-3-clause | get_current_track :: Game State -> IO Track
get_current_track g = do
with_state g - \_state -> do
let verse_index = _state.song.current_verse_index
current_verse = _state.song.verses.at verse_index
track_index = current_verse.current_track_index
return - current_verse.tracks.at track_inde... | 321 | get_current_track :: Game State -> IO Track
get_current_track g = do
with_state g - \_state -> do
let verse_index = _state.song.current_verse_index
current_verse = _state.song.verses.at verse_index
track_index = current_verse.current_track_index
return - current_verse.tracks.at track_inde... | 321 | get_current_track g = do
with_state g - \_state -> do
let verse_index = _state.song.current_verse_index
current_verse = _state.song.verses.at verse_index
track_index = current_verse.current_track_index
return - current_verse.tracks.at track_index | 277 | false | true | 0 | 17 | 62 | 87 | 41 | 46 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Ocaml.hs | gpl-2.0 | regex_'5c'5c'24 = compileRegex True "\\\\$" | 43 | regex_'5c'5c'24 = compileRegex True "\\\\$" | 43 | regex_'5c'5c'24 = compileRegex True "\\\\$" | 43 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
steveshogren/haskell-katas | test/PokerHoldEmTest.hs | bsd-3-clause | testTwoOverCardCount :: Assertion
testTwoOverCardCount =
let flop = fromMaybe [] (parseHand "5D 8H 2S")
hand = fromMaybe [] (parseHand "QH 9H")
in (assertEqual "Two overcards" 2 (PHE.overCardCount flop hand)) | 221 | testTwoOverCardCount :: Assertion
testTwoOverCardCount =
let flop = fromMaybe [] (parseHand "5D 8H 2S")
hand = fromMaybe [] (parseHand "QH 9H")
in (assertEqual "Two overcards" 2 (PHE.overCardCount flop hand)) | 221 | testTwoOverCardCount =
let flop = fromMaybe [] (parseHand "5D 8H 2S")
hand = fromMaybe [] (parseHand "QH 9H")
in (assertEqual "Two overcards" 2 (PHE.overCardCount flop hand)) | 187 | false | true | 0 | 11 | 41 | 73 | 36 | 37 | null | null |
tijko/Project-Euler | haskell_11-20/Euler_11.hs | mit | parseGrid :: String -> [[Int]]
parseGrid grid = map getInt (chunksOf 20 $ tail $ splitOn " " grid) | 98 | parseGrid :: String -> [[Int]]
parseGrid grid = map getInt (chunksOf 20 $ tail $ splitOn " " grid) | 98 | parseGrid grid = map getInt (chunksOf 20 $ tail $ splitOn " " grid) | 67 | false | true | 0 | 9 | 18 | 51 | 25 | 26 | null | null |
mikolajsacha/HaskellPics | pixelmaps.hs | gpl-3.0 | filterHls :: Range -> Range -> Range -> RGB8 -> Bool
filterHls hr lr sr rgb =
inRange hr h && inRange lr l && inRange sr s
where (h, l, s) = Hls.toHls rgb | 158 | filterHls :: Range -> Range -> Range -> RGB8 -> Bool
filterHls hr lr sr rgb =
inRange hr h && inRange lr l && inRange sr s
where (h, l, s) = Hls.toHls rgb | 158 | filterHls hr lr sr rgb =
inRange hr h && inRange lr l && inRange sr s
where (h, l, s) = Hls.toHls rgb | 105 | false | true | 0 | 8 | 38 | 81 | 40 | 41 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Hand.hs | mit | getBonus (Special _ _ bts _) = bts | 34 | getBonus (Special _ _ bts _) = bts | 34 | getBonus (Special _ _ bts _) = bts | 34 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | groundDamage ProtossShieldBattery = 0 | 37 | groundDamage ProtossShieldBattery = 0 | 37 | groundDamage ProtossShieldBattery = 0 | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sol/aeson | Data/Aeson/Encoding/Builder.hs | bsd-3-clause | timeOfDay :: TimeOfDay -> Builder
timeOfDay t = timeOfDay64 (toTimeOfDay64 t) | 77 | timeOfDay :: TimeOfDay -> Builder
timeOfDay t = timeOfDay64 (toTimeOfDay64 t) | 77 | timeOfDay t = timeOfDay64 (toTimeOfDay64 t) | 43 | false | true | 0 | 7 | 10 | 33 | 14 | 19 | null | null |
roberth/uu-helium | src/Helium/Parser/LayoutRule.hs | gpl-3.0 | -- If we see a 'do', 'where', 'of' or 'let' we add a context
-- and a '{' only if the next token is not a '{'
addContext prevToken cs
((_, LexKeyword keyword):t2@(pos2, lexeme2):ts)
| keyword `elem` ["do", "where", "of","let"] =
if lexeme2 == LexSpecial '{' then
lay prevToken cs (t2:ts... | 1,777 | addContext prevToken cs
((_, LexKeyword keyword):t2@(pos2, lexeme2):ts)
| keyword `elem` ["do", "where", "of","let"] =
if lexeme2 == LexSpecial '{' then
lay prevToken cs (t2:ts)
else
let
poscol = sourceColumn pos2
in
(pos2, LexInserte... | 1,667 | addContext prevToken cs
((_, LexKeyword keyword):t2@(pos2, lexeme2):ts)
| keyword `elem` ["do", "where", "of","let"] =
if lexeme2 == LexSpecial '{' then
lay prevToken cs (t2:ts)
else
let
poscol = sourceColumn pos2
in
(pos2, LexInserte... | 1,667 | true | false | 0 | 17 | 603 | 315 | 171 | 144 | null | null |
snoyberg/ghc | testsuite/tests/programs/galois_raytrace/Eval.hs | bsd-3-clause | doPrimOp (Obj_Real_Obj fn) _ (VReal r:VObject o:stk)
= return (VObject (fn o r) : stk) | 88 | doPrimOp (Obj_Real_Obj fn) _ (VReal r:VObject o:stk)
= return (VObject (fn o r) : stk) | 88 | doPrimOp (Obj_Real_Obj fn) _ (VReal r:VObject o:stk)
= return (VObject (fn o r) : stk) | 88 | false | false | 1 | 10 | 16 | 61 | 27 | 34 | null | null |
44534/reducerabinpairs | src/Reduce.hs | gpl-3.0 | s :: Ord q => DRA q a l -> S.Set q -> [S.Set q]
s dra f =
{-let fscc = case sccs_of_f dra f of
[] -> S.empty
[scc] -> scc
in-} sccs_of_f dra f | 174 | s :: Ord q => DRA q a l -> S.Set q -> [S.Set q]
s dra f =
{-let fscc = case sccs_of_f dra f of
[] -> S.empty
[scc] -> scc
in-} sccs_of_f dra f | 174 | s dra f =
{-let fscc = case sccs_of_f dra f of
[] -> S.empty
[scc] -> scc
in-} sccs_of_f dra f | 126 | false | true | 0 | 12 | 68 | 64 | 28 | 36 | null | null |
jeffchao/hedgewars-accessible | tools/unitCycles.hs | gpl-2.0 | myf :: [(String, [String])] -> String
myf d = unlines . map (findCycle . fst) $ d
where
findCycle :: String -> String
findCycle searched = searched ++ ": " ++ (intercalate ", " $ fc searched [])
where
fc :: String -> [String] -> [String]
fc curSearch visited = let uses = curSearch `l... | 744 | myf :: [(String, [String])] -> String
myf d = unlines . map (findCycle . fst) $ d
where
findCycle :: String -> String
findCycle searched = searched ++ ": " ++ (intercalate ", " $ fc searched [])
where
fc :: String -> [String] -> [String]
fc curSearch visited = let uses = curSearch `l... | 744 | myf d = unlines . map (findCycle . fst) $ d
where
findCycle :: String -> String
findCycle searched = searched ++ ": " ++ (intercalate ", " $ fc searched [])
where
fc :: String -> [String] -> [String]
fc curSearch visited = let uses = curSearch `lookup` d; res = dropWhile null . map t... | 706 | false | true | 2 | 13 | 317 | 290 | 143 | 147 | null | null |
jberryman/wai | wai-frontend-monadcgi/Network/Wai/Frontend/MonadCGI.hs | mit | getCgiVars :: Request -> [(String, String)]
getCgiVars e =
[ ("PATH_INFO", S8.unpack $ rawPathInfo e)
, ("REQUEST_METHOD", show $ requestMethod e)
, ("QUERY_STRING", S8.unpack $ rawQueryString e)
] | 213 | getCgiVars :: Request -> [(String, String)]
getCgiVars e =
[ ("PATH_INFO", S8.unpack $ rawPathInfo e)
, ("REQUEST_METHOD", show $ requestMethod e)
, ("QUERY_STRING", S8.unpack $ rawQueryString e)
] | 213 | getCgiVars e =
[ ("PATH_INFO", S8.unpack $ rawPathInfo e)
, ("REQUEST_METHOD", show $ requestMethod e)
, ("QUERY_STRING", S8.unpack $ rawQueryString e)
] | 169 | false | true | 0 | 9 | 43 | 85 | 45 | 40 | null | null |
hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GLU/NURBS.hs | bsd-3-clause | checkForNURBSError :: NURBSObj -> IO a -> IO a
checkForNURBSError nurbsObj = withErrorCallback nurbsObj recordErrorCode | 119 | checkForNURBSError :: NURBSObj -> IO a -> IO a
checkForNURBSError nurbsObj = withErrorCallback nurbsObj recordErrorCode | 119 | checkForNURBSError nurbsObj = withErrorCallback nurbsObj recordErrorCode | 72 | false | true | 0 | 8 | 14 | 37 | 16 | 21 | null | null |
soumyadsanyal/99 | ch03/soumya.hs | gpl-2.0 | fromList []=Nil | 15 | fromList []=Nil | 15 | fromList []=Nil | 15 | false | false | 0 | 6 | 1 | 11 | 5 | 6 | null | null |
markuspf/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v LStrTail [x] = v ++ "idris_strTail(vm, " ++ creg x ++ ")" | 64 | doOp v LStrTail [x] = v ++ "idris_strTail(vm, " ++ creg x ++ ")" | 64 | doOp v LStrTail [x] = v ++ "idris_strTail(vm, " ++ creg x ++ ")" | 64 | false | false | 0 | 7 | 13 | 34 | 15 | 19 | null | null |
da-x/Algorithm-W-Step-By-Step | Lamdu/Expr/Scheme.hs | gpl-3.0 | fromDoublyConsistentList :: (Ord a, Ord b) => [(a, b)] -> Maybe (Map a b)
fromDoublyConsistentList pairs =
do
m <- fromConsistentList pairs
_ <- fromConsistentList $ map Tuple.swap $ Map.toList m
return m | 232 | fromDoublyConsistentList :: (Ord a, Ord b) => [(a, b)] -> Maybe (Map a b)
fromDoublyConsistentList pairs =
do
m <- fromConsistentList pairs
_ <- fromConsistentList $ map Tuple.swap $ Map.toList m
return m | 232 | fromDoublyConsistentList pairs =
do
m <- fromConsistentList pairs
_ <- fromConsistentList $ map Tuple.swap $ Map.toList m
return m | 158 | false | true | 0 | 11 | 60 | 94 | 45 | 49 | null | null |
christiaanb/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | isVecExpr (CmmMachOp _ [e]) = isVecExpr e | 56 | isVecExpr (CmmMachOp _ [e]) = isVecExpr e | 56 | isVecExpr (CmmMachOp _ [e]) = isVecExpr e | 56 | false | false | 0 | 7 | 21 | 24 | 11 | 13 | null | null |
nevrenato/Hets_Fork | CSL/Keywords.hs | gpl-2.0 | varKeywords :: [String]
varKeywords = [cardnoS, eS, evalmodeS, fortwidthS, highpowS, iS, infinityS, kexlamS, lowpowS, nilS, piS, rootmultS, tS] | 143 | varKeywords :: [String]
varKeywords = [cardnoS, eS, evalmodeS, fortwidthS, highpowS, iS, infinityS, kexlamS, lowpowS, nilS, piS, rootmultS, tS] | 143 | varKeywords = [cardnoS, eS, evalmodeS, fortwidthS, highpowS, iS, infinityS, kexlamS, lowpowS, nilS, piS, rootmultS, tS] | 119 | false | true | 0 | 7 | 17 | 60 | 35 | 25 | null | null |
prt2121/haskell-practice | parconc/TChan.hs | apache-2.0 | newTChan :: STM (TChan a)
newTChan = do
hole <- newTVar TNil
read <- newTVar hole
write <- newTVar hole
return (TChan read write) | 137 | newTChan :: STM (TChan a)
newTChan = do
hole <- newTVar TNil
read <- newTVar hole
write <- newTVar hole
return (TChan read write) | 137 | newTChan = do
hole <- newTVar TNil
read <- newTVar hole
write <- newTVar hole
return (TChan read write) | 111 | false | true | 0 | 10 | 31 | 70 | 29 | 41 | null | null |
GaloisInc/saw-script | cryptol-saw-core/css/Main.hs | bsd-3-clause | emptyCSS :: CSS
emptyCSS =
CSS
{ output = ""
, cssMode = NormalMode
} | 77 | emptyCSS :: CSS
emptyCSS =
CSS
{ output = ""
, cssMode = NormalMode
} | 77 | emptyCSS =
CSS
{ output = ""
, cssMode = NormalMode
} | 61 | false | true | 0 | 7 | 22 | 35 | 17 | 18 | null | null |
osa1/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPTermFC f g (PPi plic n fc t1 t2) = PPi plic n (g fc) (mapPTermFC f g t1) (mapPTermFC f g t2) | 96 | mapPTermFC f g (PPi plic n fc t1 t2) = PPi plic n (g fc) (mapPTermFC f g t1) (mapPTermFC f g t2) | 96 | mapPTermFC f g (PPi plic n fc t1 t2) = PPi plic n (g fc) (mapPTermFC f g t1) (mapPTermFC f g t2) | 96 | false | false | 0 | 7 | 22 | 65 | 31 | 34 | null | null |
WireGuard/WireGuard | contrib/external-tests/haskell/src/Main.hs | gpl-2.0 | unsafeMessage :: (Cipher c, DH d, Hash h)
=> Bool
-> Maybe ScrubbedBytes
-> ScrubbedBytes
-> NoiseState c d h
-> (ScrubbedBytes, NoiseState c d h)
unsafeMessage write mpsk msg ns = case operation msg ns of
NoiseResultMessage ct ns' -> (ct, ns')
... | 656 | unsafeMessage :: (Cipher c, DH d, Hash h)
=> Bool
-> Maybe ScrubbedBytes
-> ScrubbedBytes
-> NoiseState c d h
-> (ScrubbedBytes, NoiseState c d h)
unsafeMessage write mpsk msg ns = case operation msg ns of
NoiseResultMessage ct ns' -> (ct, ns')
... | 656 | unsafeMessage write mpsk msg ns = case operation msg ns of
NoiseResultMessage ct ns' -> (ct, ns')
NoiseResultNeedPSK ns' -> case mpsk of
Nothing -> error "psk required but not provided"
Just k -> case operation k ns' of
NoiseResultMessage ct ns'' -> (ct, ns'')
_ -> error "something terrible ha... | 439 | false | true | 0 | 14 | 196 | 197 | 97 | 100 | null | null |
kawu/tagger | src/Text/Plain.hs | bsd-3-clause | parsePlain :: Tagset -> L.Text -> [Sentence]
parsePlain tagset = map (parseSent tagset ). init . L.splitOn "\n\n" | 113 | parsePlain :: Tagset -> L.Text -> [Sentence]
parsePlain tagset = map (parseSent tagset ). init . L.splitOn "\n\n" | 113 | parsePlain tagset = map (parseSent tagset ). init . L.splitOn "\n\n" | 68 | false | true | 0 | 9 | 17 | 54 | 25 | 29 | null | null |
brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs | mpl-2.0 | -- | Deprecated. Use autoUpdateMode instead. When autoUpdateMode is set to
-- AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no
-- effect. \"choiceToTheUser\" allows the device\'s user to configure the
-- app update policy. \"always\" enables auto updates. \"never\" disables
-- auto updates. \"wifiO... | 546 | pAutoUpdatePolicy :: Lens' Policy (Maybe PolicyAutoUpdatePolicy)
pAutoUpdatePolicy
= lens _pAutoUpdatePolicy
(\ s a -> s{_pAutoUpdatePolicy = a}) | 153 | pAutoUpdatePolicy
= lens _pAutoUpdatePolicy
(\ s a -> s{_pAutoUpdatePolicy = a}) | 88 | true | true | 0 | 8 | 79 | 54 | 30 | 24 | null | null |
bergmark/clay | src/Clay/Transition.hs | bsd-3-clause | stepsStart, stepsStop :: Integer -> TimingFunction
stepsStart s = other ("steps(" <> value s <> ", end)") | 106 | stepsStart, stepsStop :: Integer -> TimingFunction
stepsStart s = other ("steps(" <> value s <> ", end)") | 105 | stepsStart s = other ("steps(" <> value s <> ", end)") | 54 | false | true | 0 | 9 | 17 | 37 | 19 | 18 | null | null |
jsnajder/multext-east-msd | src/Data/MultextEastMsd.hs | bsd-3-clause | decode (SubType _) = dec SubType | 37 | decode (SubType _) = dec SubType | 37 | decode (SubType _) = dec SubType | 37 | false | false | 0 | 6 | 10 | 19 | 8 | 11 | null | null |
abuiles/turbinado-blog | tmp/dependencies/http-3001.1.4/Network/HTTP/MD5Aux.hs | bsd-3-clause | rotL :: Bits a => a -> Int -> a
rotL x = rotateL x | 50 | rotL :: Bits a => a -> Int -> a
rotL x = rotateL x | 50 | rotL x = rotateL x | 18 | false | true | 0 | 7 | 14 | 32 | 15 | 17 | null | null |
sdiehl/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | floatPrimTy :: Type
floatPrimTy = mkTyConTy floatPrimTyCon | 66 | floatPrimTy :: Type
floatPrimTy = mkTyConTy floatPrimTyCon | 66 | floatPrimTy = mkTyConTy floatPrimTyCon | 42 | false | true | 0 | 6 | 14 | 21 | 8 | 13 | null | null |
Michael0x2a/pathinit | pathinit/pathinit.hs | mit | remove :: PathConfig -> GroupName -> Path -> IO ()
remove config groupName path = do
putStrLn $ "Removing " ++ (getPath path) ++ " from " ++ (getGroupName groupName)
modifyGroupAndSave config groupName (removeFromGroup path) | 232 | remove :: PathConfig -> GroupName -> Path -> IO ()
remove config groupName path = do
putStrLn $ "Removing " ++ (getPath path) ++ " from " ++ (getGroupName groupName)
modifyGroupAndSave config groupName (removeFromGroup path) | 232 | remove config groupName path = do
putStrLn $ "Removing " ++ (getPath path) ++ " from " ++ (getGroupName groupName)
modifyGroupAndSave config groupName (removeFromGroup path) | 181 | false | true | 0 | 12 | 42 | 87 | 40 | 47 | null | null |
jragonfyre/TRPG | src/Dictionary.hs | bsd-3-clause | inflectString
be@BaseEntry
{ partOfSpeechType = (VerbT _)
}
(Adjective PresentParticiple) =
Just $ simpleInflectBE be InflPresentParticiple | 155 | inflectString
be@BaseEntry
{ partOfSpeechType = (VerbT _)
}
(Adjective PresentParticiple) =
Just $ simpleInflectBE be InflPresentParticiple | 155 | inflectString
be@BaseEntry
{ partOfSpeechType = (VerbT _)
}
(Adjective PresentParticiple) =
Just $ simpleInflectBE be InflPresentParticiple | 155 | false | false | 0 | 8 | 31 | 50 | 23 | 27 | null | null |
fpco/hlint | data/Default.hs | bsd-3-clause | error "Evaluate" = span p [] ==> ([],[]) | 40 | error "Evaluate" = span p [] ==> ([],[]) | 40 | error "Evaluate" = span p [] ==> ([],[]) | 40 | false | false | 0 | 7 | 7 | 30 | 15 | 15 | null | null |
ombocomp/CSP | Algorithms/SimpleCSP/Examples/Wolf.hs | mit | cabbageGoatNotAlone :: Constraint Int GameState
cabbageGoatNotAlone _ ((w,e),_) = c' w ∧ c' e
where c' set | Goat ∈ set ∧ Cabbage ∈ set ∧ Farmer ∉ set = False
| otherwise = True | 228 | cabbageGoatNotAlone :: Constraint Int GameState
cabbageGoatNotAlone _ ((w,e),_) = c' w ∧ c' e
where c' set | Goat ∈ set ∧ Cabbage ∈ set ∧ Farmer ∉ set = False
| otherwise = True | 228 | cabbageGoatNotAlone _ ((w,e),_) = c' w ∧ c' e
where c' set | Goat ∈ set ∧ Cabbage ∈ set ∧ Farmer ∉ set = False
| otherwise = True | 180 | false | true | 0 | 12 | 85 | 89 | 43 | 46 | null | null |
rueshyna/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | A custom formula to calculate the value. The formula must start with an
-- \`=\` character.
pvFormula :: Lens' PivotValue (Maybe Text)
pvFormula
= lens _pvFormula (\ s a -> s{_pvFormula = a}) | 198 | pvFormula :: Lens' PivotValue (Maybe Text)
pvFormula
= lens _pvFormula (\ s a -> s{_pvFormula = a}) | 101 | pvFormula
= lens _pvFormula (\ s a -> s{_pvFormula = a}) | 58 | true | true | 1 | 9 | 36 | 51 | 26 | 25 | null | null |
narurien/ganeti-ceph | src/Ganeti/Query/Query.hs | gpl-2.0 | getSelectedFields :: FieldMap a b -- ^ Defined fields
-> [String] -- ^ Requested fields
-> FieldList a b -- ^ Selected fields
getSelectedFields defined =
map (\name -> fromMaybe (mkUnknownFDef name) $ name `Map.lookup` defined) | 271 | getSelectedFields :: FieldMap a b -- ^ Defined fields
-> [String] -- ^ Requested fields
-> FieldList a b
getSelectedFields defined =
map (\name -> fromMaybe (mkUnknownFDef name) $ name `Map.lookup` defined) | 250 | getSelectedFields defined =
map (\name -> fromMaybe (mkUnknownFDef name) $ name `Map.lookup` defined) | 103 | true | true | 0 | 12 | 79 | 70 | 37 | 33 | null | null |
mstksg/configurator-export | src/Data/Configurator/Export.hs | bsd-3-clause | -- | Print out a pretty printed rendering of the current contents of the
-- 'Config' to stdout.
displayConf :: Config -> IO ()
displayConf = displayConf' confStyle | 163 | displayConf :: Config -> IO ()
displayConf = displayConf' confStyle | 67 | displayConf = displayConf' confStyle | 36 | true | true | 0 | 8 | 27 | 31 | 14 | 17 | null | null |
nbloomf/carl | src/Carl/Algebra/Ring.hs | gpl-3.0 | rUProd (t:ts) = do
s <- rUProd ts
rMul t s | 46 | rUProd (t:ts) = do
s <- rUProd ts
rMul t s | 46 | rUProd (t:ts) = do
s <- rUProd ts
rMul t s | 46 | false | false | 0 | 8 | 14 | 34 | 15 | 19 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Delete.hs | mpl-2.0 | -- | Creates a value of 'BillingAccountsSinksDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'basdXgafv'
--
-- * 'basdUploadProtocol'
--
-- * 'basdPp'
--
-- * 'basdAccessToken'
--
-- * 'basdUploadType'
--
-- * 'basdBearerToken'... | 790 | billingAccountsSinksDelete
:: Text -- ^ 'basdSinkName'
-> BillingAccountsSinksDelete
billingAccountsSinksDelete pBasdSinkName_ =
BillingAccountsSinksDelete'
{ _basdXgafv = Nothing
, _basdUploadProtocol = Nothing
, _basdPp = True
, _basdAccessToken = Nothing
, _basdUploadType = Nothing
... | 423 | billingAccountsSinksDelete pBasdSinkName_ =
BillingAccountsSinksDelete'
{ _basdXgafv = Nothing
, _basdUploadProtocol = Nothing
, _basdPp = True
, _basdAccessToken = Nothing
, _basdUploadType = Nothing
, _basdBearerToken = Nothing
, _basdSinkName = pBasdSinkName_
, _basdCallback = Not... | 330 | true | true | 0 | 7 | 154 | 97 | 64 | 33 | null | null |
mstksg/hledger | hledger-ui/Hledger/UI/UIState.hs | gpl-3.0 | -- | Clear all filters/flags.
resetFilter :: UIState -> UIState
resetFilter ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}}} =
ui{aopts=uopts{cliopts_=copts{reportopts_=ropts{
accountlistmode_=ALTree
,empty_=True
,statuses_=[]
,real_=False
,query_=""
--,period_=Period... | 332 | resetFilter :: UIState -> UIState
resetFilter ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}}} =
ui{aopts=uopts{cliopts_=copts{reportopts_=ropts{
accountlistmode_=ALTree
,empty_=True
,statuses_=[]
,real_=False
,query_=""
--,period_=PeriodAll
}}}} | 302 | resetFilter ui@UIState{aopts=uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}}} =
ui{aopts=uopts{cliopts_=copts{reportopts_=ropts{
accountlistmode_=ALTree
,empty_=True
,statuses_=[]
,real_=False
,query_=""
--,period_=PeriodAll
}}}} | 268 | true | true | 0 | 17 | 51 | 119 | 70 | 49 | null | null |
mettekou/ghc | compiler/simplStg/UnariseStg.hs | bsd-3-clause | tagTy :: Type
tagTy = intPrimTy | 31 | tagTy :: Type
tagTy = intPrimTy | 31 | tagTy = intPrimTy | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
olsner/ghc | testsuite/tests/simplCore/should_run/T5441.hs | bsd-3-clause | main = putStrLn (showNat Z) | 27 | main = putStrLn (showNat Z) | 27 | main = putStrLn (showNat Z) | 27 | false | false | 1 | 7 | 4 | 19 | 7 | 12 | null | null |
cblp/haskell-telegram-api | src/Web/Telegram/API/Bot/Requests.hs | bsd-3-clause | sendContactRequest :: ChatId -> Text -> Text -> SendContactRequest
sendContactRequest chatId phoneNumber firstName = SendContactRequest chatId phoneNumber firstName Nothing Nothing Nothing Nothing | 196 | sendContactRequest :: ChatId -> Text -> Text -> SendContactRequest
sendContactRequest chatId phoneNumber firstName = SendContactRequest chatId phoneNumber firstName Nothing Nothing Nothing Nothing | 196 | sendContactRequest chatId phoneNumber firstName = SendContactRequest chatId phoneNumber firstName Nothing Nothing Nothing Nothing | 129 | false | true | 0 | 7 | 21 | 45 | 22 | 23 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Text.Lazy.Builder.Int.hs | bsd-3-clause | countDigits v0
| fromIntegral v64 == v0 = go 1 v64
| otherwise = goBig 1 (fromIntegral v0)
where v64 = fromIntegral v0
goBig !k (v :: Integer)
| v > big = goBig (k + 19) (v `quot` big)
| otherwise = go k (fromIntegral v)
big = 10000000000000000000
go !k... | 958 | countDigits v0
| fromIntegral v64 == v0 = go 1 v64
| otherwise = goBig 1 (fromIntegral v0)
where v64 = fromIntegral v0
goBig !k (v :: Integer)
| v > big = goBig (k + 19) (v `quot` big)
| otherwise = go k (fromIntegral v)
big = 10000000000000000000
go !k... | 958 | countDigits v0
| fromIntegral v64 == v0 = go 1 v64
| otherwise = goBig 1 (fromIntegral v0)
where v64 = fromIntegral v0
goBig !k (v :: Integer)
| v > big = goBig (k + 19) (v `quot` big)
| otherwise = go k (fromIntegral v)
big = 10000000000000000000
go !k... | 958 | false | false | 6 | 11 | 493 | 346 | 173 | 173 | null | null |
sdiehl/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | getDFunTyLitKey :: TyLit -> OccName
getDFunTyLitKey (NumTyLit n) = mkOccName Name.varName (show n) | 98 | getDFunTyLitKey :: TyLit -> OccName
getDFunTyLitKey (NumTyLit n) = mkOccName Name.varName (show n) | 98 | getDFunTyLitKey (NumTyLit n) = mkOccName Name.varName (show n) | 62 | false | true | 0 | 7 | 12 | 37 | 18 | 19 | null | null |
np/hlatex | Language/LaTeX/Length.hs | bsd-3-clause | arraycolsep = lengthCmd "arraycolsep" | 37 | arraycolsep = lengthCmd "arraycolsep" | 37 | arraycolsep = lengthCmd "arraycolsep" | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mfine/nfl-divisions-power-rankings | main/Chart.hs | bsd-3-clause | main :: IO ()
main = do
args <- getArgs
rs <- forM args $ \file -> do
r <- results file
return (map (\x -> (g file, x)) r)
let ss = sortBy (comparing (rDivision . snd)) (msum rs)
let ts = groupBy (\a b -> rDivision (snd a) == rDivision (snd b)) ss
toFile def "RESULTS-average.png" $ do
layout_title... | 1,099 | main :: IO ()
main = do
args <- getArgs
rs <- forM args $ \file -> do
r <- results file
return (map (\x -> (g file, x)) r)
let ss = sortBy (comparing (rDivision . snd)) (msum rs)
let ts = groupBy (\a b -> rDivision (snd a) == rDivision (snd b)) ss
toFile def "RESULTS-average.png" $ do
layout_title... | 1,099 | main = do
args <- getArgs
rs <- forM args $ \file -> do
r <- results file
return (map (\x -> (g file, x)) r)
let ss = sortBy (comparing (rDivision . snd)) (msum rs)
let ts = groupBy (\a b -> rDivision (snd a) == rDivision (snd b)) ss
toFile def "RESULTS-average.png" $ do
layout_title .= "NFL Power... | 1,085 | false | true | 0 | 19 | 398 | 447 | 218 | 229 | null | null |
soundcloud/haskell-kubernetes | lib/Kubernetes/Model/V1/ReplicationControllerSpec.hs | mit | mkReplicationControllerSpec :: ReplicationControllerSpec
mkReplicationControllerSpec = ReplicationControllerSpec Nothing Nothing Nothing | 136 | mkReplicationControllerSpec :: ReplicationControllerSpec
mkReplicationControllerSpec = ReplicationControllerSpec Nothing Nothing Nothing | 136 | mkReplicationControllerSpec = ReplicationControllerSpec Nothing Nothing Nothing | 79 | false | true | 0 | 6 | 8 | 24 | 10 | 14 | null | null |
erikd/hs-tls | core/Network/TLS/State.hs | bsd-3-clause | isClientContext :: TLSSt Role
isClientContext = gets stClientContext | 68 | isClientContext :: TLSSt Role
isClientContext = gets stClientContext | 68 | isClientContext = gets stClientContext | 38 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
ambiata/jetski | test/Test/Jetski.hs | bsd-3-clause | errorRender :: JetskiError -> Text
errorRender = \case
CompilerError opts src err
-> "when compiling with: " <> T.unwords opts <> "\n\n"
<> indent src
<> "\nencountered the following error:\n\n"
<> indent err
err -> T.pack (show err)
where
indent = T.unlines . fmap (" " ... | 408 | errorRender :: JetskiError -> Text
errorRender = \case
CompilerError opts src err
-> "when compiling with: " <> T.unwords opts <> "\n\n"
<> indent src
<> "\nencountered the following error:\n\n"
<> indent err
err -> T.pack (show err)
where
indent = T.unlines . fmap (" " ... | 408 | errorRender = \case
CompilerError opts src err
-> "when compiling with: " <> T.unwords opts <> "\n\n"
<> indent src
<> "\nencountered the following error:\n\n"
<> indent err
err -> T.pack (show err)
where
indent = T.unlines . fmap (" " <>) . T.lines
-------------------... | 373 | false | true | 0 | 14 | 100 | 106 | 52 | 54 | null | null |
ku-fpg/ecc-ldpc | src/Data/Sparse/BitMatrix.hs | bsd-3-clause | (*|) :: (Eq a, Show a, Num a, U.Unbox a) =>
SparseBitM -> V a -> V Bool
(*|) mat vec = {-# SCC "(*|)" #-} U.fromList (map (fromBit . go) [1..nrows mat])
where
go r
= U.sum
$ U.ifilter (\c _ -> (r, c+1) `S.member` (sparseSet mat))
vec
{-# INLINE go #-}
| 294 | (*|) :: (Eq a, Show a, Num a, U.Unbox a) =>
SparseBitM -> V a -> V Bool
(*|) mat vec = {-# SCC "(*|)" #-} U.fromList (map (fromBit . go) [1..nrows mat])
where
go r
= U.sum
$ U.ifilter (\c _ -> (r, c+1) `S.member` (sparseSet mat))
vec
{-# INLINE go #-}
| 294 | (*|) mat vec = {-# SCC "(*|)" #-} U.fromList (map (fromBit . go) [1..nrows mat])
where
go r
= U.sum
$ U.ifilter (\c _ -> (r, c+1) `S.member` (sparseSet mat))
vec
{-# INLINE go #-}
| 220 | false | true | 3 | 10 | 95 | 159 | 81 | 78 | null | null |
dmbarbour/Sirea | tst/RotDyn.hs | bsd-3-clause | nToF 1 = sub | 12 | nToF 1 = sub | 12 | nToF 1 = sub | 12 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
oldmanmike/sdl2 | src/SDL/Raw/Video.hs | bsd-3-clause | glGetCurrentWindow :: MonadIO m => m Window
glGetCurrentWindow = liftIO glGetCurrentWindowFFI | 93 | glGetCurrentWindow :: MonadIO m => m Window
glGetCurrentWindow = liftIO glGetCurrentWindowFFI | 93 | glGetCurrentWindow = liftIO glGetCurrentWindowFFI | 49 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
iblech/measurable | src/Measurable/Measures.hs | bsd-3-clause | normal :: Double -> Double -> Measure Double
normal m s = fromDensityFunction pdf where
pdf = density $ Statistics.normalDistr m s | 132 | normal :: Double -> Double -> Measure Double
normal m s = fromDensityFunction pdf where
pdf = density $ Statistics.normalDistr m s | 132 | normal m s = fromDensityFunction pdf where
pdf = density $ Statistics.normalDistr m s | 87 | false | true | 0 | 9 | 23 | 52 | 24 | 28 | null | null |
sdiehl/ghc | testsuite/tests/typecheck/should_compile/tc099.hs | bsd-3-clause | f,g :: Eq a => (a,b)
f = g | 26 | f,g :: Eq a => (a,b)
f = g | 26 | f = g | 5 | false | true | 2 | 8 | 8 | 37 | 16 | 21 | null | null |
sdiehl/ghc | compiler/utils/TrieMap.hs | bsd-3-clause | xtMaybe tr (Just x) f m = m { mm_just = mm_just m |> tr x f } | 61 | xtMaybe tr (Just x) f m = m { mm_just = mm_just m |> tr x f } | 61 | xtMaybe tr (Just x) f m = m { mm_just = mm_just m |> tr x f } | 61 | false | false | 0 | 8 | 17 | 41 | 20 | 21 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs | mpl-2.0 | -- | JSONP
psgCallback :: Lens' ProjectsSinksGet (Maybe Text)
psgCallback
= lens _psgCallback (\ s a -> s{_psgCallback = a}) | 126 | psgCallback :: Lens' ProjectsSinksGet (Maybe Text)
psgCallback
= lens _psgCallback (\ s a -> s{_psgCallback = a}) | 115 | psgCallback
= lens _psgCallback (\ s a -> s{_psgCallback = a}) | 64 | true | true | 2 | 9 | 21 | 55 | 25 | 30 | null | null |
mauriciofierrom/cis194-homework | homework02/lecture.hs | mit | baz :: Person -> String
baz p@(Person n _ _) = "The name field of (" ++ show p ++ ") is " ++ n | 94 | baz :: Person -> String
baz p@(Person n _ _) = "The name field of (" ++ show p ++ ") is " ++ n | 94 | baz p@(Person n _ _) = "The name field of (" ++ show p ++ ") is " ++ n | 70 | false | true | 0 | 8 | 24 | 46 | 23 | 23 | null | null |
rvion/ride | jetpack/src/Data/ByteString/Lazy/AsLbs.hs | bsd-3-clause | -- lbs_foldr1 :: (Word8 -> Word8 -> Word8) -> ByteString -> Word8
lbs_foldr1 = I.foldr1 | 87 | lbs_foldr1 = I.foldr1 | 21 | lbs_foldr1 = I.foldr1 | 21 | true | false | 1 | 6 | 14 | 13 | 5 | 8 | null | null |
rodrigogribeiro/mptc | src/Language/Haskell/Exts/Annotated/Simplify.hs | bsd-3-clause | sMatch (InfixMatch l pa n pbs rhs mwhere) =
S.Match (getPointLoc l) (sName n) (map sPat (pa:pbs)) Nothing (sRhs rhs) (maybe (S.BDecls []) sBinds mwhere) | 156 | sMatch (InfixMatch l pa n pbs rhs mwhere) =
S.Match (getPointLoc l) (sName n) (map sPat (pa:pbs)) Nothing (sRhs rhs) (maybe (S.BDecls []) sBinds mwhere) | 156 | sMatch (InfixMatch l pa n pbs rhs mwhere) =
S.Match (getPointLoc l) (sName n) (map sPat (pa:pbs)) Nothing (sRhs rhs) (maybe (S.BDecls []) sBinds mwhere) | 156 | false | false | 0 | 10 | 28 | 93 | 46 | 47 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | nicIpPool :: String
nicIpPool = Types.nICModeToRaw NMPool | 57 | nicIpPool :: String
nicIpPool = Types.nICModeToRaw NMPool | 57 | nicIpPool = Types.nICModeToRaw NMPool | 37 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
TomMD/ghc | compiler/simplCore/CoreMonad.hs | bsd-3-clause | runMaybe Nothing _ = CoreDoNothing | 35 | runMaybe Nothing _ = CoreDoNothing | 35 | runMaybe Nothing _ = CoreDoNothing | 35 | false | false | 0 | 4 | 5 | 13 | 5 | 8 | null | null |
bos/text-icu | benchmarks/Breaker.hs | bsd-2-clause | pureBreaker ts = do
let b = ICU.breakWord "en"
forM_ ts $ \t -> length (breaks b t) `seq` return () | 103 | pureBreaker ts = do
let b = ICU.breakWord "en"
forM_ ts $ \t -> length (breaks b t) `seq` return () | 103 | pureBreaker ts = do
let b = ICU.breakWord "en"
forM_ ts $ \t -> length (breaks b t) `seq` return () | 103 | false | false | 1 | 13 | 24 | 64 | 28 | 36 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/AutoScalingAutoScalingGroup.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity
asasgDesiredCapacity :: Lens' AutoScalingAutoScalingGroup (Maybe (Val Text))
asasgDesiredCapacity = lens _autoScalingAutoScalingGroupDesiredCapacity (\s a -> s { _autoScalingAutoScalingGroupDesir... | 337 | asasgDesiredCapacity :: Lens' AutoScalingAutoScalingGroup (Maybe (Val Text))
asasgDesiredCapacity = lens _autoScalingAutoScalingGroupDesiredCapacity (\s a -> s { _autoScalingAutoScalingGroupDesiredCapacity = a }) | 212 | asasgDesiredCapacity = lens _autoScalingAutoScalingGroupDesiredCapacity (\s a -> s { _autoScalingAutoScalingGroupDesiredCapacity = a }) | 135 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
shlevy/ghc | compiler/simplStg/UnariseStg.hs | bsd-3-clause | extendRho rho x (UnaryVal val)
= ASSERT(isNvUnaryType (stgArgType val))
extendVarEnv rho x (UnaryVal val) | 111 | extendRho rho x (UnaryVal val)
= ASSERT(isNvUnaryType (stgArgType val))
extendVarEnv rho x (UnaryVal val) | 111 | extendRho rho x (UnaryVal val)
= ASSERT(isNvUnaryType (stgArgType val))
extendVarEnv rho x (UnaryVal val) | 111 | false | false | 0 | 9 | 19 | 48 | 23 | 25 | null | null |
tnrangwi/grill | src/FormulaEngine/Evaluate.hs | mit | showTree (T.Funcall f l) = "(" ++ T.funcName f ++ " " ++ List.intercalate " " (map showTree l) ++ ")" | 101 | showTree (T.Funcall f l) = "(" ++ T.funcName f ++ " " ++ List.intercalate " " (map showTree l) ++ ")" | 101 | showTree (T.Funcall f l) = "(" ++ T.funcName f ++ " " ++ List.intercalate " " (map showTree l) ++ ")" | 101 | false | false | 2 | 9 | 20 | 58 | 26 | 32 | null | null |
Javran/misc | syb-play/src/Main.hs | mit | main :: IO ()
main = do
printTree exTree1
-- drawback: cannot deduce a type
printTree (everywhere (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
-- if type mismatches, nothing will h... | 756 | main :: IO ()
main = do
printTree exTree1
-- drawback: cannot deduce a type
printTree (everywhere (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
-- if type mismatches, nothing will h... | 756 | main = do
printTree exTree1
-- drawback: cannot deduce a type
printTree (everywhere (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
printTree (everywhere' (mkT (foldWithDirectChildren (+) 0 :: Tree Int -> Tree Int)) exTree1)
-- if type mismatches, nothing will happen
-- (... | 742 | false | true | 0 | 14 | 186 | 263 | 125 | 138 | null | null |
rpglover64/Haskell-Turtle-Library | src/Turtle/Options.hs | bsd-3-clause | -- | Parse a `Text` as a positional argument
argText :: ArgName -> Optional HelpMessage -> Parser Text
argText = arg Just | 121 | argText :: ArgName -> Optional HelpMessage -> Parser Text
argText = arg Just | 76 | argText = arg Just | 18 | true | true | 0 | 8 | 21 | 35 | 15 | 20 | null | null |
music-suite/music-score | src/Music/Score/Internal/Quantize.hs | bsd-3-clause | rewriteR = go where
go (Beat d a) = Beat d a
go (Group rs) = Group (fmap (rewriteR . rewrite1) rs)
go (Dotted n r) = Dotted n ((rewriteR . rewrite1) r)
go (Tuplet n r) = Tuplet n ((rewriteR . rewrite1) r) | 224 | rewriteR = go where
go (Beat d a) = Beat d a
go (Group rs) = Group (fmap (rewriteR . rewrite1) rs)
go (Dotted n r) = Dotted n ((rewriteR . rewrite1) r)
go (Tuplet n r) = Tuplet n ((rewriteR . rewrite1) r) | 224 | rewriteR = go where
go (Beat d a) = Beat d a
go (Group rs) = Group (fmap (rewriteR . rewrite1) rs)
go (Dotted n r) = Dotted n ((rewriteR . rewrite1) r)
go (Tuplet n r) = Tuplet n ((rewriteR . rewrite1) r) | 224 | false | false | 0 | 11 | 63 | 129 | 64 | 65 | null | null |
dkensinger/haskell | countdown.hs | gpl-3.0 | --Exploiting numeric properties
-----------------------------
valid' :: Op -> Int -> Int -> Bool
valid' Add x y = x <= y | 160 | valid' :: Op -> Int -> Int -> Bool
valid' Add x y = x <= y | 97 | valid' Add x y = x <= y | 39 | true | true | 0 | 7 | 60 | 36 | 19 | 17 | null | null |
nh2/shake | Development/Shake/FilePath.hs | bsd-3-clause | -- | Remove the current extension and add another, an alias for 'replaceExtension'.
(-<.>) :: FilePath -> String -> FilePath
(-<.>) = replaceExtension | 150 | (-<.>) :: FilePath -> String -> FilePath
(-<.>) = replaceExtension | 66 | (-<.>) = replaceExtension | 25 | true | true | 0 | 8 | 22 | 31 | 16 | 15 | null | null |
snoyberg/ghc | libraries/base/GHC/Event/PSQ.hs | bsd-3-clause | Winner e@(E k p v) t m `play` Winner e'@(E k' p' v') t' m'
| p <= p' = Winner e (rbalance k' p' v' t m t') m'
| otherwise = Winner e' (lbalance k p v t m t') m' | 170 | Winner e@(E k p v) t m `play` Winner e'@(E k' p' v') t' m'
| p <= p' = Winner e (rbalance k' p' v' t m t') m'
| otherwise = Winner e' (lbalance k p v t m t') m' | 170 | Winner e@(E k p v) t m `play` Winner e'@(E k' p' v') t' m'
| p <= p' = Winner e (rbalance k' p' v' t m t') m'
| otherwise = Winner e' (lbalance k p v t m t') m' | 170 | false | false | 0 | 9 | 52 | 132 | 59 | 73 | null | null |
brendanhay/gogol | gogol-datafusion/gen/Network/Google/Resource/DataFusion/Projects/Locations/Instances/Delete.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
plidUploadType :: Lens' ProjectsLocationsInstancesDelete (Maybe Text)
plidUploadType
= lens _plidUploadType
(\ s a -> s{_plidUploadType = a}) | 220 | plidUploadType :: Lens' ProjectsLocationsInstancesDelete (Maybe Text)
plidUploadType
= lens _plidUploadType
(\ s a -> s{_plidUploadType = a}) | 149 | plidUploadType
= lens _plidUploadType
(\ s a -> s{_plidUploadType = a}) | 79 | true | true | 0 | 8 | 34 | 49 | 25 | 24 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110710set4.hs | gpl-3.0 | ucut :: UserCut
ucut = UserCut {
uc_metcut = 15.0
, uc_etacutlep = 2.7
, uc_etcutlep = 18.0
, uc_etacutjet = 2.7
, uc_etcutjet = 15.0
} | 151 | ucut :: UserCut
ucut = UserCut {
uc_metcut = 15.0
, uc_etacutlep = 2.7
, uc_etcutlep = 18.0
, uc_etacutjet = 2.7
, uc_etcutjet = 15.0
} | 150 | ucut = UserCut {
uc_metcut = 15.0
, uc_etacutlep = 2.7
, uc_etcutlep = 18.0
, uc_etacutjet = 2.7
, uc_etcutjet = 15.0
} | 134 | false | true | 0 | 7 | 42 | 50 | 28 | 22 | null | null |
unisonweb/platform | codebase2/codebase-sqlite/U/Codebase/Sqlite/Operations.hs | mit | decodeTermElementDiscardingType :: Err m => C.Reference.Pos -> ByteString -> m (LocalIds, S.Term.Term)
decodeTermElementDiscardingType i = getFromBytesOr (ErrTermElement i) (S.lookupTermElementDiscardingType i) | 210 | decodeTermElementDiscardingType :: Err m => C.Reference.Pos -> ByteString -> m (LocalIds, S.Term.Term)
decodeTermElementDiscardingType i = getFromBytesOr (ErrTermElement i) (S.lookupTermElementDiscardingType i) | 210 | decodeTermElementDiscardingType i = getFromBytesOr (ErrTermElement i) (S.lookupTermElementDiscardingType i) | 107 | false | true | 0 | 10 | 19 | 63 | 32 | 31 | null | null |
ezyang/ghc | compiler/utils/Pretty.hs | bsd-3-clause | brackets p = char '[' <> p <> char ']' | 42 | brackets p = char '[' <> p <> char ']' | 42 | brackets p = char '[' <> p <> char ']' | 42 | false | false | 0 | 7 | 13 | 23 | 10 | 13 | null | null |
bendyworks/haskbot-plugins | src/Plugins/Flipper/Internal.hs | mit | -- constants
name :: Command
name = setCommand "flip" | 54 | name :: Command
name = setCommand "flip" | 40 | name = setCommand "flip" | 24 | true | true | 0 | 6 | 9 | 21 | 9 | 12 | null | null |
tdox/app-arch-sandbox | system.hs | mit | systemAppRoot :: Text
systemAppRoot = "http://" <> decodeUtf8 systemHost <> ":"
<> pack (show systemPort) | 131 | systemAppRoot :: Text
systemAppRoot = "http://" <> decodeUtf8 systemHost <> ":"
<> pack (show systemPort) | 131 | systemAppRoot = "http://" <> decodeUtf8 systemHost <> ":"
<> pack (show systemPort) | 109 | false | true | 0 | 8 | 40 | 35 | 17 | 18 | null | null |
jxwr/hdep | src/Core.hs | bsd-3-clause | x = UN ["x"] | 12 | x = UN ["x"] | 12 | x = UN ["x"] | 12 | false | false | 1 | 6 | 3 | 15 | 6 | 9 | null | null |
scott-fleischman/greek-grammar | haskell/unicode-script/unicode-script.hs | mit | toTextRecord :: Text -> Maybe TextRecord
toTextRecord = toSplitTextRecord . split (== ';') | 90 | toTextRecord :: Text -> Maybe TextRecord
toTextRecord = toSplitTextRecord . split (== ';') | 90 | toTextRecord = toSplitTextRecord . split (== ';') | 49 | false | true | 0 | 7 | 12 | 29 | 15 | 14 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.