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
siddhanathan/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
eqPhase LlvmLlc LlvmLlc = True
37
eqPhase LlvmLlc LlvmLlc = True
37
eqPhase LlvmLlc LlvmLlc = True
37
false
false
0
4
11
13
5
8
null
null
dsj36/dropray
src/Core/LinearAlgebra.hs
gpl-3.0
extent :: Index extent = 4
26
extent :: Index extent = 4
26
extent = 4
10
false
true
0
6
5
18
7
11
null
null
anchor/synchronise
lib/Synchronise/Diff.hs
bsd-3-clause
acceptAll :: MergePolicy acceptAll = MergePolicy {..} where extractLabel = const Unamed merge p1 p2 = (Patch Unamed $ (p1 ^. patchDiff) <> (p2 ^. patchDiff), mempty) -- | Policy: reject all changes. -- -- All input are rejected and the merged diff is empty.
271
acceptAll :: MergePolicy acceptAll = MergePolicy {..} where extractLabel = const Unamed merge p1 p2 = (Patch Unamed $ (p1 ^. patchDiff) <> (p2 ^. patchDiff), mempty) -- | Policy: reject all changes. -- -- All input are rejected and the merged diff is empty.
271
acceptAll = MergePolicy {..} where extractLabel = const Unamed merge p1 p2 = (Patch Unamed $ (p1 ^. patchDiff) <> (p2 ^. patchDiff), mempty) -- | Policy: reject all changes. -- -- All input are rejected and the merged diff is empty.
246
false
true
1
10
58
71
39
32
null
null
andyarvanitis/Idris-dev
src/IRTS/Simplified.hs
bsd-3-clause
sAlt tl (DConstCase c e) = do e' <- simplify tl e return (SConstCase c e')
104
sAlt tl (DConstCase c e) = do e' <- simplify tl e return (SConstCase c e')
104
sAlt tl (DConstCase c e) = do e' <- simplify tl e return (SConstCase c e')
104
false
false
0
9
45
47
20
27
null
null
philippos2/ticktacktoe
src/Lib.hs
bsd-3-clause
------------------------------------------------------------------------------- {------------------------------------------------ ゲームルーチン ------------------------------------------------} play :: Bool -> StateT Board IO String play isCpusTurn = do if isCpusTurn then cpusTurn else usersTurn board <- get ...
581
play :: Bool -> StateT Board IO String play isCpusTurn = do if isCpusTurn then cpusTurn else usersTurn board <- get liftIO $ printBoard board --liftIO $ print board case judge board of Nothing -> (play $ not isCpusTurn) Just result -> return result {--------------------------------------...
390
play isCpusTurn = do if isCpusTurn then cpusTurn else usersTurn board <- get liftIO $ printBoard board --liftIO $ print board case judge board of Nothing -> (play $ not isCpusTurn) Just result -> return result {------------------------------------------------ ユーザ側ターン ------------------...
351
true
true
0
12
87
95
46
49
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | Creates a value of 'InstanceGroupManagerAggregatedListItems' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'igmaliAddtional' instanceGroupManagerAggregatedListItems :: HashMap Text InstanceGroupManagersScopedList -- ^ 'igmal...
542
instanceGroupManagerAggregatedListItems :: HashMap Text InstanceGroupManagersScopedList -- ^ 'igmaliAddtional' -> InstanceGroupManagerAggregatedListItems instanceGroupManagerAggregatedListItems pIgmaliAddtional_ = InstanceGroupManagerAggregatedListItems' { _igmaliAddtional = _Coerce # pIgmaliAddtional_ ...
325
instanceGroupManagerAggregatedListItems pIgmaliAddtional_ = InstanceGroupManagerAggregatedListItems' { _igmaliAddtional = _Coerce # pIgmaliAddtional_ }
163
true
true
0
8
74
50
26
24
null
null
banacorn/Graphentheoretische-Paralleler-Algorithmus
src/Graph/Repa.hs
mit
insert :: Vertices U -> Vertex -> Vertices U insert arr n = computeS (traverse arr id hit) where hit f i | i == (Z :. n) = True | otherwise = f i
171
insert :: Vertices U -> Vertex -> Vertices U insert arr n = computeS (traverse arr id hit) where hit f i | i == (Z :. n) = True | otherwise = f i
171
insert arr n = computeS (traverse arr id hit) where hit f i | i == (Z :. n) = True | otherwise = f i
126
false
true
0
10
60
84
39
45
null
null
aeyakovenko/rbm
Examples/Mnist.hs
mit
-- size of the minibatch rowCount :: Int rowCount = 5
53
rowCount :: Int rowCount = 5
28
rowCount = 5
12
true
true
0
4
10
12
7
5
null
null
AlephAlpha/Samau
OldSamau/Eval.hs
gpl-2.0
smIntersperse (x:SmString xs:s) = SmString (intersperse (toChar x) xs):s
72
smIntersperse (x:SmString xs:s) = SmString (intersperse (toChar x) xs):s
72
smIntersperse (x:SmString xs:s) = SmString (intersperse (toChar x) xs):s
72
false
false
0
10
8
44
21
23
null
null
LightAndLight/pl0-haskell
src/Data/ITree.hs
bsd-3-clause
getValue :: ITree k a -> a getValue = fst . getITree
52
getValue :: ITree k a -> a getValue = fst . getITree
52
getValue = fst . getITree
25
false
true
1
7
11
32
13
19
null
null
urbanslug/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
------------ emptyLocalBinds :: HsLocalBindsLR a b emptyLocalBinds = EmptyLocalBinds
84
emptyLocalBinds :: HsLocalBindsLR a b emptyLocalBinds = EmptyLocalBinds
71
emptyLocalBinds = EmptyLocalBinds
33
true
true
0
5
8
17
9
8
null
null
xyzzyz/fastirc
Network/FastIRC/Session.hs
bsd-3-clause
onMessage :: BotSession -> (Message -> Bot ()) -> IO EventHandler onMessage bs f = onEvent bs $ \ev -> case ev of MessageEvent msg -> f msg; _ -> return () -- | Action to run on quit.
184
onMessage :: BotSession -> (Message -> Bot ()) -> IO EventHandler onMessage bs f = onEvent bs $ \ev -> case ev of MessageEvent msg -> f msg; _ -> return () -- | Action to run on quit.
184
onMessage bs f = onEvent bs $ \ev -> case ev of MessageEvent msg -> f msg; _ -> return () -- | Action to run on quit.
118
false
true
0
11
39
84
40
44
null
null
vialette/ppattern
src/Data/Algorithm/PPattern/Geometry/Point/List.hs
mit
moveY :: Int -> [Point.Point] -> [Point.Point] moveY j ps = mkFromList $ List.zip xs ys where xs = fmap Point.xCoord ps ys = fmap ((+j) . Point.yCoord) ps {-| Make a list of points from a list of points shifting x-coordinates (resp. y-coordinates) by 'i' (resp. 'j'). -}
317
moveY :: Int -> [Point.Point] -> [Point.Point] moveY j ps = mkFromList $ List.zip xs ys where xs = fmap Point.xCoord ps ys = fmap ((+j) . Point.yCoord) ps {-| Make a list of points from a list of points shifting x-coordinates (resp. y-coordinates) by 'i' (resp. 'j'). -}
313
moveY j ps = mkFromList $ List.zip xs ys where xs = fmap Point.xCoord ps ys = fmap ((+j) . Point.yCoord) ps {-| Make a list of points from a list of points shifting x-coordinates (resp. y-coordinates) by 'i' (resp. 'j'). -}
266
false
true
0
10
95
85
44
41
null
null
sinelaw/infernu
src/Infernu/Parse.hs
gpl-2.0
chainDecls f (ES3.VarDecl z' (ES3.Id _ name) v:xs) k = ELet (gen z') name v' (chainDecls f xs k) where ref' = if Set.member name (mutableVars f) then mkRef z' else id v' = case v of Just v'' -> addDecl z' name $ ref' $ fromExpression f v'' ...
366
chainDecls f (ES3.VarDecl z' (ES3.Id _ name) v:xs) k = ELet (gen z') name v' (chainDecls f xs k) where ref' = if Set.member name (mutableVars f) then mkRef z' else id v' = case v of Just v'' -> addDecl z' name $ ref' $ fromExpression f v'' ...
366
chainDecls f (ES3.VarDecl z' (ES3.Id _ name) v:xs) k = ELet (gen z') name v' (chainDecls f xs k) where ref' = if Set.member name (mutableVars f) then mkRef z' else id v' = case v of Just v'' -> addDecl z' name $ ref' $ fromExpression f v'' ...
366
false
false
0
14
137
154
75
79
null
null
rahulmutt/ghcvm
compiler/Eta/HsSyn/HsExpr.hs
bsd-3-clause
pprStmt (BodyStmt expr _ _ _) = ppr expr
44
pprStmt (BodyStmt expr _ _ _) = ppr expr
44
pprStmt (BodyStmt expr _ _ _) = ppr expr
44
false
false
0
6
12
25
11
14
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/Labels/List.hs
mpl-2.0
-- | JSONP alllCallback :: Lens' AccountsLabelsList (Maybe Text) alllCallback = lens _alllCallback (\ s a -> s{_alllCallback = a})
132
alllCallback :: Lens' AccountsLabelsList (Maybe Text) alllCallback = lens _alllCallback (\ s a -> s{_alllCallback = a})
121
alllCallback = lens _alllCallback (\ s a -> s{_alllCallback = a})
67
true
true
0
9
21
49
25
24
null
null
ghc-android/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
shortRelativePath :: FilePath -> FilePath -> FilePath shortRelativePath from to = case dropCommonPrefix (splitDirectories from) (splitDirectories to) of (stuff, path) -> joinPath (map (const "..") stuff ++ path) where dropCommonPrefix :: Eq a => [a] -> [a] -> ([a],[a]) dropCommonPrefix (x:xs) (y:y...
617
shortRelativePath :: FilePath -> FilePath -> FilePath shortRelativePath from to = case dropCommonPrefix (splitDirectories from) (splitDirectories to) of (stuff, path) -> joinPath (map (const "..") stuff ++ path) where dropCommonPrefix :: Eq a => [a] -> [a] -> ([a],[a]) dropCommonPrefix (x:xs) (y:y...
617
shortRelativePath from to = case dropCommonPrefix (splitDirectories from) (splitDirectories to) of (stuff, path) -> joinPath (map (const "..") stuff ++ path) where dropCommonPrefix :: Eq a => [a] -> [a] -> ([a],[a]) dropCommonPrefix (x:xs) (y:ys) | x == y = dropCommonPrefix xs ys dr...
563
false
true
5
13
108
177
94
83
null
null
ailiev/faerieplay-compiler
Faerieplay/Intermediate.hs
bsd-3-clause
-- the location in bytes: getStrTByteLocs (_, locs) = map byteloc locs
73
getStrTByteLocs (_, locs) = map byteloc locs
47
getStrTByteLocs (_, locs) = map byteloc locs
47
true
false
0
6
14
21
11
10
null
null
limaner2002/EPC-tools
USACScripts/src/Scripts/FCCForm471.hs
bsd-3-clause
arbLineItemCost Regular = QC.arbitrary
38
arbLineItemCost Regular = QC.arbitrary
38
arbLineItemCost Regular = QC.arbitrary
38
false
false
0
5
3
12
5
7
null
null
d0kt0r0/InnerEar
src/InnerEar/Widgets/AnswerButton.hs
gpl-3.0
showAnswerButton :: (MonadWidget t m, Show a) => a -> Dynamic t AnswerButtonMode -> m (Event t a) showAnswerButton a m = answerButton (show a) m a
146
showAnswerButton :: (MonadWidget t m, Show a) => a -> Dynamic t AnswerButtonMode -> m (Event t a) showAnswerButton a m = answerButton (show a) m a
146
showAnswerButton a m = answerButton (show a) m a
48
false
true
0
10
26
70
34
36
null
null
alios/iho-presentation
Data/IHO/S52/SVG.hs
bsd-3-clause
drawLines :: PresentationLib lib => lib -> Text -> [Vector2] -> Svg drawLines lib ls ps = let r = maybe (error "unable to lookupLineStyle") id $ lookupLineStyle ls lib in SVG.g $ drawLines' r 0 ps
213
drawLines :: PresentationLib lib => lib -> Text -> [Vector2] -> Svg drawLines lib ls ps = let r = maybe (error "unable to lookupLineStyle") id $ lookupLineStyle ls lib in SVG.g $ drawLines' r 0 ps
213
drawLines lib ls ps = let r = maybe (error "unable to lookupLineStyle") id $ lookupLineStyle ls lib in SVG.g $ drawLines' r 0 ps
145
false
true
0
12
53
84
40
44
null
null
jwaldmann/s
L/Eval.hs
gpl-3.0
find_monster_to bound = do top <- atomically $ newTVar 0 forM_ (concat $ S.terms_for [S.J]) $ \ t -> do -- forM_ (concat S.normalforms) $ \ t -> do best <- atomically $ readTVar top -- let res = eval bound t ms <- eval_musec bound t let res = do m <- ms ; return (m,Nothi...
587
find_monster_to bound = do top <- atomically $ newTVar 0 forM_ (concat $ S.terms_for [S.J]) $ \ t -> do -- forM_ (concat S.normalforms) $ \ t -> do best <- atomically $ readTVar top -- let res = eval bound t ms <- eval_musec bound t let res = do m <- ms ; return (m,Nothi...
587
find_monster_to bound = do top <- atomically $ newTVar 0 forM_ (concat $ S.terms_for [S.J]) $ \ t -> do -- forM_ (concat S.normalforms) $ \ t -> do best <- atomically $ readTVar top -- let res = eval bound t ms <- eval_musec bound t let res = do m <- ms ; return (m,Nothi...
587
false
false
1
21
226
207
101
106
null
null
ajnsit/custom-prelude
test-is-a-prelude.hs
gpl-3.0
odd = P.odd
11
odd = P.odd
11
odd = P.odd
11
false
false
0
5
2
8
4
4
null
null
elliottt/hsirc
tests/Main.hs
bsd-3-clause
main :: IO () main = defaultMain tests
38
main :: IO () main = defaultMain tests
38
main = defaultMain tests
24
false
true
0
6
7
19
9
10
null
null
nomeata/ghc
compiler/codeGen/CgForeignCall.hs
bsd-3-clause
resumeThread = CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "resumeThread")))
86
resumeThread = CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "resumeThread")))
86
resumeThread = CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "resumeThread")))
86
false
false
0
11
8
29
14
15
null
null
rsachtl/world_simulator
src/Region.hs
mit
adjustPopulationByFood :: Region -> Region adjustPopulationByFood r = r {population = newPop, happiness = happiness r + foodDiff} where food = Map.findWithDefault 0 Food $ ressources r foodDiff = div ((food * 1000) - population r) 1000 popChange = foodDiff * (div (population r) 100) newPop = populatio...
335
adjustPopulationByFood :: Region -> Region adjustPopulationByFood r = r {population = newPop, happiness = happiness r + foodDiff} where food = Map.findWithDefault 0 Food $ ressources r foodDiff = div ((food * 1000) - population r) 1000 popChange = foodDiff * (div (population r) 100) newPop = populatio...
335
adjustPopulationByFood r = r {population = newPop, happiness = happiness r + foodDiff} where food = Map.findWithDefault 0 Food $ ressources r foodDiff = div ((food * 1000) - population r) 1000 popChange = foodDiff * (div (population r) 100) newPop = population r + popChange
292
false
true
3
12
68
125
63
62
null
null
dolio/vector
Data/Vector.hs
bsd-3-clause
minimumBy = G.minimumBy
23
minimumBy = G.minimumBy
23
minimumBy = G.minimumBy
23
false
false
1
6
2
12
4
8
null
null
pawel-n/semi-iso
Control/SIArrow.hs
mit
(^>>) :: SIArrow cat => ASemiIso' a b -> cat b c -> cat a c f ^>> a = a . siarr f
81
(^>>) :: SIArrow cat => ASemiIso' a b -> cat b c -> cat a c f ^>> a = a . siarr f
81
f ^>> a = a . siarr f
21
false
true
1
10
23
61
27
34
null
null
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/Types.hs
mpl-2.0
-- | Protocol to use (http, https) when redirecting requests. The default is the -- protocol that is used in the original request. rProtocol :: Lens' Redirect (Maybe Protocol) rProtocol = lens _rProtocol (\s a -> s { _rProtocol = a })
234
rProtocol :: Lens' Redirect (Maybe Protocol) rProtocol = lens _rProtocol (\s a -> s { _rProtocol = a })
103
rProtocol = lens _rProtocol (\s a -> s { _rProtocol = a })
58
true
true
0
9
41
47
26
21
null
null
jstolarek/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
--------------------------------------------------------------------------- -- * Exp -- | Dynamically binding a variable (unhygenic) dyn :: String -> ExpQ dyn s = return (VarE (mkName s))
190
dyn :: String -> ExpQ dyn s = return (VarE (mkName s))
54
dyn s = return (VarE (mkName s))
32
true
true
0
9
25
41
20
21
null
null
mikolajsacha/HaskellPics
pixelmaps.hs
gpl-3.0
filterHue :: Double -> Double -> RGB8 -> RGB8 filterHue l r rgb | filterHls (l, r) (0, 360) (0, 360) rgb = rgb | otherwise = (0, 0, 0)
138
filterHue :: Double -> Double -> RGB8 -> RGB8 filterHue l r rgb | filterHls (l, r) (0, 360) (0, 360) rgb = rgb | otherwise = (0, 0, 0)
138
filterHue l r rgb | filterHls (l, r) (0, 360) (0, 360) rgb = rgb | otherwise = (0, 0, 0)
92
false
true
1
9
33
80
43
37
null
null
projedi/fluidsynth-hs-complete
src/Sound/Fluidsynth/Synth.hs
bsd-3-clause
-- | Remove SoundFont from stack but without deleting it removeSoundFont :: SoundFont -> FluidSynth () removeSoundFont = undefined
130
removeSoundFont :: SoundFont -> FluidSynth () removeSoundFont = undefined
73
removeSoundFont = undefined
27
true
true
0
8
18
27
12
15
null
null
afcowie/new-snap-server
src/Snap/Internal/Http/Server/Config.hs
bsd-3-clause
------------------------------------------------------------------------------ toString :: ByteString -> String toString = T.unpack . T.decodeUtf8
146
toString :: ByteString -> String toString = T.unpack . T.decodeUtf8
67
toString = T.unpack . T.decodeUtf8
34
true
true
0
7
10
31
14
17
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
uncourageously = id
19
uncourageously = id
19
uncourageously = id
19
false
false
0
4
2
6
3
3
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/tests/builder/Data/ByteString/Builder/Tests.hs
mit
buildAction (ModState i) = do s <- get lift $ putBuilder $ intDec s put (s - i)
102
buildAction (ModState i) = do s <- get lift $ putBuilder $ intDec s put (s - i)
102
buildAction (ModState i) = do s <- get lift $ putBuilder $ intDec s put (s - i)
102
false
false
0
9
40
49
22
27
null
null
nevrenato/HetsAlloy
LF/Sign.hs
gpl-2.0
printExp (Const s) = pretty s
29
printExp (Const s) = pretty s
29
printExp (Const s) = pretty s
29
false
false
0
7
5
18
8
10
null
null
dmvianna/haskellbook
src/Ch12-smart.hs
unlicense
countTheBeforeVowel' :: [String] -> Int countTheBeforeVowel' strings = go strings 0 where go (_:[]) acc = acc go (aWord:bWord@(ch:_):tWords) acc = if aWord == "the" && ch `elem` "aeiou" then go (bWord:tWords) (acc + 1) else go (bWord:tWords) acc
319
countTheBeforeVowel' :: [String] -> Int countTheBeforeVowel' strings = go strings 0 where go (_:[]) acc = acc go (aWord:bWord@(ch:_):tWords) acc = if aWord == "the" && ch `elem` "aeiou" then go (bWord:tWords) (acc + 1) else go (bWord:tWords) acc
319
countTheBeforeVowel' strings = go strings 0 where go (_:[]) acc = acc go (aWord:bWord@(ch:_):tWords) acc = if aWord == "the" && ch `elem` "aeiou" then go (bWord:tWords) (acc + 1) else go (bWord:tWords) acc
279
false
true
2
12
112
145
71
74
null
null
hvr/containers
Data/IntSet/Base.hs
bsd-3-clause
{-------------------------------------------------------------------- Fold --------------------------------------------------------------------} -- | /O(n)/. Fold the elements in the set using the given right-associative -- binary operator. This function is an equivalent of 'foldr' and is present -- for compatibility...
459
fold :: (Key -> b -> b) -> b -> IntSet -> b fold = foldr
56
fold = foldr
12
true
true
0
9
64
47
25
22
null
null
ctford/Idris-Elba-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
isConstType (B32V _) (AType (ATInt _)) = True
45
isConstType (B32V _) (AType (ATInt _)) = True
45
isConstType (B32V _) (AType (ATInt _)) = True
45
false
false
0
9
7
29
14
15
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
-- | Get the CountryCode from the text code. Errors if the code is unknown fromText :: T.Text -> CountryCode fromText c = case fromMText c of Just cc -> cc _ -> error $ "fromText: Unknown country code:" ++ T.unpack c -- | Get the code as text.
280
fromText :: T.Text -> CountryCode fromText c = case fromMText c of Just cc -> cc _ -> error $ "fromText: Unknown country code:" ++ T.unpack c -- | Get the code as text.
205
fromText c = case fromMText c of Just cc -> cc _ -> error $ "fromText: Unknown country code:" ++ T.unpack c -- | Get the code as text.
171
true
true
0
10
85
57
28
29
null
null
kosmikus/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
checkSpecVersion :: PackageDescription -> [Int] -> Bool -> PackageCheck -> Maybe PackageCheck checkSpecVersion pkg specver cond pc | specVersion pkg >= Version specver [] = Nothing | otherwise = check cond pc
257
checkSpecVersion :: PackageDescription -> [Int] -> Bool -> PackageCheck -> Maybe PackageCheck checkSpecVersion pkg specver cond pc | specVersion pkg >= Version specver [] = Nothing | otherwise = check cond pc
257
checkSpecVersion pkg specver cond pc | specVersion pkg >= Version specver [] = Nothing | otherwise = check cond pc
146
false
true
1
10
80
74
35
39
null
null
jstolarek/ghc
libraries/base/Data/Typeable/Internal.hs
bsd-3-clause
----------------- Observation --------------------- -- | Observe the type constructor of a type representation typeRepTyCon :: TypeRep -> TyCon typeRepTyCon (TypeRep _ tc _) = tc
179
typeRepTyCon :: TypeRep -> TyCon typeRepTyCon (TypeRep _ tc _) = tc
67
typeRepTyCon (TypeRep _ tc _) = tc
34
true
true
0
7
25
30
16
14
null
null
markus1189/xmonad-contrib-710
XMonad/Hooks/ToggleHook.hs
bsd-3-clause
{- Helper functions -} _set :: String -> ((a -> a) -> (Bool, Bool) -> (Bool, Bool)) -> a -> X () _set n f b = modify' n (f $ const b)
134
_set :: String -> ((a -> a) -> (Bool, Bool) -> (Bool, Bool)) -> a -> X () _set n f b = modify' n (f $ const b)
110
_set n f b = modify' n (f $ const b)
36
true
true
0
11
33
87
44
43
null
null
neilmayhew/DebianAnalytics
Parse.hs
gpl-3.0
space_ = void space
20
space_ = void space
20
space_ = void space
20
false
false
0
5
4
9
4
5
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/Key.hs
bsd-3-clause
keyTranslate "F4" = Fun 4
36
keyTranslate "F4" = Fun 4
36
keyTranslate "F4" = Fun 4
36
false
false
0
5
15
12
5
7
null
null
Teaspot-Studio/netwire
Control/Wire/Event.hs
bsd-3-clause
at :: (HasTime t s) => t -- ^ Time of occurrence. -> Wire s e m a (Event a) at t' = mkSF $ \ds x -> let t = t' - dtime ds in if t <= 0 then (Event x, never) else (NoEvent, at t)
236
at :: (HasTime t s) => t -- ^ Time of occurrence. -> Wire s e m a (Event a) at t' = mkSF $ \ds x -> let t = t' - dtime ds in if t <= 0 then (Event x, never) else (NoEvent, at t)
236
at t' = mkSF $ \ds x -> let t = t' - dtime ds in if t <= 0 then (Event x, never) else (NoEvent, at t)
147
false
true
0
12
106
106
55
51
null
null
jstolarek/haddock
haddock-api/src/Haddock/Backends/LaTeX.hs
bsd-2-clause
ppBang _ = char '!'
26
ppBang _ = char '!'
26
ppBang _ = char '!'
26
false
false
0
5
11
12
5
7
null
null
brendanhay/gogol
gogol-clouderrorreporting/gen/Network/Google/Resource/CloudErrorReporting/Projects/Events/Report.hs
mpl-2.0
-- | OAuth access token. perAccessToken :: Lens' ProjectsEventsReport (Maybe Text) perAccessToken = lens _perAccessToken (\ s a -> s{_perAccessToken = a})
162
perAccessToken :: Lens' ProjectsEventsReport (Maybe Text) perAccessToken = lens _perAccessToken (\ s a -> s{_perAccessToken = a})
137
perAccessToken = lens _perAccessToken (\ s a -> s{_perAccessToken = a})
79
true
true
1
9
29
51
25
26
null
null
dmatveev/oak
Graphics/UI/Oak/Widgets.hs
bsd-3-clause
isBox :: Widget i m -> Bool isBox (HBox _) = True
60
isBox :: Widget i m -> Bool isBox (HBox _) = True
60
isBox (HBox _) = True
32
false
true
0
6
22
33
15
18
null
null
robstewart57/small-image-processing-dsl-implementations
haskell/small-image-processing-dsl/app/deep-accelerate/prog3.hs
bsd-3-clause
main = do args <- getArgs let [inImg,outImg] = args img1 <- readImgAsAccelerateArray inImg m <- read <$> getLine newImg <- printTime (run ((darkenBy m . brightenBy m) img1)) writeAccelerateImg outImg newImg
230
main = do args <- getArgs let [inImg,outImg] = args img1 <- readImgAsAccelerateArray inImg m <- read <$> getLine newImg <- printTime (run ((darkenBy m . brightenBy m) img1)) writeAccelerateImg outImg newImg
230
main = do args <- getArgs let [inImg,outImg] = args img1 <- readImgAsAccelerateArray inImg m <- read <$> getLine newImg <- printTime (run ((darkenBy m . brightenBy m) img1)) writeAccelerateImg outImg newImg
230
false
false
0
15
55
93
42
51
null
null
binarin/learnopengl
src/Hello.hs
bsd-3-clause
doubleTrianglesDifferentColors :: IO (IO (), IO ()) doubleTrianglesDifferentColors = do [vao1, vao2] <- GL.genVertexArrays 2 [vbo1, vbo2] <- GL.genBuffers 2 GL.bindVertexArray vao1 GL.bindBuffer GL.TargetArray vbo1 GL.floatBufferData GL.TargetArray GL.UsageStaticDraw [ 0.5, -0.5, 0.0 , -0.5, -0.5, 0...
1,341
doubleTrianglesDifferentColors :: IO (IO (), IO ()) doubleTrianglesDifferentColors = do [vao1, vao2] <- GL.genVertexArrays 2 [vbo1, vbo2] <- GL.genBuffers 2 GL.bindVertexArray vao1 GL.bindBuffer GL.TargetArray vbo1 GL.floatBufferData GL.TargetArray GL.UsageStaticDraw [ 0.5, -0.5, 0.0 , -0.5, -0.5, 0...
1,341
doubleTrianglesDifferentColors = do [vao1, vao2] <- GL.genVertexArrays 2 [vbo1, vbo2] <- GL.genBuffers 2 GL.bindVertexArray vao1 GL.bindBuffer GL.TargetArray vbo1 GL.floatBufferData GL.TargetArray GL.UsageStaticDraw [ 0.5, -0.5, 0.0 , -0.5, -0.5, 0.0 , 0, 0.5, 0.0 ] GL.vertexAttribPoin...
1,289
false
true
0
13
306
431
202
229
null
null
hguenther/fac
Formula.hs
gpl-3.0
formulaMux :: Lit -- ^ Output -> Lit -- ^ False branch -> Lit -- ^ True branch -> Lit -- ^ Predicate/selector -> Formula formulaMux out inpF inpT inpP = formulaFromList cls where cls = [ [litNeg out, inpF, inpT] , [litNeg out, inpF, inpP] ,...
451
formulaMux :: Lit -- ^ Output -> Lit -- ^ False branch -> Lit -- ^ True branch -> Lit -- ^ Predicate/selector -> Formula formulaMux out inpF inpT inpP = formulaFromList cls where cls = [ [litNeg out, inpF, inpT] , [litNeg out, inpF, inpP] ,...
451
formulaMux out inpF inpT inpP = formulaFromList cls where cls = [ [litNeg out, inpF, inpT] , [litNeg out, inpF, inpP] , [litNeg out, inpT, litNeg inpP] , [ out, litNeg inpF, inpP] , [ out, litNeg inpT, litNeg inpP] ]
282
false
true
1
10
179
141
75
66
null
null
shangaslammi/haskell-iter
src/Data/Iter.hs
mit
izip StopIteration _ = StopIteration
40
izip StopIteration _ = StopIteration
40
izip StopIteration _ = StopIteration
40
false
false
0
4
8
13
5
8
null
null
Lupino/mysql-session
example/Main.hs
bsd-3-clause
main :: IO () main = do conn <- dbconnect session <- Vault.newKey conn' <- fromSimpleConnection conn store <- dbStore conn' def purger conn' def run 3000 $ withSession store (fromString "SESSION") def session $ app conn session
251
main :: IO () main = do conn <- dbconnect session <- Vault.newKey conn' <- fromSimpleConnection conn store <- dbStore conn' def purger conn' def run 3000 $ withSession store (fromString "SESSION") def session $ app conn session
251
main = do conn <- dbconnect session <- Vault.newKey conn' <- fromSimpleConnection conn store <- dbStore conn' def purger conn' def run 3000 $ withSession store (fromString "SESSION") def session $ app conn session
237
false
true
0
11
61
96
42
54
null
null
romanb/amazonka
amazonka-datapipeline/gen/Network/AWS/DataPipeline/PutPipelineDefinition.hs
mpl-2.0
-- | The objects that define the pipeline. These objects overwrite the existing -- pipeline definition. ppdPipelineObjects :: Lens' PutPipelineDefinition [PipelineObject] ppdPipelineObjects = lens _ppdPipelineObjects (\s a -> s { _ppdPipelineObjects = a }) . _List
276
ppdPipelineObjects :: Lens' PutPipelineDefinition [PipelineObject] ppdPipelineObjects = lens _ppdPipelineObjects (\s a -> s { _ppdPipelineObjects = a }) . _List
172
ppdPipelineObjects = lens _ppdPipelineObjects (\s a -> s { _ppdPipelineObjects = a }) . _List
105
true
true
2
8
47
55
27
28
null
null
MasseR/xmonadcontrib
XMonad/Prompt.hs
bsd-3-clause
readHistory :: IO History readHistory = readHist `catch` \(SomeException _) -> return emptyHistory where readHist = do path <- getHistoryFile xs <- bracket (openFile path ReadMode) hClose hGetLine readIO xs
235
readHistory :: IO History readHistory = readHist `catch` \(SomeException _) -> return emptyHistory where readHist = do path <- getHistoryFile xs <- bracket (openFile path ReadMode) hClose hGetLine readIO xs
235
readHistory = readHist `catch` \(SomeException _) -> return emptyHistory where readHist = do path <- getHistoryFile xs <- bracket (openFile path ReadMode) hClose hGetLine readIO xs
209
false
true
1
11
58
81
37
44
null
null
pminten/xhaskell
meetup/example.hs
mit
addWeeks :: Int -> Day -> Day addWeeks = addDays . (7 *) . fromIntegral
71
addWeeks :: Int -> Day -> Day addWeeks = addDays . (7 *) . fromIntegral
71
addWeeks = addDays . (7 *) . fromIntegral
41
false
true
0
7
14
31
17
14
null
null
NorfairKing/the-notes
src/Sets/Multiset/Macro.hs
gpl-2.0
-- | Multiset union msetun :: Note -> Note -> Note msetun = binop $ setunsign ^: comm0 "sharp"
94
msetun :: Note -> Note -> Note msetun = binop $ setunsign ^: comm0 "sharp"
74
msetun = binop $ setunsign ^: comm0 "sharp"
43
true
true
0
6
18
31
16
15
null
null
kaoskorobase/mescaline
resources/hugs/packages/base/Data/Set.hs
gpl-3.0
-- | /O(log n)/. Performs a 'split' but also returns the pivot -- element that was found in the original set. splitLookup :: Ord a => a -> Set a -> (Set a,Maybe a,Set a) splitLookup x Tip = (Tip,Nothing,Tip)
207
splitLookup :: Ord a => a -> Set a -> (Set a,Maybe a,Set a) splitLookup x Tip = (Tip,Nothing,Tip)
97
splitLookup x Tip = (Tip,Nothing,Tip)
37
true
true
0
9
39
63
33
30
null
null
EJahren/PBCompOutputChecker
src/ParseInput.hs
bsd-3-clause
rhs = number
12
rhs = number
12
rhs = number
12
false
false
1
5
2
10
3
7
null
null
peterokagey/haskellOEIS
test/HypercubeColorings/A333362Spec.hs
apache-2.0
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
7
7
25
10
15
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Testing/Random.hs
bsd-3-clause
-- TODO this is really a hack randomInt :: MonadRandom m => m Integer randomInt = getRandomR (-10^(6::Int), 10^(6::Int))
120
randomInt :: MonadRandom m => m Integer randomInt = getRandomR (-10^(6::Int), 10^(6::Int))
90
randomInt = getRandomR (-10^(6::Int), 10^(6::Int))
50
true
true
0
8
18
53
29
24
null
null
jozefg/c_of_scheme
src/CodeGen.hs
mit
generate (Prim p) = generatePrim p
35
generate (Prim p) = generatePrim p
35
generate (Prim p) = generatePrim p
35
false
false
0
7
6
18
8
10
null
null
emilaxelsson/haskell-exp-parser
src/Language/Haskell/ParseExp.hs
bsd-3-clause
-- | Parse a tuple expression -- -- This also handles empty tuples ('()') and parenthesized expressions tuple :: ReadP Exp tuple = do es <- between (char '(') (char ')') (skipSpace >> expressionList) -- skipSpace needed to parse empty tuples with space inside case es of [] -> return $ ConE $ mkNa...
439
tuple :: ReadP Exp tuple = do es <- between (char '(') (char ')') (skipSpace >> expressionList) -- skipSpace needed to parse empty tuples with space inside case es of [] -> return $ ConE $ mkName "()" [e] -> return e _ -> return $ mk_tupE es -- | Parse an expression that is not...
335
tuple = do es <- between (char '(') (char ')') (skipSpace >> expressionList) -- skipSpace needed to parse empty tuples with space inside case es of [] -> return $ ConE $ mkName "()" [e] -> return e _ -> return $ mk_tupE es -- | Parse an expression that is not an application
316
true
true
1
12
116
107
52
55
null
null
m0ar/safe-streaming
src/Control/Applicative/LApplicative.hs
bsd-3-clause
forever :: LApplicative f => f () -> f a forever a = let a' = a *> a' in a'
75
forever :: LApplicative f => f () -> f a forever a = let a' = a *> a' in a'
75
forever a = let a' = a *> a' in a'
34
false
true
0
9
20
53
23
30
null
null
csrhodes/pandoc
pandoc.hs
gpl-2.0
isTextFormat :: String -> Bool isTextFormat s = takeWhile (`notElem` "+-") s `notElem` binaries where binaries = ["odt","docx","epub","epub3"]
144
isTextFormat :: String -> Bool isTextFormat s = takeWhile (`notElem` "+-") s `notElem` binaries where binaries = ["odt","docx","epub","epub3"]
144
isTextFormat s = takeWhile (`notElem` "+-") s `notElem` binaries where binaries = ["odt","docx","epub","epub3"]
113
false
true
0
7
19
55
32
23
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
-- | Not enough resources (iallocator failure, disk space, memory, etc) errorsEcodeNores :: String errorsEcodeNores = "insufficient_resources"
142
errorsEcodeNores :: String errorsEcodeNores = "insufficient_resources"
70
errorsEcodeNores = "insufficient_resources"
43
true
true
0
6
16
19
8
11
null
null
csabahruska/GFXDemo
GLBackend.hs
bsd-3-clause
newGLFramebuffer :: IO GLFramebuffer newGLFramebuffer = GLFramebuffer <$> (alloca $ \pto -> glGenFramebuffers 1 pto >> peek pto) <*> glGetIntegerv1 gl_MAX_COLOR_ATTACHMENTS
172
newGLFramebuffer :: IO GLFramebuffer newGLFramebuffer = GLFramebuffer <$> (alloca $ \pto -> glGenFramebuffers 1 pto >> peek pto) <*> glGetIntegerv1 gl_MAX_COLOR_ATTACHMENTS
172
newGLFramebuffer = GLFramebuffer <$> (alloca $ \pto -> glGenFramebuffers 1 pto >> peek pto) <*> glGetIntegerv1 gl_MAX_COLOR_ATTACHMENTS
135
false
true
0
11
20
49
24
25
null
null
gwright83/Wheeler
src/Math/Symbolic/Wheeler/DiracSpinor.hs
bsd-3-clause
-- A Dirac gamma matrix in four dimensions. -- diracGamma_ :: RepSpace -> VarIndex -> Expr diracGamma_ r i = let indices = [ i ] in if checkIndicesInManifold minkowskiManifold indices then unsafePerformIO $ do ident <- nextId ...
1,251
diracGamma_ :: RepSpace -> VarIndex -> Expr diracGamma_ r i = let indices = [ i ] in if checkIndicesInManifold minkowskiManifold indices then unsafePerformIO $ do ident <- nextId return $ Symbol $ Tensor T { tensorIdentifier ...
1,204
diracGamma_ r i = let indices = [ i ] in if checkIndicesInManifold minkowskiManifold indices then unsafePerformIO $ do ident <- nextId return $ Symbol $ Tensor T { tensorIdentifier = ident ...
1,160
true
true
0
15
755
160
89
71
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeVPNGateways.hs
mpl-2.0
-- | Creates a value of 'DescribeVPNGateways' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dvgsFilters' -- -- * 'dvgsVPNGatewayIds' -- -- * 'dvgsDryRun' describeVPNGateways :: DescribeVPNGateways describeVPNGateways = Descr...
433
describeVPNGateways :: DescribeVPNGateways describeVPNGateways = DescribeVPNGateways' { _dvgsFilters = Nothing , _dvgsVPNGatewayIds = Nothing , _dvgsDryRun = Nothing }
191
describeVPNGateways = DescribeVPNGateways' { _dvgsFilters = Nothing , _dvgsVPNGatewayIds = Nothing , _dvgsDryRun = Nothing }
144
true
true
0
6
84
40
28
12
null
null
rvion/ride
jetpack/src/Network/Wai/AsWai.hs
bsd-3-clause
-- wai_modifyResponse :: (Response -> Response) -> Middleware wai_modifyResponse = I.modifyResponse
99
wai_modifyResponse = I.modifyResponse
37
wai_modifyResponse = I.modifyResponse
37
true
false
0
5
10
9
5
4
null
null
dimara/ganeti
src/Ganeti/HTools/Dedicated.hs
bsd-2-clause
-- | Given the test instances, compute the allocations vector of a node allocationVector :: [Instance.Instance] -> Node.Node -> [Int] allocationVector insts node = map (\ inst -> length $ iterateOk (`Node.addPri` inst) node) insts
232
allocationVector :: [Instance.Instance] -> Node.Node -> [Int] allocationVector insts node = map (\ inst -> length $ iterateOk (`Node.addPri` inst) node) insts
160
allocationVector insts node = map (\ inst -> length $ iterateOk (`Node.addPri` inst) node) insts
98
true
true
0
10
36
70
37
33
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/Create.hs
mpl-2.0
-- | OAuth access token. bfscAccessToken :: Lens' BiddersFilterSetsCreate (Maybe Text) bfscAccessToken = lens _bfscAccessToken (\ s a -> s{_bfscAccessToken = a})
169
bfscAccessToken :: Lens' BiddersFilterSetsCreate (Maybe Text) bfscAccessToken = lens _bfscAccessToken (\ s a -> s{_bfscAccessToken = a})
144
bfscAccessToken = lens _bfscAccessToken (\ s a -> s{_bfscAccessToken = a})
82
true
true
0
9
29
48
25
23
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
prop_checkUnusedEchoEscapes1 = verify checkUnusedEchoEscapes "echo 'foo\\nbar\\n'"
82
prop_checkUnusedEchoEscapes1 = verify checkUnusedEchoEscapes "echo 'foo\\nbar\\n'"
82
prop_checkUnusedEchoEscapes1 = verify checkUnusedEchoEscapes "echo 'foo\\nbar\\n'"
82
false
false
0
5
5
11
5
6
null
null
dongarerahul/lyah
chapter10-rpn/Calculator.hs
apache-2.0
solveRPN :: (Floating a, Read a) => String -> a -- solveRPN expression = head (foldl f [] ( words expression)) -- point free style to avoid too many parantheses solveRPN = head . foldl f [] . words where f (x:y:ys) "*" = (x * y) : ys f (x:y:ys) "+" = (x + y) : ys f (x:y:ys) "-" = (x - y) : ys f (x:y:...
521
solveRPN :: (Floating a, Read a) => String -> a solveRPN = head . foldl f [] . words where f (x:y:ys) "*" = (x * y) : ys f (x:y:ys) "+" = (x + y) : ys f (x:y:ys) "-" = (x - y) : ys f (x:y:ys) "/" = (x / y) : ys f (y:ys) "ln" = log y:ys f ys "sum" = [sum ys] f (x:y:ys) "^" = (x ** y) :...
407
solveRPN = head . foldl f [] . words where f (x:y:ys) "*" = (x * y) : ys f (x:y:ys) "+" = (x + y) : ys f (x:y:ys) "-" = (x - y) : ys f (x:y:ys) "/" = (x / y) : ys f (y:ys) "ln" = log y:ys f ys "sum" = [sum ys] f (x:y:ys) "^" = (x ** y) : ys f xs numberString = read numberString:xs...
359
true
true
6
9
151
288
140
148
null
null
loadimpact/http2-test
hs-src/Rede/HarFiles/ServedEntry.hs
bsd-3-clause
resourceHandleToByteString :: ResourceHandle -> B.ByteString resourceHandleToByteString (ResourceHandle bs) = bs
112
resourceHandleToByteString :: ResourceHandle -> B.ByteString resourceHandleToByteString (ResourceHandle bs) = bs
112
resourceHandleToByteString (ResourceHandle bs) = bs
51
false
true
0
7
9
26
13
13
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Scene/LogicComponent.hs
mit
logicComponentUpdate :: (Parent LogicComponent a, Pointer p a, MonadIO m) => p -- ^ Pointer to logic component -> Float -- ^ Time step -> m () logicComponentUpdate p t = liftIO $ do let ptr = parentPointer p t' = realToFrac t [C.exp| void { $(LogicComponent* ptr)->Update($(float t')) } |] -- | Called o...
359
logicComponentUpdate :: (Parent LogicComponent a, Pointer p a, MonadIO m) => p -- ^ Pointer to logic component -> Float -- ^ Time step -> m () logicComponentUpdate p t = liftIO $ do let ptr = parentPointer p t' = realToFrac t [C.exp| void { $(LogicComponent* ptr)->Update($(float t')) } |] -- | Called o...
359
logicComponentUpdate p t = liftIO $ do let ptr = parentPointer p t' = realToFrac t [C.exp| void { $(LogicComponent* ptr)->Update($(float t')) } |] -- | Called on scene post-update, variable timestep.
210
false
true
0
11
75
91
47
44
null
null
mankyKitty/leesp
src/Main.hs
mit
leespHead [DottedList (x:xs) _] = return x
42
leespHead [DottedList (x:xs) _] = return x
42
leespHead [DottedList (x:xs) _] = return x
42
false
false
0
8
6
28
13
15
null
null
edsko/cabal
Cabal/src/Distribution/PackageDescription/Configuration.hs
bsd-3-clause
parseCondition :: ReadP r (Condition ConfVar) parseCondition = condOr where condOr = sepBy1 condAnd (oper "||") >>= return . foldl1 COr condAnd = sepBy1 cond (oper "&&")>>= return . foldl1 CAnd cond = sp >> (boolLiteral +++ inparens condOr +++ notCond +++ osCond +++ archCond +...
1,305
parseCondition :: ReadP r (Condition ConfVar) parseCondition = condOr where condOr = sepBy1 condAnd (oper "||") >>= return . foldl1 COr condAnd = sepBy1 cond (oper "&&")>>= return . foldl1 CAnd cond = sp >> (boolLiteral +++ inparens condOr +++ notCond +++ osCond +++ archCond +...
1,305
parseCondition = condOr where condOr = sepBy1 condAnd (oper "||") >>= return . foldl1 COr condAnd = sepBy1 cond (oper "&&")>>= return . foldl1 CAnd cond = sp >> (boolLiteral +++ inparens condOr +++ notCond +++ osCond +++ archCond +++ flagCond +++ implCond ) inparens = be...
1,259
false
true
22
12
387
499
215
284
null
null
haskell-infra/hackage-server
Distribution/Server/Packages/ModuleForest.hs
bsd-3-clause
addToForest ss [] = mkSubTree ss
32
addToForest ss [] = mkSubTree ss
32
addToForest ss [] = mkSubTree ss
32
false
false
1
5
5
21
7
14
null
null
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/GenShrimp/test/Test.hs
bsd-3-clause
incPass :: IO Int incPass = modifySt $ \st -> let st1 = st{ nPass = succ (nPass st) } in (st1, totalTests st1)
110
incPass :: IO Int incPass = modifySt $ \st -> let st1 = st{ nPass = succ (nPass st) } in (st1, totalTests st1)
110
incPass = modifySt $ \st -> let st1 = st{ nPass = succ (nPass st) } in (st1, totalTests st1)
92
false
true
0
15
23
60
31
29
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT24.hs
gpl-3.0
even (S (S x)) = even x
23
even (S (S x)) = even x
23
even (S (S x)) = even x
23
false
false
0
9
6
24
11
13
null
null
gitfoxi/vcd-haskell
app/JtagStateMachine.hs
agpl-3.0
jtagStateNext SelectIrScan True = TestLogicReset
50
jtagStateNext SelectIrScan True = TestLogicReset
50
jtagStateNext SelectIrScan True = TestLogicReset
50
false
false
0
5
6
11
5
6
null
null
hBPF/hBPF
HBPF/Internal.hs
bsd-3-clause
sub :: ArithAddress -> [Instr] sub addr = [IInstr $ ISub addr]
62
sub :: ArithAddress -> [Instr] sub addr = [IInstr $ ISub addr]
62
sub addr = [IInstr $ ISub addr]
31
false
true
0
8
11
35
17
18
null
null
mcschroeder/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isCFunEqCan _ = False
21
isCFunEqCan _ = False
21
isCFunEqCan _ = False
21
false
false
0
5
3
9
4
5
null
null
johnbcoughlin/mucalc
src/GRSynth/Formulas.hs
gpl-2.0
doRealize (And f1 f2) = do rf1 <- doRealize f1 rf2 <- doRealize f2 return $ rf1 `setAnd` rf2
146
doRealize (And f1 f2) = do rf1 <- doRealize f1 rf2 <- doRealize f2 return $ rf1 `setAnd` rf2
146
doRealize (And f1 f2) = do rf1 <- doRealize f1 rf2 <- doRealize f2 return $ rf1 `setAnd` rf2
146
false
false
0
8
72
51
23
28
null
null
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/M4/PrettyPrint.hs
bsd-3-clause
interfaceTypeString TemplateType = "template"
46
interfaceTypeString TemplateType = "template"
46
interfaceTypeString TemplateType = "template"
46
false
false
0
5
4
9
4
5
null
null
nominolo/cake
src/Development/Cake/Core.hs
bsd-3-clause
-- | Variant of 'handleJust' with a predicate instead of a 'Just b' -- transformer. handleIf :: Exception.Exception e => (e -> Bool) -- ^ Handle exception if this function returns 'True'. -> IO a -- ^ Handler (executed if body raises an exception). -> IO a -- ^ Body. -> IO a handl...
395
handleIf :: Exception.Exception e => (e -> Bool) -- ^ Handle exception if this function returns 'True'. -> IO a -- ^ Handler (executed if body raises an exception). -> IO a -- ^ Body. -> IO a handleIf p handler act = Exception.handleJust (guard . p) (\() -> handler) act
311
handleIf p handler act = Exception.handleJust (guard . p) (\() -> handler) act
80
true
true
0
9
106
86
45
41
null
null
da-x/fancydiff
app/Internal/Opts.hs
bsd-3-clause
optsParser :: ParserInfo Opts optsParser = info (optsParse <**> helper) idm where optsParse = do Opts <$> switch ( long "version" <> short 'v' <> help "Show version" ) <*> switch ( hidden <> long "test-suite" ) <*> optional ( strOption (long "test-recursive-scan" <> ...
2,837
optsParser :: ParserInfo Opts optsParser = info (optsParse <**> helper) idm where optsParse = do Opts <$> switch ( long "version" <> short 'v' <> help "Show version" ) <*> switch ( hidden <> long "test-suite" ) <*> optional ( strOption (long "test-recursive-scan" <> ...
2,837
optsParser = info (optsParse <**> helper) idm where optsParse = do Opts <$> switch ( long "version" <> short 'v' <> help "Show version" ) <*> switch ( hidden <> long "test-suite" ) <*> optional ( strOption (long "test-recursive-scan" <> hidden )) <*> ...
2,807
false
true
6
19
1,142
720
329
391
null
null
micknelso/language-c
src/Language/CFamily/C/TravMonad.hs
bsd-3-clause
handleTypeDef :: (MonadTrav m) => TypeDef -> m () handleTypeDef typeDef@(TypeDef ident _ _ _) = do redecl <- withDefTable $ defineTypeDef ident typeDef checkRedef (show ident) typeDef redecl handleDecl (TypeDefEvent typeDef) return ()
250
handleTypeDef :: (MonadTrav m) => TypeDef -> m () handleTypeDef typeDef@(TypeDef ident _ _ _) = do redecl <- withDefTable $ defineTypeDef ident typeDef checkRedef (show ident) typeDef redecl handleDecl (TypeDefEvent typeDef) return ()
250
handleTypeDef typeDef@(TypeDef ident _ _ _) = do redecl <- withDefTable $ defineTypeDef ident typeDef checkRedef (show ident) typeDef redecl handleDecl (TypeDefEvent typeDef) return ()
200
false
true
0
9
49
99
46
53
null
null
jerhoud/true-real
src/Data/Digits.hs
gpl-3.0
mulN :: Integer -> D -> D mulN n = mapWithCarry 2 (* n)
55
mulN :: Integer -> D -> D mulN n = mapWithCarry 2 (* n)
55
mulN n = mapWithCarry 2 (* n)
29
false
true
0
8
13
36
17
19
null
null
grandpascorpion/canon
Math/NumberTheory/Canon.hs
gpl-3.0
gcrCmp :: GCR_ -> GCR_ -> Ordering gcrCmp POne y = gcrCmpTo1 y True
78
gcrCmp :: GCR_ -> GCR_ -> Ordering gcrCmp POne y = gcrCmpTo1 y True
78
gcrCmp POne y = gcrCmpTo1 y True
43
false
true
0
6
24
29
14
15
null
null
mcmaniac/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
getHsFunc :: LlvmEnv -> CLabel -> UniqSM ExprData getHsFunc env lbl = let fn = strCLabel_llvm env lbl ty = funLookup fn env in case ty of -- Function in module in right form Just ty'@(LMFunction sig) -> do let fun = LMGlobalVar fn ty' (funcLinkage sig) Nothing Nothing False ...
1,125
getHsFunc :: LlvmEnv -> CLabel -> UniqSM ExprData getHsFunc env lbl = let fn = strCLabel_llvm env lbl ty = funLookup fn env in case ty of -- Function in module in right form Just ty'@(LMFunction sig) -> do let fun = LMGlobalVar fn ty' (funcLinkage sig) Nothing Nothing False ...
1,125
getHsFunc env lbl = let fn = strCLabel_llvm env lbl ty = funLookup fn env in case ty of -- Function in module in right form Just ty'@(LMFunction sig) -> do let fun = LMGlobalVar fn ty' (funcLinkage sig) Nothing Nothing False return (env, fun, nilOL, []) ...
1,075
false
true
0
18
397
339
168
171
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 120802 = 4839
33
getValueFromProduct 120802 = 4839
33
getValueFromProduct 120802 = 4839
33
false
false
0
5
3
9
4
5
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | A general description of the AMI. spProductDescription :: Lens' SpotPrice (Maybe RIProductDescription) spProductDescription = lens _spProductDescription (\s a -> s { _spProductDescription = a })
203
spProductDescription :: Lens' SpotPrice (Maybe RIProductDescription) spProductDescription = lens _spProductDescription (\s a -> s { _spProductDescription = a })
164
spProductDescription = lens _spProductDescription (\s a -> s { _spProductDescription = a })
95
true
true
0
9
30
46
25
21
null
null
ruud-v-a/hakyll
src/Hakyll/Web/Html.hs
bsd-3-clause
stripTags (x : xs) = x : stripTags xs
39
stripTags (x : xs) = x : stripTags xs
39
stripTags (x : xs) = x : stripTags xs
39
false
false
0
7
10
23
11
12
null
null
PhDP/Sphinx-AI
Faun/Parser/LogicOps.hs
mit
-- | Operators for logic formulas. Order of precedence: and, or, implies, xor, equivalence. logicTbl :: Ex.OperatorTable String () Identity (Formula a) logicTbl = [ [binary ["And", "and", "AND", "∧"] (BinOp And) Ex.AssocRight] , [binary ["Or", "or", "OR", "∨", "v"] (BinOp Or) Ex.AssocRight] , [binary ["Implies", ...
593
logicTbl :: Ex.OperatorTable String () Identity (Formula a) logicTbl = [ [binary ["And", "and", "AND", "∧"] (BinOp And) Ex.AssocRight] , [binary ["Or", "or", "OR", "∨", "v"] (BinOp Or) Ex.AssocRight] , [binary ["Implies", "implies", "IMPLIES", "⇒", "=>"] (BinOp Implies) Ex.AssocRight] , [binary ["Xor", "xor", "...
501
logicTbl = [ [binary ["And", "and", "AND", "∧"] (BinOp And) Ex.AssocRight] , [binary ["Or", "or", "OR", "∨", "v"] (BinOp Or) Ex.AssocRight] , [binary ["Implies", "implies", "IMPLIES", "⇒", "=>"] (BinOp Implies) Ex.AssocRight] , [binary ["Xor", "xor", "XOR", "⊕"] (BinOp Xor) Ex.AssocRight] , [binary ["Iff", "i...
441
true
true
2
9
97
248
134
114
null
null
Fuuzetsu/yi-emacs-colours
src/Yi/Style/EmacsColours.hs
gpl-2.0
-- | Names: @["yellow4"]@ -- -- R139 G139 B0, 0x8b8b00 yellow4 :: Color yellow4 = RGB 139 139 0
95
yellow4 :: Color yellow4 = RGB 139 139 0
40
yellow4 = RGB 139 139 0
23
true
true
0
6
18
27
13
14
null
null
ktvoelker/brick
src/Brick/Widgets/Border.hs
bsd-3-clause
hBorder_ :: Maybe Widget -> Widget hBorder_ label = Widget Greedy Fixed $ do bs <- ctxBorderStyle <$> getContext let msg = maybe (str [bsHorizontal bs]) (withAttr hBorderLabelAttr) label render $ vLimit 1 $ withAttr hBorderAttr $ hCenterWith (Just $ bsHorizontal bs) msg -- | A vertical border. F...
344
hBorder_ :: Maybe Widget -> Widget hBorder_ label = Widget Greedy Fixed $ do bs <- ctxBorderStyle <$> getContext let msg = maybe (str [bsHorizontal bs]) (withAttr hBorderLabelAttr) label render $ vLimit 1 $ withAttr hBorderAttr $ hCenterWith (Just $ bsHorizontal bs) msg -- | A vertical border. F...
344
hBorder_ label = Widget Greedy Fixed $ do bs <- ctxBorderStyle <$> getContext let msg = maybe (str [bsHorizontal bs]) (withAttr hBorderLabelAttr) label render $ vLimit 1 $ withAttr hBorderAttr $ hCenterWith (Just $ bsHorizontal bs) msg -- | A vertical border. Fills all vertical space.
309
false
true
0
15
75
112
52
60
null
null
QuickChick/Luck
luck/src/Core/Semantics.hs
mit
-- TODO: Optimize. semantics (Case (Unknown u) alts) w k = semantics e@(Fun _ _) PWild k = return (e, k)
104
semantics e@(Fun _ _) PWild k = return (e, k)
45
semantics e@(Fun _ _) PWild k = return (e, k)
45
true
false
0
8
20
34
18
16
null
null