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
shayan-najd/HsParser
OutputableInstances.hs
gpl-3.0
ppr_expr (HsSpliceE s) = pprSplice s
44
ppr_expr (HsSpliceE s) = pprSplice s
44
ppr_expr (HsSpliceE s) = pprSplice s
44
false
false
0
6
13
19
8
11
null
null
jwiegley/ghc-release
utils/hsc2hs/CrossCodegen.hs
gpl-3.0
testFail :: SourcePos -> String -> TestMonad a testFail (SourcePos file line) s = testFail' (file ++ ":" ++ show line ++ " " ++ s)
130
testFail :: SourcePos -> String -> TestMonad a testFail (SourcePos file line) s = testFail' (file ++ ":" ++ show line ++ " " ++ s)
130
testFail (SourcePos file line) s = testFail' (file ++ ":" ++ show line ++ " " ++ s)
83
false
true
0
10
25
64
30
34
null
null
schell/odin
odin-engine/src/Odin/Engine.hs
mit
getMousePosition :: Mutate Ui m => m (V2 Int) getMousePosition = uiMousePos <$> get
83
getMousePosition :: Mutate Ui m => m (V2 Int) getMousePosition = uiMousePos <$> get
83
getMousePosition = uiMousePos <$> get
37
false
true
0
9
13
39
17
22
null
null
DavidEichmann/boger-banana
src/Reactive/Banana/BOGRE.hs
bsd-3-clause
-- |Gets a 'Behavior' or random values. This can be called multiple times to get multiple different random 'Behavior's: -- -- @ -- r1B <- getRandomB -- r2B <- getRandomB -- @ -- -- In this case @r1B@ and @r2B@ will be 2 separately generated randome values. -- Note that values will be generated according to how 'a' is d...
461
getRandomB :: (Frameworks t, Random a) => Moment t (Behavior t a) getRandomB = fromPoll randomIO
96
getRandomB = fromPoll randomIO
30
true
true
0
9
82
57
31
26
null
null
tokiwoousaka/ttask
src/Data/TTask/Types/Part.hs
bsd-3-clause
statusToList' :: TStatus -> [TStatusRecord] statusToList' (TStatusOne x) = [x]
78
statusToList' :: TStatus -> [TStatusRecord] statusToList' (TStatusOne x) = [x]
78
statusToList' (TStatusOne x) = [x]
34
false
true
0
6
9
34
17
17
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Elements/Interactive.hs
bsd-3-clause
-- | A short-hand notion for @ el \"details\" ... @ detailsN ∷ forall t m a. DomBuilder t m ⇒ m a → m a detailsN children = snd <$> detailsN' children
150
detailsN ∷ forall t m a. DomBuilder t m ⇒ m a → m a detailsN children = snd <$> detailsN' children
98
detailsN children = snd <$> detailsN' children
46
true
true
0
8
32
48
24
24
null
null
Dridus/embot
src/Embot/Slack.hs
bsd-3-clause
asChannelID :: ID Chat -> Maybe (ID Channel) asChannelID = asTypedID
68
asChannelID :: ID Chat -> Maybe (ID Channel) asChannelID = asTypedID
68
asChannelID = asTypedID
23
false
true
0
8
10
27
13
14
null
null
flyrry/phonypony
src/StupidBot/Goal.hs
mit
amWinning :: State -> Bool amWinning s = let enemies = getEnemies s me = stateHero s in 2 * (heroMineCount me) > (maximum $ map heroMineCount enemies)
165
amWinning :: State -> Bool amWinning s = let enemies = getEnemies s me = stateHero s in 2 * (heroMineCount me) > (maximum $ map heroMineCount enemies)
165
amWinning s = let enemies = getEnemies s me = stateHero s in 2 * (heroMineCount me) > (maximum $ map heroMineCount enemies)
138
false
true
1
9
42
73
33
40
null
null
rueshyna/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/SetManagement.hs
mpl-2.0
-- | OAuth access token. pzcnpsmAccessToken :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text) pzcnpsmAccessToken = lens _pzcnpsmAccessToken (\ s a -> s{_pzcnpsmAccessToken = a})
201
pzcnpsmAccessToken :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text) pzcnpsmAccessToken = lens _pzcnpsmAccessToken (\ s a -> s{_pzcnpsmAccessToken = a})
176
pzcnpsmAccessToken = lens _pzcnpsmAccessToken (\ s a -> s{_pzcnpsmAccessToken = a})
91
true
true
1
9
29
52
25
27
null
null
Dronte/Operads
examples/example.hs
bsd-3-clause
gbn2 = stepInitialOperadicBuchberger 4 gb1 gbn1
47
gbn2 = stepInitialOperadicBuchberger 4 gb1 gbn1
47
gbn2 = stepInitialOperadicBuchberger 4 gb1 gbn1
47
false
false
0
5
5
13
6
7
null
null
nikivazou/verified_string_matching
src/Proofs/DistributeToSM.hs
bsd-3-clause
mergeNewIndices :: RString -> RString -> RString -> Proof {-@ mergeNewIndices :: tg:RString -> x1:RStringNE -> x2:RStringNE -> {append (makeSMIndices x1 tg) (makeNewIndices x1 x2 tg) == makeIndices (x1 <+> x2) tg 0 (stringLen x1 - 1)} @-} mergeNewIndices tg x1 x2 | stringLen tg < 2 = makeSMIndices x1 tg ...
1,734
mergeNewIndices :: RString -> RString -> RString -> Proof mergeNewIndices tg x1 x2 | stringLen tg < 2 = makeSMIndices x1 tg `append` makeNewIndices x1 x2 tg ==. makeIndices x1 tg 0 hi `append` makeNewIndices x1 x2 tg ==. makeIndices x1 tg 0 hi `append` N ==. makeIndices x1 tg 0 hi ?...
1,550
mergeNewIndices tg x1 x2 | stringLen tg < 2 = makeSMIndices x1 tg `append` makeNewIndices x1 x2 tg ==. makeIndices x1 tg 0 hi `append` makeNewIndices x1 x2 tg ==. makeIndices x1 tg 0 hi `append` N ==. makeIndices x1 tg 0 hi ? appendNil (makeIndices x1 tg 0 hi) ==. makeIndices x tg...
1,492
true
true
21
12
475
498
248
250
null
null
tcrayford/hitcask
Database/Hitcask/Get.hs
bsd-3-clause
get :: Hitcask -> Key -> IO (Maybe Value) get h key = liftM removeDeletion $ readValue h key
92
get :: Hitcask -> Key -> IO (Maybe Value) get h key = liftM removeDeletion $ readValue h key
92
get h key = liftM removeDeletion $ readValue h key
50
false
true
0
9
18
49
22
27
null
null
wavewave/lhc-analysis-collection
exe/2013-07-22-SimplifiedSUSYlep.hs
gpl-3.0
p_squark :: DDecay p_squark = d ( squarkL, [ p_chargino, t jets ] )
68
p_squark :: DDecay p_squark = d ( squarkL, [ p_chargino, t jets ] )
67
p_squark = d ( squarkL, [ p_chargino, t jets ] )
48
false
true
0
8
14
29
16
13
null
null
wiggly/functional-pokering
src/ParallelMain.hs
mit
calcEquity :: Int -> Int -> [Card] -> [HoleCards] -> [ShowdownTally] calcEquity min max deck hands = let usedCards = foldr (\(HoleCards x y) acc -> x:y:acc ) [] hands deckx = standardDeck \\ usedCards generator = generateBoard deck ...
612
calcEquity :: Int -> Int -> [Card] -> [HoleCards] -> [ShowdownTally] calcEquity min max deck hands = let usedCards = foldr (\(HoleCards x y) acc -> x:y:acc ) [] hands deckx = standardDeck \\ usedCards generator = generateBoard deck ...
612
calcEquity min max deck hands = let usedCards = foldr (\(HoleCards x y) acc -> x:y:acc ) [] hands deckx = standardDeck \\ usedCards generator = generateBoard deck boards = [ generator i | i <- [min..max] ] ...
543
false
true
0
13
249
190
95
95
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | Identifies what kind of resource this is. Value: the fixed string -- \"\`content#productStatus\`\" ppKind :: Lens' ProductStatus (Maybe Text) ppKind = lens _ppKind (\ s a -> s{_ppKind = a})
194
ppKind :: Lens' ProductStatus (Maybe Text) ppKind = lens _ppKind (\ s a -> s{_ppKind = a})
90
ppKind = lens _ppKind (\ s a -> s{_ppKind = a})
47
true
true
0
9
31
47
26
21
null
null
Mr-Click/PFQ
Development/SimpleBuilder.hs
gpl-2.0
-- Predefined commands cabalConfigure = BareCmd "runhaskell Setup configure --user"
84
cabalConfigure = BareCmd "runhaskell Setup configure --user"
60
cabalConfigure = BareCmd "runhaskell Setup configure --user"
60
true
false
1
5
10
13
5
8
null
null
caperren/Archives
OSU Coursework/CS 381 - Programming Language Fundamentals/Homework 4/StackRank.perrenc.hs
gpl-3.0
cmd Swap (n:k:s) = Just (k:n:s)
35
cmd Swap (n:k:s) = Just (k:n:s)
35
cmd Swap (n:k:s) = Just (k:n:s)
35
false
false
0
8
9
38
18
20
null
null
olorin/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/Types/Product.hs
mpl-2.0
-- | Undocumented member. pmProperties :: Lens' PerformanceMetrics (HashMap Text Text) pmProperties = lens _pmProperties (\ s a -> s{_pmProperties = a}) . _Default . _Map
170
pmProperties :: Lens' PerformanceMetrics (HashMap Text Text) pmProperties = lens _pmProperties (\ s a -> s{_pmProperties = a}) . _Default . _Map
144
pmProperties = lens _pmProperties (\ s a -> s{_pmProperties = a}) . _Default . _Map
83
true
true
0
11
25
56
30
26
null
null
franckrasolo/pepino
core/src/Pepino/Renderers/Ansi.hs
bsd-3-clause
asDocs :: (Pretty a) => [a] -> Doc asDocs xs = vsep (map pretty xs) <> linebreak
80
asDocs :: (Pretty a) => [a] -> Doc asDocs xs = vsep (map pretty xs) <> linebreak
80
asDocs xs = vsep (map pretty xs) <> linebreak
45
false
true
0
8
16
45
23
22
null
null
iblumenfeld/saw-core
src/Verifier/SAW/Simulator/Value.hs
bsd-3-clause
apply :: Monad m => Value m b w e -> Thunk m b w e -> m (Value m b w e) apply (VFun f) x = f x
94
apply :: Monad m => Value m b w e -> Thunk m b w e -> m (Value m b w e) apply (VFun f) x = f x
94
apply (VFun f) x = f x
22
false
true
0
10
29
73
34
39
null
null
crzysdrs/griddle
src/Steam/BinVDF.hs
gpl-2.0
jsonVDF _ = error "JSONVDF Type Should Not Be Emitted"
54
jsonVDF _ = error "JSONVDF Type Should Not Be Emitted"
54
jsonVDF _ = error "JSONVDF Type Should Not Be Emitted"
54
false
false
0
5
9
12
5
7
null
null
shlevy/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
mapLitValue _ f (LitInteger i t) = mkLitInteger (f i) t
60
mapLitValue _ f (LitInteger i t) = mkLitInteger (f i) t
60
mapLitValue _ f (LitInteger i t) = mkLitInteger (f i) t
60
false
false
1
7
15
34
15
19
null
null
kawu/dawg
src/Data/DAWG/Static.hs
bsd-2-clause
freeze :: D.DAWG a b -> DAWG a () b freeze d = flip DAWG 0 . V.fromList $ map (N.fromDyn newID . oldBy) (M.elems (inverse old2new)) where -- Map from old to new identifiers. The root identifier is mapped to 0. old2new = M.fromList $ (D.root d, 0) : zip (nodeIDs d) [1..] newID = (M.!) old2ne...
560
freeze :: D.DAWG a b -> DAWG a () b freeze d = flip DAWG 0 . V.fromList $ map (N.fromDyn newID . oldBy) (M.elems (inverse old2new)) where -- Map from old to new identifiers. The root identifier is mapped to 0. old2new = M.fromList $ (D.root d, 0) : zip (nodeIDs d) [1..] newID = (M.!) old2ne...
560
freeze d = flip DAWG 0 . V.fromList $ map (N.fromDyn newID . oldBy) (M.elems (inverse old2new)) where -- Map from old to new identifiers. The root identifier is mapped to 0. old2new = M.fromList $ (D.root d, 0) : zip (nodeIDs d) [1..] newID = (M.!) old2new -- List of node IDs without th...
524
false
true
0
12
155
204
103
101
null
null
uduki/hsQt
Qtc/Enums/Gui/QAbstractItemView.hs
bsd-2-clause
eMovePageUp :: CursorAction eMovePageUp = ieCursorAction $ 6
62
eMovePageUp :: CursorAction eMovePageUp = ieCursorAction $ 6
62
eMovePageUp = ieCursorAction $ 6
34
false
true
0
6
9
18
8
10
null
null
snowleopard/alga
src/Algebra/Graph/Labelled.hs
mit
-- | Extract the 'Context' of a subgraph specified by a given predicate. Returns -- @Nothing@ if the specified subgraph is empty. -- -- @ -- context ('const' False) x == Nothing -- context (== 1) ('edge' e 1 2) == if e == 'zero' then Just ('Context' [] []) else Just ('Context' [ ] [(...
928
context :: (Eq e, Monoid e) => (a -> Bool) -> Graph e a -> Maybe (Context e a) context p g | ok f = Just $ Context (Exts.toList $ is f) (Exts.toList $ os f) | otherwise = Nothing where f = focus p g
221
context p g | ok f = Just $ Context (Exts.toList $ is f) (Exts.toList $ os f) | otherwise = Nothing where f = focus p g
142
true
true
2
11
263
143
71
72
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_ALPHA32F_ARB :: GLenum gl_ALPHA32F_ARB = 0x8816
50
gl_ALPHA32F_ARB :: GLenum gl_ALPHA32F_ARB = 0x8816
50
gl_ALPHA32F_ARB = 0x8816
24
false
true
0
4
5
11
6
5
null
null
spacekitteh/compdata
src/Data/Comp/Derive/Utils.hs
bsd-3-clause
{-| This function abstracts away @newtype@ declaration, it turns them into @data@ declarations. -} abstractNewtype :: Info -> Info abstractNewtype (TyConI (NewtypeD cxt name args constr derive)) = TyConI (DataD cxt name args [constr] derive)
249
abstractNewtype :: Info -> Info abstractNewtype (TyConI (NewtypeD cxt name args constr derive)) = TyConI (DataD cxt name args [constr] derive)
146
abstractNewtype (TyConI (NewtypeD cxt name args constr derive)) = TyConI (DataD cxt name args [constr] derive)
114
true
true
0
8
42
63
31
32
null
null
ihc/futhark
src/Futhark/Representation/Primitive.hs
isc
primByteSize (FloatType t) = floatByteSize t
44
primByteSize (FloatType t) = floatByteSize t
44
primByteSize (FloatType t) = floatByteSize t
44
false
false
0
7
5
18
8
10
null
null
Enzo-Liu/cis194
src/TypeClass04.hs
bsd-3-clause
joinList xs (y:ys) = y ++ xs ++ joinList xs ys
46
joinList xs (y:ys) = y ++ xs ++ joinList xs ys
46
joinList xs (y:ys) = y ++ xs ++ joinList xs ys
46
false
false
2
6
10
34
15
19
null
null
MauriceIsAG/HaskellScratch
.stack-work/intero/intero12244UuP.hs
bsd-3-clause
repli :: [a] -> Int -> [a] repli [] _ = []
42
repli :: [a] -> Int -> [a] repli [] _ = []
42
repli [] _ = []
15
false
true
0
9
11
40
19
21
null
null
yannxia-self/code-war-hasekell-training
Reverse_list_recursively.hs
gpl-3.0
revR :: [Int] -> [Int] revR [] = []
35
revR :: [Int] -> [Int] revR [] = []
35
revR [] = []
12
false
true
0
8
8
34
16
18
null
null
noteed/rescoyl-checks
bin/rescoyl-checks.hs
bsd-3-clause
step r (ImageLayerPushed [i]) = Just -- TODO The official registry accepts re-pushing the json. --( checkPushImageJson 200 "Push correct image json." r i ( checkPushImageChecksum 200 "Push correct image checksum." r i , ImagesPushed )
242
step r (ImageLayerPushed [i]) = Just -- TODO The official registry accepts re-pushing the json. --( checkPushImageJson 200 "Push correct image json." r i ( checkPushImageChecksum 200 "Push correct image checksum." r i , ImagesPushed )
242
step r (ImageLayerPushed [i]) = Just -- TODO The official registry accepts re-pushing the json. --( checkPushImageJson 200 "Push correct image json." r i ( checkPushImageChecksum 200 "Push correct image checksum." r i , ImagesPushed )
242
false
false
0
8
43
40
21
19
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/LT_5.hs
mit
primCmpInt (Neg Zero) (Neg Zero) = EQ
37
primCmpInt (Neg Zero) (Neg Zero) = EQ
37
primCmpInt (Neg Zero) (Neg Zero) = EQ
37
false
false
0
6
6
25
11
14
null
null
PIWEEK/halisp
src/Core.hs
gpl-3.0
strDelim = char '"'
19
strDelim = char '"'
19
strDelim = char '"'
19
false
false
1
5
3
13
4
9
null
null
olsner/ghc
libraries/base/Data/Functor/Classes.hs
bsd-3-clause
-- | @'readData' p@ is a parser for datatypes where each alternative -- begins with a data constructor. It parses the constructor and -- passes it to @p@. Parsers for various constructors can be constructed -- with 'readUnaryWith' and 'readBinaryWith', and combined with -- '(<|>)' from the 'Alternative' class. -- -- ...
414
readData :: ReadPrec a -> ReadPrec a readData reader = parens $ prec 10 reader
78
readData reader = parens $ prec 10 reader
41
true
true
0
6
69
40
22
18
null
null
drhodes/jade2hdl
src/Jade/TopLevel.hs
bsd-3-clause
terminalsOverlapP (Terminal (Coord3 x1 y1 _) _) (Terminal (Coord3 x2 y2 _) _) = (x1,y1) == (x2,y2)
101
terminalsOverlapP (Terminal (Coord3 x1 y1 _) _) (Terminal (Coord3 x2 y2 _) _) = (x1,y1) == (x2,y2)
101
terminalsOverlapP (Terminal (Coord3 x1 y1 _) _) (Terminal (Coord3 x2 y2 _) _) = (x1,y1) == (x2,y2)
101
false
false
1
9
19
67
33
34
null
null
tonymorris/java-character
src/Language/Java/Character/IsSpaceChar.hs
bsd-3-clause
isSpaceCharSet :: (Num a, Enum a, Ord a) => Diet a isSpaceCharSet = let r = [ [32] , [160] , [5760] , [6158] , [8192..8203] , [8232..8233] , [8239] , [8287] , [12288] ] in S.fromList . concat $ r
305
isSpaceCharSet :: (Num a, Enum a, Ord a) => Diet a isSpaceCharSet = let r = [ [32] , [160] , [5760] , [6158] , [8192..8203] , [8232..8233] , [8239] , [8287] , [12288] ] in S.fromList . concat $ r
305
isSpaceCharSet = let r = [ [32] , [160] , [5760] , [6158] , [8192..8203] , [8232..8233] , [8239] , [8287] , [12288] ] in S.fromList . concat $ r
250
false
true
0
10
150
114
66
48
null
null
frelindb/agsyHOL
Check.hs
mit
checkProof :: Int -> Context -> CFormula -> MetaProof -> MetaEnv MPB -- the searchdepth is here only used to limit the number of beta-reductions checkProof searchdepth = checkProofI where checkProofI ctx form prf = getFormHead form $ gheadm (True, prioProof, Nothing) (prCtx ctx >>= \pc -> prCFormula (length ctx...
17,876
checkProof :: Int -> Context -> CFormula -> MetaProof -> MetaEnv MPB checkProof searchdepth = checkProofI where checkProofI ctx form prf = getFormHead form $ gheadm (True, prioProof, Nothing) (prCtx ctx >>= \pc -> prCFormula (length ctx) form >>= \pf -> return ("checkProof : " ++ pc ++ " : " ++ pf)) prf $ \prf ->...
17,798
checkProof searchdepth = checkProofI where checkProofI ctx form prf = getFormHead form $ gheadm (True, prioProof, Nothing) (prCtx ctx >>= \pc -> prCFormula (length ctx) form >>= \pf -> return ("checkProof : " ++ pc ++ " : " ++ pf)) prf $ \prf -> case prf of Intro prf -> cheadp (prioDecompFormUnknown, Just ...
17,729
true
true
14
33
4,673
7,521
3,731
3,790
null
null
sjfloat/dnngraph
NN/Backend/Torch/Codegen.hs
bsd-3-clause
insertContainer :: Name -> Exp -> [Flat Exp] -> Torch Name insertContainer prefix containerModule exps' = do name' <- fresh prefix statements <>+ assign name' containerModule forM_ exps' $ \exp' -> do innerName' <- insert exp' statements <>+ methCall name' "add" [var' innerName'] return name'
309
insertContainer :: Name -> Exp -> [Flat Exp] -> Torch Name insertContainer prefix containerModule exps' = do name' <- fresh prefix statements <>+ assign name' containerModule forM_ exps' $ \exp' -> do innerName' <- insert exp' statements <>+ methCall name' "add" [var' innerName'] return name'
309
insertContainer prefix containerModule exps' = do name' <- fresh prefix statements <>+ assign name' containerModule forM_ exps' $ \exp' -> do innerName' <- insert exp' statements <>+ methCall name' "add" [var' innerName'] return name'
250
false
true
0
15
60
117
51
66
null
null
rodrigo-machado/verigraph
src/library/Data/TypedGraph/Morphism.hs
gpl-3.0
-- | Given a TypedGraphMorphism @/__t__: G1 -> G2/@ and an edgeId @__e__@ in @G1@, it returns the edgeId in @G2@ to which @__e__@ gets mapped applyEdgeId :: TypedGraphMorphism a b -> EdgeId -> Maybe EdgeId applyEdgeId tgm = GM.applyEdgeId (mapping tgm)
252
applyEdgeId :: TypedGraphMorphism a b -> EdgeId -> Maybe EdgeId applyEdgeId tgm = GM.applyEdgeId (mapping tgm)
110
applyEdgeId tgm = GM.applyEdgeId (mapping tgm)
46
true
true
0
7
41
42
20
22
null
null
alanz/Blobs
lib/DData/Set.hs
lgpl-2.1
showSet (x:xs) = showChar '{' . shows x . showTail xs where showTail [] = showChar '}' showTail (x:xs) = showChar ',' . shows x . showTail xs {-------------------------------------------------------------------- Utility functions that return sub-ranges of the original tree. Some functions tak...
1,416
showSet (x:xs) = showChar '{' . shows x . showTail xs where showTail [] = showChar '}' showTail (x:xs) = showChar ',' . shows x . showTail xs {-------------------------------------------------------------------- Utility functions that return sub-ranges of the original tree. Some functions tak...
1,416
showSet (x:xs) = showChar '{' . shows x . showTail xs where showTail [] = showChar '}' showTail (x:xs) = showChar ',' . shows x . showTail xs {-------------------------------------------------------------------- Utility functions that return sub-ranges of the original tree. Some functions tak...
1,416
false
false
0
7
343
83
39
44
null
null
vTurbine/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlHsOpApp :: LHsExpr id -> id -> LHsExpr id -> LHsExpr id nlHsOpApp e1 op e2 = noLoc (mkHsOpApp e1 op e2)
105
nlHsOpApp :: LHsExpr id -> id -> LHsExpr id -> LHsExpr id nlHsOpApp e1 op e2 = noLoc (mkHsOpApp e1 op e2)
105
nlHsOpApp e1 op e2 = noLoc (mkHsOpApp e1 op e2)
47
false
true
0
8
21
52
24
28
null
null
da-x/lamdu
test/InferCombinators.hs
gpl-3.0
getField :: ExprWithResumptions -> T.Tag -> ExprWithResumptions getField recordVal tag = mkExprWithResumptions (V.BGetField (V.GetField recordVal tag)) (findTypeOfField tag <$> exprTypeStream recordVal)
214
getField :: ExprWithResumptions -> T.Tag -> ExprWithResumptions getField recordVal tag = mkExprWithResumptions (V.BGetField (V.GetField recordVal tag)) (findTypeOfField tag <$> exprTypeStream recordVal)
214
getField recordVal tag = mkExprWithResumptions (V.BGetField (V.GetField recordVal tag)) (findTypeOfField tag <$> exprTypeStream recordVal)
150
false
true
0
9
32
63
30
33
null
null
ayron/AoC
2016/Day 8/solution.hs
gpl-3.0
-- Function below are to help debug, but not needed print_array :: Screen -> IO () print_array a = putStrLn $ unlines $ chunksOf width $ map show' $ elems a where width = 1 + (snd $ snd $ bounds a)
199
print_array :: Screen -> IO () print_array a = putStrLn $ unlines $ chunksOf width $ map show' $ elems a where width = 1 + (snd $ snd $ bounds a)
147
print_array a = putStrLn $ unlines $ chunksOf width $ map show' $ elems a where width = 1 + (snd $ snd $ bounds a)
116
true
true
0
8
43
75
36
39
null
null
Thell/pandoc
src/Text/Pandoc/Writers/Markdown.hs
gpl-2.0
avoidBadWrapsInList (Space:Str [c]:Space:xs) | c `elem` ['-','*','+'] = Str [' ', c] : Space : avoidBadWrapsInList xs
119
avoidBadWrapsInList (Space:Str [c]:Space:xs) | c `elem` ['-','*','+'] = Str [' ', c] : Space : avoidBadWrapsInList xs
119
avoidBadWrapsInList (Space:Str [c]:Space:xs) | c `elem` ['-','*','+'] = Str [' ', c] : Space : avoidBadWrapsInList xs
119
false
false
0
10
18
71
37
34
null
null
LeviSchuck/cosmic
src/Cosmic/Dust/Value.hs
mit
-- | Describes the constructor given. -- Most of the primitive constructors take just one value. -- -- > expectedPrim = constByPrim PWord64 -- -- Although unlikely, the way to get around 'PUnit' not taking -- any values is to encode it as a function taking a parameter. -- -- > expectedPrim = constByPrim $ \_ -> PUnit...
429
constByPrim :: (a -> PrimitiveParticle) -> Const Constr b constByPrim f = Const . toConstr $ f undefined
104
constByPrim f = Const . toConstr $ f undefined
46
true
true
0
7
79
51
30
21
null
null
zachsully/hakaru
haskell/Language/Hakaru/Pretty/Concrete.hs
bsd-3-clause
ppPrimOp p Diff (e1 :* e2 :* End) = ppApply2 p "diff" e1 e2
67
ppPrimOp p Diff (e1 :* e2 :* End) = ppApply2 p "diff" e1 e2
67
ppPrimOp p Diff (e1 :* e2 :* End) = ppApply2 p "diff" e1 e2
67
false
false
0
8
21
36
16
20
null
null
banacorn/formal-language
haskell-legacy/test.hs
mit
propNFA2DFA :: Property propNFA2DFA = do states <- stateTestLimit genStates alphabets <- alphabetTestLimit genAlphabets nfa <- genNFA states alphabets forAll (genLanguage alphabets) (\language -> let dfa = nfa2dfa nfa prop = automatonN nfa language == automat...
448
propNFA2DFA :: Property propNFA2DFA = do states <- stateTestLimit genStates alphabets <- alphabetTestLimit genAlphabets nfa <- genNFA states alphabets forAll (genLanguage alphabets) (\language -> let dfa = nfa2dfa nfa prop = automatonN nfa language == automat...
448
propNFA2DFA = do states <- stateTestLimit genStates alphabets <- alphabetTestLimit genAlphabets nfa <- genNFA states alphabets forAll (genLanguage alphabets) (\language -> let dfa = nfa2dfa nfa prop = automatonN nfa language == automaton dfa language || autom...
424
false
true
0
17
137
127
58
69
null
null
DavidAlphaFox/bittorrent
src/Network/BitTorrent/Tracker/Message.hs
bsd-3-clause
withError :: ParamParseFailure -> Maybe a -> ParseResult a withError e = maybe (Left e) Right
93
withError :: ParamParseFailure -> Maybe a -> ParseResult a withError e = maybe (Left e) Right
93
withError e = maybe (Left e) Right
34
false
true
0
8
15
44
19
25
null
null
rueshyna/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hs
mpl-2.0
-- | Creates a value of 'ProjectsLogsList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pllParent' -- -- * 'pllXgafv' -- -- * 'pllUploadProtocol' -- -- * 'pllPp' -- -- * 'pllAccessToken' -- -- * 'pllUploadType' -- -- * 'pllBearerTo...
815
projectsLogsList :: Text -- ^ 'pllParent' -> ProjectsLogsList projectsLogsList pPllParent_ = ProjectsLogsList' { _pllParent = pPllParent_ , _pllXgafv = Nothing , _pllUploadProtocol = Nothing , _pllPp = True , _pllAccessToken = Nothing , _pllUploadType = Nothing , _pllBearerToken ...
423
projectsLogsList pPllParent_ = ProjectsLogsList' { _pllParent = pPllParent_ , _pllXgafv = Nothing , _pllUploadProtocol = Nothing , _pllPp = True , _pllAccessToken = Nothing , _pllUploadType = Nothing , _pllBearerToken = Nothing , _pllPageToken = Nothing , _pllPageSize = Nothing ...
353
true
true
0
7
178
113
76
37
null
null
sdynerow/Semirings-Library
haskell/Algebra/Constructs/Semidirect.hs
apache-2.0
direct :: (Semiring s, Semiring t) => Matrix s -> Matrix t -> Matrix (Semidirect s t) direct as bs | (order as) == (order bs) = pointwise as bs zipD | otherwise = error "Incompatibles matrice sizes"
214
direct :: (Semiring s, Semiring t) => Matrix s -> Matrix t -> Matrix (Semidirect s t) direct as bs | (order as) == (order bs) = pointwise as bs zipD | otherwise = error "Incompatibles matrice sizes"
214
direct as bs | (order as) == (order bs) = pointwise as bs zipD | otherwise = error "Incompatibles matrice sizes"
128
false
true
0
11
53
106
47
59
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/OpCodes.hs
bsd-2-clause
opSummaryVal OpInstanceFailover { opInstanceName = s } = Just s
63
opSummaryVal OpInstanceFailover { opInstanceName = s } = Just s
63
opSummaryVal OpInstanceFailover { opInstanceName = s } = Just s
63
false
false
0
8
9
21
10
11
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_TEXTURE_3D_BINDING_EXT :: GLenum gl_TEXTURE_3D_BINDING_EXT = 0x806A
70
gl_TEXTURE_3D_BINDING_EXT :: GLenum gl_TEXTURE_3D_BINDING_EXT = 0x806A
70
gl_TEXTURE_3D_BINDING_EXT = 0x806A
34
false
true
0
4
5
11
6
5
null
null
oldmanmike/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
b_RDR = mkVarUnqual (fsLit "b")
41
b_RDR = mkVarUnqual (fsLit "b")
41
b_RDR = mkVarUnqual (fsLit "b")
41
false
false
0
7
14
15
7
8
null
null
NorfairKing/the-notes
src/Macro/Text.hs
gpl-2.0
quoted :: Note -> Note quoted n = "`" <> n <> "'"
49
quoted :: Note -> Note quoted n = "`" <> n <> "'"
49
quoted n = "`" <> n <> "'"
26
false
true
0
6
12
26
13
13
null
null
mazelife/agilulf
src/Agiluf/Entry.hs
bsd-3-clause
-- | Compare two of entry/meta pairs on their date, descending. compareEntries :: Entry -> Entry -> Ordering compareEntries a b = case (date a) `compare` (date b) of EQ -> EQ GT -> LT LT -> GT
204
compareEntries :: Entry -> Entry -> Ordering compareEntries a b = case (date a) `compare` (date b) of EQ -> EQ GT -> LT LT -> GT
140
compareEntries a b = case (date a) `compare` (date b) of EQ -> EQ GT -> LT LT -> GT
95
true
true
0
8
49
65
34
31
null
null
binarin/learnopengl
src/Camera.hs
bsd-3-clause
camPitch :: Lens' Camera Float camPitch = lens _camPitch $ \c p -> c { _camPitch = clampPitch p }
97
camPitch :: Lens' Camera Float camPitch = lens _camPitch $ \c p -> c { _camPitch = clampPitch p }
97
camPitch = lens _camPitch $ \c p -> c { _camPitch = clampPitch p }
66
false
true
0
9
19
41
21
20
null
null
Cahu/krpc-hs
src/KRPCHS/RemoteTech.hs
gpl-3.0
{- - Whether the vessel has a flight computer on board. -} getCommsHasFlightComputer :: KRPCHS.RemoteTech.Comms -> RPCContext (Bool) getCommsHasFlightComputer thisArg = do let r = makeRequest "RemoteTech" "Comms_get_HasFlightComputer" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
314
getCommsHasFlightComputer :: KRPCHS.RemoteTech.Comms -> RPCContext (Bool) getCommsHasFlightComputer thisArg = do let r = makeRequest "RemoteTech" "Comms_get_HasFlightComputer" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
253
getCommsHasFlightComputer thisArg = do let r = makeRequest "RemoteTech" "Comms_get_HasFlightComputer" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
179
true
true
0
12
50
68
32
36
null
null
akc/gfscript
HOPS/Utils/Parse.hs
bsd-3-clause
parse_ :: Parser t -> ByteString -> Maybe t parse_ f = either (const Nothing) Just . parseOnly f
96
parse_ :: Parser t -> ByteString -> Maybe t parse_ f = either (const Nothing) Just . parseOnly f
96
parse_ f = either (const Nothing) Just . parseOnly f
52
false
true
0
8
18
51
22
29
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
-- marshalling withCSize :: Size -> (CInt -> CInt -> IO a) -> IO a withCSize (Size w h) f = f (toCInt w) (toCInt h)
117
withCSize :: Size -> (CInt -> CInt -> IO a) -> IO a withCSize (Size w h) f = f (toCInt w) (toCInt h)
102
withCSize (Size w h) f = f (toCInt w) (toCInt h)
50
true
true
0
10
27
68
33
35
null
null
coghex/abridgefaraway
src/GLUtil/Font.hs
bsd-3-clause
findLetter BPFONT 'n' = (13, 16)
33
findLetter BPFONT 'n' = (13, 16)
33
findLetter BPFONT 'n' = (13, 16)
33
false
false
0
5
6
19
9
10
null
null
RossMeikleham/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
catchError :: Idris a -> (Err -> Idris a) -> Idris a catchError = liftCatch catchE
82
catchError :: Idris a -> (Err -> Idris a) -> Idris a catchError = liftCatch catchE
82
catchError = liftCatch catchE
29
false
true
0
9
15
38
18
20
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a867 :: IO (); a867 = forever $ putStrLn "a867"
47
a867 :: IO () a867 = forever $ putStrLn "a867"
46
a867 = forever $ putStrLn "a867"
32
false
true
0
6
9
24
12
12
null
null
byorgey/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
declArgs args inl n x = LFun (if inl then [Inline] else []) n args x
68
declArgs args inl n x = LFun (if inl then [Inline] else []) n args x
68
declArgs args inl n x = LFun (if inl then [Inline] else []) n args x
68
false
false
1
8
15
46
21
25
null
null
mrd/camfort
src/Camfort/Specification/Units/Monad.hs
apache-2.0
modifyUnitAliasMap :: (UnitAliasMap -> UnitAliasMap) -> UnitSolver () modifyUnitAliasMap f = modify (\ s -> s { usUnitAliasMap = f (usUnitAliasMap s) })
152
modifyUnitAliasMap :: (UnitAliasMap -> UnitAliasMap) -> UnitSolver () modifyUnitAliasMap f = modify (\ s -> s { usUnitAliasMap = f (usUnitAliasMap s) })
152
modifyUnitAliasMap f = modify (\ s -> s { usUnitAliasMap = f (usUnitAliasMap s) })
82
false
true
0
12
22
58
30
28
null
null
prt2121/haskell-practice
parconc/geturlsfirst.hs
apache-2.0
-- >> -- <<waitAny waitAny :: [Async a] -> IO a waitAny asyncs = atomically $ foldr orElse retry $ map waitSTM asyncs
120
waitAny :: [Async a] -> IO a waitAny asyncs = atomically $ foldr orElse retry $ map waitSTM asyncs
100
waitAny asyncs = atomically $ foldr orElse retry $ map waitSTM asyncs
71
true
true
0
7
25
47
23
24
null
null
paulrzcz/takusen-oracle
Database/Enumerator.hs
bsd-3-clause
|A strict version. This is recommended unless you have a specific need for laziness, -- as the lazy version will gobble stack and heap. -- If you have a large result-set (in the order of 10-100K rows or more), -- it is likely to exhaust the standard 1M GHC stack. -- Whether or not 'result' eats memory depends on w...
576
result' :: (Monad m) => IterAct m a result' x = return (Right $! x)
67
result' x = return (Right $! x)
31
true
true
3
9
116
88
45
43
null
null
erochest/gh-weekly
src/GhWeekly/Network.hs
apache-2.0
getAllUserRepos :: T.Text -> Github [Value] getAllUserRepos user = concat <$> gh ["/users/", user, "/repos"] [("type", "all")]
130
getAllUserRepos :: T.Text -> Github [Value] getAllUserRepos user = concat <$> gh ["/users/", user, "/repos"] [("type", "all")]
130
getAllUserRepos user = concat <$> gh ["/users/", user, "/repos"] [("type", "all")]
86
false
true
0
8
20
53
29
24
null
null
danse/haskell-opaleye
src/Opaleye/Internal/HaskellDB/Sql/Print.hs
bsd-3-clause
ppAs :: Maybe String -> Doc -> Doc ppAs Nothing expr = expr
64
ppAs :: Maybe String -> Doc -> Doc ppAs Nothing expr = expr
64
ppAs Nothing expr = expr
29
false
true
0
6
17
27
13
14
null
null
xicesky/sky-haskell-playground
src/Sky/Learn/Comonads.hs
bsd-3-clause
toString :: Thermostat Celsius -> String toString (t, f) = show (getCelsius (f t)) ++ " Celsius"
96
toString :: Thermostat Celsius -> String toString (t, f) = show (getCelsius (f t)) ++ " Celsius"
96
toString (t, f) = show (getCelsius (f t)) ++ " Celsius"
55
false
true
0
10
16
46
23
23
null
null
siddhanathan/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
genJump (CmmLit lit) regs = do return (unitOL (JMP (OpImm (litToImm lit)) regs))
82
genJump (CmmLit lit) regs = do return (unitOL (JMP (OpImm (litToImm lit)) regs))
82
genJump (CmmLit lit) regs = do return (unitOL (JMP (OpImm (litToImm lit)) regs))
82
false
false
1
16
14
54
23
31
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Resource/Dataproc/Projects/Locations/AutoscalingPolicies/SetIAMPolicy.hs
mpl-2.0
-- | JSONP plapsipCallback :: Lens' ProjectsLocationsAutoscalingPoliciesSetIAMPolicy (Maybe Text) plapsipCallback = lens _plapsipCallback (\ s a -> s{_plapsipCallback = a})
180
plapsipCallback :: Lens' ProjectsLocationsAutoscalingPoliciesSetIAMPolicy (Maybe Text) plapsipCallback = lens _plapsipCallback (\ s a -> s{_plapsipCallback = a})
169
plapsipCallback = lens _plapsipCallback (\ s a -> s{_plapsipCallback = a})
82
true
true
0
9
27
48
25
23
null
null
HaskVan/regex-pcre-gsub
src/Text/Regex/PCRE/ByteString/Gsub.hs
mit
------------------------------------------------------------------------------- gsub :: ByteString -> ByteString -> ByteString -> ByteString gsub text match replacement = replaceMatches 0 matches text where matches = (text =~ match :: [MatchText ByteString]) rl = B8.length replacement replaceMatches _ []...
1,126
gsub :: ByteString -> ByteString -> ByteString -> ByteString gsub text match replacement = replaceMatches 0 matches text where matches = (text =~ match :: [MatchText ByteString]) rl = B8.length replacement replaceMatches _ [] text = text replaceMatches accum (m:ms) text = replaceMatches accum' ms text...
1,045
gsub text match replacement = replaceMatches 0 matches text where matches = (text =~ match :: [MatchText ByteString]) rl = B8.length replacement replaceMatches _ [] text = text replaceMatches accum (m:ms) text = replaceMatches accum' ms text' where (o, l) = snd (m ! 0) (pre, post) = ...
984
true
true
0
12
317
415
214
201
null
null
beni55/texmath
src/Text/TeXMath/Readers/OMML.hs
gpl-2.0
unGroup exps = exps
19
unGroup exps = exps
19
unGroup exps = exps
19
false
false
1
5
3
13
4
9
null
null
bno1/adventofcode_2016
d21/main.hs
mit
puzzleInput1 :: String puzzleInput1 = "abcdefgh"
48
puzzleInput1 :: String puzzleInput1 = "abcdefgh"
48
puzzleInput1 = "abcdefgh"
25
false
true
0
6
5
18
7
11
null
null
kmate/HaRe
old/testing/duplication/RecursionIn1_AstOut.hs
bsd-3-clause
anotherFac 1 = 1
16
anotherFac 1 = 1
16
anotherFac 1 = 1
16
false
false
1
5
3
13
4
9
null
null
adept/hledger
hledger-web/Hledger/Web/Handler/EditR.hs
gpl-3.0
editForm :: FilePath -> Text -> Markup -> MForm Handler (FormResult Text, Widget) editForm f txt = identifyForm "edit" $ \extra -> do (tRes, tView) <- mreq textareaField fs (Just (Textarea txt)) pure (unTextarea <$> tRes, $(widgetFile "edit-form")) where fs = FieldSettings "text" mzero mzero mzero [("cl...
358
editForm :: FilePath -> Text -> Markup -> MForm Handler (FormResult Text, Widget) editForm f txt = identifyForm "edit" $ \extra -> do (tRes, tView) <- mreq textareaField fs (Just (Textarea txt)) pure (unTextarea <$> tRes, $(widgetFile "edit-form")) where fs = FieldSettings "text" mzero mzero mzero [("cl...
358
editForm f txt = identifyForm "edit" $ \extra -> do (tRes, tView) <- mreq textareaField fs (Just (Textarea txt)) pure (unTextarea <$> tRes, $(widgetFile "edit-form")) where fs = FieldSettings "text" mzero mzero mzero [("class", "form-control"), ("rows", "25")]
276
false
true
3
13
65
158
76
82
null
null
pparkkin/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
-- TODO: You may have to cast to int or do some extra stuff here -- or maybe instead reference the direct byte array emitPrimOp DataToTagOp [arg] = return [ getTagMethod arg <> iconst jint 1 <> isub ]
216
emitPrimOp DataToTagOp [arg] = return [ getTagMethod arg <> iconst jint 1 <> isub ]
83
emitPrimOp DataToTagOp [arg] = return [ getTagMethod arg <> iconst jint 1 <> isub ]
83
true
false
0
9
54
38
19
19
null
null
plaprade/haskoin
haskoin-node/src/Network/Haskoin/Node/BlockChain.hs
unlicense
peerHeaderSyncFull :: (MonadLoggerIO m, MonadBaseControl IO m) => PeerId -> PeerHost -> NodeT m () peerHeaderSyncFull pid ph = go Nothing where go prevM = peerHeaderSync pid ph prevM >>= \actionM -> case actionM of Just _ -> go actionM ...
574
peerHeaderSyncFull :: (MonadLoggerIO m, MonadBaseControl IO m) => PeerId -> PeerHost -> NodeT m () peerHeaderSyncFull pid ph = go Nothing where go prevM = peerHeaderSync pid ph prevM >>= \actionM -> case actionM of Just _ -> go actionM ...
574
peerHeaderSyncFull pid ph = go Nothing where go prevM = peerHeaderSync pid ph prevM >>= \actionM -> case actionM of Just _ -> go actionM Nothing -> do (synced, ourHeight) <- syncedHeight when synced $ $(logInfo) $ formatPid pid ph $ unwords [ "Block hea...
418
false
true
7
9
227
138
71
67
null
null
bhamrick/hsmath
Math/Polynomial/Types.hs
bsd-3-clause
constPoly :: (Eq a, Num a) => a -> P a constPoly c = if c == 0 then P [] else P [c]
83
constPoly :: (Eq a, Num a) => a -> P a constPoly c = if c == 0 then P [] else P [c]
83
constPoly c = if c == 0 then P [] else P [c]
44
false
true
0
7
23
59
30
29
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Elements/Elements.hs
bsd-3-clause
-- | A short-hand notion for @ elDynAttr\' \"em\" ... @ emD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Em → m a → m (Element EventResult (DomBuilderSpace m) t, a) emD' bm = elDynAttr' "em" (A.attrMap <$> bm)
226
emD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Em → m a → m (Element EventResult (DomBuilderSpace m) t, a) emD' bm = elDynAttr' "em" (A.attrMap <$> bm)
170
emD' bm = elDynAttr' "em" (A.attrMap <$> bm)
45
true
true
0
14
46
97
49
48
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Elements/Interactive.hs
bsd-3-clause
-- | A short-hand notion for @ elDynAttr\' \"select\" ... @ selectD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Select → m a → m (Element EventResult (DomBuilderSpace m) t, a) selectD' bm = elDynAttr' "select" (A.attrMap <$> bm)
246
selectD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Select → m a → m (Element EventResult (DomBuilderSpace m) t, a) selectD' bm = elDynAttr' "select" (A.attrMap <$> bm)
186
selectD' bm = elDynAttr' "select" (A.attrMap <$> bm)
53
true
true
0
13
46
93
48
45
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | Date on which the shipment has been ready for pickup, in ISO 8601 -- format. Optional and can be provided only if \`status\` is \`ready for -- pickup\`. ousrReadyPickupDate :: Lens' OrdersUpdateShipmentRequest (Maybe Text) ousrReadyPickupDate = lens _ousrReadyPickupDate (\ s a -> s{_ousrReadyPickupDate = a...
322
ousrReadyPickupDate :: Lens' OrdersUpdateShipmentRequest (Maybe Text) ousrReadyPickupDate = lens _ousrReadyPickupDate (\ s a -> s{_ousrReadyPickupDate = a})
164
ousrReadyPickupDate = lens _ousrReadyPickupDate (\ s a -> s{_ousrReadyPickupDate = a})
94
true
true
0
9
54
50
27
23
null
null
michalkonecny/polypaver
src/Numeric/ER/RnToRm/UnitDom/ChebyshevBase/Polynom/Compose.hs
bsd-3-clause
enclCompose :: (B.ERRealBase b, DomainBox box varid Int, Ord box, Show varid, DomainIntBox boxra varid (ERInterval b), DomainBoxMappable boxra boxras varid (ERInterval b) [ERInterval b]) => Int {-^ max degree for result -} -> Int {-^ max approx size for result -} -> ERChebPoly box b {-...
2,850
enclCompose :: (B.ERRealBase b, DomainBox box varid Int, Ord box, Show varid, DomainIntBox boxra varid (ERInterval b), DomainBoxMappable boxra boxras varid (ERInterval b) [ERInterval b]) => Int {-^ max degree for result -} -> Int {-^ max approx size for result -} -> ERChebPoly box b {-...
2,805
enclCompose maxDegree maxSize p@(ERChebPoly coeffs) substVar substEncl = result {------------------------------ The algorithm: separate from the polynomial all terms for each degree of the substituted variable, giving rise to a number of polynomials. These polynomials are then used as coefficients multiplying ...
2,217
true
true
0
12
712
361
196
165
null
null
HIPERFIT/futhark
src/Futhark/CodeGen/ImpGen/GPU/Base.hs
isc
-- | Assign iterations of a for-loop to all threads in the kernel. -- The passed-in function is invoked with the (symbolic) iteration. -- 'threadOperations' will be in effect in the body. For -- multidimensional loops, use 'groupCoverSpace'. kernelLoop :: IntExp t => Imp.TExp t -> Imp.TExp t -> Imp.TExp t -> ...
933
kernelLoop :: IntExp t => Imp.TExp t -> Imp.TExp t -> Imp.TExp t -> (Imp.TExp t -> InKernelGen ()) -> InKernelGen () kernelLoop tid num_threads n f = localOps threadOperations $ if n == num_threads then f tid else do -- Compute how many elements this thread is responsible for. ...
690
kernelLoop tid num_threads n f = localOps threadOperations $ if n == num_threads then f tid else do -- Compute how many elements this thread is responsible for. -- Formula: (n - tid) / num_threads (rounded up). let elems_for_this = (n - tid) `divUp` num_threads sFor "i...
561
true
true
0
14
212
167
84
83
null
null
xnning/fcore
lib/PrettyUtils.hs
bsd-2-clause
biglambda = text "/\\"
22
biglambda = text "/\\"
22
biglambda = text "/\\"
22
false
false
1
5
3
13
4
9
null
null
niteria/haddock
haddock-api/src/Haddock/Convert.hs
bsd-2-clause
synifyTyVar :: TyVar -> LHsTyVarBndr Name synifyTyVar tv | isLiftedTypeKind kind = noLoc (UserTyVar (noLoc name)) | otherwise = noLoc (KindedTyVar (noLoc name) (synifyKindSig kind)) where kind = tyVarKind tv name = getName tv --states of what to do with foralls:
289
synifyTyVar :: TyVar -> LHsTyVarBndr Name synifyTyVar tv | isLiftedTypeKind kind = noLoc (UserTyVar (noLoc name)) | otherwise = noLoc (KindedTyVar (noLoc name) (synifyKindSig kind)) where kind = tyVarKind tv name = getName tv --states of what to do with foralls:
289
synifyTyVar tv | isLiftedTypeKind kind = noLoc (UserTyVar (noLoc name)) | otherwise = noLoc (KindedTyVar (noLoc name) (synifyKindSig kind)) where kind = tyVarKind tv name = getName tv --states of what to do with foralls:
247
false
true
2
10
67
95
45
50
null
null
dawedawe/kripkeweb
src/Conf.hs
bsd-3-clause
-- |Default configuration with proxy example. defaultConf :: String defaultConf = "# proxyname = 127.0.0.1\n" ++ "# proxyport = 8118\n" ++ "# dbhost = localhost\n" ++ "# dbport = 5432\n" ++ "# dbuser = postgres\n" ++ "# dbpassword = \n" ++ "# dbname = postgres"
289
defaultConf :: String defaultConf = "# proxyname = 127.0.0.1\n" ++ "# proxyport = 8118\n" ++ "# dbhost = localhost\n" ++ "# dbport = 5432\n" ++ "# dbuser = postgres\n" ++ "# dbpassword = \n" ++ "# dbname = postgres"
243
defaultConf = "# proxyname = 127.0.0.1\n" ++ "# proxyport = 8118\n" ++ "# dbhost = localhost\n" ++ "# dbport = 5432\n" ++ "# dbuser = postgres\n" ++ "# dbpassword = \n" ++ "# dbname = postgres"
221
true
true
0
10
72
36
19
17
null
null
urbanslug/ghc
testsuite/tests/programs/jules_xref2/Main.hs
bsd-3-clause
dispLine k ns = k ++ ":" ++ dispNos ns ++ "\n"
46
dispLine k ns = k ++ ":" ++ dispNos ns ++ "\n"
46
dispLine k ns = k ++ ":" ++ dispNos ns ++ "\n"
46
false
false
0
7
11
26
12
14
null
null
antarestrader/sapphire
LineParser.hs
gpl-3.0
compareLine :: Offset -> LParser (Maybe (Line,Ordering)) compareLine i = do maybe_l <- getLine case maybe_l of Nothing -> return Nothing Just l@(BlankLine _) -> return $ Just (l,EQ) Just l -> return $ Just (l, compare (offset l) i ) -- Using the next line as the starting point, grab a set of equally i...
372
compareLine :: Offset -> LParser (Maybe (Line,Ordering)) compareLine i = do maybe_l <- getLine case maybe_l of Nothing -> return Nothing Just l@(BlankLine _) -> return $ Just (l,EQ) Just l -> return $ Just (l, compare (offset l) i ) -- Using the next line as the starting point, grab a set of equally i...
372
compareLine i = do maybe_l <- getLine case maybe_l of Nothing -> return Nothing Just l@(BlankLine _) -> return $ Just (l,EQ) Just l -> return $ Just (l, compare (offset l) i ) -- Using the next line as the starting point, grab a set of equally indented -- lines and put them together into a block.
315
false
true
0
15
82
122
61
61
null
null
shlevy/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isCheapUnfolding _ = False
68
isCheapUnfolding _ = False
68
isCheapUnfolding _ = False
68
false
false
0
5
45
9
4
5
null
null
gabesoft/kapi
test/TestHelper.hs
bsd-3-clause
mkId :: RecordId -> Value mkId v = ObjId (read $ unpack v)
58
mkId :: RecordId -> Value mkId v = ObjId (read $ unpack v)
58
mkId v = ObjId (read $ unpack v)
32
false
true
0
8
12
31
15
16
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/elem_5.hs
mit
primMulNat Zero (Succ y) = Zero
31
primMulNat Zero (Succ y) = Zero
31
primMulNat Zero (Succ y) = Zero
31
false
false
0
7
5
17
8
9
null
null
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual46.hs
mit
d1 =/= d2 = d1 === strutY 2 === d2
34
d1 =/= d2 = d1 === strutY 2 === d2
34
d1 =/= d2 = d1 === strutY 2 === d2
34
false
false
0
7
9
23
10
13
null
null
andrewmichaud/JustSudoku
test/Sudoku/Control/MoveSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "Move properties:" $ do let set = Set "0" "1" "1" let set2 = Set "3" "4" "5" let check = Check let erase = Erase "0" "1" let erase2 = Erase "0" "4" let reset = Reset let quit = Quit context "Show:" $ do ...
3,169
spec :: Spec spec = do describe "Move properties:" $ do let set = Set "0" "1" "1" let set2 = Set "3" "4" "5" let check = Check let erase = Erase "0" "1" let erase2 = Erase "0" "4" let reset = Reset let quit = Quit context "Show:" $ do ...
3,169
spec = do describe "Move properties:" $ do let set = Set "0" "1" "1" let set2 = Set "3" "4" "5" let check = Check let erase = Erase "0" "1" let erase2 = Erase "0" "4" let reset = Reset let quit = Quit context "Show:" $ do it "should wo...
3,156
false
true
0
18
1,327
770
371
399
null
null
kawamuray/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
gpl-2.0
printBool False b = show b
26
printBool False b = show b
26
printBool False b = show b
26
false
false
0
5
5
14
6
8
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/THNames.hs
bsd-3-clause
mkNameSIdKey = mkPreludeMiscIdUnique 210
48
mkNameSIdKey = mkPreludeMiscIdUnique 210
48
mkNameSIdKey = mkPreludeMiscIdUnique 210
48
false
false
0
5
11
9
4
5
null
null
srush/TextBook
src/Stream.hs
bsd-3-clause
(!^) :: JSObject JSValue -> String -> Integer (!^) obj key = case fromJust $ get_field obj key of JSRational _ rat -> round rat JSString jsstring -> read $ fromJSString $ jsstring
214
(!^) :: JSObject JSValue -> String -> Integer (!^) obj key = case fromJust $ get_field obj key of JSRational _ rat -> round rat JSString jsstring -> read $ fromJSString $ jsstring
214
(!^) obj key = case fromJust $ get_field obj key of JSRational _ rat -> round rat JSString jsstring -> read $ fromJSString $ jsstring
168
false
true
0
9
67
75
37
38
null
null
brendanhay/gogol
gogol-serviceuser/gen/Network/Google/Resource/ServiceUser/Projects/Services/List.hs
mpl-2.0
-- | V1 error format. pslXgafv :: Lens' ProjectsServicesList (Maybe Xgafv) pslXgafv = lens _pslXgafv (\ s a -> s{_pslXgafv = a})
128
pslXgafv :: Lens' ProjectsServicesList (Maybe Xgafv) pslXgafv = lens _pslXgafv (\ s a -> s{_pslXgafv = a})
106
pslXgafv = lens _pslXgafv (\ s a -> s{_pslXgafv = a})
53
true
true
0
9
21
46
25
21
null
null
dicomgrid/dicom-haskell-library
src/Data/DICOM/Object.hs
gpl-3.0
object :: [Element] -> Object object = Object . sortBy (compare `on` elementTag)
80
object :: [Element] -> Object object = Object . sortBy (compare `on` elementTag)
80
object = Object . sortBy (compare `on` elementTag)
50
false
true
0
8
12
34
19
15
null
null