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
apyrgio/snf-ganeti
test/hs/Test/AutoConf.hs
bsd-2-clause
case_sshLoginUser :: Assertion case_sshLoginUser = HUnit.assertBool "'sshLoginUser' is invalid" (isUser AutoConf.sshLoginUser)
136
case_sshLoginUser :: Assertion case_sshLoginUser = HUnit.assertBool "'sshLoginUser' is invalid" (isUser AutoConf.sshLoginUser)
136
case_sshLoginUser = HUnit.assertBool "'sshLoginUser' is invalid" (isUser AutoConf.sshLoginUser)
105
false
true
0
8
20
26
13
13
null
null
bb010g/aura
aura/exec/Aura/Flags.hs
gpl-3.0
_AurIgnoreGroup _ x = pure x
45
_AurIgnoreGroup _ x = pure x
45
_AurIgnoreGroup _ x = pure x
45
false
false
1
5
22
14
6
8
null
null
haskell-distributed/distributed-process-platform
tests/TestRegistry.hs
bsd-3-clause
main :: IO () main = testMain $ tests
37
main :: IO () main = testMain $ tests
37
main = testMain $ tests
23
false
true
0
6
8
20
10
10
null
null
yiannist/ganeti
src/Ganeti/Utils.hs
bsd-2-clause
-- | Convert a ClockTime into a (seconds-only) 'EpochTime' (AKA @time_t@). clockTimeToCTime :: ClockTime -> EpochTime clockTimeToCTime (TOD secs _) = fromInteger secs
166
clockTimeToCTime :: ClockTime -> EpochTime clockTimeToCTime (TOD secs _) = fromInteger secs
91
clockTimeToCTime (TOD secs _) = fromInteger secs
48
true
true
0
7
22
30
15
15
null
null
DanGrayson/cubicaltt
Resolver.hs
mit
bind :: (Ter -> Ter) -> (Ident,Exp) -> Resolver Ter -> Resolver Ter bind f (x,t) e = f <$> lam (x,t) e
102
bind :: (Ter -> Ter) -> (Ident,Exp) -> Resolver Ter -> Resolver Ter bind f (x,t) e = f <$> lam (x,t) e
102
bind f (x,t) e = f <$> lam (x,t) e
34
false
true
0
8
22
70
37
33
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Utils.hs
bsd-2-clause
logWarningIfBad _ _ (Ok v) = return v
37
logWarningIfBad _ _ (Ok v) = return v
37
logWarningIfBad _ _ (Ok v) = return v
37
false
false
0
7
7
22
10
12
null
null
noteed/buh
bin/hush.hs
bsd-3-clause
sha1ToDirPath :: String -> FilePath sha1ToDirPath sha = "/objects" </> take 2 sha
83
sha1ToDirPath :: String -> FilePath sha1ToDirPath sha = "/objects" </> take 2 sha
83
sha1ToDirPath sha = "/objects" </> take 2 sha
47
false
true
2
7
14
33
14
19
null
null
dmwit/pi-eta-epsilon
src/Language/PiEtaEpsilon/Pi.hs
bsd-3-clause
dec :: Int :<=> Int dec = adjoint inc
37
dec :: Int :<=> Int dec = adjoint inc
37
dec = adjoint inc
17
false
true
0
7
8
25
10
15
null
null
ethercrow/yi
yi-core/src/Yi/Buffer/HighLevel.hs
gpl-2.0
findMatchingPairB :: BufferM () findMatchingPairB = do let go dir a b = goUnmatchedB dir a b >> return True goToMatch = do c <- readB case c of '(' -> go Forward '(' ')' ')' -> go Backward '(' ')' '{' -> go Forward '{' '}' '}'...
840
findMatchingPairB :: BufferM () findMatchingPairB = do let go dir a b = goUnmatchedB dir a b >> return True goToMatch = do c <- readB case c of '(' -> go Forward '(' ')' ')' -> go Backward '(' ')' '{' -> go Forward '{' '}' '}'...
840
findMatchingPairB = do let go dir a b = goUnmatchedB dir a b >> return True goToMatch = do c <- readB case c of '(' -> go Forward '(' ')' ')' -> go Backward '(' ')' '{' -> go Forward '{' '}' '}' -> go Backward '{' '}' ...
808
false
true
1
16
393
223
102
121
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
mONAD_ZIP = mkBaseModule (fsLit "Control.Monad.Zip")
58
mONAD_ZIP = mkBaseModule (fsLit "Control.Monad.Zip")
58
mONAD_ZIP = mkBaseModule (fsLit "Control.Monad.Zip")
58
false
false
0
7
10
15
7
8
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/GHC/Misc.hs
bsd-3-clause
stringTyConWithKind :: Kind -> Char -> Int -> String -> TyCon stringTyConWithKind k c n s = TC.mkKindTyCon name k where name = mkInternalName (mkUnique c n) occ noSrcSpan occ = mkTcOcc s
215
stringTyConWithKind :: Kind -> Char -> Int -> String -> TyCon stringTyConWithKind k c n s = TC.mkKindTyCon name k where name = mkInternalName (mkUnique c n) occ noSrcSpan occ = mkTcOcc s
215
stringTyConWithKind k c n s = TC.mkKindTyCon name k where name = mkInternalName (mkUnique c n) occ noSrcSpan occ = mkTcOcc s
153
false
true
0
8
61
74
36
38
null
null
alexisVallet/deep-banana
src/DeepBanana/Layer/CUDA/Numeric.hs
bsd-3-clause
scaleByCst_ :: (Monad m, VectorSpace t) => Scalar t -> Layer m (Scalar t) '[] t t scaleByCst_ c = combinePasses' fwdScaleByCst bwdScaleByCst where fwdScaleByCst t = return $ c *^ t bwdScaleByCst _ _ = return $ \dy -> c *^ dy
246
scaleByCst_ :: (Monad m, VectorSpace t) => Scalar t -> Layer m (Scalar t) '[] t t scaleByCst_ c = combinePasses' fwdScaleByCst bwdScaleByCst where fwdScaleByCst t = return $ c *^ t bwdScaleByCst _ _ = return $ \dy -> c *^ dy
246
scaleByCst_ c = combinePasses' fwdScaleByCst bwdScaleByCst where fwdScaleByCst t = return $ c *^ t bwdScaleByCst _ _ = return $ \dy -> c *^ dy
152
false
true
1
9
64
104
51
53
null
null
kataoka271/vmgconv
src/Main.hs
bsd-3-clause
logWarning :: String -> ConfigReader IO () logWarning = whenVerbose . putStrLn . showString "WARNING: "
103
logWarning :: String -> ConfigReader IO () logWarning = whenVerbose . putStrLn . showString "WARNING: "
103
logWarning = whenVerbose . putStrLn . showString "WARNING: "
60
false
true
0
7
15
33
16
17
null
null
sarahn/ganeti
src/Ganeti/OpParams.hs
gpl-2.0
-- | Required list of node names. pRequiredNodes :: Field pRequiredNodes = renameField "ReqNodes " $ simpleField "nodes" [t| [NonEmptyString] |]
146
pRequiredNodes :: Field pRequiredNodes = renameField "ReqNodes " $ simpleField "nodes" [t| [NonEmptyString] |]
112
pRequiredNodes = renameField "ReqNodes " $ simpleField "nodes" [t| [NonEmptyString] |]
88
true
true
0
6
22
28
16
12
null
null
acowley/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
exprIsCheap' good_app other_expr -- Applications and variables = go other_expr [] where -- Accumulate value arguments, then decide go (Cast e _) val_args = go e val_args go (App f a) val_args | isRuntimeArg a = go f (a:val_args) | otherwise = go ...
2,841
exprIsCheap' good_app other_expr -- Applications and variables = go other_expr [] where -- Accumulate value arguments, then decide go (Cast e _) val_args = go e val_args go (App f a) val_args | isRuntimeArg a = go f (a:val_args) | otherwise = go ...
2,841
exprIsCheap' good_app other_expr -- Applications and variables = go other_expr [] where -- Accumulate value arguments, then decide go (Cast e _) val_args = go e val_args go (App f a) val_args | isRuntimeArg a = go f (a:val_args) | otherwise = go ...
2,841
false
false
0
12
1,037
386
196
190
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Monad.hs
bsd-3-clause
-- | Used for annotating reads (i.e. at Var x sites) addLocA :: Maybe Var -> SrcSpan -> Annot SpecType -> CG () addLocA !xo !l !t = modify $ \s -> s { annotMap = addA l xo t $ annotMap s }
191
addLocA :: Maybe Var -> SrcSpan -> Annot SpecType -> CG () addLocA !xo !l !t = modify $ \s -> s { annotMap = addA l xo t $ annotMap s }
137
addLocA !xo !l !t = modify $ \s -> s { annotMap = addA l xo t $ annotMap s }
78
true
true
0
10
46
76
36
40
null
null
sgillespie/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
-- These primops are implemented by CallishMachOps, because they sometimes -- turn into foreign calls depending on the backend. callishOp :: PrimOp -> Maybe CallishMachOp callishOp DoublePowerOp = Just MO_F64_Pwr
214
callishOp :: PrimOp -> Maybe CallishMachOp callishOp DoublePowerOp = Just MO_F64_Pwr
85
callishOp DoublePowerOp = Just MO_F64_Pwr
42
true
true
0
6
31
26
13
13
null
null
kim/amazonka
amazonka-cloudformation/gen/Network/AWS/CloudFormation/Types.hs
mpl-2.0
-- | The time the stack was deleted. ssDeletionTime :: Lens' StackSummary (Maybe UTCTime) ssDeletionTime = lens _ssDeletionTime (\s a -> s { _ssDeletionTime = a }) . mapping _Time
179
ssDeletionTime :: Lens' StackSummary (Maybe UTCTime) ssDeletionTime = lens _ssDeletionTime (\s a -> s { _ssDeletionTime = a }) . mapping _Time
142
ssDeletionTime = lens _ssDeletionTime (\s a -> s { _ssDeletionTime = a }) . mapping _Time
89
true
true
0
10
29
53
28
25
null
null
pminten/xhaskell
linked-list/example.hs
mit
mkNode :: a -> STM (Node a) mkNode a = Node a <$> newEmptyTMVar <*> newEmptyTMVar
81
mkNode :: a -> STM (Node a) mkNode a = Node a <$> newEmptyTMVar <*> newEmptyTMVar
81
mkNode a = Node a <$> newEmptyTMVar <*> newEmptyTMVar
53
false
true
0
9
15
43
19
24
null
null
bixuanzju/full-version
src/TypeCheck.hs
gpl-3.0
extend :: Sym -> Type -> Env -> Env extend s t r =(s,t):r
57
extend :: Sym -> Type -> Env -> Env extend s t r =(s,t):r
57
extend s t r =(s,t):r
21
false
true
0
7
13
40
21
19
null
null
DaMSL/K3
src/Language/K3/Interpreter/Evaluation.hs
apache-2.0
binary OLeq = comparison valueLte
33
binary OLeq = comparison valueLte
33
binary OLeq = comparison valueLte
33
false
false
0
5
4
12
5
7
null
null
svenssonjoel/ArrowObsidian
Obsidian/ArrowObsidian/Exp.hs
bsd-3-clause
caseof a [(v,x)] = x
23
caseof a [(v,x)] = x
23
caseof a [(v,x)] = x
23
false
false
0
7
7
20
11
9
null
null
fjarri/haskell-random123
test/TestTypeclasses.hs
bsd-3-clause
test_li2x64_bitsize li = liToInteger li < 2 ^ liBitSize li where types = li :: Array2 Word64
96
test_li2x64_bitsize li = liToInteger li < 2 ^ liBitSize li where types = li :: Array2 Word64
96
test_li2x64_bitsize li = liToInteger li < 2 ^ liBitSize li where types = li :: Array2 Word64
96
false
false
0
7
20
36
17
19
null
null
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/Overlap2.hs
bsd-3-clause
h :: F Double Double h = -2
27
h :: F Double Double h = -2
27
h = -2
6
false
true
1
5
7
21
9
12
null
null
vshabanov/hsdns-cache
ADNS/Cache.hs
bsd-3-clause
isIPAddr :: HostName -> Bool isIPAddr hn = length groups == 4 && all ip groups where groups = splitPoints hn ip x = length x <= 3 && all (\ e -> e >= '0' && e <= '9') x && read x <= (255 :: Int)
225
isIPAddr :: HostName -> Bool isIPAddr hn = length groups == 4 && all ip groups where groups = splitPoints hn ip x = length x <= 3 && all (\ e -> e >= '0' && e <= '9') x && read x <= (255 :: Int)
225
isIPAddr hn = length groups == 4 && all ip groups where groups = splitPoints hn ip x = length x <= 3 && all (\ e -> e >= '0' && e <= '9') x && read x <= (255 :: Int)
196
false
true
0
15
78
105
52
53
null
null
Shou/KawaiiBot-hs
KawaiiBot/Utils.hs
gpl-2.0
plain :: Memory (Message String)-> Memory String plain x = fmap fromMsg x
73
plain :: Memory (Message String)-> Memory String plain x = fmap fromMsg x
73
plain x = fmap fromMsg x
24
false
true
0
8
12
35
16
19
null
null
bagnalla/PCF
src/Interp.hs
mit
-- Interpret a program by interpreting its commands in sequence. interpProg :: Prog info -> [CommandResult info] interpProg = (`evalState` initState) . interpCommands . prog_of
176
interpProg :: Prog info -> [CommandResult info] interpProg = (`evalState` initState) . interpCommands . prog_of
111
interpProg = (`evalState` initState) . interpCommands . prog_of
63
true
true
0
7
24
39
22
17
null
null
lostbean/SubZero
src/SubZero/SubTwo.hs
gpl-3.0
sumFace :: (SubSuper v, LinearMap Double m, v ~ m Double)=> Vector v -> (VertexID, VertexID, VertexID) -> v sumFace ps (v1, v2, v3) = (ps =! v1) &+ (ps =! v2) &+ (ps =! v3)
172
sumFace :: (SubSuper v, LinearMap Double m, v ~ m Double)=> Vector v -> (VertexID, VertexID, VertexID) -> v sumFace ps (v1, v2, v3) = (ps =! v1) &+ (ps =! v2) &+ (ps =! v3)
172
sumFace ps (v1, v2, v3) = (ps =! v1) &+ (ps =! v2) &+ (ps =! v3)
64
false
true
0
8
35
102
55
47
null
null
mettekou/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprHsBracket (DecBrG gp) = thBrackets (char 'd') (ppr gp)
57
pprHsBracket (DecBrG gp) = thBrackets (char 'd') (ppr gp)
57
pprHsBracket (DecBrG gp) = thBrackets (char 'd') (ppr gp)
57
false
false
0
7
8
33
15
18
null
null
AaronFriel/eff-experiments
src/Data/Iota/Eff1.hs
bsd-3-clause
qApp :: Arrs r b w -> b -> Eff r w qApp q x = case inline tviewl q of TOne k -> k x k :| t -> case k x of Val y -> qApp t y E u q -> E u (q >< t)
175
qApp :: Arrs r b w -> b -> Eff r w qApp q x = case inline tviewl q of TOne k -> k x k :| t -> case k x of Val y -> qApp t y E u q -> E u (q >< t)
175
qApp q x = case inline tviewl q of TOne k -> k x k :| t -> case k x of Val y -> qApp t y E u q -> E u (q >< t)
140
false
true
0
13
78
115
52
63
null
null
kishoredbn/barrelfish
hake/RuleDefs.hs
mit
-- -- Build a Mackerel header file from a definition. -- mackerelProgLoc = In InstallTree "tools" "/bin/mackerel"
113
mackerelProgLoc = In InstallTree "tools" "/bin/mackerel"
56
mackerelProgLoc = In InstallTree "tools" "/bin/mackerel"
56
true
false
0
5
16
16
9
7
null
null
iblumenfeld/saw-core
src/Verifier/SAW/TermNet.hs
bsd-3-clause
matching :: Bool -> Pat -> Net a -> [Net a] -> [Net a] matching unif = match where match :: Pat -> Net a -> [Net a] -> [Net a] match t net nets = case net of Leaf _ -> nets Net {var, ..} -> case t of Var -> if unif then net_skip net nets else var : nets {-only match...
676
matching :: Bool -> Pat -> Net a -> [Net a] -> [Net a] matching unif = match where match :: Pat -> Net a -> [Net a] -> [Net a] match t net nets = case net of Leaf _ -> nets Net {var, ..} -> case t of Var -> if unif then net_skip net nets else var : nets {-only match...
676
matching unif = match where match :: Pat -> Net a -> [Net a] -> [Net a] match t net nets = case net of Leaf _ -> nets Net {var, ..} -> case t of Var -> if unif then net_skip net nets else var : nets {-only matches Var in net-} _ -> rands t net (var : n...
621
false
true
7
14
250
311
157
154
null
null
vikraman/ghc-mod
Language/Haskell/GhcMod/ErrMsg.hs
bsd-3-clause
ppMsg :: SrcSpan -> Severity-> DynFlags -> LineSeparator -> SDoc -> String ppMsg spn sev dflag ls@(LineSeparator lsep) msg = prefix ++ cts ++ lsep where cts = showMsg dflag ls msg defaultPrefix | dopt Opt_D_dump_splices dflag = "" | otherwise = "Dummy:0:0:" prefix = fromMa...
647
ppMsg :: SrcSpan -> Severity-> DynFlags -> LineSeparator -> SDoc -> String ppMsg spn sev dflag ls@(LineSeparator lsep) msg = prefix ++ cts ++ lsep where cts = showMsg dflag ls msg defaultPrefix | dopt Opt_D_dump_splices dflag = "" | otherwise = "Dummy:0:0:" prefix = fromMa...
647
ppMsg spn sev dflag ls@(LineSeparator lsep) msg = prefix ++ cts ++ lsep where cts = showMsg dflag ls msg defaultPrefix | dopt Opt_D_dump_splices dflag = "" | otherwise = "Dummy:0:0:" prefix = fromMaybe defaultPrefix $ do (line,col,_,_) <- Gap.getSrcSpan spn ...
572
false
true
0
14
161
203
98
105
null
null
mydaum/cabal
cabal-install/Distribution/Client/CmdHaddock.hs
bsd-3-clause
haddockCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags ,HaddockFlags) haddockCommand = Client.installCommand { commandName = "new-haddock", commandSynopsis = "Build Haddock documentation", commandUsage = usageAlternatives "new-haddock" [ "[FLAGS] TARGE...
1,462
haddockCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags ,HaddockFlags) haddockCommand = Client.installCommand { commandName = "new-haddock", commandSynopsis = "Build Haddock documentation", commandUsage = usageAlternatives "new-haddock" [ "[FLAGS] TARGE...
1,462
haddockCommand = Client.installCommand { commandName = "new-haddock", commandSynopsis = "Build Haddock documentation", commandUsage = usageAlternatives "new-haddock" [ "[FLAGS] TARGET" ], commandDescription = Just $ \_ -> wrapText $ "Build Haddock documentation for the specified pack...
1,349
false
true
1
22
353
162
87
75
null
null
v0lkan/learning-haskell
numbers-to-words.hs
mit
combine2 :: (Int, Int) -> String combine2 (t, u) | t == 0 = units!!u | t == 1 = teens!!u | u == 0 = tens!!(t-2) | otherwise = tens!!(t-2) ++ "-" ++ units!!u
181
combine2 :: (Int, Int) -> String combine2 (t, u) | t == 0 = units!!u | t == 1 = teens!!u | u == 0 = tens!!(t-2) | otherwise = tens!!(t-2) ++ "-" ++ units!!u
181
combine2 (t, u) | t == 0 = units!!u | t == 1 = teens!!u | u == 0 = tens!!(t-2) | otherwise = tens!!(t-2) ++ "-" ++ units!!u
148
false
true
0
11
59
117
59
58
null
null
brendanhay/gogol
gogol-redis/gen/Network/Google/Resource/Redis/Projects/Locations/Instances/Export.hs
mpl-2.0
-- | Creates a value of 'ProjectsLocationsInstancesExport' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'plieXgafv' -- -- * 'plieUploadProtocol' -- -- * 'plieAccessToken' -- -- * 'plieUploadType' -- -- * 'pliePayload' -- -- * 'plieN...
820
projectsLocationsInstancesExport :: ExportInstanceRequest -- ^ 'pliePayload' -> Text -- ^ 'plieName' -> ProjectsLocationsInstancesExport projectsLocationsInstancesExport pPliePayload_ pPlieName_ = ProjectsLocationsInstancesExport' { _plieXgafv = Nothing , _plieUploadProtocol = Nothing , _plieA...
472
projectsLocationsInstancesExport pPliePayload_ pPlieName_ = ProjectsLocationsInstancesExport' { _plieXgafv = Nothing , _plieUploadProtocol = Nothing , _plieAccessToken = Nothing , _plieUploadType = Nothing , _pliePayload = pPliePayload_ , _plieName = pPlieName_ , _plieCallback = Nothing ...
323
true
true
0
8
150
96
62
34
null
null
vikraman/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
ctEvId (CtGiven { ctev_evar = ev }) = ev
41
ctEvId (CtGiven { ctev_evar = ev }) = ev
41
ctEvId (CtGiven { ctev_evar = ev }) = ev
41
false
false
0
8
9
22
11
11
null
null
nevrenato/Hets_Fork
Temporal/NuSmv.hs
gpl-2.0
showModule (Module name params elements) = concat [ "MODULE ", name, showParams params, "\n", concatMap showElement elements ] where showParams [] = "" showParams params = concat [ "(", concat (intersperse ", " params), ")" ]
242
showModule (Module name params elements) = concat [ "MODULE ", name, showParams params, "\n", concatMap showElement elements ] where showParams [] = "" showParams params = concat [ "(", concat (intersperse ", " params), ")" ]
242
showModule (Module name params elements) = concat [ "MODULE ", name, showParams params, "\n", concatMap showElement elements ] where showParams [] = "" showParams params = concat [ "(", concat (intersperse ", " params), ")" ]
242
false
false
0
9
52
91
45
46
null
null
nevrenato/HetsAlloy
Maude/Maude2DG.hs
gpl-2.0
paramBinding :: Token -> Token -> Token -> Symbols -> Morphism -> TokenInfoMap -> (Token, Morphism, Morphism, Node, [(Token, Token, Symbols)]) paramBinding th view p ss morph tim = (view, morph', vmorph', n, []) where rnms = createQualifiedSortRenaming p view ss morph' = applyRenamings morph rnm...
621
paramBinding :: Token -> Token -> Token -> Symbols -> Morphism -> TokenInfoMap -> (Token, Morphism, Morphism, Node, [(Token, Token, Symbols)]) paramBinding th view p ss morph tim = (view, morph', vmorph', n, []) where rnms = createQualifiedSortRenaming p view ss morph' = applyRenamings morph rnm...
621
paramBinding th view p ss morph tim = (view, morph', vmorph', n, []) where rnms = createQualifiedSortRenaming p view ss morph' = applyRenamings morph rnms (n, sg, _, _, _) = fromJust $ Map.lookup th tim vmorph = Maude.Morphism.inclusion sg sg rnms' = creat...
476
false
true
3
15
167
195
102
93
null
null
jtobin/observable-examples
Observable/Examples.hs
mit
likelihood :: [Double] -> (Double, Double, Double) -> Observable [Double] likelihood xs (a, b, v) = do let model x = a*cos x + b*sin x observe "ys" (isoGauss (fmap model xs) (sqrt v)) -- | An alternative spec for the sinusoidal model.
239
likelihood :: [Double] -> (Double, Double, Double) -> Observable [Double] likelihood xs (a, b, v) = do let model x = a*cos x + b*sin x observe "ys" (isoGauss (fmap model xs) (sqrt v)) -- | An alternative spec for the sinusoidal model.
239
likelihood xs (a, b, v) = do let model x = a*cos x + b*sin x observe "ys" (isoGauss (fmap model xs) (sqrt v)) -- | An alternative spec for the sinusoidal model.
165
false
true
0
13
47
112
57
55
null
null
m15k/hs-dtd-text
Data/XML/DTD/Parse.hs
bsd-3-clause
-- This is lifted from attoparsec-text library. -- | Same as @Applicative@'s @\<*@ but specialized to 'Text' -- on the second argument. (<*.) :: Applicative f => f a -> f Text -> f a (<*.) = (<*)
195
(<*.) :: Applicative f => f a -> f Text -> f a (<*.) = (<*)
59
(<*.) = (<*)
12
true
true
0
8
37
44
25
19
null
null
mnicoletti/pdep-utn-frba
funcional/tps/01-beta-declaratividad.hs
mit
-- Punto 2 --- Obtener el tiro con jugador y palo. golpe jugador palo = (palo.habilidad) jugador
96
golpe jugador palo = (palo.habilidad) jugador
45
golpe jugador palo = (palo.habilidad) jugador
45
true
false
0
7
16
21
11
10
null
null
f1u77y/xmonad-contrib
XMonad/Prompt/Shell.hs
bsd-3-clause
commandCompletionFunction :: [String] -> Predicate -> String -> [String] commandCompletionFunction cmds p str | '/' `elem` str = [] | otherwise = filter (p str) cmds
207
commandCompletionFunction :: [String] -> Predicate -> String -> [String] commandCompletionFunction cmds p str | '/' `elem` str = [] | otherwise = filter (p str) cmds
207
commandCompletionFunction cmds p str | '/' `elem` str = [] | otherwise = filter (p str) cmds
134
false
true
0
8
67
70
35
35
null
null
nbloomf/carl
src/Carl/Struct/Matrix.hs
gpl-3.0
mFirstNonZeroRowIndex :: (Ringoid a) => Matrix a -> Either AlgErr Integer mFirstNonZeroRowIndex Null = Left (NullMatrix "mFirstNonZeroRowIndex")
144
mFirstNonZeroRowIndex :: (Ringoid a) => Matrix a -> Either AlgErr Integer mFirstNonZeroRowIndex Null = Left (NullMatrix "mFirstNonZeroRowIndex")
144
mFirstNonZeroRowIndex Null = Left (NullMatrix "mFirstNonZeroRowIndex")
70
false
true
0
7
16
44
21
23
null
null
MasseR/xmonadcontrib
XMonad/Util/XUtils.hs
bsd-3-clause
paintTextAndIcons :: Window -- ^ The window where to draw -> XMonadFont -- ^ XMonad Font for drawing -> Dimension -- ^ Window width -> Dimension -- ^ Window height -> Dimension -- ^ Border width -> String -- ^ Win...
1,365
paintTextAndIcons :: Window -- ^ The window where to draw -> XMonadFont -- ^ XMonad Font for drawing -> Dimension -- ^ Window width -> Dimension -- ^ Window height -> Dimension -- ^ Border width -> String -- ^ Win...
1,365
paintTextAndIcons w fs wh ht bw bc borc ffc fbc als strs i_als icons = do d <- asks display strPositions <- forM (zip als strs) $ \(al, str) -> stringPosition d fs (Rectangle 0 0 wh ht) al str let iconPositions = map ( \(al, icon) -> iconPosition (Rectangle 0 0 wh ht) al icon ) (zip i_als icons) ...
602
false
true
0
21
518
333
177
156
null
null
phischu/fragnix
tests/packages/scotty/Data.OrdPSQ.Internal.hs
bsd-3-clause
hasMinHeapProperty (Winner (E k0 p0 _) t0 _) = go k0 p0 t0 where go :: k -> p -> LTree k p v -> Bool go _ _ Start = True go k p (LLoser _ (E k' p' _) l _ r) = (p, k) < (p', k') && go k' p' l && go k p r go k p (RLoser _ (E k' p' _) l _ r) = (p, k) < (p', k') &&...
345
hasMinHeapProperty (Winner (E k0 p0 _) t0 _) = go k0 p0 t0 where go :: k -> p -> LTree k p v -> Bool go _ _ Start = True go k p (LLoser _ (E k' p' _) l _ r) = (p, k) < (p', k') && go k' p' l && go k p r go k p (RLoser _ (E k' p' _) l _ r) = (p, k) < (p', k') &&...
345
hasMinHeapProperty (Winner (E k0 p0 _) t0 _) = go k0 p0 t0 where go :: k -> p -> LTree k p v -> Bool go _ _ Start = True go k p (LLoser _ (E k' p' _) l _ r) = (p, k) < (p', k') && go k' p' l && go k p r go k p (RLoser _ (E k' p' _) l _ r) = (p, k) < (p', k') &&...
345
false
false
4
9
148
237
113
124
null
null
mikeizbicki/HerbiePlugin
test/Tests.hs
bsd-3-clause
herbie4 :: String -> String herbie4 str = show $ f1(x1) where x1 = fromIntegral (length str) :: Float
117
herbie4 :: String -> String herbie4 str = show $ f1(x1) where x1 = fromIntegral (length str) :: Float
117
herbie4 str = show $ f1(x1) where x1 = fromIntegral (length str) :: Float
89
false
true
0
9
34
47
24
23
null
null
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/GetObject.hs
mpl-2.0
-- | Undocumented member. gorsRequestCharged :: Lens' GetObjectResponse (Maybe RequestCharged) gorsRequestCharged = lens _gorsRequestCharged (\ s a -> s{_gorsRequestCharged = a})
178
gorsRequestCharged :: Lens' GetObjectResponse (Maybe RequestCharged) gorsRequestCharged = lens _gorsRequestCharged (\ s a -> s{_gorsRequestCharged = a})
152
gorsRequestCharged = lens _gorsRequestCharged (\ s a -> s{_gorsRequestCharged = a})
83
true
true
1
9
20
51
25
26
null
null
reedrosenbluth/othello
src/Game.hs
bsd-3-clause
---------------------------------------------------------------------- -- Game Logic ---------------------------------------------------------------------- line :: Square -> Direction -> Line line (x, y) N = [(x, y + h) | h <- [1..8], y+h <= 8]
249
line :: Square -> Direction -> Line line (x, y) N = [(x, y + h) | h <- [1..8], y+h <= 8]
93
line (x, y) N = [(x, y + h) | h <- [1..8], y+h <= 8]
57
true
true
0
8
32
71
40
31
null
null
nevrenato/Hets_Fork
Temporal/ModalCaslToCtl.hs
gpl-2.0
convert (Casl.A (Casl.B phi psi)) = convert (Casl.A (Casl.Pnot ((Casl.Pnot phi) `Casl.U'` psi)))
105
convert (Casl.A (Casl.B phi psi)) = convert (Casl.A (Casl.Pnot ((Casl.Pnot phi) `Casl.U'` psi)))
105
convert (Casl.A (Casl.B phi psi)) = convert (Casl.A (Casl.Pnot ((Casl.Pnot phi) `Casl.U'` psi)))
105
false
false
0
14
21
65
33
32
null
null
kumasento/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalPrim PrimChr = evalChr
43
evalPrim PrimChr = evalChr
43
evalPrim PrimChr = evalChr
43
false
false
0
5
20
9
4
5
null
null
phischu/fragnix
tests/packages/scotty/Data.Acquire.hs
bsd-3-clause
-- | Allocate a resource and register an action with the @MonadResource@ to -- free the resource. -- -- Since 1.1.0 allocateAcquire :: MonadResource m => Acquire a -> m (ReleaseKey, a) allocateAcquire = liftResourceT . allocateAcquireRIO
237
allocateAcquire :: MonadResource m => Acquire a -> m (ReleaseKey, a) allocateAcquire = liftResourceT . allocateAcquireRIO
121
allocateAcquire = liftResourceT . allocateAcquireRIO
52
true
true
0
8
36
42
23
19
null
null
mrshannon/lorenz-old
Main.hs
mit
applyView :: View -> IO () applyView (View scaleFactor center azimuth elevation) = do loadIdentity scale s s s translate $ fmap negate (vertexToVector3 center) rotate elevation xVector3f rotate azimuth yVector3f rotate (-90) zVector3f rotate (-90) yVector3f wh...
351
applyView :: View -> IO () applyView (View scaleFactor center azimuth elevation) = do loadIdentity scale s s s translate $ fmap negate (vertexToVector3 center) rotate elevation xVector3f rotate azimuth yVector3f rotate (-90) zVector3f rotate (-90) yVector3f wh...
351
applyView (View scaleFactor center azimuth elevation) = do loadIdentity scale s s s translate $ fmap negate (vertexToVector3 center) rotate elevation xVector3f rotate azimuth yVector3f rotate (-90) zVector3f rotate (-90) yVector3f where s = 1.0/scaleFa...
324
false
true
0
10
108
120
54
66
null
null
wayofthepie/neo4j-bolt
src/PackStream/Internal/Message.hs
bsd-3-clause
mkFloat64Byte = MarkerByte 0xC1
31
mkFloat64Byte = MarkerByte 0xC1
31
mkFloat64Byte = MarkerByte 0xC1
31
false
false
0
5
3
9
4
5
null
null
ExNexu/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
refsIn :: TT Name -> [Name] refsIn (P _ n _) = [n]
50
refsIn :: TT Name -> [Name] refsIn (P _ n _) = [n]
50
refsIn (P _ n _) = [n]
22
false
true
0
7
12
37
19
18
null
null
Philonous/pontarius-xmpp
source/Network/Xmpp/Lens.hs
bsd-3-clause
liftLens f inj (MessageS s) = MessageS <$> f inj s
62
liftLens f inj (MessageS s) = MessageS <$> f inj s
62
liftLens f inj (MessageS s) = MessageS <$> f inj s
62
false
false
0
7
22
28
13
15
null
null
jwaldmann/mex
src/Game.hs
gpl-3.0
-- | choose a subset of players (with at least two) -- have them play a game, record the result game :: Server -> IO () game server = void $ do xs <- select_players server Control.Exception.catch ( do message server $ Game xs verify_callbacks server xs ...
698
game :: Server -> IO () game server = void $ do xs <- select_players server Control.Exception.catch ( do message server $ Game xs verify_callbacks server xs winner <- play_game server xs message server $ Game_Won_By winner ...
602
game server = void $ do xs <- select_players server Control.Exception.catch ( do message server $ Game xs verify_callbacks server xs winner <- play_game server xs message server $ Game_Won_By winner ( forM xs...
578
true
true
2
19
260
182
82
100
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Builder.hs
mit
doubleBE :: Double -> Builder doubleBE = P.primFixed P.doubleBE
63
doubleBE :: Double -> Builder doubleBE = P.primFixed P.doubleBE
63
doubleBE = P.primFixed P.doubleBE
33
false
true
0
6
8
22
11
11
null
null
GaloisInc/halvm-ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
-- Things defined outside brackets thLevel :: ThStage -> ThLevel thLevel (Splice _) = 0
91
thLevel :: ThStage -> ThLevel thLevel (Splice _) = 0
55
thLevel (Splice _) = 0
25
true
true
0
9
18
31
14
17
null
null
lambdageek/indentation
indentation-parsec/tests/ParensParsec.hs
bsd-3-clause
input2 = [('(', 1), ('[', 8), ('(', 6), (')', 6), ('[', 8), (']', 9), (']', 4), ('(', 3), (')', 3), (')', 1)]
199
input2 = [('(', 1), ('[', 8), ('(', 6), (')', 6), ('[', 8), (']', 9), (']', 4), ('(', 3), (')', 3), (')', 1)]
199
input2 = [('(', 1), ('[', 8), ('(', 6), (')', 6), ('[', 8), (']', 9), (']', 4), ('(', 3), (')', 3), (')', 1)]
199
false
false
0
6
111
96
63
33
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/Txt2Tags.hs
gpl-2.0
definitionListStart :: T2T Int definitionListStart = genericListStart (char ':')
80
definitionListStart :: T2T Int definitionListStart = genericListStart (char ':')
80
definitionListStart = genericListStart (char ':')
49
false
true
0
7
8
23
11
12
null
null
vwwv/easy-bitcoin
Examples/Example3.hs
bsd-3-clause
{- | Using mulsignature escrows, step by step how to create and collaboratively sign transactions from a mulstiginature escrow: 1. So, Alice and Bob have together a business, they want to store the profit somewhere it can only be moved if both of them agrees 2. After a while, both of them decide to retrieve...
512
alice_prv_key = read "92CPvDya9qrURXEL7JcZFsATZXgwE5jWKjJPA5nHvrVoD2JuMQV" :: Key Private TestNet
103
alice_prv_key = read "92CPvDya9qrURXEL7JcZFsATZXgwE5jWKjJPA5nHvrVoD2JuMQV" :: Key Private TestNet
103
true
false
0
5
101
18
9
9
null
null
dmvianna/haskellbook
src/Ch11-BinaryTree.hs
unlicense
testPreorder :: IO () testPreorder = if preorder testTree == [2,1,3] then putStrLn "Preorder fine!" else putStrLn "Bad news bears."
137
testPreorder :: IO () testPreorder = if preorder testTree == [2,1,3] then putStrLn "Preorder fine!" else putStrLn "Bad news bears."
137
testPreorder = if preorder testTree == [2,1,3] then putStrLn "Preorder fine!" else putStrLn "Bad news bears."
115
false
true
0
7
25
46
24
22
null
null
ksaveljev/hake-2
src/Game/Monsters/MInfantry.hs
bsd-3-clause
infantryAttack :: EntThink infantryAttack = GenericEntThink "infantry_attack" $ \selfRef -> do self <- readRef selfRef let Just enemyRef = self^.eEnemy enemy <- readRef enemyRef let currentMove = if GameUtil.range self enemy == Constants.rangeMelee then infantryMoveAttack2 ...
463
infantryAttack :: EntThink infantryAttack = GenericEntThink "infantry_attack" $ \selfRef -> do self <- readRef selfRef let Just enemyRef = self^.eEnemy enemy <- readRef enemyRef let currentMove = if GameUtil.range self enemy == Constants.rangeMelee then infantryMoveAttack2 ...
463
infantryAttack = GenericEntThink "infantry_attack" $ \selfRef -> do self <- readRef selfRef let Just enemyRef = self^.eEnemy enemy <- readRef enemyRef let currentMove = if GameUtil.range self enemy == Constants.rangeMelee then infantryMoveAttack2 else i...
436
false
true
0
15
124
125
58
67
null
null
carlostome/wlp-engine
src/Stmt.hs
bsd-3-clause
assert = Assert
15
assert = Assert
15
assert = Assert
15
false
false
0
4
2
6
3
3
null
null
spikelynch/kerlossal
src/Main.hs
bsd-3-clause
artAdj :: Vocab -> TextGenCh artAdj v = weighted [ ( 60, weighted [ ( 60, c v "aesthetic"), ( 40, c v "good_adj" ) ] ), ( 40, list [ c v "good_adj", c v "aesthetic" ] ) ]
176
artAdj :: Vocab -> TextGenCh artAdj v = weighted [ ( 60, weighted [ ( 60, c v "aesthetic"), ( 40, c v "good_adj" ) ] ), ( 40, list [ c v "good_adj", c v "aesthetic" ] ) ]
176
artAdj v = weighted [ ( 60, weighted [ ( 60, c v "aesthetic"), ( 40, c v "good_adj" ) ] ), ( 40, list [ c v "good_adj", c v "aesthetic" ] ) ]
147
false
true
0
11
45
89
48
41
null
null
antonpetkoff/reinvent-the-wheel
primitive-recursion/prf.hs
gpl-3.0
eval _ _ = error "Incorrect call"
33
eval _ _ = error "Incorrect call"
33
eval _ _ = error "Incorrect call"
33
false
false
1
5
6
14
6
8
null
null
DanielSchuessler/tuple-th
TupleTH.hs
bsd-3-clause
tupleToList :: Int -> Q Exp tupleToList n = [| $(foldrTuple' n (conE '(:))) [] |]
82
tupleToList :: Int -> Q Exp tupleToList n = [| $(foldrTuple' n (conE '(:))) [] |]
82
tupleToList n = [| $(foldrTuple' n (conE '(:))) [] |]
53
false
true
0
7
16
29
14
15
null
null
mbudde/jana
src/Jana/Parser.hs
bsd-3-clause
-- parses an identifier reserved = Token.reserved lexer
59
reserved = Token.reserved lexer
35
reserved = Token.reserved lexer
35
true
false
0
6
11
12
6
6
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Locations/Buckets/Undelete.hs
mpl-2.0
-- | Required. The full resource name of the bucket to undelete. -- \"projects\/[PROJECT_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID]\" -- \"organizations\/[ORGANIZATION_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID]\" -- \"billingAccounts\/[BILLING_ACCOUNT_ID]\/locations\/[LOCATION_ID]\/buckets\/[BUCKET_ID...
613
balbuName :: Lens' BillingAccountsLocationsBucketsUndelete Text balbuName = lens _balbuName (\ s a -> s{_balbuName = a})
122
balbuName = lens _balbuName (\ s a -> s{_balbuName = a})
58
true
true
0
9
41
48
28
20
null
null
ezyang/ghc
testsuite/tests/unboxedsums/unboxedsums9.hs
bsd-3-clause
unpackBool :: Bool -> UbxBool unpackBool True = (# (# #) | #)
62
unpackBool :: Bool -> UbxBool unpackBool True = (# (# #) | #)
62
unpackBool True = (# (# #) | #)
32
false
true
0
5
13
21
11
10
null
null
agocorona/Workflow
Control/Workflow.hs
bsd-3-clause
killThreadWF1 :: MonadIO m => String -> m() killThreadWF1 name= killThreadWFm name >> return ()
97
killThreadWF1 :: MonadIO m => String -> m() killThreadWF1 name= killThreadWFm name >> return ()
97
killThreadWF1 name= killThreadWFm name >> return ()
52
false
true
0
8
16
42
19
23
null
null
keithodulaigh/Hets
LF/MorphParser.hs
gpl-2.0
bracesP :: CharParser st a -> CharParser st a bracesP = between (skipChar '{') (skipChar '}')
93
bracesP :: CharParser st a -> CharParser st a bracesP = between (skipChar '{') (skipChar '}')
93
bracesP = between (skipChar '{') (skipChar '}')
47
false
true
0
7
15
49
21
28
null
null
runjak/carbon-adf
Carbon/Website/old/Discussion.hs
gpl-3.0
acs :: DiscussionId -> OBW Response acs did = do dInput <- liftB $ BLogic.diamondInput False did dInput' <- liftB $ BLogic.diamondInput True did respOk $ responseJSON' [dInput, dInput']
193
acs :: DiscussionId -> OBW Response acs did = do dInput <- liftB $ BLogic.diamondInput False did dInput' <- liftB $ BLogic.diamondInput True did respOk $ responseJSON' [dInput, dInput']
193
acs did = do dInput <- liftB $ BLogic.diamondInput False did dInput' <- liftB $ BLogic.diamondInput True did respOk $ responseJSON' [dInput, dInput']
157
false
true
0
11
36
78
35
43
null
null
sinelaw/lamdu
Lamdu/Main.hs
gpl-3.0
sampler :: Eq a => IO a -> IO (ThreadId, IO (Version, a)) sampler sample = do ref <- newMVar . (,) 0 =<< E.evaluate =<< sample let updateMVar new = modifyMVar_ ref $ \(ver, old) -> return $ if old == new then (ver, old) else (ver+1, new) tid <- forkIO . forever $ do threadDel...
431
sampler :: Eq a => IO a -> IO (ThreadId, IO (Version, a)) sampler sample = do ref <- newMVar . (,) 0 =<< E.evaluate =<< sample let updateMVar new = modifyMVar_ ref $ \(ver, old) -> return $ if old == new then (ver, old) else (ver+1, new) tid <- forkIO . forever $ do threadDel...
431
sampler sample = do ref <- newMVar . (,) 0 =<< E.evaluate =<< sample let updateMVar new = modifyMVar_ ref $ \(ver, old) -> return $ if old == new then (ver, old) else (ver+1, new) tid <- forkIO . forever $ do threadDelay 200000 (updateMVar =<< sample) `E.catch` \E.SomeE...
373
false
true
0
16
122
210
105
105
null
null
hirokai/PaperServer
Handler/Home.hs
bsd-2-clause
{- optionsAuthR :: Handler RepPlain optionsAuthR = do -- ToDo: Add other sites. setHeader "Access-Control-Allow-Origin" "http://pubs.acs.org" setHeader "Access-Control-Allow-Methods" "GET, OPTIONS" return $ RepPlain $ toContent ("" :: Text) -} getHomeR :: Handler Html getHomeR = do mu <- maybeAuthId ...
530
getHomeR :: Handler Html getHomeR = do mu <- maybeAuthId mobile <- isMobile redirect $ case (mu,mobile) of (Just user,False) -> PaperListR (Just user,True) -> PaperListMobileR (Nothing,False) -> WelcomeR (Nothing,True) -> WelcomeMobileR
270
getHomeR = do mu <- maybeAuthId mobile <- isMobile redirect $ case (mu,mobile) of (Just user,False) -> PaperListR (Just user,True) -> PaperListMobileR (Nothing,False) -> WelcomeR (Nothing,True) -> WelcomeMobileR
245
true
true
1
13
110
105
53
52
null
null
JohnLato/iteratee
src/Data/Iteratee/IO/Handle.hs
bsd-3-clause
enumFileRandom :: (MonadBaseControl IO m, ReadableChunk s el) => Int -- ^Buffer size -> FilePath -> Enumerator s m a enumFileRandom = enumFile' enumHandleRandom
184
enumFileRandom :: (MonadBaseControl IO m, ReadableChunk s el) => Int -- ^Buffer size -> FilePath -> Enumerator s m a enumFileRandom = enumFile' enumHandleRandom
184
enumFileRandom = enumFile' enumHandleRandom
43
false
true
0
9
47
54
26
28
null
null
ndmitchell/ghcid
src/Wait.hs
bsd-3-clause
waitFiles :: forall a. Ord a => Waiter -> IO ([(FilePath, a)] -> IO (Either String [(FilePath, a)])) waitFiles waiter = do base <- getCurrentTime pure $ \files -> handle onError (go base files) where onError :: IOError -> IO (Either String [(FilePath, a)]) onError e = sleep 1.0 >> pure (Left (show e))...
3,508
waitFiles :: forall a. Ord a => Waiter -> IO ([(FilePath, a)] -> IO (Either String [(FilePath, a)])) waitFiles waiter = do base <- getCurrentTime pure $ \files -> handle onError (go base files) where onError :: IOError -> IO (Either String [(FilePath, a)]) onError e = sleep 1.0 >> pure (Left (show e))...
3,508
waitFiles waiter = do base <- getCurrentTime pure $ \files -> handle onError (go base files) where onError :: IOError -> IO (Either String [(FilePath, a)]) onError e = sleep 1.0 >> pure (Left (show e)) go :: UTCTime -> [(FilePath, a)] -> IO (Either String [(FilePath, a)]) go base files = do ...
3,406
false
true
0
28
1,351
1,153
569
584
null
null
fgaray/shakespeare
Text/Shakespeare/I18N.hs
mit
defClause :: Q Clause defClause = do a <- newName "sub" c <- newName "langs" d <- newName "msg" rm <- [|renderMessage|] return $ Clause [VarP a, ConP (mkName ":") [WildP, VarP c], VarP d] (NormalB $ rm `AppE` VarE a `AppE` VarE c `AppE` VarE d) []
291
defClause :: Q Clause defClause = do a <- newName "sub" c <- newName "langs" d <- newName "msg" rm <- [|renderMessage|] return $ Clause [VarP a, ConP (mkName ":") [WildP, VarP c], VarP d] (NormalB $ rm `AppE` VarE a `AppE` VarE c `AppE` VarE d) []
291
defClause = do a <- newName "sub" c <- newName "langs" d <- newName "msg" rm <- [|renderMessage|] return $ Clause [VarP a, ConP (mkName ":") [WildP, VarP c], VarP d] (NormalB $ rm `AppE` VarE a `AppE` VarE c `AppE` VarE d) []
269
false
true
0
14
91
145
70
75
null
null
matthewSorensen/himpress
Himpress/Plumbing.hs
bsd-3-clause
watchFiles::[FilePath]->IO () ->IO () watchFiles files act = withINotify $ \inot -> mapM_ (watch inot) files >> loop where watch inot f = addWatch inot [CloseWrite] f $ const act loop = threadDelay 1000000 >> loop -- The assumption is made that you're an idiot (read: "I'm lazy") if this tool is -- set u...
367
watchFiles::[FilePath]->IO () ->IO () watchFiles files act = withINotify $ \inot -> mapM_ (watch inot) files >> loop where watch inot f = addWatch inot [CloseWrite] f $ const act loop = threadDelay 1000000 >> loop -- The assumption is made that you're an idiot (read: "I'm lazy") if this tool is -- set u...
367
watchFiles files act = withINotify $ \inot -> mapM_ (watch inot) files >> loop where watch inot f = addWatch inot [CloseWrite] f $ const act loop = threadDelay 1000000 >> loop -- The assumption is made that you're an idiot (read: "I'm lazy") if this tool is -- set up to watch a file that it potentially ...
329
false
true
0
10
78
104
52
52
null
null
olsner/ghc
testsuite/tests/programs/life_space_leak/Main.hs
bsd-3-clause
init2 (C1 x xs) = C1 x (init2 xs)
33
init2 (C1 x xs) = C1 x (init2 xs)
33
init2 (C1 x xs) = C1 x (init2 xs)
33
false
false
0
7
8
29
13
16
null
null
avieth/diplomacy
Diplomacy/Province.hs
bsd-3-clause
provinceType BarentsSea = Water
31
provinceType BarentsSea = Water
31
provinceType BarentsSea = Water
31
false
false
0
5
3
9
4
5
null
null
taylor1791/adventofcode
2015/test/Test/Day5.hs
bsd-2-clause
part2 :: TestTree part2 = testGroup "Part 2" [p2Tests, p2Puzzle]
64
part2 :: TestTree part2 = testGroup "Part 2" [p2Tests, p2Puzzle]
64
part2 = testGroup "Part 2" [p2Tests, p2Puzzle]
46
false
true
0
6
9
22
12
10
null
null
fmapfmapfmap/amazonka
amazonka-codepipeline/gen/Network/AWS/CodePipeline/Types/Product.hs
mpl-2.0
-- | The type of the gate declaration. bdType :: Lens' BlockerDeclaration BlockerType bdType = lens _bdType (\ s a -> s{_bdType = a})
133
bdType :: Lens' BlockerDeclaration BlockerType bdType = lens _bdType (\ s a -> s{_bdType = a})
94
bdType = lens _bdType (\ s a -> s{_bdType = a})
47
true
true
0
9
23
40
22
18
null
null
ony/LibClang
src/Clang/Comment.hs
bsd-3-clause
getFullCommentAsHTML _ = return Nothing
53
getFullCommentAsHTML _ = return Nothing
53
getFullCommentAsHTML _ = return Nothing
53
false
false
0
5
18
12
5
7
null
null
cdepillabout/HLearn
src/HLearn/Data/SpaceTree.hs
bsd-3-clause
stExtraLeaves :: (Eq dp, SpaceTree t dp) => t dp -> Int stExtraLeaves t = if stHasNoChildren t then 0 else sum (map stExtraLeaves $ stChildrenList t) + if supremum $ map (\c -> stNode c==stNode t && stHasNoChildren c) $ stChildrenList t then 1 else 0
290
stExtraLeaves :: (Eq dp, SpaceTree t dp) => t dp -> Int stExtraLeaves t = if stHasNoChildren t then 0 else sum (map stExtraLeaves $ stChildrenList t) + if supremum $ map (\c -> stNode c==stNode t && stHasNoChildren c) $ stChildrenList t then 1 else 0
290
stExtraLeaves t = if stHasNoChildren t then 0 else sum (map stExtraLeaves $ stChildrenList t) + if supremum $ map (\c -> stNode c==stNode t && stHasNoChildren c) $ stChildrenList t then 1 else 0
234
false
true
0
15
86
116
57
59
null
null
kim/amazonka
amazonka-rds/gen/Network/AWS/RDS/CreateDBSnapshot.hs
mpl-2.0
-- | The identifier for the DB snapshot. -- -- Constraints: -- -- Cannot be null, empty, or blank Must contain from 1 to 255 alphanumeric -- characters or hyphens First character must be a letter Cannot end with a -- hyphen or contain two consecutive hyphens Example: 'my-snapshot-id' cdbs1DBSnapshotIdentifier :: Lens'...
461
cdbs1DBSnapshotIdentifier :: Lens' CreateDBSnapshot Text cdbs1DBSnapshotIdentifier = lens _cdbs1DBSnapshotIdentifier (\s a -> s { _cdbs1DBSnapshotIdentifier = a })
175
cdbs1DBSnapshotIdentifier = lens _cdbs1DBSnapshotIdentifier (\s a -> s { _cdbs1DBSnapshotIdentifier = a })
118
true
true
0
9
79
46
28
18
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ConversionTask' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ctImportInstance' -- -- * 'ctStatusMessage' -- -- * 'ctImportVolume' -- -- * 'ctExpirationTime' -- -- * 'ctTags' -- -- * 'ctConversionTaskId' -- ...
750
conversionTask :: Text -- ^ 'ctConversionTaskId' -> ConversionTaskState -- ^ 'ctState' -> ConversionTask conversionTask pConversionTaskId_ pState_ = ConversionTask' { _ctImportInstance = Nothing , _ctStatusMessage = Nothing , _ctImportVolume = Nothing , _ctExpirationTime = Nothing , ...
415
conversionTask pConversionTaskId_ pState_ = ConversionTask' { _ctImportInstance = Nothing , _ctStatusMessage = Nothing , _ctImportVolume = Nothing , _ctExpirationTime = Nothing , _ctTags = Nothing , _ctConversionTaskId = pConversionTaskId_ , _ctState = pState_ }
298
true
true
0
6
152
87
60
27
null
null
thomie/cabal
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
bsd-3-clause
-- | Makes a solver test case, consisting of the following components: -- -- 1. An 'ExampleDb', representing the package database (both -- installed and remote) we are doing dependency solving over, -- 2. A 'String' name for the test, -- 3. A list '[String]' of package names to solve for -- ...
781
mkTest :: ExampleDb -> String -> [String] -> SolverResult -> SolverTest mkTest = mkTestExtLangPC Nothing Nothing []
143
mkTest = mkTestExtLangPC Nothing Nothing []
43
true
true
0
10
188
58
34
24
null
null
DanielWaterworth/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
declArgs args inl n (LLam xs x) = declArgs (args ++ xs) inl n x
63
declArgs args inl n (LLam xs x) = declArgs (args ++ xs) inl n x
63
declArgs args inl n (LLam xs x) = declArgs (args ++ xs) inl n x
63
false
false
0
7
14
39
19
20
null
null
daleooo/barrelfish
tools/flounder/CAbsSyntax.hs
mit
pp_constspec :: ConstSpec -> String pp_constspec Const = "const "
65
pp_constspec :: ConstSpec -> String pp_constspec Const = "const "
65
pp_constspec Const = "const "
29
false
true
0
5
9
18
9
9
null
null
kumasento/accelerate
Data/Array/Accelerate/Trafo/Shrink.hs
bsd-3-clause
basicReduceAcc :: Kit acc => (forall aenv a. acc aenv a -> PreOpenAcc acc aenv a) -> UsesOfAcc acc -> ReduceAcc acc basicReduceAcc unwrapAcc countAcc (unwrapAcc -> bnd) body@(unwrapAcc -> pbody) | Avar _ <- bnd = Stats.inline "Avar" . Just $ rebuildA rebuildAcc (subAtop bnd) pbody | uses <= l...
1,082
basicReduceAcc :: Kit acc => (forall aenv a. acc aenv a -> PreOpenAcc acc aenv a) -> UsesOfAcc acc -> ReduceAcc acc basicReduceAcc unwrapAcc countAcc (unwrapAcc -> bnd) body@(unwrapAcc -> pbody) | Avar _ <- bnd = Stats.inline "Avar" . Just $ rebuildA rebuildAcc (subAtop bnd) pbody | uses <= l...
1,082
basicReduceAcc unwrapAcc countAcc (unwrapAcc -> bnd) body@(unwrapAcc -> pbody) | Avar _ <- bnd = Stats.inline "Avar" . Just $ rebuildA rebuildAcc (subAtop bnd) pbody | uses <= lIMIT = Stats.betaReduce msg . Just $ rebuildA rebuildAcc (subAtop bnd) pbody | otherwise = Nothing where -- ...
950
false
true
22
8
276
210
113
97
null
null
ekr/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
-- | Convert a proof skeleton to an incremental proof without any sequent -- annotations. skeletonToIncrementalProof :: ProofSkeleton -> IncrementalProof skeletonToIncrementalProof = fmap (fmap (const Nothing))
210
skeletonToIncrementalProof :: ProofSkeleton -> IncrementalProof skeletonToIncrementalProof = fmap (fmap (const Nothing))
120
skeletonToIncrementalProof = fmap (fmap (const Nothing))
56
true
true
0
9
25
32
17
15
null
null
cirquit/Personal-Repository
Haskell/Playground/UTFTConverter/src/Main.hs
mit
help :: String -> IO () help name = do putStrLn "Usage: " putStrLn $ " " ++ name ++ " <filespec> /c|r [/o <path>] [/t AVR|ARM|PIC32]\n" putStrLn "<filespec>: File(s) to convert" putStrLn "parameters: /c - Create output as .c array files" putStrL...
999
help :: String -> IO () help name = do putStrLn "Usage: " putStrLn $ " " ++ name ++ " <filespec> /c|r [/o <path>] [/t AVR|ARM|PIC32]\n" putStrLn "<filespec>: File(s) to convert" putStrLn "parameters: /c - Create output as .c array files" putStrL...
999
help name = do putStrLn "Usage: " putStrLn $ " " ++ name ++ " <filespec> /c|r [/o <path>] [/t AVR|ARM|PIC32]\n" putStrLn "<filespec>: File(s) to convert" putStrLn "parameters: /c - Create output as .c array files" putStrLn " /r ...
975
false
true
0
9
374
110
42
68
null
null
abakst/Zoepis
Zoepis/ZRandom.hs
gpl-3.0
zRandGen :: Word64 -> ZRandGen zRandGen = pureMT
48
zRandGen :: Word64 -> ZRandGen zRandGen = pureMT
48
zRandGen = pureMT
17
false
true
0
5
7
15
8
7
null
null
bennofs/cabal
cabal-install/Distribution/Solver/Modular/Explore.hs
bsd-3-clause
-- | Interface. backjumpAndExplore :: EnableBackjumping -> Tree QGoalReason -> Log Message (Assignment, RevDepMap) backjumpAndExplore enableBj t = toLog $ exploreLog enableBj t (A M.empty M.empty M.empty) where toLog :: P.Progress step fail done -> Log step done toLog = P.foldProgress P...
352
backjumpAndExplore :: EnableBackjumping -> Tree QGoalReason -> Log Message (Assignment, RevDepMap) backjumpAndExplore enableBj t = toLog $ exploreLog enableBj t (A M.empty M.empty M.empty) where toLog :: P.Progress step fail done -> Log step done toLog = P.foldProgress P.Step (const (P....
336
backjumpAndExplore enableBj t = toLog $ exploreLog enableBj t (A M.empty M.empty M.empty) where toLog :: P.Progress step fail done -> Log step done toLog = P.foldProgress P.Step (const (P.Fail ())) P.Done
218
true
true
0
10
78
126
62
64
null
null
peter-fogg/pardoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
translateLang "emacs-lisp" = "commonlisp"
41
translateLang "emacs-lisp" = "commonlisp"
41
translateLang "emacs-lisp" = "commonlisp"
41
false
false
0
5
3
9
4
5
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F29.hs
bsd-3-clause
-- glVertexArrayVertexAttribFormatEXT ------------------------------------------ glVertexArrayVertexAttribFormatEXT :: MonadIO m => GLuint -- ^ @vaobj@. -> GLuint -- ^ @attribindex@. -> GLint -- ^ @size@. -> GLenum -- ^ @type@ of type [VertexAttribType](Graphics-GL-Groups.html#VertexAttribType). -> GLboole...
565
glVertexArrayVertexAttribFormatEXT :: MonadIO m => GLuint -- ^ @vaobj@. -> GLuint -- ^ @attribindex@. -> GLint -- ^ @size@. -> GLenum -- ^ @type@ of type [VertexAttribType](Graphics-GL-Groups.html#VertexAttribType). -> GLboolean -- ^ @normalized@ of type [Boolean](Graphics-GL-Groups.html#Boolean). -> GLui...
483
glVertexArrayVertexAttribFormatEXT v1 v2 v3 v4 v5 v6 = liftIO $ dyn885 ptr_glVertexArrayVertexAttribFormatEXT v1 v2 v3 v4 v5 v6
127
true
true
0
14
80
90
46
44
null
null
lally/libmet
src/Ppt/Decode.hs
bsd-3-clause
showValue :: Prim -> String showValue (PTime (Just (ETimeSpec _, a, b))) = show $ a * 1000000000 + b
100
showValue :: Prim -> String showValue (PTime (Just (ETimeSpec _, a, b))) = show $ a * 1000000000 + b
100
showValue (PTime (Just (ETimeSpec _, a, b))) = show $ a * 1000000000 + b
72
false
true
0
11
19
54
28
26
null
null
peterokagey/haskellOEIS
src/Helpers/GrahamLinearAlgebra.hs
apache-2.0
-- Initial Boolean matrix for A006255 initialMatrix :: Integer -> Matrix Bool initialMatrix n = matrixFromColumnLabels $ [n + 1..upperBound n] ++ [n]
149
initialMatrix :: Integer -> Matrix Bool initialMatrix n = matrixFromColumnLabels $ [n + 1..upperBound n] ++ [n]
111
initialMatrix n = matrixFromColumnLabels $ [n + 1..upperBound n] ++ [n]
71
true
true
0
8
22
45
23
22
null
null