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
mariefarrell/Hets
Common/Token.hs
gpl-2.0
{- | mixfix components starting with square brackets ('bracketP') that may follow a place ('placeT') (outside 'innerList') -} topMix3 :: ([String], [String]) -> GenParser Char st [Token] topMix3 l = let p = innerList l in bracketP p <++> flat (many (braceP p)) <++> option...
333
topMix3 :: ([String], [String]) -> GenParser Char st [Token] topMix3 l = let p = innerList l in bracketP p <++> flat (many (braceP p)) <++> optionL (topMix1 l)
204
topMix3 l = let p = innerList l in bracketP p <++> flat (many (braceP p)) <++> optionL (topMix1 l)
143
true
true
0
13
94
90
45
45
null
null
BlackBrane/shiva
src/Shiva/Utils.hs
mit
---- zipWithDefault :: (a -> a -> b) -> a -> [a] -> [a] -> [b] zipWithDefault _ _ [] [] = []
102
zipWithDefault :: (a -> a -> b) -> a -> [a] -> [a] -> [b] zipWithDefault _ _ [] [] = []
95
zipWithDefault _ _ [] [] = []
37
true
true
0
9
32
63
34
29
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/RunInstances.hs
mpl-2.0
-- | The ID of the kernel. -- -- We recommend that you use PV-GRUB instead of kernels and RAM disks. For -- more information, see <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html PV-GRUB> in the /Amazon Elastic Compute Cloud User Guidefor Linux/. -- -- riKernelId :: Lens' RunInstances (Mayb...
389
riKernelId :: Lens' RunInstances (Maybe Text) riKernelId = lens _riKernelId (\s a -> s { _riKernelId = a })
107
riKernelId = lens _riKernelId (\s a -> s { _riKernelId = a })
61
true
true
0
9
58
51
30
21
null
null
ndmitchell/hogle-dead
src/Action/Server.hs
bsd-3-clause
actionReplay :: CmdLine -> IO () actionReplay Replay{..} = withBuffering stdout NoBuffering $ do src <- readFile logs (t,_) <- duration $ readStoreFile "output/all.hoo" $ \store -> forM_ [readInput url | _:ip:_:url:_ <- map words $ lines src, ip /= "-"] $ \x -> do res <- replyServer store (D...
441
actionReplay :: CmdLine -> IO () actionReplay Replay{..} = withBuffering stdout NoBuffering $ do src <- readFile logs (t,_) <- duration $ readStoreFile "output/all.hoo" $ \store -> forM_ [readInput url | _:ip:_:url:_ <- map words $ lines src, ip /= "-"] $ \x -> do res <- replyServer store (D...
441
actionReplay Replay{..} = withBuffering stdout NoBuffering $ do src <- readFile logs (t,_) <- duration $ readStoreFile "output/all.hoo" $ \store -> forM_ [readInput url | _:ip:_:url:_ <- map words $ lines src, ip /= "-"] $ \x -> do res <- replyServer store (Database "output/all") x ...
408
false
true
34
7
120
162
89
73
null
null
nevrenato/Hets_Fork
Logic/Modification.hs
gpl-2.0
-- | horizontal composition of modifications horCompModification :: Monad m => AnyModification -> AnyModification -> m AnyModification horCompModification (Modification lid1) (Modification lid2) = let cid1 = sourceComorphism lid1 cid2 = sourceComorphism lid2 in if language_name (target...
546
horCompModification :: Monad m => AnyModification -> AnyModification -> m AnyModification horCompModification (Modification lid1) (Modification lid2) = let cid1 = sourceComorphism lid1 cid2 = sourceComorphism lid2 in if language_name (targetLogic cid1) == language_name (sourceLogic cid2...
500
horCompModification (Modification lid1) (Modification lid2) = let cid1 = sourceComorphism lid1 cid2 = sourceComorphism lid2 in if language_name (targetLogic cid1) == language_name (sourceLogic cid2) then return $ Modification (HorCompModif lid1 lid2) else fail $ "Logic mismatch in composition o...
390
true
true
6
11
124
143
66
77
null
null
yiannist/ganeti
src/Ganeti/Metad/ConfigCore.hs
bsd-2-clause
instParams :: MetadMonad InstanceParams instParams = readMVar . mhInstParams =<< metadHandle
92
instParams :: MetadMonad InstanceParams instParams = readMVar . mhInstParams =<< metadHandle
92
instParams = readMVar . mhInstParams =<< metadHandle
52
false
true
0
6
10
22
11
11
null
null
termite2/tsl
Frontend/ExprOps.hs
bsd-3-clause
exprType (ENonDet p _) = Type ?scope $ FlexTypeSpec p
63
exprType (ENonDet p _) = Type ?scope $ FlexTypeSpec p
63
exprType (ENonDet p _) = Type ?scope $ FlexTypeSpec p
63
false
false
0
7
19
27
12
15
null
null
michalkonecny/aern
aern-realfn/src/Numeric/AERN/RmToRn/Evaluation.hs
bsd-3-clause
evalAtPointOut :: CanEvaluate f => (DomainBox f) {-^ a sub-domain @A@ where to evaluate -} -> f {-^ function @f@ -} -> (Domain f) {-^ approximated range of @f@ over @A@ -} evalAtPointOut dombox f = evalAtPointOutEff (evaluationDefaultEffort f) dombox f
291
evalAtPointOut :: CanEvaluate f => (DomainBox f) {-^ a sub-domain @A@ where to evaluate -} -> f {-^ function @f@ -} -> (Domain f) evalAtPointOut dombox f = evalAtPointOutEff (evaluationDefaultEffort f) dombox f
249
evalAtPointOut dombox f = evalAtPointOutEff (evaluationDefaultEffort f) dombox f
84
true
true
0
9
79
59
30
29
null
null
fpco/statistics
Statistics/Quantile.hs
bsd-2-clause
normalUnbiased :: ContParam normalUnbiased = ContParam ta ta where ta = 3/8
79
normalUnbiased :: ContParam normalUnbiased = ContParam ta ta where ta = 3/8
79
normalUnbiased = ContParam ta ta where ta = 3/8
51
false
true
0
7
15
27
14
13
null
null
martinvlk/cabal
Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
fromLibrary :: Verbosity -> FilePath -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> Maybe PathTemplate -- ^ template for HTML location -> Version -> IO HaddockArgs fromLibrary verbosity tmp lbi lib clbi htmlTemplate haddockVersion = do inFiles ...
2,019
fromLibrary :: Verbosity -> FilePath -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> Maybe PathTemplate -- ^ template for HTML location -> Version -> IO HaddockArgs fromLibrary verbosity tmp lbi lib clbi htmlTemplate haddockVersion = do inFiles ...
2,019
fromLibrary verbosity tmp lbi lib clbi htmlTemplate haddockVersion = do inFiles <- map snd `fmap` getLibSourceFiles lbi lib ifaceArgs <- getInterfaces verbosity lbi clbi htmlTemplate let vanillaOpts = (componentGhcOptions normal lbi bi clbi (buildDir lbi)) { -- Noooooooooo!!!!!111 ...
1,783
false
true
1
15
848
370
188
182
null
null
gelisam/cabal-rangefinder
src/CabalFile/Parser.hs
unlicense
splitIgnore :: (String -> (String, String)) -> ParseC () splitIgnore = (`splitXform` const ())
94
splitIgnore :: (String -> (String, String)) -> ParseC () splitIgnore = (`splitXform` const ())
94
splitIgnore = (`splitXform` const ())
37
false
true
0
8
13
44
25
19
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QTabBar.hs
bsd-2-clause
ieQTabBarShape :: Int -> QTabBarShape ieQTabBarShape x = QEnum (CQTabBarShape x)
80
ieQTabBarShape :: Int -> QTabBarShape ieQTabBarShape x = QEnum (CQTabBarShape x)
80
ieQTabBarShape x = QEnum (CQTabBarShape x)
42
false
true
0
7
10
27
13
14
null
null
chreekat/yesod
yesod-auth/Yesod/Auth/Message.hs
bsd-2-clause
englishMessage SetPassTitle = "Set password"
44
englishMessage SetPassTitle = "Set password"
44
englishMessage SetPassTitle = "Set password"
44
false
false
0
5
4
9
4
5
null
null
bhickey/catamad
src/Entity/Map.hs
gpl-3.0
hasEntity :: (Identifiable a) => EntityMap a -> Identifier a -> Bool hasEntity (EntityMap _ _ m) id = M.member id m
121
hasEntity :: (Identifiable a) => EntityMap a -> Identifier a -> Bool hasEntity (EntityMap _ _ m) id = M.member id m
121
hasEntity (EntityMap _ _ m) id = M.member id m
46
false
true
0
11
27
58
27
31
null
null
notae/haskell-exercise
monad/RWST.hs
bsd-3-clause
-- -- RWS monad -- test1 :: (Int, Int, [String]) test1 = runRWS testRWS [("one", 1), ("two", 2)] 10
100
test1 :: (Int, Int, [String]) test1 = runRWS testRWS [("one", 1), ("two", 2)] 10
80
test1 = runRWS testRWS [("one", 1), ("two", 2)] 10
50
true
true
0
7
19
51
32
19
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M09/D08/Exercise.hs
mit
{-- BONUS ---------------------------------------------------------------- Instead of storing the newly compressed files on your local file system, store them instead at some remote location, such as S3 or on a DaaS SQL/NoSQL database --} remoteStore :: URL -> Directory -> FileName -> URL -> IO () remoteStore url bO...
349
remoteStore :: URL -> Directory -> FileName -> URL -> IO () remoteStore url bOrN file remoteURL = undefined
107
remoteStore url bOrN file remoteURL = undefined
47
true
true
0
10
53
42
21
21
null
null
Pold87/Haggressive
src-lib/Hag.hs
gpl-2.0
-- |Get directory contents of 'FilePath'. A better variant is at: getFiles :: FilePath -> IO [FilePath] getFiles dir = S.getDirectoryContents dir >>= return . map (dir ++) . filter (`notElem` [".", ".."])
219
getFiles :: FilePath -> IO [FilePath] getFiles dir = S.getDirectoryContents dir >>= return . map (dir ++) . filter (`notElem` [".", ".."])
153
getFiles dir = S.getDirectoryContents dir >>= return . map (dir ++) . filter (`notElem` [".", ".."])
115
true
true
2
8
47
70
37
33
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | This is where we handle unrecognised warning flags. We only issue a warning -- if -Wunrecognised-warning-flags is set. See Trac #11429 for context. unrecognisedWarning :: String -> Flag (CmdLineP DynFlags) unrecognisedWarning prefix = defFlag prefix (Prefix action) where action :: String -> EwM (CmdLineP Dyn...
542
unrecognisedWarning :: String -> Flag (CmdLineP DynFlags) unrecognisedWarning prefix = defFlag prefix (Prefix action) where action :: String -> EwM (CmdLineP DynFlags) () action flag = do f <- wopt Opt_WarnUnrecognisedWarningFlags <$> liftEwM getCmdLineState when f $ addWarn $ "unrecognised warnin...
389
unrecognisedWarning prefix = defFlag prefix (Prefix action) where action :: String -> EwM (CmdLineP DynFlags) () action flag = do f <- wopt Opt_WarnUnrecognisedWarningFlags <$> liftEwM getCmdLineState when f $ addWarn $ "unrecognised warning flag: -" ++ prefix ++ flag -- See Note [Supporting CLI ...
331
true
true
0
11
100
113
54
59
null
null
GaloisInc/saw-script
rme/src/Data/RME/Vector.hs
bsd-3-clause
-- | Bitvector equality. eq :: RMEV -> RMEV -> RME eq x y = V.foldr RME.conj RME.true (V.zipWith RME.iff x y)
109
eq :: RMEV -> RMEV -> RME eq x y = V.foldr RME.conj RME.true (V.zipWith RME.iff x y)
84
eq x y = V.foldr RME.conj RME.true (V.zipWith RME.iff x y)
58
true
true
0
8
21
52
26
26
null
null
jtdaugherty/vty-ui-builder
src/Graphics/Vty/Widgets/Builder/Handlers/Dialog.hs
bsd-3-clause
handlers :: [WidgetElementHandler] handlers = [handleDialog]
60
handlers :: [WidgetElementHandler] handlers = [handleDialog]
60
handlers = [handleDialog]
25
false
true
0
5
5
17
10
7
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1SubjectAccessReviewStatus' Lens v1SubjectAccessReviewStatusL :: Lens_' V1SubjectAccessReview (Maybe V1SubjectAccessReviewStatus) v1SubjectAccessReviewStatusL f V1SubjectAccessReview{..} = (\v1SubjectAccessReviewStatus -> V1SubjectAccessReview { v1SubjectAccessReviewStatus, ..} ) <$> f v1SubjectAccessReviewStatu...
321
v1SubjectAccessReviewStatusL :: Lens_' V1SubjectAccessReview (Maybe V1SubjectAccessReviewStatus) v1SubjectAccessReviewStatusL f V1SubjectAccessReview{..} = (\v1SubjectAccessReviewStatus -> V1SubjectAccessReview { v1SubjectAccessReviewStatus, ..} ) <$> f v1SubjectAccessReviewStatus
281
v1SubjectAccessReviewStatusL f V1SubjectAccessReview{..} = (\v1SubjectAccessReviewStatus -> V1SubjectAccessReview { v1SubjectAccessReviewStatus, ..} ) <$> f v1SubjectAccessReviewStatus
184
true
true
0
8
23
57
30
27
null
null
chemist/series-storage
src/Query/ParseUtil.hs
bsd-3-clause
withTrailing :: (Monad m) => m a -> m b -> m b withTrailing end p = p >>= (\x -> end >> return x)
97
withTrailing :: (Monad m) => m a -> m b -> m b withTrailing end p = p >>= (\x -> end >> return x)
97
withTrailing end p = p >>= (\x -> end >> return x)
50
false
true
2
9
24
68
32
36
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Code.hs
lgpl-2.1
mergeInfoState :: ModuleInfo -> ModuleInfo -> ModuleInfo mergeInfoState oldState newState = let newDeps = Set.union (moduleDeps oldState) (moduleDeps newState) newSubmodules = M.unionWith mergeInfo (submodules oldState) (submodules newState) newExports = moduleExports oldState <> moduleExports newSt...
1,186
mergeInfoState :: ModuleInfo -> ModuleInfo -> ModuleInfo mergeInfoState oldState newState = let newDeps = Set.union (moduleDeps oldState) (moduleDeps newState) newSubmodules = M.unionWith mergeInfo (submodules oldState) (submodules newState) newExports = moduleExports oldState <> moduleExports newSt...
1,186
mergeInfoState oldState newState = let newDeps = Set.union (moduleDeps oldState) (moduleDeps newState) newSubmodules = M.unionWith mergeInfo (submodules oldState) (submodules newState) newExports = moduleExports oldState <> moduleExports newState newImports = qualifiedImports oldState <> qua...
1,129
false
true
0
11
280
296
155
141
null
null
goldfirere/singletons
singletons-th/src/Data/Singletons/TH/Util.hs
bsd-3-clause
noExactName n = n
51
noExactName n = n
51
noExactName n = n
51
false
false
0
5
37
9
4
5
null
null
typelead/epm
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
-- | Find a file by looking in a search path with one of a list of possible -- file extensions. The file base name should be given and it will be tried -- with each of the extensions in each element of the search path. -- findFileWithExtension :: [String] -> [FilePath] -> Fil...
535
findFileWithExtension :: [String] -> [FilePath] -> FilePath -> IO (Maybe FilePath) findFileWithExtension extensions searchPath baseName = findFirstFile id [ path </> baseName <.> ext | path <- nub searchPath , ext <- nub extensions ]
313
findFileWithExtension extensions searchPath baseName = findFirstFile id [ path </> baseName <.> ext | path <- nub searchPath , ext <- nub extensions ]
164
true
true
0
10
161
87
45
42
null
null
athanclark/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
substV :: TT n -> TT n -> TT n substV x tm = dropV 0 (instantiate x tm) where dropV i (P nt x ty) = P nt x (dropV i ty) dropV i (V x) | x > i = V (x - 1) | otherwise = V x dropV i (Bind x b sc) = Bind x (fmap (dropV i) b) (dropV (i+1) sc) dropV i (App s f a) = App s (dropV i f) (dropV ...
505
substV :: TT n -> TT n -> TT n substV x tm = dropV 0 (instantiate x tm) where dropV i (P nt x ty) = P nt x (dropV i ty) dropV i (V x) | x > i = V (x - 1) | otherwise = V x dropV i (Bind x b sc) = Bind x (fmap (dropV i) b) (dropV (i+1) sc) dropV i (App s f a) = App s (dropV i f) (dropV ...
505
substV x tm = dropV 0 (instantiate x tm) where dropV i (P nt x ty) = P nt x (dropV i ty) dropV i (V x) | x > i = V (x - 1) | otherwise = V x dropV i (Bind x b sc) = Bind x (fmap (dropV i) b) (dropV (i+1) sc) dropV i (App s f a) = App s (dropV i f) (dropV i a) dropV i (Proj x idx) =...
474
false
true
0
11
161
278
133
145
null
null
kindohm/tidal-midi-rack
Sound/Tidal/MIDI/Kindohm/CustomParams.hs
gpl-3.0
(perf2, perf2_p) = pF "perf2" (Just 0)
38
(perf2, perf2_p) = pF "perf2" (Just 0)
38
(perf2, perf2_p) = pF "perf2" (Just 0)
38
false
false
0
7
6
24
12
12
null
null
svenkeidel/gnome-citadel
src/Level/Transformation.hs
gpl-3.0
-- | removes the mining target and places the actor on that field. mine :: Actor -> StaticElement -> LevelTrans mine actor block level = level & deleteFromCoords block & staticElements %~ M.delete (block ^. StaticElement.id) & move actor blockCoords where blockCoords = view (coordOf block) lev...
322
mine :: Actor -> StaticElement -> LevelTrans mine actor block level = level & deleteFromCoords block & staticElements %~ M.delete (block ^. StaticElement.id) & move actor blockCoords where blockCoords = view (coordOf block) level
255
mine actor block level = level & deleteFromCoords block & staticElements %~ M.delete (block ^. StaticElement.id) & move actor blockCoords where blockCoords = view (coordOf block) level
210
true
true
0
10
72
84
41
43
null
null
olorin/amazonka
amazonka-autoscaling/test/Test/AWS/AutoScaling.hs
mpl-2.0
tests :: [TestTree] tests = []
30
tests :: [TestTree] tests = []
30
tests = []
10
false
true
0
7
5
23
10
13
null
null
energyflowanalysis/efa-2.1
src/EFA/Flow/Topology/EquationSystem.hs
bsd-3-clause
solveOpts :: (Product v, ZeroTestable v, Record rec, Node.C node) => (forall s. Options Verify.Ignore rec s v) -> FlowTopo.Section node (rec (Result v)) -> (forall s. EquationSystem Verify.Ignore rec node s v) -> FlowTopo.Section node (rec (Result v)) solveOpts opts gr sys = runST $ do (vars, eqs) <- ...
389
solveOpts :: (Product v, ZeroTestable v, Record rec, Node.C node) => (forall s. Options Verify.Ignore rec s v) -> FlowTopo.Section node (rec (Result v)) -> (forall s. EquationSystem Verify.Ignore rec node s v) -> FlowTopo.Section node (rec (Result v)) solveOpts opts gr sys = runST $ do (vars, eqs) <- ...
389
solveOpts opts gr sys = runST $ do (vars, eqs) <- setup opts gr sys Verify.runIgnorant $ Sys.solve eqs query vars
122
false
true
0
13
83
181
89
92
null
null
HaskVan/tiempo
src/Tiempo.hs
mit
-- | given a number, produces a @TimeInterval@ of milliseconds milliSeconds :: Int -> TimeInterval milliSeconds = TimeInterval Millis
133
milliSeconds :: Int -> TimeInterval milliSeconds = TimeInterval Millis
70
milliSeconds = TimeInterval Millis
34
true
true
0
7
18
25
11
14
null
null
kallisti-dev/portalchess
PortalChess.hs
bsd-3-clause
chebyshev' :: (MonadPlus m) => Coord -> [m Move] chebyshev' c = zipWith mplus allDiags fanCards where allDiags = spreadFrom diagonals allCards = spreadFrom cardinals spreadFrom dirs = let startPoints = msum . map (oneStep . Move c) $ dirs in iterate (>>=oneStep) startPoints fanCards = map...
560
chebyshev' :: (MonadPlus m) => Coord -> [m Move] chebyshev' c = zipWith mplus allDiags fanCards where allDiags = spreadFrom diagonals allCards = spreadFrom cardinals spreadFrom dirs = let startPoints = msum . map (oneStep . Move c) $ dirs in iterate (>>=oneStep) startPoints fanCards = map...
560
chebyshev' c = zipWith mplus allDiags fanCards where allDiags = spreadFrom diagonals allCards = spreadFrom cardinals spreadFrom dirs = let startPoints = msum . map (oneStep . Move c) $ dirs in iterate (>>=oneStep) startPoints fanCards = map (\(i,c) -> c >>= fanCard i) $ zip [1..] allCards...
511
false
true
5
14
155
251
118
133
null
null
vTurbine/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
pprTyClDeclFlavour (SynDecl {}) = text "type"
49
pprTyClDeclFlavour (SynDecl {}) = text "type"
49
pprTyClDeclFlavour (SynDecl {}) = text "type"
49
false
false
0
7
9
19
9
10
null
null
robdockins/edison
edison-core/src/Data/Edison/Assoc/TernaryTrie.hs
mit
comb :: (t1 -> t1 -> t1) -> ((t1 -> t2) -> t2 -> t3) -> ((t1 -> t) -> t -> t2) -> (t1 -> t) -> t -> t3 comb f...
386
comb :: (t1 -> t1 -> t1) -> ((t1 -> t2) -> t2 -> t3) -> ((t1 -> t) -> t -> t2) -> (t1 -> t) -> t -> t3 comb f...
386
comb f p1 p2 = \j n -> p1 (\x -> p2 (\y -> j (f x y)) (j x)) (p2 j n)
72
false
true
0
14
267
155
80
75
null
null
heathweiss/Tricad
src/Examples/Diffs/FirstDiff.hs
gpl-2.0
largeRadius = [(Radius x) | x <- [20,20..]]
43
largeRadius = [(Radius x) | x <- [20,20..]]
43
largeRadius = [(Radius x) | x <- [20,20..]]
43
false
false
1
9
7
33
16
17
null
null
oldmanmike/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
dsHsBind _ (PatSynBind{}) = panic "dsHsBind: PatSynBind"
56
dsHsBind _ (PatSynBind{}) = panic "dsHsBind: PatSynBind"
56
dsHsBind _ (PatSynBind{}) = panic "dsHsBind: PatSynBind"
56
false
false
0
7
6
21
10
11
null
null
shlevy/ghc
compiler/cmm/CmmMachOp.hs
bsd-3-clause
mo_wordSQuot dflags = MO_S_Quot (wordWidth dflags)
53
mo_wordSQuot dflags = MO_S_Quot (wordWidth dflags)
53
mo_wordSQuot dflags = MO_S_Quot (wordWidth dflags)
53
false
false
0
7
8
18
8
10
null
null
dbp/karamaan-opaleye
Karamaan/Opaleye/QueryColspec.hs
bsd-3-clause
-- Need this to have different argument and return type -- for aggregatorMaker', which can change types (when using the -- count aggregator) packMapWire :: PackMap (Wire a) (Wire b) packMapWire = PackMap (\f -> Wire . f . unWire)
229
packMapWire :: PackMap (Wire a) (Wire b) packMapWire = PackMap (\f -> Wire . f . unWire)
88
packMapWire = PackMap (\f -> Wire . f . unWire)
47
true
true
0
9
39
50
27
23
null
null
kmilner/tamarin-prover
src/Web/Theory.hs
gpl-3.0
imgThyPath :: ImageFormat -> (String, FilePath) -- ^ choice and command for rendering (dot or json) -> FilePath -- ^ Tamarin's cache directory -> (System -> D.Dot ()) -> (String -> System -> String) -- ^ to export contrai...
5,806
imgThyPath :: ImageFormat -> (String, FilePath) -- ^ choice and command for rendering (dot or json) -> FilePath -- ^ Tamarin's cache directory -> (System -> D.Dot ()) -> (String -> System -> String) -- ^ to export contrai...
5,806
imgThyPath imgFormat (graphChoice, graphCommand) cacheDir_ compact showJsonGraphFunct simplificationLevel abbreviate thy path = go path where go (TheorySource k i j) = case graphChoice of "json" -> renderGraphCode "json" (casesJsonCode k i j) ...
5,205
false
true
27
18
2,046
1,306
634
672
null
null
green-haskell/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
-- write barrier compiles to no code on x86/x86-64; -- we keep it this long in order to prevent earlier optimisations. genCCall _ _ (PrimTarget MO_Touch) _ _ = return nilOL
181
genCCall _ _ (PrimTarget MO_Touch) _ _ = return nilOL
53
genCCall _ _ (PrimTarget MO_Touch) _ _ = return nilOL
53
true
false
2
7
39
29
13
16
null
null
mihaimaruseac/blog-demos
pokemon/pokemon.hs
mit
-- ((15,15),(15,15),(7,14)) test_2_amazes_xclnt = f 2 37 45 13 14
65
test_2_amazes_xclnt = f 2 37 45 13 14
37
test_2_amazes_xclnt = f 2 37 45 13 14
37
true
false
0
5
9
18
9
9
null
null
skill-lang/skill
deps/haskell/Deserialize.hs
bsd-3-clause
process :: Get State process = g'file ([], [], []) >>= \(strings, uTs, tDs) -> return (strings, uTs, remake tDs) where remake = createHierarchy . upgradeFDs . compress ------------------------------------- ---------- DESERIALIZATION ---------- -------------------------------------
296
process :: Get State process = g'file ([], [], []) >>= \(strings, uTs, tDs) -> return (strings, uTs, remake tDs) where remake = createHierarchy . upgradeFDs . compress ------------------------------------- ---------- DESERIALIZATION ---------- -------------------------------------
296
process = g'file ([], [], []) >>= \(strings, uTs, tDs) -> return (strings, uTs, remake tDs) where remake = createHierarchy . upgradeFDs . compress ------------------------------------- ---------- DESERIALIZATION ---------- -------------------------------------
275
false
true
0
9
47
90
48
42
null
null
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs
bsd-3-clause
-- | Initial configuration that we write out to the package environment file if -- it does not exist. When the package environment gets loaded this -- configuration gets layered on top of 'basePackageEnvironment'. initialPackageEnvironment :: FilePath -> Compiler -> Platform -> IO PackageEn...
1,455
initialPackageEnvironment :: FilePath -> Compiler -> Platform -> IO PackageEnvironment initialPackageEnvironment sandboxDir compiler platform = do defInstallDirs <- defaultInstallDirs (compilerFlavor compiler) {- userInstall= -} False {- _hasLibs= -} False let initia...
1,241
initialPackageEnvironment sandboxDir compiler platform = do defInstallDirs <- defaultInstallDirs (compilerFlavor compiler) {- userInstall= -} False {- _hasLibs= -} False let initialConfig = commonPackageEnvironmentConfig sandboxDir installDirs = combineInstallDirs (\d f -> Flag $ fromFla...
1,125
true
true
0
19
394
228
122
106
null
null
BerndSchwarzenbacher/cis194-solutions
04-higher-order/hw04.hs
mit
-- should produce a balanced Tree using @foldr@ foldTree :: Eq a => [a] -> Tree a foldTree xs = foldr (balancedInsert start) Leaf xs where start = floor (logBase 2 $ fromIntegral(length xs)::Double)
200
foldTree :: Eq a => [a] -> Tree a foldTree xs = foldr (balancedInsert start) Leaf xs where start = floor (logBase 2 $ fromIntegral(length xs)::Double)
152
foldTree xs = foldr (balancedInsert start) Leaf xs where start = floor (logBase 2 $ fromIntegral(length xs)::Double)
118
true
true
0
10
35
78
38
40
null
null
Kludgy/polyparse-fork
src/Text/ParserCombinators/HuttonMeijerWallace.hs
lgpl-2.1
--- Push some tokens back onto the input stream and reparse ------------------ -- | This is useful for recursively expanding macros. When the -- user-parser recognises a macro use, it can lookup the macro -- expansion from the parse state, lex it, and then stuff the -- lexed expansion back down into the parser....
420
reparse :: [Either e t] -> Parser s t e () reparse ts = P (\st inp-> Right [((), st, ts++inp)])
99
reparse ts = P (\st inp-> Right [((), st, ts++inp)])
53
true
true
0
11
86
81
43
38
null
null
byorgey/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LMinus ty) [x, y] = bitOp v "Minus" ty [x, y]
53
doOp v (LMinus ty) [x, y] = bitOp v "Minus" ty [x, y]
53
doOp v (LMinus ty) [x, y] = bitOp v "Minus" ty [x, y]
53
false
false
0
7
12
40
21
19
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/take_1.hs
mit
esEsOrdering EQ GT = MyFalse
28
esEsOrdering EQ GT = MyFalse
28
esEsOrdering EQ GT = MyFalse
28
false
false
0
5
4
11
5
6
null
null
a-ford/notghc
Llvm/Types.hs
bsd-3-clause
ppDouble :: Double -> SDoc ppDouble d = let bs = doubleToBytes d hex d' = case showHex d' "" of [] -> error "dToStr: too few hex digits for float" [x] -> ['0',x] [x,y] -> [x,y] _ -> error "dToStr: too many hex dig...
426
ppDouble :: Double -> SDoc ppDouble d = let bs = doubleToBytes d hex d' = case showHex d' "" of [] -> error "dToStr: too few hex digits for float" [x] -> ['0',x] [x,y] -> [x,y] _ -> error "dToStr: too many hex dig...
426
ppDouble d = let bs = doubleToBytes d hex d' = case showHex d' "" of [] -> error "dToStr: too few hex digits for float" [x] -> ['0',x] [x,y] -> [x,y] _ -> error "dToStr: too many hex digits for float" str...
399
false
true
0
12
186
137
68
69
null
null
Xuyuanp/hscheme
main.hs
apache-2.0
eval :: Env -> LispVal -> IOThrowsError LispVal eval _ val@(String _) = return val
144
eval :: Env -> LispVal -> IOThrowsError LispVal eval _ val@(String _) = return val
144
eval _ val@(String _) = return val
96
false
true
3
6
76
40
20
20
null
null
hpacheco/HAAP
examples/plab/svn/2017li1g186/src/OracleT4.hs
mit
validaJogo' :: Tempo -> Jogo -> Bool validaJogo' t j = length (carros j) == length (nitros j) && length (carros j) == length (historico j) && 0 <= t
180
validaJogo' :: Tempo -> Jogo -> Bool validaJogo' t j = length (carros j) == length (nitros j) && length (carros j) == length (historico j) && 0 <= t
180
validaJogo' t j = length (carros j) == length (nitros j) && length (carros j) == length (historico j) && 0 <= t
143
false
true
0
12
61
85
39
46
null
null
lzlarryli/advent_of_code_2016
day13/part1.hs
mit
breadthFirstSearch :: (Int, Int) -> Int breadthFirstSearch destination = bfs [] (S.singleton (0, (1, 1)))
105
breadthFirstSearch :: (Int, Int) -> Int breadthFirstSearch destination = bfs [] (S.singleton (0, (1, 1)))
105
breadthFirstSearch destination = bfs [] (S.singleton (0, (1, 1)))
65
false
true
0
9
14
51
28
23
null
null
diku-dk/futhark
src/Futhark/IR/Prop/Scope.hs
isc
castNameInfo (LParamName dec) = LParamName dec
46
castNameInfo (LParamName dec) = LParamName dec
46
castNameInfo (LParamName dec) = LParamName dec
46
false
false
0
7
5
18
8
10
null
null
phischu/datomic-rest
Web/Datomic/TransactionDSL.hs
bsd-3-clause
attributeValueToEDNPair :: AttributeValue -> EDN.Pair attributeValueToEDNPair (AttributeValue attribute value) = (EDN.stripTag (EDN.toEDN attribute),EDN.toEDN value)
165
attributeValueToEDNPair :: AttributeValue -> EDN.Pair attributeValueToEDNPair (AttributeValue attribute value) = (EDN.stripTag (EDN.toEDN attribute),EDN.toEDN value)
165
attributeValueToEDNPair (AttributeValue attribute value) = (EDN.stripTag (EDN.toEDN attribute),EDN.toEDN value)
111
false
true
0
9
13
56
27
29
null
null
urbanslug/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
enterSelectorLabel :: DynFlags -> Bool -> WordOff -> CLabel enterSelectorLabel dflags upd_flag offset | tablesNextToCode dflags = mkSelectorInfoLabel upd_flag offset | otherwise = mkSelectorEntryLabel upd_flag offset
234
enterSelectorLabel :: DynFlags -> Bool -> WordOff -> CLabel enterSelectorLabel dflags upd_flag offset | tablesNextToCode dflags = mkSelectorInfoLabel upd_flag offset | otherwise = mkSelectorEntryLabel upd_flag offset
234
enterSelectorLabel dflags upd_flag offset | tablesNextToCode dflags = mkSelectorInfoLabel upd_flag offset | otherwise = mkSelectorEntryLabel upd_flag offset
174
false
true
1
8
43
60
27
33
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/Dwarf/Constants.hs
bsd-3-clause
dwarfSection :: String -> SDoc dwarfSection name = sdocWithPlatform $ \plat -> case platformOS plat of OSDarwin -> ftext $ mkFastString $ ".section __DWARF,__debug_" ++ name ++ ",regular,debug" _other -> ftext $ mkFastString $ ".section .debug_" ++ name ++ ",\"\",@progbit...
349
dwarfSection :: String -> SDoc dwarfSection name = sdocWithPlatform $ \plat -> case platformOS plat of OSDarwin -> ftext $ mkFastString $ ".section __DWARF,__debug_" ++ name ++ ",regular,debug" _other -> ftext $ mkFastString $ ".section .debug_" ++ name ++ ",\"\",@progbit...
349
dwarfSection name = sdocWithPlatform $ \plat -> case platformOS plat of OSDarwin -> ftext $ mkFastString $ ".section __DWARF,__debug_" ++ name ++ ",regular,debug" _other -> ftext $ mkFastString $ ".section .debug_" ++ name ++ ",\"\",@progbits" -- | Dwarf section labels
318
false
true
0
13
93
85
41
44
null
null
sdiehl/ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
is_flat_prod_pat _ = False
26
is_flat_prod_pat _ = False
26
is_flat_prod_pat _ = False
26
false
false
0
4
3
10
4
6
null
null
naoto-ogawa/h-xproto-mysql
src/DataBase/MySQLX/Model.hs
mit
-- | Make an OBJECT type Any. Don't use this function, use any. (TODO hiding) mkAnyObjectAny :: POAny.ObjectAny -> PA.Any mkAnyObjectAny x = PB.defaultValue {PA.type' = PAT.OBJECT, PA.obj = Just x}
197
mkAnyObjectAny :: POAny.ObjectAny -> PA.Any mkAnyObjectAny x = PB.defaultValue {PA.type' = PAT.OBJECT, PA.obj = Just x}
119
mkAnyObjectAny x = PB.defaultValue {PA.type' = PAT.OBJECT, PA.obj = Just x}
75
true
true
0
8
30
54
27
27
null
null
ddssff/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
_RecP :: Prism' Pat (Name, [FieldPat]) _RecP = prism' reviewer remitter where reviewer (x, y) = RecP x y remitter (RecP x y) = Just (x, y) remitter _ = Nothing
181
_RecP :: Prism' Pat (Name, [FieldPat]) _RecP = prism' reviewer remitter where reviewer (x, y) = RecP x y remitter (RecP x y) = Just (x, y) remitter _ = Nothing
181
_RecP = prism' reviewer remitter where reviewer (x, y) = RecP x y remitter (RecP x y) = Just (x, y) remitter _ = Nothing
142
false
true
2
8
52
85
44
41
null
null
jchitel/ProjectEuler.hs
Problems/Problem0019.hs
mit
getNumSundaysForLeapYear :: Int -> Int getNumSundaysForLeapYear 0 = 3
69
getNumSundaysForLeapYear :: Int -> Int getNumSundaysForLeapYear 0 = 3
69
getNumSundaysForLeapYear 0 = 3
30
false
true
0
5
8
18
9
9
null
null
pparkkin/eta
compiler/ETA/BasicTypes/VarEnv.hs
bsd-3-clause
modifyVarEnv_Directly :: (a -> a) -> UniqFM a -> Unique -> UniqFM a modifyVarEnv_Directly mangle_fn env key = case (lookupUFM_Directly env key) of Nothing -> env Just xx -> addToUFM_Directly env key (mangle_fn xx)
227
modifyVarEnv_Directly :: (a -> a) -> UniqFM a -> Unique -> UniqFM a modifyVarEnv_Directly mangle_fn env key = case (lookupUFM_Directly env key) of Nothing -> env Just xx -> addToUFM_Directly env key (mangle_fn xx)
227
modifyVarEnv_Directly mangle_fn env key = case (lookupUFM_Directly env key) of Nothing -> env Just xx -> addToUFM_Directly env key (mangle_fn xx)
159
false
true
0
10
47
83
40
43
null
null
yliu120/K3
examples/analysis/FusionHarness.hs
apache-2.0
groupByFoldMapProg :: String groupByFoldMapProg = "\ \ typedef MyC = collection {a:int} @Collection \ \ declare c : MyC \ \ declare d : MyC \ \ trigger t : () = \\_ -> ( ...
1,072
groupByFoldMapProg :: String groupByFoldMapProg = "\ \ typedef MyC = collection {a:int} @Collection \ \ declare c : MyC \ \ declare d : MyC \ \ trigger t : () = \\_ -> ( ...
1,072
groupByFoldMapProg = "\ \ typedef MyC = collection {a:int} @Collection \ \ declare c : MyC \ \ declare d : MyC \ \ trigger t : () = \\_ -> ( ...
1,043
false
true
0
6
761
18
7
11
null
null
jfischoff/repa-image
src/Resizer.hs
bsd-3-clause
pPercent :: Parser Resize pPercent = Percent <$> option ( long "percent" & short 'p' & metavar "PERCENT" & help "The amount to reduce the image as a percent")
224
pPercent :: Parser Resize pPercent = Percent <$> option ( long "percent" & short 'p' & metavar "PERCENT" & help "The amount to reduce the image as a percent")
224
pPercent = Percent <$> option ( long "percent" & short 'p' & metavar "PERCENT" & help "The amount to reduce the image as a percent")
198
false
true
2
10
94
49
22
27
null
null
timbod7/veditor
demo/Examples/Utils.hs
bsd-3-clause
mkButton hbox label action = do b <- buttonNew set b [buttonLabel:=label] boxPackEnd hbox b PackNatural 0 on b buttonActivated action
149
mkButton hbox label action = do b <- buttonNew set b [buttonLabel:=label] boxPackEnd hbox b PackNatural 0 on b buttonActivated action
149
mkButton hbox label action = do b <- buttonNew set b [buttonLabel:=label] boxPackEnd hbox b PackNatural 0 on b buttonActivated action
149
false
false
0
9
36
59
25
34
null
null
nishiuramakoto/logiku
app/DBFS.hs
gpl-3.0
isDirectoryEveryoneWritableBy :: MonadIO m => DirectoryId -> UserAccountId -> SqlPersistT m Bool isDirectoryEveryoneWritableBy dir him = dir `isDirectoryEveryoneAccessibleBy` him $ DirectoryEveryoneW
229
isDirectoryEveryoneWritableBy :: MonadIO m => DirectoryId -> UserAccountId -> SqlPersistT m Bool isDirectoryEveryoneWritableBy dir him = dir `isDirectoryEveryoneAccessibleBy` him $ DirectoryEveryoneW
229
isDirectoryEveryoneWritableBy dir him = dir `isDirectoryEveryoneAccessibleBy` him $ DirectoryEveryoneW
102
false
true
0
8
50
46
23
23
null
null
kongo2002/gitlog
src/Gitlog/Encoder/Html.hs
apache-2.0
s :: String -> Builder s = stringUtf8
37
s :: String -> Builder s = stringUtf8
37
s = stringUtf8
14
false
true
0
7
7
22
9
13
null
null
sebnow/archlinux-pacman
Distribution/Archlinux/PackageDescription.hs
mit
readLicense "BSD" = D.BSD3
26
readLicense "BSD" = D.BSD3
26
readLicense "BSD" = D.BSD3
26
false
false
0
5
3
11
5
6
null
null
creichert/wai-middleware-hmac
test/WaiMiddlewareHmacAuthSpec.hs
bsd-3-clause
caseHmacInvalidSignature :: Assertion caseHmacInvalidSignature = do -- test hmac authenticaation -- invalid secret invalidSignatureReq <- signRequest cfg (Secret "wJalrXUtnFEMI") hmacReq { requestHeaders = ("x-auth-key", key1) : head...
480
caseHmacInvalidSignature :: Assertion caseHmacInvalidSignature = do -- test hmac authenticaation -- invalid secret invalidSignatureReq <- signRequest cfg (Secret "wJalrXUtnFEMI") hmacReq { requestHeaders = ("x-auth-key", key1) : head...
480
caseHmacInvalidSignature = do -- test hmac authenticaation -- invalid secret invalidSignatureReq <- signRequest cfg (Secret "wJalrXUtnFEMI") hmacReq { requestHeaders = ("x-auth-key", key1) : headers } ...
442
false
true
0
13
174
86
41
45
null
null
olorin/amazonka
gen/src/Gen/AST/Data/Syntax.hs
mpl-2.0
fromXMLD :: Protocol -> Id -> [Field] -> Decl fromXMLD p n = decodeD "FromXML" n "parseXML" (ctorE n) . map (parseXMLE p)
121
fromXMLD :: Protocol -> Id -> [Field] -> Decl fromXMLD p n = decodeD "FromXML" n "parseXML" (ctorE n) . map (parseXMLE p)
121
fromXMLD p n = decodeD "FromXML" n "parseXML" (ctorE n) . map (parseXMLE p)
75
false
true
0
8
22
63
30
33
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getLightColorStream :: KRPCHS.SpaceCenter.Light -> RPCContext (KRPCStream ((Float, Float, Float))) getLightColorStream thisArg = requestStream $ getLightColorStreamReq thisArg
175
getLightColorStream :: KRPCHS.SpaceCenter.Light -> RPCContext (KRPCStream ((Float, Float, Float))) getLightColorStream thisArg = requestStream $ getLightColorStreamReq thisArg
175
getLightColorStream thisArg = requestStream $ getLightColorStreamReq thisArg
76
false
true
0
11
15
53
27
26
null
null
reiddraper/cauterize
src/Cauterize/Common/ParserUtils.hs
bsd-3-clause
parseSchemaVersion :: Parser T.Text parseSchemaVersion = parseManyStartingWith start rest where start = ['a'..'z'] ++ ['0'..'9'] rest = start ++ "_.-"
160
parseSchemaVersion :: Parser T.Text parseSchemaVersion = parseManyStartingWith start rest where start = ['a'..'z'] ++ ['0'..'9'] rest = start ++ "_.-"
160
parseSchemaVersion = parseManyStartingWith start rest where start = ['a'..'z'] ++ ['0'..'9'] rest = start ++ "_.-"
124
false
true
0
6
29
52
27
25
null
null
lukexi/ghc
compiler/codeGen/StgCmmUtils.hs
bsd-3-clause
-- ToDo: seems terribly indirect! mkSimpleLit :: DynFlags -> Literal -> CmmLit mkSimpleLit dflags (MachChar c) = CmmInt (fromIntegral (ord c)) (wordWidth dflags)
167
mkSimpleLit :: DynFlags -> Literal -> CmmLit mkSimpleLit dflags (MachChar c) = CmmInt (fromIntegral (ord c)) (wordWidth dflags)
132
mkSimpleLit dflags (MachChar c) = CmmInt (fromIntegral (ord c)) (wordWidth dflags)
87
true
true
0
9
28
54
27
27
null
null
AlephAlpha/Samau
OldSamau/Eval.hs
gpl-2.0
smHead (SmString (x:xs):s) = SmChar x:s
39
smHead (SmString (x:xs):s) = SmChar x:s
39
smHead (SmString (x:xs):s) = SmChar x:s
39
false
false
0
10
5
33
16
17
null
null
sdiehl/ghc
compiler/prelude/THNames.hs
bsd-3-clause
injAnnTyConName = thTc (fsLit "InjectivityAnn") injAnnTyConKey
69
injAnnTyConName = thTc (fsLit "InjectivityAnn") injAnnTyConKey
69
injAnnTyConName = thTc (fsLit "InjectivityAnn") injAnnTyConKey
69
false
false
0
7
12
17
8
9
null
null
pparkkin/eta
shake/Build.hs
bsd-3-clause
topologicalDepsSort :: [String] -> (String -> [String]) -> [String] topologicalDepsSort xs deps = sort' xs [] where sort' [] ys = reverse ys sort' xs' ys = sort' xs2 (xs1 ++ ys) where (xs1, xs2) = partition (all (`elem` ys) . deps) xs' -- * Building boot libraries
282
topologicalDepsSort :: [String] -> (String -> [String]) -> [String] topologicalDepsSort xs deps = sort' xs [] where sort' [] ys = reverse ys sort' xs' ys = sort' xs2 (xs1 ++ ys) where (xs1, xs2) = partition (all (`elem` ys) . deps) xs' -- * Building boot libraries
282
topologicalDepsSort xs deps = sort' xs [] where sort' [] ys = reverse ys sort' xs' ys = sort' xs2 (xs1 ++ ys) where (xs1, xs2) = partition (all (`elem` ys) . deps) xs' -- * Building boot libraries
214
false
true
1
11
65
121
65
56
null
null
c19/Exercism-Haskell
secret-handshake/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_secret_handshake.hs
mit
datadir = "/Users/c19/Documents/projects/exercism/haskell/haskell/secret-handshake/.stack-work/install/x86_64-osx/lts-8.21/8.0.2/share/x86_64-osx-ghc-8.0.2/secret-handshake-1.0.0.3"
184
datadir = "/Users/c19/Documents/projects/exercism/haskell/haskell/secret-handshake/.stack-work/install/x86_64-osx/lts-8.21/8.0.2/share/x86_64-osx-ghc-8.0.2/secret-handshake-1.0.0.3"
184
datadir = "/Users/c19/Documents/projects/exercism/haskell/haskell/secret-handshake/.stack-work/install/x86_64-osx/lts-8.21/8.0.2/share/x86_64-osx-ghc-8.0.2/secret-handshake-1.0.0.3"
184
false
false
1
5
5
10
3
7
null
null
freebsd-haskell/hsporter
Distribution/FreeBSD/Port.hs
bsd-3-clause
findGPLVersion :: String -> String findGPLVersion = DT.unpack . DT.take 1 . (!! 1) . DT.words . snd . DT.breakOn (DT.toUpper $ DT.pack "Version ") . DT.toUpper . DT.pack
179
findGPLVersion :: String -> String findGPLVersion = DT.unpack . DT.take 1 . (!! 1) . DT.words . snd . DT.breakOn (DT.toUpper $ DT.pack "Version ") . DT.toUpper . DT.pack
179
findGPLVersion = DT.unpack . DT.take 1 . (!! 1) . DT.words . snd . DT.breakOn (DT.toUpper $ DT.pack "Version ") . DT.toUpper . DT.pack
144
false
true
6
9
38
92
41
51
null
null
intolerable/GroupProject
src/Emulator/CPU/Instructions/THUMB/Parser.hs
bsd-2-clause
readPCRelativeLoad :: HalfWord -> THUMBInstruction readPCRelativeLoad w = PCRelativeLoad dest offset where dest = RegisterName $ fromIntegral $ $(bitmask 10 8) w offset = fromIntegral $ (w .&. 0xFF) `shiftL` 2
219
readPCRelativeLoad :: HalfWord -> THUMBInstruction readPCRelativeLoad w = PCRelativeLoad dest offset where dest = RegisterName $ fromIntegral $ $(bitmask 10 8) w offset = fromIntegral $ (w .&. 0xFF) `shiftL` 2
219
readPCRelativeLoad w = PCRelativeLoad dest offset where dest = RegisterName $ fromIntegral $ $(bitmask 10 8) w offset = fromIntegral $ (w .&. 0xFF) `shiftL` 2
168
false
true
2
9
40
80
37
43
null
null
acowley/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
hsLTyVarLocNames :: LHsTyVarBndrs name -> [Located name] hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvBndrs qtvs)
118
hsLTyVarLocNames :: LHsTyVarBndrs name -> [Located name] hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvBndrs qtvs)
118
hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvBndrs qtvs)
61
false
true
0
7
13
38
18
20
null
null
massudaw/mtk
Solver/testrk.hs
bsd-3-clause
gen_soln1 stepr t st = let (tn,stn) = stepr (t,st) in if t >= 5.0 then putStrLn (showst t st) else gen_soln1 stepr tn stn
141
gen_soln1 stepr t st = let (tn,stn) = stepr (t,st) in if t >= 5.0 then putStrLn (showst t st) else gen_soln1 stepr tn stn
141
gen_soln1 stepr t st = let (tn,stn) = stepr (t,st) in if t >= 5.0 then putStrLn (showst t st) else gen_soln1 stepr tn stn
141
false
false
1
10
44
76
35
41
null
null
markus1189/xmonad-contrib-710
XMonad/Layout/Magnifier.hs
bsd-3-clause
-- | Increase the size of the window that has focus, unless if it is the -- master window. magnifier' :: l a -> ModifiedLayout Magnifier l a magnifier' = ModifiedLayout (Mag (1.5,1.5) On NoMaster)
196
magnifier' :: l a -> ModifiedLayout Magnifier l a magnifier' = ModifiedLayout (Mag (1.5,1.5) On NoMaster)
105
magnifier' = ModifiedLayout (Mag (1.5,1.5) On NoMaster)
55
true
true
0
8
34
51
25
26
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkOverridingPath _ (T_SimpleCommand _ vars []) = mapM_ checkVar vars where checkVar (T_Assignment id Assign "PATH" Nothing word) = let string = concat $ deadSimple word in unless (any (`isInfixOf` string) ["/bin", "/sbin" ]) $ do when ('/' `elem` string && ':' `notElem` string) ...
532
checkOverridingPath _ (T_SimpleCommand _ vars []) = mapM_ checkVar vars where checkVar (T_Assignment id Assign "PATH" Nothing word) = let string = concat $ deadSimple word in unless (any (`isInfixOf` string) ["/bin", "/sbin" ]) $ do when ('/' `elem` string && ':' `notElem` string) ...
532
checkOverridingPath _ (T_SimpleCommand _ vars []) = mapM_ checkVar vars where checkVar (T_Assignment id Assign "PATH" Nothing word) = let string = concat $ deadSimple word in unless (any (`isInfixOf` string) ["/bin", "/sbin" ]) $ do when ('/' `elem` string && ':' `notElem` string) ...
532
false
false
2
18
138
195
99
96
null
null
gnn/Hets
OWL2/Parse.hs
gpl-2.0
-- creating the facet-value pairs facetValuePair :: CharParser st (ConstrainingFacet, RestrictionValue) facetValuePair = do df <- choice $ map (\ f -> keyword (showFacet f) >> return f) [ LENGTH , MINLENGTH , MAXLENGTH , PATTERN , TOTALDIGITS , FRACTIONDIGITS ] ++ map (\ f ->...
609
facetValuePair :: CharParser st (ConstrainingFacet, RestrictionValue) facetValuePair = do df <- choice $ map (\ f -> keyword (showFacet f) >> return f) [ LENGTH , MINLENGTH , MAXLENGTH , PATTERN , TOTALDIGITS , FRACTIONDIGITS ] ++ map (\ f -> keywordNotFollowedBy (showFacet f...
575
facetValuePair = do df <- choice $ map (\ f -> keyword (showFacet f) >> return f) [ LENGTH , MINLENGTH , MAXLENGTH , PATTERN , TOTALDIGITS , FRACTIONDIGITS ] ++ map (\ f -> keywordNotFollowedBy (showFacet f) (oneOf "<>=") >> return f) [ MININCLUSIVE ...
505
true
true
0
16
165
157
83
74
null
null
xekoukou/idris-malfunction
src/IRTS/CodegenMalfunction.hs
mit
cgOp (LIntCh _) [x] = cgVar x
29
cgOp (LIntCh _) [x] = cgVar x
29
cgOp (LIntCh _) [x] = cgVar x
29
false
false
0
7
6
23
11
12
null
null
emilaxelsson/compass
src/Language/Embedded/Constructs.hs
bsd-3-clause
showVar :: Name -> String showVar v = 'v' : show v
50
showVar :: Name -> String showVar v = 'v' : show v
50
showVar v = 'v' : show v
24
false
true
0
6
11
25
12
13
null
null
markuspf/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
irSC top vs (UnmatchedCase str) = return $ LError str
53
irSC top vs (UnmatchedCase str) = return $ LError str
53
irSC top vs (UnmatchedCase str) = return $ LError str
53
false
false
0
7
9
26
12
14
null
null
jmikkola/Athena
src/Inference.hs
mit
isRight _ = False
25
isRight _ = False
25
isRight _ = False
25
false
false
0
5
11
9
4
5
null
null
travitch/llvm-base-types
src/Data/LLVM/Types/Dwarf.hs
bsd-3-clause
dw_tag 0x33 = return DW_TAG_variant_part
40
dw_tag 0x33 = return DW_TAG_variant_part
40
dw_tag 0x33 = return DW_TAG_variant_part
40
false
false
1
5
4
15
5
10
null
null
I3ck/HGE2D
src/HGE2D/Geometry.hs
mit
makeRB :: RealPosition -> Velocity -> Pixel -> Pixel -> RigidBody makeRB center vel width height = RigidBody { rigidPos = center, rigidVel = vel, rigidBB = sizedBB center width height }
185
makeRB :: RealPosition -> Velocity -> Pixel -> Pixel -> RigidBody makeRB center vel width height = RigidBody { rigidPos = center, rigidVel = vel, rigidBB = sizedBB center width height }
185
makeRB center vel width height = RigidBody { rigidPos = center, rigidVel = vel, rigidBB = sizedBB center width height }
119
false
true
0
8
31
70
35
35
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
stDiskless :: String stDiskless = Types.storageTypeToRaw StorageDiskless
72
stDiskless :: String stDiskless = Types.storageTypeToRaw StorageDiskless
72
stDiskless = Types.storageTypeToRaw StorageDiskless
51
false
true
0
6
6
22
9
13
null
null
sw17ch/Scurry
src/Scurry/Data/Packet/Ethernet.hs
bsd-3-clause
-- | Expects a single argument -- a list 6 Word8's long mkMACAddr :: [Word8] -> MACAddr mkMACAddr m = case length m of 6 -> MACAddr m _ -> error "A MACAddr is 6 bytes! No more! No less!" -- | Get the list behind the MACAddr
262
mkMACAddr :: [Word8] -> MACAddr mkMACAddr m = case length m of 6 -> MACAddr m _ -> error "A MACAddr is 6 bytes! No more! No less!" -- | Get the list behind the MACAddr
206
mkMACAddr m = case length m of 6 -> MACAddr m _ -> error "A MACAddr is 6 bytes! No more! No less!" -- | Get the list behind the MACAddr
174
true
true
0
8
86
53
25
28
null
null
amar47shah/summer-2015-haskell-class
Lisp/Parser.hs
mit
parseInert :: Parsec String u () parseInert = ignore $ many (ignore space <|> parseComment)
91
parseInert :: Parsec String u () parseInert = ignore $ many (ignore space <|> parseComment)
91
parseInert = ignore $ many (ignore space <|> parseComment)
58
false
true
0
9
14
37
18
19
null
null
brendanhay/gogol
gogol-firebase-rules/gen/Network/Google/FirebaseRules/Types/Product.hs
mpl-2.0
-- | The mock result of the function call. fmResult :: Lens' FunctionMock (Maybe Result) fmResult = lens _fmResult (\ s a -> s{_fmResult = a})
142
fmResult :: Lens' FunctionMock (Maybe Result) fmResult = lens _fmResult (\ s a -> s{_fmResult = a})
99
fmResult = lens _fmResult (\ s a -> s{_fmResult = a})
53
true
true
0
9
25
46
25
21
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tEncodedListExecInst :: FIXTag tEncodedListExecInst = FIXTag { tName = "EncodedListExecInst" , tnum = 353 , tparser = toFIXData , arbitraryValue = FIXData <$> arbitrary }
183
tEncodedListExecInst :: FIXTag tEncodedListExecInst = FIXTag { tName = "EncodedListExecInst" , tnum = 353 , tparser = toFIXData , arbitraryValue = FIXData <$> arbitrary }
183
tEncodedListExecInst = FIXTag { tName = "EncodedListExecInst" , tnum = 353 , tparser = toFIXData , arbitraryValue = FIXData <$> arbitrary }
152
false
true
0
8
37
45
26
19
null
null
jeremyong/Yaiba
Yaiba/Map.hs
bsd-3-clause
join kx x l Tip = insertMax kx x l
35
join kx x l Tip = insertMax kx x l
35
join kx x l Tip = insertMax kx x l
35
false
false
1
5
10
28
10
18
null
null
jvilar/hrows
lib/Model/Field.hs
gpl-2.0
defaultValue TypeString = AString ""
36
defaultValue TypeString = AString ""
36
defaultValue TypeString = AString ""
36
false
false
0
5
4
12
5
7
null
null
nilthehuman/H-99
Arithmetic.hs
unlicense
primesR :: Integral a => a -> a -> [a] primesR m n = filter isPrime [min m n .. max m n]
88
primesR :: Integral a => a -> a -> [a] primesR m n = filter isPrime [min m n .. max m n]
88
primesR m n = filter isPrime [min m n .. max m n]
49
false
true
0
8
22
55
27
28
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_KEY_DELETE :: Int wxSTC_KEY_DELETE = 308
46
wxSTC_KEY_DELETE :: Int wxSTC_KEY_DELETE = 308
46
wxSTC_KEY_DELETE = 308
22
false
true
0
4
5
11
6
5
null
null
0xfaded/websockets
src/Network/WebSockets.hs
bsd-3-clause
-- | Send some binary data sendBinaryData :: (I.BinaryProtocol p, I.WebSocketsData a) => a -> I.WebSockets p () sendBinaryData = I.send . I.binaryData
165
sendBinaryData :: (I.BinaryProtocol p, I.WebSocketsData a) => a -> I.WebSockets p () sendBinaryData = I.send . I.binaryData
138
sendBinaryData = I.send . I.binaryData
38
true
true
0
8
37
52
27
25
null
null
mumuki/mulang
spec/NormalizerSpec.hs
gpl-3.0
nhs = normalize haskellNormalizationOptions . hs
48
nhs = normalize haskellNormalizationOptions . hs
48
nhs = normalize haskellNormalizationOptions . hs
48
false
false
0
6
5
13
6
7
null
null
fpco/serial-bench
binary-0.4.3.1/tests/NewBinary.hs
bsd-3-clause
getByte :: BinHandle -> IO Word8 getByte = getWord8
51
getByte :: BinHandle -> IO Word8 getByte = getWord8
51
getByte = getWord8
18
false
true
0
7
8
24
10
14
null
null