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
BarrelfishOS/barrelfish
tools/sockeye/SockeyeBackendPrologMultiDim.hs
mit
cal_nodeid_name :: String -> String local_nodeid_name x = "ID_" ++ x
71
local_nodeid_name :: String -> String local_nodeid_name x = "ID_" ++ x
70
local_nodeid_name x = "ID_" ++ x
32
false
true
0
7
13
27
12
15
null
null
np/umm
UMMData.hs
gpl-3.0
isLeap :: Int -> Bool isLeap y = rem y 4 == 0 && (rem y 100 /= 0 || rem y 400 == 0)
83
isLeap :: Int -> Bool isLeap y = rem y 4 == 0 && (rem y 100 /= 0 || rem y 400 == 0)
83
isLeap y = rem y 4 == 0 && (rem y 100 /= 0 || rem y 400 == 0)
61
false
true
0
10
24
56
27
29
null
null
bergmark/http2
test-frame/JSON.hs
bsd-3-clause
noPad :: Value noPad = object []
32
noPad :: Value noPad = object []
32
noPad = object []
17
false
true
0
6
6
16
8
8
null
null
Lemmih/fvg
src/TypeChecker.hs
bsd-3-clause
qualFreeTyVars :: Qual -> [TyVar] qualFreeTyVars (bound :=> ty) = tv ty \\ bound
80
qualFreeTyVars :: Qual -> [TyVar] qualFreeTyVars (bound :=> ty) = tv ty \\ bound
80
qualFreeTyVars (bound :=> ty) = tv ty \\ bound
46
false
true
0
7
13
35
18
17
null
null
noughtmare/yi
yi-core/src/Yi/Monad.hs
gpl-2.0
with :: (MonadReader r m, MonadBase b m) => (r -> a) -> (a -> b c) -> m c with f g = do yi <- ask liftBase $ g (f yi)
125
with :: (MonadReader r m, MonadBase b m) => (r -> a) -> (a -> b c) -> m c with f g = do yi <- ask liftBase $ g (f yi)
125
with f g = do yi <- ask liftBase $ g (f yi)
51
false
true
0
11
40
91
43
48
null
null
scslab/iterIO
Data/IterIO/Iter.hs
bsd-3-clause
runI i = Iter $ runIterR (runR $ runIter i chunkEOF)
52
runI i = Iter $ runIterR (runR $ runIter i chunkEOF)
52
runI i = Iter $ runIterR (runR $ runIter i chunkEOF)
52
false
false
0
9
10
28
13
15
null
null
black0range/Smutt
src/Smutt/Util/Ascii.hs
mit
isAlphaNum :: AsciiCodable c => c -> Bool isAlphaNum c =  isAlpha c || isDigit c
80
isAlphaNum :: AsciiCodable c => c -> Bool isAlphaNum c =  isAlpha c || isDigit c
80
isAlphaNum c =  isAlpha c || isDigit c
38
false
true
0
8
16
40
17
23
null
null
lnunno/blaze-bootstrap3
Bootstrap3/CDN.hs
mit
cssLinks = [ "http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css", -- Bootswatch css links. "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/amelia/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cerulean/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cosmo/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cyborg/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/flatly/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/journal/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/readable/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/simplex/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/slate/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/spacelab/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/united/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css" ]
1,239
cssLinks = [ "http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css", -- Bootswatch css links. "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/amelia/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cerulean/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cosmo/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cyborg/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/flatly/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/journal/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/readable/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/simplex/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/slate/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/spacelab/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/united/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css" ]
1,239
cssLinks = [ "http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css", -- Bootswatch css links. "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/amelia/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cerulean/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cosmo/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/cyborg/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/flatly/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/journal/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/readable/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/simplex/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/slate/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/spacelab/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/united/bootstrap.min.css", "http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css" ]
1,239
false
false
0
5
233
46
30
16
null
null
tomgi/poker_hands
main.hs
mit
main = do let cards = HandCards (Card A Clubs) (Card Q Clubs) (Card J Clubs) (Card Ten Clubs) (Card K Clubs) print $ identifyHand cards
142
main = do let cards = HandCards (Card A Clubs) (Card Q Clubs) (Card J Clubs) (Card Ten Clubs) (Card K Clubs) print $ identifyHand cards
142
main = do let cards = HandCards (Card A Clubs) (Card Q Clubs) (Card J Clubs) (Card Ten Clubs) (Card K Clubs) print $ identifyHand cards
142
false
false
1
13
32
80
36
44
null
null
christiaanb/clash-compiler
clash-lib/src/CLaSH/Normalize/Transformations.hs
bsd-2-clause
nonRepSpec _ e = return e
25
nonRepSpec _ e = return e
25
nonRepSpec _ e = return e
25
false
false
0
5
5
14
6
8
null
null
diku-kmc/kleenexlang
src/KMC/Program/Backends/C.hs
mit
-- | Pretty print a block identifier blck :: BlockId -> Int -> Doc blck (BlockId n) phase = text "l" <> int phase <> text "_" <> int n
135
blck :: BlockId -> Int -> Doc blck (BlockId n) phase = text "l" <> int phase <> text "_" <> int n
98
blck (BlockId n) phase = text "l" <> int phase <> text "_" <> int n
68
true
true
0
8
30
55
26
29
null
null
kim/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/EnableDomainTransferLock.hs
mpl-2.0
-- | Identifier for tracking the progress of the request. To use this ID to query -- the operation status, use GetOperationDetail. -- -- Type: String -- -- Default: None -- -- Constraints: Maximum 255 characters. edtlrOperationId :: Lens' EnableDomainTransferLockResponse Text edtlrOperationId = lens _edtlrOperationId (\s a -> s { _edtlrOperationId = a })
356
edtlrOperationId :: Lens' EnableDomainTransferLockResponse Text edtlrOperationId = lens _edtlrOperationId (\s a -> s { _edtlrOperationId = a })
143
edtlrOperationId = lens _edtlrOperationId (\s a -> s { _edtlrOperationId = a })
79
true
true
1
9
53
53
29
24
null
null
wavewave/loopdiagram
src/HEP/Physics/LoopCalculation/Graph.hs
bsd-3-clause
conjugateKind NP_Lvc = Just NP_Lv
35
conjugateKind NP_Lvc = Just NP_Lv
35
conjugateKind NP_Lvc = Just NP_Lv
35
false
false
0
5
6
12
5
7
null
null
sdteffen/epanet-haskell
Epanet.hs
gpl-3.0
en_EMITTER :: Int en_EMITTER = 3
32
en_EMITTER :: Int en_EMITTER = 3
32
en_EMITTER = 3
14
false
true
0
4
5
11
6
5
null
null
ekmett/containers
Data/Map/Base.hs
bsd-3-clause
-- | /O(n)/. Build a map from an ascending list in linear time with a -- combining function for equal keys. -- /The precondition (input list is ascending) is not checked./ -- -- > let f k a1 a2 = (show k) ++ ":" ++ a1 ++ a2 -- > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")] == fromList [(3, "b"), (5, "5:b5:ba")] -- > valid (fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b"), (5,"b")]) == True -- > valid (fromAscListWithKey f [(5,"a"), (3,"b"), (5,"b"), (5,"b")]) == False fromAscListWithKey :: Eq k => (k -> a -> a -> a) -> [(k,a)] -> Map k a fromAscListWithKey f xs = fromDistinctAscList (combineEq f xs) where -- [combineEq f xs] combines equal elements with function [f] in an ordered list [xs] combineEq _ xs' = case xs' of [] -> [] [x] -> [x] (x:xx) -> combineEq' x xx combineEq' z [] = [z] combineEq' z@(kz,zz) (x@(kx,xx):xs') | kx==kz = let yy = f kx xx zz in combineEq' (kx,yy) xs' | otherwise = z:combineEq' x xs' #if __GLASGOW_HASKELL__ >= 700
1,027
fromAscListWithKey :: Eq k => (k -> a -> a -> a) -> [(k,a)] -> Map k a fromAscListWithKey f xs = fromDistinctAscList (combineEq f xs) where -- [combineEq f xs] combines equal elements with function [f] in an ordered list [xs] combineEq _ xs' = case xs' of [] -> [] [x] -> [x] (x:xx) -> combineEq' x xx combineEq' z [] = [z] combineEq' z@(kz,zz) (x@(kx,xx):xs') | kx==kz = let yy = f kx xx zz in combineEq' (kx,yy) xs' | otherwise = z:combineEq' x xs' #if __GLASGOW_HASKELL__ >= 700
541
fromAscListWithKey f xs = fromDistinctAscList (combineEq f xs) where -- [combineEq f xs] combines equal elements with function [f] in an ordered list [xs] combineEq _ xs' = case xs' of [] -> [] [x] -> [x] (x:xx) -> combineEq' x xx combineEq' z [] = [z] combineEq' z@(kz,zz) (x@(kx,xx):xs') | kx==kz = let yy = f kx xx zz in combineEq' (kx,yy) xs' | otherwise = z:combineEq' x xs' #if __GLASGOW_HASKELL__ >= 700
470
true
true
1
10
236
243
130
113
null
null
nikki-and-the-robots/nikki
src/Sorts/Robots/PathRobots/Path.hs
lgpl-3.0
mkPath :: Bool -> [Vector] -> Path mkPath _ [] = error "empty paths are not allowed"
84
mkPath :: Bool -> [Vector] -> Path mkPath _ [] = error "empty paths are not allowed"
84
mkPath _ [] = error "empty paths are not allowed"
49
false
true
0
9
16
37
17
20
null
null
seppeljordan/octree
tests/test_Octree.hs
bsd-3-clause
naiveNearest pt l = if byDist == [] then Nothing else Just . head $ byDist where byDist = sortBy (compareDistance pt) l
121
naiveNearest pt l = if byDist == [] then Nothing else Just . head $ byDist where byDist = sortBy (compareDistance pt) l
121
naiveNearest pt l = if byDist == [] then Nothing else Just . head $ byDist where byDist = sortBy (compareDistance pt) l
121
false
false
0
7
24
52
26
26
null
null
brendanhay/gogol
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
mpl-2.0
-- | Your bidder locations that have distinct URLs. aBidderLocation :: Lens' Account [AccountBidderLocationItem] aBidderLocation = lens _aBidderLocation (\ s a -> s{_aBidderLocation = a}) . _Default . _Coerce
228
aBidderLocation :: Lens' Account [AccountBidderLocationItem] aBidderLocation = lens _aBidderLocation (\ s a -> s{_aBidderLocation = a}) . _Default . _Coerce
176
aBidderLocation = lens _aBidderLocation (\ s a -> s{_aBidderLocation = a}) . _Default . _Coerce
115
true
true
3
8
48
59
28
31
null
null
byorgey/Idris-dev
src/IRTS/Bytecode.hs
bsd-3-clause
constAlt l reg r (SConstCase c e) = Just (c, bc reg e r)
61
constAlt l reg r (SConstCase c e) = Just (c, bc reg e r)
61
constAlt l reg r (SConstCase c e) = Just (c, bc reg e r)
61
false
false
0
7
18
39
19
20
null
null
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Create.hs
mpl-2.0
-- | OAuth access token. acAccessToken :: Lens' AnnotationsCreate (Maybe Text) acAccessToken = lens _acAccessToken (\ s a -> s{_acAccessToken = a})
155
acAccessToken :: Lens' AnnotationsCreate (Maybe Text) acAccessToken = lens _acAccessToken (\ s a -> s{_acAccessToken = a})
130
acAccessToken = lens _acAccessToken (\ s a -> s{_acAccessToken = a})
76
true
true
0
9
29
48
25
23
null
null
spacekitteh/smcghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags res WriteByteArrayOp_Int32 args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args
122
emitPrimOp dflags res WriteByteArrayOp_Int32 args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args
122
emitPrimOp dflags res WriteByteArrayOp_Int32 args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args
122
false
false
0
9
23
40
17
23
null
null
achirkin/qua-kit
apps/hs/qua-server/src/Application/Edx.hs
mit
-- | Write correct data into EdxGrading, EdxCourse, EdxResource, etc. setupEdxGrading :: ( YesodAuth app , YesodPersist app , YesodAuthPersist app , AuthId app ~ UserId , BaseBackend (YesodPersistBackend app) ~ SqlBackend , PersistUniqueWrite (YesodPersistBackend app) ) => UserId -> [(Text,Text)] -- ^ cred params we originally got from edx (via dispatchLti) -> HandlerT app IO () setupEdxGrading userId params = do mserviceUrl <- lookupAndSave userSessionEdxLisOutcomeServiceUrl msourcedId <- lookupAndSave userSessionEdxLisResultSourcedId mresourceLinkId <- lookupAndSave userSessionEdxResourceLinkId mcontextId <- lookupAndSave userSessionEdxContextId maybe (return ()) (setSafeSessionForUid userId userSessionCustomExerciseCount) (Map.lookup (convKey userSessionCustomExerciseCount) pm >>= parseInt) let mexercise_id = Map.lookup "custom_exercise_id" pm >>= parseSqlKey --below saved as currentExerciseId mapM_ (uncurry setSession) $ filter (isPrefixOf "custom_". fst ) params runDB $ case (,,) <$> mresourceLinkId <*> mcontextId <*> mexercise_id of Nothing -> return () Just (resource_link_id, contextId, exercise_id) -> do Entity edxCourseId _ <- upsert (EdxCourse contextId Nothing) [] mEdxRes <- getBy (EdxResLinkId resource_link_id edxCourseId) edxResId <- case mEdxRes of Just (Entity ek _) -> return ek Nothing -> insert $ EdxResource resource_link_id edxCourseId exercise_id (Map.lookup "custom_component_display_name" pm) -- update generic edx resource parameters saveCustomParams edxResId lift $ setSafeSessionForUid userId userSessionEdxResourceId edxResId lift $ setSafeSessionForUid userId userSessionCurrentExerciseId exercise_id -- update personal grade link case (,) <$> mserviceUrl <*> msourcedId of Just (outcome_url, resultId) -> void $ upsert (EdxGrading edxResId userId outcome_url resultId) [] Nothing -> return () where lookupAndSave sl = do let mval = Map.lookup (convKey sl) pm maybe (return ()) (setSafeSessionForUid userId sl) mval return mval pm = Map.fromList params -- the EdxResourceParam data is probably never used, just so the data is saved somewhere: saveCustomParams ek = mapM_ ((\(k,v) -> void $ upsert (EdxResourceParam ek k v) []) . first (drop 7)) $ filter (isPrefixOf "custom_". fst ) params -- | Send a grade to edX via an http request immediately
2,725
setupEdxGrading :: ( YesodAuth app , YesodPersist app , YesodAuthPersist app , AuthId app ~ UserId , BaseBackend (YesodPersistBackend app) ~ SqlBackend , PersistUniqueWrite (YesodPersistBackend app) ) => UserId -> [(Text,Text)] -- ^ cred params we originally got from edx (via dispatchLti) -> HandlerT app IO () setupEdxGrading userId params = do mserviceUrl <- lookupAndSave userSessionEdxLisOutcomeServiceUrl msourcedId <- lookupAndSave userSessionEdxLisResultSourcedId mresourceLinkId <- lookupAndSave userSessionEdxResourceLinkId mcontextId <- lookupAndSave userSessionEdxContextId maybe (return ()) (setSafeSessionForUid userId userSessionCustomExerciseCount) (Map.lookup (convKey userSessionCustomExerciseCount) pm >>= parseInt) let mexercise_id = Map.lookup "custom_exercise_id" pm >>= parseSqlKey --below saved as currentExerciseId mapM_ (uncurry setSession) $ filter (isPrefixOf "custom_". fst ) params runDB $ case (,,) <$> mresourceLinkId <*> mcontextId <*> mexercise_id of Nothing -> return () Just (resource_link_id, contextId, exercise_id) -> do Entity edxCourseId _ <- upsert (EdxCourse contextId Nothing) [] mEdxRes <- getBy (EdxResLinkId resource_link_id edxCourseId) edxResId <- case mEdxRes of Just (Entity ek _) -> return ek Nothing -> insert $ EdxResource resource_link_id edxCourseId exercise_id (Map.lookup "custom_component_display_name" pm) -- update generic edx resource parameters saveCustomParams edxResId lift $ setSafeSessionForUid userId userSessionEdxResourceId edxResId lift $ setSafeSessionForUid userId userSessionCurrentExerciseId exercise_id -- update personal grade link case (,) <$> mserviceUrl <*> msourcedId of Just (outcome_url, resultId) -> void $ upsert (EdxGrading edxResId userId outcome_url resultId) [] Nothing -> return () where lookupAndSave sl = do let mval = Map.lookup (convKey sl) pm maybe (return ()) (setSafeSessionForUid userId sl) mval return mval pm = Map.fromList params -- the EdxResourceParam data is probably never used, just so the data is saved somewhere: saveCustomParams ek = mapM_ ((\(k,v) -> void $ upsert (EdxResourceParam ek k v) []) . first (drop 7)) $ filter (isPrefixOf "custom_". fst ) params -- | Send a grade to edX via an http request immediately
2,655
setupEdxGrading userId params = do mserviceUrl <- lookupAndSave userSessionEdxLisOutcomeServiceUrl msourcedId <- lookupAndSave userSessionEdxLisResultSourcedId mresourceLinkId <- lookupAndSave userSessionEdxResourceLinkId mcontextId <- lookupAndSave userSessionEdxContextId maybe (return ()) (setSafeSessionForUid userId userSessionCustomExerciseCount) (Map.lookup (convKey userSessionCustomExerciseCount) pm >>= parseInt) let mexercise_id = Map.lookup "custom_exercise_id" pm >>= parseSqlKey --below saved as currentExerciseId mapM_ (uncurry setSession) $ filter (isPrefixOf "custom_". fst ) params runDB $ case (,,) <$> mresourceLinkId <*> mcontextId <*> mexercise_id of Nothing -> return () Just (resource_link_id, contextId, exercise_id) -> do Entity edxCourseId _ <- upsert (EdxCourse contextId Nothing) [] mEdxRes <- getBy (EdxResLinkId resource_link_id edxCourseId) edxResId <- case mEdxRes of Just (Entity ek _) -> return ek Nothing -> insert $ EdxResource resource_link_id edxCourseId exercise_id (Map.lookup "custom_component_display_name" pm) -- update generic edx resource parameters saveCustomParams edxResId lift $ setSafeSessionForUid userId userSessionEdxResourceId edxResId lift $ setSafeSessionForUid userId userSessionCurrentExerciseId exercise_id -- update personal grade link case (,) <$> mserviceUrl <*> msourcedId of Just (outcome_url, resultId) -> void $ upsert (EdxGrading edxResId userId outcome_url resultId) [] Nothing -> return () where lookupAndSave sl = do let mval = Map.lookup (convKey sl) pm maybe (return ()) (setSafeSessionForUid userId sl) mval return mval pm = Map.fromList params -- the EdxResourceParam data is probably never used, just so the data is saved somewhere: saveCustomParams ek = mapM_ ((\(k,v) -> void $ upsert (EdxResourceParam ek k v) []) . first (drop 7)) $ filter (isPrefixOf "custom_". fst ) params -- | Send a grade to edX via an http request immediately
2,181
true
true
1
21
727
672
320
352
null
null
AlexeyRaga/eta
libraries/base/Foreign/Marshal/Alloc.hs
bsd-3-clause
-- |Llike 'mallocBytes' but memory is filled with bytes of value zero. -- callocBytes :: Int -> IO (Ptr a) callocBytes size = failWhenNULL "calloc" $ _calloc 1 (fromIntegral size)
179
callocBytes :: Int -> IO (Ptr a) callocBytes size = failWhenNULL "calloc" $ _calloc 1 (fromIntegral size)
105
callocBytes size = failWhenNULL "calloc" $ _calloc 1 (fromIntegral size)
72
true
true
0
8
29
50
24
26
null
null
Ornedan/dom4statusbot
src/Model/Dominions4.hs
bsd-3-clause
nationName 26 = "EA Lanka"
26
nationName 26 = "EA Lanka"
26
nationName 26 = "EA Lanka"
26
false
false
0
5
4
9
4
5
null
null
genos/online_problems
advent_of_code_2016/day1/src/Main.hs
mit
part1 :: Int part1 = distance start $ foldl turnAndGo start input
65
part1 :: Int part1 = distance start $ foldl turnAndGo start input
65
part1 = distance start $ foldl turnAndGo start input
52
false
true
0
6
11
25
12
13
null
null
adityagupta1089/Project-Euler-Haskell
src/problems/Problem29.hs
bsd-3-clause
main :: IO () main = print . length . nub $ [ a ^ b | a <- [2 .. 100], b <- [2 .. 100] ]
88
main :: IO () main = print . length . nub $ [ a ^ b | a <- [2 .. 100], b <- [2 .. 100] ]
88
main = print . length . nub $ [ a ^ b | a <- [2 .. 100], b <- [2 .. 100] ]
74
false
true
1
10
27
67
34
33
null
null
yiannist/lambda-lifting
LLifter/Internal.hs
gpl-3.0
isLambda = (==) lambda
26
isLambda = (==) lambda
26
isLambda = (==) lambda
26
false
false
0
5
7
11
6
5
null
null
5outh/Bang
src/Bang/Music/Transform.hs
mit
-- |Normalize the durations of each value in a list of Compositions to `d` and compose them concurrently. normalizeC :: Rational -> [Music b] -> Music b normalizeC d = cconcat . map (withDuration d)
198
normalizeC :: Rational -> [Music b] -> Music b normalizeC d = cconcat . map (withDuration d)
92
normalizeC d = cconcat . map (withDuration d)
45
true
true
0
8
34
45
22
23
null
null
nomicflux/threals
src/Threal/Tests.hs
gpl-2.0
compSubset _ [] _ = True
24
compSubset _ [] _ = True
24
compSubset _ [] _ = True
24
false
false
1
5
5
19
7
12
null
null
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/Build.hs
bsd-3-clause
buildExe :: Verbosity -> Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () buildExe verbosity numJobs pkg_descr lbi exe clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.buildExe verbosity numJobs pkg_descr lbi exe clbi GHCJS -> GHCJS.buildExe verbosity numJobs pkg_descr lbi exe clbi JHC -> JHC.buildExe verbosity pkg_descr lbi exe clbi LHC -> LHC.buildExe verbosity pkg_descr lbi exe clbi UHC -> UHC.buildExe verbosity pkg_descr lbi exe clbi _ -> die "Building is not supported with this compiler."
685
buildExe :: Verbosity -> Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () buildExe verbosity numJobs pkg_descr lbi exe clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.buildExe verbosity numJobs pkg_descr lbi exe clbi GHCJS -> GHCJS.buildExe verbosity numJobs pkg_descr lbi exe clbi JHC -> JHC.buildExe verbosity pkg_descr lbi exe clbi LHC -> LHC.buildExe verbosity pkg_descr lbi exe clbi UHC -> UHC.buildExe verbosity pkg_descr lbi exe clbi _ -> die "Building is not supported with this compiler."
685
buildExe verbosity numJobs pkg_descr lbi exe clbi = case compilerFlavor (compiler lbi) of GHC -> GHC.buildExe verbosity numJobs pkg_descr lbi exe clbi GHCJS -> GHCJS.buildExe verbosity numJobs pkg_descr lbi exe clbi JHC -> JHC.buildExe verbosity pkg_descr lbi exe clbi LHC -> LHC.buildExe verbosity pkg_descr lbi exe clbi UHC -> UHC.buildExe verbosity pkg_descr lbi exe clbi _ -> die "Building is not supported with this compiler."
501
false
true
6
12
204
188
87
101
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/Types/RefType.hs
bsd-3-clause
typeSort _ τ = FObj $ typeUniqueSymbol τ
42
typeSort _ τ = FObj $ typeUniqueSymbol τ
42
typeSort _ τ = FObj $ typeUniqueSymbol τ
42
false
false
0
6
9
18
8
10
null
null
josefs/autosar
generics/TestGenPut.hs
bsd-3-clause
val2 :: MyPort Int () val2 = MyPort (DE 1) (DE 2)
49
val2 :: MyPort Int () val2 = MyPort (DE 1) (DE 2)
49
val2 = MyPort (DE 1) (DE 2)
27
false
true
1
7
11
38
17
21
null
null
knutwalker/hocker
src/lib/Hocker/Commands.hs
apache-2.0
dockers cfg Status _ = docker "ps" cfg
64
dockers cfg Status _ = docker "ps" cfg
64
dockers cfg Status _ = docker "ps" cfg
64
false
false
0
5
33
18
8
10
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
openhandedly = id
17
openhandedly = id
17
openhandedly = id
17
false
false
0
4
2
6
3
3
null
null
mitsuji/exp-CloudHaskell
app/ConsoleChatClient.hs
bsd-3-clause
tellString :: ProcessId -> String -> IO' () tellString pid msg = do (node,mnid) <- ask liftIO $ runProcess node $ nsendRemote mnid "main" (StringData pid msg)
162
tellString :: ProcessId -> String -> IO' () tellString pid msg = do (node,mnid) <- ask liftIO $ runProcess node $ nsendRemote mnid "main" (StringData pid msg)
162
tellString pid msg = do (node,mnid) <- ask liftIO $ runProcess node $ nsendRemote mnid "main" (StringData pid msg)
118
false
true
0
10
30
71
34
37
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
-- after [the end of line] -- ... the character returned -- ---------------------------------------------------------------------------- -- Types for wxTextAttr -- ---------------------------------------------------------------------------- -- Alignment -- enum wxTextAttrAlignment wxTEXT_ALIGNMENT_DEFAULT :: Int wxTEXT_ALIGNMENT_DEFAULT = 0
350
wxTEXT_ALIGNMENT_DEFAULT :: Int wxTEXT_ALIGNMENT_DEFAULT = 0
64
wxTEXT_ALIGNMENT_DEFAULT = 0
30
true
true
0
6
37
25
14
11
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Script/Concrete.hs
mit
letterToUnicode C_ο = (Unicode.Letter 'ο')
42
letterToUnicode C_ο = (Unicode.Letter 'ο')
42
letterToUnicode C_ο = (Unicode.Letter 'ο')
42
false
false
1
7
4
23
9
14
null
null
conal/reification-rules
test/RuleTest.hs
bsd-3-clause
-- {-# NOINLINE scrutinee #-} scrutinee' :: HasRep a => a -> Rep a scrutinee' a = scrutinee (repr a)
101
scrutinee' :: HasRep a => a -> Rep a scrutinee' a = scrutinee (repr a)
70
scrutinee' a = scrutinee (repr a)
33
true
true
0
7
20
38
18
20
null
null
mgsloan/slogger
Selector.hs
bsd-3-clause
selector :: Parser Selector selector = do sss <- simpleSelectorSeq choice [ try $ Child sss <$> (spaces *> char '>' *> spaces *> selector) , try $ AdjSibling sss <$> (spaces *> char '+' *> spaces *> selector) , try $ FolSibling sss <$> (spaces *> char '~' *> spaces *> selector) , try $ Descendant sss <$> ( spaces1 *> selector) , return (Selector sss) ]
439
selector :: Parser Selector selector = do sss <- simpleSelectorSeq choice [ try $ Child sss <$> (spaces *> char '>' *> spaces *> selector) , try $ AdjSibling sss <$> (spaces *> char '+' *> spaces *> selector) , try $ FolSibling sss <$> (spaces *> char '~' *> spaces *> selector) , try $ Descendant sss <$> ( spaces1 *> selector) , return (Selector sss) ]
439
selector = do sss <- simpleSelectorSeq choice [ try $ Child sss <$> (spaces *> char '>' *> spaces *> selector) , try $ AdjSibling sss <$> (spaces *> char '+' *> spaces *> selector) , try $ FolSibling sss <$> (spaces *> char '~' *> spaces *> selector) , try $ Descendant sss <$> ( spaces1 *> selector) , return (Selector sss) ]
411
false
true
0
15
152
162
78
84
null
null
sykora/verse
src/Language/Verse/Transform/Music.hs
gpl-3.0
parseNotes :: String -> [Note] parseNotes s = [Note p o d | [p, o, d] <- chunksOf 3 $ words s]
94
parseNotes :: String -> [Note] parseNotes s = [Note p o d | [p, o, d] <- chunksOf 3 $ words s]
94
parseNotes s = [Note p o d | [p, o, d] <- chunksOf 3 $ words s]
63
false
true
0
9
21
58
30
28
null
null
abakst/symmetry
checker/src/Symmetry/SymbEx.hs
mit
------------------------------------------------- -- | Updates to roles ------------------------------------------------- insRoleM :: (?callStack :: CallStack) => Role -> AbsVal Int -> SymbEx (Process SymbEx a) -> SymbExM () insRoleM k n p = do m <- gets renv case M.lookup k m of Nothing -> do oldMe <- gets me modify $ \s -> s { me = (n, k) } AProc _ st _ <- runSE p modify $ \s -> s { renv = M.insert k (n, st) (renv s), me = oldMe } Just _ -> error $ "insRoleM attempting to spawn already spawned role" ++ show k
710
insRoleM :: (?callStack :: CallStack) => Role -> AbsVal Int -> SymbEx (Process SymbEx a) -> SymbExM () insRoleM k n p = do m <- gets renv case M.lookup k m of Nothing -> do oldMe <- gets me modify $ \s -> s { me = (n, k) } AProc _ st _ <- runSE p modify $ \s -> s { renv = M.insert k (n, st) (renv s), me = oldMe } Just _ -> error $ "insRoleM attempting to spawn already spawned role" ++ show k
588
insRoleM k n p = do m <- gets renv case M.lookup k m of Nothing -> do oldMe <- gets me modify $ \s -> s { me = (n, k) } AProc _ st _ <- runSE p modify $ \s -> s { renv = M.insert k (n, st) (renv s), me = oldMe } Just _ -> error $ "insRoleM attempting to spawn already spawned role" ++ show k
476
true
true
0
19
291
217
107
110
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
-- | gate :: Pattern Double -> ControlPattern gate = pF "gate"
63
gate :: Pattern Double -> ControlPattern gate = pF "gate"
57
gate = pF "gate"
16
true
true
0
7
12
29
12
17
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/ResetNetworkInterfaceAttribute.hs
mpl-2.0
-- | 'ResetNetworkInterfaceAttribute' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'rniaDryRun' @::@ 'Maybe' 'Bool' -- -- * 'rniaNetworkInterfaceId' @::@ 'Text' -- -- * 'rniaSourceDestCheck' @::@ 'Maybe' 'Text' -- resetNetworkInterfaceAttribute :: Text -- ^ 'rniaNetworkInterfaceId' -> ResetNetworkInterfaceAttribute resetNetworkInterfaceAttribute p1 = ResetNetworkInterfaceAttribute { _rniaNetworkInterfaceId = p1 , _rniaDryRun = Nothing , _rniaSourceDestCheck = Nothing }
573
resetNetworkInterfaceAttribute :: Text -- ^ 'rniaNetworkInterfaceId' -> ResetNetworkInterfaceAttribute resetNetworkInterfaceAttribute p1 = ResetNetworkInterfaceAttribute { _rniaNetworkInterfaceId = p1 , _rniaDryRun = Nothing , _rniaSourceDestCheck = Nothing }
321
resetNetworkInterfaceAttribute p1 = ResetNetworkInterfaceAttribute { _rniaNetworkInterfaceId = p1 , _rniaDryRun = Nothing , _rniaSourceDestCheck = Nothing }
187
true
true
0
7
120
53
34
19
null
null
siddhanathan/ghc
compiler/utils/Outputable.hs
bsd-3-clause
arrowtt = unicodeSyntax (char '⤜') (docToSDoc $ Pretty.ptext (sLit ">>-"))
77
arrowtt = unicodeSyntax (char '⤜') (docToSDoc $ Pretty.ptext (sLit ">>-"))
77
arrowtt = unicodeSyntax (char '⤜') (docToSDoc $ Pretty.ptext (sLit ">>-"))
77
false
false
0
10
12
35
17
18
null
null
d0kt0r0/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
-- | patterns for internal sound routing toArg :: Pattern String -> ControlPattern toArg = pS "toArg"
101
toArg :: Pattern String -> ControlPattern toArg = pS "toArg"
60
toArg = pS "toArg"
18
true
true
0
6
16
22
11
11
null
null
kfish/hogg
tests/ListMergeTest.hs
bsd-3-clause
list1 :: [[Int]] list1 = [[2,4,6],[1,5,9],[3,7,8]]
50
list1 :: [[Int]] list1 = [[2,4,6],[1,5,9],[3,7,8]]
50
list1 = [[2,4,6],[1,5,9],[3,7,8]]
33
false
true
0
6
5
53
34
19
null
null
hsyl20/HViperVM
lib/ViperVM/Runtime/Scheduling/Single.hs
lgpl-3.0
submitTask :: TChan (Task,TaskEvent) -> (Task -> IO TaskEvent) submitTask chan task = do ev <- initEvent atomically (writeTChan chan (task,ev)) return ev
162
submitTask :: TChan (Task,TaskEvent) -> (Task -> IO TaskEvent) submitTask chan task = do ev <- initEvent atomically (writeTChan chan (task,ev)) return ev
162
submitTask chan task = do ev <- initEvent atomically (writeTChan chan (task,ev)) return ev
99
false
true
0
10
31
72
35
37
null
null
tolysz/dsp
DSP/Estimation/Frequency/FCI.hs
gpl-2.0
log10 :: Floating a => a -> a log10 = logBase 10
48
log10 :: Floating a => a -> a log10 = logBase 10
48
log10 = logBase 10
18
false
true
0
6
11
25
12
13
null
null
siddhanathan/ghc
compiler/utils/Util.hs
bsd-3-clause
partitionWith f (x:xs) = case f x of Left b -> (b:bs, cs) Right c -> (bs, c:cs) where (bs,cs) = partitionWith f xs
169
partitionWith f (x:xs) = case f x of Left b -> (b:bs, cs) Right c -> (bs, c:cs) where (bs,cs) = partitionWith f xs
169
partitionWith f (x:xs) = case f x of Left b -> (b:bs, cs) Right c -> (bs, c:cs) where (bs,cs) = partitionWith f xs
169
false
false
0
9
78
82
42
40
null
null
tpoulsen/generate-component
src/Templates/Components.hs
bsd-3-clause
reasonProps :: Maybe [Prop] -> Text reasonProps ts = case ts of Nothing -> "" Just xs -> intercalate " " $ fmap (\x -> ("::" <>) $ (^. name) x) xs
156
reasonProps :: Maybe [Prop] -> Text reasonProps ts = case ts of Nothing -> "" Just xs -> intercalate " " $ fmap (\x -> ("::" <>) $ (^. name) x) xs
156
reasonProps ts = case ts of Nothing -> "" Just xs -> intercalate " " $ fmap (\x -> ("::" <>) $ (^. name) x) xs
120
false
true
4
8
41
75
39
36
null
null
mfpi/OpenGL
Graphics/Rendering/OpenGL/GL/PerFragment.hs
bsd-3-clause
-------------------------------------------------------------------------------- depthFunc :: StateVar (Maybe ComparisonFunction) depthFunc = makeStateVarMaybe (return CapDepthTest) (getEnum1 unmarshalComparisonFunction GetDepthFunc) (glDepthFunc . marshalComparisonFunction)
297
depthFunc :: StateVar (Maybe ComparisonFunction) depthFunc = makeStateVarMaybe (return CapDepthTest) (getEnum1 unmarshalComparisonFunction GetDepthFunc) (glDepthFunc . marshalComparisonFunction)
215
depthFunc = makeStateVarMaybe (return CapDepthTest) (getEnum1 unmarshalComparisonFunction GetDepthFunc) (glDepthFunc . marshalComparisonFunction)
166
true
true
0
7
38
49
25
24
null
null
tomjefferys/fuligite
src/Scripting/Fuligite/Eval.hs
mit
evaluate :: EvalState -> Expr -> Result evaluate st expr = doEM st (eval expr)
78
evaluate :: EvalState -> Expr -> Result evaluate st expr = doEM st (eval expr)
78
evaluate st expr = doEM st (eval expr)
38
false
true
0
7
14
39
18
21
null
null
sdiehl/ghc
compiler/types/Type.hs
bsd-3-clause
splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type) splitForAllTysSameVis supplied_argf ty = split ty ty [] where split orig_ty ty tvs | Just ty' <- coreView ty = split orig_ty ty' tvs split _ (ForAllTy (Bndr tv argf) ty) tvs | argf `sameVis` supplied_argf = split ty ty (tv:tvs) split orig_ty _ tvs = (reverse tvs, orig_ty) -- | Like splitForAllTys, but split only for tyvars. -- This always succeeds, even if it returns only an empty list. Note that the -- result type returned may have free variables that were bound by a forall.
610
splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type) splitForAllTysSameVis supplied_argf ty = split ty ty [] where split orig_ty ty tvs | Just ty' <- coreView ty = split orig_ty ty' tvs split _ (ForAllTy (Bndr tv argf) ty) tvs | argf `sameVis` supplied_argf = split ty ty (tv:tvs) split orig_ty _ tvs = (reverse tvs, orig_ty) -- | Like splitForAllTys, but split only for tyvars. -- This always succeeds, even if it returns only an empty list. Note that the -- result type returned may have free variables that were bound by a forall.
610
splitForAllTysSameVis supplied_argf ty = split ty ty [] where split orig_ty ty tvs | Just ty' <- coreView ty = split orig_ty ty' tvs split _ (ForAllTy (Bndr tv argf) ty) tvs | argf `sameVis` supplied_argf = split ty ty (tv:tvs) split orig_ty _ tvs = (reverse tvs, orig_ty) -- | Like splitForAllTys, but split only for tyvars. -- This always succeeds, even if it returns only an empty list. Note that the -- result type returned may have free variables that were bound by a forall.
548
false
true
1
9
162
166
80
86
null
null
bgamari/pandoc
src/Text/Pandoc/Writers/FB2.hs
gpl-2.0
linkID :: Int -> String linkID i = "l" ++ (show i)
50
linkID :: Int -> String linkID i = "l" ++ (show i)
50
linkID i = "l" ++ (show i)
26
false
true
0
7
11
28
14
14
null
null
jotrk/anagram-solver
src/Anagram/Solver.hs
bsd-2-clause
solver :: WordSet -> WordGraph -> Word -> [Word] solver ws g input = S.toList $ internalSolver ws g "" input S.empty
116
solver :: WordSet -> WordGraph -> Word -> [Word] solver ws g input = S.toList $ internalSolver ws g "" input S.empty
116
solver ws g input = S.toList $ internalSolver ws g "" input S.empty
67
false
true
0
8
21
56
27
29
null
null
sapek/pandoc
src/Text/Pandoc/Writers/OpenDocument.hs
gpl-2.0
paraListStyle :: Int -> State WriterState Int paraListStyle l = paraStyle "Text_20_body" [("style:list-style-name", "L" ++ show l )]
132
paraListStyle :: Int -> State WriterState Int paraListStyle l = paraStyle "Text_20_body" [("style:list-style-name", "L" ++ show l )]
132
paraListStyle l = paraStyle "Text_20_body" [("style:list-style-name", "L" ++ show l )]
86
false
true
0
9
17
44
22
22
null
null
petermarks/FDL
src/Graphics/FDL/Backend/GL.hs
bsd-3-clause
comp :: L.Prim a -> Compiler (Output a) comp L.NOP = return $ return ()
71
comp :: L.Prim a -> Compiler (Output a) comp L.NOP = return $ return ()
71
comp L.NOP = return $ return ()
31
false
true
0
9
14
47
21
26
null
null
UCSD-PL/RefScript
src/Language/Rsc/Parser/Types.hs
bsd-3-clause
extendsGen1P :: PContext -> Parser (TGenQ RK F.Reft) extendsGen1P c = do qn <- qnameP ts <- option [] $ angles $ sepBy (typeP1 c) comma return $ Gen qn ts
179
extendsGen1P :: PContext -> Parser (TGenQ RK F.Reft) extendsGen1P c = do qn <- qnameP ts <- option [] $ angles $ sepBy (typeP1 c) comma return $ Gen qn ts
179
extendsGen1P c = do qn <- qnameP ts <- option [] $ angles $ sepBy (typeP1 c) comma return $ Gen qn ts
126
false
true
0
12
55
86
38
48
null
null
nadavshemer/buildsome
src/Lib/FSHook.hs
gpl-2.0
mkEnvVars :: FSHook -> FilePath -> JobId -> Process.Env mkEnvVars fsHook rootFilter jobId = (map . fmap) BS8.unpack [ ("LD_PRELOAD", fsHookLdPreloadPath fsHook) , ("DYLD_FORCE_FLAT_NAMESPACE", "1") , ("DYLD_INSERT_LIBRARIES", fsHookLdPreloadPath fsHook) , ("BUILDSOME_MASTER_UNIX_SOCKADDR", fsHookServerAddress fsHook) , ("BUILDSOME_JOB_ID", jobId) , ("BUILDSOME_ROOT_FILTER", rootFilter) ]
406
mkEnvVars :: FSHook -> FilePath -> JobId -> Process.Env mkEnvVars fsHook rootFilter jobId = (map . fmap) BS8.unpack [ ("LD_PRELOAD", fsHookLdPreloadPath fsHook) , ("DYLD_FORCE_FLAT_NAMESPACE", "1") , ("DYLD_INSERT_LIBRARIES", fsHookLdPreloadPath fsHook) , ("BUILDSOME_MASTER_UNIX_SOCKADDR", fsHookServerAddress fsHook) , ("BUILDSOME_JOB_ID", jobId) , ("BUILDSOME_ROOT_FILTER", rootFilter) ]
406
mkEnvVars fsHook rootFilter jobId = (map . fmap) BS8.unpack [ ("LD_PRELOAD", fsHookLdPreloadPath fsHook) , ("DYLD_FORCE_FLAT_NAMESPACE", "1") , ("DYLD_INSERT_LIBRARIES", fsHookLdPreloadPath fsHook) , ("BUILDSOME_MASTER_UNIX_SOCKADDR", fsHookServerAddress fsHook) , ("BUILDSOME_JOB_ID", jobId) , ("BUILDSOME_ROOT_FILTER", rootFilter) ]
350
false
true
0
8
55
110
62
48
null
null
benb/MetAl
src/AlnDist.hs
gpl-3.0
dumpCSV seqNames list handle = hPutStrLn handle $ unlines $ map (\(name,l2)->name ++ "," ++ intercalate "," (reverse $ map toStr l2)) $ zip seqNames (reverse list) where toStr (i,j) = show ((fromIntegral j)/(fromIntegral i))
256
dumpCSV seqNames list handle = hPutStrLn handle $ unlines $ map (\(name,l2)->name ++ "," ++ intercalate "," (reverse $ map toStr l2)) $ zip seqNames (reverse list) where toStr (i,j) = show ((fromIntegral j)/(fromIntegral i))
256
dumpCSV seqNames list handle = hPutStrLn handle $ unlines $ map (\(name,l2)->name ++ "," ++ intercalate "," (reverse $ map toStr l2)) $ zip seqNames (reverse list) where toStr (i,j) = show ((fromIntegral j)/(fromIntegral i))
256
false
false
0
14
66
119
60
59
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/FhirStores/Fhir/History.hs
mpl-2.0
-- | Creates a value of 'ProjectsLocationsDataSetsFhirStoresFhirHistory' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pldsfsfhXgafv' -- -- * 'pldsfsfhCount' -- -- * 'pldsfsfhUploadProtocol' -- -- * 'pldsfsfhAccessToken' -- -- * 'pldsfsfhUploadType' -- -- * 'pldsfsfhName' -- -- * 'pldsfsfhAt' -- -- * 'pldsfsfhSince' -- -- * 'pldsfsfhPageToken' -- -- * 'pldsfsfhCallback' projectsLocationsDataSetsFhirStoresFhirHistory :: Text -- ^ 'pldsfsfhName' -> ProjectsLocationsDataSetsFhirStoresFhirHistory projectsLocationsDataSetsFhirStoresFhirHistory pPldsfsfhName_ = ProjectsLocationsDataSetsFhirStoresFhirHistory' { _pldsfsfhXgafv = Nothing , _pldsfsfhCount = Nothing , _pldsfsfhUploadProtocol = Nothing , _pldsfsfhAccessToken = Nothing , _pldsfsfhUploadType = Nothing , _pldsfsfhName = pPldsfsfhName_ , _pldsfsfhAt = Nothing , _pldsfsfhSince = Nothing , _pldsfsfhPageToken = Nothing , _pldsfsfhCallback = Nothing }
1,053
projectsLocationsDataSetsFhirStoresFhirHistory :: Text -- ^ 'pldsfsfhName' -> ProjectsLocationsDataSetsFhirStoresFhirHistory projectsLocationsDataSetsFhirStoresFhirHistory pPldsfsfhName_ = ProjectsLocationsDataSetsFhirStoresFhirHistory' { _pldsfsfhXgafv = Nothing , _pldsfsfhCount = Nothing , _pldsfsfhUploadProtocol = Nothing , _pldsfsfhAccessToken = Nothing , _pldsfsfhUploadType = Nothing , _pldsfsfhName = pPldsfsfhName_ , _pldsfsfhAt = Nothing , _pldsfsfhSince = Nothing , _pldsfsfhPageToken = Nothing , _pldsfsfhCallback = Nothing }
592
projectsLocationsDataSetsFhirStoresFhirHistory pPldsfsfhName_ = ProjectsLocationsDataSetsFhirStoresFhirHistory' { _pldsfsfhXgafv = Nothing , _pldsfsfhCount = Nothing , _pldsfsfhUploadProtocol = Nothing , _pldsfsfhAccessToken = Nothing , _pldsfsfhUploadType = Nothing , _pldsfsfhName = pPldsfsfhName_ , _pldsfsfhAt = Nothing , _pldsfsfhSince = Nothing , _pldsfsfhPageToken = Nothing , _pldsfsfhCallback = Nothing }
459
true
true
0
7
176
113
76
37
null
null
scturtle/fun.hs
Printf.hs
unlicense
-- a poor man's tokenizer tokenize :: String -> [Format] tokenize [] = []
73
tokenize :: String -> [Format] tokenize [] = []
47
tokenize [] = []
16
true
true
0
8
13
32
15
17
null
null
vTurbine/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
runPhase (RealPhase Splitter) input_fn dflags = do -- tmp_pfx is the prefix used for the split .s files split_s_prefix <- liftIO $ SysTools.newTempName dflags "split" let n_files_fn = split_s_prefix liftIO $ SysTools.runSplit dflags [ SysTools.FileOption "" input_fn , SysTools.FileOption "" split_s_prefix , SysTools.FileOption "" n_files_fn ] -- Save the number of split files for future references s <- liftIO $ readFile n_files_fn let n_files = read s :: Int dflags' = dflags { splitInfo = Just (split_s_prefix, n_files) } setDynFlags dflags' -- Remember to delete all these files liftIO $ addFilesToClean dflags' [ split_s_prefix ++ "__" ++ show n ++ ".s" | n <- [1..n_files]] return (RealPhase SplitAs, "**splitter**") -- we don't use the filename in SplitAs ----------------------------------------------------------------------------- -- As, SpitAs phase : Assembler -- This is for calling the assembler on a regular assembly file (not split).
1,240
runPhase (RealPhase Splitter) input_fn dflags = do -- tmp_pfx is the prefix used for the split .s files split_s_prefix <- liftIO $ SysTools.newTempName dflags "split" let n_files_fn = split_s_prefix liftIO $ SysTools.runSplit dflags [ SysTools.FileOption "" input_fn , SysTools.FileOption "" split_s_prefix , SysTools.FileOption "" n_files_fn ] -- Save the number of split files for future references s <- liftIO $ readFile n_files_fn let n_files = read s :: Int dflags' = dflags { splitInfo = Just (split_s_prefix, n_files) } setDynFlags dflags' -- Remember to delete all these files liftIO $ addFilesToClean dflags' [ split_s_prefix ++ "__" ++ show n ++ ".s" | n <- [1..n_files]] return (RealPhase SplitAs, "**splitter**") -- we don't use the filename in SplitAs ----------------------------------------------------------------------------- -- As, SpitAs phase : Assembler -- This is for calling the assembler on a regular assembly file (not split).
1,240
runPhase (RealPhase Splitter) input_fn dflags = do -- tmp_pfx is the prefix used for the split .s files split_s_prefix <- liftIO $ SysTools.newTempName dflags "split" let n_files_fn = split_s_prefix liftIO $ SysTools.runSplit dflags [ SysTools.FileOption "" input_fn , SysTools.FileOption "" split_s_prefix , SysTools.FileOption "" n_files_fn ] -- Save the number of split files for future references s <- liftIO $ readFile n_files_fn let n_files = read s :: Int dflags' = dflags { splitInfo = Just (split_s_prefix, n_files) } setDynFlags dflags' -- Remember to delete all these files liftIO $ addFilesToClean dflags' [ split_s_prefix ++ "__" ++ show n ++ ".s" | n <- [1..n_files]] return (RealPhase SplitAs, "**splitter**") -- we don't use the filename in SplitAs ----------------------------------------------------------------------------- -- As, SpitAs phase : Assembler -- This is for calling the assembler on a regular assembly file (not split).
1,240
false
false
0
13
426
212
105
107
null
null
alexbiehl/postie
src/Network/Mail/Postie/Address.hs
bsd-3-clause
isAtomText :: Char -> Bool isAtomText x = isAlphaNum x || inClass "!#$%&'*+/=?^_`{|}~-" x
89
isAtomText :: Char -> Bool isAtomText x = isAlphaNum x || inClass "!#$%&'*+/=?^_`{|}~-" x
89
isAtomText x = isAlphaNum x || inClass "!#$%&'*+/=?^_`{|}~-" x
62
false
true
0
6
13
30
14
16
null
null
jespino/sth
sth.hs
bsd-3-clause
headers :: [Stat] -> String headers [] = ""
43
headers :: [Stat] -> String headers [] = ""
43
headers [] = ""
15
false
true
0
6
8
27
13
14
null
null
arquitecturas-concurrentes/stm-samples-haskell
0_par_seq/fibonacci.hs
mit
nfib :: Int -> Int nfib n | n <= 1 = 1 | otherwise = par n1 (pseq n2 (n1 + n2 + 1)) where n1 = nfib (n-1) n2 = nfib (n-2)
176
nfib :: Int -> Int nfib n | n <= 1 = 1 | otherwise = par n1 (pseq n2 (n1 + n2 + 1)) where n1 = nfib (n-1) n2 = nfib (n-2)
176
nfib n | n <= 1 = 1 | otherwise = par n1 (pseq n2 (n1 + n2 + 1)) where n1 = nfib (n-1) n2 = nfib (n-2)
157
false
true
0
11
88
93
46
47
null
null
peterbecich/haskell-programming-first-principles
src/LearnParsers.hs
bsd-3-clause
oneTwoS :: Parser String oneTwoS = liftA2 (++) oneS twoS
56
oneTwoS :: Parser String oneTwoS = liftA2 (++) oneS twoS
56
oneTwoS = liftA2 (++) oneS twoS
31
false
true
0
5
9
23
12
11
null
null
OS2World/DEV-UTIL-HUGS
oldlib/SequenceDefaults.hs
bsd-3-clause
inBoundsUsingDrop :: Sequence s => s a -> Int -> Bool inBoundsUsingDrop s i = i >= 0 && not (null (drop i s))
112
inBoundsUsingDrop :: Sequence s => s a -> Int -> Bool inBoundsUsingDrop s i = i >= 0 && not (null (drop i s))
112
inBoundsUsingDrop s i = i >= 0 && not (null (drop i s))
58
false
true
2
10
26
61
29
32
null
null
mauroblanco/fpnla
src/FPNLA/Operations/Parameters.hs
bsd-3-clause
unTransT (ConjTrans a) = (ConjTrans, a)
39
unTransT (ConjTrans a) = (ConjTrans, a)
39
unTransT (ConjTrans a) = (ConjTrans, a)
39
false
false
0
7
5
21
11
10
null
null
WSCU/JSEuterpea
Euterpea Examples/SimpleEuterpea.hs
gpl-3.0
aj2 = 2
8
maj2 = 2
8
maj2 = 2
8
false
false
0
4
3
6
3
3
null
null
ghc-android/ghc
compiler/nativeGen/AsmCodeGen.hs
bsd-3-clause
cmmExprCon _ other = other
26
cmmExprCon _ other = other
26
cmmExprCon _ other = other
26
false
false
0
5
4
11
5
6
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/DsBinds.hs
bsd-3-clause
dictArity :: [Var] -> Arity -- Don't count coercion variables in arity dictArity dicts = count isId dicts
105
dictArity :: [Var] -> Arity dictArity dicts = count isId dicts
62
dictArity dicts = count isId dicts
34
true
true
0
6
17
27
14
13
null
null
vTurbine/ghc
compiler/main/HscTypes.hs
bsd-3-clause
addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable addListToHpt = addListToUDFM
114
addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable addListToHpt = addListToUDFM
114
addListToHpt = addListToUDFM
28
false
true
0
8
12
32
17
15
null
null
mreid/papersite
src/exec/scrape.hs
mit
-- Test whether link is a content link isLinkType key = isInfixOf key . map toLower
83
isLinkType key = isInfixOf key . map toLower
44
isLinkType key = isInfixOf key . map toLower
44
true
false
0
6
15
20
9
11
null
null
AlexeyRaga/eta
compiler/ETA/Utils/Encoding.hs
bsd-3-clause
encode_ch '#' = "zh"
21
encode_ch '#' = "zh"
21
encode_ch '#' = "zh"
21
false
false
0
5
4
9
4
5
null
null
turingjump/bookkeeper
test/BookkeeperSpec.hs
bsd-3-clause
typeLevelTest :: Expectation typeLevelTest = True `shouldBe` True
65
typeLevelTest :: Expectation typeLevelTest = True `shouldBe` True
65
typeLevelTest = True `shouldBe` True
36
false
true
0
5
7
17
10
7
null
null
splondike/samesame
samesame.hs
gpl-2.0
makeCommand config args = requestedCommand >>= findCommand >>= commandStr where commandStr cmd = buildCommandString cmd (argpairs cmd) argpairs cmd = zip (listArgs' cmd) (tail args) listArgs' cmd = case listArgs cmd of Just names -> names Nothing -> [] findCommand name = safeHead $ filter ((==name) . commandName) $ getCommands config requestedCommand = safeHead args safeHead xs = if length xs > 0 then Just (head xs) else Nothing
527
makeCommand config args = requestedCommand >>= findCommand >>= commandStr where commandStr cmd = buildCommandString cmd (argpairs cmd) argpairs cmd = zip (listArgs' cmd) (tail args) listArgs' cmd = case listArgs cmd of Just names -> names Nothing -> [] findCommand name = safeHead $ filter ((==name) . commandName) $ getCommands config requestedCommand = safeHead args safeHead xs = if length xs > 0 then Just (head xs) else Nothing
527
makeCommand config args = requestedCommand >>= findCommand >>= commandStr where commandStr cmd = buildCommandString cmd (argpairs cmd) argpairs cmd = zip (listArgs' cmd) (tail args) listArgs' cmd = case listArgs cmd of Just names -> names Nothing -> [] findCommand name = safeHead $ filter ((==name) . commandName) $ getCommands config requestedCommand = safeHead args safeHead xs = if length xs > 0 then Just (head xs) else Nothing
527
false
false
4
10
163
185
83
102
null
null
mainland/dph
dph-examples/lib/System/Console/ParseArgs.hs
bsd-3-clause
arg_optional :: (Ord a) => Arg a -- ^Argument. -> Bool -- ^False if argument is required to be present. arg_optional (Arg { argData = Just (DataArg { dataArgOptional = b }) }) = b
213
arg_optional :: (Ord a) => Arg a -- ^Argument. -> Bool arg_optional (Arg { argData = Just (DataArg { dataArgOptional = b }) }) = b
161
arg_optional (Arg { argData = Just (DataArg { dataArgOptional = b }) }) = b
75
true
true
2
9
68
64
33
31
null
null
termite2/bv
BV/Types.hs
bsd-3-clause
termIsConst _ = False
30
termIsConst _ = False
30
termIsConst _ = False
30
false
false
0
4
12
10
4
6
null
null
dflemstr/ship
Log.hs
gpl-3.0
termPrioColor :: Priority -> Color termPrioColor DEBUG = Black
62
termPrioColor :: Priority -> Color termPrioColor DEBUG = Black
62
termPrioColor DEBUG = Black
27
false
true
0
5
8
18
9
9
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | A line page element. peLine :: Lens' PageElement (Maybe Line) peLine = lens _peLine (\ s a -> s{_peLine = a})
114
peLine :: Lens' PageElement (Maybe Line) peLine = lens _peLine (\ s a -> s{_peLine = a})
88
peLine = lens _peLine (\ s a -> s{_peLine = a})
47
true
true
0
9
22
46
25
21
null
null
hnakamur/haskell-sandbox
sandbox-json/SandBox/Data/JSON/Parser.hs
bsd-3-clause
lBraceWs :: Stream s m Char => ParsecT s u m Char lBraceWs = charWs '{'
71
lBraceWs :: Stream s m Char => ParsecT s u m Char lBraceWs = charWs '{'
71
lBraceWs = charWs '{'
21
false
true
0
6
15
34
16
18
null
null
cliffano/swaggy-jenkins
clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs
mit
-- | 'hudsonUseSecurity' Lens hudsonUseSecurityL :: Lens_' Hudson (Maybe Bool) hudsonUseSecurityL f Hudson{..} = (\hudsonUseSecurity -> Hudson { hudsonUseSecurity, ..} ) <$> f hudsonUseSecurity
193
hudsonUseSecurityL :: Lens_' Hudson (Maybe Bool) hudsonUseSecurityL f Hudson{..} = (\hudsonUseSecurity -> Hudson { hudsonUseSecurity, ..} ) <$> f hudsonUseSecurity
163
hudsonUseSecurityL f Hudson{..} = (\hudsonUseSecurity -> Hudson { hudsonUseSecurity, ..} ) <$> f hudsonUseSecurity
114
true
true
1
8
23
62
30
32
null
null
ice1000/OI-codes
codewars/101-200/algebraic-isomorphism.hs
agpl-3.0
-- 1 = S O (we are using peano arithmetic) -- https://en.wikipedia.org/wiki/Peano_axioms one :: ISO () (Maybe Void) one = (const Nothing, const ())
147
one :: ISO () (Maybe Void) one = (const Nothing, const ())
58
one = (const Nothing, const ())
31
true
true
0
8
23
46
22
24
null
null
rgleichman/glance
examples/tutorial.hs
gpl-3.0
{-Welcome to Glance! My goal for this tutorial is teach you how to read Glance drawings, but also to get you thinking about visual programming languages. Why is Glance designed the way it is? What are other ways it could work? How could it be extended? I feel that we are just at the very beginning of visual programming languages, and that there is a huge universe of visual programming language designs waiting to be discovered. This tutorial assumes that the reader has some familiarity with the basics of Haskell. Function Application: Let's start with y = f x. The function f is applied to the argument x, and the result is bound to y. -} y = f x
655
y = f x
7
y = f x
7
true
false
1
5
123
14
5
9
null
null
Paow/encore
src/types/Typechecker/Util.hs
bsd-3-clause
allM :: (Monad m) => (a -> m Bool) -> [a] -> m Bool allM p = foldM (\b x -> liftM (b &&) (p x)) True
100
allM :: (Monad m) => (a -> m Bool) -> [a] -> m Bool allM p = foldM (\b x -> liftM (b &&) (p x)) True
100
allM p = foldM (\b x -> liftM (b &&) (p x)) True
48
false
true
0
10
26
82
41
41
null
null
thedufer/TomeOfStories
Main.hs
mit
makeSqlStory :: Story -> [SqlValue] makeSqlStory (Story user story timestamp) = [toSql user, toSql story, toSql timestamp]
124
makeSqlStory :: Story -> [SqlValue] makeSqlStory (Story user story timestamp) = [toSql user, toSql story, toSql timestamp]
124
makeSqlStory (Story user story timestamp) = [toSql user, toSql story, toSql timestamp]
88
false
true
0
7
18
49
25
24
null
null
agocorona/MFlow
tests/workflow2.hs
bsd-3-clause
-- show main= do enterStock 10 rbook forkIO $ exec "buyreserve" (buyReserve 30) keyBook threadDelay 45000000 putStrLn "FINISHED" putStrLn "----------------WORKFLOW HISTORY:--------------" h <- getHistory "buyreserve" keyBook putStrLn $ unlines h putStrLn "---------------END WORKFLOW HISTORY------------" delWF "buyreserve" keyBook atomically $ delDBRef rbook
383
main= do enterStock 10 rbook forkIO $ exec "buyreserve" (buyReserve 30) keyBook threadDelay 45000000 putStrLn "FINISHED" putStrLn "----------------WORKFLOW HISTORY:--------------" h <- getHistory "buyreserve" keyBook putStrLn $ unlines h putStrLn "---------------END WORKFLOW HISTORY------------" delWF "buyreserve" keyBook atomically $ delDBRef rbook
375
main= do enterStock 10 rbook forkIO $ exec "buyreserve" (buyReserve 30) keyBook threadDelay 45000000 putStrLn "FINISHED" putStrLn "----------------WORKFLOW HISTORY:--------------" h <- getHistory "buyreserve" keyBook putStrLn $ unlines h putStrLn "---------------END WORKFLOW HISTORY------------" delWF "buyreserve" keyBook atomically $ delDBRef rbook
375
true
false
0
10
64
99
40
59
null
null
tulcod/megaparsec
Text/Megaparsec/Combinator.hs
bsd-2-clause
sepEndBy1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a] sepEndBy1 p sep = sepBy1 p sep <* optional sep
146
sepEndBy1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a] sepEndBy1 p sep = sepBy1 p sep <* optional sep
146
sepEndBy1 p sep = sepBy1 p sep <* optional sep
46
false
true
0
9
46
77
36
41
null
null
vikraman/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
getInvalids :: [Validity] -> [MsgDoc] getInvalids vs = [d | NotValid d <- vs]
77
getInvalids :: [Validity] -> [MsgDoc] getInvalids vs = [d | NotValid d <- vs]
77
getInvalids vs = [d | NotValid d <- vs]
39
false
true
0
9
13
44
21
23
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/NodeGroups/AggregatedList.hs
mpl-2.0
-- | Sorts list results by a certain order. By default, results are returned -- in alphanumerical order based on the resource name. You can also sort -- results in descending order based on the creation timestamp using -- \`orderBy=\"creationTimestamp desc\"\`. This sorts results based on the -- \`creationTimestamp\` field in reverse chronological order (newest -- result first). Use this to sort resources like operations so that the -- newest operation is returned first. Currently, only sorting by \`name\` -- or \`creationTimestamp desc\` is supported. ngalOrderBy :: Lens' NodeGroupsAggregatedList (Maybe Text) ngalOrderBy = lens _ngalOrderBy (\ s a -> s{_ngalOrderBy = a})
682
ngalOrderBy :: Lens' NodeGroupsAggregatedList (Maybe Text) ngalOrderBy = lens _ngalOrderBy (\ s a -> s{_ngalOrderBy = a})
123
ngalOrderBy = lens _ngalOrderBy (\ s a -> s{_ngalOrderBy = a})
64
true
true
1
9
103
57
32
25
null
null
caasi/spj-book-student-1992
src/TiState.hs
bsd-3-clause
tiStatGetSReductions :: TiStats -> Int tiStatGetSReductions (s, sr, pr, h, d) = sr
82
tiStatGetSReductions :: TiStats -> Int tiStatGetSReductions (s, sr, pr, h, d) = sr
82
tiStatGetSReductions (s, sr, pr, h, d) = sr
43
false
true
0
6
12
33
19
14
null
null
pparkkin/eta
compiler/ETA/Utils/UniqFM.hs
bsd-3-clause
-- | Determines the pluralisation suffix appropriate for the length of a set -- in the same way that plural from Outputable does for lists. pluralUFM :: UniqFM a -> SDoc pluralUFM ufm | sizeUFM ufm == 1 = empty | otherwise = char 's'
237
pluralUFM :: UniqFM a -> SDoc pluralUFM ufm | sizeUFM ufm == 1 = empty | otherwise = char 's'
97
pluralUFM ufm | sizeUFM ufm == 1 = empty | otherwise = char 's'
67
true
true
0
9
48
55
24
31
null
null
wavewave/hoodle-render
src/Graphics/Hoodle/Render.hs
bsd-2-clause
renderRItem itm@(RItemImage img msfc) = do case msfc of Nothing -> renderImg (bbxed_content img) Just sfc -> do let (x,y) = (img_pos . bbxed_content) img BBox (x1,y1) (x2,y2) = getBBox img ix <- liftM fromIntegral (imageSurfaceGetWidth sfc) iy <- liftM fromIntegral (imageSurfaceGetHeight sfc) save -- setAntialias AntialiasNone translate x y scale ((x2-x1)/ix) ((y2-y1)/iy) setSourceSurface sfc 0 0 paint restore return itm
520
renderRItem itm@(RItemImage img msfc) = do case msfc of Nothing -> renderImg (bbxed_content img) Just sfc -> do let (x,y) = (img_pos . bbxed_content) img BBox (x1,y1) (x2,y2) = getBBox img ix <- liftM fromIntegral (imageSurfaceGetWidth sfc) iy <- liftM fromIntegral (imageSurfaceGetHeight sfc) save -- setAntialias AntialiasNone translate x y scale ((x2-x1)/ix) ((y2-y1)/iy) setSourceSurface sfc 0 0 paint restore return itm
520
renderRItem itm@(RItemImage img msfc) = do case msfc of Nothing -> renderImg (bbxed_content img) Just sfc -> do let (x,y) = (img_pos . bbxed_content) img BBox (x1,y1) (x2,y2) = getBBox img ix <- liftM fromIntegral (imageSurfaceGetWidth sfc) iy <- liftM fromIntegral (imageSurfaceGetHeight sfc) save -- setAntialias AntialiasNone translate x y scale ((x2-x1)/ix) ((y2-y1)/iy) setSourceSurface sfc 0 0 paint restore return itm
520
false
false
1
18
156
214
99
115
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Dependency/Modular/Preference.hs
bsd-3-clause
preferredVersionsOrdering :: [VR] -> Ver -> Ver -> Ordering preferredVersionsOrdering vrs v1 v2 = compare (check v1) (check v2) where check v = Prelude.length . Prelude.filter (==True) . Prelude.map (flip checkVR v) $ vrs -- | Traversal that tries to establish package preferences (not constraints). -- Works by reordering choice nodes. Also applies stanza preferences.
392
preferredVersionsOrdering :: [VR] -> Ver -> Ver -> Ordering preferredVersionsOrdering vrs v1 v2 = compare (check v1) (check v2) where check v = Prelude.length . Prelude.filter (==True) . Prelude.map (flip checkVR v) $ vrs -- | Traversal that tries to establish package preferences (not constraints). -- Works by reordering choice nodes. Also applies stanza preferences.
392
preferredVersionsOrdering vrs v1 v2 = compare (check v1) (check v2) where check v = Prelude.length . Prelude.filter (==True) . Prelude.map (flip checkVR v) $ vrs -- | Traversal that tries to establish package preferences (not constraints). -- Works by reordering choice nodes. Also applies stanza preferences.
332
false
true
0
9
77
99
50
49
null
null
mbg/system-f-with-kind-polymorphism
TypeCheck.hs
mit
tyApp :: Type -> Type -> Either String Type tyApp tf ta = case nf tf of (ForAllTy n k tb) -> Right (subst tb (Sub n ta)) _ -> Left $ printf errTyApp (show tf) (show ta)
196
tyApp :: Type -> Type -> Either String Type tyApp tf ta = case nf tf of (ForAllTy n k tb) -> Right (subst tb (Sub n ta)) _ -> Left $ printf errTyApp (show tf) (show ta)
195
tyApp tf ta = case nf tf of (ForAllTy n k tb) -> Right (subst tb (Sub n ta)) _ -> Left $ printf errTyApp (show tf) (show ta)
151
false
true
0
12
65
100
48
52
null
null
zmthy/snaplet-rest
src/Snap/Snaplet/Rest/Serve.hs
mit
------------------------------------------------------------------------------ -- | Determines if 'rqPathInfo' is null. isTop :: MonadSnap m => m Bool isTop = BS.null . rqPathInfo <$> getRequest
194
isTop :: MonadSnap m => m Bool isTop = BS.null . rqPathInfo <$> getRequest
74
isTop = BS.null . rqPathInfo <$> getRequest
43
true
true
1
7
21
39
18
21
null
null
christiaanb/ghc
compiler/vectorise/Vectorise/Generic/PAMethods.hs
bsd-3-clause
rrorEmptyPDatas :: DynFlags -> Type -> a errorEmptyPDatas dflags tc = cantVectorise dflags "Vectorise.PAMethods" $ vcat [ text "Cannot vectorise data type with no parallel data " <> quotes (ppr tc) , text "Data types to be vectorised must contain at least one constructor" , text "with at least one field." ]
342
errorEmptyPDatas :: DynFlags -> Type -> a errorEmptyPDatas dflags tc = cantVectorise dflags "Vectorise.PAMethods" $ vcat [ text "Cannot vectorise data type with no parallel data " <> quotes (ppr tc) , text "Data types to be vectorised must contain at least one constructor" , text "with at least one field." ]
342
errorEmptyPDatas dflags tc = cantVectorise dflags "Vectorise.PAMethods" $ vcat [ text "Cannot vectorise data type with no parallel data " <> quotes (ppr tc) , text "Data types to be vectorised must contain at least one constructor" , text "with at least one field." ]
300
false
true
2
9
85
74
33
41
null
null
mettekou/ghc
compiler/utils/Util.hs
bsd-3-clause
-- Module names: looksLikeModuleName :: String -> Bool looksLikeModuleName [] = False
86
looksLikeModuleName :: String -> Bool looksLikeModuleName [] = False
68
looksLikeModuleName [] = False
30
true
true
0
6
12
21
11
10
null
null
Concomitant/LambdaHack
Game/LambdaHack/Server/Fov.hs
bsd-3-clause
-- | Compute all dynamically lit positions on a level, whether lit by actors -- or floor items. Note that an actor can be blind, in which case he doesn't see -- his own light (but others, from his or other factions, possibly do). litByItems :: PointArray.Array Bool -> FovMode -> [(Point, Int)] -> PerceptionDynamicLit litByItems clearPs fovMode allItems = let litPos :: (Point, Int) -> [Point] litPos (p, light) = fullscan clearPs fovMode light p in PerceptionDynamicLit $ concatMap litPos allItems
520
litByItems :: PointArray.Array Bool -> FovMode -> [(Point, Int)] -> PerceptionDynamicLit litByItems clearPs fovMode allItems = let litPos :: (Point, Int) -> [Point] litPos (p, light) = fullscan clearPs fovMode light p in PerceptionDynamicLit $ concatMap litPos allItems
290
litByItems clearPs fovMode allItems = let litPos :: (Point, Int) -> [Point] litPos (p, light) = fullscan clearPs fovMode light p in PerceptionDynamicLit $ concatMap litPos allItems
190
true
true
2
10
102
109
56
53
null
null