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
lpeterse/koka
src/Kind/Unify.hs
apache-2.0
mgu (KIApp k1 k2) (KIApp l1 l2) = case mgu k1 l1 of Ok sub1 -> case mgu (sub1 |=> k2) (sub1 |=> l2) of Ok sub2 -> Ok (sub2 @@ sub1) err -> err err -> err -- pull up KApp's
235
mgu (KIApp k1 k2) (KIApp l1 l2) = case mgu k1 l1 of Ok sub1 -> case mgu (sub1 |=> k2) (sub1 |=> l2) of Ok sub2 -> Ok (sub2 @@ sub1) err -> err err -> err -- pull up KApp's
235
mgu (KIApp k1 k2) (KIApp l1 l2) = case mgu k1 l1 of Ok sub1 -> case mgu (sub1 |=> k2) (sub1 |=> l2) of Ok sub2 -> Ok (sub2 @@ sub1) err -> err err -> err -- pull up KApp's
235
false
false
1
13
105
105
49
56
null
null
sharkdp/yinsh
src/Yinsh.hs
mit
-- | Get all ring coordinates of one player. rings :: Player -> Board -> [YCoord] rings B = ringsB
98
rings :: Player -> Board -> [YCoord] rings B = ringsB
53
rings B = ringsB
16
true
true
0
7
19
26
14
12
null
null
snoyberg/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
tickToTag BottomFound = 14
44
tickToTag BottomFound = 14
44
tickToTag BottomFound = 14
44
false
false
0
5
21
9
4
5
null
null
vollmerm/accelerate-apart
Data/Array/Accelerate/Apart/Acc.hs
bsd-3-clause
adaptFun (Lam f) = Lam $ adaptFun f
37
adaptFun (Lam f) = Lam $ adaptFun f
37
adaptFun (Lam f) = Lam $ adaptFun f
37
false
false
2
6
9
24
10
14
null
null
Zoetermeer/latro
src/Latro/Typecheck.hs
mit
addBindingsForPat patE ty = throwError $ ErrPatMatchBindingFail patE ty
73
addBindingsForPat patE ty = throwError $ ErrPatMatchBindingFail patE ty
73
addBindingsForPat patE ty = throwError $ ErrPatMatchBindingFail patE ty
73
false
false
2
5
10
22
9
13
null
null
brendanhay/gogol
gogol-vision/gen/Network/Google/Vision/Types/Product.hs
mpl-2.0
-- | Entity textual description, expressed in its \`locale\` language. gcvveacDescription :: Lens' GoogleCloudVisionV1p4beta1EntityAnnotation (Maybe Text) gcvveacDescription = lens _gcvveacDescription (\ s a -> s{_gcvveacDescription = a})
246
gcvveacDescription :: Lens' GoogleCloudVisionV1p4beta1EntityAnnotation (Maybe Text) gcvveacDescription = lens _gcvveacDescription (\ s a -> s{_gcvveacDescription = a})
175
gcvveacDescription = lens _gcvveacDescription (\ s a -> s{_gcvveacDescription = a})
91
true
true
1
9
34
51
25
26
null
null
siddhanathan/yi-rope
src/Yi/Rope.hs
gpl-2.0
-- | Returns the underlying string. unCn :: ConverterName -> String unCn (CN s) = s
83
unCn :: ConverterName -> String unCn (CN s) = s
47
unCn (CN s) = s
15
true
true
0
9
15
31
14
17
null
null
acowley/ghc
compiler/types/Type.hs
bsd-3-clause
mkAppTy ty1 ty2 = AppTy ty1 ty2
45
mkAppTy ty1 ty2 = AppTy ty1 ty2
45
mkAppTy ty1 ty2 = AppTy ty1 ty2
45
false
false
0
5
20
17
7
10
null
null
lifengsun/haskell-exercise
scheme/03/evaluator3.hs
gpl-3.0
parseNumber :: Parser LispVal parseNumber = liftM (Number . read) $ many1 digit
79
parseNumber :: Parser LispVal parseNumber = liftM (Number . read) $ many1 digit
79
parseNumber = liftM (Number . read) $ many1 digit
49
false
true
0
8
12
31
15
16
null
null
ion1/sqarkov
src/Sqarkov/LogParse.hs
isc
timestamp :: Parser Timestamp timestamp = do _year <- replicateM 4 digit <* char '-' _month <- replicateM 2 digit <* char '-' _day <- replicateM 2 digit <* char ' ' _hour <- replicateM 2 digit <* char ':' _min <- replicateM 2 digit <* char ':' _sec <- replicateM 2 digit (char ' ' *> tz) <|> return...
485
timestamp :: Parser Timestamp timestamp = do _year <- replicateM 4 digit <* char '-' _month <- replicateM 2 digit <* char '-' _day <- replicateM 2 digit <* char ' ' _hour <- replicateM 2 digit <* char ':' _min <- replicateM 2 digit <* char ':' _sec <- replicateM 2 digit (char ' ' *> tz) <|> return...
485
timestamp = do _year <- replicateM 4 digit <* char '-' _month <- replicateM 2 digit <* char '-' _day <- replicateM 2 digit <* char ' ' _hour <- replicateM 2 digit <* char ':' _min <- replicateM 2 digit <* char ':' _sec <- replicateM 2 digit (char ' ' *> tz) <|> return () where tz = do ...
455
false
true
0
13
141
215
94
121
null
null
tjakway/ghcjvm
compiler/hsSyn/HsExpr.hs
bsd-3-clause
-- Not used at runtime matchContextErrString (StmtCtxt (ParStmtCtxt c)) = matchContextErrString (StmtCtxt c)
110
matchContextErrString (StmtCtxt (ParStmtCtxt c)) = matchContextErrString (StmtCtxt c)
87
matchContextErrString (StmtCtxt (ParStmtCtxt c)) = matchContextErrString (StmtCtxt c)
87
true
false
0
8
14
32
15
17
null
null
max630/git-rehi
app/Rehi/Utils/Regex.hs
gpl-2.0
regex_match_with_newlines = regex_match_ex P.compDotAll
55
regex_match_with_newlines = regex_match_ex P.compDotAll
55
regex_match_with_newlines = regex_match_ex P.compDotAll
55
false
false
0
6
3
11
5
6
null
null
mcmaniac/ghc
ghc/Main.hs
bsd-3-clause
addFlag :: String -> String -> EwM ModeM () addFlag s flag = liftEwM $ do (m, e, flags') <- getCmdLineState putCmdLineState (m, e, mkGeneralLocated loc s : flags') where loc = "addFlag by " ++ flag ++ " on the commandline" -- ---------------------------------------------------------------------------- -- Run -...
330
addFlag :: String -> String -> EwM ModeM () addFlag s flag = liftEwM $ do (m, e, flags') <- getCmdLineState putCmdLineState (m, e, mkGeneralLocated loc s : flags') where loc = "addFlag by " ++ flag ++ " on the commandline" -- ---------------------------------------------------------------------------- -- Run -...
330
addFlag s flag = liftEwM $ do (m, e, flags') <- getCmdLineState putCmdLineState (m, e, mkGeneralLocated loc s : flags') where loc = "addFlag by " ++ flag ++ " on the commandline" -- ---------------------------------------------------------------------------- -- Run --make mode
286
false
true
5
10
56
102
49
53
null
null
hvr/cassava
src/Data/Csv/Encoding.hs
bsd-3-clause
decodeWithP' :: AL.Parser a -> L.ByteString -> Either String a decodeWithP' p s = case AL.parse p s of AL.Done _ v -> Right v AL.Fail left _ msg -> Left errMsg where errMsg = "parse error (" ++ msg ++ ") at " ++ (if BL8.length left > 100 then ...
416
decodeWithP' :: AL.Parser a -> L.ByteString -> Either String a decodeWithP' p s = case AL.parse p s of AL.Done _ v -> Right v AL.Fail left _ msg -> Left errMsg where errMsg = "parse error (" ++ msg ++ ") at " ++ (if BL8.length left > 100 then ...
416
decodeWithP' p s = case AL.parse p s of AL.Done _ v -> Right v AL.Fail left _ msg -> Left errMsg where errMsg = "parse error (" ++ msg ++ ") at " ++ (if BL8.length left > 100 then (take 100 $ BL8.unpack left) ++ " (truncated)" ...
353
false
true
0
17
160
154
73
81
null
null
rueshyna/gogol
gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Product.hs
mpl-2.0
-- | This saved report\'s name. sName :: Lens' SavedReport (Maybe Text) sName = lens _sName (\ s a -> s{_sName = a})
116
sName :: Lens' SavedReport (Maybe Text) sName = lens _sName (\ s a -> s{_sName = a})
84
sName = lens _sName (\ s a -> s{_sName = a})
44
true
true
0
9
22
46
25
21
null
null
josefs/autosar
ARSim/arsim/AUTOSAR/ARSim.hs
bsd-3-clause
mkCDouble :: Double -> CDouble mkCDouble = CDouble
50
mkCDouble :: Double -> CDouble mkCDouble = CDouble
50
mkCDouble = CDouble
19
false
true
0
7
7
22
9
13
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
jsCASE :: CompileInfo -> Bool -> Reg -> [(Int, [BC])] -> Maybe [BC] -> JS jsCASE info safe reg cases def = JSSwitch (tag safe $ translateReg reg) ( map ((JSNum . JSInt) *** prepBranch) cases ) (fmap prepBranch def) where tag :: Bool -> JS -> JS tag True = jsCTAG tag False = jsTAG p...
614
jsCASE :: CompileInfo -> Bool -> Reg -> [(Int, [BC])] -> Maybe [BC] -> JS jsCASE info safe reg cases def = JSSwitch (tag safe $ translateReg reg) ( map ((JSNum . JSInt) *** prepBranch) cases ) (fmap prepBranch def) where tag :: Bool -> JS -> JS tag True = jsCTAG tag False = jsTAG p...
614
jsCASE info safe reg cases def = JSSwitch (tag safe $ translateReg reg) ( map ((JSNum . JSInt) *** prepBranch) cases ) (fmap prepBranch def) where tag :: Bool -> JS -> JS tag True = jsCTAG tag False = jsTAG prepBranch :: [BC] -> JS prepBranch bc = JSSeq $ map (translateBC inf...
540
false
true
0
13
198
258
134
124
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Latex.hs
gpl-2.0
regex_'5cs'2a'5c'7b'5cs'2a = compileRegex True "\\s*\\{\\s*"
60
regex_'5cs'2a'5c'7b'5cs'2a = compileRegex True "\\s*\\{\\s*"
60
regex_'5cs'2a'5c'7b'5cs'2a = compileRegex True "\\s*\\{\\s*"
60
false
false
0
5
4
11
5
6
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Upgrade.hs
mit
mineralsFactor SingularityCharge = 0
36
mineralsFactor SingularityCharge = 0
36
mineralsFactor SingularityCharge = 0
36
false
false
0
5
3
9
4
5
null
null
nikai3d/ce-challenges
easy/intersection.hs
bsd-3-clause
main :: IO () main = do [inpFile] <- getArgs input <- readFile inpFile putStr . unlines . map (intercalate "," . doIntersect . map (splitOn ",") . splitOn ";") $ lines input
185
main :: IO () main = do [inpFile] <- getArgs input <- readFile inpFile putStr . unlines . map (intercalate "," . doIntersect . map (splitOn ",") . splitOn ";") $ lines input
185
main = do [inpFile] <- getArgs input <- readFile inpFile putStr . unlines . map (intercalate "," . doIntersect . map (splitOn ",") . splitOn ";") $ lines input
171
false
true
1
16
44
91
40
51
null
null
rueshyna/gogol
gogol-partners/gen/Network/Google/Partners/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GetCompanyResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'gcrResponseMetadata' -- -- * 'gcrCompany' getCompanyResponse :: GetCompanyResponse getCompanyResponse = GetCompanyResponse' { _gc...
381
getCompanyResponse :: GetCompanyResponse getCompanyResponse = GetCompanyResponse' { _gcrResponseMetadata = Nothing , _gcrCompany = Nothing }
160
getCompanyResponse = GetCompanyResponse' { _gcrResponseMetadata = Nothing , _gcrCompany = Nothing }
115
true
true
0
7
72
42
24
18
null
null
nickng/gong
GoParser.hs
apache-2.0
transformMain (D _ vars p) = transform vars p
45
transformMain (D _ vars p) = transform vars p
45
transformMain (D _ vars p) = transform vars p
45
false
false
0
7
8
24
11
13
null
null
matthewbauer/eu4-parser
Map.hs
gpl-3.0
-- |top-level access to default map defaultMap :: IO [ClausewitzText.Value] defaultMap = readAndParse $ mapPath "default.map"
125
defaultMap :: IO [ClausewitzText.Value] defaultMap = readAndParse $ mapPath "default.map"
89
defaultMap = readAndParse $ mapPath "default.map"
49
true
true
0
8
15
32
15
17
null
null
avh4/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
expecting = flip (<?>)
22
expecting = flip (<?>)
22
expecting = flip (<?>)
22
false
false
1
5
3
15
6
9
null
null
hephaestus-pl/hephaestus
alexandre/feature-modeling/src/FeatureModel/Logic.hs
mit
orChildren :: T.Tree (Feature a) -> [Feature a] orChildren ftree = concat [children f | f <- subtrees ftree, isOrFeature (fnode f)]
131
orChildren :: T.Tree (Feature a) -> [Feature a] orChildren ftree = concat [children f | f <- subtrees ftree, isOrFeature (fnode f)]
131
orChildren ftree = concat [children f | f <- subtrees ftree, isOrFeature (fnode f)]
83
false
true
0
10
21
68
32
36
null
null
black0range/Smutt
src/Smutt/Util/URLEncoding/Util.hs
mit
encodedWord8 :: Word8 -> Maybe B.ByteString encodedWord8 c | c == fromChar ' ' = Just "+" | Ascii.isAlphaNum c || isAllowedChar c = Nothing | otherwise = Just $ "%" <> HexString.fromIntegral c
198
encodedWord8 :: Word8 -> Maybe B.ByteString encodedWord8 c | c == fromChar ' ' = Just "+" | Ascii.isAlphaNum c || isAllowedChar c = Nothing | otherwise = Just $ "%" <> HexString.fromIntegral c
198
encodedWord8 c | c == fromChar ' ' = Just "+" | Ascii.isAlphaNum c || isAllowedChar c = Nothing | otherwise = Just $ "%" <> HexString.fromIntegral c
154
false
true
1
10
39
82
37
45
null
null
Mathnerd314/lamdu
test/Utils.hs
gpl-3.0
recursiveDefI :: DefI t recursiveDefI = IRef.unsafeFromGuid $ Guid.fromString "Definition"
90
recursiveDefI :: DefI t recursiveDefI = IRef.unsafeFromGuid $ Guid.fromString "Definition"
90
recursiveDefI = IRef.unsafeFromGuid $ Guid.fromString "Definition"
66
false
true
0
7
9
30
13
17
null
null
meteogrid/mime-mail-parser
Network/Mail/Mime/Parser/Internal/Rfc2822.hs
bsd-3-clause
-- |Parse a 'sender' header line but allow for the obsolete -- folding syntax. obs_sender :: Parser NameAddr obs_sender = obs_header "Sender" mailbox
160
obs_sender :: Parser NameAddr obs_sender = obs_header "Sender" mailbox
80
obs_sender = obs_header "Sender" mailbox
45
true
true
1
5
33
24
11
13
null
null
SamirTalwar/advent-of-code
2016/AOC_20_2.hs
mit
parseInput :: Text -> IPRange parseInput text = either (error . show) id $ parse parser "" text where parser = do start <- number char '-' end <- number return $ IPRange start (end + 1) number = read <$> many1 digit
249
parseInput :: Text -> IPRange parseInput text = either (error . show) id $ parse parser "" text where parser = do start <- number char '-' end <- number return $ IPRange start (end + 1) number = read <$> many1 digit
249
parseInput text = either (error . show) id $ parse parser "" text where parser = do start <- number char '-' end <- number return $ IPRange start (end + 1) number = read <$> many1 digit
219
false
true
4
10
76
113
48
65
null
null
andrewMacmurray/haskell-book-solutions
src/ch6/excercises.hs
mit
printPerson :: Person -> IO () printPerson person = putStrLn (show person)
74
printPerson :: Person -> IO () printPerson person = putStrLn (show person)
74
printPerson person = putStrLn (show person)
43
false
true
0
7
11
32
15
17
null
null
wellposed/hblas
src/Numerical/HBLAS/UtilsFFI.hs
bsd-3-clause
unsafeWithPrim (MVector _ fp) fun = withForeignPtrPrim fp fun
62
unsafeWithPrim (MVector _ fp) fun = withForeignPtrPrim fp fun
62
unsafeWithPrim (MVector _ fp) fun = withForeignPtrPrim fp fun
62
false
false
0
7
9
24
11
13
null
null
chpatrick/language-glsl
tests/Tests.hs
bsd-3-clause
main :: IO () main = defaultMain . hUnitTestToTests . TestList $ parsingTests
77
main :: IO () main = defaultMain . hUnitTestToTests . TestList $ parsingTests
77
main = defaultMain . hUnitTestToTests . TestList $ parsingTests
63
false
true
0
7
12
28
14
14
null
null
pierric/neural-network
Backend-blashs/Data/NeuralNetwork/Backend/BLASHS/Utils.hs
bsd-3-clause
pool stride mat = do mxi <- newDenseVector (r'*c') mxv <- newDenseMatrix r' c' forM_ [0..r'-1] $ \i -> do forM_ [0..c'-1] $ \j -> do (n,v) <- unsafeMaxIndEle mat (i*stride) (j*stride) stride stride unsafeWriteV mxi (i*c'+j) n unsafeWriteM mxv (i,j) v return (mxi,mxv) where (r,c) =...
876
pool stride mat = do mxi <- newDenseVector (r'*c') mxv <- newDenseMatrix r' c' forM_ [0..r'-1] $ \i -> do forM_ [0..c'-1] $ \j -> do (n,v) <- unsafeMaxIndEle mat (i*stride) (j*stride) stride stride unsafeWriteV mxi (i*c'+j) n unsafeWriteM mxv (i,j) v return (mxi,mxv) where (r,c) =...
876
pool stride mat = do mxi <- newDenseVector (r'*c') mxv <- newDenseMatrix r' c' forM_ [0..r'-1] $ \i -> do forM_ [0..c'-1] $ \j -> do (n,v) <- unsafeMaxIndEle mat (i*stride) (j*stride) stride stride unsafeWriteV mxi (i*c'+j) n unsafeWriteM mxv (i,j) v return (mxi,mxv) where (r,c) =...
876
false
false
3
26
297
450
218
232
null
null
david-caro/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
runNodeAnalysis f p t = execWriter (doAnalysis (f p) t)
55
runNodeAnalysis f p t = execWriter (doAnalysis (f p) t)
55
runNodeAnalysis f p t = execWriter (doAnalysis (f p) t)
55
false
false
0
9
9
30
14
16
null
null
denisenkom/hsmssql
TestMain.hs
mit
connect = do hoststr <- getEnv "HOST" inst <- fmap (fromMaybe "") (lookupEnv "INSTANCE") password <- fmap (fromMaybe "sa") (lookupEnv "SQLPASSWORD") username <- fmap (fromMaybe "sa") (lookupEnv "SQLUSER") connectMssql hoststr inst username password
268
connect = do hoststr <- getEnv "HOST" inst <- fmap (fromMaybe "") (lookupEnv "INSTANCE") password <- fmap (fromMaybe "sa") (lookupEnv "SQLPASSWORD") username <- fmap (fromMaybe "sa") (lookupEnv "SQLUSER") connectMssql hoststr inst username password
268
connect = do hoststr <- getEnv "HOST" inst <- fmap (fromMaybe "") (lookupEnv "INSTANCE") password <- fmap (fromMaybe "sa") (lookupEnv "SQLPASSWORD") username <- fmap (fromMaybe "sa") (lookupEnv "SQLUSER") connectMssql hoststr inst username password
268
false
false
0
10
52
100
45
55
null
null
GaloisInc/saw-script
src/SAWScript/Builtins.hs
bsd-3-clause
dsecPrint :: TypedTerm -> TypedTerm -> TopLevel () dsecPrint t1 t2 = do withSystemTempFile ".aig" $ \path1 _handle1 -> do withSystemTempFile ".aig" $ \path2 _handle2 -> do Prover.writeSAIGInferLatches path1 t1 Prover.writeSAIGInferLatches path2 t2 io $ callCommand (abcDsec path1 path2) where -- The '-w'...
425
dsecPrint :: TypedTerm -> TypedTerm -> TopLevel () dsecPrint t1 t2 = do withSystemTempFile ".aig" $ \path1 _handle1 -> do withSystemTempFile ".aig" $ \path2 _handle2 -> do Prover.writeSAIGInferLatches path1 t1 Prover.writeSAIGInferLatches path2 t2 io $ callCommand (abcDsec path1 path2) where -- The '-w'...
425
dsecPrint t1 t2 = do withSystemTempFile ".aig" $ \path1 _handle1 -> do withSystemTempFile ".aig" $ \path2 _handle2 -> do Prover.writeSAIGInferLatches path1 t1 Prover.writeSAIGInferLatches path2 t2 io $ callCommand (abcDsec path1 path2) where -- The '-w' here may be overkill ... abcDsec path1 path2 =...
374
false
true
0
18
82
122
56
66
null
null
mgold/Elm
src/Canonicalize/Body.hs
bsd-3-clause
toPortExpr :: String -> Effects.Kind -> Canonical.Expr' toPortExpr name kind = case kind of Effects.Outgoing tipe -> E.OutgoingPort name tipe Effects.Incoming tipe -> E.IncomingPort name tipe
214
toPortExpr :: String -> Effects.Kind -> Canonical.Expr' toPortExpr name kind = case kind of Effects.Outgoing tipe -> E.OutgoingPort name tipe Effects.Incoming tipe -> E.IncomingPort name tipe
214
toPortExpr name kind = case kind of Effects.Outgoing tipe -> E.OutgoingPort name tipe Effects.Incoming tipe -> E.IncomingPort name tipe
158
false
true
0
9
48
73
33
40
null
null
hanshoglund/comb
src/Sound/Comb/Prim/IO.hs
bsd-3-clause
kMaxInputs = 1024
17
kMaxInputs = 1024
17
kMaxInputs = 1024
17
false
false
0
4
2
6
3
3
null
null
bitemyapp/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name lookupLocalRdrOcc (LRE { lre_env = env }) occ = lookupOccEnv env occ
126
lookupLocalRdrOcc :: LocalRdrEnv -> OccName -> Maybe Name lookupLocalRdrOcc (LRE { lre_env = env }) occ = lookupOccEnv env occ
126
lookupLocalRdrOcc (LRE { lre_env = env }) occ = lookupOccEnv env occ
68
false
true
0
9
19
44
22
22
null
null
scvalex/logorrhea
lib/DrLogos/Parser.hs
bsd-3-clause
p_historyMessage :: Parser BotMessage p_historyMessage = HistoryMessage <$> (char '<' *> p_nickName <* char '>') <*> (space *> many anyChar <* eof)
195
p_historyMessage :: Parser BotMessage p_historyMessage = HistoryMessage <$> (char '<' *> p_nickName <* char '>') <*> (space *> many anyChar <* eof)
195
p_historyMessage = HistoryMessage <$> (char '<' *> p_nickName <* char '>') <*> (space *> many anyChar <* eof)
157
false
true
0
10
69
53
26
27
null
null
JaDogg/__py_playground
reference/sketchbook/regex/nfa.hs
mit
accepts (Expect _ _) = False
28
accepts (Expect _ _) = False
28
accepts (Expect _ _) = False
28
false
false
0
7
5
17
8
9
null
null
RAFIRAF/HASKELL
shapes.hs
mit
baseCircle :: Float -> Shape baseCircle r = Circle (Point 0 0) r
64
baseCircle :: Float -> Shape baseCircle r = Circle (Point 0 0) r
64
baseCircle r = Circle (Point 0 0) r
35
false
true
0
7
12
31
15
16
null
null
avh4/elm-format
elm-format-lib/src/Parse/Helpers.hs
bsd-3-clause
until :: IParser a -> IParser b -> IParser b until p end = go where go = end <|> (p >> go) -- BASIC LANGUAGE LITERALS
129
until :: IParser a -> IParser b -> IParser b until p end = go where go = end <|> (p >> go) -- BASIC LANGUAGE LITERALS
129
until p end = go where go = end <|> (p >> go) -- BASIC LANGUAGE LITERALS
84
false
true
0
7
38
53
26
27
null
null
dan-t/hdevtools
src/Main.hs
mit
defaultSocketFilename :: FilePath defaultSocketFilename = ".hdevtools.sock"
75
defaultSocketFilename :: FilePath defaultSocketFilename = ".hdevtools.sock"
75
defaultSocketFilename = ".hdevtools.sock"
41
false
true
0
4
5
11
6
5
null
null
ejlilley/AbstractMusic
LilyParse.hs
gpl-3.0
expandVarsRec d ((Score e):xs) = let e' = mapIdents (eval d) e in (Score e'):(expandVarsRec d xs)
130
expandVarsRec d ((Score e):xs) = let e' = mapIdents (eval d) e in (Score e'):(expandVarsRec d xs)
130
expandVarsRec d ((Score e):xs) = let e' = mapIdents (eval d) e in (Score e'):(expandVarsRec d xs)
130
false
false
0
11
49
66
31
35
null
null
ben-schulz/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
declared (PClauses _ _ n _) = []
32
declared (PClauses _ _ n _) = []
32
declared (PClauses _ _ n _) = []
32
false
false
0
6
7
24
11
13
null
null
peterokagey/haskellOEIS
src/Sandbox/PolyominoCover.hs
apache-2.0
-- Check if a *fixed* polyomino fits in another polyomino. translate :: Coord -> Coord -> Polyomino -> Polyomino translate x y = map (\(a, b) -> (a + x, b + y))
161
translate :: Coord -> Coord -> Polyomino -> Polyomino translate x y = map (\(a, b) -> (a + x, b + y))
101
translate x y = map (\(a, b) -> (a + x, b + y))
47
true
true
0
9
33
60
33
27
null
null
chemist/highlighter
src/Text/Highlighter/Lexers/CoffeeScript.hs
bsd-3-clause
root' :: TokenMatcher root' = [ tokNext "^(?=\\s|/|<!--)" (Arbitrary "Text") (GoTo slashstartsregex') , anyOf commentsandwhitespace' , tokNext "\\+\\+|--|\126|&&|\\band\\b|\\bor\\b|\\bis\\b|\\bisnt\\b|\\bnot\\b|\\?|:|=|\\|\\||\\\\(?=\\n)|(<<|>>>?|==?|!=?|[-<>+*`%&\\|\\^/])=?" (Arbitrary "Operator") (GoTo sl...
2,010
root' :: TokenMatcher root' = [ tokNext "^(?=\\s|/|<!--)" (Arbitrary "Text") (GoTo slashstartsregex') , anyOf commentsandwhitespace' , tokNext "\\+\\+|--|\126|&&|\\band\\b|\\bor\\b|\\bis\\b|\\bisnt\\b|\\bnot\\b|\\?|:|=|\\|\\||\\\\(?=\\n)|(<<|>>>?|==?|!=?|[-<>+*`%&\\|\\^/])=?" (Arbitrary "Operator") (GoTo sl...
2,010
root' = [ tokNext "^(?=\\s|/|<!--)" (Arbitrary "Text") (GoTo slashstartsregex') , anyOf commentsandwhitespace' , tokNext "\\+\\+|--|\126|&&|\\band\\b|\\bor\\b|\\bis\\b|\\bisnt\\b|\\bnot\\b|\\?|:|=|\\|\\||\\\\(?=\\n)|(<<|>>>?|==?|!=?|[-<>+*`%&\\|\\^/])=?" (Arbitrary "Operator") (GoTo slashstartsregex') ,...
1,988
false
true
0
11
225
423
201
222
null
null
tomahawkins/trs
Language/TRS/Language.hs
bsd-3-clause
rules :: Name -> [Action ()] -> System () rules name actions = mapM_ (\ (a,n) -> rule (name ++ show n) a) $ zip actions [0..]
125
rules :: Name -> [Action ()] -> System () rules name actions = mapM_ (\ (a,n) -> rule (name ++ show n) a) $ zip actions [0..]
125
rules name actions = mapM_ (\ (a,n) -> rule (name ++ show n) a) $ zip actions [0..]
83
false
true
0
11
26
85
42
43
null
null
timstclair/experimental
haskell/real_world_haskell/ch05/SimpleJSON.hs
unlicense
getInt (JNumber n) = Just (truncate n)
38
getInt (JNumber n) = Just (truncate n)
38
getInt (JNumber n) = Just (truncate n)
38
false
false
0
7
6
25
11
14
null
null
reinerp/th-unboxing
Data/Unboxed/LiftCon.hs
bsd-3-clause
fromPred :: Pred -> SimplePred fromPred (ClassP nm tys) = ClassPS (fromName nm) (map fromType tys)
98
fromPred :: Pred -> SimplePred fromPred (ClassP nm tys) = ClassPS (fromName nm) (map fromType tys)
98
fromPred (ClassP nm tys) = ClassPS (fromName nm) (map fromType tys)
67
false
true
0
9
15
50
23
27
null
null
armoredsoftware/protocol
tpm/mainline/src/TPM/Const.hs
bsd-3-clause
tpm_ord_dirwriteauth = (0x00000019 :: Word32)
45
tpm_ord_dirwriteauth = (0x00000019 :: Word32)
45
tpm_ord_dirwriteauth = (0x00000019 :: Word32)
45
false
false
0
5
4
12
7
5
null
null
zmoazeni/hackerrank-solutions
haskell/saveprincess/Main.hs
mit
isPrincess :: Finder isPrincess = (== 'p')
42
isPrincess :: Finder isPrincess = (== 'p')
42
isPrincess = (== 'p')
21
false
true
0
5
6
15
9
6
null
null
adnelson/Idris-dev
src/Idris/Core/Unify.hs
bsd-3-clause
unify :: Context -> Env -> (TT Name, Maybe Provenance) -> (TT Name, Maybe Provenance) -> [Name] -> [Name] -> [Name] -> [FailContext] -> TC ([(Name, TT Name)], Fails) unify ctxt env (topx, xfrom) (topy, yfrom) inj holes usersupp from = -- traceWhen (hasv topx || hasv topy) -- ...
19,946
unify :: Context -> Env -> (TT Name, Maybe Provenance) -> (TT Name, Maybe Provenance) -> [Name] -> [Name] -> [Name] -> [FailContext] -> TC ([(Name, TT Name)], Fails) unify ctxt env (topx, xfrom) (topy, yfrom) inj holes usersupp from = -- traceWhen (hasv topx || hasv topy) -- ...
19,946
unify ctxt env (topx, xfrom) (topy, yfrom) inj holes usersupp from = -- traceWhen (hasv topx || hasv topy) -- ("Unifying " ++ show topx ++ "\nAND\n" ++ show topy ++ "\n") $ -- don't bother if topx and topy are different at the head case runStateT (un False [] (renameBindersTm env topx)...
19,742
false
true
54
19
9,018
8,035
3,795
4,240
null
null
ksaveljev/hake-2
src/CVarVariables.hs
bsd-3-clause
mYawCVar = CVar.getExisting "m_yaw"
55
mYawCVar = CVar.getExisting "m_yaw"
55
mYawCVar = CVar.getExisting "m_yaw"
55
false
false
0
6
23
11
5
6
null
null
tphyahoo/haskoin-wallet
Network/Haskoin/Wallet/Transaction.hs
unlicense
resetRescan :: MonadIO m => SqlPersistT m () resetRescan = do P.deleteWhere ([] :: [P.Filter KeyRingCoin]) P.deleteWhere ([] :: [P.Filter KeyRingSpentCoin]) P.deleteWhere ([] :: [P.Filter KeyRingTx]) setBestBlock (headerHash genesisHeader) 0 {- Helpers -} -- Join AND expressions with OR conditions in ...
332
resetRescan :: MonadIO m => SqlPersistT m () resetRescan = do P.deleteWhere ([] :: [P.Filter KeyRingCoin]) P.deleteWhere ([] :: [P.Filter KeyRingSpentCoin]) P.deleteWhere ([] :: [P.Filter KeyRingTx]) setBestBlock (headerHash genesisHeader) 0 {- Helpers -} -- Join AND expressions with OR conditions in ...
332
resetRescan = do P.deleteWhere ([] :: [P.Filter KeyRingCoin]) P.deleteWhere ([] :: [P.Filter KeyRingSpentCoin]) P.deleteWhere ([] :: [P.Filter KeyRingTx]) setBestBlock (headerHash genesisHeader) 0 {- Helpers -} -- Join AND expressions with OR conditions in a binary way
287
false
true
0
11
61
113
56
57
null
null
lukemaurer/sequent-core
src/Language/SequentCore/Pretty.hs
bsd-3-clause
ppr_frame (Cast co) = text "cast" <+> pprDeeper (ppr co)
58
ppr_frame (Cast co) = text "cast" <+> pprDeeper (ppr co)
58
ppr_frame (Cast co) = text "cast" <+> pprDeeper (ppr co)
58
false
false
2
7
11
33
14
19
null
null
nomeata/ghc
compiler/cmm/PprC.hs
bsd-3-clause
is_cishCC PrimCallConv = False
30
is_cishCC PrimCallConv = False
30
is_cishCC PrimCallConv = False
30
false
false
0
5
3
9
4
5
null
null
nomeata/ghc
compiler/cmm/PprC.hs
bsd-3-clause
-- -------------------------------------------------------------------------- -- Print a MachOp in a way suitable for emitting via C. -- pprMachOp_for_C :: MachOp -> SDoc pprMachOp_for_C mop = case mop of -- Integer operations MO_Add _ -> char '+' MO_Sub _ -> char '-' ...
3,318
pprMachOp_for_C :: MachOp -> SDoc pprMachOp_for_C mop = case mop of -- Integer operations MO_Add _ -> char '+' MO_Sub _ -> char '-' MO_Eq _ -> ptext (sLit "==") MO_Ne _ -> ptext (sLit "!=") MO_Mul _ -> char '*' MO_S...
3,179
pprMachOp_for_C mop = case mop of -- Integer operations MO_Add _ -> char '+' MO_Sub _ -> char '-' MO_Eq _ -> ptext (sLit "==") MO_Ne _ -> ptext (sLit "!=") MO_Mul _ -> char '*' MO_S_Quot _ -> char '/' ...
3,145
true
true
0
11
1,351
787
356
431
null
null
dysinger/amazonka
amazonka-ecs/gen/Network/AWS/ECS/ListTaskDefinitions.hs
mpl-2.0
-- | The full family name that you want to filter the 'ListTaskDefinitions' results -- with. Specifying a 'familyPrefix' will limit the listed task definitions to -- task definition revisions that belong to that family. ltdFamilyPrefix :: Lens' ListTaskDefinitions (Maybe Text) ltdFamilyPrefix = lens _ltdFamilyPrefix (\...
354
ltdFamilyPrefix :: Lens' ListTaskDefinitions (Maybe Text) ltdFamilyPrefix = lens _ltdFamilyPrefix (\s a -> s { _ltdFamilyPrefix = a })
134
ltdFamilyPrefix = lens _ltdFamilyPrefix (\s a -> s { _ltdFamilyPrefix = a })
76
true
true
0
9
53
48
27
21
null
null
noschinl/cyp
src/Test/Info2/Cyp/Term.hs
mit
generalizeExcept _ t = t
24
generalizeExcept _ t = t
24
generalizeExcept _ t = t
24
false
false
0
5
4
11
5
6
null
null
sdiehl/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprLit i (RationalL rat) = parensIf (i > noPrec) $ integer (numerator rat) <+> char '/' <+> integer (denominator rat)
174
pprLit i (RationalL rat) = parensIf (i > noPrec) $ integer (numerator rat) <+> char '/' <+> integer (denominator rat)
174
pprLit i (RationalL rat) = parensIf (i > noPrec) $ integer (numerator rat) <+> char '/' <+> integer (denominator rat)
174
false
false
0
10
76
62
28
34
null
null
2016-Fall-UPT-PLDA/labs
week-04/Parsers.hs
gpl-3.0
digit :: Parser Char digit = do r1 <- item if(isDigit r1) then return r1 else fail $ "expected a digit" ++ ", but received: " ++ (show r1)
187
digit :: Parser Char digit = do r1 <- item if(isDigit r1) then return r1 else fail $ "expected a digit" ++ ", but received: " ++ (show r1)
187
digit = do r1 <- item if(isDigit r1) then return r1 else fail $ "expected a digit" ++ ", but received: " ++ (show r1)
166
false
true
0
11
77
65
30
35
null
null
Jem777/deepthought
src/StdLib.hs
gpl-3.0
string _ [x] = (goRight . String . show) x
42
string _ [x] = (goRight . String . show) x
42
string _ [x] = (goRight . String . show) x
42
false
false
0
8
9
28
14
14
null
null
siddhanathan/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
collectMethodBinders :: LHsBindsLR RdrName idR -> [Located RdrName] -- Used exclusively for the bindings of an instance decl which are all FunBinds collectMethodBinders binds = foldrBag (get . unLoc) [] binds where get (FunBind { fun_id = f }) fs = f : fs get _ fs = fs -- Someone...
411
collectMethodBinders :: LHsBindsLR RdrName idR -> [Located RdrName] collectMethodBinders binds = foldrBag (get . unLoc) [] binds where get (FunBind { fun_id = f }) fs = f : fs get _ fs = fs -- Someone else complains about non-FunBinds ----------------- Statements ---------------...
331
collectMethodBinders binds = foldrBag (get . unLoc) [] binds where get (FunBind { fun_id = f }) fs = f : fs get _ fs = fs -- Someone else complains about non-FunBinds ----------------- Statements --------------------------
263
true
true
1
9
98
87
45
42
null
null
sarahn/ganeti
src/Ganeti/HTools/Instance.hs
gpl-2.0
-- | Checks whether a given disk template supported moves. supportsMoves :: T.DiskTemplate -> Bool supportsMoves = (`elem` movableDiskTemplates)
144
supportsMoves :: T.DiskTemplate -> Bool supportsMoves = (`elem` movableDiskTemplates)
85
supportsMoves = (`elem` movableDiskTemplates)
45
true
true
0
6
18
24
15
9
null
null
verement/etamoo
src/MOO/AST.hs
bsd-3-clause
putTag1 :: VCacheable a => Word8 -> a -> VPut () putTag1 tag a = putWord8 tag >> put a
86
putTag1 :: VCacheable a => Word8 -> a -> VPut () putTag1 tag a = putWord8 tag >> put a
86
putTag1 tag a = putWord8 tag >> put a
37
false
true
0
9
19
46
21
25
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/StartInstance.hs
mpl-2.0
-- | The instance ID. si1InstanceId :: Lens' StartInstance Text si1InstanceId = lens _si1InstanceId (\s a -> s { _si1InstanceId = a })
134
si1InstanceId :: Lens' StartInstance Text si1InstanceId = lens _si1InstanceId (\s a -> s { _si1InstanceId = a })
112
si1InstanceId = lens _si1InstanceId (\s a -> s { _si1InstanceId = a })
70
true
true
0
9
22
40
22
18
null
null
adarqui/Codex
src/Codex/Lib/LoadBalancer/List.hs
bsd-3-clause
shard'put :: Wrapper a -> Wrapper a shard'put w@Wrapper{..} = w { _list = _list ++ [[]], _shards = _shards + 1 }
112
shard'put :: Wrapper a -> Wrapper a shard'put w@Wrapper{..} = w { _list = _list ++ [[]], _shards = _shards + 1 }
112
shard'put w@Wrapper{..} = w { _list = _list ++ [[]], _shards = _shards + 1 }
76
false
true
0
9
22
60
32
28
null
null
kim/etcdpp
src/Etcd/V2/Client.hs
mpl-2.0
-------------------------------------------------------------------------------- -- Admin API -------------------------------------------------------------------------------- getVersion :: HasEnv e => EtcdM e Version getVersion = call API.getVersion
250
getVersion :: HasEnv e => EtcdM e Version getVersion = call API.getVersion
74
getVersion = call API.getVersion
32
true
true
0
6
17
31
16
15
null
null
dpieroux/euler
0138.hs
mit
euler = sum $ take 12 $ map snd $ tail -- The first solution matches the degenerated case b=0 and h=1 $ filter (\(x, y) -> (\n -> n == 2 || n == 3) $ mod x 5) $ Pell.solve 5 (-1)
208
euler = sum $ take 12 $ map snd $ tail -- The first solution matches the degenerated case b=0 and h=1 $ filter (\(x, y) -> (\n -> n == 2 || n == 3) $ mod x 5) $ Pell.solve 5 (-1)
208
euler = sum $ take 12 $ map snd $ tail -- The first solution matches the degenerated case b=0 and h=1 $ filter (\(x, y) -> (\n -> n == 2 || n == 3) $ mod x 5) $ Pell.solve 5 (-1)
208
false
false
0
15
73
91
47
44
null
null
mmhat/h-gpgme
src/Crypto/Gpgme/Crypto.hs
mit
-- | Convenience wrapper around 'withCtx' and 'withKey' to -- encrypt and sign a single plaintext for a single recipient -- with its homedirectory. encryptSign' :: String -> Fpr -> Plain -> IO (Either String Encrypted) encryptSign' = encryptIntern' encryptSign
264
encryptSign' :: String -> Fpr -> Plain -> IO (Either String Encrypted) encryptSign' = encryptIntern' encryptSign
112
encryptSign' = encryptIntern' encryptSign
41
true
true
0
11
43
45
22
23
null
null
eklavya/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
-- Generate a simple case tree -- Work Right to Left simpleCase :: Bool -> SC -> Bool -> Phase -> FC -> -- Following two can be empty lists when Phase = CoverageCheck [Int] -> -- Inaccessible argument positions [(Type, Bool)] -> -- (Argument type, whether it's c...
2,774
simpleCase :: Bool -> SC -> Bool -> Phase -> FC -> -- Following two can be empty lists when Phase = CoverageCheck [Int] -> -- Inaccessible argument positions [(Type, Bool)] -> -- (Argument type, whether it's canonical) [([Name], Term, Term)] -> ...
2,720
simpleCase tc defcase reflect phase fc inacc argtys cs erInfo = sc' tc defcase phase fc (filter (\(_, _, r) -> case r of Impossible -> False _ -> True) cs) where sc' tc defc...
2,350
true
true
0
21
1,258
853
445
408
null
null
cbaatz/hamu8080
src/Hamu8080/Compute.hs
mit
-- DCX HL doOp 0x3B = liftM (subtract 1) (getRegPair SP) >>= setRegPair SP
74
doOp 0x3B = liftM (subtract 1) (getRegPair SP) >>= setRegPair SP
64
doOp 0x3B = liftM (subtract 1) (getRegPair SP) >>= setRegPair SP
64
true
false
0
8
13
34
16
18
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/Navigation2D.hs
bsd-2-clause
-- | Moves the current window to the next screen in the given direction. The -- second argument indicates wrapping (see 'windowGo'). windowToScreen :: Direction2D -> Bool -> X () windowToScreen dir wrap = actOnScreens ( \ conf cur wspcs -> windows $ doScreenNavigation conf dir ...
422
windowToScreen :: Direction2D -> Bool -> X () windowToScreen dir wrap = actOnScreens ( \ conf cur wspcs -> windows $ doScreenNavigation conf dir W.shift cur wspcs ) wrap
288
windowToScreen dir wrap = actOnScreens ( \ conf cur wspcs -> windows $ doScreenNavigation conf dir W.shift cur wspcs ) wrap
242
true
true
0
10
170
65
33
32
null
null
forsyde/type-level
src/Data/TypeLevel/Bool.hs
bsd-3-clause
-- | value-level reflection function for the Imp type-level relation imp :: Imp b1 b2 b3 => b1 -> b2 -> b3 imp = undefined
122
imp :: Imp b1 b2 b3 => b1 -> b2 -> b3 imp = undefined
53
imp = undefined
15
true
true
0
9
24
38
17
21
null
null
jonsterling/hs-aws-dynamodb-streams
src/Aws/DynamoDb/Streams/Types.hs
apache-2.0
parseEnum ∷ String → (α → T.Text) → [α] → Value → Parser α parseEnum name render opts = withText name $ \str → asum $ parser str <$> opts where parser str o = o <$ if render o ≡ str then pure o else empty -- | A prism for 'KeyTypeHash'. -- -- @ -- '_KeyTypeHash' ∷ Prism' 'K...
335
parseEnum ∷ String → (α → T.Text) → [α] → Value → Parser α parseEnum name render opts = withText name $ \str → asum $ parser str <$> opts where parser str o = o <$ if render o ≡ str then pure o else empty -- | A prism for 'KeyTypeHash'. -- -- @ -- '_KeyTypeHash' ∷ Prism' 'K...
335
parseEnum name render opts = withText name $ \str → asum $ parser str <$> opts where parser str o = o <$ if render o ≡ str then pure o else empty -- | A prism for 'KeyTypeHash'. -- -- @ -- '_KeyTypeHash' ∷ Prism' 'KeyType' () -- @
266
false
true
6
10
109
121
59
62
null
null
solidsnack/bytestring-nums
SPOJStrict.hs
bsd-3-clause
numbers :: Int -> Handle -> [IO Int] numbers !n !h = const (int `fmap` hGetLine h) `fmap` [1..n]
133
numbers :: Int -> Handle -> [IO Int] numbers !n !h = const (int `fmap` hGetLine h) `fmap` [1..n]
133
numbers !n !h = const (int `fmap` hGetLine h) `fmap` [1..n]
75
false
true
0
9
55
58
30
28
null
null
bitemyapp/wreq
Network/Wreq/Internal/Lens.hs
bsd-3-clause
-- | Set a header to the given value, but only if the header was not -- already set. maybeSetHeader :: HeaderName -> S.ByteString -> Request -> Request maybeSetHeader name value = requestHeaders %~ \hdrs -> case lookup name hdrs of Just _ -> hdrs Nothing -> (name,value) : hdrs
306
maybeSetHeader :: HeaderName -> S.ByteString -> Request -> Request maybeSetHeader name value = requestHeaders %~ \hdrs -> case lookup name hdrs of Just _ -> hdrs Nothing -> (name,value) : hdrs
221
maybeSetHeader name value = requestHeaders %~ \hdrs -> case lookup name hdrs of Just _ -> hdrs Nothing -> (name,value) : hdrs
154
true
true
0
11
78
81
40
41
null
null
AkronCodeClub/edX-FP101x-Oct-2014
sean_o/hw8.hs
mit
liftM4' f m = return (f m)
26
liftM4' f m = return (f m)
26
liftM4' f m = return (f m)
26
false
false
0
7
6
20
9
11
null
null
urbanslug/ghc
compiler/utils/Util.hs
bsd-3-clause
zipWithEqual _ = zipWith
25
zipWithEqual _ = zipWith
25
zipWithEqual _ = zipWith
25
false
false
0
5
4
9
4
5
null
null
m00nlight/hackerrank
functional/functional-structure/Substring-Searching/main.hs
gpl-2.0
makeTable :: Eq a => [a] -> KMP a makeTable xs = table where table = makeTable' xs (const table)
99
makeTable :: Eq a => [a] -> KMP a makeTable xs = table where table = makeTable' xs (const table)
99
makeTable xs = table where table = makeTable' xs (const table)
65
false
true
0
9
22
49
24
25
null
null
ra1u/HaskellPitaya
src/System/RedPitaya/Fpga.hs
lgpl-3.0
etBits (fromBit,toBit) value rin = valueShift .|. hole where ones = complement 0 :: Registry maskShift = xor (shiftL ones fromBit) (shiftL ones (toBit+1)) hole = complement maskShift .&. rin valueShift = ( shiftL value fromBit ) .&. maskShift -- | read bits range from registy
318
setBits (fromBit,toBit) value rin = valueShift .|. hole where ones = complement 0 :: Registry maskShift = xor (shiftL ones fromBit) (shiftL ones (toBit+1)) hole = complement maskShift .&. rin valueShift = ( shiftL value fromBit ) .&. maskShift -- | read bits range from registy
318
setBits (fromBit,toBit) value rin = valueShift .|. hole where ones = complement 0 :: Registry maskShift = xor (shiftL ones fromBit) (shiftL ones (toBit+1)) hole = complement maskShift .&. rin valueShift = ( shiftL value fromBit ) .&. maskShift -- | read bits range from registy
318
false
false
0
11
87
99
52
47
null
null
takoeight0821/malgo
src/Koriel/Core/Lint.hs
bsd-3-clause
lintExp (Cast _ x) = lintAtom x
31
lintExp (Cast _ x) = lintAtom x
31
lintExp (Cast _ x) = lintAtom x
31
false
false
0
7
6
20
9
11
null
null
amccausl/Swish
Swish/HaskellRDF/SwishScript.hs
lgpl-2.1
mergeGraphs :: N3Parser (SwishStateIO ()) mergeGraphs = -- @merge ( name* ) => name do { commandName "@merge" ; gs <- graphList ; symbol "=>" ; n <- uriRef2 ; return $ ssMerge n gs }
268
mergeGraphs :: N3Parser (SwishStateIO ()) mergeGraphs = -- @merge ( name* ) => name do { commandName "@merge" ; gs <- graphList ; symbol "=>" ; n <- uriRef2 ; return $ ssMerge n gs }
267
mergeGraphs = -- @merge ( name* ) => name do { commandName "@merge" ; gs <- graphList ; symbol "=>" ; n <- uriRef2 ; return $ ssMerge n gs }
225
false
true
1
9
121
71
33
38
null
null
charlesrosenbauer/Bzo-Compiler
src/BzoParserRules.hs
gpl-3.0
parserIter fname tokens ((BzS_Token _ (TkNewline p1)) :(BzS_Token _ (TkStartDat p0)):stk) = parserIter fname tokens ((BzS_Token p0 (TkStartDat p0)):stk)
189
parserIter fname tokens ((BzS_Token _ (TkNewline p1)) :(BzS_Token _ (TkStartDat p0)):stk) = parserIter fname tokens ((BzS_Token p0 (TkStartDat p0)):stk)
189
parserIter fname tokens ((BzS_Token _ (TkNewline p1)) :(BzS_Token _ (TkStartDat p0)):stk) = parserIter fname tokens ((BzS_Token p0 (TkStartDat p0)):stk)
189
false
false
0
12
55
80
40
40
null
null
facebookincubator/duckling
Duckling/Duration/FR/Rules.hs
bsd-3-clause
ruleUneUnitofduration :: Rule ruleUneUnitofduration = Rule { name = "une <unit-of-duration>" , pattern = [ regex "une|la|le?" , dimension TimeGrain ] , prod = \tokens -> case tokens of (_: Token TimeGrain grain: _) -> Just . Token Duration $ duration grain 1 _ -> Nothing }
319
ruleUneUnitofduration :: Rule ruleUneUnitofduration = Rule { name = "une <unit-of-duration>" , pattern = [ regex "une|la|le?" , dimension TimeGrain ] , prod = \tokens -> case tokens of (_: Token TimeGrain grain: _) -> Just . Token Duration $ duration grain 1 _ -> Nothing }
319
ruleUneUnitofduration = Rule { name = "une <unit-of-duration>" , pattern = [ regex "une|la|le?" , dimension TimeGrain ] , prod = \tokens -> case tokens of (_: Token TimeGrain grain: _) -> Just . Token Duration $ duration grain 1 _ -> Nothing }
289
false
true
0
15
92
106
53
53
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/RefType.hs
bsd-3-clause
makeLexRefa es' es = uTop $ Reft (vv, Refa $ PIff (PBexp $ EVar vv) $ pOr rs) where rs = makeLexReft [] [] es es' vv = "vvRec"
136
makeLexRefa es' es = uTop $ Reft (vv, Refa $ PIff (PBexp $ EVar vv) $ pOr rs) where rs = makeLexReft [] [] es es' vv = "vvRec"
136
makeLexRefa es' es = uTop $ Reft (vv, Refa $ PIff (PBexp $ EVar vv) $ pOr rs) where rs = makeLexReft [] [] es es' vv = "vvRec"
136
false
false
0
13
38
74
36
38
null
null
Bodigrim/katas
src/haskell/B-Church-numbers-find-the-predecessor-and-subtract.hs
bsd-2-clause
snd :: Pair a b -> b snd (Pr p) = p (\ _ b -> b)
48
snd :: Pair a b -> b snd (Pr p) = p (\ _ b -> b)
48
snd (Pr p) = p (\ _ b -> b)
27
false
true
0
7
16
46
22
24
null
null
computation-hs/comp-models
ParseRegex.hs
gpl-2.0
-- | 'term' parses simple regexp terms. A simple term can be a literal, -- an epsilon term or a parenthesized regular expression. term :: Parser RegexC term = literalp <|> epsilonp <|> parens regexp
216
term :: Parser RegexC term = literalp <|> epsilonp <|> parens regexp
83
term = literalp <|> epsilonp <|> parens regexp
61
true
true
7
5
52
36
18
18
null
null
ChrisCoffey/rwh
src/RW/Chap5/Prettify.hs
bsd-3-clause
flatten Line = Char ' '
34
flatten Line = Char ' '
34
flatten Line = Char ' '
34
false
false
0
5
16
13
5
8
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/Consents/DeleteRevision.hs
mpl-2.0
-- | JSONP pldscscdrCallback :: Lens' ProjectsLocationsDataSetsConsentStoresConsentsDeleteRevision (Maybe Text) pldscscdrCallback = lens _pldscscdrCallback (\ s a -> s{_pldscscdrCallback = a})
200
pldscscdrCallback :: Lens' ProjectsLocationsDataSetsConsentStoresConsentsDeleteRevision (Maybe Text) pldscscdrCallback = lens _pldscscdrCallback (\ s a -> s{_pldscscdrCallback = a})
189
pldscscdrCallback = lens _pldscscdrCallback (\ s a -> s{_pldscscdrCallback = a})
88
true
true
0
8
27
49
25
24
null
null
kmilner/tamarin-prover
lib/term/src/Term/Term/Raw.hs
gpl-3.0
viewTerm :: Term a -> TermView a viewTerm (LIT l) = Lit l
57
viewTerm :: Term a -> TermView a viewTerm (LIT l) = Lit l
57
viewTerm (LIT l) = Lit l
24
false
true
0
9
12
38
16
22
null
null
urbanslug/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
{- ************************************************************************ * * Fixities and precedence parsing * * **********************************************************...
1,632
mkHsOpTyRn :: (LHsType Name -> LHsType Name -> HsType Name) -> Name -> Fixity -> LHsType Name -> LHsType Name -> RnM (HsType Name) mkHsOpTyRn mk1 pp_op1 fix1 ty1 (L loc2 (HsOpTy ty21 (w2, op2) ty22)) = do { fix2 <- lookupTyFixityRn op2 ; mk_hs_op_ty mk1 pp_op1 fix1 ty1 ...
415
mkHsOpTyRn mk1 pp_op1 fix1 ty1 (L loc2 (HsOpTy ty21 (w2, op2) ty22)) = do { fix2 <- lookupTyFixityRn op2 ; mk_hs_op_ty mk1 pp_op1 fix1 ty1 (\t1 t2 -> HsOpTy t1 (w2, op2) t2) (unLoc op2) fix2 ty21 ty22 loc2 }
262
true
true
0
12
458
170
86
84
null
null
sweirich/hs-inferno
src/Language/Inferno/M/TUnionFind.hs
bsd-3-clause
-- ^ Pointer to some other element of the equivalence class. {- showIO (Point r p) = do l <- readTRef p case l of Info weight desc -> return $ show desc Link q -> showIO q instance Show a => Show (Point r r a) where show = unsafePerformIO . showIO -} readPoint (Point p) = readTRef p
303
readPoint (Point p) = readTRef p
33
readPoint (Point p) = readTRef p
33
true
false
0
7
79
20
10
10
null
null
alexstachnik/High-Level-C
src/Language/HLC/PostProcess/Printer.hs
gpl-2.0
printMainBlock block fdefRetVar = printBlock block ++ [returnStmt $ LHSExpr $ LHSVar $ variableName fdefRetVar]
115
printMainBlock block fdefRetVar = printBlock block ++ [returnStmt $ LHSExpr $ LHSVar $ variableName fdefRetVar]
115
printMainBlock block fdefRetVar = printBlock block ++ [returnStmt $ LHSExpr $ LHSVar $ variableName fdefRetVar]
115
false
false
0
9
18
36
17
19
null
null
spell-music/temporal-music-notation
src/Temporal/Music/Score.hs
bsd-3-clause
-- | Increases 'Bend' by given value. bend :: PitchLike a => Bend -> Score a -> Score a bend b = fmap $ mapPitch $ \p -> p{ pitchBend = b + pitchBend p }
158
bend :: PitchLike a => Bend -> Score a -> Score a bend b = fmap $ mapPitch $ \p -> p{ pitchBend = b + pitchBend p }
120
bend b = fmap $ mapPitch $ \p -> p{ pitchBend = b + pitchBend p }
70
true
true
0
10
40
64
32
32
null
null
Fermat/FCR
src/Fcr/Parser.hs
gpl-3.0
tacUse = do reserved "use" n <- identifier ts <- optionMaybe term case ts of Nothing -> return $ Use n [] Just ts' -> return $ Use n (flatten ts')
162
tacUse = do reserved "use" n <- identifier ts <- optionMaybe term case ts of Nothing -> return $ Use n [] Just ts' -> return $ Use n (flatten ts')
162
tacUse = do reserved "use" n <- identifier ts <- optionMaybe term case ts of Nothing -> return $ Use n [] Just ts' -> return $ Use n (flatten ts')
162
false
false
0
13
46
77
34
43
null
null
pqnelson/surak
src/DavisPutnam.hs
mit
-- | Backtrack the trail until we found the last guess which caused problems. backtrack :: [Trail] -> [Trail] backtrack ((_, Deduced):tt) = backtrack tt
152
backtrack :: [Trail] -> [Trail] backtrack ((_, Deduced):tt) = backtrack tt
74
backtrack ((_, Deduced):tt) = backtrack tt
42
true
true
0
8
24
41
23
18
null
null
mariefarrell/Hets
Common/Id.hs
gpl-2.0
-- | create a numbered string mkNumStr :: String -> Int -> String mkNumStr str n = str ++ show n
96
mkNumStr :: String -> Int -> String mkNumStr str n = str ++ show n
66
mkNumStr str n = str ++ show n
30
true
true
0
6
20
32
16
16
null
null