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
alexander-at-github/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
d1TyConName = tcQual gHC_GENERICS (fsLit "D1") d1TyConKey
58
d1TyConName = tcQual gHC_GENERICS (fsLit "D1") d1TyConKey
58
d1TyConName = tcQual gHC_GENERICS (fsLit "D1") d1TyConKey
58
false
false
1
7
7
23
9
14
null
null
mariefarrell/Hets
Comorphisms/HasCASL2Haskell.hs
gpl-2.0
kindToTypeArgs :: Int -> RawKind -> [HsType] kindToTypeArgs i k = case k of ClassKind _ -> [] FunKind _ _ kr ps -> hsTyVar (mkSName ('a' : show i) $ toProgPos ps) : kindToTypeArgs (i + 1) kr
252
kindToTypeArgs :: Int -> RawKind -> [HsType] kindToTypeArgs i k = case k of ClassKind _ -> [] FunKind _ _ kr ps -> hsTyVar (mkSName ('a' : show i) $ toProgPos ps) : kindToTypeArgs (i + 1) kr
252
kindToTypeArgs i k = case k of ClassKind _ -> [] FunKind _ _ kr ps -> hsTyVar (mkSName ('a' : show i) $ toProgPos ps) : kindToTypeArgs (i + 1) kr
207
false
true
0
15
100
99
48
51
null
null
lambd0x/Programming_Languages
Haskell/basis/hs0005.hs
gpl-3.0
--AT natural's division divy x y = divy2 (natCV (x))(natCV (y)) Zero where divy2 _ Zero const = error "Error!" divy2 x (Suc Zero) const = x divy2 Zero y const = const divy2 x y const = divy2 (subt x y) y (Suc const) --Regular natural to AT natural
287
divy x y = divy2 (natCV (x))(natCV (y)) Zero where divy2 _ Zero const = error "Error!" divy2 x (Suc Zero) const = x divy2 Zero y const = const divy2 x y const = divy2 (subt x y) y (Suc const) --Regular natural to AT natural
263
divy x y = divy2 (natCV (x))(natCV (y)) Zero where divy2 _ Zero const = error "Error!" divy2 x (Suc Zero) const = x divy2 Zero y const = const divy2 x y const = divy2 (subt x y) y (Suc const) --Regular natural to AT natural
263
true
false
0
8
89
119
59
60
null
null
ryzhyk/cocoon
cocoon/Boogie/BoogieExpr.hs
apache-2.0
mkExpr' (EBinOp _ ShiftL e1 (EInt _ _ i)) = apply "_mod" [mkExpr' e1 .* (pp $ (2^i::Integer)), pp $ (2^w::Integer)] where TUInt _ w = typ' ?r ?c e1
181
mkExpr' (EBinOp _ ShiftL e1 (EInt _ _ i)) = apply "_mod" [mkExpr' e1 .* (pp $ (2^i::Integer)), pp $ (2^w::Integer)] where TUInt _ w = typ' ?r ?c e1
181
mkExpr' (EBinOp _ ShiftL e1 (EInt _ _ i)) = apply "_mod" [mkExpr' e1 .* (pp $ (2^i::Integer)), pp $ (2^w::Integer)] where TUInt _ w = typ' ?r ?c e1
181
false
false
0
11
63
100
51
49
null
null
rrnewton/accelerate
Data/Array/Accelerate/Language.hs
bsd-3-clause
-- | Construct a new array by applying a function to each index. -- -- For example, the following will generate a one-dimensional array -- (`Vector`) of three floating point numbers: -- -- > generate (index1 3) (\_ -> 1.2) -- -- Or, equivalently: -- -- > generate (constant (Z :. (3::Int))) (\_ -> 1.2) -- -- Finally, th...
1,121
generate :: (Shape ix, Elt a) => Exp ix -> (Exp ix -> Exp a) -> Acc (Array ix a) generate = Acc $$ Generate
134
generate = Acc $$ Generate
26
true
true
2
11
237
99
60
39
null
null
oldmanmike/catan
src/Catan/Internal/Logic.hs
bsd-3-clause
zip2Hex [] _ _ _ = []
21
zip2Hex [] _ _ _ = []
21
zip2Hex [] _ _ _ = []
21
false
false
1
6
6
21
8
13
null
null
Concomitant/LambdaHack
GameDefinition/Content/ItemKind.hs
bsd-3-clause
symbolEdged = ')'
22
symbolEdged = ')'
22
symbolEdged = ')'
22
false
false
0
4
7
6
3
3
null
null
schell/lamdu
Lamdu/GUI/ExpressionGui.hs
gpl-3.0
wrapExprEventMap :: MonadA m => Sugar.Payload Sugar.Name m ExprGuiM.Payload -> ExprGuiM m (ExpressionGui m) -> ExprGuiM m (ExpressionGui m) wrapExprEventMap pl action = do (res, resultPickers) <- ExprGuiM.listenResultPickers action addExprEventMap pl resultPickers res
278
wrapExprEventMap :: MonadA m => Sugar.Payload Sugar.Name m ExprGuiM.Payload -> ExprGuiM m (ExpressionGui m) -> ExprGuiM m (ExpressionGui m) wrapExprEventMap pl action = do (res, resultPickers) <- ExprGuiM.listenResultPickers action addExprEventMap pl resultPickers res
278
wrapExprEventMap pl action = do (res, resultPickers) <- ExprGuiM.listenResultPickers action addExprEventMap pl resultPickers res
132
false
true
0
10
42
94
44
50
null
null
SimSaladin/rnfssp
rnfssp-media/MediaSub/Playlist.hs
bsd-3-clause
plGet :: Handler [Entity Playlist] plGet = do uid <- handlerActionIdent lift $ runDB $ selectList [PlaylistOwner ==. uid] []
132
plGet :: Handler [Entity Playlist] plGet = do uid <- handlerActionIdent lift $ runDB $ selectList [PlaylistOwner ==. uid] []
132
plGet = do uid <- handlerActionIdent lift $ runDB $ selectList [PlaylistOwner ==. uid] []
97
false
true
2
11
27
59
25
34
null
null
shlevy/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
dataCast2_RDR = varQual_RDR gENERICS (fsLit "dataCast2")
58
dataCast2_RDR = varQual_RDR gENERICS (fsLit "dataCast2")
58
dataCast2_RDR = varQual_RDR gENERICS (fsLit "dataCast2")
58
false
false
0
7
7
17
8
9
null
null
conal/lambda-ccc
src/LambdaCCC/Unused/NormalizeCore.hs
bsd-3-clause
standardTC :: TyCon -> Bool standardTC tc = (tc `elem` [unitTyCon, boolTyCon, intTyCon]) || isPairTC tc || tyConName tc == eitherTyConName
147
standardTC :: TyCon -> Bool standardTC tc = (tc `elem` [unitTyCon, boolTyCon, intTyCon]) || isPairTC tc || tyConName tc == eitherTyConName
147
standardTC tc = (tc `elem` [unitTyCon, boolTyCon, intTyCon]) || isPairTC tc || tyConName tc == eitherTyConName
119
false
true
3
8
29
64
32
32
null
null
rfranek/duckling
Duckling/Time/PT/Rules.hs
bsd-3-clause
ruleNamedmonth8 :: Rule ruleNamedmonth8 = Rule { name = "named-month" , pattern = [ regex "agosto|ago\\.?" ] , prod = \_ -> tt $ month 8 }
154
ruleNamedmonth8 :: Rule ruleNamedmonth8 = Rule { name = "named-month" , pattern = [ regex "agosto|ago\\.?" ] , prod = \_ -> tt $ month 8 }
154
ruleNamedmonth8 = Rule { name = "named-month" , pattern = [ regex "agosto|ago\\.?" ] , prod = \_ -> tt $ month 8 }
130
false
true
0
10
42
53
29
24
null
null
spechub/Hets
CSL/Symbol.hs
gpl-2.0
-- | application function for Symbol Maps applySymMap :: Map.Map Symbol Symbol -> Symbol -> Symbol applySymMap smap idt = Map.findWithDefault idt idt smap
154
applySymMap :: Map.Map Symbol Symbol -> Symbol -> Symbol applySymMap smap idt = Map.findWithDefault idt idt smap
112
applySymMap smap idt = Map.findWithDefault idt idt smap
55
true
true
0
7
23
41
20
21
null
null
deech/stack
src/Stack/Types/Build.hs
bsd-3-clause
configCacheVC :: VersionConfig ConfigCache configCacheVC = storeVersionConfig "config-v1" "NMEzMXpksE1h7STRzlQ2f6Glkjo="
120
configCacheVC :: VersionConfig ConfigCache configCacheVC = storeVersionConfig "config-v1" "NMEzMXpksE1h7STRzlQ2f6Glkjo="
120
configCacheVC = storeVersionConfig "config-v1" "NMEzMXpksE1h7STRzlQ2f6Glkjo="
77
false
true
1
5
8
22
9
13
null
null
geocurnoff/nikki
src/Graphics/Qt/CPPWrapper.hs
lgpl-3.0
-- | draws a circle using drawEllipse drawCircle :: Ptr QPainter -> Position QtReal -> QtReal -> IO () drawCircle ptr center radius = drawEllipse ptr p s where p = center -~ Position radius radius s = fmap (* 2) $ Size radius radius
246
drawCircle :: Ptr QPainter -> Position QtReal -> QtReal -> IO () drawCircle ptr center radius = drawEllipse ptr p s where p = center -~ Position radius radius s = fmap (* 2) $ Size radius radius
208
drawCircle ptr center radius = drawEllipse ptr p s where p = center -~ Position radius radius s = fmap (* 2) $ Size radius radius
143
true
true
0
9
58
87
42
45
null
null
ezyang/ghc
libraries/base/GHC/Word.hs
bsd-3-clause
a `shiftRL64#` b | isTrue# (b >=# 64#) = wordToWord64# 0## | otherwise = a `uncheckedShiftRL64#` b
125
a `shiftRL64#` b | isTrue# (b >=# 64#) = wordToWord64# 0## | otherwise = a `uncheckedShiftRL64#` b
125
a `shiftRL64#` b | isTrue# (b >=# 64#) = wordToWord64# 0## | otherwise = a `uncheckedShiftRL64#` b
125
false
false
0
10
43
52
24
28
null
null
Lykos/Sara
src/lib/Sara/Ast/Builtins.hs
gpl-3.0
stringToBuiltinVar :: String -> Maybe BuiltinVar stringToBuiltinVar "result" = Just Result
90
stringToBuiltinVar :: String -> Maybe BuiltinVar stringToBuiltinVar "result" = Just Result
90
stringToBuiltinVar "result" = Just Result
41
false
true
0
6
10
24
11
13
null
null
lukexi/ghc-7.8-arm64
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
- for 32-bit architectuers, support some 64 -> 32 bit conversions: -- TO_W_(x), TO_W_(x >> 32) getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) [CmmMachOp (MO_U_Shr W64) [x,CmmLit (CmmInt 32 _)]]) | target32Bit (targetPlatform dflags) = do ChildCode64 code rlo <- iselExpr64 x return $ ...
358
getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) [CmmMachOp (MO_U_Shr W64) [x,CmmLit (CmmInt 32 _)]]) | target32Bit (targetPlatform dflags) = do ChildCode64 code rlo <- iselExpr64 x return $ Fixed II32 (getHiVRegFromLo rlo) code
257
getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) [CmmMachOp (MO_U_Shr W64) [x,CmmLit (CmmInt 32 _)]]) | target32Bit (targetPlatform dflags) = do ChildCode64 code rlo <- iselExpr64 x return $ Fixed II32 (getHiVRegFromLo rlo) code
257
true
false
1
13
79
138
64
74
null
null
trbauer/progargs
Prog/Args/Impl.hs
mit
fmtOptsOverview :: [OptSpec o] -> String fmtOptsOverview os = concatMap fmtOs os where fmtOs o -- only suffix with \n if the description doesn't include it | null s = "" | last s == '\n' = s | otherwise = s ++ "\n" where s = fmtOptSpecC (computeOptsColumnWidths os)...
322
fmtOptsOverview :: [OptSpec o] -> String fmtOptsOverview os = concatMap fmtOs os where fmtOs o -- only suffix with \n if the description doesn't include it | null s = "" | last s == '\n' = s | otherwise = s ++ "\n" where s = fmtOptSpecC (computeOptsColumnWidths os)...
322
fmtOptsOverview os = concatMap fmtOs os where fmtOs o -- only suffix with \n if the description doesn't include it | null s = "" | last s == '\n' = s | otherwise = s ++ "\n" where s = fmtOptSpecC (computeOptsColumnWidths os) o
281
false
true
0
9
105
96
45
51
null
null
nightscape/platform
shared/src/Unison/Typechecker/Context.hs
mit
usedVars :: Context v -> Set v usedVars = allVars . info
56
usedVars :: Context v -> Set v usedVars = allVars . info
56
usedVars = allVars . info
25
false
true
0
6
11
25
12
13
null
null
ezyang/ghc
compiler/utils/Outputable.hs
bsd-3-clause
warnPprTrace False _file _line _msg x = x
41
warnPprTrace False _file _line _msg x = x
41
warnPprTrace False _file _line _msg x = x
41
false
false
0
5
7
17
8
9
null
null
Javran/Project-Euler
src/ProjectEuler/Problem51.hs
mit
oneNumToMask :: Digits -> [[Int]] oneNumToMask xs = -- first element is empty therefore ignore it. tail $ powerset onePos where -- all position of ones -- all possible masks is just the non-empty powerset of this onePos = map fst $ filter ((== 1). snd) $ zip [0..] xs -- compute the powerset of ...
326
oneNumToMask :: Digits -> [[Int]] oneNumToMask xs = -- first element is empty therefore ignore it. tail $ powerset onePos where -- all position of ones -- all possible masks is just the non-empty powerset of this onePos = map fst $ filter ((== 1). snd) $ zip [0..] xs -- compute the powerset of ...
326
oneNumToMask xs = -- first element is empty therefore ignore it. tail $ powerset onePos where -- all position of ones -- all possible masks is just the non-empty powerset of this onePos = map fst $ filter ((== 1). snd) $ zip [0..] xs -- compute the powerset of a list
292
false
true
0
10
81
76
41
35
null
null
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Dependency.hs
gpl-3.0
standardInstallPolicy :: InstalledPackageIndex.PackageIndex -> SourcePackageDb -> [PackageSpecifier SourcePackage] -> DepResolverParams standardInstallPolicy installedPkgIndex (SourcePackageDb sourcePkgIndex sourcePkgPrefs) pkgSpecifiers = add...
832
standardInstallPolicy :: InstalledPackageIndex.PackageIndex -> SourcePackageDb -> [PackageSpecifier SourcePackage] -> DepResolverParams standardInstallPolicy installedPkgIndex (SourcePackageDb sourcePkgIndex sourcePkgPrefs) pkgSpecifiers = add...
832
standardInstallPolicy installedPkgIndex (SourcePackageDb sourcePkgIndex sourcePkgPrefs) pkgSpecifiers = addPreferences [ PackageVersionPreference name ver | (name, ver) <- Map.toList sourcePkgPrefs ] . addConstraints (concatMap pkgSpecifierConstraints pkgSpecifiers) . addTargets ...
630
false
true
6
10
198
165
77
88
null
null
nbloomf/feivel
src/Feivel/Eval/EvalM.hs
gpl-3.0
observeBinomial :: Locus -> Integer -> Double -> EvalM Integer observeBinomial loc n p = do if n <= 0 then reportErr loc EmptySampleSpace else if p < 0 || p > 1 then reportErr loc $ InvalidProbability p else lift $ lift $ integralBinomial n p
264
observeBinomial :: Locus -> Integer -> Double -> EvalM Integer observeBinomial loc n p = do if n <= 0 then reportErr loc EmptySampleSpace else if p < 0 || p > 1 then reportErr loc $ InvalidProbability p else lift $ lift $ integralBinomial n p
264
observeBinomial loc n p = do if n <= 0 then reportErr loc EmptySampleSpace else if p < 0 || p > 1 then reportErr loc $ InvalidProbability p else lift $ lift $ integralBinomial n p
201
false
true
0
12
68
101
48
53
null
null
phischu/fragnix
builtins/base/GHC.Show.hs
bsd-3-clause
isDec :: Char -> Bool isDec c = c >= '0' && c <= '9'
52
isDec :: Char -> Bool isDec c = c >= '0' && c <= '9'
52
isDec c = c >= '0' && c <= '9'
30
false
true
6
7
14
41
18
23
null
null
haasn/colour
Data/Colour/Names.hs
mit
readColourName "azure" = return azure
37
readColourName "azure" = return azure
37
readColourName "azure" = return azure
37
false
false
1
5
4
15
5
10
null
null
et4te/zero
server/src/Zero/Exchange/Model.hs
bsd-3-clause
lowestAsk :: SessionId -> Connection -> IO (Maybe Ask) lowestAsk sid conn = do let askRel = RelationVariable "ask" () rel <- handleIOError $ executeRelationalExpr sid conn askRel asks <- toList rel >>= mapM (handleError . fromTuple) :: IO [Ask] if length asks > 0 then do let ask = minimumBy (\x y -> compare...
444
lowestAsk :: SessionId -> Connection -> IO (Maybe Ask) lowestAsk sid conn = do let askRel = RelationVariable "ask" () rel <- handleIOError $ executeRelationalExpr sid conn askRel asks <- toList rel >>= mapM (handleError . fromTuple) :: IO [Ask] if length asks > 0 then do let ask = minimumBy (\x y -> compare...
444
lowestAsk sid conn = do let askRel = RelationVariable "ask" () rel <- handleIOError $ executeRelationalExpr sid conn askRel asks <- toList rel >>= mapM (handleError . fromTuple) :: IO [Ask] if length asks > 0 then do let ask = minimumBy (\x y -> compare (a_price x) (a_price y)) asks return (Just ask) ...
389
false
true
0
18
97
175
83
92
null
null
keera-studios/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
withQTextLayout__FormatRangeResult :: IO (Ptr (TQTextLayout__FormatRange a)) -> IO (QTextLayout__FormatRange a) withQTextLayout__FormatRangeResult f = withObjectRefResult f
174
withQTextLayout__FormatRangeResult :: IO (Ptr (TQTextLayout__FormatRange a)) -> IO (QTextLayout__FormatRange a) withQTextLayout__FormatRangeResult f = withObjectRefResult f
174
withQTextLayout__FormatRangeResult f = withObjectRefResult f
62
false
true
0
10
16
45
21
24
null
null
JAnthelme/relation-tool
src/Relvar/Pretty.hs
bsd-3-clause
vline bbot rhs rn = vcat left xs where xss = map (\ rh -> (replicate rh $ text "|") ++ [text "+"]) rhs xs = case bbot of True -> concat xss False -> init $ concat xss
218
vline bbot rhs rn = vcat left xs where xss = map (\ rh -> (replicate rh $ text "|") ++ [text "+"]) rhs xs = case bbot of True -> concat xss False -> init $ concat xss
218
vline bbot rhs rn = vcat left xs where xss = map (\ rh -> (replicate rh $ text "|") ++ [text "+"]) rhs xs = case bbot of True -> concat xss False -> init $ concat xss
218
false
false
0
13
90
92
45
47
null
null
mdlugajczyk/hscm
src/Hscm/Evaluate.hs
bsd-3-clause
eval :: Expression -> Expression eval expr@(Symbol _) = expr
60
eval :: Expression -> Expression eval expr@(Symbol _) = expr
60
eval expr@(Symbol _) = expr
27
false
true
2
7
9
33
15
18
null
null
expipiplus1/vulkan
generate-new/src/Spec/Parse.hs
bsd-3-clause
parseCommands :: [Content] -> P (Vector Command) parseCommands es = fmap fromList . traverseV parseCommand $ [ n | Element n <- es, name n == "command", not (isAlias n) ] where parseCommand :: Node -> P Command parseCommand n = do cSuccessCodes <- listAttr decode "successcodes" n cErrorCodes <...
1,491
parseCommands :: [Content] -> P (Vector Command) parseCommands es = fmap fromList . traverseV parseCommand $ [ n | Element n <- es, name n == "command", not (isAlias n) ] where parseCommand :: Node -> P Command parseCommand n = do cSuccessCodes <- listAttr decode "successcodes" n cErrorCodes <...
1,491
parseCommands es = fmap fromList . traverseV parseCommand $ [ n | Element n <- es, name n == "command", not (isAlias n) ] where parseCommand :: Node -> P Command parseCommand n = do cSuccessCodes <- listAttr decode "successcodes" n cErrorCodes <- listAttr decode "errorcodes" n proto ...
1,442
false
true
0
15
391
433
202
231
null
null
robstewart57/hdph-rs
src/Control/Parallel/HdpH/Internal/Sparkpool.hs
bsd-3-clause
clearFishingFlag = do s_fishing <$> ask >>= \ref -> liftIO (atomicWriteIORef ref Nothing)
91
clearFishingFlag = do s_fishing <$> ask >>= \ref -> liftIO (atomicWriteIORef ref Nothing)
91
clearFishingFlag = do s_fishing <$> ask >>= \ref -> liftIO (atomicWriteIORef ref Nothing)
91
false
false
0
11
14
33
16
17
null
null
JackKiefer/herms
src/Lang/Strings.hs
gpl-3.0
changesDiscarded = "Changes discarded."
39
changesDiscarded = "Changes discarded."
39
changesDiscarded = "Changes discarded."
39
false
false
0
4
3
6
3
3
null
null
markus1189/lambda-feed
src/LambdaFeed/Main.hs
gpl-3.0
setupGui :: (GuiEvent -> IO Bool) -> IO (SwitchTo, LFWidgets, Collection) setupGui trigger = do header <- plainText "λ Feed" infoBar <- plainTextWithAttrs [("j/k",defAttr `withForeColor` orange) ,(":move | ",defAttr) ,("i",defAttr `withForeColor` oran...
5,968
setupGui :: (GuiEvent -> IO Bool) -> IO (SwitchTo, LFWidgets, Collection) setupGui trigger = do header <- plainText "λ Feed" infoBar <- plainTextWithAttrs [("j/k",defAttr `withForeColor` orange) ,(":move | ",defAttr) ,("i",defAttr `withForeColor` oran...
5,968
setupGui trigger = do header <- plainText "λ Feed" infoBar <- plainTextWithAttrs [("j/k",defAttr `withForeColor` orange) ,(":move | ",defAttr) ,("i",defAttr `withForeColor` orange) ,(":bookmark | ",defAttr) ...
5,894
false
true
0
20
1,645
1,958
1,003
955
null
null
keithodulaigh/Hets
RelationalScheme/Keywords.hs
gpl-2.0
rsBinId :: Id rsBinId = stringToId rsBin
40
rsBinId :: Id rsBinId = stringToId rsBin
40
rsBinId = stringToId rsBin
26
false
true
0
6
6
21
8
13
null
null
begriffs/hs-webdriver
test/search-baidu.hs
bsd-3-clause
testSuits = mapM_ testCase [capsFF, capsChrome]
48
testSuits = mapM_ testCase [capsFF, capsChrome]
48
testSuits = mapM_ testCase [capsFF, capsChrome]
48
false
false
0
6
6
17
9
8
null
null
dkensinger/haskell
haskell-primes/NaiveSieveWheelTest.hs
gpl-3.0
printNthPrime :: Int -> IO () printNthPrime n = print (n, primes !! (n - 1))
76
printNthPrime :: Int -> IO () printNthPrime n = print (n, primes !! (n - 1))
76
printNthPrime n = print (n, primes !! (n - 1))
46
false
true
0
9
15
47
23
24
null
null
KeyboardFire/caveman-duels
players/PrisonRules/PrisonRules.hs
mit
history [] = ""
18
history [] = ""
18
history [] = ""
18
false
false
0
6
6
11
5
6
null
null
SRechenberger/grammata
src/Grammata/Machine.hs
gpl-3.0
iTrackBack :: () => CoreStatement m -- ^ Trackback statement. iTrackBack = IBackTrack
103
iTrackBack :: () => CoreStatement m iTrackBack = IBackTrack
68
iTrackBack = IBackTrack
23
true
true
0
7
30
21
11
10
null
null
oldmanmike/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
usedIn :: Id -> UsageDetails -> Bool v `usedIn` details = isExportedId v || v `elemVarEnv` details
98
usedIn :: Id -> UsageDetails -> Bool v `usedIn` details = isExportedId v || v `elemVarEnv` details
98
v `usedIn` details = isExportedId v || v `elemVarEnv` details
61
false
true
0
7
16
44
22
22
null
null
bhamrick/htwitch
Twitch.hs
mit
getChannelEditors :: String -> APICall [TwitchUser] getChannelEditors channel = APICall { request = R.getChannelEditors channel , parser = (unpackJSON >=> (.! "users")) . C.responseBody }
193
getChannelEditors :: String -> APICall [TwitchUser] getChannelEditors channel = APICall { request = R.getChannelEditors channel , parser = (unpackJSON >=> (.! "users")) . C.responseBody }
193
getChannelEditors channel = APICall { request = R.getChannelEditors channel , parser = (unpackJSON >=> (.! "users")) . C.responseBody }
141
false
true
0
11
30
67
35
32
null
null
yav/allegro
src/Allegro/Font.hs
bsd-3-clause
defaultFontFlags :: FontFlags defaultFontFlags = FontFlags { noKerning = False , monochrome = False , noAutoHint = False }
180
defaultFontFlags :: FontFlags defaultFontFlags = FontFlags { noKerning = False , monochrome = False , noAutoHint = False }
180
defaultFontFlags = FontFlags { noKerning = False , monochrome = False , noAutoHint = False }
150
false
true
0
7
76
38
20
18
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Compiler.hs
bsd-3-clause
compileProcedure (IfThenElseL8Unit e cb1 cb2) = compileIfThenElseEitherProcedure List8Type UnitType e cb1 cb2
113
compileProcedure (IfThenElseL8Unit e cb1 cb2) = compileIfThenElseEitherProcedure List8Type UnitType e cb1 cb2
113
compileProcedure (IfThenElseL8Unit e cb1 cb2) = compileIfThenElseEitherProcedure List8Type UnitType e cb1 cb2
113
false
false
0
7
15
30
14
16
null
null
Philonous/pontarius-xmpp
source/Network/Xmpp/Marshal.hs
bsd-3-clause
---------------------------------------------------------- -- Errors ---------------------------------------------------------- xpStanzaErrorCondition :: PU [Node] StanzaErrorCondition xpStanzaErrorCondition = ("xpErrorCondition" , "") <?+> xpWrapEither (\(cond, (),cont) -> case (cond, cont) of ...
4,542
xpStanzaErrorCondition :: PU [Node] StanzaErrorCondition xpStanzaErrorCondition = ("xpErrorCondition" , "") <?+> xpWrapEither (\(cond, (),cont) -> case (cond, cont) of (Gone _, x) -> Right $ Gone x (Redirect _, x) -> Right $ Redirect x ...
4,413
xpStanzaErrorCondition = ("xpErrorCondition" , "") <?+> xpWrapEither (\(cond, (),cont) -> case (cond, cont) of (Gone _, x) -> Right $ Gone x (Redirect _, x) -> Right $ Redirect x (x , Nothing) -> Right x ...
4,356
true
true
0
13
895
659
341
318
null
null
nh2/shake
Development/Shake/Util.hs
bsd-3-clause
withLockTry :: Lock -> IO a -> IO (Maybe a) withLockTry (Lock m) act = mask $ \restore -> do a <- tryTakeMVar m case a of Nothing -> return Nothing Just _ -> restore (fmap Just act) `finally` putMVar m () ---------------------------------------------------------------------...
371
withLockTry :: Lock -> IO a -> IO (Maybe a) withLockTry (Lock m) act = mask $ \restore -> do a <- tryTakeMVar m case a of Nothing -> return Nothing Just _ -> restore (fmap Just act) `finally` putMVar m () ---------------------------------------------------------------------...
371
withLockTry (Lock m) act = mask $ \restore -> do a <- tryTakeMVar m case a of Nothing -> return Nothing Just _ -> restore (fmap Just act) `finally` putMVar m () --------------------------------------------------------------------- -- VAR -- | Like an MVar, but must always ...
327
false
true
0
15
101
113
55
58
null
null
thoughtpolice/hs-nacl
tests/SHA.hs
bsd-3-clause
length256 :: ByteString -> Bool length256 xs = S.length (sha256 xs) == 32
73
length256 :: ByteString -> Bool length256 xs = S.length (sha256 xs) == 32
73
length256 xs = S.length (sha256 xs) == 32
41
false
true
0
8
12
33
16
17
null
null
dalaing/free
src/Control/Comonad/Trans/Cofree.hs
bsd-3-clause
{- | Unpeel the first layer off a cofree comonad value. @runCofree@ is a right inverse of `cofree`. @ cofree . runCofree == id @ -} runCofree :: Cofree f a -> CofreeF f a (Cofree f a) runCofree = runIdentity . runCofreeT
222
runCofree :: Cofree f a -> CofreeF f a (Cofree f a) runCofree = runIdentity . runCofreeT
88
runCofree = runIdentity . runCofreeT
36
true
true
0
8
44
40
20
20
null
null
tjakway/ghcjvm
compiler/profiling/ProfInit.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Initialising cost centres -- We must produce declarations for the cost-centres defined in this -- module; profilingInitCode :: Module -> CollectedCCs -> SDoc profilingInitCode this_mod (local_CCs, ___extern_CCs, singleton_CCSs) = sdo...
1,126
profilingInitCode :: Module -> CollectedCCs -> SDoc profilingInitCode this_mod (local_CCs, ___extern_CCs, singleton_CCSs) = sdocWithDynFlags $ \dflags -> if not (gopt Opt_SccProfilingOn dflags) then empty else vcat [ text "static void prof_init_" <> ppr this_mod <> text "(void) __attribute__((con...
934
profilingInitCode this_mod (local_CCs, ___extern_CCs, singleton_CCSs) = sdocWithDynFlags $ \dflags -> if not (gopt Opt_SccProfilingOn dflags) then empty else vcat [ text "static void prof_init_" <> ppr this_mod <> text "(void) __attribute__((constructor));" , text "static void prof_init_" <> ...
882
true
true
0
12
263
272
133
139
null
null
spaceships/circuit-synthesis
src/Circuit/Format/Acirc.hs
mit
showTest :: TestCase -> T.Text showTest (!inp, !out) = T.concat [":test ", T.pack (showInts inp), " ", T.pack (showInts out) ]
126
showTest :: TestCase -> T.Text showTest (!inp, !out) = T.concat [":test ", T.pack (showInts inp), " ", T.pack (showInts out) ]
126
showTest (!inp, !out) = T.concat [":test ", T.pack (showInts inp), " ", T.pack (showInts out) ]
95
false
true
0
9
20
71
35
36
null
null
binesiyu/ifl
ifpt-master/Parser.hs
mit
pExpr2 :: Parser CoreExpr pExpr2 = pThen assembleOp pExpr3 pExpr2c
66
pExpr2 :: Parser CoreExpr pExpr2 = pThen assembleOp pExpr3 pExpr2c
66
pExpr2 = pThen assembleOp pExpr3 pExpr2c
40
false
true
0
5
9
21
10
11
null
null
bobgru/conifer
src/Conics.hs
bsd-3-clause
quadraticFactors ps = Matrix (map mkRow ps)
43
quadraticFactors ps = Matrix (map mkRow ps)
43
quadraticFactors ps = Matrix (map mkRow ps)
43
false
false
0
7
6
20
9
11
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
osApiV20 :: Int osApiV20 = 20
29
osApiV20 :: Int osApiV20 = 20
29
osApiV20 = 20
13
false
true
0
6
5
18
7
11
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2011-Learn_You_a_Haskell/Learn_You_a_Haskell.hs
unlicense
-- foldl1/foldr1 do not need explicit starting value -- use first/last element as start -- fold begins with the element next to start sumF1 = foldl1 (+)
153
sumF1 = foldl1 (+)
18
sumF1 = foldl1 (+)
18
true
false
1
5
27
18
9
9
null
null
juodaspaulius/bclafer_old
src/Language/Clafer/Front/LayoutResolver.hs
mit
isLayoutOpen :: Token -> Bool isLayoutOpen = isTokenIn [layoutOpen]
67
isLayoutOpen :: Token -> Bool isLayoutOpen = isTokenIn [layoutOpen]
67
isLayoutOpen = isTokenIn [layoutOpen]
37
false
true
0
6
8
21
11
10
null
null
rfranek/duckling
Duckling/Time/SV/Rules.hs
bsd-3-clause
ruleDurationBeforeTime :: Rule ruleDurationBeforeTime = Rule { name = "<duration> before <time>" , pattern = [ dimension Duration , regex "f\x00f6re" , dimension Time ] , prod = \tokens -> case tokens of (Token Duration dd:_:Token Time td:_) -> tt $ durationBefore dd td _ -> No...
329
ruleDurationBeforeTime :: Rule ruleDurationBeforeTime = Rule { name = "<duration> before <time>" , pattern = [ dimension Duration , regex "f\x00f6re" , dimension Time ] , prod = \tokens -> case tokens of (Token Duration dd:_:Token Time td:_) -> tt $ durationBefore dd td _ -> No...
329
ruleDurationBeforeTime = Rule { name = "<duration> before <time>" , pattern = [ dimension Duration , regex "f\x00f6re" , dimension Time ] , prod = \tokens -> case tokens of (Token Duration dd:_:Token Time td:_) -> tt $ durationBefore dd td _ -> Nothing }
298
false
true
0
16
91
108
56
52
null
null
nbloomf/feivel
src/Feivel/Parse/Expr.hs
gpl-3.0
pTypedConst (TupleOf ts) = fmap TupleE (pTupleConst ts pTypedConst)
67
pTypedConst (TupleOf ts) = fmap TupleE (pTupleConst ts pTypedConst)
67
pTypedConst (TupleOf ts) = fmap TupleE (pTupleConst ts pTypedConst)
67
false
false
0
7
8
28
13
15
null
null
joelburget/haste-compiler
examples/ffi/ffi.hs
bsd-3-clause
-- | Since we can't name it '$', let's just call it 'j'. j :: String -> (JQuery -> IO ()) -> IO () j s action = js_jquery (toJSString s) >>= action
147
j :: String -> (JQuery -> IO ()) -> IO () j s action = js_jquery (toJSString s) >>= action
90
j s action = js_jquery (toJSString s) >>= action
48
true
true
0
10
32
60
28
32
null
null
jtojnar/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/PrimopWrappers.hs
bsd-3-clause
copyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# s -> State# s copyByteArrayToAddr# a1 a2 a3 a4 a5 = (GHC.Prim.copyByteArrayToAddr#) a1 a2 a3 a4 a5
168
copyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# s -> State# s copyByteArrayToAddr# a1 a2 a3 a4 a5 = (GHC.Prim.copyByteArrayToAddr#) a1 a2 a3 a4 a5
168
copyByteArrayToAddr# a1 a2 a3 a4 a5 = (GHC.Prim.copyByteArrayToAddr#) a1 a2 a3 a4 a5
84
false
true
0
10
27
65
32
33
null
null
gafiatulin/codewars
src/5 kyu/LookAndSay.hs
mit
lookSay :: Integer -> Integer lookSay = read . concatMap (uncurry (++) . ((show . length) &&& ((: []) . head))) . group . show
126
lookSay :: Integer -> Integer lookSay = read . concatMap (uncurry (++) . ((show . length) &&& ((: []) . head))) . group . show
126
lookSay = read . concatMap (uncurry (++) . ((show . length) &&& ((: []) . head))) . group . show
96
false
true
1
14
24
77
39
38
null
null
sgord512/Utilities
Util/String/Align.hs
mit
alignAtChar :: Char -> [String] -> [String] alignAtChar c strs = let strRows = map (splitAtChar c) strs maxRowLength = maximum $ map length strRows strRows' = map (padStringsToLength maxRowLength) strRows strCols = transpose strRows' ...
514
alignAtChar :: Char -> [String] -> [String] alignAtChar c strs = let strRows = map (splitAtChar c) strs maxRowLength = maximum $ map length strRows strRows' = map (padStringsToLength maxRowLength) strRows strCols = transpose strRows' ...
514
alignAtChar c strs = let strRows = map (splitAtChar c) strs maxRowLength = maximum $ map length strRows strRows' = map (padStringsToLength maxRowLength) strRows strCols = transpose strRows' paddedCols = map (padToMaximum...
470
false
true
0
12
200
142
71
71
null
null
grnet/snf-ganeti
src/Ganeti/Types.hs
bsd-2-clause
localDiskStatusName DiskStatusSync = "syncing"
46
localDiskStatusName DiskStatusSync = "syncing"
46
localDiskStatusName DiskStatusSync = "syncing"
46
false
false
0
4
3
10
4
6
null
null
keithodulaigh/Hets
CSL/MathematicaInterpreter.hs
gpl-2.0
mathematicaOperatorInfo :: [OpInfo] mathematicaOperatorInfo = toFlexFold mmFlexFoldOpList operatorInfo
102
mathematicaOperatorInfo :: [OpInfo] mathematicaOperatorInfo = toFlexFold mmFlexFoldOpList operatorInfo
102
mathematicaOperatorInfo = toFlexFold mmFlexFoldOpList operatorInfo
66
false
true
0
5
7
19
10
9
null
null
ghorn/ois-input-manager
src/Key.hs
bsd-3-clause
decodeKey 10 = KC_9
19
decodeKey 10 = KC_9
19
decodeKey 10 = KC_9
19
false
false
1
5
3
13
4
9
null
null
mstksg/hledger
hledger-lib/Hledger/Reports/TransactionsReports.hs
gpl-3.0
triDate (_,tacct,_,_,_,_) = tdate tacct
39
triDate (_,tacct,_,_,_,_) = tdate tacct
39
triDate (_,tacct,_,_,_,_) = tdate tacct
39
false
false
0
6
4
30
17
13
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
mpl-2.0
-- | Resource name of the DICOM store, of the form -- \`projects\/{project_id}\/locations\/{location_id}\/datasets\/{dataset_id}\/dicomStores\/{dicom_store_id}\`. dName :: Lens' DicomStore (Maybe Text) dName = lens _dName (\ s a -> s{_dName = a})
246
dName :: Lens' DicomStore (Maybe Text) dName = lens _dName (\ s a -> s{_dName = a})
83
dName = lens _dName (\ s a -> s{_dName = a})
44
true
true
2
9
29
56
26
30
null
null
ocean0yohsuke/deepcontrol
DeepControl/Applicative.hs
bsd-3-clause
(--**>) :: (Applicative f1, Applicative f2, Applicative f3, Applicative f4) => f1 (f2 a) -> f1 (f2 (f3 (f4 b))) -> f1 (f2 (f3 (f4 b))) a --**> x = (--**) a *>>>> x
163
(--**>) :: (Applicative f1, Applicative f2, Applicative f3, Applicative f4) => f1 (f2 a) -> f1 (f2 (f3 (f4 b))) -> f1 (f2 (f3 (f4 b))) a --**> x = (--**) a *>>>> x
163
a --**> x = (--**) a *>>>> x
28
false
true
0
16
33
114
57
57
null
null
WSCU/JSEuterpea
Euterpea Examples/SimpleEuterpea.hs
gpl-3.0
f5 = pitchToMusic 73
21
df5 = pitchToMusic 73
21
df5 = pitchToMusic 73
21
false
false
0
5
4
9
4
5
null
null
jwiegley/ghc-release
libraries/containers/Data/IntMap/Strict.hs
gpl-3.0
fromSet :: (Key -> a) -> IntSet.IntSet -> IntMap a fromSet _ IntSet.Nil = Nil
77
fromSet :: (Key -> a) -> IntSet.IntSet -> IntMap a fromSet _ IntSet.Nil = Nil
77
fromSet _ IntSet.Nil = Nil
26
false
true
0
7
14
38
19
19
null
null
pparkkin/eta
compiler/ETA/Prelude/TysPrim.hs
bsd-3-clause
alphaTy, betaTy, gammaTy, deltaTy :: Type (alphaTy:betaTy:gammaTy:deltaTy:_) = alphaTys
87
alphaTy, betaTy, gammaTy, deltaTy :: Type (alphaTy:betaTy:gammaTy:deltaTy:_) = alphaTys
87
(alphaTy:betaTy:gammaTy:deltaTy:_) = alphaTys
45
false
true
4
9
8
46
22
24
null
null
ssaavedra/liquidhaskell
tests/pos/RBTree-height.hs
bsd-3-clause
-------------------------------------------------------------------------- -- | Add an element ------------------------------------------------------- --------------------------------------------------------------------------- {-@ add :: (Ord a) => a -> RBT a -> RBT a @-} add x s = makeBlack (ins x s)
304
add x s = makeBlack (ins x s)
29
add x s = makeBlack (ins x s)
29
true
false
0
7
31
27
14
13
null
null
HIPERFIT/futhark
src/Futhark/Internalise/Exps.hs
isc
internaliseBinOp _ desc E.Divide x y (E.FloatType t) _ = simpleBinOp desc (I.FDiv t) x y
90
internaliseBinOp _ desc E.Divide x y (E.FloatType t) _ = simpleBinOp desc (I.FDiv t) x y
90
internaliseBinOp _ desc E.Divide x y (E.FloatType t) _ = simpleBinOp desc (I.FDiv t) x y
90
false
false
0
8
17
48
23
25
null
null
smobs/99Problems
test/Problems/Lists.hs
bsd-3-clause
lastProp :: [TestType] -> Bool lastProp [] = True
50
lastProp :: [TestType] -> Bool lastProp [] = True
49
lastProp [] = True
18
false
true
0
6
9
23
12
11
null
null
nick8325/kbc
misc/test.hs
bsd-3-clause
prop_index :: [Term Func] -> Term Func -> Property prop_index ts u = counterexample (show ts) $ counterexample (show idx) $ sort (catMaybes [fmap (,t) (match t u) | t <- ts]) === sort (Index.matches u idx) where idx = foldr (\t -> Index.insert t t) Index.empty ts
277
prop_index :: [Term Func] -> Term Func -> Property prop_index ts u = counterexample (show ts) $ counterexample (show idx) $ sort (catMaybes [fmap (,t) (match t u) | t <- ts]) === sort (Index.matches u idx) where idx = foldr (\t -> Index.insert t t) Index.empty ts
277
prop_index ts u = counterexample (show ts) $ counterexample (show idx) $ sort (catMaybes [fmap (,t) (match t u) | t <- ts]) === sort (Index.matches u idx) where idx = foldr (\t -> Index.insert t t) Index.empty ts
226
false
true
5
11
61
156
72
84
null
null
thalerjonathan/phd
public/towards/SugarScape/experimental/concurrent/src/SugarScape/Agent/Common.hs
gpl-3.0
randomFertilityRange :: MonadRandom m => SugarScapeScenario -> AgentGender -> m (Int, Int) randomFertilityRange params Male = do from <- getRandomR $ spFertStartRangeMale params to <- getRandomR $ spFertEndRangeMale params return (from, to)
319
randomFertilityRange :: MonadRandom m => SugarScapeScenario -> AgentGender -> m (Int, Int) randomFertilityRange params Male = do from <- getRandomR $ spFertStartRangeMale params to <- getRandomR $ spFertEndRangeMale params return (from, to)
318
randomFertilityRange params Male = do from <- getRandomR $ spFertStartRangeMale params to <- getRandomR $ spFertEndRangeMale params return (from, to)
160
false
true
0
9
110
80
38
42
null
null
abasko/linkedhashmap
src/Data/LinkedHashMap/Seq.hs
bsd-3-clause
adjust :: (Eq k, Hashable k) => (v -> v) -> k -> LinkedHashMap k v -> LinkedHashMap k v adjust f k (LinkedHashMap m s n) = LinkedHashMap m' s' n where m' = M.adjust f' k m f' (Entry ix v) = Entry ix $ f v s' = case M.lookup k m' of Just (Entry ix v) -> S.update ix (JustPair k v) s No...
494
adjust :: (Eq k, Hashable k) => (v -> v) -> k -> LinkedHashMap k v -> LinkedHashMap k v adjust f k (LinkedHashMap m s n) = LinkedHashMap m' s' n where m' = M.adjust f' k m f' (Entry ix v) = Entry ix $ f v s' = case M.lookup k m' of Just (Entry ix v) -> S.update ix (JustPair k v) s No...
494
adjust f k (LinkedHashMap m s n) = LinkedHashMap m' s' n where m' = M.adjust f' k m f' (Entry ix v) = Entry ix $ f v s' = case M.lookup k m' of Just (Entry ix v) -> S.update ix (JustPair k v) s Nothing -> s -- | /O(m*log n)/ The union of two maps, n - size of the first map. If a key...
406
false
true
0
10
142
180
88
92
null
null
Rufflewind/sci-ratio
src/Data/SciRatio.hs
mit
(^^!) :: (Fractional a, Real a, Integral b, Integral c) => SciRatio a b -> c -> SciRatio a b (x :^ a) ^^! b = x ^^ b :^ (a * fromIntegral b)
149
(^^!) :: (Fractional a, Real a, Integral b, Integral c) => SciRatio a b -> c -> SciRatio a b (x :^ a) ^^! b = x ^^ b :^ (a * fromIntegral b)
149
(x :^ a) ^^! b = x ^^ b :^ (a * fromIntegral b)
47
false
true
4
12
42
95
46
49
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo IndexJByteArrayOp = mkGenPrimOp (fsLit "indexJByteArray#") [alphaTyVar] [ mkObjectPrimTy alphaTy, intPrimTy] $ jbytePrimTy
143
primOpInfo IndexJByteArrayOp = mkGenPrimOp (fsLit "indexJByteArray#") [alphaTyVar] [ mkObjectPrimTy alphaTy, intPrimTy] $ jbytePrimTy
143
primOpInfo IndexJByteArrayOp = mkGenPrimOp (fsLit "indexJByteArray#") [alphaTyVar] [ mkObjectPrimTy alphaTy, intPrimTy] $ jbytePrimTy
143
false
false
0
7
22
41
19
22
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | Creates a value of 'DHCPOptions' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'doDHCPConfigurations' -- -- * 'doDHCPOptionsId' -- -- * 'doTags' dhcpOptions :: DHCPOptions dhcpOptions = DHCPOptions' { _doDHCPConfigur...
399
dhcpOptions :: DHCPOptions dhcpOptions = DHCPOptions' { _doDHCPConfigurations = Nothing , _doDHCPOptionsId = Nothing , _doTags = Nothing }
162
dhcpOptions = DHCPOptions' { _doDHCPConfigurations = Nothing , _doDHCPOptionsId = Nothing , _doTags = Nothing }
131
true
true
0
6
84
40
28
12
null
null
goens/rand-code-graph
app/Main.hs
mit
zipMon :: Monad m => m [a] -> [b] -> m [(a,b)] -- there is probably a std lib function for this zipMon as bs = liftM2 zip as $ return bs
136
zipMon :: Monad m => m [a] -> [b] -> m [(a,b)] zipMon as bs = liftM2 zip as $ return bs
87
zipMon as bs = liftM2 zip as $ return bs
40
true
true
0
10
31
65
33
32
null
null
hvr/jhc
src/Grin/Grin.hs
mit
p1 = Var v1 TyINode
19
p1 = Var v1 TyINode
19
p1 = Var v1 TyINode
19
false
false
1
5
4
14
5
9
null
null
google/haskell-indexer
haskell-indexer-backend-ghc/tests/Language/Haskell/Indexer/Backend/Ghc/Test/TranslateAssert.hs
apache-2.0
userFriendlyTypeIs :: (MonadIO m) => Text -> Decl -> m () userFriendlyTypeIs t decl = unless (declUserFriendlyType (declType decl) == t) $ failConcat [ "User-friendly type of ", prettyDecl decl, " doesn't match ", show t ]
234
userFriendlyTypeIs :: (MonadIO m) => Text -> Decl -> m () userFriendlyTypeIs t decl = unless (declUserFriendlyType (declType decl) == t) $ failConcat [ "User-friendly type of ", prettyDecl decl, " doesn't match ", show t ]
234
userFriendlyTypeIs t decl = unless (declUserFriendlyType (declType decl) == t) $ failConcat [ "User-friendly type of ", prettyDecl decl, " doesn't match ", show t ]
176
false
true
0
11
48
82
41
41
null
null
deontologician/orbRPG
Game/OrbRPG/Combinations.hs
gpl-3.0
D Mammon @>> L Mu = G Hypnos
28
D Mammon @>> L Mu = G Hypnos
28
D Mammon @>> L Mu = G Hypnos
28
false
false
0
6
7
21
8
13
null
null
bravit/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
addAlist ((n, tm) : ds) ctxt = addDef n tm (addAlist ds ctxt)
61
addAlist ((n, tm) : ds) ctxt = addDef n tm (addAlist ds ctxt)
61
addAlist ((n, tm) : ds) ctxt = addDef n tm (addAlist ds ctxt)
61
false
false
1
8
12
41
20
21
null
null
SU-LOSP/folgerhs
src/Folgerhs/Stage.hs
gpl-3.0
selectCharacters f (se:ses) = let r = selectCharacters f ses in case se of Entrance chs -> Entrance (filter f chs) : r Exit chs -> Exit (filter f chs) : r Speech ch -> if f ch then se : r else ...
366
selectCharacters f (se:ses) = let r = selectCharacters f ses in case se of Entrance chs -> Entrance (filter f chs) : r Exit chs -> Exit (filter f chs) : r Speech ch -> if f ch then se : r else ...
366
selectCharacters f (se:ses) = let r = selectCharacters f ses in case se of Entrance chs -> Entrance (filter f chs) : r Exit chs -> Exit (filter f chs) : r Speech ch -> if f ch then se : r else ...
366
false
false
0
13
207
122
57
65
null
null
Mahdi89/eTeak
src/GuiSupport.hs
bsd-3-clause
guiOptionUsage :: SubOptionUsages GuiOption guiOptionUsage = SubOptionUsages "gui" show Nothing (Just defaultGuiOptions) [ ("display", SubOptionUsage False "mode" "network display mode {spring,dot}" "dot" (not . null . (reads :: String -> [(GuiDisplayMode, String)])) (\arg -> ([G...
1,489
guiOptionUsage :: SubOptionUsages GuiOption guiOptionUsage = SubOptionUsages "gui" show Nothing (Just defaultGuiOptions) [ ("display", SubOptionUsage False "mode" "network display mode {spring,dot}" "dot" (not . null . (reads :: String -> [(GuiDisplayMode, String)])) (\arg -> ([GuiDi...
1,485
guiOptionUsage = SubOptionUsages "gui" show Nothing (Just defaultGuiOptions) [ ("display", SubOptionUsage False "mode" "network display mode {spring,dot}" "dot" (not . null . (reads :: String -> [(GuiDisplayMode, String)])) (\arg -> ([GuiDisplayMode (read arg)], []))), ("diff...
1,441
false
true
0
15
325
369
209
160
null
null
mmaroti/univalg
src/UnivAlg/MyPicosat.hs
gpl-2.0
-- | Solve a list of CNF constraints yielding the first solution. solve :: [[Int]] -> IO Solution solve cls = do let ccls = toCInts cls pico <- picosat_init _ <- addClauses pico ccls sol <- solution pico picosat_reset pico return sol -- | Solve a list of CNF constraints yielding all possible solutions.
316
solve :: [[Int]] -> IO Solution solve cls = do let ccls = toCInts cls pico <- picosat_init _ <- addClauses pico ccls sol <- solution pico picosat_reset pico return sol -- | Solve a list of CNF constraints yielding all possible solutions.
250
solve cls = do let ccls = toCInts cls pico <- picosat_init _ <- addClauses pico ccls sol <- solution pico picosat_reset pico return sol -- | Solve a list of CNF constraints yielding all possible solutions.
218
true
true
0
11
67
87
38
49
null
null
nicolashery/cis194
src/Homework/B/LogAnalysis.hs
bsd-3-clause
insert :: LogMessage -> MessageTree -> MessageTree insert (Unknown _) tree = tree
81
insert :: LogMessage -> MessageTree -> MessageTree insert (Unknown _) tree = tree
81
insert (Unknown _) tree = tree
30
false
true
0
10
12
36
16
20
null
null
uvNikita/SyntacticAnalyzer
src/Simulator.hs
mit
renderPs :: ProcessList -> Text renderPs ps = intercalate "\n" . map renderPair . M.toList $ ps where renderPair (processor, process) = T.concat [ pack . show $ processor , ": " , pack . show $ process ]
313
renderPs :: ProcessList -> Text renderPs ps = intercalate "\n" . map renderPair . M.toList $ ps where renderPair (processor, process) = T.concat [ pack . show $ processor , ": " , pack . show $ process ]
313
renderPs ps = intercalate "\n" . map renderPair . M.toList $ ps where renderPair (processor, process) = T.concat [ pack . show $ processor , ": " , pack . show $ process ]
281
false
true
0
8
148
91
44
47
null
null
nevrenato/Hets_Fork
CspCASL/Parse_CspCASL_Process.hs
gpl-2.0
event_set :: AParser st EVENT_SET event_set = do cts <- alphabet <?> "communication type" return (EventSet cts (getRange cts)) {- Events may be simple CASL terms or channel send/receives or internal / external prefix choice. -}
236
event_set :: AParser st EVENT_SET event_set = do cts <- alphabet <?> "communication type" return (EventSet cts (getRange cts)) {- Events may be simple CASL terms or channel send/receives or internal / external prefix choice. -}
236
event_set = do cts <- alphabet <?> "communication type" return (EventSet cts (getRange cts)) {- Events may be simple CASL terms or channel send/receives or internal / external prefix choice. -}
202
false
true
0
11
44
48
23
25
null
null
semaj/jameslarisch.com-elm
server/Editor.hs
mit
ideBuilder :: String -> String -> String -> String -> Html ideBuilder cols title input output = H.docTypeHtml $ do H.head . H.title . toHtml $ title preEscapedToMarkup $ concat [ "<frameset cols=\"" ++ cols ++ "\">\n" , " <frame name=\"input\" src=\"/code/", input, "\" />\n" ...
467
ideBuilder :: String -> String -> String -> String -> Html ideBuilder cols title input output = H.docTypeHtml $ do H.head . H.title . toHtml $ title preEscapedToMarkup $ concat [ "<frameset cols=\"" ++ cols ++ "\">\n" , " <frame name=\"input\" src=\"/code/", input, "\" />\n" ...
467
ideBuilder cols title input output = H.docTypeHtml $ do H.head . H.title . toHtml $ title preEscapedToMarkup $ concat [ "<frameset cols=\"" ++ cols ++ "\">\n" , " <frame name=\"input\" src=\"/code/", input, "\" />\n" , " <frame name=\"output\" src=\"", output,...
408
false
true
0
12
141
104
55
49
null
null
mchakravarty/lets-program
step7/Game.hs
bsd-3-clause
-- Check whether the character is on the floor. onTheFloor world = snd (spritePosition world) <= (-height / 2) + slimeHeight / 2
128
onTheFloor world = snd (spritePosition world) <= (-height / 2) + slimeHeight / 2
80
onTheFloor world = snd (spritePosition world) <= (-height / 2) + slimeHeight / 2
80
true
false
1
10
22
44
20
24
null
null
johnpmayer/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
escaped :: Char -> IParser String escaped delim = try $ do char '\\' c <- char '\\' <|> char delim return ['\\', c]
129
escaped :: Char -> IParser String escaped delim = try $ do char '\\' c <- char '\\' <|> char delim return ['\\', c]
129
escaped delim = try $ do char '\\' c <- char '\\' <|> char delim return ['\\', c]
95
false
true
0
10
37
60
27
33
null
null
ihc/futhark
src/Language/Futhark/TypeChecker.hs
isc
checkModExpToEnv :: ModExpBase NoInfo Name -> TypeM (TySet, Env, ModExpBase Info VName) checkModExpToEnv e = do (MTy abs mod, e') <- checkModExp e case mod of ModEnv env -> return (abs, env, e') ModFun{} -> bad $ UnappliedFunctor $ srclocOf e
256
checkModExpToEnv :: ModExpBase NoInfo Name -> TypeM (TySet, Env, ModExpBase Info VName) checkModExpToEnv e = do (MTy abs mod, e') <- checkModExp e case mod of ModEnv env -> return (abs, env, e') ModFun{} -> bad $ UnappliedFunctor $ srclocOf e
256
checkModExpToEnv e = do (MTy abs mod, e') <- checkModExp e case mod of ModEnv env -> return (abs, env, e') ModFun{} -> bad $ UnappliedFunctor $ srclocOf e
168
false
true
0
11
54
110
54
56
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/PLUS_1.hs
mit
srMyInt :: MyInt -> MyInt -> MyInt srMyInt = primMulInt
59
srMyInt :: MyInt -> MyInt -> MyInt srMyInt = primMulInt
59
srMyInt = primMulInt
20
false
true
0
8
13
26
11
15
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/ViolinMarteleBowing.hs
bsd-3-clause
note25 :: Note note25 = Note (Pitch 830.609 68 "g#5") 26 (Range (NoteRange (NoteRangeAmplitude 9967.3 12 2.3) (NoteRangeHarmonicFreq 1 830.6)) (NoteRange (NoteRangeAmplitude 1661.21 2 5131.0) (NoteRangeHarmonicFreq 12 9967.3))) [Harmonic 1 ...
665
note25 :: Note note25 = Note (Pitch 830.609 68 "g#5") 26 (Range (NoteRange (NoteRangeAmplitude 9967.3 12 2.3) (NoteRangeHarmonicFreq 1 830.6)) (NoteRange (NoteRangeAmplitude 1661.21 2 5131.0) (NoteRangeHarmonicFreq 12 9967.3))) [Harmonic 1 ...
665
note25 = Note (Pitch 830.609 68 "g#5") 26 (Range (NoteRange (NoteRangeAmplitude 9967.3 12 2.3) (NoteRangeHarmonicFreq 1 830.6)) (NoteRange (NoteRangeAmplitude 1661.21 2 5131.0) (NoteRangeHarmonicFreq 12 9967.3))) [Harmonic 1 (-2.859) 4903.8...
650
false
true
0
10
199
238
120
118
null
null
vTurbine/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
vecElemTyConName :: Name vecElemTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "VecElem") vecElemTyConKey vecElemTyCon
130
vecElemTyConName :: Name vecElemTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "VecElem") vecElemTyConKey vecElemTyCon
130
vecElemTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "VecElem") vecElemTyConKey vecElemTyCon
105
false
true
0
7
11
36
15
21
null
null
bkoropoff/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyRaw t@(P _ n _) | n == reflm "RType" = return $ RType
67
reifyRaw t@(P _ n _) | n == reflm "RType" = return $ RType
67
reifyRaw t@(P _ n _) | n == reflm "RType" = return $ RType
67
false
false
0
9
22
39
18
21
null
null
aparent/qacg
src/QACG/CircLib.hs
bsd-3-clause
options :: [OptDescr Flag] options = [ Option "o" ["output"] (ReqArg Output "FILE") "specify out file", Option "V" ["version"] (NoArg Version) "shows the version number" ]
185
options :: [OptDescr Flag] options = [ Option "o" ["output"] (ReqArg Output "FILE") "specify out file", Option "V" ["version"] (NoArg Version) "shows the version number" ]
184
options = [ Option "o" ["output"] (ReqArg Output "FILE") "specify out file", Option "V" ["version"] (NoArg Version) "shows the version number" ]
157
false
true
0
8
39
61
32
29
null
null
techtangents/ablist
test/AbListTests.hs
bsd-3-clause
g_abFoldr = testGroup "abFoldr" [ testProperty "0" p_abFoldr_0 , testProperty "1" p_abFoldr_1 , testProperty "2" p_abFoldr_2 , testProperty "list" p_abFoldr_list ]
175
g_abFoldr = testGroup "abFoldr" [ testProperty "0" p_abFoldr_0 , testProperty "1" p_abFoldr_1 , testProperty "2" p_abFoldr_2 , testProperty "list" p_abFoldr_list ]
175
g_abFoldr = testGroup "abFoldr" [ testProperty "0" p_abFoldr_0 , testProperty "1" p_abFoldr_1 , testProperty "2" p_abFoldr_2 , testProperty "list" p_abFoldr_list ]
175
false
false
0
6
32
44
21
23
null
null
chrisdone/path
src/Path/Include.hs
bsd-3-clause
-- | Convert a relative 'FilePath' to a normalized relative file 'Path'. -- -- Throws: 'InvalidRelFile' when the supplied path: -- -- * is not a relative path -- * is @""@ -- * is a directory path i.e. -- -- * has a trailing path separator -- * is @.@ or ends in @/.@ -- -- * contains a @..@ path component repre...
735
parseRelFile :: MonadThrow m => FilePath -> m (Path Rel File) parseRelFile filepath = case validRelFile filepath of True | normalized <- normalizeFilePath filepath , validRelFile normalized -> return (Path normalized) _ -> throwM (InvalidRelFile filepath) -- | Is the string a valid r...
333
parseRelFile filepath = case validRelFile filepath of True | normalized <- normalizeFilePath filepath , validRelFile normalized -> return (Path normalized) _ -> throwM (InvalidRelFile filepath) -- | Is the string a valid relative file?
258
true
true
0
12
165
108
57
51
null
null