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
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DeregisterInstance.hs
mpl-2.0
-- | 'DeregisterInstance' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'di1InstanceId' @::@ 'Text' -- deregisterInstance :: Text -- ^ 'di1InstanceId' -> DeregisterInstance deregisterInstance p1 = DeregisterInstance { _di1InstanceId = p1 }
303
deregisterInstance :: Text -- ^ 'di1InstanceId' -> DeregisterInstance deregisterInstance p1 = DeregisterInstance { _di1InstanceId = p1 }
163
deregisterInstance p1 = DeregisterInstance { _di1InstanceId = p1 }
74
true
true
0
6
63
33
21
12
null
null
sirius94/lambdai
src/LambdaAST/Path.hs
gpl-3.0
goLeftThen :: Path -> Path goLeftThen p = Left <:> p
52
goLeftThen :: Path -> Path goLeftThen p = Left <:> p
52
goLeftThen p = Left <:> p
25
false
true
0
5
10
22
11
11
null
null
mettekou/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
{- ********************************************************************* * * exprIsTrivial * * ************************************************************************ ...
2,217
exprIsTrivial :: CoreExpr -> Bool exprIsTrivial (Var _) = True
71
exprIsTrivial (Var _) = True
37
true
true
0
7
541
25
13
12
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT06.hs
gpl-3.0
intersect,union :: [Nat] -> [Nat] -> [Nat] (x:xs) `intersect` ys | x `elem` ys = x:(xs `intersect` ys) | otherwise = xs `intersect` ys
156
intersect,union :: [Nat] -> [Nat] -> [Nat] (x:xs) `intersect` ys | x `elem` ys = x:(xs `intersect` ys) | otherwise = xs `intersect` ys
156
(x:xs) `intersect` ys | x `elem` ys = x:(xs `intersect` ys) | otherwise = xs `intersect` ys
113
false
true
3
8
45
91
49
42
null
null
siddhanathan/ghc
testsuite/tests/typecheck/should_compile/T10997a.hs
bsd-3-clause
extractJust _ = (False, undefined)
41
extractJust _ = (False, undefined)
41
extractJust _ = (False, undefined)
41
false
false
0
5
11
15
8
7
null
null
IreneKnapp/direct-http
Haskell/Network/HTTP.hs
mit
fromHeader HttpETag = UTF8.fromString "ETag"
44
fromHeader HttpETag = UTF8.fromString "ETag"
44
fromHeader HttpETag = UTF8.fromString "ETag"
44
false
false
0
6
4
14
6
8
null
null
conal/shady-graphics
src/Shady/CompileSurface.hs
agpl-3.0
-- exact lighting (beautiful) -- wrapSurf = wrapSurfIN -- interpolate normals (faster) -- wrapSurf = wrapSurfIC -- interpolate colors (terrible) -- Change wrapSurf to wrapSurfIN or wrapSurfIC to compare. -- | Wrap up a parameterized surface for compiling. Computes normals and -- lighting per pixel -- sometimes ca...
1,027
wrapSurfExact :: forall u'. EyePosE -> SurfWrapper u' wrapSurfExact eyePos f = liftA2 ShaderVF vert frag where vert :: u' -> Point -> (E R4, (Point, E R3)) vert u' p' = (vTrans (pos <+> 1), (p',pos)) where (_,_,surfd,_) = f u' (posF,_) = splitF (surfVN surfd) pos = posF (toE p') frag...
685
wrapSurfExact eyePos f = liftA2 ShaderVF vert frag where vert :: u' -> Point -> (E R4, (Point, E R3)) vert u' p' = (vTrans (pos <+> 1), (p',pos)) where (_,_,surfd,_) = f u' (posF,_) = splitF (surfVN surfd) pos = posF (toE p') frag :: u' -> (Point,E R3) -> (E R4,()) frag u' (p',pos...
631
true
true
0
11
237
328
177
151
null
null
vTurbine/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
isToplevClosure :: ClosureInfo -> Bool isToplevClosure (ClosureInfo { closureLFInfo = lf_info }) = case lf_info of LFReEntrant TopLevel _ _ _ _ -> True LFThunk TopLevel _ _ _ _ -> True _other -> False -------------------------------------- -- Label generation -----------...
347
isToplevClosure :: ClosureInfo -> Bool isToplevClosure (ClosureInfo { closureLFInfo = lf_info }) = case lf_info of LFReEntrant TopLevel _ _ _ _ -> True LFThunk TopLevel _ _ _ _ -> True _other -> False -------------------------------------- -- Label generation -----------...
347
isToplevClosure (ClosureInfo { closureLFInfo = lf_info }) = case lf_info of LFReEntrant TopLevel _ _ _ _ -> True LFThunk TopLevel _ _ _ _ -> True _other -> False -------------------------------------- -- Label generation --------------------------------------
308
false
true
0
9
88
77
40
37
null
null
mydaum/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
gbuildModDefFiles (GReplExe _) = []
40
gbuildModDefFiles (GReplExe _) = []
40
gbuildModDefFiles (GReplExe _) = []
40
false
false
0
7
9
17
8
9
null
null
sdiehl/ghc
testsuite/tests/simplCore/should_run/T16893/Complex.hs
bsd-3-clause
receiveComplexToProtocolCloseComplex :: Complex 'CloseType -> Close receiveComplexToProtocolCloseComplex Complex {complexInner = inner} = Close (hashToLink (closeComplexSource inner))
185
receiveComplexToProtocolCloseComplex :: Complex 'CloseType -> Close receiveComplexToProtocolCloseComplex Complex {complexInner = inner} = Close (hashToLink (closeComplexSource inner))
185
receiveComplexToProtocolCloseComplex Complex {complexInner = inner} = Close (hashToLink (closeComplexSource inner))
117
false
true
0
9
17
47
23
24
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2993 = 2992
11
2993 = 2992
11
2993 = 2992
11
false
false
1
5
2
10
3
7
null
null
noraesae/euler
src/Problem17.hs
bsd-3-clause
tenAndOneToString 3 0 = "thirty"
32
tenAndOneToString 3 0 = "thirty"
32
tenAndOneToString 3 0 = "thirty"
32
false
false
1
5
4
16
5
11
null
null
kaashif/muon
src/Post.hs
bsd-3-clause
getNames :: IO [FilePath] getNames = do d <- globDir [compile "*.post"] postPath return $ (sort . head . fst) d
119
getNames :: IO [FilePath] getNames = do d <- globDir [compile "*.post"] postPath return $ (sort . head . fst) d
119
getNames = do d <- globDir [compile "*.post"] postPath return $ (sort . head . fst) d
93
false
true
0
11
28
56
27
29
null
null
TomMD/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
callishOp DoubleSinOp = Just MO_F64_Sin
42
callishOp DoubleSinOp = Just MO_F64_Sin
42
callishOp DoubleSinOp = Just MO_F64_Sin
42
false
false
1
5
7
15
5
10
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/TerminateInstances.hs
mpl-2.0
-- | Checks whether you have the required permissions for the action, without -- actually making the request, and provides an error response. If you have -- the required permissions, the error response is 'DryRunOperation'. -- Otherwise, it is 'UnauthorizedOperation'. tiDryRun :: Lens' TerminateInstances (Maybe Bool) t...
372
tiDryRun :: Lens' TerminateInstances (Maybe Bool) tiDryRun = lens _tiDryRun (\ s a -> s{_tiDryRun = a})
103
tiDryRun = lens _tiDryRun (\ s a -> s{_tiDryRun = a})
53
true
true
0
9
56
49
28
21
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
fromUTF8 (c:cs) | c <= '\x7F' = c : fromUTF8 cs | c <= '\xBF' = replacementChar : fromUTF8 cs | c <= '\xDF' = twoBytes c cs | c <= '\xEF' = moreBytes 3 0x800 cs (ord c .&. 0xF) | c <= '\xF7' = moreBytes 4 0x10000 cs (ord c .&. 0x7) | c <= '\xFB' = moreBytes 5 0x200000 cs (ord c .&. 0x3) | c <= '\xF...
1,309
fromUTF8 (c:cs) | c <= '\x7F' = c : fromUTF8 cs | c <= '\xBF' = replacementChar : fromUTF8 cs | c <= '\xDF' = twoBytes c cs | c <= '\xEF' = moreBytes 3 0x800 cs (ord c .&. 0xF) | c <= '\xF7' = moreBytes 4 0x10000 cs (ord c .&. 0x7) | c <= '\xFB' = moreBytes 5 0x200000 cs (ord c .&. 0x3) | c <= '\xF...
1,309
fromUTF8 (c:cs) | c <= '\x7F' = c : fromUTF8 cs | c <= '\xBF' = replacementChar : fromUTF8 cs | c <= '\xDF' = twoBytes c cs | c <= '\xEF' = moreBytes 3 0x800 cs (ord c .&. 0xF) | c <= '\xF7' = moreBytes 4 0x10000 cs (ord c .&. 0x7) | c <= '\xFB' = moreBytes 5 0x200000 cs (ord c .&. 0x3) | c <= '\xF...
1,309
false
false
10
15
425
565
274
291
null
null
alandao/lightray
src/Lightray/Render.hs
bsd-3-clause
colorAt :: World -> Camera -> Int -> Int -> PixelRGB8 colorAt world camera x y = PixelRGB8 red green blue where red = channelRed rgbTuple green = channelGreen rgbTuple blue = channelBlue rgbTuple rgbTuple = toSRGB24 $ trace world ray ray = primaryRay row col camera --convert ...
427
colorAt :: World -> Camera -> Int -> Int -> PixelRGB8 colorAt world camera x y = PixelRGB8 red green blue where red = channelRed rgbTuple green = channelGreen rgbTuple blue = channelBlue rgbTuple rgbTuple = toSRGB24 $ trace world ray ray = primaryRay row col camera --convert ...
427
colorAt world camera x y = PixelRGB8 red green blue where red = channelRed rgbTuple green = channelGreen rgbTuple blue = channelBlue rgbTuple rgbTuple = toSRGB24 $ trace world ray ray = primaryRay row col camera --convert juicypixel to ONB coordinates row = (camera^.c...
373
false
true
6
11
121
130
64
66
null
null
theNerd247/ariaRacer
src/Aria/Acid.hs
bsd-3-clause
getRacerById :: RacerId -> Query RepoDBState (Maybe Racer) getRacerById = getRacerBy
84
getRacerById :: RacerId -> Query RepoDBState (Maybe Racer) getRacerById = getRacerBy
84
getRacerById = getRacerBy
25
false
true
0
9
10
32
14
18
null
null
ezyang/hoopl
src/Compiler/Hoopl/Stream.hs
bsd-3-clause
law1' :: Eq a => Int -> [a] -> Bool law1' n l = iterL l `eq` (l `thenL` iterL l) where xs `eq` ys = take n xs == take n ys
123
law1' :: Eq a => Int -> [a] -> Bool law1' n l = iterL l `eq` (l `thenL` iterL l) where xs `eq` ys = take n xs == take n ys
123
law1' n l = iterL l `eq` (l `thenL` iterL l) where xs `eq` ys = take n xs == take n ys
87
false
true
1
9
33
96
45
51
null
null
nushio3/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
mkErrMsg dflags locn unqual msg = mk_err_msg dflags SevError locn unqual (ErrDoc [msg] [] [])
114
mkErrMsg dflags locn unqual msg = mk_err_msg dflags SevError locn unqual (ErrDoc [msg] [] [])
114
mkErrMsg dflags locn unqual msg = mk_err_msg dflags SevError locn unqual (ErrDoc [msg] [] [])
114
false
false
0
8
35
43
21
22
null
null
MWRuszczycky/Chemno
src/Viewer.hs
bsd-3-clause
mangleName :: SIO.FilePath -> SIO.FilePath -- ^Mangles an input file name to produce a different output name. mangleName x = let ( path, ext ) = SFP.splitExtension x in SFP.addExtension ( path ++ "_chemno" ) ext
226
mangleName :: SIO.FilePath -> SIO.FilePath mangleName x = let ( path, ext ) = SFP.splitExtension x in SFP.addExtension ( path ++ "_chemno" ) ext
159
mangleName x = let ( path, ext ) = SFP.splitExtension x in SFP.addExtension ( path ++ "_chemno" ) ext
116
true
true
0
10
50
65
31
34
null
null
cocreature/reactand
src/StackSet.hs
isc
deleteFromWorkspace :: Eq a => a -> Workspace i a -> Workspace i a deleteFromWorkspace v ws = ws & tree %~ deleteFromTreeZipper v
129
deleteFromWorkspace :: Eq a => a -> Workspace i a -> Workspace i a deleteFromWorkspace v ws = ws & tree %~ deleteFromTreeZipper v
129
deleteFromWorkspace v ws = ws & tree %~ deleteFromTreeZipper v
62
false
true
0
8
23
56
25
31
null
null
HIPERFIT/futhark
src/Futhark/Test.hs
isc
valueAsVar :: (MonadError T.Text m, MonadIO m) => Server -> VarName -> V.Value -> m () valueAsVar server v val = cmdMaybe $ putValue server v val
157
valueAsVar :: (MonadError T.Text m, MonadIO m) => Server -> VarName -> V.Value -> m () valueAsVar server v val = cmdMaybe $ putValue server v val
157
valueAsVar server v val = cmdMaybe $ putValue server v val
60
false
true
0
9
38
67
33
34
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw04.hs
unlicense
p3 :: Int -> [(Int,Int,Int)] -- p1 n = [(x,y,z) | x <- [1 .. n], y <- [1 .. x], z <- [1 .. y], -- x^2 + y^2 == z^2] -- p2 n = [(x,y,z) | x <- [1..n], y <- [x..n], z <- [y..n], -- x^2 + y^2 == z^2] p3 n = [(x,y,z) | x <- [1..n], y <- [1..n], z <- [1..n], x^2 + y^2 == z^2]
294
p3 :: Int -> [(Int,Int,Int)] p3 n = [(x,y,z) | x <- [1..n], y <- [1..n], z <- [1..n], x^2 + y^2 == z^2]
111
p3 n = [(x,y,z) | x <- [1..n], y <- [1..n], z <- [1..n], x^2 + y^2 == z^2]
82
true
true
0
12
94
113
63
50
null
null
mokus0/schematics
picobuck/BOM.hs
unlicense
oshPark = Supplier "OSH Park" 0
31
oshPark = Supplier "OSH Park" 0
31
oshPark = Supplier "OSH Park" 0
31
false
false
0
5
5
11
5
6
null
null
YueLiPicasso/unification
GenerateFOTE.hs
gpl-3.0
randomFunction :: (Char, Int) -> Term -> Gen Term -- (Char, Int): -- special requirement mark -- 'v' means the function has no occurance of a specified variable -- in the second argument,Int is size parameter -- 'c' means the function shall has the same name as the constant -- passed as the secon...
1,021
randomFunction :: (Char, Int) -> Term -> Gen Term randomFunction (c, n) t = do if c == 'c' then do let name = getName t return (Function name 0 []) else if c == 'a' then do fname <- randomName 'f' args <- sizedListOf sizedTerm (n - 1) ...
648
randomFunction (c, n) t = do if c == 'c' then do let name = getName t return (Function name 0 []) else if c == 'a' then do fname <- randomName 'f' args <- sizedListOf sizedTerm (n - 1) let i = length args ...
598
true
true
0
15
389
195
97
98
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1657466 = 3446
34
getValueFromProduct 1657466 = 3446
34
getValueFromProduct 1657466 = 3446
34
false
false
0
5
3
9
4
5
null
null
owestphal/LootLanguage
src/BaseTypeList.hs
bsd-3-clause
pureEvasionShields = ["Buckler"]
32
pureEvasionShields = ["Buckler"]
32
pureEvasionShields = ["Buckler"]
32
false
false
0
5
2
9
5
4
null
null
xich/scotty
Network/Wai/Middleware/Static.hs
bsd-3-clause
(<|>) :: Policy -> Policy -> Policy p1 <|> p2 = policy (\s -> maybe (tryPolicy p2 s) Just (tryPolicy p1 s))
107
(<|>) :: Policy -> Policy -> Policy p1 <|> p2 = policy (\s -> maybe (tryPolicy p2 s) Just (tryPolicy p1 s))
107
p1 <|> p2 = policy (\s -> maybe (tryPolicy p2 s) Just (tryPolicy p1 s))
71
false
true
0
10
21
61
31
30
null
null
olsner/ghc
compiler/prelude/THNames.hs
bsd-3-clause
instanceDIdKey = mkPreludeMiscIdUnique 327
61
instanceDIdKey = mkPreludeMiscIdUnique 327
61
instanceDIdKey = mkPreludeMiscIdUnique 327
61
false
false
0
5
22
9
4
5
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
typeRepIdKey = mkPreludeMiscIdUnique 509
49
typeRepIdKey = mkPreludeMiscIdUnique 509
49
typeRepIdKey = mkPreludeMiscIdUnique 509
49
false
false
0
5
12
9
4
5
null
null
beni55/haste-compiler
libraries/ghc-7.10/base/Data/Fixed.hs
bsd-3-clause
chopZeros a = show a
20
chopZeros a = show a
20
chopZeros a = show a
20
false
false
0
5
4
12
5
7
null
null
noteed/opengl-api
Text/OpenGL/Spec.hs
bsd-3-clause
isReturn _ = False
18
isReturn _ = False
18
isReturn _ = False
18
false
false
0
5
3
9
4
5
null
null
cullina/Extractor
src/ListSet.hs
bsd-3-clause
add :: Ord a => a -> [a] -> [a] add x [] = [x]
46
add :: Ord a => a -> [a] -> [a] add x [] = [x]
46
add x [] = [x]
14
false
true
0
8
14
47
23
24
null
null
olsner/ghc
compiler/types/CoAxiom.hs
bsd-3-clause
coAxiomName :: CoAxiom br -> Name coAxiomName = co_ax_name
58
coAxiomName :: CoAxiom br -> Name coAxiomName = co_ax_name
58
coAxiomName = co_ax_name
24
false
true
0
7
8
25
10
15
null
null
bhickey/TreeStructures
Data/Tree/AVL.hs
bsd-3-clause
insert k v (AVLTree k1 v1 s _ l r) = if k <= k1 then let l' = insert k v l in balance (AVLTree k1 v1 (s + 1) (findHeight l' r) l' r) else let r' = insert k v r in balance (AVLTree k1 v1 (s + 1) (findHeight l r') l r')
231
insert k v (AVLTree k1 v1 s _ l r) = if k <= k1 then let l' = insert k v l in balance (AVLTree k1 v1 (s + 1) (findHeight l' r) l' r) else let r' = insert k v r in balance (AVLTree k1 v1 (s + 1) (findHeight l r') l r')
231
insert k v (AVLTree k1 v1 s _ l r) = if k <= k1 then let l' = insert k v l in balance (AVLTree k1 v1 (s + 1) (findHeight l' r) l' r) else let r' = insert k v r in balance (AVLTree k1 v1 (s + 1) (findHeight l r') l r')
231
false
false
0
12
70
148
71
77
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | Any tags assigned to the resource. vpcpcTags :: Lens' VPCPeeringConnection [Tag] vpcpcTags = lens _vpcpcTags (\ s a -> s{_vpcpcTags = a}) . _Default . _Coerce
163
vpcpcTags :: Lens' VPCPeeringConnection [Tag] vpcpcTags = lens _vpcpcTags (\ s a -> s{_vpcpcTags = a}) . _Default . _Coerce
123
vpcpcTags = lens _vpcpcTags (\ s a -> s{_vpcpcTags = a}) . _Default . _Coerce
77
true
true
0
11
27
51
28
23
null
null
trobertson/merch
src/Merchandise/Types/Item.hs
bsd-3-clause
addItem :: Item -> Inventory -> Inventory addItem i (Inv m) = case M.lookup (i ^. itemID) m of Just (x, c) -> Inv $ M.insertWith (\_ (i,c) -> (i,c+1)) (i ^. itemID) (i,1) m Nothing -> Inv $ M.insert (i ^. itemID) (i, 1) m -- remove an Item from an Inventory
268
addItem :: Item -> Inventory -> Inventory addItem i (Inv m) = case M.lookup (i ^. itemID) m of Just (x, c) -> Inv $ M.insertWith (\_ (i,c) -> (i,c+1)) (i ^. itemID) (i,1) m Nothing -> Inv $ M.insert (i ^. itemID) (i, 1) m -- remove an Item from an Inventory
268
addItem i (Inv m) = case M.lookup (i ^. itemID) m of Just (x, c) -> Inv $ M.insertWith (\_ (i,c) -> (i,c+1)) (i ^. itemID) (i,1) m Nothing -> Inv $ M.insert (i ^. itemID) (i, 1) m -- remove an Item from an Inventory
226
false
true
0
13
63
155
82
73
null
null
Pieterjaninfo/PP
src/pp/block7/cp/phaskell/qsort.hs
unlicense
-- cabal install random forceList :: [a] -> () forceList [] = ()
65
forceList :: [a] -> () forceList [] = ()
40
forceList [] = ()
17
true
true
0
8
13
34
16
18
null
null
kosmoskatten/synthetic-web
src/SyntheticWeb/Observer.hs
mit
renderStatistics :: CounterSet -> Snap () renderStatistics counterSet = do frozenSet@(FrozenSet (_, _, patternCounters)) <- liftIO $ freeze counterSet let response = setResponseCode 200 $ setContentType "text/html" emptyResponse putResponse response writeBS htmlHead writeBS $ htmlDiv "pink" (...
501
renderStatistics :: CounterSet -> Snap () renderStatistics counterSet = do frozenSet@(FrozenSet (_, _, patternCounters)) <- liftIO $ freeze counterSet let response = setResponseCode 200 $ setContentType "text/html" emptyResponse putResponse response writeBS htmlHead writeBS $ htmlDiv "pink" (...
501
renderStatistics counterSet = do frozenSet@(FrozenSet (_, _, patternCounters)) <- liftIO $ freeze counterSet let response = setResponseCode 200 $ setContentType "text/html" emptyResponse putResponse response writeBS htmlHead writeBS $ htmlDiv "pink" (globalStats frozenSet) forM_ (zip patter...
459
false
true
0
13
89
162
75
87
null
null
audreyt/stringtable-atom
src/StringTable/AtomMap.hs
bsd-3-clause
(\\) :: AtomMap a -> AtomMap b -> AtomMap a (\\) (MkAtomMap x) (MkAtomMap y) = MkAtomMap ((IM.\\) x y)
102
(\\) :: AtomMap a -> AtomMap b -> AtomMap a (\\) (MkAtomMap x) (MkAtomMap y) = MkAtomMap ((IM.\\) x y)
102
(\\) (MkAtomMap x) (MkAtomMap y) = MkAtomMap ((IM.\\) x y)
58
false
true
0
8
19
64
33
31
null
null
michalkonecny/polypaver
src/Numeric/ER/RnToRm/BisectionTree.hs
bsd-3-clause
syncMany :: (RA.ERIntApprox d, DomainIntBox box varid d) => ValueSplitter box varid d v -> EffortIndex -> [BisectionTree box varid d v] -> [BisectionTree box varid d v] syncMany valSplitter ix bistrs = case getPt bistrs of Nothing -> unifyDom bistrs Just (var, pt, domB) -> ...
1,141
syncMany :: (RA.ERIntApprox d, DomainIntBox box varid d) => ValueSplitter box varid d v -> EffortIndex -> [BisectionTree box varid d v] -> [BisectionTree box varid d v] syncMany valSplitter ix bistrs = case getPt bistrs of Nothing -> unifyDom bistrs Just (var, pt, domB) -> ...
1,141
syncMany valSplitter ix bistrs = case getPt bistrs of Nothing -> unifyDom bistrs Just (var, pt, domB) -> unifyDom $ Prelude.map (split valSplitter ix var pt domB) bistrs where getPt [] = Nothing getPt (bistr : rest) | isLeaf bistr = getPt rest | oth...
950
false
true
4
10
341
289
141
148
null
null
cirquit/hycogen
plots/hycogen-plots/app/Main.hs
mit
getData :: IO [[Double]] getData = do input <- readFile "../data-raw.txt" let input' = foldl' (\xs x -> if null x then xs else x:xs) [] (lines input) parsed = map (map (read . drop 1 . dropWhile (/= ':')) . splitOn ",") input' return parsed
260
getData :: IO [[Double]] getData = do input <- readFile "../data-raw.txt" let input' = foldl' (\xs x -> if null x then xs else x:xs) [] (lines input) parsed = map (map (read . drop 1 . dropWhile (/= ':')) . splitOn ",") input' return parsed
260
getData = do input <- readFile "../data-raw.txt" let input' = foldl' (\xs x -> if null x then xs else x:xs) [] (lines input) parsed = map (map (read . drop 1 . dropWhile (/= ':')) . splitOn ",") input' return parsed
235
false
true
0
18
65
135
65
70
null
null
motiz88/postgrest
src/PostgREST/QueryBuilder.hs
mit
unquoted v = cs $ JSON.encode v
31
unquoted v = cs $ JSON.encode v
31
unquoted v = cs $ JSON.encode v
31
false
false
0
7
6
18
8
10
null
null
adnelson/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
getArgs _ r = ([], r)
21
getArgs _ r = ([], r)
21
getArgs _ r = ([], r)
21
false
false
1
7
5
20
10
10
null
null
EindhovenHaskellMeetup/meetup
courses/programming-in-haskell/pih-exercises/test/Chapter08Spec.hs
mit
spec :: Spec spec = do describe "Exercise 1: Using recursion and the function add" $ do describe "define a function that" $ do it "multiplies two natural numbers" $ do mult Zero Zero `shouldBe` Zero mult Zero ten `shouldBe` Zero mult ten Zero `shouldBe` Zero mult ten (int2n...
1,248
spec :: Spec spec = do describe "Exercise 1: Using recursion and the function add" $ do describe "define a function that" $ do it "multiplies two natural numbers" $ do mult Zero Zero `shouldBe` Zero mult Zero ten `shouldBe` Zero mult ten Zero `shouldBe` Zero mult ten (int2n...
1,248
spec = do describe "Exercise 1: Using recursion and the function add" $ do describe "define a function that" $ do it "multiplies two natural numbers" $ do mult Zero Zero `shouldBe` Zero mult Zero ten `shouldBe` Zero mult ten Zero `shouldBe` Zero mult ten (int2nat (13::Int))...
1,235
false
true
0
35
320
446
214
232
null
null
rueshyna/gogol
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/InAppProducts/Insert.hs
mpl-2.0
-- | If true the prices for all regions targeted by the parent app that -- don\'t have a price specified for this in-app product will be auto -- converted to the target currency based on the default price. Defaults to -- false. iapiAutoConvertMissingPrices :: Lens' InAppProductsInsert (Maybe Bool) iapiAutoConvertMissin...
420
iapiAutoConvertMissingPrices :: Lens' InAppProductsInsert (Maybe Bool) iapiAutoConvertMissingPrices = lens _iapiAutoConvertMissingPrices (\ s a -> s{_iapiAutoConvertMissingPrices = a})
192
iapiAutoConvertMissingPrices = lens _iapiAutoConvertMissingPrices (\ s a -> s{_iapiAutoConvertMissingPrices = a})
121
true
true
0
8
67
52
28
24
null
null
TOSPIO/yi
src/library/Yi/Editor.hs
gpl-2.0
setTmpStatus :: MonadEditor m => Int -> Status -> m () setTmpStatus delay s = withEditor $ do statusLinesA %= DelayList.insert (delay, s) -- also show in the messages buffer, so we don't loose any message bs <- gets (filter ((== MemBuffer "messages") . view identA) . M.elems . buffers) b <- case bs of ...
761
setTmpStatus :: MonadEditor m => Int -> Status -> m () setTmpStatus delay s = withEditor $ do statusLinesA %= DelayList.insert (delay, s) -- also show in the messages buffer, so we don't loose any message bs <- gets (filter ((== MemBuffer "messages") . view identA) . M.elems . buffers) b <- case bs of ...
761
setTmpStatus delay s = withEditor $ do statusLinesA %= DelayList.insert (delay, s) -- also show in the messages buffer, so we don't loose any message bs <- gets (filter ((== MemBuffer "messages") . view identA) . M.elems . buffers) b <- case bs of (b':_) -> return $ bkey b' [] -> stringToNewB...
706
false
true
0
17
149
208
104
104
null
null
lukexi/ghc-7.8-arm64
compiler/main/DynFlags.hs
bsd-3-clause
wayExtras _ WayEventLog dflags = dflags
39
wayExtras _ WayEventLog dflags = dflags
39
wayExtras _ WayEventLog dflags = dflags
39
false
false
0
5
5
13
6
7
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrelNames.hs
bsd-3-clause
irrefutPatErrorIdKey = mkPreludeMiscIdUnique 9
56
irrefutPatErrorIdKey = mkPreludeMiscIdUnique 9
56
irrefutPatErrorIdKey = mkPreludeMiscIdUnique 9
56
false
false
0
5
13
9
4
5
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/Digraph.hs
bsd-3-clause
verticesG :: Graph node -> [node] verticesG graph = map (gr_vertex_to_node graph) $ vertices (gr_int_graph graph)
113
verticesG :: Graph node -> [node] verticesG graph = map (gr_vertex_to_node graph) $ vertices (gr_int_graph graph)
113
verticesG graph = map (gr_vertex_to_node graph) $ vertices (gr_int_graph graph)
79
false
true
0
8
15
51
23
28
null
null
christiaanb/Idris-dev
src/IRTS/CodegenLLVM.hs
bsd-3-clause
addGlobal :: Global -> Codegen () addGlobal def = tell ([], [], [GlobalDefinition def])
87
addGlobal :: Global -> Codegen () addGlobal def = tell ([], [], [GlobalDefinition def])
87
addGlobal def = tell ([], [], [GlobalDefinition def])
53
false
true
0
8
13
45
23
22
null
null
dysinger/amazonka
amazonka-ecs/gen/Network/AWS/ECS/DeregisterTaskDefinition.hs
mpl-2.0
-- | The full description of the deregistered task. dtdrTaskDefinition :: Lens' DeregisterTaskDefinitionResponse (Maybe TaskDefinition) dtdrTaskDefinition = lens _dtdrTaskDefinition (\s a -> s { _dtdrTaskDefinition = a })
225
dtdrTaskDefinition :: Lens' DeregisterTaskDefinitionResponse (Maybe TaskDefinition) dtdrTaskDefinition = lens _dtdrTaskDefinition (\s a -> s { _dtdrTaskDefinition = a })
173
dtdrTaskDefinition = lens _dtdrTaskDefinition (\s a -> s { _dtdrTaskDefinition = a })
89
true
true
1
9
31
52
25
27
null
null
sboosali/enumerate
enumerate-function/tests/DocTests.hs
mit
-------------------------------------------------- extensions2flags :: String -> [String] extensions2flags = fmap ("-X"++) . words
131
extensions2flags :: String -> [String] extensions2flags = fmap ("-X"++) . words
79
extensions2flags = fmap ("-X"++) . words
40
true
true
0
7
12
30
17
13
null
null
cawinkelmann/api-server
test/SpecHelper.hs
mit
withQuery :: ((forall a. (forall s. Tx Postgres s a) -> IO a) -> b) -> b withQuery spec = spec $ \queries -> initDb (config_database config) $ tx Nothing queries
165
withQuery :: ((forall a. (forall s. Tx Postgres s a) -> IO a) -> b) -> b withQuery spec = spec $ \queries -> initDb (config_database config) $ tx Nothing queries
165
withQuery spec = spec $ \queries -> initDb (config_database config) $ tx Nothing queries
92
false
true
2
14
34
88
43
45
null
null
nyson/haste-compiler
src/Haste/CodeGen.hs
bsd-3-clause
genRhs _ (StgRhsClosure _ _ _ upd _ args body) = do args' <- mapM genVar args (retExp, body') <- isolate $ do mapM_ addLocal args' genEx body return $ if null args then thunk' upd (body' $ thunkRet retExp) else fun args' (body' $ ret retExp) where thunk' _ (Re...
649
genRhs _ (StgRhsClosure _ _ _ upd _ args body) = do args' <- mapM genVar args (retExp, body') <- isolate $ do mapM_ addLocal args' genEx body return $ if null args then thunk' upd (body' $ thunkRet retExp) else fun args' (body' $ ret retExp) where thunk' _ (Re...
649
genRhs _ (StgRhsClosure _ _ _ upd _ args body) = do args' <- mapM genVar args (retExp, body') <- isolate $ do mapM_ addLocal args' genEx body return $ if null args then thunk' upd (body' $ thunkRet retExp) else fun args' (body' $ ret retExp) where thunk' _ (Re...
649
false
false
5
12
201
217
94
123
null
null
jrockway/c2hs
src/C2HS/Gen/Bind.hs
gpl-2.0
expandHook (CHSAlignof ide _) = do traceInfoAlignof decl <- findAndChaseDecl ide False True -- no indirection, but shadows (_, align) <- sizeAlignOf decl traceInfoDump (render $ pretty decl) align return $ show align where traceInfoAlignof = traceGenBind "** alignment hook:\n" ...
450
expandHook (CHSAlignof ide _) = do traceInfoAlignof decl <- findAndChaseDecl ide False True -- no indirection, but shadows (_, align) <- sizeAlignOf decl traceInfoDump (render $ pretty decl) align return $ show align where traceInfoAlignof = traceGenBind "** alignment hook:\n" ...
450
expandHook (CHSAlignof ide _) = do traceInfoAlignof decl <- findAndChaseDecl ide False True -- no indirection, but shadows (_, align) <- sizeAlignOf decl traceInfoDump (render $ pretty decl) align return $ show align where traceInfoAlignof = traceGenBind "** alignment hook:\n" ...
450
false
false
0
10
115
126
58
68
null
null
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/ServiceNetworking/Types/Product.hs
mpl-2.0
-- | Optional. The size of the desired secondary ranges for the subnet. Use -- usual CIDR range notation. For example, \'30\' to find unused -- x.x.x.x\/30 CIDR range. The goal is to determine that the allocated -- ranges have enough free space for all the requested secondary ranges. rrSecondaryRangeIPPrefixLengths :: ...
514
rrSecondaryRangeIPPrefixLengths :: Lens' RangeReservation [Int32] rrSecondaryRangeIPPrefixLengths = lens _rrSecondaryRangeIPPrefixLengths (\ s a -> s{_rrSecondaryRangeIPPrefixLengths = a}) . _Default . _Coerce
229
rrSecondaryRangeIPPrefixLengths = lens _rrSecondaryRangeIPPrefixLengths (\ s a -> s{_rrSecondaryRangeIPPrefixLengths = a}) . _Default . _Coerce
163
true
true
0
11
88
56
31
25
null
null
alexander-at-github/eta
compiler/ETA/Utils/GraphOps.hs
bsd-3-clause
coalesceGraph' :: (Uniquable k, Ord k, Eq cls, Outputable k) => Bool -> Triv k cls color -> Graph k cls color -> [(k, k)] -> ( Graph k cls color , [(k, k)]) coalesceGraph' aggressive triv graph kkPairsAcc = let -- find all the nodes that have coalescen...
1,778
coalesceGraph' :: (Uniquable k, Ord k, Eq cls, Outputable k) => Bool -> Triv k cls color -> Graph k cls color -> [(k, k)] -> ( Graph k cls color , [(k, k)]) coalesceGraph' aggressive triv graph kkPairsAcc = let -- find all the nodes that have coalescen...
1,778
coalesceGraph' aggressive triv graph kkPairsAcc = let -- find all the nodes that have coalescence edges cNodes = filter (\node -> not $ isEmptyUniqSet (nodeCoalesce node)) $ eltsUFM $ graphMap graph -- build a list of pairs of keys for node's we'll try and coalesce -- ...
1,562
false
true
0
17
615
292
156
136
null
null
mwerbos/2048haskell
main.hs
mit
handleInputEvents :: Event -> World -> World handleInputEvents (EventKey k Down _ _) world = let dir = keyDir k newWorld = go dir world in if newWorld == world then worl...
394
handleInputEvents :: Event -> World -> World handleInputEvents (EventKey k Down _ _) world = let dir = keyDir k newWorld = go dir world in if newWorld == world then worl...
394
handleInputEvents (EventKey k Down _ _) world = let dir = keyDir k newWorld = go dir world in if newWorld == world then world ...
349
false
true
0
10
236
80
38
42
null
null
kmate/HaRe
old/testing/renaming/D2.hs
bsd-3-clause
sumSquares [] = 0
17
sumSquares [] = 0
17
sumSquares [] = 0
17
false
false
1
5
3
15
5
10
null
null
daewon/til
exercism/haskell/anagram/test/Tests.hs
mpl-2.0
main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs
74
main :: IO () main = hspecWith defaultConfig {configFastFail = True} specs
74
main = hspecWith defaultConfig {configFastFail = True} specs
60
false
true
1
7
11
32
15
17
null
null
nevrenato/HetsAlloy
Maude/Shellout.hs
gpl-2.0
ok :: String -> Bool ok ('<' : _) = True
40
ok :: String -> Bool ok ('<' : _) = True
40
ok ('<' : _) = True
19
false
true
0
7
10
25
13
12
null
null
hamishmack/haskell-gi
lib/Data/GI/CodeGen/Type.hs
lgpl-2.1
-- | Embed in the `Maybe` monad. maybeT :: TypeRep -> TypeRep maybeT t = "Maybe" `con` [t]
90
maybeT :: TypeRep -> TypeRep maybeT t = "Maybe" `con` [t]
57
maybeT t = "Maybe" `con` [t]
28
true
true
0
6
17
28
16
12
null
null
tjakway/ghcjvm
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprCtOrigin :: CtOrigin -> SDoc -- "arising from ..." -- Not an instance of Outputable because of the "arising from" prefix pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk
175
pprCtOrigin :: CtOrigin -> SDoc pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk
83
pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk
51
true
true
0
9
28
38
18
20
null
null
wowofbob/gol
src/Game.hs
bsd-3-clause
delayTimeout :: Integer delayTimeout = 100000
45
delayTimeout :: Integer delayTimeout = 100000
45
delayTimeout = 100000
21
false
true
0
4
5
11
6
5
null
null
agrafix/HSmarty
test/Tests.hs
bsd-3-clause
main :: IO () main = htfMain htf_importedTests
46
main :: IO () main = htfMain htf_importedTests
46
main = htfMain htf_importedTests
32
false
true
0
7
7
25
10
15
null
null
tadeuzagallo/verve-lang
src/Syntax/Pattern.hs
mit
p_pattern :: Parser Pattern p_pattern = choice [ p_patDefault , p_patLiteral , p_patRecord , p_patList , p_patCtor , p_patVar ]
183
p_pattern :: Parser Pattern p_pattern = choice [ p_patDefault , p_patLiteral , p_patRecord , p_patList , p_patCtor , p_patVar ]
183
p_pattern = choice [ p_patDefault , p_patLiteral , p_patRecord , p_patList , p_patCtor , p_patVar ]
155
false
true
0
6
75
35
20
15
null
null
mettekou/ghc
compiler/prelude/THNames.hs
bsd-3-clause
quoteDecName = qqFun (fsLit "quoteDec") quoteDecKey
59
quoteDecName = qqFun (fsLit "quoteDec") quoteDecKey
59
quoteDecName = qqFun (fsLit "quoteDec") quoteDecKey
59
false
false
0
7
13
17
8
9
null
null
twittner/cql
test/Tests.hs
mpl-2.0
typeof (CqlDecimal _) = DecimalColumn
42
typeof (CqlDecimal _) = DecimalColumn
42
typeof (CqlDecimal _) = DecimalColumn
42
false
false
0
7
9
15
7
8
null
null
fpco/stackage-server
src/Handler/Feed.hs
mit
getBranchFeed :: Maybe SnapshotBranch -> Handler TypedContent getBranchFeed mBranch = do cacheSeconds 3600 mkFeed mBranch =<< getSnapshots mBranch 20 0
155
getBranchFeed :: Maybe SnapshotBranch -> Handler TypedContent getBranchFeed mBranch = do cacheSeconds 3600 mkFeed mBranch =<< getSnapshots mBranch 20 0
155
getBranchFeed mBranch = do cacheSeconds 3600 mkFeed mBranch =<< getSnapshots mBranch 20 0
93
false
true
0
8
23
47
20
27
null
null
ekmett/structures
src/Data/Vector/Array.hs
bsd-2-clause
prefetchMutablePrim3# (PM.MVector (I# o) _ (MutableByteArray arr)) i s = prefetchMutableByteArray3# arr ((o +# i) *# sizeOf# (undefined :: a)) s
144
prefetchMutablePrim3# (PM.MVector (I# o) _ (MutableByteArray arr)) i s = prefetchMutableByteArray3# arr ((o +# i) *# sizeOf# (undefined :: a)) s
144
prefetchMutablePrim3# (PM.MVector (I# o) _ (MutableByteArray arr)) i s = prefetchMutableByteArray3# arr ((o +# i) *# sizeOf# (undefined :: a)) s
144
false
false
0
9
20
67
34
33
null
null
arianvp/binary-serialise-cbor
Data/Binary/Serialise/CBOR/FlatTerm.hs
bsd-3-clause
convFlatTerm (Enc.TkFloat16 f ts) = TkFloat16 f : convFlatTerm ts
69
convFlatTerm (Enc.TkFloat16 f ts) = TkFloat16 f : convFlatTerm ts
69
convFlatTerm (Enc.TkFloat16 f ts) = TkFloat16 f : convFlatTerm ts
69
false
false
0
8
13
29
13
16
null
null
KiNaudiz/bachelor
naiv/naiv.hs
gpl-3.0
initFromFun :: (RealFloat a, Num a) => ( a -> Complex a ) -> (a,a) -> a -> a -> ( a -> Complex a -> a ) -> a -> a -> [[Complex a]] initFromFun f (x0,xe) dt dx = initFromList l x0 dt dx where l = next x0 next x | x <= xe = f x : next (x+dx) | otherwise = []
316
initFromFun :: (RealFloat a, Num a) => ( a -> Complex a ) -> (a,a) -> a -> a -> ( a -> Complex a -> a ) -> a -> a -> [[Complex a]] initFromFun f (x0,xe) dt dx = initFromList l x0 dt dx where l = next x0 next x | x <= xe = f x : next (x+dx) | otherwise = []
316
initFromFun f (x0,xe) dt dx = initFromList l x0 dt dx where l = next x0 next x | x <= xe = f x : next (x+dx) | otherwise = []
177
false
true
2
17
126
184
89
95
null
null
NicolasT/zeromq3-conduit
src/System/ZMQ3/Monad.hs
lgpl-2.1
-- | Lifted version of 'ZMQ.send' send :: (MonadIO m, ZMQ.Sender s) => ZMQ.Socket s -> [Flag] -> BS.ByteString -> m () send sock flags dat = liftIO $ ZMQ.send sock flags dat
173
send :: (MonadIO m, ZMQ.Sender s) => ZMQ.Socket s -> [Flag] -> BS.ByteString -> m () send sock flags dat = liftIO $ ZMQ.send sock flags dat
139
send sock flags dat = liftIO $ ZMQ.send sock flags dat
54
true
true
0
10
32
80
39
41
null
null
MicheleCastrovilli/EuPhBot
Library/Euphs/Bot.hs
bsd-3-clause
-- | Interface to the YAML parser, using the Bot commanline interface getBotConfig :: (Y.FromJSON a) => Opts -> IO (Maybe a) getBotConfig o = if null $ config o then return Nothing else Y.decodeFile $ config o
229
getBotConfig :: (Y.FromJSON a) => Opts -> IO (Maybe a) getBotConfig o = if null $ config o then return Nothing else Y.decodeFile $ config o
159
getBotConfig o = if null $ config o then return Nothing else Y.decodeFile $ config o
104
true
true
0
9
57
66
33
33
null
null
nmohoric/chip8
src/CPU.hs
bsd-3-clause
setI :: CPU -> Word16 -> CPU setI cpu val = cpu & i .~ val & increasePC
91
setI :: CPU -> Word16 -> CPU setI cpu val = cpu & i .~ val & increasePC
91
setI cpu val = cpu & i .~ val & increasePC
62
false
true
0
7
37
36
18
18
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 700553 = 2891
33
getValueFromProduct 700553 = 2891
33
getValueFromProduct 700553 = 2891
33
false
false
0
5
3
9
4
5
null
null
jkozlowski/kdb-haskell
src/Database/Kdb/Internal/Types/KdbTypes.hs
mit
size (KTable n _) = n
28
size (KTable n _) = n
28
size (KTable n _) = n
28
false
false
0
7
12
17
8
9
null
null
vikraman/ghc
libraries/base/GHC/List.hs
bsd-3-clause
null (_:_) = False
32
null (_:_) = False
32
null (_:_) = False
32
false
false
0
6
17
17
8
9
null
null
forsyde/forsyde-shallow
src/ForSyDe/Shallow/MoC/CSDF.hs
bsd-3-clause
sufficient_tokens :: (Num a, Eq a, Ord a) => a -> Signal t -> Bool sufficient_tokens 0 _ = True
99
sufficient_tokens :: (Num a, Eq a, Ord a) => a -> Signal t -> Bool sufficient_tokens 0 _ = True
99
sufficient_tokens 0 _ = True
32
false
true
0
8
23
48
24
24
null
null
stgm/prac-testing
week5/Week5Sol_Q3_NRC.hs
mit
freeInSeq :: [Value] -> [Value] freeInSeq seq = values \\ seq
61
freeInSeq :: [Value] -> [Value] freeInSeq seq = values \\ seq
61
freeInSeq seq = values \\ seq
29
false
true
0
6
10
28
15
13
null
null
diku-dk/futhark
src/Futhark/Analysis/SymbolTable.hs
isc
entryAliases (FParam e) = fparamAliases e
41
entryAliases (FParam e) = fparamAliases e
41
entryAliases (FParam e) = fparamAliases e
41
false
false
0
7
5
18
8
10
null
null
gridaphobe/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
pprConArgs (InfixCon p1 p2) = sep [pprParendLPat p1, pprParendLPat p2]
70
pprConArgs (InfixCon p1 p2) = sep [pprParendLPat p1, pprParendLPat p2]
70
pprConArgs (InfixCon p1 p2) = sep [pprParendLPat p1, pprParendLPat p2]
70
false
false
0
7
9
32
15
17
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/Hl7V2Stores/Messages/Patch.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pldshvsmpUploadProtocol :: Lens' ProjectsLocationsDataSetsHl7V2StoresMessagesPatch (Maybe Text) pldshvsmpUploadProtocol = lens _pldshvsmpUploadProtocol (\ s a -> s{_pldshvsmpUploadProtocol = a})
264
pldshvsmpUploadProtocol :: Lens' ProjectsLocationsDataSetsHl7V2StoresMessagesPatch (Maybe Text) pldshvsmpUploadProtocol = lens _pldshvsmpUploadProtocol (\ s a -> s{_pldshvsmpUploadProtocol = a})
202
pldshvsmpUploadProtocol = lens _pldshvsmpUploadProtocol (\ s a -> s{_pldshvsmpUploadProtocol = a})
106
true
true
0
8
33
49
25
24
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
ipClassNameKey :: Unique ipClassNameKey = mkPreludeClassUnique 45
65
ipClassNameKey :: Unique ipClassNameKey = mkPreludeClassUnique 45
65
ipClassNameKey = mkPreludeClassUnique 45
40
false
true
0
5
6
14
7
7
null
null
karamaan/product-profunctors
Test/CheckTypes.hs
bsd-3-clause
pData3' :: ProductProfunctor p => Data3 (p a a') (p b b') (p c c') -> p (Data3 a b c) (Data3 a' b' c') pData3' = pData3
130
pData3' :: ProductProfunctor p => Data3 (p a a') (p b b') (p c c') -> p (Data3 a b c) (Data3 a' b' c') pData3' = pData3
130
pData3' = pData3
16
false
true
0
9
38
78
38
40
null
null
tomahawkins/mecha
attic/Viewer.hs
bsd-3-clause
loop :: Model -> State -> IO () loop model state = do event <- pollEvent state <- handler event model state when (event /= Quit) $ loop model state
153
loop :: Model -> State -> IO () loop model state = do event <- pollEvent state <- handler event model state when (event /= Quit) $ loop model state
153
loop model state = do event <- pollEvent state <- handler event model state when (event /= Quit) $ loop model state
121
false
true
0
10
35
72
33
39
null
null
hpacheco/HAAP
examples/plab/oracle/BotHugo.hs
mit
maisCurto (_,a1) (_,a2) = if a1 `menorAngulo` a2 then LT else if a1==a2 then EQ else GT
87
maisCurto (_,a1) (_,a2) = if a1 `menorAngulo` a2 then LT else if a1==a2 then EQ else GT
87
maisCurto (_,a1) (_,a2) = if a1 `menorAngulo` a2 then LT else if a1==a2 then EQ else GT
87
false
false
1
7
16
52
29
23
null
null
mdsteele/pylos
src/Pylos/Game.hs
gpl-3.0
setRemovals removals (JumpMove c1 c2 _) = JumpMove c1 c2 removals
65
setRemovals removals (JumpMove c1 c2 _) = JumpMove c1 c2 removals
65
setRemovals removals (JumpMove c1 c2 _) = JumpMove c1 c2 removals
65
false
false
0
7
10
28
13
15
null
null
sgillespie/ghc
testsuite/tests/simplCore/should_compile/simpl007.hs
bsd-3-clause
isPro x = ty x == PRO
21
isPro x = ty x == PRO
21
isPro x = ty x == PRO
21
false
false
0
6
6
16
7
9
null
null
bergey/plots
src/Plots/Types/Pie.hs
bsd-3-clause
-- | Plot a wedge given radius, angle and direction. mkWedgePlotFrom :: (RealFloat n, PointLike v n (Polar n), Num n) => n -> Direction V2 n -> Angle n -> GPiePlot n mkWedgePlotFrom r d a = GPiePlot { sLargeRadius = r , sSmallRadius = 0.01 , sDirection = d , sAngle = a , sArc ...
331
mkWedgePlotFrom :: (RealFloat n, PointLike v n (Polar n), Num n) => n -> Direction V2 n -> Angle n -> GPiePlot n mkWedgePlotFrom r d a = GPiePlot { sLargeRadius = r , sSmallRadius = 0.01 , sDirection = d , sAngle = a , sArc = False }
278
mkWedgePlotFrom r d a = GPiePlot { sLargeRadius = r , sSmallRadius = 0.01 , sDirection = d , sAngle = a , sArc = False }
149
true
true
0
9
104
109
58
51
null
null
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/DeleteUserPolicy.hs
mpl-2.0
-- | The name (friendly name, not ARN) identifying the user that the policy -- is embedded in. dupUserName :: Lens' DeleteUserPolicy Text dupUserName = lens _dupUserName (\ s a -> s{_dupUserName = a})
200
dupUserName :: Lens' DeleteUserPolicy Text dupUserName = lens _dupUserName (\ s a -> s{_dupUserName = a})
105
dupUserName = lens _dupUserName (\ s a -> s{_dupUserName = a})
62
true
true
1
9
33
45
23
22
null
null
ardumont/haskell-lab
test/BSTTests.hs
gpl-2.0
testGreatValues :: Test testGreatValues = TestList["testGreatValue1" ~: testGreatValue1, "testGreatValue2" ~: testGreatValue2, "testGreatValue3" ~: testGreatValue3]
218
testGreatValues :: Test testGreatValues = TestList["testGreatValue1" ~: testGreatValue1, "testGreatValue2" ~: testGreatValue2, "testGreatValue3" ~: testGreatValue3]
218
testGreatValues = TestList["testGreatValue1" ~: testGreatValue1, "testGreatValue2" ~: testGreatValue2, "testGreatValue3" ~: testGreatValue3]
194
false
true
0
7
67
35
19
16
null
null
jsavatgy/dit-doo
too-old/too-old-01.hs
gpl-2.0
lastTplLst s = Map.singleton (last s) 1
39
lastTplLst s = Map.singleton (last s) 1
39
lastTplLst s = Map.singleton (last s) 1
39
false
false
0
7
6
22
10
12
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
bsd-3-clause
notPrelude "Maybe" = "AMaybe"
31
notPrelude "Maybe" = "AMaybe"
31
notPrelude "Maybe" = "AMaybe"
31
false
false
1
5
5
13
4
9
null
null
literate-unitb/literate-unitb
app/Continuous.hs
mit
check_one :: (MonadIO m, MonadState Params m) => Machine -> m (Int,String) check_one m = do param <- get let po = M.findWithDefault M.empty (as_label $ _name m) $ _pos param (po,s,n) <- liftIO $ verify_changes m po put (param { _pos = M.insert (as_label $ _name m) po $ _pos...
395
check_one :: (MonadIO m, MonadState Params m) => Machine -> m (Int,String) check_one m = do param <- get let po = M.findWithDefault M.empty (as_label $ _name m) $ _pos param (po,s,n) <- liftIO $ verify_changes m po put (param { _pos = M.insert (as_label $ _name m) po $ _pos...
395
check_one m = do param <- get let po = M.findWithDefault M.empty (as_label $ _name m) $ _pos param (po,s,n) <- liftIO $ verify_changes m po put (param { _pos = M.insert (as_label $ _name m) po $ _pos param }) return (n,"> machine " ++ pretty (_name m) ++ ":\n" ++ s)
309
false
true
0
16
118
190
92
98
null
null
clnx/muesli
src/Database/Muesli/Handle.hs
mit
-- | Opens a database, reads the transaction log and builds the in-memory indexes. -- -- The @l@ parameter of the resulting 'Handle' should be instantiated by the user -- in order to specify a backend. For example, to use the file backend: -- -- @ -- import qualified Database.Muesli.Handle as DB -- -- openDataBase :: F...
2,485
open :: (MonadIO m, LogState l) => Maybe DbPath -- ^ Log path. Default is @data/docdb.log@. -> Maybe DbPath -- ^ Data path. Default is @data/docdb.dat@. -> Maybe (Int, Int, NominalDiffTime) -- ^ 'Cache.LRUCache' parameters: -- (min cap in bytes, max cap in bytes, max age in seconds). -- Defaults are: (1M...
2,019
open lf df mbc mbcd = do let logPath = fromMaybe ("data" </> "docdb.log") lf let datPath = fromMaybe ("data" </> "docdb.dat") df let (minc, maxc, maxa) = fromMaybe (0x100000, 0x100000 * 10, 60) mbc let coDel = fromMaybe (100 * 1000) mbcd dh <- openDb datPath st <- openDb logPath >>= logInit let m = Master...
1,588
true
true
0
14
915
547
287
260
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Int.hs
bsd-3-clause
neInt32 (I32# x) (I32# y) = isTrue# (x /=# y)
45
neInt32 (I32# x) (I32# y) = isTrue# (x /=# y)
45
neInt32 (I32# x) (I32# y) = isTrue# (x /=# y)
45
false
false
1
7
9
35
16
19
null
null
randen/cabal
Cabal/Distribution/Simple/Compiler.hs
bsd-3-clause
flagToDebugInfoLevel (Just s) = case reads s of [(i, "")] | i >= fromEnum (minBound :: DebugInfoLevel) && i <= fromEnum (maxBound :: DebugInfoLevel) -> toEnum i | otherwise -> error $ "Bad debug info level: " ++ show i ++ ". Valid values are 0..3" _ -> ...
523
flagToDebugInfoLevel (Just s) = case reads s of [(i, "")] | i >= fromEnum (minBound :: DebugInfoLevel) && i <= fromEnum (maxBound :: DebugInfoLevel) -> toEnum i | otherwise -> error $ "Bad debug info level: " ++ show i ++ ". Valid values are 0..3" _ -> ...
523
flagToDebugInfoLevel (Just s) = case reads s of [(i, "")] | i >= fromEnum (minBound :: DebugInfoLevel) && i <= fromEnum (maxBound :: DebugInfoLevel) -> toEnum i | otherwise -> error $ "Bad debug info level: " ++ show i ++ ". Valid values are 0..3" _ -> ...
523
false
false
2
11
134
108
56
52
null
null