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
danr/hipspec
examples/old-examples/hip/Infinite.hs
gpl-3.0
prop_fmap_iterate :: (a -> a) -> a -> Prop (Tree a) prop_fmap_iterate f x = fmap f (iterTree f f x) =:= iterTree f f (f x)
122
prop_fmap_iterate :: (a -> a) -> a -> Prop (Tree a) prop_fmap_iterate f x = fmap f (iterTree f f x) =:= iterTree f f (f x)
122
prop_fmap_iterate f x = fmap f (iterTree f f x) =:= iterTree f f (f x)
70
false
true
0
9
26
72
35
37
null
null
ssaavedra/liquidhaskell
tests/pos/Product.hs
bsd-3-clause
{-@ sum' :: xs:Vec a -> ys:Vec a -> VecN a {len xs + len ys} @-} sum' [] ys = ys
90
sum' [] ys = ys
19
sum' [] ys = ys
19
true
false
1
6
31
17
7
10
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs
bsd-3-clause
gl_BGRA :: GLenum gl_BGRA = 0x80E1
34
gl_BGRA :: GLenum gl_BGRA = 0x80E1
34
gl_BGRA = 0x80E1
16
false
true
0
4
5
11
6
5
null
null
tclem/lilo
src/Parser.hs
mit
lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where ops = ["\\", "->", ".", ",", ":", "+"] names = [] style = haskellStyle { Tok.reservedOpNames = ops , Tok.reservedNames = names , Tok.commentLine = "#" }
325
lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where ops = ["\\", "->", ".", ",", ":", "+"] names = [] style = haskellStyle { Tok.reservedOpNames = ops , Tok.reservedNames = names , Tok.commentLine = "#" }
325
lexer = Tok.makeTokenParser style where ops = ["\\", "->", ".", ",", ":", "+"] names = [] style = haskellStyle { Tok.reservedOpNames = ops , Tok.reservedNames = names , Tok.commentLine = "#" }
297
false
true
3
7
140
105
52
53
null
null
nikki-and-the-robots/nikki
src/Utils.hs
lgpl-3.0
-- * State monad stuff puts :: MonadState s m => (a -> s -> s) -> a -> m () puts setter a = do s <- get put (setter a s)
129
puts :: MonadState s m => (a -> s -> s) -> a -> m () puts setter a = do s <- get put (setter a s)
105
puts setter a = do s <- get put (setter a s)
52
true
true
0
10
41
76
35
41
null
null
HIPERFIT/futhark
src/Futhark/Optimise/Simplify/Rules/Simple.hs
isc
isCt0 :: SubExp -> Bool isCt0 (Constant v) = zeroIsh v
54
isCt0 :: SubExp -> Bool isCt0 (Constant v) = zeroIsh v
54
isCt0 (Constant v) = zeroIsh v
30
false
true
0
7
10
27
13
14
null
null
urbanslug/cs194
Src/Week6/HW06.hs
gpl-3.0
-- To get a list of Markets from a Result. -- I think a more elegant way would be `eitherDecode byteStringData` removeResult :: Result [Market] -> [Market] removeResult (Success a) = a
185
removeResult :: Result [Market] -> [Market] removeResult (Success a) = a
72
removeResult (Success a) = a
28
true
true
0
7
32
39
20
19
null
null
pdmurray/haskell-book-ex
src/ch4/Mood.hs
bsd-3-clause
changeMood _ = Blah
19
changeMood _ = Blah
19
changeMood _ = Blah
19
false
false
0
5
3
9
4
5
null
null
danidiaz/pipetastic-foldl
tests/test.hs
bsd-3-clause
test3 :: TestTree test3 = testCase "parse error" $ do assertEqual "" (L.foldM parserFold3 source) (ExceptT (Identity (Left "parse error"))) -------------------------------------------------------------------------------
245
test3 :: TestTree test3 = testCase "parse error" $ do assertEqual "" (L.foldM parserFold3 source) (ExceptT (Identity (Left "parse error"))) -------------------------------------------------------------------------------
245
test3 = testCase "parse error" $ do assertEqual "" (L.foldM parserFold3 source) (ExceptT (Identity (Left "parse error"))) -------------------------------------------------------------------------------
227
false
true
2
14
46
65
29
36
null
null
zepto-lang/zepto
src/Zepto/Types.hs
gpl-2.0
nullCont :: Env -> LispVal nullCont env = Cont $ Continuation env [] (fromSimple (Nil "")) Nothing Nothing []
109
nullCont :: Env -> LispVal nullCont env = Cont $ Continuation env [] (fromSimple (Nil "")) Nothing Nothing []
109
nullCont env = Cont $ Continuation env [] (fromSimple (Nil "")) Nothing Nothing []
82
false
true
2
9
18
57
26
31
null
null
ezyang/ghc
compiler/hsSyn/HsImpExp.hs
bsd-3-clause
ieNames (IEThingAbs (L _ n) ) = [ieWrappedName n]
56
ieNames (IEThingAbs (L _ n) ) = [ieWrappedName n]
56
ieNames (IEThingAbs (L _ n) ) = [ieWrappedName n]
56
false
false
0
9
15
29
14
15
null
null
upwawet/vision
src/Playtime.hs
gpl-3.0
handleMI :: WithPlaytime => (MediaId, Stamp, Map String Property) -> PTM () handleMI (id, _, info) = do s <- get when (sId s == Just id) $ case Map.lookup "duration" info of Just (PropInt32 d) -> do put s { sTd = fromIntegral d } withoutSeek $ do adjustmentSetUpper adj $ fromIntegral d unless (sPs s == StatusStop) $ adjustmentSetValue adj $ fromIntegral $ sPt s _ -> return ()
446
handleMI :: WithPlaytime => (MediaId, Stamp, Map String Property) -> PTM () handleMI (id, _, info) = do s <- get when (sId s == Just id) $ case Map.lookup "duration" info of Just (PropInt32 d) -> do put s { sTd = fromIntegral d } withoutSeek $ do adjustmentSetUpper adj $ fromIntegral d unless (sPs s == StatusStop) $ adjustmentSetValue adj $ fromIntegral $ sPt s _ -> return ()
446
handleMI (id, _, info) = do s <- get when (sId s == Just id) $ case Map.lookup "duration" info of Just (PropInt32 d) -> do put s { sTd = fromIntegral d } withoutSeek $ do adjustmentSetUpper adj $ fromIntegral d unless (sPs s == StatusStop) $ adjustmentSetValue adj $ fromIntegral $ sPt s _ -> return ()
370
false
true
0
22
138
193
89
104
null
null
aquatir/remember_java_api
code-sample-haskell/hello_world/func_magic/monads.hs
mit
push :: Int -> Stack -> ((),Stack) push a xs = ((),a:xs)
58
push :: Int -> Stack -> ((),Stack) push a xs = ((),a:xs)
56
push a xs = ((),a:xs)
21
false
true
0
10
13
50
25
25
null
null
sdiehl/ghc
testsuite/tests/codeGen/should_gen_asm/bytearray-memcpy-unroll.hs
bsd-3-clause
-- Does an 8 byte copy with sub-word (2 bytes) alignment -- Should be unrolled into 4 aligned stores (MOVWs) smallCopy :: ByteArray -> IO ByteArray smallCopy (ByteArray ba) = IO $ \s0 -> case newByteArray# 8# s0 of (# s1, mut #) -> case copyByteArray# ba 2# mut 0# 8# s1 of s2 -> case unsafeFreezeByteArray# mut s2 of (# s3, frozen #) -> (# s3, ByteArray frozen #)
380
smallCopy :: ByteArray -> IO ByteArray smallCopy (ByteArray ba) = IO $ \s0 -> case newByteArray# 8# s0 of (# s1, mut #) -> case copyByteArray# ba 2# mut 0# 8# s1 of s2 -> case unsafeFreezeByteArray# mut s2 of (# s3, frozen #) -> (# s3, ByteArray frozen #)
271
smallCopy (ByteArray ba) = IO $ \s0 -> case newByteArray# 8# s0 of (# s1, mut #) -> case copyByteArray# ba 2# mut 0# 8# s1 of s2 -> case unsafeFreezeByteArray# mut s2 of (# s3, frozen #) -> (# s3, ByteArray frozen #)
232
true
true
0
18
85
114
56
58
null
null
sboosali/Earley
Text/Earley/Internal.hs
bsd-3-clause
-- | Create a parser from the given grammar. parser :: ListLike i t => (forall r. Grammar r (Prod r e t a)) -> ST s (i -> ST s (Result s e i a)) parser g = do let nt x = NonTerminal x $ pure id p <- runGrammar (fmap nt . mkRule) g s <- State p (pure id) Previous <$> (newConts =<< newSTRef [FinalCont $ pure id]) return $ parse [s] . emptyParseEnv -- | Return all parses from the result of a given parser. The result may -- contain partial parses. The 'Int's are the position at which a result was -- produced.
533
parser :: ListLike i t => (forall r. Grammar r (Prod r e t a)) -> ST s (i -> ST s (Result s e i a)) parser g = do let nt x = NonTerminal x $ pure id p <- runGrammar (fmap nt . mkRule) g s <- State p (pure id) Previous <$> (newConts =<< newSTRef [FinalCont $ pure id]) return $ parse [s] . emptyParseEnv -- | Return all parses from the result of a given parser. The result may -- contain partial parses. The 'Int's are the position at which a result was -- produced.
488
parser g = do let nt x = NonTerminal x $ pure id p <- runGrammar (fmap nt . mkRule) g s <- State p (pure id) Previous <$> (newConts =<< newSTRef [FinalCont $ pure id]) return $ parse [s] . emptyParseEnv -- | Return all parses from the result of a given parser. The result may -- contain partial parses. The 'Int's are the position at which a result was -- produced.
374
true
true
0
14
131
195
93
102
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Xorg.hs
gpl-2.0
parseRules ("x.org Configuration","xorg") = (((pString False "Section" >>= withAttribute FunctionTok) >>~ pushContext ("x.org Configuration","Section")) <|> ((pDetectChar False '#' >>= withAttribute NormalTok) >>~ pushContext ("x.org Configuration","Comment")) <|> (currentContext >>= \x -> guard (x == ("x.org Configuration","xorg")) >> pDefault >>= withAttribute NormalTok))
390
parseRules ("x.org Configuration","xorg") = (((pString False "Section" >>= withAttribute FunctionTok) >>~ pushContext ("x.org Configuration","Section")) <|> ((pDetectChar False '#' >>= withAttribute NormalTok) >>~ pushContext ("x.org Configuration","Comment")) <|> (currentContext >>= \x -> guard (x == ("x.org Configuration","xorg")) >> pDefault >>= withAttribute NormalTok))
390
parseRules ("x.org Configuration","xorg") = (((pString False "Section" >>= withAttribute FunctionTok) >>~ pushContext ("x.org Configuration","Section")) <|> ((pDetectChar False '#' >>= withAttribute NormalTok) >>~ pushContext ("x.org Configuration","Comment")) <|> (currentContext >>= \x -> guard (x == ("x.org Configuration","xorg")) >> pDefault >>= withAttribute NormalTok))
390
false
false
0
15
53
128
67
61
null
null
kim/amazonka
amazonka-ecs/gen/Network/AWS/ECS/Types.hs
mpl-2.0
-- | The Amazon EC2 instance ID of the container instance. ciEc2InstanceId :: Lens' ContainerInstance (Maybe Text) ciEc2InstanceId = lens _ciEc2InstanceId (\s a -> s { _ciEc2InstanceId = a })
191
ciEc2InstanceId :: Lens' ContainerInstance (Maybe Text) ciEc2InstanceId = lens _ciEc2InstanceId (\s a -> s { _ciEc2InstanceId = a })
132
ciEc2InstanceId = lens _ciEc2InstanceId (\s a -> s { _ciEc2InstanceId = a })
76
true
true
0
9
29
46
25
21
null
null
shlomobauer/BuildIT
src/OutClean.hs
apache-2.0
ocleanrvb h (NBlock1 a b c d) = writeCleanOut h ("Remove-VM -VM $" ++ a ++ "_name -Confirm:$false -DeletePermanently:$true")
125
ocleanrvb h (NBlock1 a b c d) = writeCleanOut h ("Remove-VM -VM $" ++ a ++ "_name -Confirm:$false -DeletePermanently:$true")
125
ocleanrvb h (NBlock1 a b c d) = writeCleanOut h ("Remove-VM -VM $" ++ a ++ "_name -Confirm:$false -DeletePermanently:$true")
125
false
false
0
8
19
39
19
20
null
null
aslatter/blog
Blog.hs
gpl-3.0
addUser :: String -> String -> IO () addUser name pword = withAppState $ \appState -> do void $ addUserFromPlaintext name pword $ app_users appState return ()
174
addUser :: String -> String -> IO () addUser name pword = withAppState $ \appState -> do void $ addUserFromPlaintext name pword $ app_users appState return ()
174
addUser name pword = withAppState $ \appState -> do void $ addUserFromPlaintext name pword $ app_users appState return ()
137
false
true
0
11
42
65
30
35
null
null
tjhance/logic-puzzles
src/Sudoku.hs
mit
allPairs (x:xs) = map (x,) xs ++ allPairs xs
44
allPairs (x:xs) = map (x,) xs ++ allPairs xs
44
allPairs (x:xs) = map (x,) xs ++ allPairs xs
44
false
false
0
7
8
32
16
16
null
null
Helium4Haskell/helium
src/Helium/Syntax/UHA_Utils.hs
gpl-3.0
setNameOrigin orig (Name_Special range qual _ name) = Name_Special range qual orig name
93
setNameOrigin orig (Name_Special range qual _ name) = Name_Special range qual orig name
93
setNameOrigin orig (Name_Special range qual _ name) = Name_Special range qual orig name
93
false
false
0
7
18
32
15
17
null
null
jmitchell/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
ctxtAlist :: Context -> [(Name, Def)] ctxtAlist ctxt = map (\(n, (d, r, i, a, t, m)) -> (n, d)) $ toAlist (definitions ctxt)
124
ctxtAlist :: Context -> [(Name, Def)] ctxtAlist ctxt = map (\(n, (d, r, i, a, t, m)) -> (n, d)) $ toAlist (definitions ctxt)
124
ctxtAlist ctxt = map (\(n, (d, r, i, a, t, m)) -> (n, d)) $ toAlist (definitions ctxt)
86
false
true
0
10
23
86
48
38
null
null
spencerjanssen/cabal2nix
src/Cabal2Nix/Name.hs
bsd-3-clause
libNixName "taglib_c" = return "taglib"
65
libNixName "taglib_c" = return "taglib"
65
libNixName "taglib_c" = return "taglib"
65
false
false
0
5
30
12
5
7
null
null
AKST/jsgen
src/Language/JSGen/IRUtil.hs
mit
new = JSUnaOpt New
18
new = JSUnaOpt New
18
new = JSUnaOpt New
18
false
false
1
5
3
12
4
8
null
null
luisgepeto/HaskellLearning
07 Modules/04_data_map.hs
mit
phoneBookToMap :: (Ord k) => [(k, String)] -> Map.Map k String phoneBookToMap xs = Map.fromListWith (\number1 number2 -> number1 ++ ", "++number2) xs
149
phoneBookToMap :: (Ord k) => [(k, String)] -> Map.Map k String phoneBookToMap xs = Map.fromListWith (\number1 number2 -> number1 ++ ", "++number2) xs
149
phoneBookToMap xs = Map.fromListWith (\number1 number2 -> number1 ++ ", "++number2) xs
86
false
true
0
9
22
68
36
32
null
null
dysinger/amazonka
amazonka-support/gen/Network/AWS/Support/DescribeTrustedAdvisorCheckResult.hs
mpl-2.0
-- | The unique identifier for the Trusted Advisor check. dtacrCheckId :: Lens' DescribeTrustedAdvisorCheckResult Text dtacrCheckId = lens _dtacrCheckId (\s a -> s { _dtacrCheckId = a })
186
dtacrCheckId :: Lens' DescribeTrustedAdvisorCheckResult Text dtacrCheckId = lens _dtacrCheckId (\s a -> s { _dtacrCheckId = a })
128
dtacrCheckId = lens _dtacrCheckId (\s a -> s { _dtacrCheckId = a })
67
true
true
1
9
27
46
22
24
null
null
kindohm/Tidal
Sound/Tidal/Pattern.hs
gpl-3.0
fit :: Int -> [a] -> Pattern Int -> Pattern a fit perCycle xs p = (xs !!!) <$> (Pattern $ \a -> map ((\e -> (mapThd' (+ (cyclePos perCycle e)) e))) (arc p a)) where cyclePos perCycle e = perCycle * (floor $ eventStart e)
222
fit :: Int -> [a] -> Pattern Int -> Pattern a fit perCycle xs p = (xs !!!) <$> (Pattern $ \a -> map ((\e -> (mapThd' (+ (cyclePos perCycle e)) e))) (arc p a)) where cyclePos perCycle e = perCycle * (floor $ eventStart e)
222
fit perCycle xs p = (xs !!!) <$> (Pattern $ \a -> map ((\e -> (mapThd' (+ (cyclePos perCycle e)) e))) (arc p a)) where cyclePos perCycle e = perCycle * (floor $ eventStart e)
176
false
true
0
17
47
129
68
61
null
null
forked-upstream-packages-for-ghcjs/ghc
libraries/base/GHC/Event/Manager.hs
bsd-3-clause
nullToNothing xs@(_:_) = Just xs
32
nullToNothing xs@(_:_) = Just xs
32
nullToNothing xs@(_:_) = Just xs
32
false
false
0
8
4
22
11
11
null
null
sol/aeson
tests/DataFamilies/Encoders.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Generic encoders/decoders -------------------------------------------------------------------------------- -- Nullary gNullaryToJSONString :: Nullary Int -> Value gNullaryToJSONString = genericToJSON defaultOptions
300
gNullaryToJSONString :: Nullary Int -> Value gNullaryToJSONString = genericToJSON defaultOptions
96
gNullaryToJSONString = genericToJSON defaultOptions
51
true
true
0
6
18
25
14
11
null
null
Fresheyeball/fbatch
src/Fbatch.hs
mit
print' :: Printable -> IO String print' (s `In` c) = do setSGR [SetColor Foreground Vivid c] putStr s setSGR [] return s
128
print' :: Printable -> IO String print' (s `In` c) = do setSGR [SetColor Foreground Vivid c] putStr s setSGR [] return s
128
print' (s `In` c) = do setSGR [SetColor Foreground Vivid c] putStr s setSGR [] return s
95
false
true
0
10
30
72
31
41
null
null
forsyde/forsyde-shallow
src/ForSyDe/Shallow/MoC/SADF.hs
bsd-3-clause
detector43SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal y1, Signal y2, Signal y3) detector43SADF c f g s0 as bs cs ds = outputFSM3 g next_state where next_state = nextStateFSM4 c f current_state as bs cs ds current_state = delaySADF [s0] next_state -- | The process constructor 'detector53SADF' takes the consumption token rate -- (@c@), the state transition function (@f@), the scenario selection (@g@) and -- the initial state (@s0@), and constructs an SADF detector with five data input and three -- control output signals.
747
detector43SADF :: (Int, Int, Int, Int) -> (s -> [a] -> [b] -> [c] -> [d] -> s) -> (s -> ((Int, Int, Int), ([y1], [y2], [y3]))) -> s -> Signal a -> Signal b -> Signal c -> Signal d -> (Signal y1, Signal y2, Signal y3) detector43SADF c f g s0 as bs cs ds = outputFSM3 g next_state where next_state = nextStateFSM4 c f current_state as bs cs ds current_state = delaySADF [s0] next_state -- | The process constructor 'detector53SADF' takes the consumption token rate -- (@c@), the state transition function (@f@), the scenario selection (@g@) and -- the initial state (@s0@), and constructs an SADF detector with five data input and three -- control output signals.
747
detector43SADF c f g s0 as bs cs ds = outputFSM3 g next_state where next_state = nextStateFSM4 c f current_state as bs cs ds current_state = delaySADF [s0] next_state -- | The process constructor 'detector53SADF' takes the consumption token rate -- (@c@), the state transition function (@f@), the scenario selection (@g@) and -- the initial state (@s0@), and constructs an SADF detector with five data input and three -- control output signals.
455
false
true
1
16
205
229
122
107
null
null
samplecount/qrcoderman
qrencode.hs
gpl-3.0
-- | Width of one QR module. stickerPadding :: Int -> Double stickerPadding = maybe 0 (recip.fromIntegral) . flip lookup qrModules
130
stickerPadding :: Int -> Double stickerPadding = maybe 0 (recip.fromIntegral) . flip lookup qrModules
101
stickerPadding = maybe 0 (recip.fromIntegral) . flip lookup qrModules
69
true
true
0
8
20
35
18
17
null
null
tcsc/ffs
src/Ffs.hs
mit
-- | Merges the command-line options with those loaded from file. Produces a -- new Args.Options with file-based settings overridden by command line args. mergeOptions :: Args -> Config -> FfsOptions mergeOptions cmdline file = Options.defaultOptions & optUsername ~? ((cmdline^.argLogin) <|> (file^.cfgLogin)) & optPassword ~? ((cmdline^.argPassword) <|> (file^.cfgPassword)) & optJiraHost ~? ((cmdline^.argUrl) <|> (file^.cfgHost)) & optUseInsecureTLS ~? ((cmdline^.argInsecure) <|> (file^.cfgInsecure)) & optLastDayOfWeek ~? ((cmdline^.argLastDayOfWeek) <|> (file^.cfgEndOfWeek)) & optGroupBy ~? ((cmdline^.argGroupBy) <|> (file^.cfgGroupBy)) & optRollUpSubTasks ~? ((cmdline^.argRollUpSubTasks) <|> (file^.cfgRollUpSubTasks)) & optTimeZone .~ ((cmdline^.argTimeZone) <|> (file^.cfgTimeZone)) & optTargetUser .~ ((cmdline^.argTargetUser) <|> (file^.cfgTargetUser)) & optDateRange .~ (cmdline^.argDateRange) & optCsvFile .~ (cmdline^.argCsvFile)
999
mergeOptions :: Args -> Config -> FfsOptions mergeOptions cmdline file = Options.defaultOptions & optUsername ~? ((cmdline^.argLogin) <|> (file^.cfgLogin)) & optPassword ~? ((cmdline^.argPassword) <|> (file^.cfgPassword)) & optJiraHost ~? ((cmdline^.argUrl) <|> (file^.cfgHost)) & optUseInsecureTLS ~? ((cmdline^.argInsecure) <|> (file^.cfgInsecure)) & optLastDayOfWeek ~? ((cmdline^.argLastDayOfWeek) <|> (file^.cfgEndOfWeek)) & optGroupBy ~? ((cmdline^.argGroupBy) <|> (file^.cfgGroupBy)) & optRollUpSubTasks ~? ((cmdline^.argRollUpSubTasks) <|> (file^.cfgRollUpSubTasks)) & optTimeZone .~ ((cmdline^.argTimeZone) <|> (file^.cfgTimeZone)) & optTargetUser .~ ((cmdline^.argTargetUser) <|> (file^.cfgTargetUser)) & optDateRange .~ (cmdline^.argDateRange) & optCsvFile .~ (cmdline^.argCsvFile)
844
mergeOptions cmdline file = Options.defaultOptions & optUsername ~? ((cmdline^.argLogin) <|> (file^.cfgLogin)) & optPassword ~? ((cmdline^.argPassword) <|> (file^.cfgPassword)) & optJiraHost ~? ((cmdline^.argUrl) <|> (file^.cfgHost)) & optUseInsecureTLS ~? ((cmdline^.argInsecure) <|> (file^.cfgInsecure)) & optLastDayOfWeek ~? ((cmdline^.argLastDayOfWeek) <|> (file^.cfgEndOfWeek)) & optGroupBy ~? ((cmdline^.argGroupBy) <|> (file^.cfgGroupBy)) & optRollUpSubTasks ~? ((cmdline^.argRollUpSubTasks) <|> (file^.cfgRollUpSubTasks)) & optTimeZone .~ ((cmdline^.argTimeZone) <|> (file^.cfgTimeZone)) & optTargetUser .~ ((cmdline^.argTargetUser) <|> (file^.cfgTargetUser)) & optDateRange .~ (cmdline^.argDateRange) & optCsvFile .~ (cmdline^.argCsvFile)
799
true
true
44
8
149
351
180
171
null
null
diku-kmc/repg
test/Tests/OneApproximation.hs
mit
deleteNth :: Int -> [a] -> [a] deleteNth n xs = take (n-1) xs ++ drop n xs
74
deleteNth :: Int -> [a] -> [a] deleteNth n xs = take (n-1) xs ++ drop n xs
74
deleteNth n xs = take (n-1) xs ++ drop n xs
43
false
true
0
8
17
51
26
25
null
null
mrkkrp/mida
src/Mida/Interaction/Commands.hs
gpl-3.0
-- | Change current file name. setFileName :: MonadState MidaSt m => Path Abs File -> m () setFileName fpath = modify $ \st -> st { stSrcFile = fpath }
152
setFileName :: MonadState MidaSt m => Path Abs File -> m () setFileName fpath = modify $ \st -> st { stSrcFile = fpath }
120
setFileName fpath = modify $ \st -> st { stSrcFile = fpath }
60
true
true
0
8
31
55
28
27
null
null
total-git/missingno
yesodMissingNo/Parser.hs
mit
parseInput :: Text -> Input parseInput txt = parseInputWords (words txt) "" where parseInputWords :: [Text] -> Text -> Input parseInputWords (w:ws) cs = case action cs of Just act -> Input (Just act) (Just $ unwords $ w:ws) Nothing -> parseInputWords ws $ strip $ unwords [cs,w] parseInputWords [] cs = Input (action cs) Nothing
375
parseInput :: Text -> Input parseInput txt = parseInputWords (words txt) "" where parseInputWords :: [Text] -> Text -> Input parseInputWords (w:ws) cs = case action cs of Just act -> Input (Just act) (Just $ unwords $ w:ws) Nothing -> parseInputWords ws $ strip $ unwords [cs,w] parseInputWords [] cs = Input (action cs) Nothing
375
parseInput txt = parseInputWords (words txt) "" where parseInputWords :: [Text] -> Text -> Input parseInputWords (w:ws) cs = case action cs of Just act -> Input (Just act) (Just $ unwords $ w:ws) Nothing -> parseInputWords ws $ strip $ unwords [cs,w] parseInputWords [] cs = Input (action cs) Nothing
347
false
true
1
12
102
168
79
89
null
null
melted/idris-lua
src/IRTS/CodegenLua.hs
isc
qName s = L.Name $ T.pack $ idrisModule ++ "." ++ mangledName s
63
qName s = L.Name $ T.pack $ idrisModule ++ "." ++ mangledName s
63
qName s = L.Name $ T.pack $ idrisModule ++ "." ++ mangledName s
63
false
false
3
8
12
36
15
21
null
null
kmate/parallella-dsp-demo
src/Main.hs
bsd-3-clause
pitchShift :: Data Float pitchShift = 2
39
pitchShift :: Data Float pitchShift = 2
39
pitchShift = 2
14
false
true
0
5
6
14
7
7
null
null
portnov/xtt
XMonad/TimeTracker/Eval.hs
bsd-3-clause
emptyPS :: ParserState emptyPS = PS { psCurrentMeta = M.singleton "task" "Startup", psPrevEvent = Nothing, psVariables = [], psDuration = 0, psTimestamp = undefined, psIdleTime = 0, psTotalTime = 0, psResult = M.empty }
235
emptyPS :: ParserState emptyPS = PS { psCurrentMeta = M.singleton "task" "Startup", psPrevEvent = Nothing, psVariables = [], psDuration = 0, psTimestamp = undefined, psIdleTime = 0, psTotalTime = 0, psResult = M.empty }
235
emptyPS = PS { psCurrentMeta = M.singleton "task" "Startup", psPrevEvent = Nothing, psVariables = [], psDuration = 0, psTimestamp = undefined, psIdleTime = 0, psTotalTime = 0, psResult = M.empty }
212
false
true
0
9
49
82
46
36
null
null
Chatanga/kage
src/Graphics/Heightmap.hs
mit
-- TODO À tester... getInterpolatedHeightmapValue :: Heightmap Float -> (Float, Float) -> Float getInterpolatedHeightmapValue heightmap (x, y) = z where (xi, xf) = properFraction x (yi, yf) = properFraction y squareDistance (dx, dy) = (dx - xi)^2 + (dy - yi)^2 getHeight (dx, dy) = getHeightmapValue heightmap (xi + dx, yi + dy) [z1, z2, z3, z4] = map getHeight [(0, 0), (1, 0), (0, 1), (1, 1)] z = if xf + yf < 1 then (z3 - z1) * yf + (z2 - z1) * xf + z1 else (z4 - z2) * yf + (z4 - z3) * xf + z4
537
getInterpolatedHeightmapValue :: Heightmap Float -> (Float, Float) -> Float getInterpolatedHeightmapValue heightmap (x, y) = z where (xi, xf) = properFraction x (yi, yf) = properFraction y squareDistance (dx, dy) = (dx - xi)^2 + (dy - yi)^2 getHeight (dx, dy) = getHeightmapValue heightmap (xi + dx, yi + dy) [z1, z2, z3, z4] = map getHeight [(0, 0), (1, 0), (0, 1), (1, 1)] z = if xf + yf < 1 then (z3 - z1) * yf + (z2 - z1) * xf + z1 else (z4 - z2) * yf + (z4 - z3) * xf + z4
517
getInterpolatedHeightmapValue heightmap (x, y) = z where (xi, xf) = properFraction x (yi, yf) = properFraction y squareDistance (dx, dy) = (dx - xi)^2 + (dy - yi)^2 getHeight (dx, dy) = getHeightmapValue heightmap (xi + dx, yi + dy) [z1, z2, z3, z4] = map getHeight [(0, 0), (1, 0), (0, 1), (1, 1)] z = if xf + yf < 1 then (z3 - z1) * yf + (z2 - z1) * xf + z1 else (z4 - z2) * yf + (z4 - z3) * xf + z4
441
true
true
0
13
143
285
160
125
null
null
markflorisson/hpack
testrepo/bytestring-0.10.2.0/Data/ByteString/Builder/Extra.hs
bsd-3-clause
wordHost :: Word -> Builder wordHost = P.primFixed P.wordHost
61
wordHost :: Word -> Builder wordHost = P.primFixed P.wordHost
61
wordHost = P.primFixed P.wordHost
33
false
true
0
6
8
22
11
11
null
null
green-haskell/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
known_args :: [String] known_args = [ "--data-decl", "--has-side-effects", "--out-of-line", "--commutable", "--code-size", "--can-fail", "--strictness", "--fixity", "--primop-primop-info", "--primop-tag", "--primop-list", "--primop-vector-uniques", "--primop-vector-tys", "--primop-vector-tys-exports", "--primop-vector-tycons", "--make-haskell-wrappers", "--make-haskell-source", "--make-latex-doc" ]
529
known_args :: [String] known_args = [ "--data-decl", "--has-side-effects", "--out-of-line", "--commutable", "--code-size", "--can-fail", "--strictness", "--fixity", "--primop-primop-info", "--primop-tag", "--primop-list", "--primop-vector-uniques", "--primop-vector-tys", "--primop-vector-tys-exports", "--primop-vector-tycons", "--make-haskell-wrappers", "--make-haskell-source", "--make-latex-doc" ]
529
known_args = [ "--data-decl", "--has-side-effects", "--out-of-line", "--commutable", "--code-size", "--can-fail", "--strictness", "--fixity", "--primop-primop-info", "--primop-tag", "--primop-list", "--primop-vector-uniques", "--primop-vector-tys", "--primop-vector-tys-exports", "--primop-vector-tycons", "--make-haskell-wrappers", "--make-haskell-source", "--make-latex-doc" ]
506
false
true
0
5
152
68
44
24
null
null
codingiam/sandbox-hs
src/Ch02a.hs
bsd-3-clause
safeSecond :: [a] -> Maybe a safeSecond [] = Nothing
52
safeSecond :: [a] -> Maybe a safeSecond [] = Nothing
52
safeSecond [] = Nothing
23
false
true
0
6
9
26
13
13
null
null
thomasjm/hrtree
Zora-1.1.18/Zora/List.hs
mit
-- | Shorthand for applicative functors: -- -- > f <$*> l = f <$> l <*> l (<$*>) :: Applicative f => (a -> a -> b) -> f a -> f b f <$*> l = f <$> l <*> l
154
(<$*>) :: Applicative f => (a -> a -> b) -> f a -> f b f <$*> l = f <$> l <*> l
79
f <$*> l = f <$> l <*> l
24
true
true
0
10
43
62
32
30
null
null
bergmark/hlint
data/Default.hs
bsd-3-clause
error "Avoid reverse" = reverse (reverse x) ==> x where note = IncreasesLaziness -- error = take (length x - 1) x ==> init x -- not true for x == []
148
error "Avoid reverse" = reverse (reverse x) ==> x where note = IncreasesLaziness -- error = take (length x - 1) x ==> init x -- not true for x == []
148
error "Avoid reverse" = reverse (reverse x) ==> x where note = IncreasesLaziness -- error = take (length x - 1) x ==> init x -- not true for x == []
148
false
false
0
8
31
30
15
15
null
null
rahulmutt/ghcvm
compiler/Eta/TypeCheck/TcTypeNats.hs
bsd-3-clause
(<==) :: Type -> Type -> Type s <== t = mkTyConApp typeNatLeqTyCon [s,t]
72
(<==) :: Type -> Type -> Type s <== t = mkTyConApp typeNatLeqTyCon [s,t]
72
s <== t = mkTyConApp typeNatLeqTyCon [s,t]
42
false
true
0
9
13
43
21
22
null
null
corngood/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
getGhcInfo :: Verbosity -> ConfiguredProgram -> IO [(String, String)] getGhcInfo verbosity ghcProg = Internal.getGhcInfo verbosity implInfo ghcProg where Just version = programVersion ghcProg implInfo = ghcVersionImplInfo version -- | Given a single package DB, return all installed packages.
303
getGhcInfo :: Verbosity -> ConfiguredProgram -> IO [(String, String)] getGhcInfo verbosity ghcProg = Internal.getGhcInfo verbosity implInfo ghcProg where Just version = programVersion ghcProg implInfo = ghcVersionImplInfo version -- | Given a single package DB, return all installed packages.
303
getGhcInfo verbosity ghcProg = Internal.getGhcInfo verbosity implInfo ghcProg where Just version = programVersion ghcProg implInfo = ghcVersionImplInfo version -- | Given a single package DB, return all installed packages.
233
false
true
0
9
48
69
34
35
null
null
ethercrow/yi
yi-core/src/Yi/Core.hs
gpl-2.0
msgEditor :: T.Text -> YiM () msgEditor "()" = return ()
56
msgEditor :: T.Text -> YiM () msgEditor "()" = return ()
56
msgEditor "()" = return ()
26
false
true
0
8
10
34
15
19
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
roleTyConName = libTc (fsLit "Role") roleTyConKey
69
roleTyConName = libTc (fsLit "Role") roleTyConKey
69
roleTyConName = libTc (fsLit "Role") roleTyConKey
69
false
false
0
7
25
17
8
9
null
null
NightRa/FurnitureAI
src/Creation.hs
mit
--- Creation of objects from 2 points --- furnitureFromPoints :: Point -> Point -> NormFurniture furnitureFromPoints origin@(Point row1 col1) (Point row2 col2) = ajust $ normalize $ Furniture origin (col2 - col1) (row2 - row1) where ajust (NormFurniture origin width height) = NormFurniture origin (width + 1) (height + 1)
331
furnitureFromPoints :: Point -> Point -> NormFurniture furnitureFromPoints origin@(Point row1 col1) (Point row2 col2) = ajust $ normalize $ Furniture origin (col2 - col1) (row2 - row1) where ajust (NormFurniture origin width height) = NormFurniture origin (width + 1) (height + 1)
288
furnitureFromPoints origin@(Point row1 col1) (Point row2 col2) = ajust $ normalize $ Furniture origin (col2 - col1) (row2 - row1) where ajust (NormFurniture origin width height) = NormFurniture origin (width + 1) (height + 1)
233
true
true
0
9
58
114
59
55
null
null
pgj/bead
src/Bead/Controller/UserStories.hs
bsd-3-clause
modifyAssignment :: AssignmentKey -> Assignment -> TCModification -> UserStory () modifyAssignment ak a tc = logAction INFO ("modifies assignment " ++ show ak) $ do authorize P_Modify P_Assignment join . withUserAndPersist $ \u -> do admined <- Persist.isAdministratedAssignment u ak if admined then do hasSubmission <- isThereSubmissionPersist ak new <- if hasSubmission then do -- Overwrite the assignment type with the old one -- if there is submission for the given assignment ev <- Assignment.evType <$> Persist.loadAssignment ak return (a { Assignment.evType = ev }) else return a Persist.modifyAssignment ak new testCaseModificationForAssignment u ak tc if and [hasSubmission, Assignment.evType a /= Assignment.evType new] then return . putStatusMessage . msg_UserStory_EvalTypeWarning $ concat [ "The evaluation type of the assignment is not modified. " , "A solution is submitted already." ] else (return (return ())) else return $ do logMessage INFO . violation $ printf "User tries to modify the assignment: (%s)" (assignmentKeyMap id ak) errorPage $ userError nonAdministratedAssignment -- * Guards -- Checks with the given guard function if the user has passed the guard, -- otherwise logs a violation printf message, and renders the error page with -- the given user error
1,619
modifyAssignment :: AssignmentKey -> Assignment -> TCModification -> UserStory () modifyAssignment ak a tc = logAction INFO ("modifies assignment " ++ show ak) $ do authorize P_Modify P_Assignment join . withUserAndPersist $ \u -> do admined <- Persist.isAdministratedAssignment u ak if admined then do hasSubmission <- isThereSubmissionPersist ak new <- if hasSubmission then do -- Overwrite the assignment type with the old one -- if there is submission for the given assignment ev <- Assignment.evType <$> Persist.loadAssignment ak return (a { Assignment.evType = ev }) else return a Persist.modifyAssignment ak new testCaseModificationForAssignment u ak tc if and [hasSubmission, Assignment.evType a /= Assignment.evType new] then return . putStatusMessage . msg_UserStory_EvalTypeWarning $ concat [ "The evaluation type of the assignment is not modified. " , "A solution is submitted already." ] else (return (return ())) else return $ do logMessage INFO . violation $ printf "User tries to modify the assignment: (%s)" (assignmentKeyMap id ak) errorPage $ userError nonAdministratedAssignment -- * Guards -- Checks with the given guard function if the user has passed the guard, -- otherwise logs a violation printf message, and renders the error page with -- the given user error
1,619
modifyAssignment ak a tc = logAction INFO ("modifies assignment " ++ show ak) $ do authorize P_Modify P_Assignment join . withUserAndPersist $ \u -> do admined <- Persist.isAdministratedAssignment u ak if admined then do hasSubmission <- isThereSubmissionPersist ak new <- if hasSubmission then do -- Overwrite the assignment type with the old one -- if there is submission for the given assignment ev <- Assignment.evType <$> Persist.loadAssignment ak return (a { Assignment.evType = ev }) else return a Persist.modifyAssignment ak new testCaseModificationForAssignment u ak tc if and [hasSubmission, Assignment.evType a /= Assignment.evType new] then return . putStatusMessage . msg_UserStory_EvalTypeWarning $ concat [ "The evaluation type of the assignment is not modified. " , "A solution is submitted already." ] else (return (return ())) else return $ do logMessage INFO . violation $ printf "User tries to modify the assignment: (%s)" (assignmentKeyMap id ak) errorPage $ userError nonAdministratedAssignment -- * Guards -- Checks with the given guard function if the user has passed the guard, -- otherwise logs a violation printf message, and renders the error page with -- the given user error
1,537
false
true
0
22
524
304
147
157
null
null
drhodes/jade2hdl
jade-decode/src/Jade/Decode/Util.hs
bsd-3-clause
replace x y str = [if c == x then y else c | c <- str]
54
replace x y str = [if c == x then y else c | c <- str]
54
replace x y str = [if c == x then y else c | c <- str]
54
false
false
0
7
16
38
19
19
null
null
ohua-dev/ohua-core
core/src/Ohua/ParseTools/Refs.hs
epl-1.0
ifBuiltin :: Expr ifBuiltin = mkOhuaLangRef "if"
48
ifBuiltin :: Expr ifBuiltin = mkOhuaLangRef "if"
48
ifBuiltin = mkOhuaLangRef "if"
30
false
true
0
6
6
20
8
12
null
null
DavidTruby/haskell-coreutils
src/pwd.hs
bsd-3-clause
main :: IO () main = getOpts >> getCurrentDirectory >>= putStrLn
64
main :: IO () main = getOpts >> getCurrentDirectory >>= putStrLn
64
main = getOpts >> getCurrentDirectory >>= putStrLn
50
false
true
0
6
10
24
12
12
null
null
rueshyna/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | Copies data from one area and pastes it to another. reqCopyPaste :: Lens' Request' (Maybe CopyPasteRequest) reqCopyPaste = lens _reqCopyPaste (\ s a -> s{_reqCopyPaste = a})
180
reqCopyPaste :: Lens' Request' (Maybe CopyPasteRequest) reqCopyPaste = lens _reqCopyPaste (\ s a -> s{_reqCopyPaste = a})
123
reqCopyPaste = lens _reqCopyPaste (\ s a -> s{_reqCopyPaste = a})
67
true
true
1
9
30
50
25
25
null
null
ghcjs/ghcjs
utils/pkg-cache/ghc/includes/dist-derivedconstants/header/GHCConstantsHaskellWrappers.hs
mit
oFFSET_StgRegTable_rD4 :: DynFlags -> Int oFFSET_StgRegTable_rD4 dflags = pc_OFFSET_StgRegTable_rD4 (platformConstants dflags)
126
oFFSET_StgRegTable_rD4 :: DynFlags -> Int oFFSET_StgRegTable_rD4 dflags = pc_OFFSET_StgRegTable_rD4 (platformConstants dflags)
126
oFFSET_StgRegTable_rD4 dflags = pc_OFFSET_StgRegTable_rD4 (platformConstants dflags)
84
false
true
0
7
10
30
14
16
null
null
randen/cabal
cabal-install/Distribution/Client/Dependency/TopDown.hs
bsd-3-clause
addTopLevelTargets (pkg:pkgs) cs = case Constraints.addTarget pkg cs of Satisfiable cs' () -> addTopLevelTargets pkgs cs' Unsatisfiable -> Fail (NoSuchPackage pkg) ConflictsWith _conflicts -> impossible "addTopLevelTargets conflicts"
264
addTopLevelTargets (pkg:pkgs) cs = case Constraints.addTarget pkg cs of Satisfiable cs' () -> addTopLevelTargets pkgs cs' Unsatisfiable -> Fail (NoSuchPackage pkg) ConflictsWith _conflicts -> impossible "addTopLevelTargets conflicts"
264
addTopLevelTargets (pkg:pkgs) cs = case Constraints.addTarget pkg cs of Satisfiable cs' () -> addTopLevelTargets pkgs cs' Unsatisfiable -> Fail (NoSuchPackage pkg) ConflictsWith _conflicts -> impossible "addTopLevelTargets conflicts"
264
false
false
4
7
57
70
34
36
null
null
google-code/bkil-open
volatile/compo/dns-compl.hs
gpl-2.0
toUpper = tr ['a'..'z'] ['A'..'Z']
34
toUpper = tr ['a'..'z'] ['A'..'Z']
34
toUpper = tr ['a'..'z'] ['A'..'Z']
34
false
false
0
6
4
21
11
10
null
null
pbl64k/HackerRank-Contests
2014-10-10-FP/Infer/i.accepted.hs
bsd-2-clause
gi m (FVar n) = do if n `M.member` m then return (FVar $ fromJust $ n `M.lookup` m, m) else do n' <- add_t0 return (FVar n', M.insert n n' m)
185
gi m (FVar n) = do if n `M.member` m then return (FVar $ fromJust $ n `M.lookup` m, m) else do n' <- add_t0 return (FVar n', M.insert n n' m)
185
gi m (FVar n) = do if n `M.member` m then return (FVar $ fromJust $ n `M.lookup` m, m) else do n' <- add_t0 return (FVar n', M.insert n n' m)
185
false
false
0
13
75
92
47
45
null
null
athanclark/rose-trees
src/Data/Tree/Set.hs
bsd-3-clause
isChildOf :: Eq a => a -> SetTree a -> Bool isChildOf x (SetTree _ ys) = getAny $ F.foldMap (Any . (x ==) . sNode) ys
119
isChildOf :: Eq a => a -> SetTree a -> Bool isChildOf x (SetTree _ ys) = getAny $ F.foldMap (Any . (x ==) . sNode) ys
119
isChildOf x (SetTree _ ys) = getAny $ F.foldMap (Any . (x ==) . sNode) ys
75
false
true
0
10
28
68
34
34
null
null
ExNexu/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
addToCtxt :: Name -> Term -> Type -> Context -> Context addToCtxt n tm ty uctxt = let ctxt = definitions uctxt !ctxt' = addDef n (Function ty tm, Public, Unchecked, EmptyMI) ctxt in uctxt { definitions = ctxt' }
235
addToCtxt :: Name -> Term -> Type -> Context -> Context addToCtxt n tm ty uctxt = let ctxt = definitions uctxt !ctxt' = addDef n (Function ty tm, Public, Unchecked, EmptyMI) ctxt in uctxt { definitions = ctxt' }
235
addToCtxt n tm ty uctxt = let ctxt = definitions uctxt !ctxt' = addDef n (Function ty tm, Public, Unchecked, EmptyMI) ctxt in uctxt { definitions = ctxt' }
179
false
true
0
11
63
89
45
44
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M04/D09/Solution.hs
mit
tags :: FilePath tags = "Y2018/M04/D09/tags.json"
49
tags :: FilePath tags = "Y2018/M04/D09/tags.json"
49
tags = "Y2018/M04/D09/tags.json"
32
false
true
0
6
5
18
7
11
null
null
probcomp/haxcat
DPMM.hs
apache-2.0
gibbsSweep :: DPMM -> RVar DPMM gibbsSweep dpmm = execStateT gibbsSweepT dpmm
77
gibbsSweep :: DPMM -> RVar DPMM gibbsSweep dpmm = execStateT gibbsSweepT dpmm
77
gibbsSweep dpmm = execStateT gibbsSweepT dpmm
45
false
true
0
6
11
26
12
14
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
------------------------------------------------------------------------------ -- SmallArray PrimOp implementations doReadSmallPtrArrayOp :: LocalReg -> CmmExpr -> CmmExpr -> FCode () doReadSmallPtrArrayOp res addr idx = do dflags <- getDynFlags mkBasicIndexedRead (smallArrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr (gcWord dflags) idx
429
doReadSmallPtrArrayOp :: LocalReg -> CmmExpr -> CmmExpr -> FCode () doReadSmallPtrArrayOp res addr idx = do dflags <- getDynFlags mkBasicIndexedRead (smallArrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr (gcWord dflags) idx
312
doReadSmallPtrArrayOp res addr idx = do dflags <- getDynFlags mkBasicIndexedRead (smallArrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr (gcWord dflags) idx
178
true
true
0
9
117
80
39
41
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
showList_RDR, showList___RDR, showsPrec_RDR, shows_RDR, showString_RDR, showSpace_RDR, showParen_RDR :: RdrName showList_RDR = varQual_RDR gHC_SHOW (fsLit "showList")
181
showList_RDR, showList___RDR, showsPrec_RDR, shows_RDR, showString_RDR, showSpace_RDR, showParen_RDR :: RdrName showList_RDR = varQual_RDR gHC_SHOW (fsLit "showList")
181
showList_RDR = varQual_RDR gHC_SHOW (fsLit "showList")
65
false
true
0
7
29
34
23
11
null
null
olorin/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeGatewayInformation.hs
mpl-2.0
-- | The type of the gateway. dgirsGatewayType :: Lens' DescribeGatewayInformationResponse (Maybe Text) dgirsGatewayType = lens _dgirsGatewayType (\ s a -> s{_dgirsGatewayType = a})
181
dgirsGatewayType :: Lens' DescribeGatewayInformationResponse (Maybe Text) dgirsGatewayType = lens _dgirsGatewayType (\ s a -> s{_dgirsGatewayType = a})
151
dgirsGatewayType = lens _dgirsGatewayType (\ s a -> s{_dgirsGatewayType = a})
77
true
true
0
9
23
46
25
21
null
null
brodyberg/LearnHaskell
HaskellProgramming.hsproj/Chapter05/TypeInference1.hs
mit
a' :: (a -> b) -> a -> b a' f a = f(a)
40
a' :: (a -> b) -> a -> b a' f a = f(a)
38
a' f a = f(a)
13
false
true
0
8
15
42
20
22
null
null
brendanhay/gogol
gogol-poly/gen/Network/Google/Poly/Types/Product.hs
mpl-2.0
-- | The unique identifier for the asset in the form: \`assets\/{ASSET_ID}\`. aName :: Lens' Asset (Maybe Text) aName = lens _aName (\ s a -> s{_aName = a})
156
aName :: Lens' Asset (Maybe Text) aName = lens _aName (\ s a -> s{_aName = a})
78
aName = lens _aName (\ s a -> s{_aName = a})
44
true
true
2
9
28
55
25
30
null
null
andrewMacmurray/haskell-book-solutions
src/ch14/Exercises.hs
mit
prop_mult_associative = forAll threeInts (\(x, y, z) -> multAssociative x y z)
80
prop_mult_associative = forAll threeInts (\(x, y, z) -> multAssociative x y z)
80
prop_mult_associative = forAll threeInts (\(x, y, z) -> multAssociative x y z)
80
false
false
0
8
13
35
19
16
null
null
Frefreak/solitaire-solver
src/Performer.hs
bsd-3-clause
performOperation :: Operation -> IO () {- performOperation (Move p1 (PTR i)) = do -} {- let (cx, cy) = coord p1 -} {- mousemove'' (cx, min (cy + 210) 690) -} {- threadDelay 150000 -} {- mousedown -} {- threadDelay 150000 -} {- let (dx, dy) = coord (PTR i) -} {- mousemove'' (dx, dy + 210) -} {- threadDelay 150000 -} {- mouseup -} {- threadDelay 100000 -} performOperation (Move p1 p2) = do mousemove'' (coord p1) threadDelay 150000 mousedown threadDelay 150000 mousemove'' (coord p2) threadDelay 150000 mouseup threadDelay 200000
602
performOperation :: Operation -> IO () performOperation (Move p1 p2) = do mousemove'' (coord p1) threadDelay 150000 mousedown threadDelay 150000 mousemove'' (coord p2) threadDelay 150000 mouseup threadDelay 200000
245
performOperation (Move p1 p2) = do mousemove'' (coord p1) threadDelay 150000 mousedown threadDelay 150000 mousemove'' (coord p2) threadDelay 150000 mouseup threadDelay 200000
206
true
true
0
9
163
96
46
50
null
null
wilbowma/accelerate
Data/Array/Accelerate/Pretty/Print.hs
bsd-3-clause
prettyPreExp pp lvl alvl _ (Tuple tup) = prettyTuple pp lvl alvl tup
70
prettyPreExp pp lvl alvl _ (Tuple tup) = prettyTuple pp lvl alvl tup
70
prettyPreExp pp lvl alvl _ (Tuple tup) = prettyTuple pp lvl alvl tup
70
false
false
0
7
14
32
15
17
null
null
qpliu/esolang
DGOL/hs/compiler/CodeGen/Runtime.hs
gpl-3.0
mallocDecl :: ModuleBuilder Operand mallocDecl = extern mallocName [i32] (ptr i8)
81
mallocDecl :: ModuleBuilder Operand mallocDecl = extern mallocName [i32] (ptr i8)
81
mallocDecl = extern mallocName [i32] (ptr i8)
45
false
true
0
7
10
38
16
22
null
null
iu-parfunc/containers
Data/Map/Base.hs
bsd-3-clause
-- | /O(n)/. Partition the map according to a predicate. The first -- map contains all elements that satisfy the predicate, the second all -- elements that fail the predicate. See also 'split'. -- -- > partition (> "a") (fromList [(5,"a"), (3,"b")]) == (singleton 3 "b", singleton 5 "a") -- > partition (< "x") (fromList [(5,"a"), (3,"b")]) == (fromList [(3, "b"), (5, "a")], empty) -- > partition (> "x") (fromList [(5,"a"), (3,"b")]) == (empty, fromList [(3, "b"), (5, "a")]) partition :: (a -> Bool) -> Map k a -> (Map k a,Map k a) partition p m = partitionWithKey (\_ x -> p x) m
586
partition :: (a -> Bool) -> Map k a -> (Map k a,Map k a) partition p m = partitionWithKey (\_ x -> p x) m
107
partition p m = partitionWithKey (\_ x -> p x) m
50
true
true
0
10
107
84
43
41
null
null
rueshyna/gogol
gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ListHistoryResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'lhrNextPageToken' -- -- * 'lhrHistory' -- -- * 'lhrHistoryId' listHistoryResponse :: ListHistoryResponse listHistoryResponse = ListHistoryResponse' { _lhrNextPageToken = Nothing , _lhrHistory = Nothing , _lhrHistoryId = Nothing }
433
listHistoryResponse :: ListHistoryResponse listHistoryResponse = ListHistoryResponse' { _lhrNextPageToken = Nothing , _lhrHistory = Nothing , _lhrHistoryId = Nothing }
191
listHistoryResponse = ListHistoryResponse' { _lhrNextPageToken = Nothing , _lhrHistory = Nothing , _lhrHistoryId = Nothing }
144
true
true
0
6
84
40
28
12
null
null
steveshogren/haskell-katas
test/PokerHandsTest.hs
bsd-3-clause
hand s = fromMaybe [] (parseHand s)
35
hand s = fromMaybe [] (parseHand s)
35
hand s = fromMaybe [] (parseHand s)
35
false
false
0
7
6
22
10
12
null
null
jmn/goodreads
src/GRApi.hs
bsd-3-clause
getBooksFromShelf :: MonadThrow m => Gr -> User -> String -> m Request getBooksFromShelf conMan user shelf = restAPI conMan ("review/list/" ++ show (uid user) ++ ".xml") opts where opts = [(pack "v", Just $ pack "2"), (pack "shelf", Just $ pack shelf)] :: [(ByteString, Maybe ByteString)]
306
getBooksFromShelf :: MonadThrow m => Gr -> User -> String -> m Request getBooksFromShelf conMan user shelf = restAPI conMan ("review/list/" ++ show (uid user) ++ ".xml") opts where opts = [(pack "v", Just $ pack "2"), (pack "shelf", Just $ pack shelf)] :: [(ByteString, Maybe ByteString)]
306
getBooksFromShelf conMan user shelf = restAPI conMan ("review/list/" ++ show (uid user) ++ ".xml") opts where opts = [(pack "v", Just $ pack "2"), (pack "shelf", Just $ pack shelf)] :: [(ByteString, Maybe ByteString)]
231
false
true
0
11
64
131
66
65
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Event/Manager.hs
bsd-3-clause
closeFd :: EventManager -> (Fd -> IO ()) -> Fd -> IO () closeFd mgr close fd = do fds <- modifyMVar (emFds mgr) $ \oldMap -> do close fd case IM.delete (fromIntegral fd) oldMap of (Nothing, _) -> return (oldMap, []) (Just fds, !newMap) -> do when (eventsOf fds /= mempty) $ wakeManager mgr return (newMap, fds) forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose) ------------------------------------------------------------------------ -- Registering interest in timeout events -- | Register a timeout in the given number of microseconds. The -- returned 'TimeoutKey' can be used to later unregister or update the -- timeout. The timeout is automatically unregistered after the given -- time has passed.
768
closeFd :: EventManager -> (Fd -> IO ()) -> Fd -> IO () closeFd mgr close fd = do fds <- modifyMVar (emFds mgr) $ \oldMap -> do close fd case IM.delete (fromIntegral fd) oldMap of (Nothing, _) -> return (oldMap, []) (Just fds, !newMap) -> do when (eventsOf fds /= mempty) $ wakeManager mgr return (newMap, fds) forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose) ------------------------------------------------------------------------ -- Registering interest in timeout events -- | Register a timeout in the given number of microseconds. The -- returned 'TimeoutKey' can be used to later unregister or update the -- timeout. The timeout is automatically unregistered after the given -- time has passed.
768
closeFd mgr close fd = do fds <- modifyMVar (emFds mgr) $ \oldMap -> do close fd case IM.delete (fromIntegral fd) oldMap of (Nothing, _) -> return (oldMap, []) (Just fds, !newMap) -> do when (eventsOf fds /= mempty) $ wakeManager mgr return (newMap, fds) forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose) ------------------------------------------------------------------------ -- Registering interest in timeout events -- | Register a timeout in the given number of microseconds. The -- returned 'TimeoutKey' can be used to later unregister or update the -- timeout. The timeout is automatically unregistered after the given -- time has passed.
712
false
true
0
22
166
222
110
112
null
null
rueshyna/gogol
gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs
mpl-2.0
-- | Creates a value of 'EmailTemplate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'etSubject' -- -- * 'etBody' -- -- * 'etFormat' -- -- * 'etFromDisplayName' -- -- * 'etFrom' -- -- * 'etReplyTo' emailTemplate :: EmailTemplate emailTemplate = EmailTemplate' { _etSubject = Nothing , _etBody = Nothing , _etFormat = Nothing , _etFromDisplayName = Nothing , _etFrom = Nothing , _etReplyTo = Nothing }
524
emailTemplate :: EmailTemplate emailTemplate = EmailTemplate' { _etSubject = Nothing , _etBody = Nothing , _etFormat = Nothing , _etFromDisplayName = Nothing , _etFrom = Nothing , _etReplyTo = Nothing }
238
emailTemplate = EmailTemplate' { _etSubject = Nothing , _etBody = Nothing , _etFormat = Nothing , _etFromDisplayName = Nothing , _etFrom = Nothing , _etReplyTo = Nothing }
203
true
true
0
7
120
74
48
26
null
null
sinelaw/HOpenCV
src/AI/CV/OpenCV/ImgProc.hs
gpl-2.0
fromCvtColorFlag BGR2RGB = 4
32
fromCvtColorFlag BGR2RGB = 4
32
fromCvtColorFlag BGR2RGB = 4
32
false
false
0
5
7
9
4
5
null
null
OpenXT/manager
xenmgr/XenMgr/Connect/Xl.hs
gpl-2.0
destroy :: Uuid -> IO () destroy uuid = do domid <- getDomainId uuid case domid of "" -> do maybe_state <- xsRead ("/state/" ++ show uuid ++ "/state") case maybe_state of Just state -> if state /= "shutdown" then do xsWrite ("/state/" ++ show uuid ++ "/state") "shutdown" else return () Nothing -> return () _ -> do exitCode <- system ("xl destroy " ++ domid) bailIfError exitCode "Error destroying domain."
516
destroy :: Uuid -> IO () destroy uuid = do domid <- getDomainId uuid case domid of "" -> do maybe_state <- xsRead ("/state/" ++ show uuid ++ "/state") case maybe_state of Just state -> if state /= "shutdown" then do xsWrite ("/state/" ++ show uuid ++ "/state") "shutdown" else return () Nothing -> return () _ -> do exitCode <- system ("xl destroy " ++ domid) bailIfError exitCode "Error destroying domain."
516
destroy uuid = do domid <- getDomainId uuid case domid of "" -> do maybe_state <- xsRead ("/state/" ++ show uuid ++ "/state") case maybe_state of Just state -> if state /= "shutdown" then do xsWrite ("/state/" ++ show uuid ++ "/state") "shutdown" else return () Nothing -> return () _ -> do exitCode <- system ("xl destroy " ++ domid) bailIfError exitCode "Error destroying domain."
491
false
true
0
23
180
173
78
95
null
null
mydaum/cabal
Cabal/Distribution/Utils/NubList.hs
bsd-3-clause
-- | Smart constructor for the NubListR type. toNubListR :: Ord a => [a] -> NubListR a toNubListR list = NubListR $ ordNubRight list
132
toNubListR :: Ord a => [a] -> NubListR a toNubListR list = NubListR $ ordNubRight list
86
toNubListR list = NubListR $ ordNubRight list
45
true
true
0
7
23
39
19
20
null
null
sumitsahrawat/calculator
src/Math/REPL/Parser/Expr.hs
gpl-2.0
parseRestExpr :: Parser [(Operator, Expr)] parseRestExpr = many $ do oper <- oneOf "+-" _ <- spaces let (Just op) = lookup oper binaryOps expr <- parseTerm _ <- spaces return (op, expr) -------------------------------------------------------------------------------- -- term -> fact ( "*/" fact )*
316
parseRestExpr :: Parser [(Operator, Expr)] parseRestExpr = many $ do oper <- oneOf "+-" _ <- spaces let (Just op) = lookup oper binaryOps expr <- parseTerm _ <- spaces return (op, expr) -------------------------------------------------------------------------------- -- term -> fact ( "*/" fact )*
316
parseRestExpr = many $ do oper <- oneOf "+-" _ <- spaces let (Just op) = lookup oper binaryOps expr <- parseTerm _ <- spaces return (op, expr) -------------------------------------------------------------------------------- -- term -> fact ( "*/" fact )*
273
false
true
3
12
60
98
45
53
null
null
brendanhay/gogol
gogol-libraryagent/gen/Network/Google/Resource/LibraryAgent/Shelves/List.hs
mpl-2.0
-- | A token identifying a page of results the server should return. -- Typically, this is the value of ListShelvesResponse.next_page_token -- returned from the previous call to \`ListShelves\` method. slPageToken :: Lens' ShelvesList (Maybe Text) slPageToken = lens _slPageToken (\ s a -> s{_slPageToken = a})
312
slPageToken :: Lens' ShelvesList (Maybe Text) slPageToken = lens _slPageToken (\ s a -> s{_slPageToken = a})
110
slPageToken = lens _slPageToken (\ s a -> s{_slPageToken = a})
64
true
true
1
9
48
52
27
25
null
null
DougBurke/swish
src/Swish/RDF/ProofContext.hs
lgpl-2.1
rdfsr7 :: RDFRule rdfsr7 = makeN3ClosureSimpleRule scopeRDFS "r7" "?x ?a ?y . ?a rdfs:subPropertyOf ?b ." "?x ?b ?y ."
143
rdfsr7 :: RDFRule rdfsr7 = makeN3ClosureSimpleRule scopeRDFS "r7" "?x ?a ?y . ?a rdfs:subPropertyOf ?b ." "?x ?b ?y ."
143
rdfsr7 = makeN3ClosureSimpleRule scopeRDFS "r7" "?x ?a ?y . ?a rdfs:subPropertyOf ?b ." "?x ?b ?y ."
125
false
true
0
5
44
20
10
10
null
null
ninedotnine/bugfree-computing-machine
src/SXXVector.hs
gpl-3.0
getSP :: (?mem :: MyVector) => IO Int32 getSP = V.read ?mem 0
61
getSP :: (?mem :: MyVector) => IO Int32 getSP = V.read ?mem 0
61
getSP = V.read ?mem 0
21
false
true
0
7
12
36
17
19
null
null
Brightgalrs/con-lang-gen
src/Out/Phonology.hs
mit
writeDiphPhonemeInventory [d] = "<br>\nDiphthongs: /" ++ writePhonemeIPA d ++ "/\n"
83
writeDiphPhonemeInventory [d] = "<br>\nDiphthongs: /" ++ writePhonemeIPA d ++ "/\n"
83
writeDiphPhonemeInventory [d] = "<br>\nDiphthongs: /" ++ writePhonemeIPA d ++ "/\n"
83
false
false
0
7
9
23
11
12
null
null
snoyberg/basic-prelude
src/CorePrelude.hs
mit
putStr :: MonadIO m => Text -> m () putStr = liftIO . Data.Text.IO.putStr
73
putStr :: MonadIO m => Text -> m () putStr = liftIO . Data.Text.IO.putStr
73
putStr = liftIO . Data.Text.IO.putStr
37
false
true
0
8
13
35
18
17
null
null
apyrgio/snf-ganeti
src/Ganeti/Query/Query.hs
bsd-2-clause
execGetter _ rt item (FieldRuntime getter) = getter rt item
60
execGetter _ rt item (FieldRuntime getter) = getter rt item
60
execGetter _ rt item (FieldRuntime getter) = getter rt item
60
false
false
1
7
10
29
12
17
null
null
asr/apia
src/Apia/Utils/AgdaAPI/Interface.hs
mit
etATPRole TPTPHint = HashMap.filter isATPHint
52
getATPRole TPTPHint = HashMap.filter isATPHint
52
getATPRole TPTPHint = HashMap.filter isATPHint
52
false
false
0
6
11
15
6
9
null
null
mgsloan/compconfig
env/src/Roam.hs
mit
roamLine ('#' : '#' : ' ' : xs) = do liftIO $ threadDelay (1000 * 100) xdotoolType "## " liftIO $ threadDelay (1000 * 200) roamLine xs
142
roamLine ('#' : '#' : ' ' : xs) = do liftIO $ threadDelay (1000 * 100) xdotoolType "## " liftIO $ threadDelay (1000 * 200) roamLine xs
142
roamLine ('#' : '#' : ' ' : xs) = do liftIO $ threadDelay (1000 * 100) xdotoolType "## " liftIO $ threadDelay (1000 * 200) roamLine xs
142
false
false
0
10
35
70
32
38
null
null
lambdageek/small
src/Algo/Elaborate.hs
bsd-3-clause
showConstraint :: (Show (t U), HasUVar U (t U)) => ConstraintGen (t U -> [Simple.Constraint t U]) U (t U) c y a -> String showConstraint = showSimpleConstraints . collectSimpleConstraints
187
showConstraint :: (Show (t U), HasUVar U (t U)) => ConstraintGen (t U -> [Simple.Constraint t U]) U (t U) c y a -> String showConstraint = showSimpleConstraints . collectSimpleConstraints
187
showConstraint = showSimpleConstraints . collectSimpleConstraints
65
false
true
0
12
29
87
44
43
null
null
erochest/barth-scrape
src/BarthPar/Scrape/Utils.hs
apache-2.0
anyNumberPS :: T.Text -> PureScript Int anyNumberPS t = decimalPS t <|> fromRomanPS t <|> Left ("Unable to parse number \"" ++ T.unpack t ++ "\"")
176
anyNumberPS :: T.Text -> PureScript Int anyNumberPS t = decimalPS t <|> fromRomanPS t <|> Left ("Unable to parse number \"" ++ T.unpack t ++ "\"")
176
anyNumberPS t = decimalPS t <|> fromRomanPS t <|> Left ("Unable to parse number \"" ++ T.unpack t ++ "\"")
136
false
true
6
10
55
66
31
35
null
null
scvalex/dragonfruit
Main.hs
gpl-3.0
redrawCanvas :: DrawingArea -> IO () redrawCanvas canvas = do (w, h) <- widgetGetSize canvas widgetQueueDrawArea canvas 0 0 w h
131
redrawCanvas :: DrawingArea -> IO () redrawCanvas canvas = do (w, h) <- widgetGetSize canvas widgetQueueDrawArea canvas 0 0 w h
131
redrawCanvas canvas = do (w, h) <- widgetGetSize canvas widgetQueueDrawArea canvas 0 0 w h
94
false
true
0
9
24
58
26
32
null
null
thiagoarrais/gtk2hs
tools/apiGen/src/HaddockDocs.hs
lgpl-2.1
formatSpan :: Span -> String formatSpan (SpanText text) = escapeHaddockSpecialChars text
93
formatSpan :: Span -> String formatSpan (SpanText text) = escapeHaddockSpecialChars text
93
formatSpan (SpanText text) = escapeHaddockSpecialChars text
64
false
true
0
9
15
32
14
18
null
null
GaloisInc/halvm-ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprUserTypeCtxt (DataTyCtxt tc) = text "the context of the data type declaration for" <+> quotes (ppr tc)
107
pprUserTypeCtxt (DataTyCtxt tc) = text "the context of the data type declaration for" <+> quotes (ppr tc)
107
pprUserTypeCtxt (DataTyCtxt tc) = text "the context of the data type declaration for" <+> quotes (ppr tc)
107
false
false
0
8
18
31
14
17
null
null
guoy34/ampersand
src/Database/Design/Ampersand/Prototype/Generate.hs
gpl-3.0
generateGenerics :: FSpec -> IO () generateGenerics fSpec = do { let filecontent = genPhp "Generate.hs" "Generics.php" genericsPhpContent -- ; verboseLn (getOpts fSpec) filecontent ; writePrototypeFile fSpec "Generics.php" filecontent } where genericsPhpContent :: [String] genericsPhpContent = intercalate [""] [ generateConstants fSpec , generateDBstructQueries fSpec , generateAllDefPopQueries fSpec , generateSpecializations fSpec , generateTableInfos fSpec , generateRules fSpec , generateConjuncts fSpec , generateRoles fSpec , generateViews fSpec , generateInterfaces fSpec ]
699
generateGenerics :: FSpec -> IO () generateGenerics fSpec = do { let filecontent = genPhp "Generate.hs" "Generics.php" genericsPhpContent -- ; verboseLn (getOpts fSpec) filecontent ; writePrototypeFile fSpec "Generics.php" filecontent } where genericsPhpContent :: [String] genericsPhpContent = intercalate [""] [ generateConstants fSpec , generateDBstructQueries fSpec , generateAllDefPopQueries fSpec , generateSpecializations fSpec , generateTableInfos fSpec , generateRules fSpec , generateConjuncts fSpec , generateRoles fSpec , generateViews fSpec , generateInterfaces fSpec ]
699
generateGenerics fSpec = do { let filecontent = genPhp "Generate.hs" "Generics.php" genericsPhpContent -- ; verboseLn (getOpts fSpec) filecontent ; writePrototypeFile fSpec "Generics.php" filecontent } where genericsPhpContent :: [String] genericsPhpContent = intercalate [""] [ generateConstants fSpec , generateDBstructQueries fSpec , generateAllDefPopQueries fSpec , generateSpecializations fSpec , generateTableInfos fSpec , generateRules fSpec , generateConjuncts fSpec , generateRoles fSpec , generateViews fSpec , generateInterfaces fSpec ]
664
false
true
0
10
185
137
69
68
null
null
dfordivam/lava
Lava/Zchaff.hs
bsd-3-clause
---------------------------------------------------------------- -- zchaff zchaff :: Checkable a => a -> IO ProofResult zchaff a = do checkVerifyDir noBuffering (props,_) <- properties a proveFile defsFile (writeDefinitions defsFile props) where defsFile = verifyDir ++ "/circuit.cnf" ---------------------------------------------------------------- -- definitions
386
zchaff :: Checkable a => a -> IO ProofResult zchaff a = do checkVerifyDir noBuffering (props,_) <- properties a proveFile defsFile (writeDefinitions defsFile props) where defsFile = verifyDir ++ "/circuit.cnf" ---------------------------------------------------------------- -- definitions
310
zchaff a = do checkVerifyDir noBuffering (props,_) <- properties a proveFile defsFile (writeDefinitions defsFile props) where defsFile = verifyDir ++ "/circuit.cnf" ---------------------------------------------------------------- -- definitions
265
true
true
1
9
57
89
41
48
null
null
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds011.hs
bsd-3-clause
g = error ""
12
g = error ""
12
g = error ""
12
false
false
1
5
3
13
4
9
null
null
badi/haseem
Haseem/Analysis/TarBz2.hs
bsd-3-clause
handle_tarball :: Haseem FaH a -> Dir -> Tarball -> Haseem FaH a handle_tarball haseem (Dir target) tball = do wa <- unDir `fmap` getWorkArea liftIO $ createDirectoryIfMissing True target liftIO $ sys_extract_tarbz2 tball target withWorkArea (Dir $ wa </> target) haseem
278
handle_tarball :: Haseem FaH a -> Dir -> Tarball -> Haseem FaH a handle_tarball haseem (Dir target) tball = do wa <- unDir `fmap` getWorkArea liftIO $ createDirectoryIfMissing True target liftIO $ sys_extract_tarbz2 tball target withWorkArea (Dir $ wa </> target) haseem
278
handle_tarball haseem (Dir target) tball = do wa <- unDir `fmap` getWorkArea liftIO $ createDirectoryIfMissing True target liftIO $ sys_extract_tarbz2 tball target withWorkArea (Dir $ wa </> target) haseem
213
false
true
0
10
49
102
48
54
null
null
snoyberg/ghc
compiler/typecheck/FamInst.hs
bsd-3-clause
bareTvInRHSViolated :: [Type] -> Type -> [Type] -- See Note [Verifying injectivity annotation]. This function implements second -- check described there. bareTvInRHSViolated pats rhs | isTyVarTy rhs = filter (not . isTyVarTy) pats
233
bareTvInRHSViolated :: [Type] -> Type -> [Type] bareTvInRHSViolated pats rhs | isTyVarTy rhs = filter (not . isTyVarTy) pats
127
bareTvInRHSViolated pats rhs | isTyVarTy rhs = filter (not . isTyVarTy) pats
79
true
true
0
8
35
54
27
27
null
null