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
dylanmc/cryptol
sbv/Data/SBV/Bridge/Boolector.hs
bsd-3-clause
isSatisfiable :: Provable a => Maybe Int -- ^ Optional time-out, specify in seconds -> a -- ^ Property to check -> IO (Maybe Bool) -- ^ Returns Nothing if time-out expiers isSatisfiable = isSatisfiableWith sbvCurrentSolver
284
isSatisfiable :: Provable a => Maybe Int -- ^ Optional time-out, specify in seconds -> a -- ^ Property to check -> IO (Maybe Bool) isSatisfiable = isSatisfiableWith sbvCurrentSolver
243
isSatisfiable = isSatisfiableWith sbvCurrentSolver
50
true
true
0
10
97
44
22
22
null
null
kuribas/diagrams-contrib
src/Diagrams/TwoD/Layout/Constrained.hs
bsd-3-clause
-- | Create a variable corresponding to a particular diagram, with a -- given name and type. Not intended to be called by end users. mkDVar :: Num n => DiaID s -> String -> VarType -> Expr s n mkDVar d s ty = MFS.makeVariable (diaVar d s ty)
244
mkDVar :: Num n => DiaID s -> String -> VarType -> Expr s n mkDVar d s ty = MFS.makeVariable (diaVar d s ty)
108
mkDVar d s ty = MFS.makeVariable (diaVar d s ty)
48
true
true
0
9
52
62
30
32
null
null
massysett/quickpull
quickcheck-tests/Tests.hs
bsd-3-clause
genFunction :: Gen (Gen (Int -> Int)) genFunction = do i <- arbitrary :: Gen Int return $ variant i arbitrary
113
genFunction :: Gen (Gen (Int -> Int)) genFunction = do i <- arbitrary :: Gen Int return $ variant i arbitrary
113
genFunction = do i <- arbitrary :: Gen Int return $ variant i arbitrary
75
false
true
0
9
24
52
25
27
null
null
ComputationWithBoundedResources/slogic
src/SLogic/Logic/Matrix.hs
bsd-3-clause
eye :: SSemiRing a => Int -> Matrix a eye d = matrix d d $ \(i,j) -> if i == j then one else zero
97
eye :: SSemiRing a => Int -> Matrix a eye d = matrix d d $ \(i,j) -> if i == j then one else zero
97
eye d = matrix d d $ \(i,j) -> if i == j then one else zero
59
false
true
0
8
25
60
31
29
null
null
JPMoresmau/haddock
haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-2-clause
ppLParendType unicode qual y = ppParendType unicode qual (unLoc y)
66
ppLParendType unicode qual y = ppParendType unicode qual (unLoc y)
66
ppLParendType unicode qual y = ppParendType unicode qual (unLoc y)
66
false
false
0
7
9
26
12
14
null
null
JacquesCarette/literate-scientific-software
code/drasil-lang/Data/Drasil/IdeaDicts.hs
bsd-2-clause
documentc = mkIdea "documentc" (cn' "Document") (Just "Doc")
82
documentc = mkIdea "documentc" (cn' "Document") (Just "Doc")
82
documentc = mkIdea "documentc" (cn' "Document") (Just "Doc")
82
false
false
0
7
29
25
12
13
null
null
tcoenraad/functioneel-programmeren
2014/opg3c.hs
mit
zoekMax :: Tree -> Int zoekMax t = maximum $ allValues t
56
zoekMax :: Tree -> Int zoekMax t = maximum $ allValues t
56
zoekMax t = maximum $ allValues t
33
false
true
0
6
11
25
12
13
null
null
IreneKnapp/direct-opengl
Graphics/Rendering/OpenGL/GL/BufferObjects.hs
bsd-3-clause
vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject) vertexAttribArrayBufferBinding location = makeGettableStateVar $ do buf <- getVertexAttribInteger1 (BufferObject . fromIntegral) location GetVertexAttribArrayBufferBinding return $ if buf == noBufferObject then Noth...
419
vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject) vertexAttribArrayBufferBinding location = makeGettableStateVar $ do buf <- getVertexAttribInteger1 (BufferObject . fromIntegral) location GetVertexAttribArrayBufferBinding return $ if buf == noBufferObject then Noth...
419
vertexAttribArrayBufferBinding location = makeGettableStateVar $ do buf <- getVertexAttribInteger1 (BufferObject . fromIntegral) location GetVertexAttribArrayBufferBinding return $ if buf == noBufferObject then Nothing else Just buf -----------------------------------------------------------------------...
329
false
true
0
11
48
75
37
38
null
null
ambiata/zodiac
zodiac-http-client/test/test-io.hs
bsd-3-clause
main :: IO () main = disorderMain [ Test.IO.Zodiac.HttpClient.TSRP.tests ]
82
main :: IO () main = disorderMain [ Test.IO.Zodiac.HttpClient.TSRP.tests ]
82
main = disorderMain [ Test.IO.Zodiac.HttpClient.TSRP.tests ]
68
false
true
0
7
17
34
17
17
null
null
rfranek/duckling
Duckling/Dimensions.hs
bsd-3-clause
langDimensions JA = JADimensions.allDimensions
46
langDimensions JA = JADimensions.allDimensions
46
langDimensions JA = JADimensions.allDimensions
46
false
false
0
5
3
11
5
6
null
null
DanielSchuessler/hstri
Util.hs
gpl-3.0
wrapException :: String -> a -> a wrapException msg = mapException (\(SomeException e) -> ErrorCall (unlines[msg,"Inner Exception:",show e]))
146
wrapException :: String -> a -> a wrapException msg = mapException (\(SomeException e) -> ErrorCall (unlines[msg,"Inner Exception:",show e]))
146
wrapException msg = mapException (\(SomeException e) -> ErrorCall (unlines[msg,"Inner Exception:",show e]))
112
false
true
0
12
22
60
31
29
null
null
thinkmoore/influence-checker
src/Main.hs
mit
main :: IO () main = do args <- getArgs cmd <- parseFile $ head args prettyPrint cmd
96
main :: IO () main = do args <- getArgs cmd <- parseFile $ head args prettyPrint cmd
96
main = do args <- getArgs cmd <- parseFile $ head args prettyPrint cmd
82
false
true
0
10
29
49
20
29
null
null
brendanhay/gogol
gogol-dlp/gen/Network/Google/DLP/Types/Product.hs
mpl-2.0
-- | Quasi-identifier values defining the k-anonymity equivalence class. The -- order is always the same as the original request. gpdvldecQuasiIdsValues :: Lens' GooglePrivacyDlpV2LDiversityEquivalenceClass [GooglePrivacyDlpV2Value] gpdvldecQuasiIdsValues = lens _gpdvldecQuasiIdsValues (\ s a -> s{_gpdvldecQuas...
369
gpdvldecQuasiIdsValues :: Lens' GooglePrivacyDlpV2LDiversityEquivalenceClass [GooglePrivacyDlpV2Value] gpdvldecQuasiIdsValues = lens _gpdvldecQuasiIdsValues (\ s a -> s{_gpdvldecQuasiIdsValues = a}) . _Default . _Coerce
239
gpdvldecQuasiIdsValues = lens _gpdvldecQuasiIdsValues (\ s a -> s{_gpdvldecQuasiIdsValues = a}) . _Default . _Coerce
136
true
true
0
11
59
54
29
25
null
null
begriffs/haskell-vim-now
scripts/setup_haskell.hs
mit
gitCloneInstall :: MonadIO m => HelperRepository -> HelperTool -> Maybe Resolver -> m () gitCloneInstall repo tool maybeResolver = Turtle.sh $ do liftIO $ msg (unwords' ["clone", repo, "and install", tool]) tmp <- liftIO getTemporaryDirectory >>= return . decodeString Turtle.mktempdir tmp hvn >>= Turtle.pushd i...
861
gitCloneInstall :: MonadIO m => HelperRepository -> HelperTool -> Maybe Resolver -> m () gitCloneInstall repo tool maybeResolver = Turtle.sh $ do liftIO $ msg (unwords' ["clone", repo, "and install", tool]) tmp <- liftIO getTemporaryDirectory >>= return . decodeString Turtle.mktempdir tmp hvn >>= Turtle.pushd i...
861
gitCloneInstall repo tool maybeResolver = Turtle.sh $ do liftIO $ msg (unwords' ["clone", repo, "and install", tool]) tmp <- liftIO getTemporaryDirectory >>= return . decodeString Turtle.mktempdir tmp hvn >>= Turtle.pushd inShell (unwords' ["git clone", repo, tool]) Turtle.pushd (textToFilePath tool) inShel...
772
false
true
2
15
201
300
146
154
null
null
danfran/hcoord
src/OSRef.hs
bsd-3-clause
-- ^ A eight-figure representation this OSGB grid reference i.e XY12345678 scaleFactor, falseOriginLatitude, falseOriginLongitude, falseOriginEasting, falseOriginNorthing :: Double scaleFactor = 0.9996012717
209
scaleFactor, falseOriginLatitude, falseOriginLongitude, falseOriginEasting, falseOriginNorthing :: Double scaleFactor = 0.9996012717
132
scaleFactor = 0.9996012717
26
true
true
3
5
22
28
15
13
null
null
robrix/surface
src/Surface/Proof.hs
bsd-3-clause
runProof :: HasCallStack => Proof s a -> Either [String] a runProof = flip runAll initialState
94
runProof :: HasCallStack => Proof s a -> Either [String] a runProof = flip runAll initialState
94
runProof = flip runAll initialState
35
false
true
0
8
15
38
18
20
null
null
Peaker/lamdu
src/Lamdu/Sugar/Convert/Input.hs
gpl-3.0
inferredTypeUVar :: Lens' (Payload m a # V.Term) (UVar # Type) inferredTypeUVar = inferRes . inferResult . _2
109
inferredTypeUVar :: Lens' (Payload m a # V.Term) (UVar # Type) inferredTypeUVar = inferRes . inferResult . _2
109
inferredTypeUVar = inferRes . inferResult . _2
46
false
true
0
9
17
51
24
27
null
null
kaizhang/SciFlow
SciFlow/src/Control/Workflow/DataStore.hs
mit
-- | Close the store and release resource. closeStore :: MonadIO m => DataStore -> m () closeStore (DataStore s) = liftIO $ withMVar s close
140
closeStore :: MonadIO m => DataStore -> m () closeStore (DataStore s) = liftIO $ withMVar s close
97
closeStore (DataStore s) = liftIO $ withMVar s close
52
true
true
0
8
25
46
22
24
null
null
FranklinChen/monadiccp
Control/CP/FD/Decompose.hs
bsd-3-clause
newVar :: EGVarType -> DCMonad EGVarId newVar typ = do s <- get let (nv,nm) = addNode typ (dcsModel s) put $ s { dcsModel = nm } return nv
146
newVar :: EGVarType -> DCMonad EGVarId newVar typ = do s <- get let (nv,nm) = addNode typ (dcsModel s) put $ s { dcsModel = nm } return nv
146
newVar typ = do s <- get let (nv,nm) = addNode typ (dcsModel s) put $ s { dcsModel = nm } return nv
107
false
true
0
12
37
76
36
40
null
null
MarcusVoelker/MuCurse
LParse.hs
mit
parse :: Parser r a -> String -> (a -> r) -> (String -> r) -> r parse p s btr = run (pFunc p s) (btr . fst)
107
parse :: Parser r a -> String -> (a -> r) -> (String -> r) -> r parse p s btr = run (pFunc p s) (btr . fst)
107
parse p s btr = run (pFunc p s) (btr . fst)
43
false
true
0
10
28
73
37
36
null
null
skingo/kernel_category
src/KernelCategory.hs
bsd-3-clause
isMorph :: (FinMonoid m, FinMonoid n) => (m -> n) -> Bool isMorph = isRelMorph . morphToRelMorph
96
isMorph :: (FinMonoid m, FinMonoid n) => (m -> n) -> Bool isMorph = isRelMorph . morphToRelMorph
96
isMorph = isRelMorph . morphToRelMorph
38
false
true
0
8
16
41
22
19
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | Exactly one of step or steps_location should be specified. The top-level -- steps that constitute the entire job. Only retrieved with JOB_VIEW_ALL. jSteps :: Lens' Job [Step] jSteps = lens _jSteps (\ s a -> s{_jSteps = a}) . _Default . _Coerce
256
jSteps :: Lens' Job [Step] jSteps = lens _jSteps (\ s a -> s{_jSteps = a}) . _Default . _Coerce
103
jSteps = lens _jSteps (\ s a -> s{_jSteps = a}) . _Default . _Coerce
76
true
true
0
11
51
54
29
25
null
null
athanclark/tries
src/Data/Trie/HashMap.hs
bsd-3-clause
keys :: ( Hashable p , Eq p ) => HashMapTrie p a -> [NonEmpty p] keys (HashMapTrie (HashMapStep xs)) = let ks = HM.keys xs in F.concatMap go ks where go k = let (HashMapChildren _ mxs) = fromJust (HM.lookup k xs) in case mxs of Nothing -> [] Just ...
351
keys :: ( Hashable p , Eq p ) => HashMapTrie p a -> [NonEmpty p] keys (HashMapTrie (HashMapStep xs)) = let ks = HM.keys xs in F.concatMap go ks where go k = let (HashMapChildren _ mxs) = fromJust (HM.lookup k xs) in case mxs of Nothing -> [] Just ...
351
keys (HashMapTrie (HashMapStep xs)) = let ks = HM.keys xs in F.concatMap go ks where go k = let (HashMapChildren _ mxs) = fromJust (HM.lookup k xs) in case mxs of Nothing -> [] Just xs' -> NE.cons k <$> keys xs'
270
false
true
0
12
132
160
74
86
null
null
pairyo/elm-compiler
src/Canonicalize/Variable.hs
bsd-3-clause
qualifiedToString :: (ModuleName.Raw, String) -> String qualifiedToString (modul, name) = ModuleName.toString modul ++ "." ++ name
132
qualifiedToString :: (ModuleName.Raw, String) -> String qualifiedToString (modul, name) = ModuleName.toString modul ++ "." ++ name
132
qualifiedToString (modul, name) = ModuleName.toString modul ++ "." ++ name
76
false
true
0
8
17
45
24
21
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | Templates for which we don't perform checks on free space dtsNoFreeSpaceCheck :: FrozenSet String dtsNoFreeSpaceCheck = ConstantUtils.mkSet $ map Types.diskTemplateToRaw [DTExt, DTSharedFile, DTFile, DTRbd, DTGluster]
226
dtsNoFreeSpaceCheck :: FrozenSet String dtsNoFreeSpaceCheck = ConstantUtils.mkSet $ map Types.diskTemplateToRaw [DTExt, DTSharedFile, DTFile, DTRbd, DTGluster]
163
dtsNoFreeSpaceCheck = ConstantUtils.mkSet $ map Types.diskTemplateToRaw [DTExt, DTSharedFile, DTFile, DTRbd, DTGluster]
123
true
true
3
6
30
48
24
24
null
null
MasseR/irc-ui
src/Data/IRC.hs
bsd-3-clause
toIRC (OutboundPong msg) = encodeIRC msg
40
toIRC (OutboundPong msg) = encodeIRC msg
40
toIRC (OutboundPong msg) = encodeIRC msg
40
false
false
0
6
5
19
8
11
null
null
tolysz/sqlite-simple-typed
example/src/Main.hs
bsd-3-clause
ns3 = let s = "test string scoped" in $(genTypedQuery [qq| INSERT INTO test ( str -- String -- < s ) |] ) =<< open "test.db"
168
ins3 = let s = "test string scoped" in $(genTypedQuery [qq| INSERT INTO test ( str -- String -- < s ) |] ) =<< open "test.db"
168
ins3 = let s = "test string scoped" in $(genTypedQuery [qq| INSERT INTO test ( str -- String -- < s ) |] ) =<< open "test.db"
168
false
false
1
10
70
38
18
20
null
null
GaloisInc/galua
galua-rts/src/Galua/Util/Loc.hs
mit
-- | Update the locatinos with the given function. updLoc :: Loc Sets a b x y -> (a -> b) -> x -> y updLoc l f x = y where I y = l (I . f) x
144
updLoc :: Loc Sets a b x y -> (a -> b) -> x -> y updLoc l f x = y where I y = l (I . f) x
93
updLoc l f x = y where I y = l (I . f) x
44
true
true
0
8
43
71
36
35
null
null
MichaelMackus/hsrl
RL/UI/Sprite.hs
mit
isWall :: Tile -> Bool isWall Rock = True
41
isWall :: Tile -> Bool isWall Rock = True
41
isWall Rock = True
18
false
true
0
5
8
18
9
9
null
null
marcinmrotek/repa-linear-algebra
src/Numeric/LinearAlgebra/Repa.hs
bsd-3-clause
corr2PIO :: (Product t, Numeric t) => Array F DIM2 t -> Array D DIM2 t -> IO (Array F DIM2 t) corr2PIO k = fmap (hm2repa . H.corr2 (repa2hm k)) . repa2hmPIO
156
corr2PIO :: (Product t, Numeric t) => Array F DIM2 t -> Array D DIM2 t -> IO (Array F DIM2 t) corr2PIO k = fmap (hm2repa . H.corr2 (repa2hm k)) . repa2hmPIO
156
corr2PIO k = fmap (hm2repa . H.corr2 (repa2hm k)) . repa2hmPIO
62
false
true
0
11
32
94
44
50
null
null
ezyang/ghc
utils/testremove/checkremove.hs
bsd-3-clause
toFilePathFragments :: FilePath -> [FilePathFragment] toFilePathFragments = map (FilePathFragment . BSC.pack) . splitDirectories . normalise
144
toFilePathFragments :: FilePath -> [FilePathFragment] toFilePathFragments = map (FilePathFragment . BSC.pack) . splitDirectories . normalise
144
toFilePathFragments = map (FilePathFragment . BSC.pack) . splitDirectories . normalise
90
false
true
0
10
18
41
20
21
null
null
edsko/hackage-server
tests/HackageClientUtils.hs
bsd-3-clause
getGroup :: String -> IO Group getGroup url = getUrl NoAuth url >>= decodeJSON
78
getGroup :: String -> IO Group getGroup url = getUrl NoAuth url >>= decodeJSON
78
getGroup url = getUrl NoAuth url >>= decodeJSON
47
false
true
0
6
13
30
14
16
null
null
goldfirere/singletons
singletons-th/src/Data/Singletons/TH/Promote.hs
bsd-3-clause
promotePat (DVarP name) = do -- term vars can be symbols... type vars can't! tyName <- mkTyName name tell $ PromDPatInfos [(name, tyName)] OSet.empty return (DVarT tyName, ADVarP name)
196
promotePat (DVarP name) = do -- term vars can be symbols... type vars can't! tyName <- mkTyName name tell $ PromDPatInfos [(name, tyName)] OSet.empty return (DVarT tyName, ADVarP name)
196
promotePat (DVarP name) = do -- term vars can be symbols... type vars can't! tyName <- mkTyName name tell $ PromDPatInfos [(name, tyName)] OSet.empty return (DVarT tyName, ADVarP name)
196
false
false
0
10
40
67
32
35
null
null
danstiner/clod
src/Ref.hs
mit
createId :: String -> Ref.Id createId name = String name
56
createId :: String -> Ref.Id createId name = String name
56
createId name = String name
27
false
true
0
6
9
23
11
12
null
null
urv/fixhs
src/Data/FIX/Spec/FIX40.hs
lgpl-2.1
tAllocAccount :: FIXTag tAllocAccount = FIXTag { tName = "AllocAccount" , tnum = 79 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
164
tAllocAccount :: FIXTag tAllocAccount = FIXTag { tName = "AllocAccount" , tnum = 79 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
164
tAllocAccount = FIXTag { tName = "AllocAccount" , tnum = 79 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
140
false
true
0
10
38
57
30
27
null
null
keithodulaigh/Hets
OWL2/AS.hs
gpl-2.0
negDec :: Bool -> DecLit -> DecLit negDec b (DecLit t f) = DecLit (if b then negInt t else t) f
95
negDec :: Bool -> DecLit -> DecLit negDec b (DecLit t f) = DecLit (if b then negInt t else t) f
95
negDec b (DecLit t f) = DecLit (if b then negInt t else t) f
60
false
true
0
10
21
57
27
30
null
null
JPMoresmau/BuildWrapper
src/Language/Haskell/BuildWrapper/GHC.hs
bsd-3-clause
ghcLIEToUsage df tpkg tmod tsection (L src (IEThingAbs nm))=[ghcNameToUsage df tpkg tmod tsection nm src True ]
111
ghcLIEToUsage df tpkg tmod tsection (L src (IEThingAbs nm))=[ghcNameToUsage df tpkg tmod tsection nm src True ]
111
ghcLIEToUsage df tpkg tmod tsection (L src (IEThingAbs nm))=[ghcNameToUsage df tpkg tmod tsection nm src True ]
111
false
false
0
9
16
52
24
28
null
null
ZjMNZHgG5jMXw/privacy-option
Semantics/POL/Valuation.hs
bsd-3-clause
valuate (Or c1 c2) = liftM2 max (valuate c1) (valuate c2)
60
valuate (Or c1 c2) = liftM2 max (valuate c1) (valuate c2)
60
valuate (Or c1 c2) = liftM2 max (valuate c1) (valuate c2)
60
false
false
0
7
13
36
17
19
null
null
csabahruska/q3demo
src/Q3Demo/Loader/BSP.hs
bsd-3-clause
getVisibility l = do nvecs <- getInt szvecs <- getInt vecs <- getByteString $ nvecs * szvecs return $ Visibility nvecs szvecs $ V.fromList $ SB8.unpack vecs
178
getVisibility l = do nvecs <- getInt szvecs <- getInt vecs <- getByteString $ nvecs * szvecs return $ Visibility nvecs szvecs $ V.fromList $ SB8.unpack vecs
178
getVisibility l = do nvecs <- getInt szvecs <- getInt vecs <- getByteString $ nvecs * szvecs return $ Visibility nvecs szvecs $ V.fromList $ SB8.unpack vecs
178
false
false
0
10
48
65
29
36
null
null
mostalive/yesod-splittest
fay/Fay/Node.hs
mit
exit :: Int -> Fay () exit = ffi "process.exit(%1)"
51
exit :: Int -> Fay () exit = ffi "process.exit(%1)"
51
exit = ffi "process.exit(%1)"
29
false
true
0
8
9
29
12
17
null
null
yihuang/cabal-install
Distribution/Client/Targets.hs
bsd-3-clause
extraPackageNameEnv :: [PackageName] -> PackageNameEnv extraPackageNameEnv names = PackageNameEnv pkgNameLookup where pkgNameLookup (PackageName name) = [ PackageName name' | let lname = lowercase name , PackageName name' <- names , lowercase name' == lname ]
289
extraPackageNameEnv :: [PackageName] -> PackageNameEnv extraPackageNameEnv names = PackageNameEnv pkgNameLookup where pkgNameLookup (PackageName name) = [ PackageName name' | let lname = lowercase name , PackageName name' <- names , lowercase name' == lname ]
289
extraPackageNameEnv names = PackageNameEnv pkgNameLookup where pkgNameLookup (PackageName name) = [ PackageName name' | let lname = lowercase name , PackageName name' <- names , lowercase name' == lname ]
234
false
true
0
10
64
82
39
43
null
null
christiaanb/ghc
compiler/cmm/PprC.hs
bsd-3-clause
pprWordArray :: CLabel -> [CmmStatic] -> SDoc pprWordArray lbl ds = sdocWithDynFlags $ \dflags -> hcat [ pprLocalness lbl, ptext (sLit "StgWord") , space, ppr lbl, ptext (sLit "[] = {") ] $$ nest 8 (commafy (pprStatics dflags ds)) $$ ptext (sLit "};")
274
pprWordArray :: CLabel -> [CmmStatic] -> SDoc pprWordArray lbl ds = sdocWithDynFlags $ \dflags -> hcat [ pprLocalness lbl, ptext (sLit "StgWord") , space, ppr lbl, ptext (sLit "[] = {") ] $$ nest 8 (commafy (pprStatics dflags ds)) $$ ptext (sLit "};")
274
pprWordArray lbl ds = sdocWithDynFlags $ \dflags -> hcat [ pprLocalness lbl, ptext (sLit "StgWord") , space, ppr lbl, ptext (sLit "[] = {") ] $$ nest 8 (commafy (pprStatics dflags ds)) $$ ptext (sLit "};")
228
false
true
6
8
65
124
58
66
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M01/D16/Solution.hs
mit
{-- *Y2017.M01.D16.Solution> gtfo ellisto ~> Just 6 *Y2017.M01.D16.Solution> anyAF (> 5) ellisto ~> True *Y2017.M01.D16.Solution> let thats_a_neg = anyAF (< 0) *Y2017.M01.D16.Solution> thats_a_neg ellisto ~> False --} -- Now, do similar work for all: define all in terms of hoBool, First, and find allAF :: Traversable...
392
allAF :: Traversable f => (a -> Bool) -> f a -> Bool allAF f = not . hoBool . find (not . f)
92
allAF f = not . hoBool . find (not . f)
39
true
true
0
8
68
59
30
29
null
null
DrSLDR/logoff
src/Logoff.hs
mit
buCombinePairCoerce (t:ts) pt = case buCoerce t pt of (Just pt) -> Just (pt, t) Nothing -> buCombinePairCoerce ts pt -- buCombinePairStitch - Stitches the right tree into the left where the right -- left tree has an insertion sequent of the given type
256
buCombinePairCoerce (t:ts) pt = case buCoerce t pt of (Just pt) -> Just (pt, t) Nothing -> buCombinePairCoerce ts pt -- buCombinePairStitch - Stitches the right tree into the left where the right -- left tree has an insertion sequent of the given type
256
buCombinePairCoerce (t:ts) pt = case buCoerce t pt of (Just pt) -> Just (pt, t) Nothing -> buCombinePairCoerce ts pt -- buCombinePairStitch - Stitches the right tree into the left where the right -- left tree has an insertion sequent of the given type
256
false
false
3
7
48
61
31
30
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The monitoring information for the instance. insMonitoring :: Lens' Instance Monitoring insMonitoring = lens _insMonitoring (\ s a -> s{_insMonitoring = a})
161
insMonitoring :: Lens' Instance Monitoring insMonitoring = lens _insMonitoring (\ s a -> s{_insMonitoring = a})
111
insMonitoring = lens _insMonitoring (\ s a -> s{_insMonitoring = a})
68
true
true
0
9
23
40
22
18
null
null
sinelaw/lamdu
Lamdu/Sugar/Convert/Apply.hs
gpl-3.0
typeCheckIdentityAt :: (MonadA m, Typeable1 m) => Infer.Node (DefIM m) -> SugarM m Bool typeCheckIdentityAt point = do sugarContext <- SugarM.readContext SugarM.liftCTransaction $ Lens.has Lens._Just <$> (runMaybeT . (`runStateT` (sugarContext ^. SugarM.scHoleInferContext))) (SugarInfer.memoLoadInfe...
584
typeCheckIdentityAt :: (MonadA m, Typeable1 m) => Infer.Node (DefIM m) -> SugarM m Bool typeCheckIdentityAt point = do sugarContext <- SugarM.readContext SugarM.liftCTransaction $ Lens.has Lens._Just <$> (runMaybeT . (`runStateT` (sugarContext ^. SugarM.scHoleInferContext))) (SugarInfer.memoLoadInfe...
584
typeCheckIdentityAt point = do sugarContext <- SugarM.readContext SugarM.liftCTransaction $ Lens.has Lens._Just <$> (runMaybeT . (`runStateT` (sugarContext ^. SugarM.scHoleInferContext))) (SugarInfer.memoLoadInfer Nothing identityFunc point) where identityFunc = ExprLens.pureExpr # Exp...
492
false
true
0
14
101
167
84
83
null
null
ExcaliburZero/system-test-haskell
src/Test/SystemTest/Test.hs
mit
showResults (Test testName _ expected) (False, actual) = testName ++ ": Failed\n Expected: " ++ expected ++ "\n Actual: " ++ actual
135
showResults (Test testName _ expected) (False, actual) = testName ++ ": Failed\n Expected: " ++ expected ++ "\n Actual: " ++ actual
135
showResults (Test testName _ expected) (False, actual) = testName ++ ": Failed\n Expected: " ++ expected ++ "\n Actual: " ++ actual
135
false
false
0
8
25
43
22
21
null
null
oldmanmike/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
trueDataConKey = mkPreludeDataConUnique 15
67
trueDataConKey = mkPreludeDataConUnique 15
67
trueDataConKey = mkPreludeDataConUnique 15
67
false
false
0
5
28
9
4
5
null
null
paulrpotts/arctic-slide-haskell
ArcticSlideCore.hs
unlicense
-- In an object-oriented implementation, Walkable, Blocking, -- Movable, and Fixed are subclasses. For the Haskell version -- we just make them predicates and do dispatch that way. -- Different types of tiles have different behaviors depending -- on what they interact with -- for example, the penguin can -- taverse tre...
434
walkable :: Tile -> Bool walkable t = ( t == Empty ) || ( t == Tree )
69
walkable t = ( t == Empty ) || ( t == Tree )
44
true
true
1
7
77
49
27
22
null
null
AndrewRademacher/stack
src/Stack/Setup.hs
bsd-3-clause
getSystemCompiler :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m (Maybe (CompilerVersion, Arch)) getSystemCompiler menv wc = do let exeName = case wc of Ghc -> "ghc" Ghcjs -> "ghcjs" exists <- doesExecutableExist menv exeName i...
1,303
getSystemCompiler :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m) => EnvOverride -> WhichCompiler -> m (Maybe (CompilerVersion, Arch)) getSystemCompiler menv wc = do let exeName = case wc of Ghc -> "ghc" Ghcjs -> "ghcjs" exists <- doesExecutableExist menv exeName i...
1,303
getSystemCompiler menv wc = do let exeName = case wc of Ghc -> "ghc" Ghcjs -> "ghcjs" exists <- doesExecutableExist menv exeName if exists then do eres <- tryProcessStdout Nothing menv exeName ["--info"] let minfo = do Right bs <- J...
1,149
false
true
0
21
476
394
195
199
null
null
amccausl/Swish
Swish/HaskellRDF/GraphTest.hs
lgpl-2.1
mgeq0612 = testGraphEq "g106-g206" True g106 g206
50
mgeq0612 = testGraphEq "g106-g206" True g106 g206
50
mgeq0612 = testGraphEq "g106-g206" True g106 g206
50
false
false
0
5
7
15
7
8
null
null
portnov/xtt
XMonad/TimeTracker/Parser.hs
bsd-3-clause
binaryNot name fun assoc = Infix (try (reservedOp name) >> return (\e1 e2 -> Not (BinOp fun e1 e2))) assoc
106
binaryNot name fun assoc = Infix (try (reservedOp name) >> return (\e1 e2 -> Not (BinOp fun e1 e2))) assoc
106
binaryNot name fun assoc = Infix (try (reservedOp name) >> return (\e1 e2 -> Not (BinOp fun e1 e2))) assoc
106
false
false
1
13
19
65
29
36
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/RemarketingAudience/Patch.hs
mpl-2.0
-- | The ID of the remarketing audience to update. mrapRemarketingAudienceId :: Lens' ManagementRemarketingAudiencePatch Text mrapRemarketingAudienceId = lens _mrapRemarketingAudienceId (\ s a -> s{_mrapRemarketingAudienceId = a})
238
mrapRemarketingAudienceId :: Lens' ManagementRemarketingAudiencePatch Text mrapRemarketingAudienceId = lens _mrapRemarketingAudienceId (\ s a -> s{_mrapRemarketingAudienceId = a})
187
mrapRemarketingAudienceId = lens _mrapRemarketingAudienceId (\ s a -> s{_mrapRemarketingAudienceId = a})
112
true
true
0
9
33
47
23
24
null
null
cdornan/keystore
examples/deploy/Deploy/Deploy.hs
bsd-3-clause
deploy :: IC -> HostID -> IO LBS.ByteString deploy ic h = A.encode . A.Object . HM.fromList <$> mapM (extract ic h) [ k | k<-[minBound..maxBound], maybe True ($ h) $ keyIsHostIndexed k ]
240
deploy :: IC -> HostID -> IO LBS.ByteString deploy ic h = A.encode . A.Object . HM.fromList <$> mapM (extract ic h) [ k | k<-[minBound..maxBound], maybe True ($ h) $ keyIsHostIndexed k ]
240
deploy ic h = A.encode . A.Object . HM.fromList <$> mapM (extract ic h) [ k | k<-[minBound..maxBound], maybe True ($ h) $ keyIsHostIndexed k ]
196
false
true
0
11
87
96
48
48
null
null
nbloomf/carl
src/Carl/Algebra/Ring.hs
gpl-3.0
rIntMeanT :: (Ringoid t, URingoid t, CRingoid t) => t -> [Integer] -> Either AlgErr t rIntMeanT _ = rIntMean
108
rIntMeanT :: (Ringoid t, URingoid t, CRingoid t) => t -> [Integer] -> Either AlgErr t rIntMeanT _ = rIntMean
108
rIntMeanT _ = rIntMean
22
false
true
0
8
19
51
26
25
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Util/RemoteWindows.hs
bsd-2-clause
setRemoteProp :: Window -> String -> X () setRemoteProp w host = do d <- asks display p <- getAtom "XMONAD_REMOTE" t <- getAtom "CARDINAL" v <- hasProperty (Machine host) w io $ changeProperty32 d w p t propModeReplace [fromIntegral . fromEnum $ not v] -- | Given a window,...
594
setRemoteProp :: Window -> String -> X () setRemoteProp w host = do d <- asks display p <- getAtom "XMONAD_REMOTE" t <- getAtom "CARDINAL" v <- hasProperty (Machine host) w io $ changeProperty32 d w p t propModeReplace [fromIntegral . fromEnum $ not v] -- | Given a window,...
594
setRemoteProp w host = do d <- asks display p <- getAtom "XMONAD_REMOTE" t <- getAtom "CARDINAL" v <- hasProperty (Machine host) w io $ changeProperty32 d w p t propModeReplace [fromIntegral . fromEnum $ not v] -- | Given a window, tell if it is a local or a remote process...
552
false
true
0
12
143
121
56
65
null
null
jkpl/tagenerator
src/TaGenerator/TaData.hs
mit
getItem :: Identifier a => TextAdventure -> a -> Maybe Item getItem ta i = identifierLookup i (taItems ta)
106
getItem :: Identifier a => TextAdventure -> a -> Maybe Item getItem ta i = identifierLookup i (taItems ta)
106
getItem ta i = identifierLookup i (taItems ta)
46
false
true
0
9
18
49
22
27
null
null
intolerable/mpi
src/Matrix.hs
bsd-3-clause
diagonal :: Unbox a => Matrix a -> V.Vector a diagonal = M.getDiag . unMatrix
77
diagonal :: Unbox a => Matrix a -> V.Vector a diagonal = M.getDiag . unMatrix
77
diagonal = M.getDiag . unMatrix
31
false
true
0
8
14
36
17
19
null
null
ShabbyX/pit
pit/main.hs
gpl-2.0
mergeMessages :: [[Message]] -> [String] mergeMessages = map showMessage . foldr merge2 []
90
mergeMessages :: [[Message]] -> [String] mergeMessages = map showMessage . foldr merge2 []
90
mergeMessages = map showMessage . foldr merge2 []
49
false
true
0
8
12
44
21
23
null
null
burz/Feval
FVL/EF.hs
mit
alg (Let f [] p e) = letTransform f p e
39
alg (Let f [] p e) = letTransform f p e
39
alg (Let f [] p e) = letTransform f p e
39
false
false
0
7
10
31
14
17
null
null
Athas/Sindre
Sindre/Compiler.hs
mit
descend :: (a -> Compiler m b) -> P a -> Compiler m b descend m (P p v) = local (\s -> s { currentPos = p }) $ m v
114
descend :: (a -> Compiler m b) -> P a -> Compiler m b descend m (P p v) = local (\s -> s { currentPos = p }) $ m v
114
descend m (P p v) = local (\s -> s { currentPos = p }) $ m v
60
false
true
0
10
31
78
39
39
null
null
sbditto85/parsedsltest
src/Algebra.hs
apache-2.0
-- TODO: make interperter interpretAlgebra :: CameraId -> LiveUnitId -> Free Algebra Result -> IO Result interpretAlgebra camId liveUnitId algebra = interpretAlgebraHelper algebra where interpretAlgebraHelper (Free (WithCamera (Ident cameraIdent) next)) = do let identStorage = MAP.singleton cameraIdent (...
1,738
interpretAlgebra :: CameraId -> LiveUnitId -> Free Algebra Result -> IO Result interpretAlgebra camId liveUnitId algebra = interpretAlgebraHelper algebra where interpretAlgebraHelper (Free (WithCamera (Ident cameraIdent) next)) = do let identStorage = MAP.singleton cameraIdent (show camId) interpre...
1,712
interpretAlgebra camId liveUnitId algebra = interpretAlgebraHelper algebra where interpretAlgebraHelper (Free (WithCamera (Ident cameraIdent) next)) = do let identStorage = MAP.singleton cameraIdent (show camId) interpretAlgebraHelper $ next identStorage interpretAlgebraHelper (Free (StringConc...
1,633
true
true
4
20
417
465
220
245
null
null
elitak/frag
src/BSP.hs
gpl-2.0
-- Stores the BSP nodes kNodes :: Int kNodes = 3
61
kNodes :: Int kNodes = 3
35
kNodes = 3
16
true
true
0
6
23
19
8
11
null
null
tweag/network-transport-zeromq
src/Network/Transport/ZMQ/Internal.hs
bsd-3-clause
split :: (Char -> Bool) -> String -> [String] split f = go where go [] = [] go s = case span f s of (p,[]) -> [p] (p,_:ss) -> p:go ss
176
split :: (Char -> Bool) -> String -> [String] split f = go where go [] = [] go s = case span f s of (p,[]) -> [p] (p,_:ss) -> p:go ss
176
split f = go where go [] = [] go s = case span f s of (p,[]) -> [p] (p,_:ss) -> p:go ss
130
false
true
1
10
75
104
54
50
null
null
ingemaradahl/bilder
src/Compiler/Clean.hs
lgpl-3.0
expDeps (ELt el er) = concatMap expDeps [el,er]
47
expDeps (ELt el er) = concatMap expDeps [el,er]
47
expDeps (ELt el er) = concatMap expDeps [el,er]
47
false
false
0
7
7
28
14
14
null
null
MetaMemoryT/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PCase fc t cases) = PCase (f fc) (mapPTermFC f g t) (map (\(l,r) -> (mapPTermFC f g l, mapPTermFC f g r)) cases)
128
mapPTermFC f g (PCase fc t cases) = PCase (f fc) (mapPTermFC f g t) (map (\(l,r) -> (mapPTermFC f g l, mapPTermFC f g r)) cases)
128
mapPTermFC f g (PCase fc t cases) = PCase (f fc) (mapPTermFC f g t) (map (\(l,r) -> (mapPTermFC f g l, mapPTermFC f g r)) cases)
128
false
false
0
11
26
88
45
43
null
null
NorfairKing/haphviz
src/Text/Dot/Attributes/Arrows.hs
mit
invdot :: AttributeValue invdot = "invdot"
42
invdot :: AttributeValue invdot = "invdot"
42
invdot = "invdot"
17
false
true
0
6
5
18
7
11
null
null
ditto/ditto
src/Ditto/Syntax.hs
gpl-3.0
fvRHS :: RHS -> [Name] fvRHS (MapsTo a) = fv a
46
fvRHS :: RHS -> [Name] fvRHS (MapsTo a) = fv a
46
fvRHS (MapsTo a) = fv a
23
false
true
0
7
10
30
15
15
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkBashisms22= verifyNot checkBashisms "[ foo -a bar ]"
62
prop_checkBashisms22= verifyNot checkBashisms "[ foo -a bar ]"
62
prop_checkBashisms22= verifyNot checkBashisms "[ foo -a bar ]"
62
false
false
0
5
7
11
5
6
null
null
ratatosk/traceblade
TraceBlade.hs
bsd-3-clause
checkSyscall :: Int -> BL.ByteString -> Proc () checkSyscall tid sys = do case parseSyscall sys of Left e -> tell [BL.pack $ "### Cannot parse syscall: " ++ e, sys] Right s -> do m <- doMatch tid s case m of Left err -> tell [ BL.pack $ "### Error during evaluation of match expression...
554
checkSyscall :: Int -> BL.ByteString -> Proc () checkSyscall tid sys = do case parseSyscall sys of Left e -> tell [BL.pack $ "### Cannot parse syscall: " ++ e, sys] Right s -> do m <- doMatch tid s case m of Left err -> tell [ BL.pack $ "### Error during evaluation of match expression: " ...
550
checkSyscall tid sys = do case parseSyscall sys of Left e -> tell [BL.pack $ "### Cannot parse syscall: " ++ e, sys] Right s -> do m <- doMatch tid s case m of Left err -> tell [ BL.pack $ "### Error during evaluation of match expression: " ++ err , BL.pack $ "###...
502
false
true
0
22
189
203
96
107
null
null
markus-git/PBKDF2
src/PBKDF2.hs
bsd-3-clause
addBlock :: Block -> Block -> Block addBlock (H a1 b1 c1 d1 e1) (H a2 b2 c2 d2 e2) = H (a1+a2) (b1+b2) (c1+c2) (d1+d2) (e1+e2)
128
addBlock :: Block -> Block -> Block addBlock (H a1 b1 c1 d1 e1) (H a2 b2 c2 d2 e2) = H (a1+a2) (b1+b2) (c1+c2) (d1+d2) (e1+e2)
128
addBlock (H a1 b1 c1 d1 e1) (H a2 b2 c2 d2 e2) = H (a1+a2) (b1+b2) (c1+c2) (d1+d2) (e1+e2)
92
false
true
0
10
28
108
52
56
null
null
mariefarrell/Hets
GMP/Parser.hs
gpl-2.0
-- | Parser for K Modal Logic index parseKindex :: Parser () parseKindex = return ()
84
parseKindex :: Parser () parseKindex = return ()
48
parseKindex = return ()
23
true
true
0
6
15
22
11
11
null
null
jrclogic/SMCDEL
src/SMCDEL/Examples/SimpleK.hs
gpl-2.0
exampleStart :: BelScene exampleStart = (BlS [P 0] law obs, actual) where law = boolBddOf Top obs = M.fromList [ ("1", mvBdd $ boolBddOf Top), ("2", allsamebdd [P 0]) ] actual = [P 0]
195
exampleStart :: BelScene exampleStart = (BlS [P 0] law obs, actual) where law = boolBddOf Top obs = M.fromList [ ("1", mvBdd $ boolBddOf Top), ("2", allsamebdd [P 0]) ] actual = [P 0]
195
exampleStart = (BlS [P 0] law obs, actual) where law = boolBddOf Top obs = M.fromList [ ("1", mvBdd $ boolBddOf Top), ("2", allsamebdd [P 0]) ] actual = [P 0]
170
false
true
0
12
45
95
51
44
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types.hs
mpl-2.0
-- | Manage Google Analytics Account users by email address analyticsManageUsersScope :: Proxy '["https://www.googleapis.com/auth/analytics.manage.users"] analyticsManageUsersScope = Proxy
188
analyticsManageUsersScope :: Proxy '["https://www.googleapis.com/auth/analytics.manage.users"] analyticsManageUsersScope = Proxy
128
analyticsManageUsersScope = Proxy
33
true
true
0
7
16
20
11
9
null
null
wz1000/haskell-webapps
ServantPersistent/src/Server.hs
mit
productListHandler :: [ProductFilter] -> [ProductView] -> Either CookieError User -> App [Product] productListHandler pfs pvs session = let pf = mconcat pfs pv = mconcat pvs in case session of (Right user) -> do result <- handlePermissionError $ runTran...
479
productListHandler :: [ProductFilter] -> [ProductView] -> Either CookieError User -> App [Product] productListHandler pfs pvs session = let pf = mconcat pfs pv = mconcat pvs in case session of (Right user) -> do result <- handlePermissionError $ runTran...
479
productListHandler pfs pvs session = let pf = mconcat pfs pv = mconcat pvs in case session of (Right user) -> do result <- handlePermissionError $ runTransaction $ (runOperation (dbGetProductList pf) $ Just user) ...
380
false
true
0
18
176
140
67
73
null
null
ekmett/wl-pprint-extras
src/Text/PrettyPrint/Free/Internal.hs
bsd-2-clause
flatten (Nesting f) = Nesting (flatten . f)
47
flatten (Nesting f) = Nesting (flatten . f)
47
flatten (Nesting f) = Nesting (flatten . f)
47
false
false
0
7
11
25
12
13
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types/Product.hs
mpl-2.0
-- | The current state of the table: -- -- - /CREATING/ - The table is being created. -- -- - /UPDATING/ - The table is being updated. -- -- - /DELETING/ - The table is being deleted. -- -- - /ACTIVE/ - The table is ready for use. -- tdTableStatus :: Lens' TableDescription (Maybe TableStatus) tdTableStatus = le...
370
tdTableStatus :: Lens' TableDescription (Maybe TableStatus) tdTableStatus = lens _tdTableStatus (\ s a -> s{_tdTableStatus = a})
128
tdTableStatus = lens _tdTableStatus (\ s a -> s{_tdTableStatus = a})
68
true
true
1
9
74
60
34
26
null
null
spacekitteh/libgrin
src/GRIN/Parser/Parser.hs
bsd-3-clause
rword :: String -> Parser () rword w = string w *> notFollowedBy alphaNumChar *> sc
83
rword :: String -> Parser () rword w = string w *> notFollowedBy alphaNumChar *> sc
83
rword w = string w *> notFollowedBy alphaNumChar *> sc
54
false
true
0
7
15
37
17
20
null
null
mcschroeder/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (CmmLabel _ _ CmmInfo) = DataLabel
59
labelType (CmmLabel _ _ CmmInfo) = DataLabel
59
labelType (CmmLabel _ _ CmmInfo) = DataLabel
59
false
false
0
6
21
20
9
11
null
null
osa1/sequent-core
src/Language/SequentCore/Lint.hs
bsd-3-clause
lintCoreCommand :: LintEnv -> SeqCoreCommand -> LintM () lintCoreCommand env (Let bind comm) = do env' <- lintCoreBind env bind lintCoreCommand env' comm
163
lintCoreCommand :: LintEnv -> SeqCoreCommand -> LintM () lintCoreCommand env (Let bind comm) = do env' <- lintCoreBind env bind lintCoreCommand env' comm
163
lintCoreCommand env (Let bind comm) = do env' <- lintCoreBind env bind lintCoreCommand env' comm
106
false
true
0
8
32
57
26
31
null
null
tulcod/megaparsec
tests/Prim.hs
bsd-2-clause
prop_alternative_3 :: Property prop_alternative_3 = checkParser p r s where p = asum [empty, try (string ">>>"), empty, return "foo"] <?> "bar" p' = bsum [empty, try (string ">>>"), empty, return "foo"] <?> "bar" bsum = foldl (<|>) empty r = simpleParse p' s s = ">>"
302
prop_alternative_3 :: Property prop_alternative_3 = checkParser p r s where p = asum [empty, try (string ">>>"), empty, return "foo"] <?> "bar" p' = bsum [empty, try (string ">>>"), empty, return "foo"] <?> "bar" bsum = foldl (<|>) empty r = simpleParse p' s s = ">>"
302
prop_alternative_3 = checkParser p r s where p = asum [empty, try (string ">>>"), empty, return "foo"] <?> "bar" p' = bsum [empty, try (string ">>>"), empty, return "foo"] <?> "bar" bsum = foldl (<|>) empty r = simpleParse p' s s = ">>"
271
false
true
5
9
81
144
64
80
null
null
cabrera/hkv
src/Server.hs
mit
commands :: [B.ByteString] commands = ["get", "set", "delete"]
62
commands :: [B.ByteString] commands = ["get", "set", "delete"]
62
commands = ["get", "set", "delete"]
35
false
true
0
8
7
32
16
16
null
null
paradoja/scheme.hs
scheme.hs
gpl-3.0
parseUReal :: Exactness -> Reader -> Parser LispVal parseUReal exactness reader = try (parseRational exactness reader) <|> try (parseDecimal exactness reader) <|> parseUInteger exactness reader
253
parseUReal :: Exactness -> Reader -> Parser LispVal parseUReal exactness reader = try (parseRational exactness reader) <|> try (parseDecimal exactness reader) <|> parseUInteger exactness reader
253
parseUReal exactness reader = try (parseRational exactness reader) <|> try (parseDecimal exactness reader) <|> parseUInteger exactness reader
201
false
true
0
9
84
62
29
33
null
null
markusle/husky
src/UnitConverter.hs
gpl-3.0
-- | convert nautical miles to kilometers nmikm_conv_length :: UnitConverter nmikm_conv_length = UnitConverter { converter = (1.852*) , description = "nmi -> km :: nautical miles" ++ "to kilometer" }
287
nmikm_conv_length :: UnitConverter nmikm_conv_length = UnitConverter { converter = (1.852*) , description = "nmi -> km :: nautical miles" ++ "to kilometer" }
244
nmikm_conv_length = UnitConverter { converter = (1.852*) , description = "nmi -> km :: nautical miles" ++ "to kilometer" }
209
true
true
0
8
117
44
23
21
null
null
narurien/ganeti-ceph
src/Ganeti/HTools/Loader.hs
gpl-2.0
-- | An empty cluster. emptyCluster :: ClusterData emptyCluster = ClusterData Container.empty Container.empty Container.empty [] defIPolicy
156
emptyCluster :: ClusterData emptyCluster = ClusterData Container.empty Container.empty Container.empty [] defIPolicy
133
emptyCluster = ClusterData Container.empty Container.empty Container.empty [] defIPolicy
105
true
true
0
6
32
41
17
24
null
null
Collocalini/GenImplicit
genimplicit/src/Generation_branch.hs
gpl-3.0
group_settings = Group_settings {group_rounding=0}
50
group_settings = Group_settings {group_rounding=0}
50
group_settings = Group_settings {group_rounding=0}
50
false
false
0
6
3
14
8
6
null
null
cutsea110/aop
src/Rose.hs
bsd-3-clause
parat (g, c, h) (Node a fs) = g a (fs, (paraf (g, c, h) fs))
60
parat (g, c, h) (Node a fs) = g a (fs, (paraf (g, c, h) fs))
60
parat (g, c, h) (Node a fs) = g a (fs, (paraf (g, c, h) fs))
60
false
false
0
8
15
59
31
28
null
null
massysett/penny
penny/lib/Penny/Copper/Decopperize.hs
bsd-3-clause
dUnquotedStringNonFirstChar :: UnquotedStringNonFirstChar t a -> t dUnquotedStringNonFirstChar x = case x of UnquotedStringNonFirstChar'UnquotedStringNonDigitChar c -> dUnquotedStringNonDigitChar c UnquotedStringNonFirstChar'D0'9 c -> case c of D0'9'Zero (Zero (a, _)) -> a D0'9'One (One (a, _)) -> a...
586
dUnquotedStringNonFirstChar :: UnquotedStringNonFirstChar t a -> t dUnquotedStringNonFirstChar x = case x of UnquotedStringNonFirstChar'UnquotedStringNonDigitChar c -> dUnquotedStringNonDigitChar c UnquotedStringNonFirstChar'D0'9 c -> case c of D0'9'Zero (Zero (a, _)) -> a D0'9'One (One (a, _)) -> a...
586
dUnquotedStringNonFirstChar x = case x of UnquotedStringNonFirstChar'UnquotedStringNonDigitChar c -> dUnquotedStringNonDigitChar c UnquotedStringNonFirstChar'D0'9 c -> case c of D0'9'Zero (Zero (a, _)) -> a D0'9'One (One (a, _)) -> a D0'9'Two (Two (a, _)) -> a D0'9'Three (Three (a, _)) -> a ...
515
false
true
13
8
135
254
135
119
null
null
brendanhay/gogol
gogol-people/gen/Network/Google/Resource/People/People/CreateContact.hs
mpl-2.0
-- | Optional. A mask of what source types to return. Defaults to -- READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set. pccSources :: Lens' PeopleCreateContact [PeopleCreateContactSources] pccSources = lens _pccSources (\ s a -> s{_pccSources = a}) . _Default . _Coerce
298
pccSources :: Lens' PeopleCreateContact [PeopleCreateContactSources] pccSources = lens _pccSources (\ s a -> s{_pccSources = a}) . _Default . _Coerce
163
pccSources = lens _pccSources (\ s a -> s{_pccSources = a}) . _Default . _Coerce
94
true
true
0
11
53
54
29
25
null
null
shayan-najd/QHaskell
QHaskell/Simplification.hs
gpl-3.0
smp :: TG.Type a => Exp s g a -> Exp s g a smp = tilNotChg smpOne
65
smp :: TG.Type a => Exp s g a -> Exp s g a smp = tilNotChg smpOne
65
smp = tilNotChg smpOne
22
false
true
0
8
17
46
20
26
null
null
olsner/ghc
compiler/coreSyn/CoreStats.hs
bsd-3-clause
exprStats (Type t) = tyStats t
37
exprStats (Type t) = tyStats t
37
exprStats (Type t) = tyStats t
37
false
false
0
7
12
18
8
10
null
null
yiannist/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pJQueueNotifyWaitLock :: Field pJQueueNotifyWaitLock = withDoc "'OpTestJqueue' notify_waitlock" $ defaultFalse "notify_waitlock"
132
pJQueueNotifyWaitLock :: Field pJQueueNotifyWaitLock = withDoc "'OpTestJqueue' notify_waitlock" $ defaultFalse "notify_waitlock"
132
pJQueueNotifyWaitLock = withDoc "'OpTestJqueue' notify_waitlock" $ defaultFalse "notify_waitlock"
101
false
true
0
6
14
21
10
11
null
null
IreneKnapp/Faction
libfaction/Distribution/Simple/LocalBuildInfo.hs
bsd-3-clause
foldComponent _ f _ _ _ (CExe exe) = f exe
44
foldComponent _ f _ _ _ (CExe exe) = f exe
44
foldComponent _ f _ _ _ (CExe exe) = f exe
44
false
false
2
6
12
30
12
18
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebGPUComputeCommandEncoder.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGPUComputeCommandEncoder.setBuffer Mozilla WebGPUComputeCommandEncoder.setBuffer documentation> setBuffer :: (MonadDOM m) => WebGPUComputeCommandEncoder -> WebGPUBuffer -> Word -> Word -> m () setBuffer self buffer offset index = liftDOM...
428
setBuffer :: (MonadDOM m) => WebGPUComputeCommandEncoder -> WebGPUBuffer -> Word -> Word -> m () setBuffer self buffer offset index = liftDOM (void (self ^. jsf "setBuffer" [toJSVal buffer, toJSVal offset, toJSVal index]))
273
setBuffer self buffer offset index = liftDOM (void (self ^. jsf "setBuffer" [toJSVal buffer, toJSVal offset, toJSVal index]))
154
true
true
0
12
90
95
46
49
null
null
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/Wrap.hs
bsd-3-clause
keyboard (Char 'S' ) Down _ _ = setClamping S Repeat
53
keyboard (Char 'S' ) Down _ _ = setClamping S Repeat
53
keyboard (Char 'S' ) Down _ _ = setClamping S Repeat
53
false
false
0
7
11
26
12
14
null
null
zakharvoit/lambda-util
src/Math/LambdaUtil/Generator.hs
gpl-3.0
notIn :: [Name] -> Name notIn names = head $ filter (`notElem` names) vars' where vars = ["x", "y", "z", "a", "b", "c"] vars' = vars ++ (iterate (++"'") (head vars))
175
notIn :: [Name] -> Name notIn names = head $ filter (`notElem` names) vars' where vars = ["x", "y", "z", "a", "b", "c"] vars' = vars ++ (iterate (++"'") (head vars))
175
notIn names = head $ filter (`notElem` names) vars' where vars = ["x", "y", "z", "a", "b", "c"] vars' = vars ++ (iterate (++"'") (head vars))
151
false
true
0
9
40
89
51
38
null
null
spechub/Hets
OWL2/ParseAS.hs
gpl-2.0
parseTypeSignature :: GA.PrefixMap -> CharParser st IRI parseTypeSignature pm = do string "^^" parseIRI pm
115
parseTypeSignature :: GA.PrefixMap -> CharParser st IRI parseTypeSignature pm = do string "^^" parseIRI pm
115
parseTypeSignature pm = do string "^^" parseIRI pm
59
false
true
0
7
23
37
16
21
null
null
josegury/HaskellFuntions
Funtions.hs
mit
--funcion resta resta :: Nat -> Nat -> Nat resta n Cero = n
61
resta :: Nat -> Nat -> Nat resta n Cero = n
43
resta n Cero = n
16
true
true
0
8
15
31
14
17
null
null
alexander-at-github/eta
compiler/ETA/Core/CoreArity.hs
bsd-3-clause
etaExpand :: Arity -- ^ Result should have this number of value args -> CoreExpr -- ^ Expression to expand -> CoreExpr -- etaExpand deals with for-alls. For example: -- etaExpand 1 E -- where E :: forall a. a -> a -- would return -- (/\b. \y::a -> E b y) -- ...
1,443
etaExpand :: Arity -- ^ Result should have this number of value args -> CoreExpr -- ^ Expression to expand -> CoreExpr etaExpand n orig_expr = go n orig_expr where -- Strip off existing lambdas and casts -- Note [Eta expansion and SCCs] go 0 expr = expr ...
1,185
etaExpand n orig_expr = go n orig_expr where -- Strip off existing lambdas and casts -- Note [Eta expansion and SCCs] go 0 expr = expr go n (Lam v body) | isTyVar v = Lam v (go n body) | otherwise = Lam v (go (n-1) body) go n (Cast expr co) = Cast (go n ex...
1,023
true
true
6
10
493
295
154
141
null
null
spell-music/temporal-music-notation-demo
src/Temporal/Music/Demo/GeneralMidi.hs
bsd-3-clause
xylophone = instr 13
20
xylophone = instr 13
20
xylophone = instr 13
20
false
false
0
5
3
9
4
5
null
null