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
timds/adjourn
tests/Adjrn/ParseSpec.hs
bsd-3-clause
ex1 :: FilePath ex1 = "tests/data/example.txt"
46
ex1 :: FilePath ex1 = "tests/data/example.txt"
46
ex1 = "tests/data/example.txt"
30
false
true
0
6
5
18
7
11
null
null
liyanchang/scheme-in-haskell
src/chp6.hs
mit
equal badArgList = throwError $ NumArgs 2 badArgList
52
equal badArgList = throwError $ NumArgs 2 badArgList
52
equal badArgList = throwError $ NumArgs 2 badArgList
52
false
false
0
6
7
18
8
10
null
null
aBhallo/AoC2016
Day 13/day13part1.hs
mit
isGoalState :: Coord -> Bool isGoalState = (== goal)
52
isGoalState :: Coord -> Bool isGoalState = (== goal)
52
isGoalState = (== goal)
23
false
true
0
5
8
19
11
8
null
null
ghorn/ois-input-manager
src/Key.hs
bsd-3-clause
decodeKey 33 = KC_F
19
decodeKey 33 = KC_F
19
decodeKey 33 = KC_F
19
false
false
1
5
3
13
4
9
null
null
Hamcha/dvx
Std.hs
mit
stdPrint ((TypeNil ) :r) = do putStr "null"; stdPrint r
58
stdPrint ((TypeNil ) :r) = do putStr "null"; stdPrint r
58
stdPrint ((TypeNil ) :r) = do putStr "null"; stdPrint r
58
false
false
0
8
12
32
15
17
null
null
Xingtao/RLHask
test/TestChapter2Bandit.hs
bsd-3-clause
drawEpsilonGreedy :: Config -> [Vector Double] -> IO (Matplotlib, Matplotlib) drawEpsilonGreedy config results = do (totalStep :: Int) <- require config "totalStep" (ges :: [Double]) <- require config "greedy.epsilons" (initValues :: [Double]) <- require config "greedy.initialOptimalValues" let rewardCurves = ...
1,928
drawEpsilonGreedy :: Config -> [Vector Double] -> IO (Matplotlib, Matplotlib) drawEpsilonGreedy config results = do (totalStep :: Int) <- require config "totalStep" (ges :: [Double]) <- require config "greedy.epsilons" (initValues :: [Double]) <- require config "greedy.initialOptimalValues" let rewardCurves = ...
1,928
drawEpsilonGreedy config results = do (totalStep :: Int) <- require config "totalStep" (ges :: [Double]) <- require config "greedy.epsilons" (initValues :: [Double]) <- require config "greedy.initialOptimalValues" let rewardCurves = foldl (goPlot 0 totalStep) mp (zip3 ges initValues results) bestActions ...
1,850
false
true
0
18
655
511
253
258
null
null
jahaynes/waveletto
src/Data/Wavelet/Matrix.hs
lgpl-3.0
filenameZeroCounts :: FilePath filenameZeroCounts = "zero_counts"
65
filenameZeroCounts :: FilePath filenameZeroCounts = "zero_counts"
65
filenameZeroCounts = "zero_counts"
34
false
true
0
4
5
11
6
5
null
null
YuichiroSato/GameOfSymbolGrounding
src/Data/Cell.hs
bsd-3-clause
birth :: Cell -> (Cell, Maybe Cell) birth c = if bornCheck c then (payBirthCost c, Just $ bornCell c) else (c, Nothing)
123
birth :: Cell -> (Cell, Maybe Cell) birth c = if bornCheck c then (payBirthCost c, Just $ bornCell c) else (c, Nothing)
123
birth c = if bornCheck c then (payBirthCost c, Just $ bornCell c) else (c, Nothing)
87
false
true
0
8
26
64
33
31
null
null
bitemyapp/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- Note [Documenting optimisation flags] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- -- If you change the list of flags enabled for particular optimisation levels -- please remember to update the User's Guide. The relevant files are: -- -- * docs/users_guide/flags.xml -- * docs/users_guide/using.xml -- -- The first c...
2,020
optLevelFlags :: [([Int], GeneralFlag)] optLevelFlags -- see Note [Documenting optimisation flags] = [ ([0,1,2], Opt_DoLambdaEtaExpansion) , ([0,1,2], Opt_DmdTxDictSel) , ([0,1,2], Opt_LlvmTBAA) , ([0,1,2], Opt_VectorisationAvoidance) -- This one is important for a tiresome reason: ...
1,473
optLevelFlags -- see Note [Documenting optimisation flags] = [ ([0,1,2], Opt_DoLambdaEtaExpansion) , ([0,1,2], Opt_DmdTxDictSel) , ([0,1,2], Opt_LlvmTBAA) , ([0,1,2], Opt_VectorisationAvoidance) -- This one is important for a tiresome reason: -- we want to make sure that th...
1,433
true
true
0
9
506
380
258
122
null
null
CoatedMoose/xmonad-ubuntu-conf
xmonad.hs
mit
-- Here, some magic occurs that I once grokked but has since -- fallen out of my head. Essentially what is happening is -- that we are telling xmonad how to navigate workspaces, -- how to send windows to different workspaces, -- and what keys to use to change which monitor is focused. myKeys = myKeyBindings ++ [ ...
884
myKeys = myKeyBindings ++ [ ((m .|. myModMask, k), windows $ f i) | (i, k) <- zip myWorkspaces numPadKeys , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)] ] ++ [ ((m .|. myModMask, k), windows $ f i) | (i, k) <- zip myWorkspaces numKeys , (f, m) <- [(W.greedyView, 0), (W.s...
598
myKeys = myKeyBindings ++ [ ((m .|. myModMask, k), windows $ f i) | (i, k) <- zip myWorkspaces numPadKeys , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)] ] ++ [ ((m .|. myModMask, k), windows $ f i) | (i, k) <- zip myWorkspaces numKeys , (f, m) <- [(W.greedyView, 0), (W.s...
598
true
false
5
12
218
327
185
142
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Word module word16TyConName, word32TyConName, word64TyConName :: Name word16TyConName = tcQual gHC_WORD (fsLit "Word16") word16TyConKey
141
word16TyConName, word32TyConName, word64TyConName :: Name word16TyConName = tcQual gHC_WORD (fsLit "Word16") word16TyConKey
126
word16TyConName = tcQual gHC_WORD (fsLit "Word16") word16TyConKey
68
true
true
0
7
17
29
17
12
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | Magic number prepended to all confd queries. -- -- This allows us to distinguish different types of confd protocols -- and handle them. For example by changing this we can move the whole -- payload to be compressed, or move away from json. confdMagicFourcc :: String confdMagicFourcc = "plj0"
297
confdMagicFourcc :: String confdMagicFourcc = "plj0"
52
confdMagicFourcc = "plj0"
25
true
true
0
4
50
16
11
5
null
null
amccausl/Swish
Swish/HaskellRDF/GraphPartition.hs
lgpl-2.1
-- Use a state monad to keep track of arcs that have been incorporated into -- the resulting list of graph partitions. The collections of arcs used to -- generate the list of partitions are supplied as theinitial state of the -- monad (see call of evalState above). -- makePartitions1 :: (Eq lb) => [(lb,[Arc ...
502
makePartitions1 :: (Eq lb) => [(lb,[Arc lb])] -> State (MakePartitionState lb) [GraphPartition lb] makePartitions1 [] = do { s <- pickNextSubject ; if null s then return [] else makePartitions1 s }
226
makePartitions1 [] = do { s <- pickNextSubject ; if null s then return [] else makePartitions1 s }
122
true
true
0
10
116
98
53
45
null
null
kowey/GenI
geni-gui/src/NLP/GenI/GraphvizShow.hs
gpl-2.0
graphvizShow_ :: GraphvizShowString a => a -> TL.Text graphvizShow_ = graphvizShow
82
graphvizShow_ :: GraphvizShowString a => a -> TL.Text graphvizShow_ = graphvizShow
82
graphvizShow_ = graphvizShow
28
false
true
0
7
10
24
12
12
null
null
vu3rdd/functorrent
src/main/Main.hs
gpl-3.0
exit :: IO ByteString exit = exitSuccess
40
exit :: IO ByteString exit = exitSuccess
40
exit = exitSuccess
18
false
true
0
5
6
14
7
7
null
null
sarahn/ganeti
src/Ganeti/OpParams.hs
gpl-2.0
-- | Whether to release locks as soon as possible. pEarlyRelease :: Field pEarlyRelease = defaultFalse "early_release"
118
pEarlyRelease :: Field pEarlyRelease = defaultFalse "early_release"
67
pEarlyRelease = defaultFalse "early_release"
44
true
true
0
5
16
15
8
7
null
null
Lokilow/Functional-Music
test-suite/Algebraic/MusicalNotesTest.hs
mit
testOctaveOrdering = TestCase $ assertEqual "Lower octaves lesser than higher octaves" ((Note C 0) < (Note C 1)) True
125
testOctaveOrdering = TestCase $ assertEqual "Lower octaves lesser than higher octaves" ((Note C 0) < (Note C 1)) True
125
testOctaveOrdering = TestCase $ assertEqual "Lower octaves lesser than higher octaves" ((Note C 0) < (Note C 1)) True
125
false
false
0
10
26
40
20
20
null
null
OpenXT/manager
xenmgr/Vm/Templates.hs
gpl-2.0
getTemplateDir :: IO FilePath getTemplateDir = do flavour <- appGetPlatformFlavour getDataFileName ("templates" </> flavour)
135
getTemplateDir :: IO FilePath getTemplateDir = do flavour <- appGetPlatformFlavour getDataFileName ("templates" </> flavour)
135
getTemplateDir = do flavour <- appGetPlatformFlavour getDataFileName ("templates" </> flavour)
105
false
true
0
9
24
34
16
18
null
null
kawu/skladnica-with-walenty
src/NLP/Skladnica/Walenty/Mapping.hs
bsd-2-clause
maybeT :: Monad m => Maybe a -> MaybeT m a maybeT = MaybeT . return
67
maybeT :: Monad m => Maybe a -> MaybeT m a maybeT = MaybeT . return
67
maybeT = MaybeT . return
24
false
true
0
7
15
34
16
18
null
null
XinhuaZhang/PetaVisionHaskell
PetaVision/Utility/DFT/Plan.hs
gpl-3.0
getDFTPlan :: DFTPlan -> DFTPlanID -> Plan getDFTPlan plan planID = case HM.lookup planID plan of Nothing -> error $ "getDFTPlan: couldn't find plan for ID " L.++ show planID Just p -> p
198
getDFTPlan :: DFTPlan -> DFTPlanID -> Plan getDFTPlan plan planID = case HM.lookup planID plan of Nothing -> error $ "getDFTPlan: couldn't find plan for ID " L.++ show planID Just p -> p
198
getDFTPlan plan planID = case HM.lookup planID plan of Nothing -> error $ "getDFTPlan: couldn't find plan for ID " L.++ show planID Just p -> p
155
false
true
0
9
45
68
31
37
null
null
UBMLtonGroup/timberc
src/Syntax2Core.hs
bsd-3-clause
s2cS env (SGen (ESig (EVar v) t) e :ss) = do t' <- s2cType t e' <- s2cEc env TWild e c <- s2cS (addSigs [(v,t)] env) ss return (Core.CGen v t' e' c)
283
s2cS env (SGen (ESig (EVar v) t) e :ss) = do t' <- s2cType t e' <- s2cEc env TWild e c <- s2cS (addSigs [(v,t)] env) ss return (Core.CGen v t' e' c)
283
s2cS env (SGen (ESig (EVar v) t) e :ss) = do t' <- s2cType t e' <- s2cEc env TWild e c <- s2cS (addSigs [(v,t)] env) ss return (Core.CGen v t' e' c)
283
false
false
0
12
168
110
52
58
null
null
karamaan/product-profunctors
Data/Profunctor/Product/Tuples/TH.hs
bsd-3-clause
default_ :: Name -> Name -> Name -> Q Pred default_ p a b = classP ''Default (map (pure . VarT) [p, a, b])
106
default_ :: Name -> Name -> Name -> Q Pred default_ p a b = classP ''Default (map (pure . VarT) [p, a, b])
106
default_ p a b = classP ''Default (map (pure . VarT) [p, a, b])
63
false
true
0
9
23
64
33
31
null
null
fmapfmapfmap/amazonka
amazonka-efs/gen/Network/AWS/ElasticFileSystem/DescribeFileSystems.hs
mpl-2.0
-- | Optional string. File system ID whose description you want to retrieve. dfsFileSystemId :: Lens' DescribeFileSystems (Maybe Text) dfsFileSystemId = lens _dfsFileSystemId (\ s a -> s{_dfsFileSystemId = a})
209
dfsFileSystemId :: Lens' DescribeFileSystems (Maybe Text) dfsFileSystemId = lens _dfsFileSystemId (\ s a -> s{_dfsFileSystemId = a})
132
dfsFileSystemId = lens _dfsFileSystemId (\ s a -> s{_dfsFileSystemId = a})
74
true
true
0
9
29
46
25
21
null
null
Javran/Project-Euler
src/ProjectEuler/Problem18.hs
mit
solveMax (t:ts) = foldl max 0 bottomLine where bottomLine = foldl solveNextLine t ts solveNextLine curLine nextTableLine = map possibleMax nextTableLinePos where nextTableLinePos = zip [0..] nextTableLine possibleMax (pos,val) = val + foldl max 0 possibleV...
544
solveMax (t:ts) = foldl max 0 bottomLine where bottomLine = foldl solveNextLine t ts solveNextLine curLine nextTableLine = map possibleMax nextTableLinePos where nextTableLinePos = zip [0..] nextTableLine possibleMax (pos,val) = val + foldl max 0 possibleV...
544
solveMax (t:ts) = foldl max 0 bottomLine where bottomLine = foldl solveNextLine t ts solveNextLine curLine nextTableLine = map possibleMax nextTableLinePos where nextTableLinePos = zip [0..] nextTableLine possibleMax (pos,val) = val + foldl max 0 possibleV...
544
false
false
0
13
217
151
77
74
null
null
pparkkin/eta
compiler/ETA/Core/CoreSyn.hs
bsd-3-clause
-- | Bind all supplied binders over an expression in a nested lambda expression. Prefer to -- use 'MkCore.mkCoreLams' if possible mkLams :: [b] -> Expr b -> Expr b mkLams binders body = foldr Lam body binders
216
mkLams :: [b] -> Expr b -> Expr b mkLams binders body = foldr Lam body binders
85
mkLams binders body = foldr Lam body binders
44
true
true
0
7
45
43
21
22
null
null
lpeterse/haskell-mqtt
src/Network/MQTT/Message.hs
mit
acknowledgedParser :: (PacketIdentifier -> a) -> SG.Get a acknowledgedParser f = do w32 <- SG.getWord32be pure $ f $ PacketIdentifier $ fromIntegral $ w32 .&. 0xffff
170
acknowledgedParser :: (PacketIdentifier -> a) -> SG.Get a acknowledgedParser f = do w32 <- SG.getWord32be pure $ f $ PacketIdentifier $ fromIntegral $ w32 .&. 0xffff
170
acknowledgedParser f = do w32 <- SG.getWord32be pure $ f $ PacketIdentifier $ fromIntegral $ w32 .&. 0xffff
112
false
true
0
11
30
62
30
32
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/prelude/ForeignCall.hs
bsd-3-clause
playInterruptible _ = False
27
playInterruptible _ = False
27
playInterruptible _ = False
27
false
false
0
4
3
10
4
6
null
null
snoyberg/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
tcTyFamInsts (ForAllTy bndr ty) = tcTyFamInsts (binderKind bndr) ++ tcTyFamInsts ty
117
tcTyFamInsts (ForAllTy bndr ty) = tcTyFamInsts (binderKind bndr) ++ tcTyFamInsts ty
117
tcTyFamInsts (ForAllTy bndr ty) = tcTyFamInsts (binderKind bndr) ++ tcTyFamInsts ty
117
false
false
0
8
44
33
15
18
null
null
BurntSushi/150fp-practice
QC/SkewHeap.hs
unlicense
insert :: Ord a => Heap a -> a -> Heap a insert h = merge h . single
68
insert :: Ord a => Heap a -> a -> Heap a insert h = merge h . single
68
insert h = merge h . single
27
false
true
1
9
18
48
20
28
null
null
jaalonso/I1M-Cod-Temas
src/Tema_9.hs
gpl-2.0
area (Rect x y) = x*y
22
area (Rect x y) = x*y
22
area (Rect x y) = x*y
22
false
false
1
6
6
25
10
15
null
null
expipiplus1/vulkan
src/Vulkan/Core13/Enums/PrivateDataSlotCreateFlagBits.hs
bsd-3-clause
conNamePrivateDataSlotCreateFlagBits :: String conNamePrivateDataSlotCreateFlagBits = "PrivateDataSlotCreateFlagBits"
117
conNamePrivateDataSlotCreateFlagBits :: String conNamePrivateDataSlotCreateFlagBits = "PrivateDataSlotCreateFlagBits"
117
conNamePrivateDataSlotCreateFlagBits = "PrivateDataSlotCreateFlagBits"
70
false
true
0
4
5
11
6
5
null
null
acamino/state-codes
src/Data/StateCodes/ISO31662US.hs
mit
toText NE = "NE"
16
toText NE = "NE"
16
toText NE = "NE"
16
false
false
0
5
3
9
4
5
null
null
fumieval/LazyZ
Language/LazyZ/Builder.hs
bsd-3-clause
buildFiles :: [FilePath] -> IO (Expr Void) buildFiles files = do r <- fmap sequence $ mapM (parseFromFile parseOpTable) files ops <- case r of Left e -> fail $ show e Right a -> return a mapM (parseFromFile $ parseDecs $ concat ops) files >>= \r -> case sequence r of Left err ->...
479
buildFiles :: [FilePath] -> IO (Expr Void) buildFiles files = do r <- fmap sequence $ mapM (parseFromFile parseOpTable) files ops <- case r of Left e -> fail $ show e Right a -> return a mapM (parseFromFile $ parseDecs $ concat ops) files >>= \r -> case sequence r of Left err ->...
479
buildFiles files = do r <- fmap sequence $ mapM (parseFromFile parseOpTable) files ops <- case r of Left e -> fail $ show e Right a -> return a mapM (parseFromFile $ parseDecs $ concat ops) files >>= \r -> case sequence r of Left err -> error $ show err Right progs -> ca...
436
false
true
0
16
153
197
88
109
null
null
ilyasergey/GHC-XAppFix
compiler/codeGen/CgForeignCall.hs
bsd-3-clause
resumeThread = CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "resumeThread")))
86
resumeThread = CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "resumeThread")))
86
resumeThread = CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "resumeThread")))
86
false
false
0
11
8
29
14
15
null
null
jtapolczai/wumpus
World/Make.hs
apache-2.0
-- Creating worlds -------------------------------------------------------------------------------- -- |Creates a BMP given pixels and a default color. makeBitmap :: M.Map (Int, Int) Pixel -> Pixel -> (Int, Int) -> BMP makeBitmap foreground defColor (w,h) = logF trace ("[makeBitmap] dimensions=" ++ show (w,h)) $...
1,850
makeBitmap :: M.Map (Int, Int) Pixel -> Pixel -> (Int, Int) -> BMP makeBitmap foreground defColor (w,h) = logF trace ("[makeBitmap] dimensions=" ++ show (w,h)) $ logF trace ("[makeBitmap] expected number of pixels=" ++ show (w*h)) $ logF trace ("[makeBitmap] number of bytes in stream=" ++ show (BS.length strea...
1,697
makeBitmap foreground defColor (w,h) = logF trace ("[makeBitmap] dimensions=" ++ show (w,h)) $ logF trace ("[makeBitmap] expected number of pixels=" ++ show (w*h)) $ logF trace ("[makeBitmap] number of bytes in stream=" ++ show (BS.length stream)) $ logF trace ("[makeBitmap] number of bytes in stream=" ++ s...
1,630
true
true
0
19
424
658
337
321
null
null
cullina/Extractor
src/PowerSeries.hs
bsd-3-clause
alternate :: [a] -> [a] -> [a] alternate = concat ... zipWith f where f x y = [x,y]
89
alternate :: [a] -> [a] -> [a] alternate = concat ... zipWith f where f x y = [x,y]
89
alternate = concat ... zipWith f where f x y = [x,y]
58
false
true
1
9
24
60
31
29
null
null
DimaSamoz/mezzo
test/CompTestsCompile.hs
mit
scR2 = test $ r sr'
19
scR2 = test $ r sr'
19
scR2 = test $ r sr'
19
false
false
0
6
5
13
6
7
null
null
egison/egison
hs-src/Language/Egison/PrettyMath/Latex.hs
mit
showMathExpr (Quote x) = "(" ++ showMathExpr x ++ ")"
53
showMathExpr (Quote x) = "(" ++ showMathExpr x ++ ")"
53
showMathExpr (Quote x) = "(" ++ showMathExpr x ++ ")"
53
false
false
0
7
9
26
12
14
null
null
nomeata/ghc
compiler/utils/IOEnv.hs
bsd-3-clause
tryIOEnvFailure :: IO a -> IO (Either IOEnvFailure a) tryIOEnvFailure = try
75
tryIOEnvFailure :: IO a -> IO (Either IOEnvFailure a) tryIOEnvFailure = try
75
tryIOEnvFailure = try
21
false
true
0
8
11
29
14
15
null
null
melted/llvm-pretty
src/Text/LLVM.hs
bsd-3-clause
fpext :: IsValue a => Typed a -> Type -> BB (Typed Value) fpext = convop (Conv FpExt)
86
fpext :: IsValue a => Typed a -> Type -> BB (Typed Value) fpext = convop (Conv FpExt)
86
fpext = convop (Conv FpExt)
28
false
true
0
10
18
47
22
25
null
null
wz1000/haskell-lsp
lsp-types/src/Language/LSP/Types/Uri.hs
mit
uriToNormalizedFilePath :: NormalizedUri -> Maybe NormalizedFilePath uriToNormalizedFilePath nuri = fmap (normalizedFilePath nuri) mbFilePath where mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)
229
uriToNormalizedFilePath :: NormalizedUri -> Maybe NormalizedFilePath uriToNormalizedFilePath nuri = fmap (normalizedFilePath nuri) mbFilePath where mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)
229
uriToNormalizedFilePath nuri = fmap (normalizedFilePath nuri) mbFilePath where mbFilePath = platformAwareUriToFilePath System.Info.os (fromNormalizedUri nuri)
160
false
true
0
7
21
54
26
28
null
null
raptros/chatless-hs
src/Api/Queries/Base.hs
bsd-3-clause
textLoadMessageFailed :: T.Text textLoadMessageFailed = "load_message_failed"
77
textLoadMessageFailed :: T.Text textLoadMessageFailed = "load_message_failed"
77
textLoadMessageFailed = "load_message_failed"
45
false
true
0
5
5
13
7
6
null
null
florianpilz/autotool
src/Baum/Roll.hs
gpl-2.0
rollbin s = do x <- randomRIO (1, s-2) let sl = if even x then pred x else x let sr = s - 1 - sl l <- rollbin sl r <- rollbin sr return $ Node () [ l, r ] -- | make random binary tree with given labels (in any order)
241
rollbin s = do x <- randomRIO (1, s-2) let sl = if even x then pred x else x let sr = s - 1 - sl l <- rollbin sl r <- rollbin sr return $ Node () [ l, r ] -- | make random binary tree with given labels (in any order)
241
rollbin s = do x <- randomRIO (1, s-2) let sl = if even x then pred x else x let sr = s - 1 - sl l <- rollbin sl r <- rollbin sr return $ Node () [ l, r ] -- | make random binary tree with given labels (in any order)
241
false
false
1
12
80
114
52
62
null
null
Helium4Haskell/helium
src/Helium/Parser/ParseLibrary.hs
gpl-3.0
lexNEVER = lexeme (LexKeyword "never")
44
lexNEVER = lexeme (LexKeyword "never")
44
lexNEVER = lexeme (LexKeyword "never")
44
false
false
0
7
10
15
7
8
null
null
elegios/datalang
src/Inference.hs
mit
applyRestriction errF t restr = throwError . errF $ "Could not apply restriction " ++ show restr ++ " on type " ++ show t
121
applyRestriction errF t restr = throwError . errF $ "Could not apply restriction " ++ show restr ++ " on type " ++ show t
121
applyRestriction errF t restr = throwError . errF $ "Could not apply restriction " ++ show restr ++ " on type " ++ show t
121
false
false
0
9
24
39
18
21
null
null
stephane-rolland/aastraal
aastraal-client-brick/src/Command.hs
gpl-3.0
parseTaskSetWhy :: Parser parseTaskSetWhy as@(_:_) = return $ Right $ TaskSetWhy "" $ DL.intercalate " " as
107
parseTaskSetWhy :: Parser parseTaskSetWhy as@(_:_) = return $ Right $ TaskSetWhy "" $ DL.intercalate " " as
107
parseTaskSetWhy as@(_:_) = return $ Right $ TaskSetWhy "" $ DL.intercalate " " as
81
false
true
2
7
16
54
23
31
null
null
bixuanzju/fcore
lib/archive/CoreNew.hs
bsd-2-clause
pi :: Type t -> (t -> Type t) -> Type t pi = Pi "_"
51
pi :: Type t -> (t -> Type t) -> Type t pi = Pi "_"
51
pi = Pi "_"
11
false
true
0
10
15
44
19
25
null
null
factisresearch/HStringTemplate
Text/StringTemplate/Base.hs
bsd-3-clause
--merges values of former into latter, preserving encoder --of latter, as well as non-overriden options. group of latter is overridden. mergeSEnvs :: SEnv a -> SEnv a -> SEnv a mergeSEnvs x y = SEnv {smp = M.union (smp x) (smp y), sopts = (sopts y ++ sopts x), sgen = sgen x, senc = senc y}
290
mergeSEnvs :: SEnv a -> SEnv a -> SEnv a mergeSEnvs x y = SEnv {smp = M.union (smp x) (smp y), sopts = (sopts y ++ sopts x), sgen = sgen x, senc = senc y}
154
mergeSEnvs x y = SEnv {smp = M.union (smp x) (smp y), sopts = (sopts y ++ sopts x), sgen = sgen x, senc = senc y}
113
true
true
0
9
56
99
51
48
null
null
bitemyapp/tandoori
src/Tandoori/Typing/DataType.hs
bsd-3-clause
constructorsFromDecl _ = return []
34
constructorsFromDecl _ = return []
34
constructorsFromDecl _ = return []
34
false
false
0
6
4
14
6
8
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110711set5.hs
gpl-3.0
webdavdir :: WebDAVRemoteDir webdavdir = WebDAVRemoteDir "paper3/test"
70
webdavdir :: WebDAVRemoteDir webdavdir = WebDAVRemoteDir "paper3/test"
70
webdavdir = WebDAVRemoteDir "paper3/test"
41
false
true
0
5
6
14
7
7
null
null
PipocaQuemada/ermine
src/Ermine/Console/Command.hs
bsd-2-clause
showHelp :: [String] -> String -> Console () showHelp _ _ = sayLn $ vsep (map format commands) where format c = fill 18 (withArg c) <+> hang 18 (fillSep (text <$> words (c^.desc))) withArg c = case c^.arg of Nothing -> bold (char ':' <> text (c^.cmdName)) Just a -> bold (char ':' <> text (c^.cmdName)) <+> ...
506
showHelp :: [String] -> String -> Console () showHelp _ _ = sayLn $ vsep (map format commands) where format c = fill 18 (withArg c) <+> hang 18 (fillSep (text <$> words (c^.desc))) withArg c = case c^.arg of Nothing -> bold (char ':' <> text (c^.cmdName)) Just a -> bold (char ':' <> text (c^.cmdName)) <+> ...
506
showHelp _ _ = sayLn $ vsep (map format commands) where format c = fill 18 (withArg c) <+> hang 18 (fillSep (text <$> words (c^.desc))) withArg c = case c^.arg of Nothing -> bold (char ':' <> text (c^.cmdName)) Just a -> bold (char ':' <> text (c^.cmdName)) <+> angles (text a) ----------------------------...
461
false
true
4
14
78
205
96
109
null
null
spechub/Hets
Taxonomy/OntoParser.hs
gpl-2.0
idParser :: GenParser Char st String idParser = many (noneOf "{}[]")
68
idParser :: GenParser Char st String idParser = many (noneOf "{}[]")
68
idParser = many (noneOf "{}[]")
31
false
true
0
7
10
27
13
14
null
null
alexgadea/fun
Fun/Eval/Rules.hs
gpl-3.0
DropSucc :: EvalRule eDropSucc = EvalRule { lexpr = drop (append varZ1 varZ2) (successor varZ3) , rexpr = take varZ2 varZ3 , name = "E-DROPSUCC" }
192
eDropSucc :: EvalRule eDropSucc = EvalRule { lexpr = drop (append varZ1 varZ2) (successor varZ3) , rexpr = take varZ2 varZ3 , name = "E-DROPSUCC" }
192
eDropSucc = EvalRule { lexpr = drop (append varZ1 varZ2) (successor varZ3) , rexpr = take varZ2 varZ3 , name = "E-DROPSUCC" }
170
false
true
0
9
71
58
30
28
null
null
Icelandjack/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
_SigT :: Prism' Type (Type, Kind) _SigT = prism remitter reviewer where remitter (x, y) = SigT x y reviewer (SigT x y) = Right (x, y) reviewer x = Left x
175
_SigT :: Prism' Type (Type, Kind) _SigT = prism remitter reviewer where remitter (x, y) = SigT x y reviewer (SigT x y) = Right (x, y) reviewer x = Left x
175
_SigT = prism remitter reviewer where remitter (x, y) = SigT x y reviewer (SigT x y) = Right (x, y) reviewer x = Left x
141
false
true
2
7
53
84
43
41
null
null
IreneKnapp/Faction
faction/Distribution/Client/Dependency/Modular/Solver.hs
bsd-3-clause
solve :: SolverConfig -> -- solver parameters Index -> -- all available packages as an index (PN -> PackagePreferences) -> -- preferences Map PN [PackageConstraint] -> -- global constraints [PN] -> -- global goals Log Message (Assignment, Rev...
1,308
solve :: SolverConfig -> -- solver parameters Index -> -- all available packages as an index (PN -> PackagePreferences) -> -- preferences Map PN [PackageConstraint] -> -- global constraints [PN] -> -- global goals Log Message (Assignment, Rev...
1,308
solve sc idx userPrefs userConstraints userGoals = explorePhase $ heuristicsPhase $ preferencesPhase $ validationPhase $ prunePhase $ buildPhase where explorePhase = exploreTreeLog . backjump heuristicsPhase = if preferEasyGoalChoices sc then P.preferBaseG...
980
false
true
16
12
433
270
130
140
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Xtract/Lex.hs
gpl-3.0
selAny f p ('.':'>':'=':'.':ss) = emit (Symbol ".>=.") p: selAny f (addcol 4 p) ss
110
selAny f p ('.':'>':'=':'.':ss) = emit (Symbol ".>=.") p: selAny f (addcol 4 p) ss
110
selAny f p ('.':'>':'=':'.':ss) = emit (Symbol ".>=.") p: selAny f (addcol 4 p) ss
110
false
false
0
9
42
65
30
35
null
null
alexander-at-github/eta
compiler/ETA/HsSyn/HsTypes.hs
bsd-3-clause
ppr_mono_ty _ (HsExplicitTupleTy _ tys) = quote $ parens (interpp'SP tys)
76
ppr_mono_ty _ (HsExplicitTupleTy _ tys) = quote $ parens (interpp'SP tys)
76
ppr_mono_ty _ (HsExplicitTupleTy _ tys) = quote $ parens (interpp'SP tys)
76
false
false
1
8
13
34
15
19
null
null
ezyang/hoopl
testing/ConstProp.hs
bsd-3-clause
-- Only interesting semantic choice: values of variables are live across -- a call site. -- Note that we don't need a case for x := y, where y holds a constant. -- We can write the simplest solution and rely on the interleaved optimization. -- @ start cprop.tex -------------------------------------------------- -- Anal...
1,115
varHasLit :: FwdTransfer Node ConstFact varHasLit = mkFTransfer ft where ft :: Node e x -> ConstFact -> Fact x ConstFact ft (Label _) f = f ft (Assign x (Lit k)) f = Map.insert x (PElem k) f ft (Assign x _) f = Map.insert x Top f ft (Store _ _) f = f ft (Branch l) f ...
754
varHasLit = mkFTransfer ft where ft :: Node e x -> ConstFact -> Fact x ConstFact ft (Label _) f = f ft (Assign x (Lit k)) f = Map.insert x (PElem k) f ft (Assign x _) f = Map.insert x Top f ft (Store _ _) f = f ft (Branch l) f = mapSingleton l f ft (Cond (Var x) tl...
714
true
true
0
12
312
382
195
187
null
null
nvasilakis/lsh
Evaluator.hs
bsd-3-clause
lambda v o u = do x <- pp o H.lambda return $ resolve u x -- TODO: Manipulate history (clear)
98
lambda v o u = do x <- pp o H.lambda return $ resolve u x -- TODO: Manipulate history (clear)
98
lambda v o u = do x <- pp o H.lambda return $ resolve u x -- TODO: Manipulate history (clear)
98
false
false
0
9
25
40
18
22
null
null
vTurbine/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
lvlExpr env expr@(_, AnnLam {}) = do { new_body <- lvlMFE True new_env body ; return (mkLams new_bndrs new_body) } where (bndrs, body) = collectAnnBndrs expr (env1, bndrs1) = substBndrsSL NonRecursive env bndrs (new_env, new_bndrs) = lvlLamBndrs env1 (le_ctxt_lvl env) bndrs1 ...
728
lvlExpr env expr@(_, AnnLam {}) = do { new_body <- lvlMFE True new_env body ; return (mkLams new_bndrs new_body) } where (bndrs, body) = collectAnnBndrs expr (env1, bndrs1) = substBndrsSL NonRecursive env bndrs (new_env, new_bndrs) = lvlLamBndrs env1 (le_ctxt_lvl env) bndrs1 ...
728
lvlExpr env expr@(_, AnnLam {}) = do { new_body <- lvlMFE True new_env body ; return (mkLams new_bndrs new_body) } where (bndrs, body) = collectAnnBndrs expr (env1, bndrs1) = substBndrsSL NonRecursive env bndrs (new_env, new_bndrs) = lvlLamBndrs env1 (le_ctxt_lvl env) bndrs1 ...
728
false
false
2
9
190
120
66
54
null
null
sgillespie/lambda-calculus
src/Language/SystemF/Parser.hs
mit
whitespace :: Parser () whitespace = void . many . oneOf $ " \t"
64
whitespace :: Parser () whitespace = void . many . oneOf $ " \t"
64
whitespace = void . many . oneOf $ " \t"
40
false
true
0
7
13
28
14
14
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F20.hs
bsd-3-clause
ptr_glPollInstrumentsSGIX :: FunPtr (Ptr GLint -> IO GLint) ptr_glPollInstrumentsSGIX = unsafePerformIO $ getCommand "glPollInstrumentsSGIX"
140
ptr_glPollInstrumentsSGIX :: FunPtr (Ptr GLint -> IO GLint) ptr_glPollInstrumentsSGIX = unsafePerformIO $ getCommand "glPollInstrumentsSGIX"
140
ptr_glPollInstrumentsSGIX = unsafePerformIO $ getCommand "glPollInstrumentsSGIX"
80
false
true
0
8
13
34
16
18
null
null
transient-haskell/transient-universe
src/Transient/Move/Services.hs
mit
reePort :: MVar Int rfreePort = unsafePerformIO $ newMVar (monitorPort +2) -
78
rfreePort :: MVar Int rfreePort = unsafePerformIO $ newMVar (monitorPort +2)
77
rfreePort = unsafePerformIO $ newMVar (monitorPort +2)
55
false
true
0
9
13
32
16
16
null
null
jozefg/f2js
src/Language/F2JS/STGify.hs
mit
expr2sexpr :: [Name] -> A.Expr -> Gen Name S.SExpr expr2sexpr ns = \case A.Var i -> return $ S.Var (ns !! i) A.Global n -> return $ S.Var n e | Just (op, atoms) <- appChain ns e -> return $ case op of Right p -> S.Prim p atoms Left n -> S.App n atoms A.Lit l -> return $ S.Lit (lit2slit l...
1,255
expr2sexpr :: [Name] -> A.Expr -> Gen Name S.SExpr expr2sexpr ns = \case A.Var i -> return $ S.Var (ns !! i) A.Global n -> return $ S.Var n e | Just (op, atoms) <- appChain ns e -> return $ case op of Right p -> S.Prim p atoms Left n -> S.App n atoms A.Lit l -> return $ S.Lit (lit2slit l...
1,255
expr2sexpr ns = \case A.Var i -> return $ S.Var (ns !! i) A.Global n -> return $ S.Var n e | Just (op, atoms) <- appChain ns e -> return $ case op of Right p -> S.Prim p atoms Left n -> S.App n atoms A.Lit l -> return $ S.Lit (lit2slit l) A.LetRec bs e -> do ns' <- (++ ns) <$> repl...
1,204
false
true
0
15
457
584
282
302
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Check.hs
bsd-3-clause
untidy_con (RecCon (HsRecFields flds dd)) = RecCon (HsRecFields [ L l (fld { hsRecFieldArg = untidy_pars (hsRecFieldArg fld) }) | L l fld <- flds ] dd)
221
untidy_con (RecCon (HsRecFields flds dd)) = RecCon (HsRecFields [ L l (fld { hsRecFieldArg = untidy_pars (hsRecFieldArg fld) }) | L l fld <- flds ] dd)
221
untidy_con (RecCon (HsRecFields flds dd)) = RecCon (HsRecFields [ L l (fld { hsRecFieldArg = untidy_pars (hsRecFieldArg fld) }) | L l fld <- flds ] dd)
221
false
false
0
15
96
75
37
38
null
null
vaporware/carnival
Model/UserComment.hs
mit
selectWithUsers :: [Filter Comment] -> [SelectOpt Comment] -> DB [UserComment] selectWithUsers filters options = do comments <- selectList filters options users <- selectList [ UserId <-. map (commentUser . entityVal) comments ] [] fmap catMaybes $ forM comments $ \c -> do let userI...
477
selectWithUsers :: [Filter Comment] -> [SelectOpt Comment] -> DB [UserComment] selectWithUsers filters options = do comments <- selectList filters options users <- selectList [ UserId <-. map (commentUser . entityVal) comments ] [] fmap catMaybes $ forM comments $ \c -> do let userI...
477
selectWithUsers filters options = do comments <- selectList filters options users <- selectList [ UserId <-. map (commentUser . entityVal) comments ] [] fmap catMaybes $ forM comments $ \c -> do let userId = commentUser $ entityVal c muser = find ((== userId) . entityKey...
398
false
true
0
17
123
175
84
91
null
null
rbtying/parsel
src/TypeCheck.hs
apache-2.0
checkExpr sd parent (LetExp defs expr) = do let scope = Scope (defsToTable defs) parent defs' <- mapM (checkDef sd scope) defs expr' <- checkExpr sd scope expr return $ LetExp defs' expr'
216
checkExpr sd parent (LetExp defs expr) = do let scope = Scope (defsToTable defs) parent defs' <- mapM (checkDef sd scope) defs expr' <- checkExpr sd scope expr return $ LetExp defs' expr'
216
checkExpr sd parent (LetExp defs expr) = do let scope = Scope (defsToTable defs) parent defs' <- mapM (checkDef sd scope) defs expr' <- checkExpr sd scope expr return $ LetExp defs' expr'
216
false
false
0
12
61
87
39
48
null
null
juhp/leksah
src/IDE/Leksah.hs
gpl-2.0
mainLoopSingleThread :: IO () -> IO () mainLoopSingleThread onIdle = eventsPending >>= loop False 50 where loop :: Bool -> Int -> Int -> IO () loop False delay 0 | delay > 2000 = onIdle >> loop True delay 0 loop isIdle delay n = do quit <- if n > 0 then do ...
1,096
mainLoopSingleThread :: IO () -> IO () mainLoopSingleThread onIdle = eventsPending >>= loop False 50 where loop :: Bool -> Int -> Int -> IO () loop False delay 0 | delay > 2000 = onIdle >> loop True delay 0 loop isIdle delay n = do quit <- if n > 0 then do ...
1,096
mainLoopSingleThread onIdle = eventsPending >>= loop False 50 where loop :: Bool -> Int -> Int -> IO () loop False delay 0 | delay > 2000 = onIdle >> loop True delay 0 loop isIdle delay n = do quit <- if n > 0 then do timeout <- timeoutAddFull (yield >> ...
1,057
false
true
5
23
607
285
134
151
null
null
rrnewton/criterion
Criterion/Internal.hs
bsd-2-clause
junit :: [Report] -> Criterion () junit rs = do junitOpt <- asks junitFile case junitOpt of Just fn -> liftIO $ writeFile fn msg Nothing -> return () where msg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ++ printf "<testsuite name=\"Criterion benchmarks\" tests=\"%d\">\n"...
750
junit :: [Report] -> Criterion () junit rs = do junitOpt <- asks junitFile case junitOpt of Just fn -> liftIO $ writeFile fn msg Nothing -> return () where msg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ++ printf "<testsuite name=\"Criterion benchmarks\" tests=\"%d\">\n"...
750
junit rs = do junitOpt <- asks junitFile case junitOpt of Just fn -> liftIO $ writeFile fn msg Nothing -> return () where msg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ++ printf "<testsuite name=\"Criterion benchmarks\" tests=\"%d\">\n" (length rs) ++ ...
716
false
true
5
11
251
209
100
109
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Xen xenBootloader :: String xenBootloader = AutoConf.xenBootloader
72
xenBootloader :: String xenBootloader = AutoConf.xenBootloader
62
xenBootloader = AutoConf.xenBootloader
38
true
true
0
6
9
21
9
12
null
null
fmapfmapfmap/amazonka
amazonka-ds/gen/Network/AWS/DirectoryService/CreateSnapshot.hs
mpl-2.0
-- | The response status code. csrsResponseStatus :: Lens' CreateSnapshotResponse Int csrsResponseStatus = lens _csrsResponseStatus (\ s a -> s{_csrsResponseStatus = a})
169
csrsResponseStatus :: Lens' CreateSnapshotResponse Int csrsResponseStatus = lens _csrsResponseStatus (\ s a -> s{_csrsResponseStatus = a})
138
csrsResponseStatus = lens _csrsResponseStatus (\ s a -> s{_csrsResponseStatus = a})
83
true
true
0
9
21
40
22
18
null
null
neobrain/aeson
Data/Aeson/Types/Instances.hs
bsd-3-clause
-- | @withArray expected f value@ applies @f@ to the 'Array' when @value@ is an @Array@ -- and fails using @'typeMismatch' expected@ otherwise. withArray :: String -> (Array -> Parser a) -> Value -> Parser a withArray _ f (Array arr) = f arr
250
withArray :: String -> (Array -> Parser a) -> Value -> Parser a withArray _ f (Array arr) = f arr
104
withArray _ f (Array arr) = f arr
40
true
true
0
11
52
58
28
30
null
null
TOSPIO/yi
src/library/Yi/Keymap/Vim/Utils.hs
gpl-2.0
pasteInclusiveB :: YiString -> RegionStyle -> BufferM () pasteInclusiveB rope style = do p0 <- pointB insertRopeWithStyleB rope style if countNewLines rope == 0 && style `elem` [ Exclusive, Inclusive ] then leftB else moveTo p0
241
pasteInclusiveB :: YiString -> RegionStyle -> BufferM () pasteInclusiveB rope style = do p0 <- pointB insertRopeWithStyleB rope style if countNewLines rope == 0 && style `elem` [ Exclusive, Inclusive ] then leftB else moveTo p0
241
pasteInclusiveB rope style = do p0 <- pointB insertRopeWithStyleB rope style if countNewLines rope == 0 && style `elem` [ Exclusive, Inclusive ] then leftB else moveTo p0
184
false
true
0
11
49
81
40
41
null
null
paparazzi/libsbp
haskell/src/SwiftNav/SBP/Bootload.hs
lgpl-3.0
msgNapDeviceDnaReq :: Word16 msgNapDeviceDnaReq = 0x00DE
56
msgNapDeviceDnaReq :: Word16 msgNapDeviceDnaReq = 0x00DE
56
msgNapDeviceDnaReq = 0x00DE
27
false
true
0
4
5
11
6
5
null
null
acowley/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
exprIsWorkFree :: CoreExpr -> Bool -- See Note [exprIsWorkFree] exprIsWorkFree e = go 0 e where -- n is the number of value arguments go _ (Lit {}) = True go _ (Type {}) = True go _ (Coercion {}) = True go n (Cast e _) = go n e...
2,787
exprIsWorkFree :: CoreExpr -> Bool exprIsWorkFree e = go 0 e where -- n is the number of value arguments go _ (Lit {}) = True go _ (Type {}) = True go _ (Coercion {}) = True go n (Cast e _) = go n e go n (Case scrut _ _ alt...
2,758
exprIsWorkFree e = go 0 e where -- n is the number of value arguments go _ (Lit {}) = True go _ (Type {}) = True go _ (Coercion {}) = True go n (Cast e _) = go n e go n (Case scrut _ _ alts) = foldl (&&) (exprIsWorkF...
2,723
true
true
0
9
873
366
179
187
null
null
Zielon/Bounce
src/Collision/VectorOperations.hs
bsd-3-clause
normalize :: Vector -> Vector normalize (x, y) = (x/m, y/m) where m = magnitude (x,y) -- | Get a perpendicular vector -- For a given vector the perpendicular vectors are (-y,x), (y,-x) -- where the dot product is 0; example (2,7) and (-7,2) --
248
normalize :: Vector -> Vector normalize (x, y) = (x/m, y/m) where m = magnitude (x,y) -- | Get a perpendicular vector -- For a given vector the perpendicular vectors are (-y,x), (y,-x) -- where the dot product is 0; example (2,7) and (-7,2) --
248
normalize (x, y) = (x/m, y/m) where m = magnitude (x,y) -- | Get a perpendicular vector -- For a given vector the perpendicular vectors are (-y,x), (y,-x) -- where the dot product is 0; example (2,7) and (-7,2) --
218
false
true
0
8
49
58
34
24
null
null
tpsinnem/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
pprintRaw bound (RApp f x) = enclose lparen rparen . group . align . hang 2 . vsep $ [text "RApp", pprintRaw bound f, pprintRaw bound x]
140
pprintRaw bound (RApp f x) = enclose lparen rparen . group . align . hang 2 . vsep $ [text "RApp", pprintRaw bound f, pprintRaw bound x]
140
pprintRaw bound (RApp f x) = enclose lparen rparen . group . align . hang 2 . vsep $ [text "RApp", pprintRaw bound f, pprintRaw bound x]
140
false
false
0
9
30
72
33
39
null
null
rueshyna/gogol
gogol-apps-calendar/gen/Network/Google/Resource/Calendar/ACL/Watch.hs
mpl-2.0
-- | Token specifying which result page to return. Optional. awPageToken :: Lens' ACLWatch (Maybe Text) awPageToken = lens _awPageToken (\ s a -> s{_awPageToken = a})
168
awPageToken :: Lens' ACLWatch (Maybe Text) awPageToken = lens _awPageToken (\ s a -> s{_awPageToken = a})
107
awPageToken = lens _awPageToken (\ s a -> s{_awPageToken = a})
64
true
true
1
9
28
51
25
26
null
null
fmapfmapfmap/amazonka
core/src/Network/AWS/Data/Base64.hs
mpl-2.0
_Base64 :: Iso' Base64 ByteString _Base64 = iso unBase64 Base64
63
_Base64 :: Iso' Base64 ByteString _Base64 = iso unBase64 Base64
63
_Base64 = iso unBase64 Base64
29
false
true
0
5
9
21
10
11
null
null
dec9ue/jhc_copygc
lib/haskell-extras/System/Info.hs
gpl-2.0
arch = unsafePerformIO $ peekCAString =<< peek options_arch
59
arch = unsafePerformIO $ peekCAString =<< peek options_arch
59
arch = unsafePerformIO $ peekCAString =<< peek options_arch
59
false
false
0
6
7
17
8
9
null
null
lpeterse/koka
src/Type/Assumption.hs
apache-2.0
extractDef isVisible _ = gammaEmpty
37
extractDef isVisible _ = gammaEmpty
37
extractDef isVisible _ = gammaEmpty
37
false
false
0
5
6
11
5
6
null
null
andreagenso/java2scala
test/Main.hs
apache-2.0
test "tsp0" = tsp0
18
test "tsp0" = tsp0
18
test "tsp0" = tsp0
18
false
false
0
4
3
10
4
6
null
null
oden-lang/oden
src/Oden/Type/Monomorphic.hs
mit
getLeafRow e = e
16
getLeafRow e = e
16
getLeafRow e = e
16
false
false
0
5
3
9
4
5
null
null
flbulgarelli/hs-inspector
src/Language/Haskell/Explorer.hs
mit
rhssOf :: Binding -> Code -> [HsRhs] rhssOf binding = concatMap rhsForBinding . declsOf binding
95
rhssOf :: Binding -> Code -> [HsRhs] rhssOf binding = concatMap rhsForBinding . declsOf binding
95
rhssOf binding = concatMap rhsForBinding . declsOf binding
58
false
true
0
7
14
38
18
20
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT40.hs
gpl-3.0
subset :: [Nat] -> [Nat] -> Bool subset [] ys = True
52
subset :: [Nat] -> [Nat] -> Bool subset [] ys = True
52
subset [] ys = True
19
false
true
0
7
11
32
17
15
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
ratioDataConKey = mkPreludeDataConUnique 12
67
ratioDataConKey = mkPreludeDataConUnique 12
67
ratioDataConKey = mkPreludeDataConUnique 12
67
false
false
0
5
27
9
4
5
null
null
CulpaBS/wbBach
src/Futhark/Representation/AST/Attributes/Ranges.hs
bsd-3-clause
subExpKnownRange :: SubExp -> (KnownBound, KnownBound) subExpKnownRange (Var v) = (VarBound v, VarBound v)
111
subExpKnownRange :: SubExp -> (KnownBound, KnownBound) subExpKnownRange (Var v) = (VarBound v, VarBound v)
111
subExpKnownRange (Var v) = (VarBound v, VarBound v)
56
false
true
0
7
18
42
22
20
null
null
rglew/cis194
src/Week2/Week2.hs
mit
-- build a list of True/False so we can zip it matchElem :: Char -> Char -> Bool matchElem templateChar wordChar | templateChar == wordChar = True | templateChar == '?' = True | otherwise = False
214
matchElem :: Char -> Char -> Bool matchElem templateChar wordChar | templateChar == wordChar = True | templateChar == '?' = True | otherwise = False
167
matchElem templateChar wordChar | templateChar == wordChar = True | templateChar == '?' = True | otherwise = False
133
true
true
0
8
55
57
27
30
null
null
hkupty/aura
src/Aura/Languages.hs
gpl-3.0
getDepsToInstall_1 :: Language -> String getDepsToInstall_1 = \case Japanese -> "パッケージは一つも指摘されていない。" Polish -> "Nie podano pakietów z AUR do zainstalowania." Croatian -> "Nijedan AUR paket nije specificiran za instalaciju." Swedish -> "Inga AUR-paket är valda för installation." German ...
996
getDepsToInstall_1 :: Language -> String getDepsToInstall_1 = \case Japanese -> "パッケージは一つも指摘されていない。" Polish -> "Nie podano pakietów z AUR do zainstalowania." Croatian -> "Nijedan AUR paket nije specificiran za instalaciju." Swedish -> "Inga AUR-paket är valda för installation." German ...
996
getDepsToInstall_1 = \case Japanese -> "パッケージは一つも指摘されていない。" Polish -> "Nie podano pakietów z AUR do zainstalowania." Croatian -> "Nijedan AUR paket nije specificiran za instalaciju." Swedish -> "Inga AUR-paket är valda för installation." German -> "Keine AUR-Pakete zur Installation ve...
955
false
true
0
7
227
101
51
50
null
null
ruuda/hoff
src/Project.hs
apache-2.0
classifyPullRequests :: ProjectState -> [(PullRequestId, PullRequestStatus)] classifyPullRequests state = IntMap.foldMapWithKey aux (pullRequests state) where aux i pr = [(PullRequestId i, classifyPullRequest pr)] -- Returns the ids of the pull requests that satisfy the predicate, in ascending -- order.
311
classifyPullRequests :: ProjectState -> [(PullRequestId, PullRequestStatus)] classifyPullRequests state = IntMap.foldMapWithKey aux (pullRequests state) where aux i pr = [(PullRequestId i, classifyPullRequest pr)] -- Returns the ids of the pull requests that satisfy the predicate, in ascending -- order.
311
classifyPullRequests state = IntMap.foldMapWithKey aux (pullRequests state) where aux i pr = [(PullRequestId i, classifyPullRequest pr)] -- Returns the ids of the pull requests that satisfy the predicate, in ascending -- order.
234
false
true
0
7
44
69
37
32
null
null
xmonad/xmonad-contrib
XMonad/Util/Parser.hs
bsd-3-clause
-- | Parse and return the specified string. string :: String -> Parser String string = coerce ReadP.string
106
string :: String -> Parser String string = coerce ReadP.string
62
string = coerce ReadP.string
28
true
true
0
7
17
30
13
17
null
null
craigbilner/advent-of-code-2016
day-9.hs
apache-2.0
main2 :: IO () main2 = do str <- getLine putStrLn . show . length $ decompress True str
95
main2 :: IO () main2 = do str <- getLine putStrLn . show . length $ decompress True str
95
main2 = do str <- getLine putStrLn . show . length $ decompress True str
80
false
true
0
10
26
49
21
28
null
null
phadej/tsatti
Tsatti.hs
mit
newNickState :: TVar ServerState -> UTCTime -> WS.Connection -> ThreadId -> STM (ServerState, Text) newNickState state clk conn tid = do s <- readTVar state let maybeNick = find (isNothing . flip lookupClient s) nicks case maybeNick of Nothing -> error "can't find new nick" Just nick -> do let s...
476
newNickState :: TVar ServerState -> UTCTime -> WS.Connection -> ThreadId -> STM (ServerState, Text) newNickState state clk conn tid = do s <- readTVar state let maybeNick = find (isNothing . flip lookupClient s) nicks case maybeNick of Nothing -> error "can't find new nick" Just nick -> do let s...
476
newNickState state clk conn tid = do s <- readTVar state let maybeNick = find (isNothing . flip lookupClient s) nicks case maybeNick of Nothing -> error "can't find new nick" Just nick -> do let s' = Client nick conn clk tid : s writeTVar state s' return (s', nick) where nicks = ma...
376
false
true
0
16
114
195
95
100
null
null
gafiatulin/codewars
src/Beta/SlidingPuzzleWorker.hs
mit
slide :: [[Int]] -> Int -> [[Int]] slide xs i = map (map swap) xs where swap x | x == 0 = i | x == i = 0 | otherwise = x
164
slide :: [[Int]] -> Int -> [[Int]] slide xs i = map (map swap) xs where swap x | x == 0 = i | x == i = 0 | otherwise = x
164
slide xs i = map (map swap) xs where swap x | x == 0 = i | x == i = 0 | otherwise = x
129
false
true
0
8
77
89
44
45
null
null
expipiplus1/vulkan
openxr/src/OpenXR/Core10/Space.hs
bsd-3-clause
-- | xrEnumerateReferenceSpaces - Enumerate available reference spaces -- -- == Parameter Descriptions -- -- - @session@ is a handle to an 'OpenXR.Core10.Handles.Session' -- previously created with 'OpenXR.Core10.Device.createSession'. -- -- - @spaceCapacityInput@ is the capacity of the spaces array, or 0 to --...
4,599
enumerateReferenceSpaces :: forall io . (MonadIO io) => -- No documentation found for Nested "xrEnumerateReferenceSpaces" "session" Session -> io (Result, ("spaces" ::: Vector ReferenceSpaceType)) enumerateReferenceS...
1,696
enumerateReferenceSpaces session = liftIO . evalContT $ do let xrEnumerateReferenceSpacesPtr = pXrEnumerateReferenceSpaces (case session of Session{instanceCmds} -> instanceCmds) lift $ unless (xrEnumerateReferenceSpacesPtr /= nullFunPtr) $ throwIO $ IOError Nothing InvalidArgument "" "The function pointer for ...
1,395
true
true
18
17
749
528
314
214
null
null
siddhanathan/ghc
compiler/stgSyn/StgSyn.hs
bsd-3-clause
pprStgArg (StgLitArg con) = ppr con
35
pprStgArg (StgLitArg con) = ppr con
35
pprStgArg (StgLitArg con) = ppr con
35
false
false
0
6
5
19
8
11
null
null
raptros/chatless-hs
src/Api/Auth.hs
bsd-3-clause
callerReauth :: (MonadRespond m, MonadChatless m) => Maybe User -> (User -> m ResponseReceived) -> m ResponseReceived callerReauth maybeCaller = reauthenticate maybeCaller callerAuth
182
callerReauth :: (MonadRespond m, MonadChatless m) => Maybe User -> (User -> m ResponseReceived) -> m ResponseReceived callerReauth maybeCaller = reauthenticate maybeCaller callerAuth
182
callerReauth maybeCaller = reauthenticate maybeCaller callerAuth
64
false
true
0
10
22
61
29
32
null
null
crypto-agda/explore
haskell/FoldMapProperties.hs
bsd-3-clause
monoidHomMemptyLaw :: (Monoid m, Monoid n, Eq n) => MonoidHom m n -> Bool monoidHomMemptyLaw (MonoidHom h) = h mempty == mempty
127
monoidHomMemptyLaw :: (Monoid m, Monoid n, Eq n) => MonoidHom m n -> Bool monoidHomMemptyLaw (MonoidHom h) = h mempty == mempty
127
monoidHomMemptyLaw (MonoidHom h) = h mempty == mempty
53
false
true
0
7
21
57
28
29
null
null
facebookincubator/duckling
Duckling/Time/IT/Rules.hs
bsd-3-clause
ruleNthTimeOfTime2 :: Rule ruleNthTimeOfTime2 = Rule { name = "nth <time> of <time>" , pattern = [ dimension Ordinal , dimension Time , regex "di|del(l[oa'])|in" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal OrdinalData {TOrdinal.value = v}: Token Time td1: ...
445
ruleNthTimeOfTime2 :: Rule ruleNthTimeOfTime2 = Rule { name = "nth <time> of <time>" , pattern = [ dimension Ordinal , dimension Time , regex "di|del(l[oa'])|in" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal OrdinalData {TOrdinal.value = v}: Token Time td1: ...
445
ruleNthTimeOfTime2 = Rule { name = "nth <time> of <time>" , pattern = [ dimension Ordinal , dimension Time , regex "di|del(l[oa'])|in" , dimension Time ] , prod = \tokens -> case tokens of (Token Ordinal OrdinalData {TOrdinal.value = v}: Token Time td1: _: Token Time...
418
false
true
0
17
135
153
78
75
null
null
notae/haskell-exercise
fop/Fop12_2.hs
bsd-3-clause
compressChar ∷ Char → [Bit] compressChar c = compressInt (fromEnum c)
69
compressChar ∷ Char → [Bit] compressChar c = compressInt (fromEnum c)
69
compressChar c = compressInt (fromEnum c)
41
false
true
0
7
10
30
15
15
null
null