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
shinjiro-itagaki/shinjirecs
shinjirecs-api/src/Models/Reservation.hs
gpl-3.0
inTimeNowReservations :: [Reservation] -> IO [Reservation] inTimeNowReservations rs = getCurrentTime >>= return . inTimeReservations rs
135
inTimeNowReservations :: [Reservation] -> IO [Reservation] inTimeNowReservations rs = getCurrentTime >>= return . inTimeReservations rs
135
inTimeNowReservations rs = getCurrentTime >>= return . inTimeReservations rs
76
false
true
0
7
14
38
19
19
null
null
frenetic-lang/nettle-openflow
src/Nettle/Ethernet/EthernetAddress.hs
bsd-3-clause
ethernetAddress :: Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> EthernetAddress ethernetAddress w1 w2 w3 w4 w5 w6 = let w64 = (shiftL (fromIntegral w1) 40) .|. (shiftL (fromIntegral w2) 32) .|. (shiftL (fromIntegral w3) 24) .|. ...
495
ethernetAddress :: Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> Word8 -> EthernetAddress ethernetAddress w1 w2 w3 w4 w5 w6 = let w64 = (shiftL (fromIntegral w1) 40) .|. (shiftL (fromIntegral w2) 32) .|. (shiftL (fromIntegral w3) 24) .|. ...
463
ethernetAddress w1 w2 w3 w4 w5 w6 = let w64 = (shiftL (fromIntegral w1) 40) .|. (shiftL (fromIntegral w2) 32) .|. (shiftL (fromIntegral w3) 24) .|. (shiftL (fromIntegral w4) 16) .|. (shiftL (fromIntegral w5) 8) .|. (fromIn...
357
false
true
0
17
206
158
78
80
null
null
ryanreich/gitmap
src/Options.hs
mit
makeOptions (_, _, nonOps, []) = error $ nonOpsError nonOps
59
makeOptions (_, _, nonOps, []) = error $ nonOpsError nonOps
59
makeOptions (_, _, nonOps, []) = error $ nonOpsError nonOps
59
false
false
0
6
9
31
16
15
null
null
trskop/cabal
Cabal/Distribution/System.hs
bsd-3-clause
classifyOS :: ClassificationStrictness -> String -> OS classifyOS strictness s = fromMaybe (OtherOS s) $ lookup (lowercase s) osMap where osMap = [ (name, os) | os <- knownOSs , name <- display os : osAliases strictness os ]
256
classifyOS :: ClassificationStrictness -> String -> OS classifyOS strictness s = fromMaybe (OtherOS s) $ lookup (lowercase s) osMap where osMap = [ (name, os) | os <- knownOSs , name <- display os : osAliases strictness os ]
256
classifyOS strictness s = fromMaybe (OtherOS s) $ lookup (lowercase s) osMap where osMap = [ (name, os) | os <- knownOSs , name <- display os : osAliases strictness os ]
201
false
true
0
9
70
93
46
47
null
null
tjakway/ghcjvm
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkHsDictLet :: TcEvBinds -> LHsExpr Id -> LHsExpr Id mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr
114
mkHsDictLet :: TcEvBinds -> LHsExpr Id -> LHsExpr Id mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr
114
mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr
61
false
true
0
7
16
41
19
22
null
null
nikai3d/ce-challenges
easy/mixed_content.hs
bsd-3-clause
mixed [xs, ys] (z:zs) | areDigits z = mixed [xs ++ [z], ys] zs | otherwise = mixed [xs, ys ++ [z]] zs
125
mixed [xs, ys] (z:zs) | areDigits z = mixed [xs ++ [z], ys] zs | otherwise = mixed [xs, ys ++ [z]] zs
125
mixed [xs, ys] (z:zs) | areDigits z = mixed [xs ++ [z], ys] zs | otherwise = mixed [xs, ys ++ [z]] zs
125
false
false
4
8
46
75
40
35
null
null
tismith/tlisp
write-yourself-a-scheme/listings/listing9.hs
mit
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
unpackNum notNum = throwError $ TypeMismatch "number" notNum
60
false
false
0
6
7
18
8
10
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/CodeBuildProjectArtifacts.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-encryptiondisabled cbpaEncryptionDisabled :: Lens' CodeBuildProjectArtifacts (Maybe (Val Bool)) cbpaEncryptionDisabled = lens _codeBuildProjectArtifactsEncryptionDisabled (\...
382
cbpaEncryptionDisabled :: Lens' CodeBuildProjectArtifacts (Maybe (Val Bool)) cbpaEncryptionDisabled = lens _codeBuildProjectArtifactsEncryptionDisabled (\s a -> s { _codeBuildProjectArtifactsEncryptionDisabled = a })
216
cbpaEncryptionDisabled = lens _codeBuildProjectArtifactsEncryptionDisabled (\s a -> s { _codeBuildProjectArtifactsEncryptionDisabled = a })
139
true
true
0
9
22
52
28
24
null
null
bos/base64-bytestring
Data/ByteString/Base64/Internal.hs
bsd-3-clause
decodeLenientWithTable :: ForeignPtr Word8 -> ByteString -> ByteString decodeLenientWithTable !decodeFP !bs = withBS bs go where go !sptr !slen | dlen <= 0 = return B.empty | otherwise = do dfp <- mallocByteString dlen withForeignPtr decodeFP $ \ !decptr -> do let finish dbyt...
2,510
decodeLenientWithTable :: ForeignPtr Word8 -> ByteString -> ByteString decodeLenientWithTable !decodeFP !bs = withBS bs go where go !sptr !slen | dlen <= 0 = return B.empty | otherwise = do dfp <- mallocByteString dlen withForeignPtr decodeFP $ \ !decptr -> do let finish dbyt...
2,510
decodeLenientWithTable !decodeFP !bs = withBS bs go where go !sptr !slen | dlen <= 0 = return B.empty | otherwise = do dfp <- mallocByteString dlen withForeignPtr decodeFP $ \ !decptr -> do let finish dbytes | dbytes > 0 = return $ mkBS dfp dbytes ...
2,439
false
true
0
38
1,282
745
367
378
null
null
gbaz/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
rewriteFile :: FilePath -> String -> IO () rewriteFile path newContent = flip catchIO mightNotExist $ do existingContent <- readFile path _ <- evaluate (length existingContent) unless (existingContent == newContent) $ writeFileAtomic path (BS.Char8.pack newContent) where mightNotExist e | isDo...
677
rewriteFile :: FilePath -> String -> IO () rewriteFile path newContent = flip catchIO mightNotExist $ do existingContent <- readFile path _ <- evaluate (length existingContent) unless (existingContent == newContent) $ writeFileAtomic path (BS.Char8.pack newContent) where mightNotExist e | isDo...
677
rewriteFile path newContent = flip catchIO mightNotExist $ do existingContent <- readFile path _ <- evaluate (length existingContent) unless (existingContent == newContent) $ writeFileAtomic path (BS.Char8.pack newContent) where mightNotExist e | isDoesNotExistError e = writeFileAtomic path ...
634
false
true
0
12
186
143
67
76
null
null
nushio3/Paraiso
attic/paraiso-2008-ODEsolver/secondlight/Util.hs
bsd-3-clause
zipWith3M_ f as bs cs = sequence_ $ zipWith3 f as bs cs
55
zipWith3M_ f as bs cs = sequence_ $ zipWith3 f as bs cs
55
zipWith3M_ f as bs cs = sequence_ $ zipWith3 f as bs cs
55
false
false
3
5
12
35
13
22
null
null
ktvoelker/airline
src/Command/Monad.hs
gpl-3.0
atomically :: CSTM a -> CM a atomically = singleton . CIAtomically
66
atomically :: CSTM a -> CM a atomically = singleton . CIAtomically
66
atomically = singleton . CIAtomically
37
false
true
0
6
11
25
12
13
null
null
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss/Graphics/Gloss/Internals/Interface/Backend/GLUT.hs
mit
installIdleCallbackGLUT :: IORef GLUTState -> [Callback] -> IO () installIdleCallbackGLUT ref callbacks = GLUT.idleCallback $= Just (callbackIdle ref callbacks)
185
installIdleCallbackGLUT :: IORef GLUTState -> [Callback] -> IO () installIdleCallbackGLUT ref callbacks = GLUT.idleCallback $= Just (callbackIdle ref callbacks)
184
installIdleCallbackGLUT ref callbacks = GLUT.idleCallback $= Just (callbackIdle ref callbacks)
102
false
true
0
9
43
56
26
30
null
null
DNNX/shkoliner
app/Main.hs
bsd-3-clause
wholeAPI :: Proxy WholeAPI wholeAPI = Proxy
43
wholeAPI :: Proxy WholeAPI wholeAPI = Proxy
43
wholeAPI = Proxy
16
false
true
0
6
6
20
8
12
null
null
urbanslug/ghc
compiler/main/HscMain.hs
bsd-3-clause
makeSimpleIface :: HscEnv -> Maybe ModIface -> TcGblEnv -> ModDetails -> IO (ModIface,Bool) makeSimpleIface hsc_env maybe_old_iface tc_result details = runHsc hsc_env $ do safe_mode <- hscGetSafeMode tc_result ioMsgMaybe $ do mkIfaceTc hsc_env (fmap mi_iface_hash maybe_old_iface) safe_mo...
482
makeSimpleIface :: HscEnv -> Maybe ModIface -> TcGblEnv -> ModDetails -> IO (ModIface,Bool) makeSimpleIface hsc_env maybe_old_iface tc_result details = runHsc hsc_env $ do safe_mode <- hscGetSafeMode tc_result ioMsgMaybe $ do mkIfaceTc hsc_env (fmap mi_iface_hash maybe_old_iface) safe_mo...
482
makeSimpleIface hsc_env maybe_old_iface tc_result details = runHsc hsc_env $ do safe_mode <- hscGetSafeMode tc_result ioMsgMaybe $ do mkIfaceTc hsc_env (fmap mi_iface_hash maybe_old_iface) safe_mode details tc_result -- | Make a 'ModDetails' from the results of typechecking. Used when...
374
false
true
0
14
108
101
47
54
null
null
ezyang/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
annProvenanceName_maybe :: AnnProvenance name -> Maybe name annProvenanceName_maybe (ValueAnnProvenance (L _ name)) = Just name
127
annProvenanceName_maybe :: AnnProvenance name -> Maybe name annProvenanceName_maybe (ValueAnnProvenance (L _ name)) = Just name
127
annProvenanceName_maybe (ValueAnnProvenance (L _ name)) = Just name
67
false
true
0
9
14
41
19
22
null
null
EarlGray/hasm
src/Language/HAsm/X86/Opcodes.hs
mit
bytesRet _ = []
15
bytesRet _ = []
15
bytesRet _ = []
15
false
false
0
5
3
12
5
7
null
null
DougBurke/swish
src/Swish/RDF/ProofContext.hs
lgpl-2.1
rdfsa24 :: RDFFormula rdfsa24 = makeFormula scopeRDFS "a24" "rdfs:seeAlso rdfs:range rdfs:Resource ."
112
rdfsa24 :: RDFFormula rdfsa24 = makeFormula scopeRDFS "a24" "rdfs:seeAlso rdfs:range rdfs:Resource ."
112
rdfsa24 = makeFormula scopeRDFS "a24" "rdfs:seeAlso rdfs:range rdfs:Resource ."
90
false
true
0
5
22
19
9
10
null
null
kim/amazonka
amazonka-kinesis/gen/Network/AWS/Kinesis/GetRecords.hs
mpl-2.0
-- | 'GetRecords' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'grLimit' @::@ 'Maybe' 'Natural' -- -- * 'grShardIterator' @::@ 'Text' -- getRecords :: Text -- ^ 'grShardIterator' -> GetRecords getRecords p1 = GetRecords { _grShardIterator = p1 , _grLimit ...
335
getRecords :: Text -- ^ 'grShardIterator' -> GetRecords getRecords p1 = GetRecords { _grShardIterator = p1 , _grLimit = Nothing }
160
getRecords p1 = GetRecords { _grShardIterator = p1 , _grLimit = Nothing }
93
true
true
0
7
78
45
28
17
null
null
kim/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs
mpl-2.0
-- | The format of the output playlist. Valid formats include 'HLSv3', 'HLSv4', and 'Smooth'. p2Format :: Lens' Playlist (Maybe Text) p2Format = lens _p2Format (\s a -> s { _p2Format = a })
189
p2Format :: Lens' Playlist (Maybe Text) p2Format = lens _p2Format (\s a -> s { _p2Format = a })
95
p2Format = lens _p2Format (\s a -> s { _p2Format = a })
55
true
true
0
9
33
46
25
21
null
null
RaphaelJ/getwebb.org
Handler/Download.hs
gpl-3.0
-- | Responds with the MKV video file of the upload. getDownloadMKVR :: Hmac -> Handler TypedContent getDownloadMKVR = streamRawUploadObject True MKV "video/x-matroska"
168
getDownloadMKVR :: Hmac -> Handler TypedContent getDownloadMKVR = streamRawUploadObject True MKV "video/x-matroska"
115
getDownloadMKVR = streamRawUploadObject True MKV "video/x-matroska"
67
true
true
0
7
22
31
14
17
null
null
gridaphobe/target
bin/LiquidCheck.hs
mit
monomorphic df int monos (GHC.AppTy x y) = GHC.AppTy (monomorphic df int monos x) (monomorphic df int monos y)
112
monomorphic df int monos (GHC.AppTy x y) = GHC.AppTy (monomorphic df int monos x) (monomorphic df int monos y)
112
monomorphic df int monos (GHC.AppTy x y) = GHC.AppTy (monomorphic df int monos x) (monomorphic df int monos y)
112
false
false
0
8
20
56
27
29
null
null
jlamothe/sortable-test
Daily/Tests/Encode.hs
gpl-3.0
record2 :: ProcessedRecord record2 = [stats2foo, stats2bar]
59
record2 :: ProcessedRecord record2 = [stats2foo, stats2bar]
59
record2 = [stats2foo, stats2bar]
32
false
true
0
5
6
17
10
7
null
null
ezyang/ghc
testsuite/tests/typecheck/should_run/TestTypeableBinary.hs
bsd-3-clause
testRoundtrip :: Typeable a => TypeRep a -> IO () testRoundtrip rep | rep /= rep' = putStrLn $ "bad: " ++ show rep ++ " /= " ++ show rep' | otherwise = putStrLn $ "good: " ++ show rep where rep' = decode (encode rep)
228
testRoundtrip :: Typeable a => TypeRep a -> IO () testRoundtrip rep | rep /= rep' = putStrLn $ "bad: " ++ show rep ++ " /= " ++ show rep' | otherwise = putStrLn $ "good: " ++ show rep where rep' = decode (encode rep)
228
testRoundtrip rep | rep /= rep' = putStrLn $ "bad: " ++ show rep ++ " /= " ++ show rep' | otherwise = putStrLn $ "good: " ++ show rep where rep' = decode (encode rep)
178
false
true
5
9
58
114
48
66
null
null
bagl/takusen-oracle
Database/Oracle/Enumerator.hs
bsd-3-clause
- Where did I find these mappings?... errorSqlState :: Int -> (String, String) errorSqlState 0 = ("00", "000")
112
errorSqlState :: Int -> (String, String) errorSqlState 0 = ("00", "000")
72
errorSqlState 0 = ("00", "000")
31
true
true
2
8
19
59
27
32
null
null
rahulmutt/ghcvm
libraries/base/GHC/Natural.hs
bsd-3-clause
naturalToBigNat (NatJ# bn) = bn
31
naturalToBigNat (NatJ# bn) = bn
31
naturalToBigNat (NatJ# bn) = bn
31
false
false
0
6
4
16
7
9
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/DynamicsCompressorNode.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode.threshold Mozilla DynamicsCompressorNode.threshold documentation> getThreshold :: (MonadDOM m) => DynamicsCompressorNode -> m AudioParam getThreshold self = liftDOM ((self ^. js "threshold") >>= fromJSValUnchecked)
308
getThreshold :: (MonadDOM m) => DynamicsCompressorNode -> m AudioParam getThreshold self = liftDOM ((self ^. js "threshold") >>= fromJSValUnchecked)
163
getThreshold self = liftDOM ((self ^. js "threshold") >>= fromJSValUnchecked)
79
true
true
0
10
40
56
27
29
null
null
TomHammersley/HaskellRenderer
app/src/Main.hs
gpl-2.0
scene :: [Object] scene = cornellBox
36
scene :: [Object] scene = cornellBox
36
scene = cornellBox
18
false
true
0
5
5
14
8
6
null
null
manuchandel/Academics
Principles-Of-Programming-Languages/mapUsingFoldr.hs
mit
-- Implement map using folds mymap :: (a->a)->[a]->[a] mymap f xs = foldr (\x y-> f x:y) [] xs
94
mymap :: (a->a)->[a]->[a] mymap f xs = foldr (\x y-> f x:y) [] xs
65
mymap f xs = foldr (\x y-> f x:y) [] xs
39
true
true
0
9
18
64
34
30
null
null
kvalle/yahtzee.hs
src/Yahtzee/Game.hs
mit
printRollResult :: Hand -> ScoreCard -> IO () printRollResult (Hand hand) card = do putStrLn "\n Scoring options:\n" mapM_ putCat card putStrLn "" where putCat (cid, cname, Score _, scoreFn) = return () putCat (cid, cname, NoValue, scoreFn) = putStrLn $ printf " %c) %-17s...
360
printRollResult :: Hand -> ScoreCard -> IO () printRollResult (Hand hand) card = do putStrLn "\n Scoring options:\n" mapM_ putCat card putStrLn "" where putCat (cid, cname, Score _, scoreFn) = return () putCat (cid, cname, NoValue, scoreFn) = putStrLn $ printf " %c) %-17s...
360
printRollResult (Hand hand) card = do putStrLn "\n Scoring options:\n" mapM_ putCat card putStrLn "" where putCat (cid, cname, Score _, scoreFn) = return () putCat (cid, cname, NoValue, scoreFn) = putStrLn $ printf " %c) %-17s %3d" cid cname (scoreFn (map fst hand))
314
false
true
2
10
99
140
66
74
null
null
nevrenato/Hets_Fork
Comorphisms/HasCASL2Haskell.hs
gpl-2.0
-- For the definition of an undefined function. -- Takes the name of the function as argument. functionUndef :: SrcLoc -> SN HsName -> HsDecl functionUndef loc s = hsFunBind loc [HsMatch loc s [] -- hsPatBind loc (rec $ HsPId $ HsVar s) (HsBody $ expUndef loc $ pp s) []]
304
functionUndef :: SrcLoc -> SN HsName -> HsDecl functionUndef loc s = hsFunBind loc [HsMatch loc s [] -- hsPatBind loc (rec $ HsPId $ HsVar s) (HsBody $ expUndef loc $ pp s) []]
209
functionUndef loc s = hsFunBind loc [HsMatch loc s [] -- hsPatBind loc (rec $ HsPId $ HsVar s) (HsBody $ expUndef loc $ pp s) []]
162
true
true
0
11
84
77
36
41
null
null
mkfifo/lambda_calculus
impl/untyped/haskell/lex.hs
mit
stringify TokLambda = "\\"
31
stringify TokLambda = "\\"
31
stringify TokLambda = "\\"
31
false
false
0
4
8
10
4
6
null
null
ddssff/lens
src/Control/Lens/Traversal.hs
bsd-3-clause
-- | An indexed version of 'partsOf' that receives the entire list of indices as its index. ipartsOf :: forall i p f s t a. (Indexable [i] p, Functor f) => Traversing (Indexed i) f s t a a -> Over p f s t [a] [a] ipartsOf l = conjoined (\f s -> let b = inline l sell s in outs b <$> f (wins ...
425
ipartsOf :: forall i p f s t a. (Indexable [i] p, Functor f) => Traversing (Indexed i) f s t a a -> Over p f s t [a] [a] ipartsOf l = conjoined (\f s -> let b = inline l sell s in outs b <$> f (wins b)) (\f s -> let b = inline l sell s; (is, as) = unzip (pins b) in outs b <$> indexed f (i...
333
ipartsOf l = conjoined (\f s -> let b = inline l sell s in outs b <$> f (wins b)) (\f s -> let b = inline l sell s; (is, as) = unzip (pins b) in outs b <$> indexed f (is :: [i]) as)
212
true
true
0
13
125
210
109
101
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC.hs
bsd-3-clause
(-*<<<<<<<) p = ((-*),(-*),(-*),(-*),(-*),(-*),(-*),(-*)) $$$$$$$$ (p ||<<<<<<<)
87
(-*<<<<<<<) p = ((-*),(-*),(-*),(-*),(-*),(-*),(-*),(-*)) $$$$$$$$ (p ||<<<<<<<)
87
(-*<<<<<<<) p = ((-*),(-*),(-*),(-*),(-*),(-*),(-*),(-*)) $$$$$$$$ (p ||<<<<<<<)
87
false
false
0
6
13
59
43
16
null
null
prashant007/AMPL
myAMPL/src/TEMP/Skelparser.hs
mit
transSTRUCT :: STRUCT -> Result transSTRUCT x = case x of Struct uident n -> failure x
89
transSTRUCT :: STRUCT -> Result transSTRUCT x = case x of Struct uident n -> failure x
89
transSTRUCT x = case x of Struct uident n -> failure x
57
false
true
0
8
19
41
18
23
null
null
keera-studios/hsQt
Qtc/Core/QDateTime.hs
bsd-2-clause
qDateTimeFromTime_t :: ((Int)) -> IO (QDateTime ()) qDateTimeFromTime_t (x1) = withQDateTimeResult $ qtc_QDateTime_fromTime_t (toCUInt x1)
144
qDateTimeFromTime_t :: ((Int)) -> IO (QDateTime ()) qDateTimeFromTime_t (x1) = withQDateTimeResult $ qtc_QDateTime_fromTime_t (toCUInt x1)
144
qDateTimeFromTime_t (x1) = withQDateTimeResult $ qtc_QDateTime_fromTime_t (toCUInt x1)
92
false
true
0
9
20
51
26
25
null
null
michalkonecny/aern
aern-order/src/Numeric/AERN/RefinementOrder/RoundedLattice.hs
bsd-3-clause
propRoundedLatticeDistributive :: (PartialComparison t, RoundedLattice t, Show t, HasLegalValues t) => t -> UniformlyOrderedTriple t -> (PartialCompareEffortIndicator t, JoinMeetEffortIndicator t) -> Bool propRoundedLatticeDistributive _ (UniformlyOrderedTriple (e1,e2,e3)) ...
681
propRoundedLatticeDistributive :: (PartialComparison t, RoundedLattice t, Show t, HasLegalValues t) => t -> UniformlyOrderedTriple t -> (PartialCompareEffortIndicator t, JoinMeetEffortIndicator t) -> Bool propRoundedLatticeDistributive _ (UniformlyOrderedTriple (e1,e2,e3)) ...
681
propRoundedLatticeDistributive _ (UniformlyOrderedTriple (e1,e2,e3)) (effortComp, effortInOut) = (roundedLeftDistributive (pLeqEff effortComp) (meetInEff effortInOut) (joinInEff effortInOut) (meetOutEff effortInOut) (joinOutEff effortInOut) e1 e2 e3) && (roundedLeftDistributive (pL...
445
false
true
2
13
126
201
101
100
null
null
geraldus/DataValidation
src/Data/Validator/Reactive.hs
mit
runValidation :: DataValidator d -> IO ValidationResult runValidation = sync . runValidationR
93
runValidation :: DataValidator d -> IO ValidationResult runValidation = sync . runValidationR
93
runValidation = sync . runValidationR
37
false
true
0
7
11
31
13
18
null
null
fmthoma/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
falseDataCon, trueDataCon :: DataCon falseDataCon = pcDataCon falseDataConName [] [] boolTyCon
94
falseDataCon, trueDataCon :: DataCon falseDataCon = pcDataCon falseDataConName [] [] boolTyCon
94
falseDataCon = pcDataCon falseDataConName [] [] boolTyCon
57
false
true
0
6
10
26
14
12
null
null
spaceships/circuit-synthesis
src/Circuit/Format/Sexp.hs
mit
circToSexp :: Acirc -> [String] circToSexp c = foldCirc eval c where eval (ArithAdd _ _) [x,y] = printf "Add(%s, %s)" x y eval (ArithSub _ _) [x,y] = printf "Add(%s, Mul(Integer(-1), %s))" x y eval (ArithMul _ _) [x,y] = printf "Mul(%s, %s)" x y eval (ArithBase (Input i)) [] = printf "Symbol('x%d')" ...
572
circToSexp :: Acirc -> [String] circToSexp c = foldCirc eval c where eval (ArithAdd _ _) [x,y] = printf "Add(%s, %s)" x y eval (ArithSub _ _) [x,y] = printf "Add(%s, Mul(Integer(-1), %s))" x y eval (ArithMul _ _) [x,y] = printf "Mul(%s, %s)" x y eval (ArithBase (Input i)) [] = printf "Symbol('x%d')" ...
572
circToSexp c = foldCirc eval c where eval (ArithAdd _ _) [x,y] = printf "Add(%s, %s)" x y eval (ArithSub _ _) [x,y] = printf "Add(%s, Mul(Integer(-1), %s))" x y eval (ArithMul _ _) [x,y] = printf "Mul(%s, %s)" x y eval (ArithBase (Input i)) [] = printf "Symbol('x%d')" (getInputId i) eval (ArithBa...
540
false
true
4
10
128
287
134
153
null
null
joehillen/aura
src/Bash/Parser.hs
gpl-3.0
-- | Contains commands. backticked :: Parser [BashString] backticked = between (char '`') (char '`') ((\c -> [Backtic c]) <$> command) <?> "backticked string"
171
backticked :: Parser [BashString] backticked = between (char '`') (char '`') ((\c -> [Backtic c]) <$> command) <?> "backticked string"
147
backticked = between (char '`') (char '`') ((\c -> [Backtic c]) <$> command) <?> "backticked string"
113
true
true
1
12
36
66
33
33
null
null
BakerSmithA/Metal
src/Main.hs
mit
parseArgs _ = throw (userError "Incorrect number of arguments, expected <source_file> <tape>")
105
parseArgs _ = throw (userError "Incorrect number of arguments, expected <source_file> <tape>")
105
parseArgs _ = throw (userError "Incorrect number of arguments, expected <source_file> <tape>")
105
false
false
0
7
22
18
8
10
null
null
shnarazk/mios
src/SAT/Mios/Criteria.hs
gpl-3.0
claBumpActivity :: Solver -> Clause -> IO () claBumpActivity s@Solver{..} Clause{..} = do a <- (+) <$> get' activity <*> get' claInc set' activity a when (claActivityThreshold <= a) $ claRescaleActivity s -- | __Fig. 14 (p.19)__
236
claBumpActivity :: Solver -> Clause -> IO () claBumpActivity s@Solver{..} Clause{..} = do a <- (+) <$> get' activity <*> get' claInc set' activity a when (claActivityThreshold <= a) $ claRescaleActivity s -- | __Fig. 14 (p.19)__
236
claBumpActivity s@Solver{..} Clause{..} = do a <- (+) <$> get' activity <*> get' claInc set' activity a when (claActivityThreshold <= a) $ claRescaleActivity s -- | __Fig. 14 (p.19)__
191
false
true
0
10
44
96
46
50
null
null
glutamate/ig
src/Instagram/Monad.hs
bsd-3-clause
getManager :: Monad m => InstagramT m H.Manager getManager = isManager `liftM` Is ask
85
getManager :: Monad m => InstagramT m H.Manager getManager = isManager `liftM` Is ask
85
getManager = isManager `liftM` Is ask
37
false
true
0
8
13
42
19
23
null
null
maxwellsayles/disjoint-set
Data/IntDisjointSet.hs
bsd-3-clause
{-| Map each member to another Int. The map function must be a bijection, i.e. 1-to-1 mapping. -} map :: (Int -> Int) -> IntDisjointSet -> IntDisjointSet map f (IntDisjointSet p r) = let p' = IntMap.fromList $ List.map (f *** f) $ IntMap.toList p r' = IntMap.fromList $ List.map (first f) $ IntMap.toList r in ...
359
map :: (Int -> Int) -> IntDisjointSet -> IntDisjointSet map f (IntDisjointSet p r) = let p' = IntMap.fromList $ List.map (f *** f) $ IntMap.toList p r' = IntMap.fromList $ List.map (first f) $ IntMap.toList r in p' `seq` r' `seq` IntDisjointSet p' r'
261
map f (IntDisjointSet p r) = let p' = IntMap.fromList $ List.map (f *** f) $ IntMap.toList p r' = IntMap.fromList $ List.map (first f) $ IntMap.toList r in p' `seq` r' `seq` IntDisjointSet p' r'
205
true
true
0
13
73
126
64
62
null
null
ChrisLane/leksah
src/IDE/Core/State.hs
gpl-2.0
currentContext = (\(_,_,c)-> c) . currentEBC
46
currentContext = (\(_,_,c)-> c) . currentEBC
46
currentContext = (\(_,_,c)-> c) . currentEBC
46
false
false
0
8
7
27
16
11
null
null
nightscape/platform
shared/src/Unison/Util/Logger.hs
mit
scope :: String -> Logger -> Logger scope s (Logger s0 _ lvl raw) = Logger s' prefix' lvl raw where prefix' msg = prefix ++ msg prefix = "[" ++ intercalate " " s' ++ "] " s' = s:s0
186
scope :: String -> Logger -> Logger scope s (Logger s0 _ lvl raw) = Logger s' prefix' lvl raw where prefix' msg = prefix ++ msg prefix = "[" ++ intercalate " " s' ++ "] " s' = s:s0
186
scope s (Logger s0 _ lvl raw) = Logger s' prefix' lvl raw where prefix' msg = prefix ++ msg prefix = "[" ++ intercalate " " s' ++ "] " s' = s:s0
150
false
true
0
7
46
85
43
42
null
null
Numberartificial/workflow
snipets/src/Craft/Chapter6.hs
mit
-- The length of a line in the bill. lineLength :: Int lineLength = 30
71
lineLength :: Int lineLength = 30
33
lineLength = 30
15
true
true
0
4
15
12
7
5
null
null
mvr/at
src/Math/Algebra/ChainComplex/DVF.hs
bsd-3-clause
incl :: DVF a => a -> Morphism (CriticalComplex a) a incl a = fmapBasis coerce
78
incl :: DVF a => a -> Morphism (CriticalComplex a) a incl a = fmapBasis coerce
78
incl a = fmapBasis coerce
25
false
true
0
9
15
39
18
21
null
null
juhp/leksah
src/IDE/Leksah.hs
gpl-2.0
loopn :: Int -> IO Bool loopn 0 = return False
46
loopn :: Int -> IO Bool loopn 0 = return False
46
loopn 0 = return False
22
false
true
0
6
10
24
11
13
null
null
prashant007/AMPL
myAMPL/src/MyParser/InterpretAMPL.hs
mit
compile_fun sym stack ((AC_DEST n m):rest) = (AMC_DEST n m):(compile_fun sym stack rest)
88
compile_fun sym stack ((AC_DEST n m):rest) = (AMC_DEST n m):(compile_fun sym stack rest)
88
compile_fun sym stack ((AC_DEST n m):rest) = (AMC_DEST n m):(compile_fun sym stack rest)
88
false
false
0
9
12
50
25
25
null
null
alphalambda/codeworld
codeworld-base/src/Parameter.hs
apache-2.0
-- | Adjusts the output of a parameter by passing it through a conversion -- function. Built-in parameters usually range from 0 to 1, and conversions -- can be used to rescale the output to a different range. converted :: (Parameter, Number -> Number) -> Parameter converted (p, c) = CW.converted (toDouble . c . fromDo...
327
converted :: (Parameter, Number -> Number) -> Parameter converted (p, c) = CW.converted (toDouble . c . fromDouble) p
117
converted (p, c) = CW.converted (toDouble . c . fromDouble) p
61
true
true
0
8
57
61
32
29
null
null
wildsebastian/99HaskellProblems
01-10_ListProblems/MyList.hs
mit
-- | 02. Find the last but one element of a list. -- -- Examples: -- -- >>> myButLast [1,2,3,4] -- 3 -- -- >>> myButLast ['a'..'z'] -- 'y' -- -- >>> myButLast [] -- *** Exception: Empty list has no last but one element! -- -- >>> myButLast [2] -- *** Exception: List with one element has no last but element! -- -- >>> m...
425
myButLast :: [a] -> a myButLast [] = error "Empty list has no last but one element!"
84
myButLast [] = error "Empty list has no last but one element!"
62
true
true
0
6
86
44
31
13
null
null
UlfS/ghmm
src/Message/Markdown.hs
mit
-- | Applies f if m is non-empty nonNull :: Stringish m => (m -> m) -> m -> m nonNull f m = if m == mempty then m else f m
123
nonNull :: Stringish m => (m -> m) -> m -> m nonNull f m = if m == mempty then m else f m
90
nonNull f m = if m == mempty then m else f m
44
true
true
0
8
33
54
28
26
null
null
d12frosted/optparse-applicative-kb
Options/Applicative/Builder.hs
bsd-3-clause
-- | Specify a footer for this parser. footer :: String -> InfoMod a footer s = InfoMod $ \i -> i { infoFooter = paragraph s }
126
footer :: String -> InfoMod a footer s = InfoMod $ \i -> i { infoFooter = paragraph s }
87
footer s = InfoMod $ \i -> i { infoFooter = paragraph s }
57
true
true
0
10
27
46
23
23
null
null
ribag/ganeti-experiments
src/Ganeti/Objects.hs
gpl-2.0
encodeDLId (LIDRados pool name) = JSArray [showJSON pool, showJSON name]
72
encodeDLId (LIDRados pool name) = JSArray [showJSON pool, showJSON name]
72
encodeDLId (LIDRados pool name) = JSArray [showJSON pool, showJSON name]
72
false
false
0
7
9
32
15
17
null
null
JoseD92/EasyGL
src/EasyGL/Entity.hs
bsd-3-clause
deleteSubEntity :: MonadIO m => SubEntity -> m () deleteSubEntity se = do deleteObjectName $ vertexArrObject se deleteObjectName $ vertexes se deleteObjectName $ indexBuffer se forM_ (textureCoord se) deleteObjectName forM_ (normals se) deleteObjectName --
311
deleteSubEntity :: MonadIO m => SubEntity -> m () deleteSubEntity se = do deleteObjectName $ vertexArrObject se deleteObjectName $ vertexes se deleteObjectName $ indexBuffer se forM_ (textureCoord se) deleteObjectName forM_ (normals se) deleteObjectName --
310
deleteSubEntity se = do deleteObjectName $ vertexArrObject se deleteObjectName $ vertexes se deleteObjectName $ indexBuffer se forM_ (textureCoord se) deleteObjectName forM_ (normals se) deleteObjectName --
260
false
true
0
10
88
94
40
54
null
null
sdiehl/ghc
testsuite/tests/codeGen/should_run/T15038/common/Data/Trie/Naive.hs
bsd-3-clause
singletonString :: String -> a -> Trie a singletonString k v = L.foldr (\c r -> Trie Nothing (M.singleton (c2w c) r)) (Trie (Just v) M.empty) k
143
singletonString :: String -> a -> Trie a singletonString k v = L.foldr (\c r -> Trie Nothing (M.singleton (c2w c) r)) (Trie (Just v) M.empty) k
143
singletonString k v = L.foldr (\c r -> Trie Nothing (M.singleton (c2w c) r)) (Trie (Just v) M.empty) k
102
false
true
0
12
26
83
41
42
null
null
andyarvanitis/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v LFloatStr [x] = v ++ "idris_castFloatStr(vm, " ++ creg x ++ ")"
70
doOp v LFloatStr [x] = v ++ "idris_castFloatStr(vm, " ++ creg x ++ ")"
70
doOp v LFloatStr [x] = v ++ "idris_castFloatStr(vm, " ++ creg x ++ ")"
70
false
false
0
7
13
31
15
16
null
null
jwiegley/ghc-release
libraries/containers/Data/Map/Strict.hs
gpl-3.0
updateMaxWithKey f (Bin _ kx x l r) = balanceL kx x l (updateMaxWithKey f r)
79
updateMaxWithKey f (Bin _ kx x l r) = balanceL kx x l (updateMaxWithKey f r)
79
updateMaxWithKey f (Bin _ kx x l r) = balanceL kx x l (updateMaxWithKey f r)
79
false
false
0
7
18
44
20
24
null
null
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/WithApplication.hs
mit
-- | 'testWithApplication' with given 'Settings'. -- -- @since 3.2.7 testWithApplicationSettings :: Settings -> IO Application -> (Port -> IO a) -> IO a testWithApplicationSettings settings mkApp action = do callingThread <- myThreadId app <- mkApp let wrappedApp request respond = app request respond `Unl...
535
testWithApplicationSettings :: Settings -> IO Application -> (Port -> IO a) -> IO a testWithApplicationSettings settings mkApp action = do callingThread <- myThreadId app <- mkApp let wrappedApp request respond = app request respond `UnliftIO.catchAny` \ e -> do when (defaultShouldDi...
466
testWithApplicationSettings settings mkApp action = do callingThread <- myThreadId app <- mkApp let wrappedApp request respond = app request respond `UnliftIO.catchAny` \ e -> do when (defaultShouldDisplayException e) (throwTo callingThread e) UnliftIO.throwIO e...
382
true
true
0
16
121
141
67
74
null
null
cmspsgp31/anubis
anubis/parseurl/src/ParseUrl.hs
gpl-3.0
unquotedArg :: Parser T.Text unquotedArg = T.pack <$> P.many1 (P.letter <|> P.digit <|> P.oneOf "_-")
101
unquotedArg :: Parser T.Text unquotedArg = T.pack <$> P.many1 (P.letter <|> P.digit <|> P.oneOf "_-")
101
unquotedArg = T.pack <$> P.many1 (P.letter <|> P.digit <|> P.oneOf "_-")
72
false
true
1
10
14
50
23
27
null
null
tpltnt/Tidal
Sound/Tidal/Pattern.hs
gpl-3.0
-- | @foldEvery ns f p@ applies the function @f@ to @p@, and is applied for -- each cycle in @ns@. foldEvery :: [Int] -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a foldEvery ns f p = foldr ($) p (map (\x -> every x f) ns)
229
foldEvery :: [Int] -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a foldEvery ns f p = foldr ($) p (map (\x -> every x f) ns)
130
foldEvery ns f p = foldr ($) p (map (\x -> every x f) ns)
57
true
true
0
10
50
91
44
47
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Backends/LaTeX.hs
gpl-3.0
ppTyFam :: Bool -> SrcSpan -> Documentation DocName -> TyClDecl DocName -> Bool -> LaTeX ppTyFam _ _ _ _ _ = error "type family declarations are currently not supported by --latex"
196
ppTyFam :: Bool -> SrcSpan -> Documentation DocName -> TyClDecl DocName -> Bool -> LaTeX ppTyFam _ _ _ _ _ = error "type family declarations are currently not supported by --latex"
196
ppTyFam _ _ _ _ _ = error "type family declarations are currently not supported by --latex"
93
false
true
0
9
47
51
24
27
null
null
XinhuaZhang/PetaVisionHaskell
Classifier/LibLinear/LibLinear.hs
gpl-3.0
problemMaxInd :: Conduit (Double,VU.Vector Feature) IO (Double,Int,MVec.IOVector C'feature_node) problemMaxInd = awaitForever (\(label,x) -> let !maxInd = (VU.maximum . fst . VU.unzip) x in do !vec <- liftIO $ MVec.new $ (VU.length x + 1) liftIO $ updateFeatureListRankO...
428
problemMaxInd :: Conduit (Double,VU.Vector Feature) IO (Double,Int,MVec.IOVector C'feature_node) problemMaxInd = awaitForever (\(label,x) -> let !maxInd = (VU.maximum . fst . VU.unzip) x in do !vec <- liftIO $ MVec.new $ (VU.length x + 1) liftIO $ updateFeatureListRankO...
428
problemMaxInd = awaitForever (\(label,x) -> let !maxInd = (VU.maximum . fst . VU.unzip) x in do !vec <- liftIO $ MVec.new $ (VU.length x + 1) liftIO $ updateFeatureListRankOne (featuresToNodeList x) vec yield (label,max...
329
false
true
2
17
144
162
77
85
null
null
siddhanathan/yi
yi-core/src/Yi/Syntax/Tree.hs
gpl-2.0
-- (-1) indicates that all children should be taken. beforeChild c = reverse . take (c-1)
89
beforeChild c = reverse . take (c-1)
36
beforeChild c = reverse . take (c-1)
36
true
false
0
8
15
24
12
12
null
null
ideas-edu/ideas
src/Ideas/Common/Strategy/Abstract.hs
apache-2.0
liftSn :: IsStrategy f => ([Strategy a] -> Strategy a) -> [f a] -> Strategy a liftSn f = f . map toStrategy
108
liftSn :: IsStrategy f => ([Strategy a] -> Strategy a) -> [f a] -> Strategy a liftSn f = f . map toStrategy
107
liftSn f = f . map toStrategy
29
false
true
1
11
23
66
30
36
null
null
aelve/hslibs
tests/Selenium.hs
bsd-3-clause
selectSome :: CanSelect a => a -> WD Element selectSome x = do es <- selectAll x when (null es) $ expectationFailure $ printf "%s wasn't found on the page" (show x) return (head es) -- | @font-size@ of an element, in pixels
234
selectSome :: CanSelect a => a -> WD Element selectSome x = do es <- selectAll x when (null es) $ expectationFailure $ printf "%s wasn't found on the page" (show x) return (head es) -- | @font-size@ of an element, in pixels
234
selectSome x = do es <- selectAll x when (null es) $ expectationFailure $ printf "%s wasn't found on the page" (show x) return (head es) -- | @font-size@ of an element, in pixels
189
false
true
0
11
53
82
37
45
null
null
Centril/DATX02-17-26
libsrc/PropertyBasedTesting.hs
gpl-2.0
-- | Perform the relevant tests on all class files in the directory runPBT :: FilePath -> RoseGen Input -> EvalM Bool runPBT dir generator = do numTests <- numberOfTests <$> ask logMessage $ "Testing student solution " ++ show numTests ++ " times" runNumberOfTests numTests dir generator -- | Shrink the failing i...
324
runPBT :: FilePath -> RoseGen Input -> EvalM Bool runPBT dir generator = do numTests <- numberOfTests <$> ask logMessage $ "Testing student solution " ++ show numTests ++ " times" runNumberOfTests numTests dir generator -- | Shrink the failing input
256
runPBT dir generator = do numTests <- numberOfTests <$> ask logMessage $ "Testing student solution " ++ show numTests ++ " times" runNumberOfTests numTests dir generator -- | Shrink the failing input
206
true
true
0
9
60
71
33
38
null
null
cromo/deck-around-hs
DeckAroundCore.hs
mit
setPlayerDefinition _ _ _ = Left NotInDefiningState
51
setPlayerDefinition _ _ _ = Left NotInDefiningState
51
setPlayerDefinition _ _ _ = Left NotInDefiningState
51
false
false
0
5
6
16
7
9
null
null
OpenXT/xclibs
udbus/Setup.hs
lgpl-2.1
versionInt (Version { versionBranch = [n] }) = show n
53
versionInt (Version { versionBranch = [n] }) = show n
53
versionInt (Version { versionBranch = [n] }) = show n
53
false
false
0
9
9
28
14
14
null
null
Bodigrim/arithmoi
Math/NumberTheory/Zeta/Riemann.hs
mit
-- | Infinite sequence of approximate (up to given precision) -- values of Riemann zeta-function at integer arguments, starting with @ζ(0)@. -- -- >>> take 5 (zetas 1e-14) :: [Double] -- [-0.5,Infinity,1.6449340668482264,1.2020569031595942,1.0823232337111381] -- -- Beware to force evaluation of @zetas !! 1@ if the type...
777
zetas :: (Floating a, Ord a) => a -> [a] zetas eps = e : o : scanl1 f (intertwine es os) where e : es = map (getRationalLimit (\a b -> abs (a - b) < eps) . rationalApproximations) zetasEven o : os = zetasOdd eps -- Cap-and-floor to improve numerical stability: -- 0 < zeta(n + 1) - 1 < (zeta(n) - 1) /...
370
zetas eps = e : o : scanl1 f (intertwine es os) where e : es = map (getRationalLimit (\a b -> abs (a - b) < eps) . rationalApproximations) zetasEven o : os = zetasOdd eps -- Cap-and-floor to improve numerical stability: -- 0 < zeta(n + 1) - 1 < (zeta(n) - 1) / 2 f x y = 1 `max` (y `min` (1 + (x -...
329
true
true
0
14
160
176
97
79
null
null
itsbruce/hackerrank
alg/bits/aorb.hs
unlicense
noChoice (0,0,1) = [(,) 1 (0,1,1)]
34
noChoice (0,0,1) = [(,) 1 (0,1,1)]
34
noChoice (0,0,1) = [(,) 1 (0,1,1)]
34
false
false
0
7
5
38
22
16
null
null
TOSPIO/netmosphere-core
dist/build/autogen/Paths_netmosphere_core.hs
mit
getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath getBinDir = catchIO (getEnv "netmosphere_core_bindir") (\_ -> return bindir)
154
getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath getBinDir = catchIO (getEnv "netmosphere_core_bindir") (\_ -> return bindir)
154
getBinDir = catchIO (getEnv "netmosphere_core_bindir") (\_ -> return bindir)
76
false
true
0
8
16
44
26
18
null
null
GDCN/GDCN
GDCN_proj/dGDCN/data/FalseWork/code/FalseLangermann.hs
gpl-3.0
randomVector' n nums = do gen <- get let (num, gen') = randomR (bot, top) gen put gen' randomVector' (n-1) (num:nums) -- Calculation function
158
randomVector' n nums = do gen <- get let (num, gen') = randomR (bot, top) gen put gen' randomVector' (n-1) (num:nums) -- Calculation function
158
randomVector' n nums = do gen <- get let (num, gen') = randomR (bot, top) gen put gen' randomVector' (n-1) (num:nums) -- Calculation function
158
false
false
0
11
40
74
36
38
null
null
vTurbine/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (CmmLabel _ _ CmmClosure) = GcPtrLabel
60
labelType (CmmLabel _ _ CmmClosure) = GcPtrLabel
60
labelType (CmmLabel _ _ CmmClosure) = GcPtrLabel
60
false
false
0
6
18
20
9
11
null
null
nushio3/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
deTagExpr (Lam (TB b _) e) = Lam b (deTagExpr e)
57
deTagExpr (Lam (TB b _) e) = Lam b (deTagExpr e)
57
deTagExpr (Lam (TB b _) e) = Lam b (deTagExpr e)
57
false
false
0
9
19
36
17
19
null
null
kylcarte/threepenny-extras
src/Foundation/Sections.hs
bsd-3-clause
mkSectionType VertNav = ("vertical-nav" , "vertical-nav" )
63
mkSectionType VertNav = ("vertical-nav" , "vertical-nav" )
63
mkSectionType VertNav = ("vertical-nav" , "vertical-nav" )
63
false
false
0
5
11
15
8
7
null
null
Gabriel439/Haskell-Pipes-ByteString-Library
src/Pipes/ByteString.hs
bsd-3-clause
-- | Return the maximum 'Word8' within a byte stream maximum :: Monad m => Producer ByteString m () -> m (Maybe Word8) maximum = P.fold step Nothing id where step mw8 bs = if (BS.null bs) then mw8 else Just $ case mw8 of Nothing -> BS.maximum bs Just w8 -> max w8 (B...
334
maximum :: Monad m => Producer ByteString m () -> m (Maybe Word8) maximum = P.fold step Nothing id where step mw8 bs = if (BS.null bs) then mw8 else Just $ case mw8 of Nothing -> BS.maximum bs Just w8 -> max w8 (BS.maximum bs)
281
maximum = P.fold step Nothing id where step mw8 bs = if (BS.null bs) then mw8 else Just $ case mw8 of Nothing -> BS.maximum bs Just w8 -> max w8 (BS.maximum bs)
215
true
true
2
11
110
124
59
65
null
null
sgillespie/ghc
compiler/simplStg/RepType.hs
bsd-3-clause
slotPrimRep WordSlot = WordRep
33
slotPrimRep WordSlot = WordRep
33
slotPrimRep WordSlot = WordRep
33
false
false
0
5
6
9
4
5
null
null
nevrenato/HyLoRes_Source
src/HyLoRes/Statistics.hs
gpl-2.0
updateMetrics :: MonadStatistics m => (Metric -> IO ()) -> m () updateMetrics f = do stat <- getStatsValues performIO $ mapM_ f (metrics stat ++ inspectionMetrics stat)
215
updateMetrics :: MonadStatistics m => (Metric -> IO ()) -> m () updateMetrics f = do stat <- getStatsValues performIO $ mapM_ f (metrics stat ++ inspectionMetrics stat)
215
updateMetrics f = do stat <- getStatsValues performIO $ mapM_ f (metrics stat ++ inspectionMetrics stat)
151
false
true
0
11
74
74
34
40
null
null
yjwen/hada
test/Prim.hs
lgpl-3.0
rshcU64 :: Word64 -> Word64 rshcU64 = (`shift` (-1))
52
rshcU64 :: Word64 -> Word64 rshcU64 = (`shift` (-1))
52
rshcU64 = (`shift` (-1))
24
false
true
0
8
8
33
17
16
null
null
seansu4you87/draft
Parser.hs
mit
numericBinop :: (Integer -> Integer -> Integer) -> [LispVal] -> ThrowsError LispVal numericBinop op singleVal@[_] = throwError $ NumArgs 2 singleVal
148
numericBinop :: (Integer -> Integer -> Integer) -> [LispVal] -> ThrowsError LispVal numericBinop op singleVal@[_] = throwError $ NumArgs 2 singleVal
148
numericBinop op singleVal@[_] = throwError $ NumArgs 2 singleVal
64
false
true
0
8
20
61
30
31
null
null
ezyang/ghc
testsuite/tests/gadt/while.hs
bsd-3-clause
match (PairR a b) (PairR c d) = do { EqProof <- match a c ; EqProof <- match b d ; succeed EqProof }
112
match (PairR a b) (PairR c d) = do { EqProof <- match a c ; EqProof <- match b d ; succeed EqProof }
112
match (PairR a b) (PairR c d) = do { EqProof <- match a c ; EqProof <- match b d ; succeed EqProof }
112
false
false
0
8
36
63
29
34
null
null
erikd/hs-tls
core/Network/TLS/Handshake/Client.hs
bsd-3-clause
-- | onServerHello process the ServerHello message on the client. -- -- 1) check the version chosen by the server is one allowed by parameters. -- 2) check that our compression and cipher algorithms are part of the list we sent -- 3) check extensions received are part of the one we sent -- 4) process the session parame...
3,227
onServerHello :: Context -> ClientParams -> [ExtensionID] -> Handshake -> IO (RecvState IO) onServerHello ctx cparams sentExts (ServerHello rver serverRan serverSession cipher compression exts) = do when (rver == SSL2) $ throwCore $ Error_Protocol ("ssl2 is not supported", True, ProtocolVersion) case find ((==)...
2,744
onServerHello ctx cparams sentExts (ServerHello rver serverRan serverSession cipher compression exts) = do when (rver == SSL2) $ throwCore $ Error_Protocol ("ssl2 is not supported", True, ProtocolVersion) case find ((==) rver) (supportedVersions $ ctxSupported ctx) of Nothing -> throwCore $ Error_Protoc...
2,652
true
true
0
20
819
724
351
373
null
null
badp/ganeti
src/Ganeti/Luxi.hs
gpl-2.0
-- | Converts Luxi call arguments into a 'LuxiOp' data structure. -- This is used for building a Luxi 'Handler'. -- -- This is currently hand-coded until we make it more uniform so that -- it can be generated using TH. decodeLuxiCall :: JSValue -> JSValue -> Result LuxiOp decodeLuxiCall method args = do call <- fromJ...
4,178
decodeLuxiCall :: JSValue -> JSValue -> Result LuxiOp decodeLuxiCall method args = do call <- fromJResult "Unable to parse LUXI request method" $ J.readJSON method case call of ReqQueryJobs -> do (jids, jargs) <- fromJVal args jids' <- case jids of JSNull -> ...
3,959
decodeLuxiCall method args = do call <- fromJResult "Unable to parse LUXI request method" $ J.readJSON method case call of ReqQueryJobs -> do (jids, jargs) <- fromJVal args jids' <- case jids of JSNull -> return [] _ -> fromJVal jids ...
3,905
true
true
0
23
1,593
1,060
508
552
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F04.hs
bsd-3-clause
-- glCopyMultiTexSubImage3DEXT ------------------------------------------------- glCopyMultiTexSubImage3DEXT :: MonadIO m => GLenum -- ^ @texunit@ of type [TextureUnit](Graphics-GL-Groups.html#TextureUnit). -> GLenum -- ^ @target@ of type [TextureTarget](Graphics-GL-Groups.html#TextureTarget). -> GLint -- ^ @l...
784
glCopyMultiTexSubImage3DEXT :: MonadIO m => GLenum -- ^ @texunit@ of type [TextureUnit](Graphics-GL-Groups.html#TextureUnit). -> GLenum -- ^ @target@ of type [TextureTarget](Graphics-GL-Groups.html#TextureTarget). -> GLint -- ^ @level@ of type @CheckedInt32@. -> GLint -- ^ @xoffset@ of type @CheckedInt32@. ...
702
glCopyMultiTexSubImage3DEXT v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 = liftIO $ dyn180 ptr_glCopyMultiTexSubImage3DEXT v1 v2 v3 v4 v5 v6 v7 v8 v9 v10
139
true
true
0
18
134
126
66
60
null
null
rob-b/appoint
src/Appoint/Types/Issues.hs
bsd-3-clause
issueId :: GitHub.Issue -> Int issueId issue = GitHub.untagId $ GitHub.issueId issue
84
issueId :: GitHub.Issue -> Int issueId issue = GitHub.untagId $ GitHub.issueId issue
84
issueId issue = GitHub.untagId $ GitHub.issueId issue
53
false
true
0
7
11
36
16
20
null
null
rfranek/duckling
Duckling/Numeral/SV/Rules.hs
bsd-3-clause
ruleIntersect :: Rule ruleIntersect = Rule { name = "intersect" , pattern = [ numberWith (fromMaybe 0 . TNumeral.grain) (>1) , numberWith TNumeral.multipliable not ] , prod = \tokens -> case tokens of (Token Numeral (NumeralData {TNumeral.value = val1, TNumeral.grain = Just g}): Token Num...
452
ruleIntersect :: Rule ruleIntersect = Rule { name = "intersect" , pattern = [ numberWith (fromMaybe 0 . TNumeral.grain) (>1) , numberWith TNumeral.multipliable not ] , prod = \tokens -> case tokens of (Token Numeral (NumeralData {TNumeral.value = val1, TNumeral.grain = Just g}): Token Num...
452
ruleIntersect = Rule { name = "intersect" , pattern = [ numberWith (fromMaybe 0 . TNumeral.grain) (>1) , numberWith TNumeral.multipliable not ] , prod = \tokens -> case tokens of (Token Numeral (NumeralData {TNumeral.value = val1, TNumeral.grain = Just g}): Token Numeral (NumeralData {TNu...
430
false
true
0
19
112
184
95
89
null
null
niteria/deterministic-fvs
NoUnion/FV.hs
mit
fs [] fv_cand in_scope acc = acc
32
fs [] fv_cand in_scope acc = acc
32
fs [] fv_cand in_scope acc = acc
32
false
false
1
6
6
20
8
12
null
null
sviperll/LambdaInterpreter
src/Lambda/Common.hs
gpl-3.0
termToUnmarked, termToMarked :: Term -> MarkedTerm termToUnmarked = UnmarkedTerm . fmap termToUnmarked . unTerm
111
termToUnmarked, termToMarked :: Term -> MarkedTerm termToUnmarked = UnmarkedTerm . fmap termToUnmarked . unTerm
111
termToUnmarked = UnmarkedTerm . fmap termToUnmarked . unTerm
60
false
true
0
7
13
28
15
13
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110314set1.hs
gpl-3.0
sets :: [Int] sets = [1..50]
28
sets :: [Int] sets = [1..50]
28
sets = [1..50]
14
false
true
0
5
5
19
11
8
null
null
ntc2/cryptol
src/Cryptol/TypeCheck/Subst.hs
bsd-3-clause
defaultingSubst :: Subst -> Subst defaultingSubst s = s { suDefaulting = True }
79
defaultingSubst :: Subst -> Subst defaultingSubst s = s { suDefaulting = True }
79
defaultingSubst s = s { suDefaulting = True }
45
false
true
0
6
13
26
14
12
null
null
spinda/liquidhaskell
tests/gsoc15/unknown/pos/gadtEval.hs
bsd-3-clause
toInt _ = liquidError "impossible"
38
toInt _ = liquidError "impossible"
38
toInt _ = liquidError "impossible"
38
false
false
0
5
8
12
5
7
null
null
cojoj/Codewars
Haskell/Codewars.hsproj/ReverseRecursively.hs
mit
revR [x] = [x]
14
revR [x] = [x]
14
revR [x] = [x]
14
false
false
0
6
3
15
8
7
null
null
ihc/futhark
src/Futhark/Pass/ExtractKernels.hs
isc
maybeDistributeStm :: Stm -> KernelAcc -> KernelM KernelAcc maybeDistributeStm bnd@(Let pat _ (Op (Map w lam arrs))) acc = -- Only distribute inside the map if we can distribute everything -- following the map. distributeIfPossible acc >>= \case Nothing -> addStmToKernel bnd acc Jus...
408
maybeDistributeStm :: Stm -> KernelAcc -> KernelM KernelAcc maybeDistributeStm bnd@(Let pat _ (Op (Map w lam arrs))) acc = -- Only distribute inside the map if we can distribute everything -- following the map. distributeIfPossible acc >>= \case Nothing -> addStmToKernel bnd acc Jus...
408
maybeDistributeStm bnd@(Let pat _ (Op (Map w lam arrs))) acc = -- Only distribute inside the map if we can distribute everything -- following the map. distributeIfPossible acc >>= \case Nothing -> addStmToKernel bnd acc Just acc' -> distribute =<< distributeInnerMap pat (MapLoop (stmCerts bnd) w lam arrs)...
325
false
true
0
14
93
116
57
59
null
null
bos/text
tests/Tests/Properties/Builder.hs
bsd-2-clause
tb_decimal_int8 (a::Int8) = tb_decimal a
40
tb_decimal_int8 (a::Int8) = tb_decimal a
40
tb_decimal_int8 (a::Int8) = tb_decimal a
40
false
false
0
7
4
19
9
10
null
null
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/Graphics/UI/GLUT/Constants.hs
bsd-3-clause
----------------------------------------------------------------------------- -- * Display mode bit masks glut_RGB, glut_RGBA, glut_INDEX, glut_SINGLE, glut_DOUBLE, glut_ACCUM, glut_ALPHA, glut_DEPTH, glut_STENCIL, glut_MULTISAMPLE, glut_STEREO, glut_LUMINANCE, glut_AUX1, glut_AUX2, glut_AUX3, glut_AUX4 :: CUInt ...
367
glut_RGB, glut_RGBA, glut_INDEX, glut_SINGLE, glut_DOUBLE, glut_ACCUM, glut_ALPHA, glut_DEPTH, glut_STENCIL, glut_MULTISAMPLE, glut_STEREO, glut_LUMINANCE, glut_AUX1, glut_AUX2, glut_AUX3, glut_AUX4 :: CUInt glut_RGB = 0x0000
261
glut_RGB = 0x0000
47
true
true
0
4
63
43
38
5
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_INDEX_ARRAY_TYPE :: GLenum gl_INDEX_ARRAY_TYPE = 0x8085
58
gl_INDEX_ARRAY_TYPE :: GLenum gl_INDEX_ARRAY_TYPE = 0x8085
58
gl_INDEX_ARRAY_TYPE = 0x8085
28
false
true
0
4
5
11
6
5
null
null
michaelficarra/purescript
src/Language/PureScript/TypeChecker/Types.hs
mit
infer' (SuperClassDictionary className tys) = do dicts <- getTypeClassDictionaries return $ TypeClassDictionary (className, tys) dicts
138
infer' (SuperClassDictionary className tys) = do dicts <- getTypeClassDictionaries return $ TypeClassDictionary (className, tys) dicts
138
infer' (SuperClassDictionary className tys) = do dicts <- getTypeClassDictionaries return $ TypeClassDictionary (className, tys) dicts
138
false
false
0
9
18
42
20
22
null
null