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
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsSeq/src/SIRS/SIRSModel.hs
gpl-3.0
sirsTransformer :: SIRSTransformer sirsTransformer ae (PA.Start) = ae
69
sirsTransformer :: SIRSTransformer sirsTransformer ae (PA.Start) = ae
69
sirsTransformer ae (PA.Start) = ae
34
false
true
1
6
7
27
11
16
null
null
gtk2hs/soegtk
Graphics/SOE/Gtk.hs
lgpl-2.1
getWindowEvent_ :: Window -> IO Event getWindowEvent_ win = atomically $ readTChan (eventsChan win)
99
getWindowEvent_ :: Window -> IO Event getWindowEvent_ win = atomically $ readTChan (eventsChan win)
99
getWindowEvent_ win = atomically $ readTChan (eventsChan win)
61
false
true
0
8
13
34
16
18
null
null
pushkinma/frag
src/BSP.hs
gpl-2.0
- Stores the leaf's indices into the faces kLeafFaces :: Int kLeafFaces = 5
76
kLeafFaces :: Int kLeafFaces = 5
32
kLeafFaces = 5
14
true
true
1
5
14
18
9
9
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The video\'s rating from the Maldives National Bureau of Classification. crNbcRating :: Lens' ContentRating (Maybe ContentRatingNbcRating) crNbcRating = lens _crNbcRating (\ s a -> s{_crNbcRating = a})
208
crNbcRating :: Lens' ContentRating (Maybe ContentRatingNbcRating) crNbcRating = lens _crNbcRating (\ s a -> s{_crNbcRating = a})
130
crNbcRating = lens _crNbcRating (\ s a -> s{_crNbcRating = a})
64
true
true
0
9
30
48
25
23
null
null
Philonous/d-bus
src/DBus/Wire.hs
mit
putSize :: MonadState Int m => Int -> m () putSize i = modify (+i)
66
putSize :: MonadState Int m => Int -> m () putSize i = modify (+i)
66
putSize i = modify (+i)
23
false
true
0
8
14
39
19
20
null
null
ra1u/frequency-response
src/FrequencyResponse.hs
bsd-3-clause
getResponseAcyclic :: (AnalyzerAcyclic SpecWide -> AnalyzerAcyclic SpecWide) -- ^ circuitry -> Double -- ^ phase in radians that represents Nyquist frequency. (phase pi ≡ 1.0 of sampling frequency) -> Spectrum Rational Double -- ^ response as stream getResponseAcyclic f ph = ...
407
getResponseAcyclic :: (AnalyzerAcyclic SpecWide -> AnalyzerAcyclic SpecWide) -- ^ circuitry -> Double -- ^ phase in radians that represents Nyquist frequency. (phase pi ≡ 1.0 of sampling frequency) -> Spectrum Rational Double getResponseAcyclic f ph = snd $ unAnalyzerAcyclic...
383
getResponseAcyclic f ph = snd $ unAnalyzerAcyclic $ f $ AnalyzerAcyclic (Just (delaySpec ph) ,constSpectrum 1 1)
113
true
true
0
10
98
80
40
40
null
null
mcschroeder/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info
102
externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info
102
externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info
102
false
false
0
6
12
30
13
17
null
null
tel/saltine
src/Crypto/Saltine/Internal/Box.hs
mit
-- | Size of a @crypto_box_beforenm@-generated combined key box_beforenmbytes = fromIntegral c_crypto_box_beforenmbytes
121
box_beforenmbytes = fromIntegral c_crypto_box_beforenmbytes
61
box_beforenmbytes = fromIntegral c_crypto_box_beforenmbytes
61
true
false
1
5
13
13
5
8
null
null
jfoutz/language-bash
src/Language/Bash/Parse/Word.hs
bsd-3-clause
operator :: Stream s m Char => [String] -> ParsecT s u m String operator ops = go ops <?> "operator" where go xs | null xs = empty | "" `elem` xs = try (continue xs) <|> pure "" | otherwise = continue xs continue xs = do c <- anyChar (c :) <$> go (prefix c xs) ...
389
operator :: Stream s m Char => [String] -> ParsecT s u m String operator ops = go ops <?> "operator" where go xs | null xs = empty | "" `elem` xs = try (continue xs) <|> pure "" | otherwise = continue xs continue xs = do c <- anyChar (c :) <$> go (prefix c xs) ...
389
operator ops = go ops <?> "operator" where go xs | null xs = empty | "" `elem` xs = try (continue xs) <|> pure "" | otherwise = continue xs continue xs = do c <- anyChar (c :) <$> go (prefix c xs) prefix c = map tail . filter (\x -> not (null x) && head x ...
325
false
true
2
14
139
192
91
101
null
null
peterspackman/hsqc
src/Element.hs
gpl-3.0
chalcogens = [O, S, Se, Te, Po]
31
chalcogens = [O, S, Se, Te, Po]
31
chalcogens = [O, S, Se, Te, Po]
31
false
false
0
5
6
21
13
8
null
null
kishoredbn/barrelfish
tools/skate/CAbsSyntax.hs
mit
pp_expr (Binary o e1 e2) = (pp_par_expr e1) ++" " ++ (pp_binop o) ++ " "++(pp_par_expr e2)
94
pp_expr (Binary o e1 e2) = (pp_par_expr e1) ++" " ++ (pp_binop o) ++ " "++(pp_par_expr e2)
94
pp_expr (Binary o e1 e2) = (pp_par_expr e1) ++" " ++ (pp_binop o) ++ " "++(pp_par_expr e2)
94
false
false
0
10
20
54
26
28
null
null
phadej/patches-vector
Data/Patch/Internal.hs
bsd-3-clause
old f (Delete i a) = Delete i <$> f a
37
old f (Delete i a) = Delete i <$> f a
37
old f (Delete i a) = Delete i <$> f a
37
false
false
0
6
10
31
13
18
null
null
joelburget/haste-compiler
libraries/base-ghc-7.6/Data/Typeable.hs
bsd-3-clause
gcast :: (Typeable a, Typeable b) => c a -> Maybe (c b) gcast x = r where r = if typeOf (getArg x) == typeOf (getArg (fromJust r)) then Just $ unsafeCoerce x else Nothing getArg :: c x -> x getArg = undefined -- | Cast for * -> *
254
gcast :: (Typeable a, Typeable b) => c a -> Maybe (c b) gcast x = r where r = if typeOf (getArg x) == typeOf (getArg (fromJust r)) then Just $ unsafeCoerce x else Nothing getArg :: c x -> x getArg = undefined -- | Cast for * -> *
254
gcast x = r where r = if typeOf (getArg x) == typeOf (getArg (fromJust r)) then Just $ unsafeCoerce x else Nothing getArg :: c x -> x getArg = undefined -- | Cast for * -> *
198
false
true
1
11
76
128
59
69
null
null
ghorn/dynobud
dynobud/tests/ViewTests.hs
lgpl-3.0
prop_vsplitTrip :: Test prop_vsplitTrip = testProperty "vcatTrip . vsplitTrip" $ \(Views {vwProxy = p1}) (Views {vwProxy = p2}) (Views {vwProxy = p3}) (Views {vwProxy = p4}) (CMatrices {cmProxy = p5}) -> test p1 p2 p3 p4 p5 where test :: forall f1 f2 f3 g a . (View f1, View f2, View f3, View g, ...
615
prop_vsplitTrip :: Test prop_vsplitTrip = testProperty "vcatTrip . vsplitTrip" $ \(Views {vwProxy = p1}) (Views {vwProxy = p2}) (Views {vwProxy = p3}) (Views {vwProxy = p4}) (CMatrices {cmProxy = p5}) -> test p1 p2 p3 p4 p5 where test :: forall f1 f2 f3 g a . (View f1, View f2, View f3, View g, ...
615
prop_vsplitTrip = testProperty "vcatTrip . vsplitTrip" $ \(Views {vwProxy = p1}) (Views {vwProxy = p2}) (Views {vwProxy = p3}) (Views {vwProxy = p4}) (CMatrices {cmProxy = p5}) -> test p1 p2 p3 p4 p5 where test :: forall f1 f2 f3 g a . (View f1, View f2, View f3, View g, CMatrix a, MyEq a) ...
591
false
true
8
12
191
292
150
142
null
null
phischu/fragnix
benchmarks/containers/Data.Sequence.hs
bsd-3-clause
appendTree4 :: FingerTree (Node a) -> Node a -> Node a -> Node a -> Node a -> FingerTree (Node a) -> FingerTree (Node a) appendTree4 Empty a b c d xs = a `consTree` b `consTree` c `consTree` d `consTree` xs
210
appendTree4 :: FingerTree (Node a) -> Node a -> Node a -> Node a -> Node a -> FingerTree (Node a) -> FingerTree (Node a) appendTree4 Empty a b c d xs = a `consTree` b `consTree` c `consTree` d `consTree` xs
210
appendTree4 Empty a b c d xs = a `consTree` b `consTree` c `consTree` d `consTree` xs
89
false
true
2
14
45
107
52
55
null
null
mcschroeder/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
needsCDecl (CCS_Label _) = True
46
needsCDecl (CCS_Label _) = True
46
needsCDecl (CCS_Label _) = True
46
false
false
0
6
19
16
7
9
null
null
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/SimulatePrincipalPolicy.hs
mpl-2.0
-- | A list of names of API actions to evaluate in the simulation. Each -- action is evaluated for each resource. Each action must include the -- service identifier, such as 'iam:CreateUser'. sppActionNames :: Lens' SimulatePrincipalPolicy [Text] sppActionNames = lens _sppActionNames (\ s a -> s{_sppActionNames = a}) ....
328
sppActionNames :: Lens' SimulatePrincipalPolicy [Text] sppActionNames = lens _sppActionNames (\ s a -> s{_sppActionNames = a}) . _Coerce
136
sppActionNames = lens _sppActionNames (\ s a -> s{_sppActionNames = a}) . _Coerce
81
true
true
0
10
50
49
28
21
null
null
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T3787.hs
bsd-3-clause
-- | 'getList' returns the list of all values generated by the source. getList :: forall m a d x. (Monad m, AncestorFunctor a d) => Source m a x -> Trampoline d m [x] getList source = getList' return where getList' f = get source >>= maybe (f []) (\x-> getList' (f . (x:))) -- | 'consumeAndSuppress' consumes the ent...
364
getList :: forall m a d x. (Monad m, AncestorFunctor a d) => Source m a x -> Trampoline d m [x] getList source = getList' return where getList' f = get source >>= maybe (f []) (\x-> getList' (f . (x:))) -- | 'consumeAndSuppress' consumes the entire source ignoring the values it generates.
293
getList source = getList' return where getList' f = get source >>= maybe (f []) (\x-> getList' (f . (x:))) -- | 'consumeAndSuppress' consumes the entire source ignoring the values it generates.
197
true
true
0
12
70
117
62
55
null
null
infotroph/pandoc-crossref
lib/Text/Pandoc/CrossRef/References/Refs.hs
gpl-2.0
allCitsPrefix :: [Citation] -> Maybe String allCitsPrefix cits = find isCitationPrefix prefixes where isCitationPrefix p = all (p `isPrefixOf`) $ map (uncapitalizeFirst . citationId) cits
195
allCitsPrefix :: [Citation] -> Maybe String allCitsPrefix cits = find isCitationPrefix prefixes where isCitationPrefix p = all (p `isPrefixOf`) $ map (uncapitalizeFirst . citationId) cits
195
allCitsPrefix cits = find isCitationPrefix prefixes where isCitationPrefix p = all (p `isPrefixOf`) $ map (uncapitalizeFirst . citationId) cits
151
false
true
0
8
32
65
33
32
null
null
ak1t0/Clover
src/Parser.hs
bsd-3-clause
parseInt :: Parser Clo parseInt = do x <- try integer <|> natural return $ Int x -- Clover Float -- n.m, non-signed, signed
128
parseInt :: Parser Clo parseInt = do x <- try integer <|> natural return $ Int x -- Clover Float -- n.m, non-signed, signed
128
parseInt = do x <- try integer <|> natural return $ Int x -- Clover Float -- n.m, non-signed, signed
105
false
true
0
9
28
40
19
21
null
null
ml9951/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
deAnnotate' (AnnApp fun arg) = App (deAnnotate fun) (deAnnotate arg)
73
deAnnotate' (AnnApp fun arg) = App (deAnnotate fun) (deAnnotate arg)
73
deAnnotate' (AnnApp fun arg) = App (deAnnotate fun) (deAnnotate arg)
73
false
false
0
7
14
35
16
19
null
null
ahushh/Monaba
monaba/src/Handler/Captcha.hs
mit
makeCaptcha :: String -> Handler (Text, Text) makeCaptcha path = do captcha <- appCaptcha . appSettings <$> getYesod liftIO $ (first T.strip . (pack***pack) . read) <$> readProcess (unpack captcha) [path] ""
211
makeCaptcha :: String -> Handler (Text, Text) makeCaptcha path = do captcha <- appCaptcha . appSettings <$> getYesod liftIO $ (first T.strip . (pack***pack) . read) <$> readProcess (unpack captcha) [path] ""
211
makeCaptcha path = do captcha <- appCaptcha . appSettings <$> getYesod liftIO $ (first T.strip . (pack***pack) . read) <$> readProcess (unpack captcha) [path] ""
165
false
true
0
13
35
92
46
46
null
null
sfultong/stand-in-language
src/Naturals.hs
apache-2.0
debug :: Bool debug = True
26
debug :: Bool debug = True
26
debug = True
12
false
true
0
6
5
18
7
11
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.Builder.Prim.Binary.hs
bsd-3-clause
word64BE :: FixedPrim Word64 word64BE = fixedPrim 8 $ \w p -> do poke p (fromIntegral (shiftr_w64 w 56) :: Word8) poke (p `plusPtr` 1) (fromIntegral (shiftr_w64 w 48) :: Word8) poke (p `plusPtr` 2) (fromIntegral (shiftr_w64 w 40) :: Word8) poke (p `plusPtr` 3) (fromIntegral (shiftr_w64 w 3...
651
word64BE :: FixedPrim Word64 word64BE = fixedPrim 8 $ \w p -> do poke p (fromIntegral (shiftr_w64 w 56) :: Word8) poke (p `plusPtr` 1) (fromIntegral (shiftr_w64 w 48) :: Word8) poke (p `plusPtr` 2) (fromIntegral (shiftr_w64 w 40) :: Word8) poke (p `plusPtr` 3) (fromIntegral (shiftr_w64 w 3...
651
word64BE = fixedPrim 8 $ \w p -> do poke p (fromIntegral (shiftr_w64 w 56) :: Word8) poke (p `plusPtr` 1) (fromIntegral (shiftr_w64 w 48) :: Word8) poke (p `plusPtr` 2) (fromIntegral (shiftr_w64 w 40) :: Word8) poke (p `plusPtr` 3) (fromIntegral (shiftr_w64 w 32) :: Word8) poke (p `plu...
622
false
true
0
13
159
287
151
136
null
null
rueshyna/gogol
gogol-language/gen/Network/Google/Language/Types/Product.hs
mpl-2.0
-- | Sentiment score between -1.0 (negative sentiment) and 1.0 (positive -- sentiment). sScore :: Lens' Sentiment (Maybe Double) sScore = lens _sScore (\ s a -> s{_sScore = a}) . mapping _Coerce
202
sScore :: Lens' Sentiment (Maybe Double) sScore = lens _sScore (\ s a -> s{_sScore = a}) . mapping _Coerce
114
sScore = lens _sScore (\ s a -> s{_sScore = a}) . mapping _Coerce
73
true
true
0
10
40
56
29
27
null
null
tomahawkins/trs
Language/TRS/Utils.hs
bsd-3-clause
replace old new s@(a:b) = if isPrefixOf old s then new ++ replace old new (drop (length old) s) else a : replace old new b
122
replace old new s@(a:b) = if isPrefixOf old s then new ++ replace old new (drop (length old) s) else a : replace old new b
122
replace old new s@(a:b) = if isPrefixOf old s then new ++ replace old new (drop (length old) s) else a : replace old new b
122
false
false
0
11
25
72
36
36
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Map/Base.hs
bsd-3-clause
-- Update the 1st component of a tuple (special case of Control.Arrow.first) first :: (a -> b) -> (a,c) -> (b,c) first f (x,y) = (f x, y)
137
first :: (a -> b) -> (a,c) -> (b,c) first f (x,y) = (f x, y)
60
first f (x,y) = (f x, y)
24
true
true
0
9
27
65
35
30
null
null
nilthehuman/H-99
BinaryTrees.hs
unlicense
height (Branch _ l r) = 1 + max (height l) (height r)
53
height (Branch _ l r) = 1 + max (height l) (height r)
53
height (Branch _ l r) = 1 + max (height l) (height r)
53
false
false
0
8
12
40
19
21
null
null
beni55/hspec
hspec-core/src/Test/Hspec/Core/Formatters/Internal.hs
mit
-- | Append some output to the report. write :: String -> FormatM () write s = do h <- gets stateHandle liftIO $ IO.hPutStr h s -- | The same as `write`, but adds a newline character.
188
write :: String -> FormatM () write s = do h <- gets stateHandle liftIO $ IO.hPutStr h s -- | The same as `write`, but adds a newline character.
149
write s = do h <- gets stateHandle liftIO $ IO.hPutStr h s -- | The same as `write`, but adds a newline character.
119
true
true
0
9
42
49
23
26
null
null
jtobin/deanie
lib/Deanie/Expr.hs
mit
product :: Ap (Free ProgramF) a -> Program a product term = liftF (ProgramF (InR term))
87
product :: Ap (Free ProgramF) a -> Program a product term = liftF (ProgramF (InR term))
87
product term = liftF (ProgramF (InR term))
42
false
true
0
9
15
47
22
25
null
null
marcelosousa/poet
src/Exploration/BFSUNF/APIStateful.hs
gpl-2.0
getState :: System -> UnfoldingPrefix -> EventID -> Sigma getState sys unf@((es,_,_),confs) e = case M.lookup e es of Nothing -> error "getConfiguration: no event in the prefix" Just (tID,cID) -> let t = getTransition sys tID in case M.lookup cID confs of Nothing -> error $ "getConfigur...
500
getState :: System -> UnfoldingPrefix -> EventID -> Sigma getState sys unf@((es,_,_),confs) e = case M.lookup e es of Nothing -> error "getConfiguration: no event in the prefix" Just (tID,cID) -> let t = getTransition sys tID in case M.lookup cID confs of Nothing -> error $ "getConfigura...
499
getState sys unf@((es,_,_),confs) e = case M.lookup e es of Nothing -> error "getConfiguration: no event in the prefix" Just (tID,cID) -> let t = getTransition sys tID in case M.lookup cID confs of Nothing -> error $ "getConfiguration: no configuration " ++ show cID ++ " in the prefix " ...
441
false
true
19
7
152
161
87
74
null
null
sgraf812/feed-gipeda
src/FeedGipeda/Config.hs
bsd-3-clause
-- | A config with no repositories to watch. empty :: Config empty = Config Set.empty
87
empty :: Config empty = Config Set.empty
42
empty = Config Set.empty
26
true
true
0
6
17
24
10
14
null
null
cheme/nanomsg-hs
test/C.hs
mit
isRight (Left _) = False
24
isRight (Left _) = False
24
isRight (Left _) = False
24
false
false
0
7
4
15
7
8
null
null
reinerp/primitive
Data/Primitive.hs
bsd-3-clause
-- | Size of values of type @a@. The argument is not used. sizeOf :: Prim a => a -> Int sizeOf x = I# (sizeOf# x)
113
sizeOf :: Prim a => a -> Int sizeOf x = I# (sizeOf# x)
54
sizeOf x = I# (sizeOf# x)
25
true
true
0
8
26
40
18
22
null
null
nevrenato/Hets_Fork
SoftFOL/ProveHyperHyper.hs
gpl-2.0
consCheck :: String -> TacticScript -> TheoryMorphism Sign Sentence SoftFOLMorphism ProofTree -> [FreeDefMorphism SPTerm SoftFOLMorphism] -- ^ freeness constraints -> IO (CCStatus ProofTree) consCheck thName (TacticScript tl) tm freedefs = case tTarget tm of Theory sig ...
902
consCheck :: String -> TacticScript -> TheoryMorphism Sign Sentence SoftFOLMorphism ProofTree -> [FreeDefMorphism SPTerm SoftFOLMorphism] -- ^ freeness constraints -> IO (CCStatus ProofTree) consCheck thName (TacticScript tl) tm freedefs = case tTarget tm of Theory sig ...
902
consCheck thName (TacticScript tl) tm freedefs = case tTarget tm of Theory sig nSens -> do let proverStateI = spassProverState sig (toNamedList nSens) freedefs saveFile = basename thName ++ ".tptp" prob <- showTPTPProblemM thName proverStateI [] (stdoutC, stderrC, t...
671
false
true
0
17
303
238
115
123
null
null
mrakgr/futhark
src/Language/Futhark/Attributes.hs
bsd-3-clause
removeNames (Array at) = Array $ removeArrayNames at
52
removeNames (Array at) = Array $ removeArrayNames at
52
removeNames (Array at) = Array $ removeArrayNames at
52
false
false
0
7
7
22
10
12
null
null
fpco/binary
tests/QC.hs
bsd-3-clause
prop_getByteString_negative :: Int -> Property prop_getByteString_negative n = n < 1 ==> runGet (getByteString n) L.empty == B.empty
138
prop_getByteString_negative :: Int -> Property prop_getByteString_negative n = n < 1 ==> runGet (getByteString n) L.empty == B.empty
138
prop_getByteString_negative n = n < 1 ==> runGet (getByteString n) L.empty == B.empty
91
false
true
5
6
23
48
23
25
null
null
juretta/course
src/L09/BKTree.hs
bsd-3-clause
member :: MetricSpace a => a -> BKTree a -> Bool member = error "todo"
80
member :: MetricSpace a => a -> BKTree a -> Bool member = error "todo"
80
member = error "todo"
23
false
true
0
9
24
35
15
20
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/TysPrim.hs
bsd-3-clause
-- mkTyConApp isn't defined yet -- | See "Type#kind_subtyping" for details of the distinction between these 'Kind's anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, constraintKind, superKind :: Kind superKind = kindTyConType superKindTyCon
256
anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, constraintKind, superKind :: Kind superKind = kindTyConType superKindTyCon
138
superKind = kindTyConType superKindTyCon
47
true
true
5
5
37
37
19
18
null
null
d0kt0r0/estuary
client/src/Estuary/Help/PunctualAudio.hs
gpl-3.0
referenceText "@<>" = "sets a new definiton starts at next 2-cycle boundary, crossfades over 2 cycles"
102
referenceText "@<>" = "sets a new definiton starts at next 2-cycle boundary, crossfades over 2 cycles"
102
referenceText "@<>" = "sets a new definiton starts at next 2-cycle boundary, crossfades over 2 cycles"
102
false
false
0
5
15
9
4
5
null
null
rvion/lamdu
Lamdu/GUI/ExpressionEdit/HoleEdit/ResultGroups.hs
gpl-3.0
searchTermsOfBody :: MonadA m => Sugar.Body (Name m) m expr -> [String] searchTermsOfBody = searchTermsOfBodyShape <> searchTermsOfBodyNames
140
searchTermsOfBody :: MonadA m => Sugar.Body (Name m) m expr -> [String] searchTermsOfBody = searchTermsOfBodyShape <> searchTermsOfBodyNames
140
searchTermsOfBody = searchTermsOfBodyShape <> searchTermsOfBodyNames
68
false
true
0
9
16
44
22
22
null
null
brendanhay/gogol
gogol-youtube-analytics/gen/Network/Google/Resource/YouTubeAnalytics/Reports/Query.hs
mpl-2.0
-- | The start date for fetching YouTube Analytics data. The value should be -- in \`YYYY-MM-DD\` format. required: true, pattern: -- \"[0-9]{4}-[0-9]{2}-[0-9]{2} rqStartDate :: Lens' ReportsQuery (Maybe Text) rqStartDate = lens _rqStartDate (\ s a -> s{_rqStartDate = a})
274
rqStartDate :: Lens' ReportsQuery (Maybe Text) rqStartDate = lens _rqStartDate (\ s a -> s{_rqStartDate = a})
111
rqStartDate = lens _rqStartDate (\ s a -> s{_rqStartDate = a})
64
true
true
0
9
41
50
27
23
null
null
paulkeene/FP101x
chapter05/Exercises.hs
bsd-3-clause
(_:xs) !! n = xs !! (n - 1)
27
(_:xs) !! n = xs !! (n - 1)
27
(_:xs) !! n = xs !! (n - 1)
27
false
false
0
7
8
30
15
15
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProFileUserLinks/Delete.hs
mpl-2.0
-- | Web Property ID to delete the user link for. mpfuldWebPropertyId :: Lens' ManagementProFileUserLinksDelete Text mpfuldWebPropertyId = lens _mpfuldWebPropertyId (\ s a -> s{_mpfuldWebPropertyId = a})
211
mpfuldWebPropertyId :: Lens' ManagementProFileUserLinksDelete Text mpfuldWebPropertyId = lens _mpfuldWebPropertyId (\ s a -> s{_mpfuldWebPropertyId = a})
161
mpfuldWebPropertyId = lens _mpfuldWebPropertyId (\ s a -> s{_mpfuldWebPropertyId = a})
94
true
true
0
9
34
42
22
20
null
null
benweitzman/PhoBuddies
src/Actions.hs
mit
api :: (ToJSON response) => Action (Status, response) -> Action response api with = do (stat, resp) <- with json resp status stat return resp
150
api :: (ToJSON response) => Action (Status, response) -> Action response api with = do (stat, resp) <- with json resp status stat return resp
150
api with = do (stat, resp) <- with json resp status stat return resp
77
false
true
0
9
33
74
34
40
null
null
VictorDenisov/keystone
src/Keystone/Web/User.hs
gpl-2.0
parseCpr = $(mkParseJSON (dropOptions 1 <.> underscoreOptions) ''ChangePasswordRequest)
87
parseCpr = $(mkParseJSON (dropOptions 1 <.> underscoreOptions) ''ChangePasswordRequest)
87
parseCpr = $(mkParseJSON (dropOptions 1 <.> underscoreOptions) ''ChangePasswordRequest)
87
false
false
0
10
7
27
13
14
null
null
lancelet/inner-change
src/Network/InnerChange/XML/Types.hs
bsd-3-clause
maybeFail :: FailureDetails -> Maybe a -> Result a maybeFail fd = maybe (Failure fd) Success
92
maybeFail :: FailureDetails -> Maybe a -> Result a maybeFail fd = maybe (Failure fd) Success
92
maybeFail fd = maybe (Failure fd) Success
41
false
true
0
7
15
39
18
21
null
null
jacekszymanski/wxHaskell
wx/src/Graphics/UI/WX/Controls.hs
lgpl-2.1
mediaCtrlEx :: Window a -> Style -> MediaCtrlBackend -> [Prop (MediaCtrl ())] -> IO (MediaCtrl ()) mediaCtrlEx parent style_ back props = feed2 props style_ $ initialContainer $ \id rect -> \props' _flags -> do s <- mediaCtrlCreate parent id "" rect style_ (fromMediaCtrlBackend back) "" set s props' ...
333
mediaCtrlEx :: Window a -> Style -> MediaCtrlBackend -> [Prop (MediaCtrl ())] -> IO (MediaCtrl ()) mediaCtrlEx parent style_ back props = feed2 props style_ $ initialContainer $ \id rect -> \props' _flags -> do s <- mediaCtrlCreate parent id "" rect style_ (fromMediaCtrlBackend back) "" set s props' ...
333
mediaCtrlEx parent style_ back props = feed2 props style_ $ initialContainer $ \id rect -> \props' _flags -> do s <- mediaCtrlCreate parent id "" rect style_ (fromMediaCtrlBackend back) "" set s props' return s
234
false
true
0
13
74
133
63
70
null
null
ahushh/Monaba
monaba/src/Import.hs
mit
getBoardStats :: Handler [(Text,Int,Int)] getBoardStats = do mgroup <- (fmap $ userGroup . entityVal) <$> maybeAuth maybeStats <- lookupSession "board-stats" case maybeStats of Just s -> return $ tread s Nothing -> do posterId <- getPosterId boards <- map (boardName . entityVal) . filter ...
881
getBoardStats :: Handler [(Text,Int,Int)] getBoardStats = do mgroup <- (fmap $ userGroup . entityVal) <$> maybeAuth maybeStats <- lookupSession "board-stats" case maybeStats of Just s -> return $ tread s Nothing -> do posterId <- getPosterId boards <- map (boardName . entityVal) . filter ...
881
getBoardStats = do mgroup <- (fmap $ userGroup . entityVal) <$> maybeAuth maybeStats <- lookupSession "board-stats" case maybeStats of Just s -> return $ tread s Nothing -> do posterId <- getPosterId boards <- map (boardName . entityVal) . filter (not . isBoardHidden mgroup) <$> runDB (se...
839
false
true
0
26
239
315
156
159
null
null
schell/odin
src/Odin/Scripts/Animation/Pic.hs
mit
freshColorAnime :: (Fresh s m ,Scripts s m ) => ColorAnimation () -> m Entity freshColorAnime a = do k <- fresh let s = Script $ colorAnime k a (scripts.at k) %= Just . (maybe [s] (s:)) return k
240
freshColorAnime :: (Fresh s m ,Scripts s m ) => ColorAnimation () -> m Entity freshColorAnime a = do k <- fresh let s = Script $ colorAnime k a (scripts.at k) %= Just . (maybe [s] (s:)) return k
240
freshColorAnime a = do k <- fresh let s = Script $ colorAnime k a (scripts.at k) %= Just . (maybe [s] (s:)) return k
124
false
true
0
11
85
110
53
57
null
null
ml9951/ghc
libraries/base/Data/List/NonEmpty.hs
bsd-3-clause
-- | @'cycle' xs@ returns the infinite repetition of @xs@: -- -- > cycle [1,2,3] = 1 :| [2,3,1,2,3,...] cycle :: NonEmpty a -> NonEmpty a cycle = fromList . List.cycle . toList
176
cycle :: NonEmpty a -> NonEmpty a cycle = fromList . List.cycle . toList
72
cycle = fromList . List.cycle . toList
38
true
true
1
7
32
41
19
22
null
null
shlevy/ghc
testsuite/tests/programs/galois_raytrace/Geometry.hs
bsd-3-clause
--{-# INLINE matrix #-} matrix :: Tup4 (Tup4 Double) -> Matrix matrix ((m11, m12, m13, m14), (m21, m22, m23, m24), (m31, m32, m33, m34), (m41, m42, m43, m44)) = M (Q m11 m12 m13 m14) (Q m21 m22 m23 m24) (Q m31 m32 m33 m34) (Q m41 m42 m43 m44)
292
matrix :: Tup4 (Tup4 Double) -> Matrix matrix ((m11, m12, m13, m14), (m21, m22, m23, m24), (m31, m32, m33, m34), (m41, m42, m43, m44)) = M (Q m11 m12 m13 m14) (Q m21 m22 m23 m24) (Q m31 m32 m33 m34) (Q m41 m42 m43 m44)
268
matrix ((m11, m12, m13, m14), (m21, m22, m23, m24), (m31, m32, m33, m34), (m41, m42, m43, m44)) = M (Q m11 m12 m13 m14) (Q m21 m22 m23 m24) (Q m31 m32 m33 m34) (Q m41 m42 m43 m44)
229
true
true
0
8
99
145
82
63
null
null
keithodulaigh/Hets
CommonLogic/Lexer_CLIF.hs
gpl-2.0
white :: CharParser st String white = whiteSpace <|> try commentLine <|> commentBlock
101
white :: CharParser st String white = whiteSpace <|> try commentLine <|> commentBlock
101
white = whiteSpace <|> try commentLine <|> commentBlock
71
false
true
7
5
28
37
17
20
null
null
Garygunn94/DFS
FileServer/.stack-work/intero/intero265412Ej.hs
bsd-3-clause
server :: Server FileApi server = getFiles :<|> downloadFile :<|> uploadFile
89
server :: Server FileApi server = getFiles :<|> downloadFile :<|> uploadFile
89
server = getFiles :<|> downloadFile :<|> uploadFile
64
false
true
0
6
23
22
11
11
null
null
ghorn/dynobud
dynobud/src/Dyno/DirectCollocation/Formulate.hs
lgpl-3.0
getFg :: forall x z u p r c h q fp n deg . ( KnownNat deg, KnownNat n , Vectorize x, Vectorize z, Vectorize u, Vectorize p , Vectorize r, Vectorize c, Vectorize h, Vectorize q, Vectorize fp ) -- bcFun => Fun ( J (JV x) :*: J (JV x) :*: J (JV q) :*: J (JV p) ...
3,664
getFg :: forall x z u p r c h q fp n deg . ( KnownNat deg, KnownNat n , Vectorize x, Vectorize z, Vectorize u, Vectorize p , Vectorize r, Vectorize c, Vectorize h, Vectorize q, Vectorize fp ) -- bcFun => Fun ( J (JV x) :*: J (JV x) :*: J (JV q) :*: J (JV p) ...
3,664
getFg bcFun mayerFun lagQuadFun quadFun mapStageFun collTraj fixedParm = (obj, cat g) where -- split up the design vars CollTraj masterTf masterParm stages' xf = split collTraj stages = unJVec (split stages') :: Vec n (J (CollStage (JV x) (JV z) (JV u) (JV p) deg) MX) spstages = fmap split stages ::...
2,471
false
true
0
22
1,168
1,664
852
812
null
null
ssaavedra/liquidhaskell
benchmarks/esop2013-submission/Base.hs
bsd-3-clause
-- | The union of a list of maps, with a combining operation: -- (@'unionsWith' f == 'Prelude.foldl' ('unionWith' f) 'empty'@). -- -- > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] -- > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")] {-@ un...
494
unionsWith :: Ord k => (a->a->a) -> [Map k a] -> Map k a unionsWith f ts = foldlStrict (unionWith f) empty ts
111
unionsWith f ts = foldlStrict (unionWith f) empty ts
54
true
true
0
10
98
81
40
41
null
null
kojiromike/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v LFACos [x] = v ++ flUnOp "acos" (creg x)
47
doOp v LFACos [x] = v ++ flUnOp "acos" (creg x)
47
doOp v LFACos [x] = v ++ flUnOp "acos" (creg x)
47
false
false
0
8
10
31
15
16
null
null
sol2man2/Learn-You-A-Haskell-For-Great-Good
src/Ch03.hs
mit
-- 4*(let a=9 in a+1) + 2 -- [let square x = x * x in (square 5, square 3, square 2)] -- (let a=100;b=200;c=300 in a*b*c, let foo="Hey ";bar="there!" in foo++bar) -- let conbined with list calcBmis :: [(Double, Double)] -> [Double] calcBmis xs = [bmi | (w, h) <- xs, let bmi = w/h^2]
284
calcBmis :: [(Double, Double)] -> [Double] calcBmis xs = [bmi | (w, h) <- xs, let bmi = w/h^2]
94
calcBmis xs = [bmi | (w, h) <- xs, let bmi = w/h^2]
51
true
true
0
11
56
69
40
29
null
null
tomahawkins/improve
Language/ImProve.hs
bsd-3-clause
-- | Greater than. (>.) :: NumE a => E a -> E a -> E Bool (>.) = Gt
67
(>.) :: NumE a => E a -> E a -> E Bool (>.) = Gt
48
(>.) = Gt
9
true
true
0
9
19
46
22
24
null
null
google/hrepl
hrepl/Repl.hs
apache-2.0
writeGhciScript :: Text -> FilePath -> IO FilePath writeGhciScript contents dir = do Text.writeFile filePath contents return filePath where filePath = dir </> "repl.ghci"
180
writeGhciScript :: Text -> FilePath -> IO FilePath writeGhciScript contents dir = do Text.writeFile filePath contents return filePath where filePath = dir </> "repl.ghci"
180
writeGhciScript contents dir = do Text.writeFile filePath contents return filePath where filePath = dir </> "repl.ghci"
129
false
true
3
8
33
64
26
38
null
null
jvictor0/TweetTracker
src/AlphaPhi/SimulateAlphaPhi.hs
mit
simulateTweet_ cs@(tweet,alpha,graph) node seen = do pre_seen <- readIORef seen modifyIORef seen $ \s -> foldl' (flip Set.insert) s $ snd $ graph!node fmap concat $ forM (filter (not . flip Set.member pre_seen) $ snd $ graph!node) $ \n -> do p <- randomIO :: IO Double if p < alpha * (fst $ graph!n) ...
410
simulateTweet_ cs@(tweet,alpha,graph) node seen = do pre_seen <- readIORef seen modifyIORef seen $ \s -> foldl' (flip Set.insert) s $ snd $ graph!node fmap concat $ forM (filter (not . flip Set.member pre_seen) $ snd $ graph!node) $ \n -> do p <- randomIO :: IO Double if p < alpha * (fst $ graph!n) ...
410
simulateTweet_ cs@(tweet,alpha,graph) node seen = do pre_seen <- readIORef seen modifyIORef seen $ \s -> foldl' (flip Set.insert) s $ snd $ graph!node fmap concat $ forM (filter (not . flip Set.member pre_seen) $ snd $ graph!node) $ \n -> do p <- randomIO :: IO Double if p < alpha * (fst $ graph!n) ...
410
false
false
1
19
91
220
109
111
null
null
AlexeyRaga/eta
compiler/ETA/TypeCheck/TcType.hs
bsd-3-clause
isOverloadedTy (ForAllTy _ ty) = isOverloadedTy ty
50
isOverloadedTy (ForAllTy _ ty) = isOverloadedTy ty
50
isOverloadedTy (ForAllTy _ ty) = isOverloadedTy ty
50
false
false
0
6
6
21
9
12
null
null
elieux/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- retained for backwards compat, used -- to be Sf_SafeInfered but we no longer -- differentiate. numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"
257
numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"
81
numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"
81
true
false
0
7
108
27
14
13
null
null
lukexi/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprSizeOp_ :: LitString -> Size -> Operand -> SDoc pprSizeOp_ name size op1 = hcat [ pprMnemonic_ name , pprOperand size op1 ]
148
pprSizeOp_ :: LitString -> Size -> Operand -> SDoc pprSizeOp_ name size op1 = hcat [ pprMnemonic_ name , pprOperand size op1 ]
148
pprSizeOp_ name size op1 = hcat [ pprMnemonic_ name , pprOperand size op1 ]
97
false
true
0
7
44
47
23
24
null
null
Lysxia/twentyseven
src/Rubik/Misc.hs
mit
a <>^ 1 = a
11
a <>^ 1 = a
11
a <>^ 1 = a
11
false
false
2
5
4
13
5
8
null
null
lfairy/nationstates
NationStates/Region.hs
apache-2.0
grabChildren :: String -> Element -> [String] grabChildren childName = map strContent . findChildren (unqual childName)
119
grabChildren :: String -> Element -> [String] grabChildren childName = map strContent . findChildren (unqual childName)
119
grabChildren childName = map strContent . findChildren (unqual childName)
73
false
true
0
8
15
44
21
23
null
null
rueshyna/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Entries/List.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). elUploadProtocol :: Lens' EntriesList (Maybe Text) elUploadProtocol = lens _elUploadProtocol (\ s a -> s{_elUploadProtocol = a})
198
elUploadProtocol :: Lens' EntriesList (Maybe Text) elUploadProtocol = lens _elUploadProtocol (\ s a -> s{_elUploadProtocol = a})
136
elUploadProtocol = lens _elUploadProtocol (\ s a -> s{_elUploadProtocol = a})
85
true
true
2
9
33
55
25
30
null
null
dysinger/amazonka
amazonka-ecs/gen/Network/AWS/ECS/DescribeTasks.hs
mpl-2.0
-- | 'DescribeTasks' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dtCluster' @::@ 'Maybe' 'Text' -- -- * 'dtTasks' @::@ ['Text'] -- describeTasks :: DescribeTasks describeTasks = DescribeTasks { _dtCluster = Nothing , _dtTasks = mempty }
290
describeTasks :: DescribeTasks describeTasks = DescribeTasks { _dtCluster = Nothing , _dtTasks = mempty }
119
describeTasks = DescribeTasks { _dtCluster = Nothing , _dtTasks = mempty }
88
true
true
0
7
55
37
24
13
null
null
mettekou/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
geInt_RDR = varQual_RDR gHC_PRIM (fsLit ">=#")
52
geInt_RDR = varQual_RDR gHC_PRIM (fsLit ">=#")
52
geInt_RDR = varQual_RDR gHC_PRIM (fsLit ">=#")
52
false
false
0
7
11
17
8
9
null
null
pavelkogan/transform-tree
FSO.hs
mit
replaceFileCreator :: FileCreator -> FSO -> FSO replaceFileCreator c f@(File {content = (_, p)}) = f {content = (c, p)}
121
replaceFileCreator :: FileCreator -> FSO -> FSO replaceFileCreator c f@(File {content = (_, p)}) = f {content = (c, p)}
121
replaceFileCreator c f@(File {content = (_, p)}) = f {content = (c, p)}
73
false
true
0
11
21
59
34
25
null
null
christiaanb/vhdl
Language/VHDL/AST/Ppr.hs
bsd-3-clause
pprExprPrec p e (e1 :-: e2) = pprExprPrecInfix p e plusPrec e1 "-" e2
69
pprExprPrec p e (e1 :-: e2) = pprExprPrecInfix p e plusPrec e1 "-" e2
69
pprExprPrec p e (e1 :-: e2) = pprExprPrecInfix p e plusPrec e1 "-" e2
69
false
false
0
6
13
36
16
20
null
null
emilaxelsson/ag-graph
src/Dag/Rename.hs
bsd-3-clause
freshName :: (IsVar v, MonadState (St v) m) => m v freshName = do (n,v,memo) <- get put (n, succ v, memo) return (newVar v)
135
freshName :: (IsVar v, MonadState (St v) m) => m v freshName = do (n,v,memo) <- get put (n, succ v, memo) return (newVar v)
135
freshName = do (n,v,memo) <- get put (n, succ v, memo) return (newVar v)
84
false
true
0
9
36
83
42
41
null
null
girving/duck
duck/Lir.hs
bsd-3-clause
empty :: ModuleName -> Prog empty n = Prog n Map.empty Map.empty Map.empty []
77
empty :: ModuleName -> Prog empty n = Prog n Map.empty Map.empty Map.empty []
77
empty n = Prog n Map.empty Map.empty Map.empty []
49
false
true
0
6
13
37
18
19
null
null
ptitfred/ftv-vods
src/Liquipedia.hs
bsd-3-clause
readTournaments :: RDF rdf => TournamentType -> Maybe rdf -> Maybe [Tournament] readTournaments _ Nothing = Nothing
115
readTournaments :: RDF rdf => TournamentType -> Maybe rdf -> Maybe [Tournament] readTournaments _ Nothing = Nothing
115
readTournaments _ Nothing = Nothing
35
false
true
0
9
16
40
19
21
null
null
meoblast001/lexical-analyser-generator
src/Rules.hs
mit
-- |Matches a class definition. parseClass :: Parser Rule parseClass = do _ <- string "class" _ <- some space name <- manyTill anyChar (some space) classContents <- char '[' >> manyTill (choice [try parseCharRange, try parseChar]) (char ']') return $ Class name classContents -- |Matches a token definitio...
322
parseClass :: Parser Rule parseClass = do _ <- string "class" _ <- some space name <- manyTill anyChar (some space) classContents <- char '[' >> manyTill (choice [try parseCharRange, try parseChar]) (char ']') return $ Class name classContents -- |Matches a token definition.
290
parseClass = do _ <- string "class" _ <- some space name <- manyTill anyChar (some space) classContents <- char '[' >> manyTill (choice [try parseCharRange, try parseChar]) (char ']') return $ Class name classContents -- |Matches a token definition.
264
true
true
1
14
63
113
50
63
null
null
nbloomf/carl
src/Carl/Struct/Matrix.hs
gpl-3.0
mDelRow :: Matrix a -> Integer -> Either AlgErr (Matrix a) m `mDelRow` t = do p <- t `mIsRowIndexOf` m if not p then return m else do (r,c) <- mDim m let foo (i,j) = if i < t then (i,j) `mEntryOf` m else (i+1,j) `mEntryOf` m mFromMapM (r-1, c) foo
277
mDelRow :: Matrix a -> Integer -> Either AlgErr (Matrix a) m `mDelRow` t = do p <- t `mIsRowIndexOf` m if not p then return m else do (r,c) <- mDim m let foo (i,j) = if i < t then (i,j) `mEntryOf` m else (i+1,j) `mEntryOf` m mFromMapM (r-1, c) foo
277
m `mDelRow` t = do p <- t `mIsRowIndexOf` m if not p then return m else do (r,c) <- mDim m let foo (i,j) = if i < t then (i,j) `mEntryOf` m else (i+1,j) `mEntryOf` m mFromMapM (r-1, c) foo
218
false
true
0
17
82
167
87
80
null
null
sol/tinc
src/Tinc/Facts.hs
mit
listPlugins :: FilePath -> IO Plugins listPlugins pluginsDir = do exists <- doesDirectoryExist pluginsDir if exists then do files <- mapMaybe (stripPrefix "tinc-") <$> getDirectoryContents pluginsDir let f name = (name, pluginsDir </> "tinc-" ++ name) filterM isExecutable (map f files) els...
331
listPlugins :: FilePath -> IO Plugins listPlugins pluginsDir = do exists <- doesDirectoryExist pluginsDir if exists then do files <- mapMaybe (stripPrefix "tinc-") <$> getDirectoryContents pluginsDir let f name = (name, pluginsDir </> "tinc-" ++ name) filterM isExecutable (map f files) els...
331
listPlugins pluginsDir = do exists <- doesDirectoryExist pluginsDir if exists then do files <- mapMaybe (stripPrefix "tinc-") <$> getDirectoryContents pluginsDir let f name = (name, pluginsDir </> "tinc-" ++ name) filterM isExecutable (map f files) else return []
293
false
true
0
15
73
112
52
60
null
null
jwaldmann/haskell-obdd
examples/Queens.hs
gpl-2.0
no_threats n = OBDD.and $ do p <- positions n return $ OBDD.and $ do q <- positions n guard $ p < q guard $ threatens p q return $ OBDD.or [ OBDD.unit p False, OBDD.unit q False ]
219
no_threats n = OBDD.and $ do p <- positions n return $ OBDD.and $ do q <- positions n guard $ p < q guard $ threatens p q return $ OBDD.or [ OBDD.unit p False, OBDD.unit q False ]
219
no_threats n = OBDD.and $ do p <- positions n return $ OBDD.and $ do q <- positions n guard $ p < q guard $ threatens p q return $ OBDD.or [ OBDD.unit p False, OBDD.unit q False ]
219
false
false
0
15
79
103
46
57
null
null
yuto-matsum/contest-util-hs
src/Euler/040.hs
mit
baseidx :: Integer -> Integer baseidx n = helper 0 where helper i | idx i <=n && n<idx (i+1) = idx i | otherwise = helper (i+1) -- idx 0 == 0, idx 1 == 190
169
baseidx :: Integer -> Integer baseidx n = helper 0 where helper i | idx i <=n && n<idx (i+1) = idx i | otherwise = helper (i+1) -- idx 0 == 0, idx 1 == 190
169
baseidx n = helper 0 where helper i | idx i <=n && n<idx (i+1) = idx i | otherwise = helper (i+1) -- idx 0 == 0, idx 1 == 190
139
false
true
0
11
50
84
40
44
null
null
dduong42/turing-machine
Turing.hs
mit
-- Return the TransitionAction associated with the MachineInstance actionForInstance :: MachineInstance -> TransitionAction actionForInstance (MachineInstance machine currentState currentTape) = (transitions machine) ! (currentState, currentChar) where currentChar = readTape currentTape -- Return the next stat...
345
actionForInstance :: MachineInstance -> TransitionAction actionForInstance (MachineInstance machine currentState currentTape) = (transitions machine) ! (currentState, currentChar) where currentChar = readTape currentTape -- Return the next state of the machine instance
278
actionForInstance (MachineInstance machine currentState currentTape) = (transitions machine) ! (currentState, currentChar) where currentChar = readTape currentTape -- Return the next state of the machine instance
221
true
true
0
7
46
57
30
27
null
null
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/OneOfN.hs
gpl-3.0
foldOneOf19 a b c d e f g h i j k l m n o p q r s (TenOf19 z) = j z
67
foldOneOf19 a b c d e f g h i j k l m n o p q r s (TenOf19 z) = j z
67
foldOneOf19 a b c d e f g h i j k l m n o p q r s (TenOf19 z) = j z
67
false
false
0
7
24
56
27
29
null
null
corngood/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
getLibDir :: Verbosity -> LocalBuildInfo -> IO FilePath getLibDir verbosity lbi = dropWhileEndLE isSpace `fmap` rawSystemProgramStdoutConf verbosity ghcProgram (withPrograms lbi) ["--print-libdir"]
211
getLibDir :: Verbosity -> LocalBuildInfo -> IO FilePath getLibDir verbosity lbi = dropWhileEndLE isSpace `fmap` rawSystemProgramStdoutConf verbosity ghcProgram (withPrograms lbi) ["--print-libdir"]
211
getLibDir verbosity lbi = dropWhileEndLE isSpace `fmap` rawSystemProgramStdoutConf verbosity ghcProgram (withPrograms lbi) ["--print-libdir"]
155
false
true
0
8
34
54
27
27
null
null
anton-dessiatov/stack
src/Stack/PrettyPrint.hs
bsd-3-clause
prettyInfoS = prettyInfoWith flow
51
prettyInfoS = prettyInfoWith flow
51
prettyInfoS = prettyInfoWith flow
51
false
false
0
5
21
9
4
5
null
null
chrisbanks/cpiwb
profileMC2.hs
gpl-3.0
f11 = Nec (0,infty) f7
22
f11 = Nec (0,infty) f7
22
f11 = Nec (0,infty) f7
22
false
false
1
6
4
20
9
11
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
nvNodenettest :: String nvNodenettest = "node-net-test"
55
nvNodenettest :: String nvNodenettest = "node-net-test"
55
nvNodenettest = "node-net-test"
31
false
true
0
4
5
11
6
5
null
null
jwiegley/hnix
main/Repl.hs
bsd-3-clause
quit :: (MonadNix e t f m, MonadIO m) => a -> Repl e t f m () quit _ = liftIO exitSuccess
89
quit :: (MonadNix e t f m, MonadIO m) => a -> Repl e t f m () quit _ = liftIO exitSuccess
89
quit _ = liftIO exitSuccess
27
false
true
0
8
22
55
27
28
null
null
danpalmer/trac-to-phabricator
src/Trac.hs
bsd-3-clause
singletonD :: a -> [a] -> [a] singletonD = (:)
46
singletonD :: a -> [a] -> [a] singletonD = (:)
46
singletonD = (:)
16
false
true
0
9
9
34
17
17
null
null
shlevy/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
noFreeVarsOfCo (SubCo co) = noFreeVarsOfCo co
57
noFreeVarsOfCo (SubCo co) = noFreeVarsOfCo co
57
noFreeVarsOfCo (SubCo co) = noFreeVarsOfCo co
57
false
false
0
6
17
19
8
11
null
null
kenta2/matrix
test/Examples.hs
bsd-3-clause
main :: IO () main = sequence_ [ testEquality "matrix" ( matrix 4 4 $ \(i,j) -> 2*i - j , fromList 4 4 [ 1 , 0 , -1 , -2 , 3 , 2 , 1 , 0 , 5 , 4 , 3 , 2 , 7 , 6 , 5 , 4 ] ) , testEquality "fromList" ( fromList 3 3 [1..] , fromList 3 3 ...
2,597
main :: IO () main = sequence_ [ testEquality "matrix" ( matrix 4 4 $ \(i,j) -> 2*i - j , fromList 4 4 [ 1 , 0 , -1 , -2 , 3 , 2 , 1 , 0 , 5 , 4 , 3 , 2 , 7 , 6 , 5 , 4 ] ) , testEquality "fromList" ( fromList 3 3 [1..] , fromList 3 3 ...
2,597
main = sequence_ [ testEquality "matrix" ( matrix 4 4 $ \(i,j) -> 2*i - j , fromList 4 4 [ 1 , 0 , -1 , -2 , 3 , 2 , 1 , 0 , 5 , 4 , 3 , 2 , 7 , 6 , 5 , 4 ] ) , testEquality "fromList" ( fromList 3 3 [1..] , fromList 3 3 [ 1 , 2...
2,583
false
true
0
12
1,079
1,298
750
548
null
null
tfausak/wuss
source/library/Wuss.hs
mit
runSecureClientWith :: Socket.HostName -- ^ Host -> Socket.PortNumber -- ^ Port -> String.String -- ^ Path -> WebSockets.ConnectionOptions -- ^ Options -> WebSockets.Headers -- ^ Headers -> WebSockets.ClientApp a -- ^ Application -> IO.IO a runSecureClientWith host port path options headers app = do let...
462
runSecureClientWith :: Socket.HostName -- ^ Host -> Socket.PortNumber -- ^ Port -> String.String -- ^ Path -> WebSockets.ConnectionOptions -- ^ Options -> WebSockets.Headers -- ^ Headers -> WebSockets.ClientApp a -- ^ Application -> IO.IO a runSecureClientWith host port path options headers app = do let...
462
runSecureClientWith host port path options headers app = do let config = defaultConfig runSecureClientWithConfig host port path config options headers app -- | Configures a secure WebSocket connection.
207
false
true
0
13
82
107
53
54
null
null
notae/haskell-exercise
cp/SBVTest2.hs
bsd-3-clause
varSList :: forall l v. (SatVar v, KnownNat l) => Symbolic v -> Symbolic (SizedList l v) varSList v = do let l = fromInteger $ natVal (Proxy :: Proxy l) mkSList <$> replicateM l v
199
varSList :: forall l v. (SatVar v, KnownNat l) => Symbolic v -> Symbolic (SizedList l v) varSList v = do let l = fromInteger $ natVal (Proxy :: Proxy l) mkSList <$> replicateM l v
199
varSList v = do let l = fromInteger $ natVal (Proxy :: Proxy l) mkSList <$> replicateM l v
98
false
true
0
13
55
90
44
46
null
null
jwoudenberg/elm-editor-tools
src/ElmTools/ParseModule.hs
bsd-3-clause
inBraces :: DefParser a -> DefParser a inBraces parser = char '(' *> whitespace *> parser <* whitespace <* char ')'
115
inBraces :: DefParser a -> DefParser a inBraces parser = char '(' *> whitespace *> parser <* whitespace <* char ')'
115
inBraces parser = char '(' *> whitespace *> parser <* whitespace <* char ')'
76
false
true
0
9
20
46
21
25
null
null
szehk/Haskell-Carbonara-Library
src/Data/Carbonara/Char.hs
bsd-3-clause
isNotAscii :: Char -> Bool isNotAscii = not . isAscii
53
isNotAscii :: Char -> Bool isNotAscii = not . isAscii
53
isNotAscii = not . isAscii
26
false
true
0
5
9
19
10
9
null
null
uuhan/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
processUsage :: Archive -> Idris () processUsage ar = do ns <- getEntry [] "ibc_usage" ar updateIState (\i -> i { idris_erasureUsed = ns ++ idris_erasureUsed i })
170
processUsage :: Archive -> Idris () processUsage ar = do ns <- getEntry [] "ibc_usage" ar updateIState (\i -> i { idris_erasureUsed = ns ++ idris_erasureUsed i })
170
processUsage ar = do ns <- getEntry [] "ibc_usage" ar updateIState (\i -> i { idris_erasureUsed = ns ++ idris_erasureUsed i })
134
false
true
0
14
35
73
34
39
null
null
ekmett/bitwise
src/Data/Array/BitArray/IO.hs
bsd-3-clause
unsafeGetElems :: Ix i => IOBitArray i -> IO [Bool] unsafeGetElems a' = do bs <- getBounds a' let r = rangeSize bs count = (r + 7) `shiftR` 3 p <- withForeignPtr (iobData a') $ return bytes <- interleavedMapMThenTouch a' (peekByteOff p) [0 .. count - 1] return . take r . concatMap Bitwise.toListLE $ (by...
384
unsafeGetElems :: Ix i => IOBitArray i -> IO [Bool] unsafeGetElems a' = do bs <- getBounds a' let r = rangeSize bs count = (r + 7) `shiftR` 3 p <- withForeignPtr (iobData a') $ return bytes <- interleavedMapMThenTouch a' (peekByteOff p) [0 .. count - 1] return . take r . concatMap Bitwise.toListLE $ (by...
384
unsafeGetElems a' = do bs <- getBounds a' let r = rangeSize bs count = (r + 7) `shiftR` 3 p <- withForeignPtr (iobData a') $ return bytes <- interleavedMapMThenTouch a' (peekByteOff p) [0 .. count - 1] return . take r . concatMap Bitwise.toListLE $ (bytes :: [Word8]) -- | Get a list of all (index, elem...
332
false
true
0
12
86
161
78
83
null
null
mvr/abyme
haskell-model/src/Abyme/Regiony/Universe/Generate.hs
bsd-3-clause
growRandomChild :: Universe -> Gen Universe growRandomChild u = do r <- randomRegion u let cs = potentialNewChildren u r if null cs then return u else do location <- elements cs return $ growChild u location
227
growRandomChild :: Universe -> Gen Universe growRandomChild u = do r <- randomRegion u let cs = potentialNewChildren u r if null cs then return u else do location <- elements cs return $ growChild u location
227
growRandomChild u = do r <- randomRegion u let cs = potentialNewChildren u r if null cs then return u else do location <- elements cs return $ growChild u location
183
false
true
0
11
56
84
37
47
null
null
sgillespie/ghc
compiler/utils/Outputable.hs
bsd-3-clause
-- Print without qualifiers to reduce verbosity, unless -dppr-debug defaultDumpStyle | opt_PprStyle_Debug = PprDebug | otherwise = PprDump neverQualify
180
defaultDumpStyle | opt_PprStyle_Debug = PprDebug | otherwise = PprDump neverQualify
111
defaultDumpStyle | opt_PprStyle_Debug = PprDebug | otherwise = PprDump neverQualify
111
true
false
0
7
47
25
11
14
null
null
vinnymac/glot-www
Model/Language.hs
mit
languageRunCmdExample Ruby = "ruby main.rb"
43
languageRunCmdExample Ruby = "ruby main.rb"
43
languageRunCmdExample Ruby = "ruby main.rb"
43
false
false
0
5
4
9
4
5
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M06/D14/Exercise.hs
mit
-- hint: rungeKutta43Adapt uses rungeKutta43, and these functions also use -- the Julia built-in functions norm and min as well as arithmetic operators -- so the types can be (eventually) inferred. -- -- -- -- -- -- -- -- -- Problem 2. -- You have the definitions of the functions in Julia (from the referenced -- t...
659
f :: Floating a => a -> a -> a f x y = 3 * exp (-x) - 0.4 * y
61
f x y = 3 * exp (-x) - 0.4 * y
30
true
true
1
9
134
70
38
32
null
null
HairyDude/heal
EveApi/Types.hs
bsd-2-clause
officeSlot OfficeSlot2 = Just 2
32
officeSlot OfficeSlot2 = Just 2
32
officeSlot OfficeSlot2 = Just 2
32
false
false
1
5
5
16
5
11
null
null