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
geekrelief/as3tohaxe
ActionhaXe/Lexer.hs
gpl-3.0
tokenLine ((TPos s l c), i) = l
31
tokenLine ((TPos s l c), i) = l
31
tokenLine ((TPos s l c), i) = l
31
false
false
0
8
7
25
13
12
null
null
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.ResponseHeader.hs
bsd-3-clause
copyCRLF :: Ptr Word8 -> IO (Ptr Word8) copyCRLF !ptr = do writeWord8OffPtr ptr 0 cr writeWord8OffPtr ptr 1 lf return $! ptr `plusPtr` 2
148
copyCRLF :: Ptr Word8 -> IO (Ptr Word8) copyCRLF !ptr = do writeWord8OffPtr ptr 0 cr writeWord8OffPtr ptr 1 lf return $! ptr `plusPtr` 2
148
copyCRLF !ptr = do writeWord8OffPtr ptr 0 cr writeWord8OffPtr ptr 1 lf return $! ptr `plusPtr` 2
108
false
true
0
8
36
64
29
35
null
null
bgamari/linear
src/Linear/V4.hs
bsd-3-clause
_zywx f = _xyzw $ \(V4 a b c d) -> f (V4 c b d a) <&> \(V4 c' b' d' a') -> V4 a' b' c' d'
89
_zywx f = _xyzw $ \(V4 a b c d) -> f (V4 c b d a) <&> \(V4 c' b' d' a') -> V4 a' b' c' d'
89
_zywx f = _xyzw $ \(V4 a b c d) -> f (V4 c b d a) <&> \(V4 c' b' d' a') -> V4 a' b' c' d'
89
false
false
1
10
28
78
37
41
null
null
nikita-volkov/hasql-pool
library/Hasql/Pool.hs
mit
-- | -- Use a connection from the pool to run a session and -- return the connection to the pool, when finished. use :: Pool -> Hasql.Session.Session a -> IO (Either UsageError a) use (Pool pool) session = fmap (either (Left . ConnectionError) (either (Left . SessionError) Right)) $ ResourcePool.withResourceOnEithe...
369
use :: Pool -> Hasql.Session.Session a -> IO (Either UsageError a) use (Pool pool) session = fmap (either (Left . ConnectionError) (either (Left . SessionError) Right)) $ ResourcePool.withResourceOnEither pool $ traverse $ Hasql.Session.run session
256
use (Pool pool) session = fmap (either (Left . ConnectionError) (either (Left . SessionError) Right)) $ ResourcePool.withResourceOnEither pool $ traverse $ Hasql.Session.run session
189
true
true
0
13
64
110
55
55
null
null
koterpillar/tianbar
src/System/Tianbar/Plugin/DBus.hs
mit
stopHandler :: BusReference -> ServerPart DBusPlugin Response stopHandler busRef = dir "stop" $ do nullDir index <- fromData listener <- use (busRef . busSignals . at index) case listener of Just l -> do busRef . busSignals . at index .= Nothing clnt <- use $ busRef . bus...
426
stopHandler :: BusReference -> ServerPart DBusPlugin Response stopHandler busRef = dir "stop" $ do nullDir index <- fromData listener <- use (busRef . busSignals . at index) case listener of Just l -> do busRef . busSignals . at index .= Nothing clnt <- use $ busRef . bus...
426
stopHandler busRef = dir "stop" $ do nullDir index <- fromData listener <- use (busRef . busSignals . at index) case listener of Just l -> do busRef . busSignals . at index .= Nothing clnt <- use $ busRef . busClient liftIO $ removeMatch clnt l cal...
364
false
true
0
15
138
137
61
76
null
null
achirkin/qua-view
src/Widgets/Tabs.hs
mit
getOffsets :: (Reflex t, MonadIO m) => ([(Element EventResult GhcjsDomSpace t, a)], b) -> m ([Double], b) getOffsets (wEls, s) = do os <- forM wEls $ JSFFI.getOffsetTop . (coerce :: JSFFI.Element -> JSFFI.HTMLElement) . _element_raw . fst return (os, s)
289
getOffsets :: (Reflex t, MonadIO m) => ([(Element EventResult GhcjsDomSpace t, a)], b) -> m ([Double], b) getOffsets (wEls, s) = do os <- forM wEls $ JSFFI.getOffsetTop . (coerce :: JSFFI.Element -> JSFFI.HTMLElement) . _element_raw . fst return (os, s)
289
getOffsets (wEls, s) = do os <- forM wEls $ JSFFI.getOffsetTop . (coerce :: JSFFI.Element -> JSFFI.HTMLElement) . _element_raw . fst return (os, s)
161
false
true
0
14
76
132
69
63
null
null
jyp/MarXup
Output.hs
gpl-2.0
oText :: String -> Doc oText x = text "textual" <+> text (show x)
65
oText :: String -> Doc oText x = text "textual" <+> text (show x)
65
oText x = text "textual" <+> text (show x)
42
false
true
0
8
13
39
17
22
null
null
da-x/Algorithm-W-Step-By-Step
Lamdu/Infer/Internal/Monad.hs
gpl-3.0
inferSkolemConstraints :: Lens' InferState Constraints inferSkolemConstraints f InferState {..} = f _inferSkolemConstraints <&> \_inferSkolemConstraints -> InferState {..}
171
inferSkolemConstraints :: Lens' InferState Constraints inferSkolemConstraints f InferState {..} = f _inferSkolemConstraints <&> \_inferSkolemConstraints -> InferState {..}
171
inferSkolemConstraints f InferState {..} = f _inferSkolemConstraints <&> \_inferSkolemConstraints -> InferState {..}
116
false
true
0
7
16
44
22
22
null
null
skogsbaer/roundtrip-xml
src/Text/Roundtrip/Xml/Printer.hs
bsd-3-clause
xmlPrinterBeginElem :: Name -> XmlPrinter () xmlPrinterBeginElem name = mkXmlPrinter $ \() -> [PxBeginElement name]
115
xmlPrinterBeginElem :: Name -> XmlPrinter () xmlPrinterBeginElem name = mkXmlPrinter $ \() -> [PxBeginElement name]
115
xmlPrinterBeginElem name = mkXmlPrinter $ \() -> [PxBeginElement name]
70
false
true
0
9
14
44
21
23
null
null
jtdaugherty/smtp
src/Network/Mail/SMTP.hs
bsd-3-clause
-- | doSMTP is similar to doSMTPPort, except that it does not require -- port number but connects to the server with port 25. doSMTP :: String -> (SMTPConnection -> IO a) -> IO a doSMTP host execution = doSMTPPort host 25 execution
231
doSMTP :: String -> (SMTPConnection -> IO a) -> IO a doSMTP host execution = doSMTPPort host 25 execution
105
doSMTP host execution = doSMTPPort host 25 execution
52
true
true
0
9
42
50
24
26
null
null
cybernomad/cis194
hw2/LogAnalysis.hs
mit
inOrder :: MessageTree -> [LogMessage] inOrder Leaf = []
56
inOrder :: MessageTree -> [LogMessage] inOrder Leaf = []
56
inOrder Leaf = []
17
false
true
0
6
8
23
12
11
null
null
trygvis/hledger
hledger-lib/Hledger/Data/Matching.hs
gpl-3.0
matchesTransaction (MatchDate True span) t = spanContainsDate span $ tdate t
76
matchesTransaction (MatchDate True span) t = spanContainsDate span $ tdate t
76
matchesTransaction (MatchDate True span) t = spanContainsDate span $ tdate t
76
false
false
1
8
10
31
13
18
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmForeign.hs
bsd-3-clause
tso_stackobj, tso_CCCS, stack_STACK, stack_SP :: DynFlags -> ByteOff tso_stackobj dflags = closureField dflags (oFFSET_StgTSO_stackobj dflags)
142
tso_stackobj, tso_CCCS, stack_STACK, stack_SP :: DynFlags -> ByteOff tso_stackobj dflags = closureField dflags (oFFSET_StgTSO_stackobj dflags)
142
tso_stackobj dflags = closureField dflags (oFFSET_StgTSO_stackobj dflags)
73
false
true
0
7
14
35
20
15
null
null
b52/projecteuler
src/Euler/Problems/Euler002.hs
mit
euler002 :: () -> Int euler002 _ = sum $ takeWhile (< 4000001) $ evenFibs' 1 1 where evenFibs' a b = (a + b) : evenFibs' (a + 2*b) (2*a + 3*b)
148
euler002 :: () -> Int euler002 _ = sum $ takeWhile (< 4000001) $ evenFibs' 1 1 where evenFibs' a b = (a + b) : evenFibs' (a + 2*b) (2*a + 3*b)
148
euler002 _ = sum $ takeWhile (< 4000001) $ evenFibs' 1 1 where evenFibs' a b = (a + b) : evenFibs' (a + 2*b) (2*a + 3*b)
126
false
true
3
10
38
105
49
56
null
null
Siprj/xmonadrc
src/Expand.hs
mit
variable ('{':as) = let (a, b) = break (== '}') as in (Variable a, tail b)
78
variable ('{':as) = let (a, b) = break (== '}') as in (Variable a, tail b)
78
variable ('{':as) = let (a, b) = break (== '}') as in (Variable a, tail b)
78
false
false
0
10
19
55
28
27
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
arrayPrimTyConKey = mkPreludeTyConUnique 3
65
arrayPrimTyConKey = mkPreludeTyConUnique 3
65
arrayPrimTyConKey = mkPreludeTyConUnique 3
65
false
false
0
5
26
9
4
5
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Creatives/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). aclUploadType :: Lens' AccountsCreativesList (Maybe Text) aclUploadType = lens _aclUploadType (\ s a -> s{_aclUploadType = a})
205
aclUploadType :: Lens' AccountsCreativesList (Maybe Text) aclUploadType = lens _aclUploadType (\ s a -> s{_aclUploadType = a})
134
aclUploadType = lens _aclUploadType (\ s a -> s{_aclUploadType = a})
76
true
true
0
9
34
48
25
23
null
null
utky/lycopene
src/Lycopene/Core/Monad.hs
apache-2.0
issue :: IssueM a -> Lycopene a issue = hoistFreer IssueL
57
issue :: IssueM a -> Lycopene a issue = hoistFreer IssueL
57
issue = hoistFreer IssueL
25
false
true
0
7
10
29
12
17
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\xFA3C' = "\x5C6E"
33
decomposeChar '\xFA3C' = "\x5C6E"
33
decomposeChar '\xFA3C' = "\x5C6E"
33
false
false
0
4
3
10
4
6
null
null
jasonzoladz/persistent
persistent-sqlite/Database/Persist/Sqlite.hs
mit
insertSql' :: EntityDef -> [PersistValue] -> InsertSqlResult insertSql' ent vals = case entityPrimary ent of Just _ -> ISRManyKeys sql vals where sql = T.concat [ "INSERT INTO " , escape $ entityDB ent , "(" , T.intercalate "," $ map (e...
1,294
insertSql' :: EntityDef -> [PersistValue] -> InsertSqlResult insertSql' ent vals = case entityPrimary ent of Just _ -> ISRManyKeys sql vals where sql = T.concat [ "INSERT INTO " , escape $ entityDB ent , "(" , T.intercalate "," $ map (e...
1,294
insertSql' ent vals = case entityPrimary ent of Just _ -> ISRManyKeys sql vals where sql = T.concat [ "INSERT INTO " , escape $ entityDB ent , "(" , T.intercalate "," $ map (escape . fieldDB) $ entityFields ent , ") VALU...
1,233
false
true
3
15
642
314
159
155
null
null
ekohl/ganeti
htools/test.hs
gpl-2.0
transformTestOpts :: Args -> Options -> IO Args transformTestOpts args opts = do r <- case optReplay opts of Nothing -> return Nothing Just str -> do let vs = sepSplit ',' str (case vs of [rng, size] -> return $ Just (read rng, read size) _ -> fail "...
430
transformTestOpts :: Args -> Options -> IO Args transformTestOpts args opts = do r <- case optReplay opts of Nothing -> return Nothing Just str -> do let vs = sepSplit ',' str (case vs of [rng, size] -> return $ Just (read rng, read size) _ -> fail "...
430
transformTestOpts args opts = do r <- case optReplay opts of Nothing -> return Nothing Just str -> do let vs = sepSplit ',' str (case vs of [rng, size] -> return $ Just (read rng, read size) _ -> fail "Invalid state given") return args { chatty = o...
382
false
true
2
11
166
143
72
71
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT18.hs
gpl-3.0
_ && _ = False
17
_ && _ = False
17
_ && _ = False
17
false
false
0
5
7
12
5
7
null
null
tfausak/exercism-solutions
haskell/nucleotide-count/nucleotide-count_test.hs
mit
main :: IO () main = void $ runTestTT $ TestList [ TestList countTests , TestList nucleotideCountTests]
117
main :: IO () main = void $ runTestTT $ TestList [ TestList countTests , TestList nucleotideCountTests]
117
main = void $ runTestTT $ TestList [ TestList countTests , TestList nucleotideCountTests]
103
false
true
1
8
30
42
19
23
null
null
spechub/Hets
Maude/Maude2DG.hs
gpl-2.0
processViews _ tok _ _ _ (morph, nds, deps) = (tok', morph, nds, deps) where tok' = mkSimpleId $ drop 1 $ show tok {- | this function distinguishes whether the view is an instantiation (and thus) the view is in the map of views and the function morphismView is used or it is just a parameter binding and paramBind...
334
processViews _ tok _ _ _ (morph, nds, deps) = (tok', morph, nds, deps) where tok' = mkSimpleId $ drop 1 $ show tok {- | this function distinguishes whether the view is an instantiation (and thus) the view is in the map of views and the function morphismView is used or it is just a parameter binding and paramBind...
334
processViews _ tok _ _ _ (morph, nds, deps) = (tok', morph, nds, deps) where tok' = mkSimpleId $ drop 1 $ show tok {- | this function distinguishes whether the view is an instantiation (and thus) the view is in the map of views and the function morphismView is used or it is just a parameter binding and paramBind...
334
false
false
0
9
69
62
34
28
null
null
wouteroostervld/hspoker
src/HSPoker/Card.hs
mit
hands:: [Card] -> [Hand] hands cs = fmap ((Hand).sort) (comb 5 cs)
66
hands:: [Card] -> [Hand] hands cs = fmap ((Hand).sort) (comb 5 cs)
66
hands cs = fmap ((Hand).sort) (comb 5 cs)
41
false
true
0
8
11
45
24
21
null
null
duplode/threepenny-gui
src/Foreign/JavaScript/EventLoop.hs
bsd-3-clause
eventLoop :: (Window -> IO void) -> (Comm -> IO ()) eventLoop init comm = do -- To support concurrent FFI calls, we make three threads. -- The thread `multiplexer` reads from the client and -- sorts the messages into the appropriate queue. events <- newTQueueIO results <- newTQueueIO :: ...
3,728
eventLoop :: (Window -> IO void) -> (Comm -> IO ()) eventLoop init comm = do -- To support concurrent FFI calls, we make three threads. -- The thread `multiplexer` reads from the client and -- sorts the messages into the appropriate queue. events <- newTQueueIO results <- newTQueueIO :: ...
3,728
eventLoop init comm = do -- To support concurrent FFI calls, we make three threads. -- The thread `multiplexer` reads from the client and -- sorts the messages into the appropriate queue. events <- newTQueueIO results <- newTQueueIO :: IO (TQueue JSON.Value) -- The thread `handleCall...
3,676
false
true
0
24
1,461
746
352
394
null
null
bergmark/clay
src/Clay/Border.hs
bsd-3-clause
borderBottomLeftRadius a b = key "border-bottom-left-radius" (a ! b)
70
borderBottomLeftRadius a b = key "border-bottom-left-radius" (a ! b)
70
borderBottomLeftRadius a b = key "border-bottom-left-radius" (a ! b)
70
false
false
0
7
10
23
11
12
null
null
coursestitch/coursestitch-api
lib/CourseStitch/Models/Queries.hs
apache-2.0
getResourceWithConceptMastery :: Entity User -> Int64 -> SqlPersistT IO (Maybe (Entity Resource, [(RelationshipType, [(Entity Concept, Bool)])])) getResourceWithConceptMastery user id = do rs <- select $ from $ \(resource `LeftOuterJoin` relationship `LeftOuterJoin` concept `LeftOuterJoin` conceptMastery) -...
986
getResourceWithConceptMastery :: Entity User -> Int64 -> SqlPersistT IO (Maybe (Entity Resource, [(RelationshipType, [(Entity Concept, Bool)])])) getResourceWithConceptMastery user id = do rs <- select $ from $ \(resource `LeftOuterJoin` relationship `LeftOuterJoin` concept `LeftOuterJoin` conceptMastery) -...
986
getResourceWithConceptMastery user id = do rs <- select $ from $ \(resource `LeftOuterJoin` relationship `LeftOuterJoin` concept `LeftOuterJoin` conceptMastery) -> do on $ (concept ?. ConceptId ==. conceptMastery ?. ConceptMasteryConcept) &&. (conceptMastery ?. ConceptMasteryUser ==. (j...
840
false
true
0
18
222
339
179
160
null
null
chrisbloecker/Hive
src/Hive/Problem/SSSP/Warrior.hs
gpl-3.0
sendAll :: (Binary a, Typeable a, Generic a) => [Worker] -> a -> Process () sendAll ws msg = forM_ ws $ \w -> send w msg
120
sendAll :: (Binary a, Typeable a, Generic a) => [Worker] -> a -> Process () sendAll ws msg = forM_ ws $ \w -> send w msg
120
sendAll ws msg = forM_ ws $ \w -> send w msg
44
false
true
2
10
26
75
36
39
null
null
kulshrax/haskml
src/Tags.hs
mit
kbd :: HtmlParent kbd = newElem "kbd"
37
kbd :: HtmlParent kbd = newElem "kbd"
37
kbd = newElem "kbd"
19
false
true
0
6
6
20
8
12
null
null
ezyang/ghc
testsuite/tests/ado/ado007.hs
bsd-3-clause
-- Caused a -dcore-lint failure with an earlier version of -- ApplicativeDo due to the polymorphic let binding. test :: IO [Char] test = do x <- return 'a' y <- return 'b' let f | y == 'c' = id | otherwise = id return (map f [])
236
test :: IO [Char] test = do x <- return 'a' y <- return 'b' let f | y == 'c' = id | otherwise = id return (map f [])
124
test = do x <- return 'a' y <- return 'b' let f | y == 'c' = id | otherwise = id return (map f [])
106
true
true
1
14
56
87
38
49
null
null
keithodulaigh/Hets
Hybrid/StatAna.hs
gpl-2.0
addRigidOp :: OpType -> Id -> HybridSign -> Result HybridSign addRigidOp ty i m = return m { rigidOps = addOpTo i ty $ rigidOps m }
138
addRigidOp :: OpType -> Id -> HybridSign -> Result HybridSign addRigidOp ty i m = return m { rigidOps = addOpTo i ty $ rigidOps m }
138
addRigidOp ty i m = return m { rigidOps = addOpTo i ty $ rigidOps m }
76
false
true
0
8
33
56
27
29
null
null
alphaHeavy/cassandra-cql
tests/test-list.hs
bsd-3-clause
createListsT :: Query Schema () () createListsT = "create table listst (id uuid PRIMARY KEY, items list<text>)"
111
createListsT :: Query Schema () () createListsT = "create table listst (id uuid PRIMARY KEY, items list<text>)"
111
createListsT = "create table listst (id uuid PRIMARY KEY, items list<text>)"
76
false
true
0
6
16
22
11
11
null
null
chadbrewbaker/combinat
Math/Combinat/Numbers.hs
bsd-3-clause
ascalRow :: Integral a => a -> [Integer] pascalRow n' = worker 0 1 where n = fromIntegral n' worker j x | j>n = [] | True = let j'=j+1 in x : worker j' (div (x*(n-j)) j')
188
pascalRow :: Integral a => a -> [Integer] pascalRow n' = worker 0 1 where n = fromIntegral n' worker j x | j>n = [] | True = let j'=j+1 in x : worker j' (div (x*(n-j)) j')
188
pascalRow n' = worker 0 1 where n = fromIntegral n' worker j x | j>n = [] | True = let j'=j+1 in x : worker j' (div (x*(n-j)) j')
146
false
true
3
11
56
137
61
76
null
null
MicheleCastrovilli/EuPhBot
Library/Euphs/Easy.hs
bsd-3-clause
easyHelp :: [EasyBotFun] -> [String] -> Net String easyHelp f h = return $ if null h then "This bot replies to the following commands:\n\n" ++ intercalate "\n" (map showHelp f) else maybe "Function not found." (\(_,_,l) -...
386
easyHelp :: [EasyBotFun] -> [String] -> Net String easyHelp f h = return $ if null h then "This bot replies to the following commands:\n\n" ++ intercalate "\n" (map showHelp f) else maybe "Function not found." (\(_,_,l) -...
386
easyHelp f h = return $ if null h then "This bot replies to the following commands:\n\n" ++ intercalate "\n" (map showHelp f) else maybe "Function not found." (\(_,_,l) -> if null l then "No descriptive help" else l) $ lo...
335
false
true
2
9
150
119
60
59
null
null
eigengrau/hlint
src/Hint/Util.hs
bsd-3-clause
-- \xs -> \v vs -> e ==> \xs v -> \vs -> e -- \xs -> \ -> e ==> \xs -> e niceLambdaR xs (Lambda _ ((view -> PVar_ v):vs) x) | v `notElem` xs = niceLambdaR (xs++[v]) (Lambda an vs x)
181
niceLambdaR xs (Lambda _ ((view -> PVar_ v):vs) x) | v `notElem` xs = niceLambdaR (xs++[v]) (Lambda an vs x)
108
niceLambdaR xs (Lambda _ ((view -> PVar_ v):vs) x) | v `notElem` xs = niceLambdaR (xs++[v]) (Lambda an vs x)
108
true
false
0
12
43
77
40
37
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | [Output Only] This token allows you to get the next page of results for -- list requests. If the number of results is larger than maxResults, use -- the nextPageToken as a value for the query parameter pageToken in the -- next list request. Subsequent list requests will have their own -- nextPageToken to continue ...
480
alNextPageToken :: Lens' AddressList (Maybe Text) alNextPageToken = lens _alNextPageToken (\ s a -> s{_alNextPageToken = a})
132
alNextPageToken = lens _alNextPageToken (\ s a -> s{_alNextPageToken = a})
82
true
true
2
9
85
59
29
30
null
null
jfulseca/Pudding
src/Pudding/Test/Utilities/DoubleFunctions.hs
gpl-3.0
test_doubleEqSmallSmall = equalTest 1e-30
41
test_doubleEqSmallSmall = equalTest 1e-30
41
test_doubleEqSmallSmall = equalTest 1e-30
41
false
false
1
5
3
12
4
8
null
null
suhailshergill/extensible-effects
src/Control/Eff/State/Lazy.hs
mit
runState :: s -- ^ Initial state -> Eff (State s ': r) a -- ^ Effect incorporating State -> Eff r (a, s) -- ^ Effect containing final state and a return value runState s m = fix (handle_relay withState) m s
254
runState :: s -- ^ Initial state -> Eff (State s ': r) a -- ^ Effect incorporating State -> Eff r (a, s) runState s m = fix (handle_relay withState) m s
191
runState s m = fix (handle_relay withState) m s
47
true
true
0
11
90
73
36
37
null
null
vTurbine/ghc
compiler/main/Packages.hs
bsd-3-clause
-- no, it is not even an external name -- ----------------------------------------------------------------------------- -- Displaying packages -- | Show (very verbose) package info pprPackages :: DynFlags -> SDoc pprPackages = pprPackagesWith pprPackageConfig
261
pprPackages :: DynFlags -> SDoc pprPackages = pprPackagesWith pprPackageConfig
78
pprPackages = pprPackagesWith pprPackageConfig
46
true
true
0
5
31
22
13
9
null
null
int-e/hint
src/Hint/Conversions.hs
bsd-3-clause
-- ---------------- Misc ----------------------------- isSucceeded :: GHC.SuccessFlag -> Bool isSucceeded GHC.Succeeded = True
127
isSucceeded :: GHC.SuccessFlag -> Bool isSucceeded GHC.Succeeded = True
71
isSucceeded GHC.Succeeded = True
32
true
true
0
6
13
23
12
11
null
null
athanclark/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reify _ (P _ n _) | n == reflm "Skip" = return Skip
51
reify _ (P _ n _) | n == reflm "Skip" = return Skip
51
reify _ (P _ n _) | n == reflm "Skip" = return Skip
51
false
false
1
9
13
39
16
23
null
null
andrewthad/vinyl-vectors
src/Data/Vector/Vinyl/Default/NonEmpty/Monomorphic.hs
bsd-3-clause
-- | /O(n)/ Drop elements that do not satisfy the predicate which is applied to -- values and their indices ifilter :: G.Vector Vector (Rec Identity rs) => (Int -> Rec Identity rs -> Bool) -> Vector (Rec Identity rs) -> Vector (Rec Identity rs) ifilter = G.ifilter
266
ifilter :: G.Vector Vector (Rec Identity rs) => (Int -> Rec Identity rs -> Bool) -> Vector (Rec Identity rs) -> Vector (Rec Identity rs) ifilter = G.ifilter
158
ifilter = G.ifilter
19
true
true
5
8
49
85
40
45
null
null
andrew-m-h/libmu-HS
test/TestTypeCheck.hs
bsd-3-clause
a_floatx4 = SSAVariable Global "a_floatx4" floatx4
50
a_floatx4 = SSAVariable Global "a_floatx4" floatx4
50
a_floatx4 = SSAVariable Global "a_floatx4" floatx4
50
false
false
0
5
5
13
6
7
null
null
dimitri-xyz/mercado-bitcoin
src/Mercado/Internals.hs
bsd-3-clause
convertLimitOrderResp _ _ = Nothing
35
convertLimitOrderResp _ _ = Nothing
35
convertLimitOrderResp _ _ = Nothing
35
false
false
0
5
4
11
5
6
null
null
juanmab37/HOpenCV-0.5.0.1
src/HOpenCV/CV/ImgProc.hs
gpl-2.0
fromCvtColorFlag RGB2BGR565 = 13
33
fromCvtColorFlag RGB2BGR565 = 13
33
fromCvtColorFlag RGB2BGR565 = 13
33
false
false
0
5
4
9
4
5
null
null
cchalmers/geometry
src/Geometry/TwoD/Segment.hs
bsd-3-clause
(×) :: Num n => V2 n -> V2 n -> n (×) = crossZ
46
(×) :: Num n => V2 n -> V2 n -> n (×) = crossZ
46
(×) = crossZ
12
false
true
0
9
14
43
20
23
null
null
DougBurke/swish
src/Swish/RDF/ClassRestrictionRule.hs
lgpl-2.1
mkPrefix :: Namespace -> B.Builder mkPrefix = namespaceToBuilder
64
mkPrefix :: Namespace -> B.Builder mkPrefix = namespaceToBuilder
64
mkPrefix = namespaceToBuilder
29
false
true
0
6
7
17
9
8
null
null
yihuang/webproxy-yesod
Settings.hs
bsd-2-clause
staticDir :: FilePath staticDir = "static"
42
staticDir :: FilePath staticDir = "static"
42
staticDir = "static"
20
false
true
0
6
5
18
7
11
null
null
nushio3/ghc
libraries/base/Data/Data.hs
bsd-3-clause
mkNoRepType :: String -> DataType mkNoRepType str = DataType { tycon = str , datarep = NoRep }
168
mkNoRepType :: String -> DataType mkNoRepType str = DataType { tycon = str , datarep = NoRep }
168
mkNoRepType str = DataType { tycon = str , datarep = NoRep }
134
false
true
0
7
91
41
20
21
null
null
fmthoma/ghc
compiler/types/CoAxiom.hs
bsd-3-clause
toUnbranchedList _ = pprPanic "toUnbranchedList" empty
54
toUnbranchedList _ = pprPanic "toUnbranchedList" empty
54
toUnbranchedList _ = pprPanic "toUnbranchedList" empty
54
false
false
0
5
5
16
6
10
null
null
HaritzPuerto/SemanticsforWhileLanguage
While/Exercises03.hs
mit
sosAexp (Redex (Add a1 a2) s) = Redex (Add a1' a2) s' where Redex a1' s' = sosAexp (Redex a1 s) -- a1 * a2
113
sosAexp (Redex (Add a1 a2) s) = Redex (Add a1' a2) s' where Redex a1' s' = sosAexp (Redex a1 s) -- a1 * a2
113
sosAexp (Redex (Add a1 a2) s) = Redex (Add a1' a2) s' where Redex a1' s' = sosAexp (Redex a1 s) -- a1 * a2
113
false
false
0
9
31
62
30
32
null
null
thedward/haskell-ogdl
Text/OGDL/Pretty.hs
bsd-3-clause
ppTree (Node n ((Node b@(Block _) _ ):_)) = (ppNode n) <+> (ppNode b)
69
ppTree (Node n ((Node b@(Block _) _ ):_)) = (ppNode n) <+> (ppNode b)
69
ppTree (Node n ((Node b@(Block _) _ ):_)) = (ppNode n) <+> (ppNode b)
69
false
false
0
13
13
58
29
29
null
null
Mathnerd314/lamdu
src/Lamdu/Main.hs
gpl-3.0
mkGlobalEventMap :: Config -> IORef Settings -> IO (Widget.EventHandlers IO) mkGlobalEventMap config settingsRef = do settings <- readIORef settingsRef let curInfoMode = settings ^. Settings.sInfoMode next = nextInfoMode curInfoMode nextDoc = EventMap.Doc ["View", "Subtext", "Show " ++ show next] retu...
448
mkGlobalEventMap :: Config -> IORef Settings -> IO (Widget.EventHandlers IO) mkGlobalEventMap config settingsRef = do settings <- readIORef settingsRef let curInfoMode = settings ^. Settings.sInfoMode next = nextInfoMode curInfoMode nextDoc = EventMap.Doc ["View", "Subtext", "Show " ++ show next] retu...
448
mkGlobalEventMap config settingsRef = do settings <- readIORef settingsRef let curInfoMode = settings ^. Settings.sInfoMode next = nextInfoMode curInfoMode nextDoc = EventMap.Doc ["View", "Subtext", "Show " ++ show next] return . Widget.keysEventMap (Config.nextInfoModeKeys config) nextDoc . m...
371
false
true
0
14
77
136
65
71
null
null
clockworkdevstudio/Idlewild-Lang
LexerData.hs
bsd-2-clause
keyword :: TokenID -> String -> (String, Keyword) keyword tokenID value = (value, Keyword tokenID value (length value))
119
keyword :: TokenID -> String -> (String, Keyword) keyword tokenID value = (value, Keyword tokenID value (length value))
119
keyword tokenID value = (value, Keyword tokenID value (length value))
69
false
true
0
9
17
55
27
28
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
diskDtDefaults :: Map DiskTemplate (Map String PyValueEx) diskDtDefaults = Map.fromList [ (DTBlock, Map.empty) , (DTDiskless, Map.empty) , (DTDrbd8, Map.fromList [ (drbdDataStripes, PyValueEx lvmStripecount) , (drbdDefaultMetavg, PyValueEx defaultVg) ...
1,956
diskDtDefaults :: Map DiskTemplate (Map String PyValueEx) diskDtDefaults = Map.fromList [ (DTBlock, Map.empty) , (DTDiskless, Map.empty) , (DTDrbd8, Map.fromList [ (drbdDataStripes, PyValueEx lvmStripecount) , (drbdDefaultMetavg, PyValueEx defaultVg) ...
1,956
diskDtDefaults = Map.fromList [ (DTBlock, Map.empty) , (DTDiskless, Map.empty) , (DTDrbd8, Map.fromList [ (drbdDataStripes, PyValueEx lvmStripecount) , (drbdDefaultMetavg, PyValueEx defaultVg) , (drbdDelayTarget, PyValueEx defaultDelayTarg...
1,898
false
true
0
10
712
419
243
176
null
null
spechub/Hets
Driver/ReadFn.hs
gpl-2.0
isDMU :: QName -> Bool isDMU q = qName q == "ClashResult" && noPrefix q
71
isDMU :: QName -> Bool isDMU q = qName q == "ClashResult" && noPrefix q
71
isDMU q = qName q == "ClashResult" && noPrefix q
48
false
true
0
7
14
32
15
17
null
null
sebastiaanvisser/tonic
src/Xml/Tonic/Print.hs
bsd-3-clause
attribute :: X.Attribute -> [Builder] attribute (X.Attribute k v) = [fromLazyText k <> "=\"" <> fromLazyText v <> "\""]
119
attribute :: X.Attribute -> [Builder] attribute (X.Attribute k v) = [fromLazyText k <> "=\"" <> fromLazyText v <> "\""]
119
attribute (X.Attribute k v) = [fromLazyText k <> "=\"" <> fromLazyText v <> "\""]
81
false
true
0
9
18
54
27
27
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/GetByDataFilter.hs
mpl-2.0
-- | V1 error format. sgbdfXgafv :: Lens' SpreadsheetsGetByDataFilter (Maybe Xgafv) sgbdfXgafv = lens _sgbdfXgafv (\ s a -> s{_sgbdfXgafv = a})
145
sgbdfXgafv :: Lens' SpreadsheetsGetByDataFilter (Maybe Xgafv) sgbdfXgafv = lens _sgbdfXgafv (\ s a -> s{_sgbdfXgafv = a})
123
sgbdfXgafv = lens _sgbdfXgafv (\ s a -> s{_sgbdfXgafv = a})
61
true
true
1
9
23
52
25
27
null
null
yiannist/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pIAllocatorReqName :: Field pIAllocatorReqName = withDoc "IAllocator target name (new instance, node to evac, etc.)" . renameField "IAllocatorReqName" $ simpleField "name" [t| NonEmptyString |]
197
pIAllocatorReqName :: Field pIAllocatorReqName = withDoc "IAllocator target name (new instance, node to evac, etc.)" . renameField "IAllocatorReqName" $ simpleField "name" [t| NonEmptyString |]
197
pIAllocatorReqName = withDoc "IAllocator target name (new instance, node to evac, etc.)" . renameField "IAllocatorReqName" $ simpleField "name" [t| NonEmptyString |]
169
false
true
0
7
27
34
18
16
null
null
kmels/tersus
Tersus/Cluster/TersusServiceApp.hs
bsd-2-clause
-- | Function that processes a message sent to the tersus service application. It will query -- the database for all users and return the list of the users tersusServiceRecv :: TMessage -> TersusServiceM AppInstance () tersusServiceRecv (TMessage uSender uReceiver aSender aReceiver _ _) = do {-currTime <- liftIO...
1,792
tersusServiceRecv :: TMessage -> TersusServiceM AppInstance () tersusServiceRecv (TMessage uSender uReceiver aSender aReceiver _ _) = do {-currTime <- liftIO $ getCurrentTime users <- runQuery $ getAppUsersQuery aSender --selectList [] []) :: TersusServiceM [Entity User] sendMessage $ TMessage uReceiver ...
1,636
tersusServiceRecv (TMessage uSender uReceiver aSender aReceiver _ _) = do {-currTime <- liftIO $ getCurrentTime users <- runQuery $ getAppUsersQuery aSender --selectList [] []) :: TersusServiceM [Entity User] sendMessage $ TMessage uReceiver uSender aReceiver aSender (encodeAsText users) currTime-} r...
1,573
true
true
0
8
510
53
27
26
null
null
zeyuanxy/haskell-playground
ninety-nine-haskell-problems/vol5/48.hs
mit
tablen :: Int -> ([Bool] -> Bool) -> IO () tablen n f = mapM_ putStrLn [toStr a ++ show (f a) | a <- args n] where args n = replicateM n [True, False] toStr = unwords . map (\x -> show x ++ space x) space True = " " space False = " "
268
tablen :: Int -> ([Bool] -> Bool) -> IO () tablen n f = mapM_ putStrLn [toStr a ++ show (f a) | a <- args n] where args n = replicateM n [True, False] toStr = unwords . map (\x -> show x ++ space x) space True = " " space False = " "
268
tablen n f = mapM_ putStrLn [toStr a ++ show (f a) | a <- args n] where args n = replicateM n [True, False] toStr = unwords . map (\x -> show x ++ space x) space True = " " space False = " "
225
false
true
0
10
91
147
71
76
null
null
bennofs/cabal
Cabal/Distribution/Simple/GHC/Internal.hs
bsd-3-clause
targetPlatform :: [(String, String)] -> Maybe Platform targetPlatform ghcInfo = platformFromTriple =<< lookup "Target platform" ghcInfo
135
targetPlatform :: [(String, String)] -> Maybe Platform targetPlatform ghcInfo = platformFromTriple =<< lookup "Target platform" ghcInfo
135
targetPlatform ghcInfo = platformFromTriple =<< lookup "Target platform" ghcInfo
80
false
true
0
7
15
39
20
19
null
null
jsnajder/fer3-catalogue
src/WorkGroups.hs
bsd-3-clause
longestShortestPath :: Gr a b -> Int longestShortestPath g = maximum $ map (longest g) (nodes g) where longest g x = maximum . map (\(LP p) -> length p) . spTree x $ emap (const 1) g {- mkGroups :: Catalogue -> [OverlapComponent] -> [([OverlapComponent], [ItemEditor])] mkGroups cat oc = [ (map fst xs, e) | xs@((x...
421
longestShortestPath :: Gr a b -> Int longestShortestPath g = maximum $ map (longest g) (nodes g) where longest g x = maximum . map (\(LP p) -> length p) . spTree x $ emap (const 1) g {- mkGroups :: Catalogue -> [OverlapComponent] -> [([OverlapComponent], [ItemEditor])] mkGroups cat oc = [ (map fst xs, e) | xs@((x...
421
longestShortestPath g = maximum $ map (longest g) (nodes g) where longest g x = maximum . map (\(LP p) -> length p) . spTree x $ emap (const 1) g {- mkGroups :: Catalogue -> [OverlapComponent] -> [([OverlapComponent], [ItemEditor])] mkGroups cat oc = [ (map fst xs, e) | xs@((x,e):_) <- eqClasses ((==) `on` snd) x...
384
false
true
1
12
84
113
51
62
null
null
ardumont/write-yourself-a-scheme-lab
Scheme/Primitive.hs
gpl-2.0
eqv [Atom a0, Atom a1] = return $ Bool $ a0 == a1
49
eqv [Atom a0, Atom a1] = return $ Bool $ a0 == a1
49
eqv [Atom a0, Atom a1] = return $ Bool $ a0 == a1
49
false
false
0
7
12
34
16
18
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
1325 = 1324
11
1325 = 1324
11
1325 = 1324
11
false
false
1
5
2
10
3
7
null
null
AndreasPK/stack
src/Stack/Fetch.hs
bsd-3-clause
-- | Try to come up with typo corrections for given package identifier using -- package caches. This should be called before giving up, i.e. when -- 'fuzzyLookupCandidates' cannot return anything. typoCorrectionCandidates :: PackageIdentifier -> PackageCaches -> Maybe (NonEmpty T.Text) typoCorrectionCandidates id...
537
typoCorrectionCandidates :: PackageIdentifier -> PackageCaches -> Maybe (NonEmpty T.Text) typoCorrectionCandidates ident = let getName = packageNameText . packageIdentifierName name = getName ident in NE.nonEmpty . Map.keys . Map.filterWithKey (const . (== 1) . damerauLevenshtein name) ....
340
typoCorrectionCandidates ident = let getName = packageNameText . packageIdentifierName name = getName ident in NE.nonEmpty . Map.keys . Map.filterWithKey (const . (== 1) . damerauLevenshtein name) . Map.mapKeys getName
244
true
true
3
11
100
110
53
57
null
null
geekingfrog/project-euler
Problem022.hs
gpl-3.0
prod2 :: (Int, Int) -> Int prod2 (a, b) = a*b
45
prod2 :: (Int, Int) -> Int prod2 (a, b) = a*b
45
prod2 (a, b) = a*b
18
false
true
0
6
10
34
19
15
null
null
MauriceIsAG/HaskellScratch
.stack-work/intero/intero1846heo.hs
bsd-3-clause
gcd' :: Int -> Int -> Int gcd' n1 n2 | n1 == n2 = n1 | n1 > n2 = gcd' (n1 - n2) n2 | otherwise = gcd' (n2 - n1) n1
120
gcd' :: Int -> Int -> Int gcd' n1 n2 | n1 == n2 = n1 | n1 > n2 = gcd' (n1 - n2) n2 | otherwise = gcd' (n2 - n1) n1
120
gcd' n1 n2 | n1 == n2 = n1 | n1 > n2 = gcd' (n1 - n2) n2 | otherwise = gcd' (n2 - n1) n1
94
false
true
2
8
39
78
38
40
null
null
ur-crypto/sec-lib
library/Examples.hs
mit
editDist :: Int -> Int -> SecureFunction editDist i j xs ys = let xss = (take i xs) yss = (take j ys) in let prevCol = initDistEff (length yss) in editDistEff 1 [Constant False] prevCol xss yss
291
editDist :: Int -> Int -> SecureFunction editDist i j xs ys = let xss = (take i xs) yss = (take j ys) in let prevCol = initDistEff (length yss) in editDistEff 1 [Constant False] prevCol xss yss
291
editDist i j xs ys = let xss = (take i xs) yss = (take j ys) in let prevCol = initDistEff (length yss) in editDistEff 1 [Constant False] prevCol xss yss
250
false
true
0
13
136
97
47
50
null
null
thlorenz/WebToInk
webtoink-converter/Data/List/Utils.hs
bsd-2-clause
dropWhileList func list@(x:xs) = if func list then dropWhileList func xs else list
100
dropWhileList func list@(x:xs) = if func list then dropWhileList func xs else list
100
dropWhileList func list@(x:xs) = if func list then dropWhileList func xs else list
100
false
false
1
7
30
44
19
25
null
null
lukexi/ghc
compiler/cmm/CmmType.hs
bsd-3-clause
widthInBytes W512 = 64
22
widthInBytes W512 = 64
22
widthInBytes W512 = 64
22
false
false
1
5
3
13
4
9
null
null
spechub/Hets
Comorphisms/Hs2HOLCFaux.hs
gpl-2.0
-- --------------------------- constants --------------------------------- xDummy :: IsaTerm xDummy = conDouble "dummy"
120
xDummy :: IsaTerm xDummy = conDouble "dummy"
44
xDummy = conDouble "dummy"
26
true
true
0
6
11
22
9
13
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_FLOAT_MAT3_ARB :: GLenum gl_FLOAT_MAT3_ARB = 0x8B5B
54
gl_FLOAT_MAT3_ARB :: GLenum gl_FLOAT_MAT3_ARB = 0x8B5B
54
gl_FLOAT_MAT3_ARB = 0x8B5B
26
false
true
0
4
5
11
6
5
null
null
prb/perpubplat
src/Blog/BackEnd/Holder.hs
bsd-3-clause
apply :: Holder a -> (a -> a) -> IO a apply h f = do { hb <- newEmptyMVar ; writeChan (requests h) $ Apply hb f ; takeMVar hb }
157
apply :: Holder a -> (a -> a) -> IO a apply h f = do { hb <- newEmptyMVar ; writeChan (requests h) $ Apply hb f ; takeMVar hb }
157
apply h f = do { hb <- newEmptyMVar ; writeChan (requests h) $ Apply hb f ; takeMVar hb }
119
false
true
0
10
61
75
36
39
null
null
tjakway/ghcjvm
compiler/ghci/ByteCodeItbls.hs
bsd-3-clause
mkItblEnv :: [(Name,ItblPtr)] -> ItblEnv mkItblEnv pairs = mkNameEnv [(n, (n,p)) | (n,p) <- pairs]
98
mkItblEnv :: [(Name,ItblPtr)] -> ItblEnv mkItblEnv pairs = mkNameEnv [(n, (n,p)) | (n,p) <- pairs]
98
mkItblEnv pairs = mkNameEnv [(n, (n,p)) | (n,p) <- pairs]
57
false
true
0
9
14
59
34
25
null
null
JoeyEremondi/utrecht-apa-p1
src/Elm/Compiler/Type.hs
bsd-3-clause
toDoc :: Context -> Type -> P.Doc toDoc context tipe = case tipe of Lambda _ _ -> let t:ts = map (toDoc Function) (collectLambdas tipe) lambda = P.sep [ t, P.sep (map (P.text "->" <+>) ts) ] in case context of None -> lambda ...
1,647
toDoc :: Context -> Type -> P.Doc toDoc context tipe = case tipe of Lambda _ _ -> let t:ts = map (toDoc Function) (collectLambdas tipe) lambda = P.sep [ t, P.sep (map (P.text "->" <+>) ts) ] in case context of None -> lambda ...
1,647
toDoc context tipe = case tipe of Lambda _ _ -> let t:ts = map (toDoc Function) (collectLambdas tipe) lambda = P.sep [ t, P.sep (map (P.text "->" <+>) ts) ] in case context of None -> lambda _ -> P.parens lambda ...
1,613
false
true
0
21
791
602
299
303
null
null
davidheg/Cs4032-use-haskell-api
.stack-work/dist/b7fec021/build/autogen/Paths_use_haskell_api.hs
bsd-3-clause
bindir, libdir, datadir, libexecdir, sysconfdir :: FilePath bindir = "C:\\Users\\David Hegarty\\Documents\\Cs4032-use-haskell-api\\.stack-work\\install\\ef077761\\bin"
172
bindir, libdir, datadir, libexecdir, sysconfdir :: FilePath bindir = "C:\\Users\\David Hegarty\\Documents\\Cs4032-use-haskell-api\\.stack-work\\install\\ef077761\\bin"
171
bindir = "C:\\Users\\David Hegarty\\Documents\\Cs4032-use-haskell-api\\.stack-work\\install\\ef077761\\bin"
111
false
true
2
5
15
24
14
10
null
null
jlamothe/sortable-test
Common.hs
gpl-3.0
decodeDate :: String -> Maybe Day decodeDate str = case splitOn "/" str of [mStr, dStr, yStr] -> do month <- readMay mStr :: Maybe Int day <- readMay dStr :: Maybe Int year <- readMay yStr :: Maybe Integer Just $ fromGregorian year month day _ -> Nothing
277
decodeDate :: String -> Maybe Day decodeDate str = case splitOn "/" str of [mStr, dStr, yStr] -> do month <- readMay mStr :: Maybe Int day <- readMay dStr :: Maybe Int year <- readMay yStr :: Maybe Integer Just $ fromGregorian year month day _ -> Nothing
277
decodeDate str = case splitOn "/" str of [mStr, dStr, yStr] -> do month <- readMay mStr :: Maybe Int day <- readMay dStr :: Maybe Int year <- readMay yStr :: Maybe Integer Just $ fromGregorian year month day _ -> Nothing
243
false
true
3
8
71
113
53
60
null
null
max630/git-rehi
app/Rehi/Utils/IO.hs
gpl-2.0
initProgram :: IO () initProgram = do setFileSystemEncoding utf8_roundtrip #ifdef mingw32_HOST_OS stdoutH <- WM.getStdHandle WM.sTD_OUTPUT_HANDLE stdoutT <- WF.getFileType stdoutH if stdoutT == WF.fILE_TYPE_PIPE then do name <- encode =<< getFileNameInformation stdoutH case regex_match "^\\\\Dev...
496
initProgram :: IO () initProgram = do setFileSystemEncoding utf8_roundtrip #ifdef mingw32_HOST_OS stdoutH <- WM.getStdHandle WM.sTD_OUTPUT_HANDLE stdoutT <- WF.getFileType stdoutH if stdoutT == WF.fILE_TYPE_PIPE then do name <- encode =<< getFileNameInformation stdoutH case regex_match "^\\\\Dev...
496
initProgram = do setFileSystemEncoding utf8_roundtrip #ifdef mingw32_HOST_OS stdoutH <- WM.getStdHandle WM.sTD_OUTPUT_HANDLE stdoutT <- WF.getFileType stdoutH if stdoutT == WF.fILE_TYPE_PIPE then do name <- encode =<< getFileNameInformation stdoutH case regex_match "^\\\\Device\\\\NamedPipe\\\\m...
475
false
true
0
15
98
135
60
75
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/Place.hs
bsd-2-clause
{- Utilities -} scale :: (RealFrac a, Integral b) => a -> b -> b -> b scale r n1 n2 = truncate $ r * fi n2 + (1 - r) * fi n1
125
scale :: (RealFrac a, Integral b) => a -> b -> b -> b scale r n1 n2 = truncate $ r * fi n2 + (1 - r) * fi n1
108
scale r n1 n2 = truncate $ r * fi n2 + (1 - r) * fi n1
54
true
true
0
10
35
80
39
41
null
null
lubomir/dot-race
fay-shared/Geometry.hs
bsd-3-clause
-- |Translate the path by moving every single point. -- translate :: Double -> Double -> Path -> Path translate x y = map (translatePoint x y)
142
translate :: Double -> Double -> Path -> Path translate x y = map (translatePoint x y)
86
translate x y = map (translatePoint x y)
40
true
true
0
7
26
41
21
20
null
null
goakley/Hackskell
src/Hack/Assembler.hs
gpl-3.0
parseOneAssembly :: String -> Either String Instruction parseOneAssembly string | start == '(' = if end /= ')' then Left "Marker does not end with a close paren ')'" else Right (Marker center) | start == '@' = Right (Address (if all isDigit center then Literal (read (tail strin...
646
parseOneAssembly :: String -> Either String Instruction parseOneAssembly string | start == '(' = if end /= ')' then Left "Marker does not end with a close paren ')'" else Right (Marker center) | start == '@' = Right (Address (if all isDigit center then Literal (read (tail strin...
646
parseOneAssembly string | start == '(' = if end /= ')' then Left "Marker does not end with a close paren ')'" else Right (Marker center) | start == '@' = Right (Address (if all isDigit center then Literal (read (tail string)) else Symbol (tail string))) -- | start == '@' = if ...
590
false
true
3
13
191
183
83
100
null
null
Peaker/gridview
src/Control/Concurrent/Responder.hs
bsd-3-clause
handleRequests :: Responder -> IO () handleRequests (Responder requestsMVar) = do requests <- modifyMVar requestsMVar $ \requests -> return ([], requests) mapM_ handleRequest requests
187
handleRequests :: Responder -> IO () handleRequests (Responder requestsMVar) = do requests <- modifyMVar requestsMVar $ \requests -> return ([], requests) mapM_ handleRequest requests
187
handleRequests (Responder requestsMVar) = do requests <- modifyMVar requestsMVar $ \requests -> return ([], requests) mapM_ handleRequest requests
150
false
true
0
12
27
67
32
35
null
null
sdiehl/ghc
compiler/typecheck/TcOrigin.hs
bsd-3-clause
matchesCtOrigin (XMatchGroup nec) = noExtCon nec
48
matchesCtOrigin (XMatchGroup nec) = noExtCon nec
48
matchesCtOrigin (XMatchGroup nec) = noExtCon nec
48
false
false
0
7
5
18
8
10
null
null
trbauer/progargs
Prog/Args/Args.hs
mit
-- A pure form of the option-flag is an option that can be in option or flag form. -- E.g. -Xfoo and -Xfoo=value are both accepted. The user passes different -- handlers for each. optVF :: (OptVal a) => Spec o -> String -- short name -> String -- long name -> String -- type -> String -- short desc ->...
565
optVF :: (OptVal a) => Spec o -> String -- short name -> String -- long name -> String -- type -> String -- short desc -> String -- long desc -> (o -> o) -- sets with no arg -> (a -> o -> o) -- sets with an arg -> OptSpec o optVF spec snm lnm ty desc ext_desc set_flag set_unary = optVFIO spec...
383
optVF spec snm lnm ty desc ext_desc set_flag set_unary = optVFIO spec snm lnm ty desc ext_desc (sinkIO set_flag) (sinkIO2 set_unary)
136
true
true
0
17
137
133
71
62
null
null
KommuSoft/dep-software
Dep.Algorithms.Cpu.hs
gpl-3.0
insType (Stor _) = [F,T]
24
insType (Stor _) = [F,T]
24
insType (Stor _) = [F,T]
24
false
false
0
7
4
21
11
10
null
null
acowley/ghc
compiler/nativeGen/Dwarf/Constants.hs
bsd-3-clause
-- | Dwarf attributes dW_AT_name, dW_AT_stmt_list, dW_AT_low_pc, dW_AT_high_pc, dW_AT_language, dW_AT_comp_dir, dW_AT_producer, dW_AT_external, dW_AT_frame_base, dW_AT_use_UTF8, dW_AT_MIPS_linkage_name :: Word dW_AT_name = 0x03
244
dW_AT_name, dW_AT_stmt_list, dW_AT_low_pc, dW_AT_high_pc, dW_AT_language, dW_AT_comp_dir, dW_AT_producer, dW_AT_external, dW_AT_frame_base, dW_AT_use_UTF8, dW_AT_MIPS_linkage_name :: Word dW_AT_name = 0x03
222
dW_AT_name = 0x03
30
true
true
0
4
36
32
27
5
null
null
peterokagey/haskellOEIS
src/Sandbox/OEIS/FigurateSums.hs
apache-2.0
squares = map (^2) [1..]
26
squares = map (^2) [1..]
26
squares = map (^2) [1..]
26
false
false
1
6
6
22
10
12
null
null
alexander-at-github/eta
compiler/ETA/DeSugar/Coverage.hs
bsd-3-clause
addTickLHsExpr :: LHsExpr Id -> TM (LHsExpr Id) addTickLHsExpr e@(L pos e0) = do d <- getDensity case d of TickForBreakPoints | isGoodBreakExpr e0 -> tick_it TickForCoverage -> tick_it TickCallSites | isCallSite e0 -> tick_it _other -> dont_tick_it where tick_it = a...
704
addTickLHsExpr :: LHsExpr Id -> TM (LHsExpr Id) addTickLHsExpr e@(L pos e0) = do d <- getDensity case d of TickForBreakPoints | isGoodBreakExpr e0 -> tick_it TickForCoverage -> tick_it TickCallSites | isCallSite e0 -> tick_it _other -> dont_tick_it where tick_it = a...
704
addTickLHsExpr e@(L pos e0) = do d <- getDensity case d of TickForBreakPoints | isGoodBreakExpr e0 -> tick_it TickForCoverage -> tick_it TickCallSites | isCallSite e0 -> tick_it _other -> dont_tick_it where tick_it = allocTickBox (ExpBox False) False False pos $ add...
656
false
true
14
7
165
132
67
65
null
null
abrim/yesod-dsl
YesodDsl/Generator/GetHandler.hs
bsd-2-clause
getStmt _ = ""
14
getStmt _ = ""
14
getStmt _ = ""
14
false
false
0
5
3
9
4
5
null
null
charlesrosenbauer/Bzo-Compiler
src/Core.hs
gpl-3.0
showDefinition (TypeSyntax _ tyid file defs) = " TYSYN:\n " ++ (show tyid) ++ "\n " ++ (show file) ++ "\n D: " ++ (show defs)
276
showDefinition (TypeSyntax _ tyid file defs) = " TYSYN:\n " ++ (show tyid) ++ "\n " ++ (show file) ++ "\n D: " ++ (show defs)
276
showDefinition (TypeSyntax _ tyid file defs) = " TYSYN:\n " ++ (show tyid) ++ "\n " ++ (show file) ++ "\n D: " ++ (show defs)
276
false
false
0
11
176
60
29
31
null
null
kolmodin/cabal
cabal-install/Distribution/Client/FileMonitor.hs
bsd-3-clause
probeDirExistence :: FilePath -> FilePath -> ChangedM () probeDirExistence root dir = do existsDir <- liftIO $ doesDirectoryExist (root </> dir) unless existsDir (somethingChanged dir) -- | Within the @root@ directory, check if @file@ still does not exist. -- If it *does* exist, short-circuit.
304
probeDirExistence :: FilePath -> FilePath -> ChangedM () probeDirExistence root dir = do existsDir <- liftIO $ doesDirectoryExist (root </> dir) unless existsDir (somethingChanged dir) -- | Within the @root@ directory, check if @file@ still does not exist. -- If it *does* exist, short-circuit.
304
probeDirExistence root dir = do existsDir <- liftIO $ doesDirectoryExist (root </> dir) unless existsDir (somethingChanged dir) -- | Within the @root@ directory, check if @file@ still does not exist. -- If it *does* exist, short-circuit.
247
false
true
0
11
53
66
32
34
null
null
jovermann/tip-toi-reveng
src/tttool.hs
mit
printExtract :: B.ByteString -> Offset -> Word32 -> IO () printExtract b o l = do let o1 = o .&. 0xFFFFFFF0 lim_forM_ [o1, o1+0x10 .. (o + l-1)] $ \s -> do let s' = max o s let d = fromIntegral s' - fromIntegral s let l' = (min (o + l) (s + 0x10)) - s' printf " 0x%08X: %s%s\n"...
633
printExtract :: B.ByteString -> Offset -> Word32 -> IO () printExtract b o l = do let o1 = o .&. 0xFFFFFFF0 lim_forM_ [o1, o1+0x10 .. (o + l-1)] $ \s -> do let s' = max o s let d = fromIntegral s' - fromIntegral s let l' = (min (o + l) (s + 0x10)) - s' printf " 0x%08X: %s%s\n"...
633
printExtract b o l = do let o1 = o .&. 0xFFFFFFF0 lim_forM_ [o1, o1+0x10 .. (o + l-1)] $ \s -> do let s' = max o s let d = fromIntegral s' - fromIntegral s let l' = (min (o + l) (s + 0x10)) - s' printf " 0x%08X: %s%s\n" s (replicate (d*3) ' ') ...
575
false
true
0
18
258
286
137
149
null
null
qmenoret/gitlab-report-generator
src/json-parser/Task.hs
bsd-3-clause
getComparator "project_id" = comparing Task.project_id
63
getComparator "project_id" = comparing Task.project_id
63
getComparator "project_id" = comparing Task.project_id
63
false
false
0
6
13
14
6
8
null
null
paradoxix/haskellplayground
src/Lib.hs
bsd-3-clause
queryTest :: Pool Connection -> Int64 -> IO [B.BankObject] queryTest p cnt = do withResource p $ \conn -> withTransactionLevel RepeatableRead conn $ do allBankObjects conn cnt
187
queryTest :: Pool Connection -> Int64 -> IO [B.BankObject] queryTest p cnt = do withResource p $ \conn -> withTransactionLevel RepeatableRead conn $ do allBankObjects conn cnt
187
queryTest p cnt = do withResource p $ \conn -> withTransactionLevel RepeatableRead conn $ do allBankObjects conn cnt
128
false
true
0
12
38
67
31
36
null
null
shinjiro-itagaki/shinjirecs
shinjirecs-api/src/Config/Class.hs
gpl-3.0
lookupWord :: Text -> Object -> Maybe (Word) lookupWord key config = lookupInteger key config >>= return . fromInteger
118
lookupWord :: Text -> Object -> Maybe (Word) lookupWord key config = lookupInteger key config >>= return . fromInteger
118
lookupWord key config = lookupInteger key config >>= return . fromInteger
73
false
true
0
8
18
43
21
22
null
null
ihc/futhark
src/Language/Futhark/Core.hs
isc
-- | Return the base 'Name' converted to a string. baseString :: VName -> String baseString = nameToString . baseName
117
baseString :: VName -> String baseString = nameToString . baseName
66
baseString = nameToString . baseName
36
true
true
0
5
19
20
11
9
null
null
kryft/fsil
MonsterParser.hs
gpl-2.0
endOfMonsterEntry = try $ eol >> eol
36
endOfMonsterEntry = try $ eol >> eol
36
endOfMonsterEntry = try $ eol >> eol
36
false
false
0
6
6
14
7
7
null
null
Moskau/estuary
Estuary/Widgets/PatternTransformer.hs
gpl-3.0
paramWidget::MonadWidget t m=>PatternTransformer -> m (Dynamic t PatternTransformer) paramWidget (Jux trans) = do trans' <- parameteredPatternTransformer trans never val'<- mapDyn (\(next,_)-> Jux next) trans' return val'
227
paramWidget::MonadWidget t m=>PatternTransformer -> m (Dynamic t PatternTransformer) paramWidget (Jux trans) = do trans' <- parameteredPatternTransformer trans never val'<- mapDyn (\(next,_)-> Jux next) trans' return val'
227
paramWidget (Jux trans) = do trans' <- parameteredPatternTransformer trans never val'<- mapDyn (\(next,_)-> Jux next) trans' return val'
142
false
true
0
11
31
91
43
48
null
null