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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
QuickChick/Luck | luck/src/Core/Types/Generator.hs | mit | -- | Try to inline a definition.
inlineS :: (Ord c, Ord tc, Ord tv)
=> TcEnv v c tc tv -> Set tc -> Type tc tv -> Inliner tc [(Weight, DataPat c tc tv)]
inlineS _env _stack ty@(TcVar _) = return $ always (DPLeaf ty) | 217 | inlineS :: (Ord c, Ord tc, Ord tv)
=> TcEnv v c tc tv -> Set tc -> Type tc tv -> Inliner tc [(Weight, DataPat c tc tv)]
inlineS _env _stack ty@(TcVar _) = return $ always (DPLeaf ty) | 184 | inlineS _env _stack ty@(TcVar _) = return $ always (DPLeaf ty) | 62 | true | true | 0 | 12 | 48 | 112 | 56 | 56 | null | null |
jgoerzen/hpodder | Commands/Ls.hs | gpl-2.0 | lscasts_help =
"Usage: hpodder lscasts [-l] [castid [castid...]]\n\n" ++ genericIdHelp ++
"\nIf no ID is given, then \"all\" will be used.\n" | 143 | lscasts_help =
"Usage: hpodder lscasts [-l] [castid [castid...]]\n\n" ++ genericIdHelp ++
"\nIf no ID is given, then \"all\" will be used.\n" | 143 | lscasts_help =
"Usage: hpodder lscasts [-l] [castid [castid...]]\n\n" ++ genericIdHelp ++
"\nIf no ID is given, then \"all\" will be used.\n" | 143 | false | false | 0 | 6 | 22 | 14 | 7 | 7 | null | null |
ntindall/KVStore | src/Lib.hs | bsd-3-clause | parseOptions :: [Mode] --options parsed from command line
-> (Bool, Int, Maybe Int) --(isLocal, ringSize, workerId)
parseOptions l = optionsAcc l (False, 1, Nothing)
where optionsAcc l' acc
| null l' = acc
| otherwise =
let opt = head l'
... | 569 | parseOptions :: [Mode] --options parsed from command line
-> (Bool, Int, Maybe Int)
parseOptions l = optionsAcc l (False, 1, Nothing)
where optionsAcc l' acc
| null l' = acc
| otherwise =
let opt = head l'
in case opt of
Loc... | 530 | parseOptions l = optionsAcc l (False, 1, Nothing)
where optionsAcc l' acc
| null l' = acc
| otherwise =
let opt = head l'
in case opt of
Local -> optionsAcc (tail l') (True, snd3 acc, thd3 acc)
RingSize n -> optionsAcc (tail l') (fst3 acc, n... | 410 | true | true | 0 | 13 | 213 | 202 | 100 | 102 | null | null |
HalosGhost/hs | numbers/happy.hs | isc | happiness :: Int -> String
happiness n | happy n = "Happy"
| otherwise = "Unhappy" | 96 | happiness :: Int -> String
happiness n | happy n = "Happy"
| otherwise = "Unhappy" | 96 | happiness n | happy n = "Happy"
| otherwise = "Unhappy" | 69 | false | true | 0 | 8 | 29 | 44 | 18 | 26 | null | null |
christiaanb/Idris-dev | src/Core/Elaborate.hs | bsd-3-clause | saveState :: Elab' aux ()
saveState = do e@(ES p s _) <- get
put (ES p s (Just e)) | 97 | saveState :: Elab' aux ()
saveState = do e@(ES p s _) <- get
put (ES p s (Just e)) | 97 | saveState = do e@(ES p s _) <- get
put (ES p s (Just e)) | 71 | false | true | 0 | 11 | 34 | 60 | 29 | 31 | null | null |
momomimachli/Hedsql | src/Database/Hedsql/Common/Constructor.hs | gpl-3.0 | -- | Create an INTEGER.
integer :: DataType Int dbVendor
integer = Integer | 74 | integer :: DataType Int dbVendor
integer = Integer | 50 | integer = Integer | 17 | true | true | 0 | 5 | 12 | 17 | 9 | 8 | null | null |
zjhmale/monadme | monad/src/monad/haskell/mpc.hs | epl-1.0 | parse25 = eval "2*(3+4)" | 24 | parse25 = eval "2*(3+4)" | 24 | parse25 = eval "2*(3+4)" | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
rasendubi/arachne | src/Network/MQTT/Parser.hs | bsd-3-clause | parsePubrec :: Word8 -> Parser PubrecPacket
parsePubrec flags = do
assert (flags == 0x00) "Reserved bits MUST be set to zero"
_ <- word8 0x02 <?> "Remaining length MUST be 2"
PubrecPacket <$> packetIdentifier | 214 | parsePubrec :: Word8 -> Parser PubrecPacket
parsePubrec flags = do
assert (flags == 0x00) "Reserved bits MUST be set to zero"
_ <- word8 0x02 <?> "Remaining length MUST be 2"
PubrecPacket <$> packetIdentifier | 214 | parsePubrec flags = do
assert (flags == 0x00) "Reserved bits MUST be set to zero"
_ <- word8 0x02 <?> "Remaining length MUST be 2"
PubrecPacket <$> packetIdentifier | 170 | false | true | 0 | 9 | 39 | 57 | 26 | 31 | null | null |
Happy0/snowdrift | Model/Comment.hs | agpl-3.0 | addMaxDepth (MaxDepth x) y = MaxDepth (x + y) | 45 | addMaxDepth (MaxDepth x) y = MaxDepth (x + y) | 45 | addMaxDepth (MaxDepth x) y = MaxDepth (x + y) | 45 | false | false | 0 | 7 | 8 | 27 | 13 | 14 | null | null |
CRogers/stack | src/Stack/BuildPlan.hs | bsd-3-clause | shadowMiniBuildPlan :: MiniBuildPlan
-> Set PackageName
-> (MiniBuildPlan, Map PackageName MiniPackageInfo)
shadowMiniBuildPlan (MiniBuildPlan ghc pkgs0) shadowed =
(MiniBuildPlan ghc $ Map.fromList met, Map.fromList unmet)
where
pkgs1 = Map.difference pkgs0 $ Map.fromS... | 1,981 | shadowMiniBuildPlan :: MiniBuildPlan
-> Set PackageName
-> (MiniBuildPlan, Map PackageName MiniPackageInfo)
shadowMiniBuildPlan (MiniBuildPlan ghc pkgs0) shadowed =
(MiniBuildPlan ghc $ Map.fromList met, Map.fromList unmet)
where
pkgs1 = Map.difference pkgs0 $ Map.fromS... | 1,981 | shadowMiniBuildPlan (MiniBuildPlan ghc pkgs0) shadowed =
(MiniBuildPlan ghc $ Map.fromList met, Map.fromList unmet)
where
pkgs1 = Map.difference pkgs0 $ Map.fromSet (\_ -> ()) shadowed
depsMet = flip execState Map.empty $ mapM_ (check Set.empty) (Map.keys pkgs1)
check visited name
| name `Se... | 1,833 | false | true | 0 | 20 | 856 | 469 | 226 | 243 | null | null |
trskop/cabal | Cabal/Distribution/Simple/Build.hs | bsd-3-clause | startInterpreter :: Verbosity -> ProgramDb -> Compiler -> PackageDBStack -> IO ()
startInterpreter verbosity programDb comp packageDBs =
case compilerFlavor comp of
GHC -> GHC.startInterpreter verbosity programDb comp packageDBs
GHCJS -> GHCJS.startInterpreter verbosity programDb comp packageDBs
_ ... | 373 | startInterpreter :: Verbosity -> ProgramDb -> Compiler -> PackageDBStack -> IO ()
startInterpreter verbosity programDb comp packageDBs =
case compilerFlavor comp of
GHC -> GHC.startInterpreter verbosity programDb comp packageDBs
GHCJS -> GHCJS.startInterpreter verbosity programDb comp packageDBs
_ ... | 373 | startInterpreter verbosity programDb comp packageDBs =
case compilerFlavor comp of
GHC -> GHC.startInterpreter verbosity programDb comp packageDBs
GHCJS -> GHCJS.startInterpreter verbosity programDb comp packageDBs
_ -> die "A REPL is not supported with this compiler." | 291 | false | true | 0 | 10 | 68 | 95 | 44 | 51 | null | null |
apyrgio/snf-ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pRemoteNode :: Field
pRemoteNode =
withDoc "New secondary node" $
optionalNEStringField "remote_node" | 105 | pRemoteNode :: Field
pRemoteNode =
withDoc "New secondary node" $
optionalNEStringField "remote_node" | 105 | pRemoteNode =
withDoc "New secondary node" $
optionalNEStringField "remote_node" | 84 | false | true | 0 | 6 | 15 | 21 | 10 | 11 | null | null |
NightRa/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LCompl ITChar) [x] = doOp v (LCompl ITNative) [x] | 57 | doOp v (LCompl ITChar) [x] = doOp v (LCompl ITNative) [x] | 57 | doOp v (LCompl ITChar) [x] = doOp v (LCompl ITNative) [x] | 57 | false | false | 0 | 7 | 10 | 38 | 19 | 19 | null | null |
neongreen/hat | src/DB.hs | bsd-3-clause | setAdmin :: Uid User -> Bool -> Acid.Update GlobalState ()
setAdmin userId adm = userById userId . admin .= adm | 111 | setAdmin :: Uid User -> Bool -> Acid.Update GlobalState ()
setAdmin userId adm = userById userId . admin .= adm | 111 | setAdmin userId adm = userById userId . admin .= adm | 52 | false | true | 0 | 9 | 19 | 52 | 23 | 29 | null | null |
jespino/sth | sth.hs | bsd-3-clause | generateStatList (Q1:xs) content = Stat Q1 (Just $ STHLib.q1 content) : generateStatList xs content | 99 | generateStatList (Q1:xs) content = Stat Q1 (Just $ STHLib.q1 content) : generateStatList xs content | 99 | generateStatList (Q1:xs) content = Stat Q1 (Just $ STHLib.q1 content) : generateStatList xs content | 99 | false | false | 0 | 10 | 13 | 44 | 21 | 23 | null | null |
snoyberg/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | -- See Note [One-tuples]
mkBoxedTupleStr ar = '(' : commas ar ++ ")" | 68 | mkBoxedTupleStr ar = '(' : commas ar ++ ")" | 43 | mkBoxedTupleStr ar = '(' : commas ar ++ ")" | 43 | true | false | 0 | 7 | 12 | 21 | 10 | 11 | null | null |
phasedchirp/chirpy-learning | src/RPois.hs | bsd-3-clause | -- Generate list of poisson-distributed random numbers
rPois :: (RandomGen g) => g -> Double -> Int -> [Int]
rPois g l n = map (qPois l) (take n $ randomRs (0,1) g) | 164 | rPois :: (RandomGen g) => g -> Double -> Int -> [Int]
rPois g l n = map (qPois l) (take n $ randomRs (0,1) g) | 109 | rPois g l n = map (qPois l) (take n $ randomRs (0,1) g) | 55 | true | true | 0 | 9 | 32 | 75 | 39 | 36 | null | null |
brendanhay/gogol | gogol-fonts/gen/Network/Google/Fonts/Types/Product.hs | mpl-2.0 | -- | The scripts supported by the font.
wSubSets :: Lens' Webfont [Text]
wSubSets
= lens _wSubSets (\ s a -> s{_wSubSets = a}) .
_Default
. _Coerce | 161 | wSubSets :: Lens' Webfont [Text]
wSubSets
= lens _wSubSets (\ s a -> s{_wSubSets = a}) .
_Default
. _Coerce | 121 | wSubSets
= lens _wSubSets (\ s a -> s{_wSubSets = a}) .
_Default
. _Coerce | 88 | true | true | 0 | 11 | 41 | 53 | 28 | 25 | null | null |
centromere/cacophony | src/Crypto/Noise.hs | unlicense | -- | Rekeys the sending @CipherState@ according to section 11.3 of the protocol.
rekeySending :: (Cipher c, DH d, Hash h)
=> NoiseState c d h
-> NoiseState c d h
rekeySending ns = ns & nsSendingCipherState %~ (<*>) (pure rekey) | 253 | rekeySending :: (Cipher c, DH d, Hash h)
=> NoiseState c d h
-> NoiseState c d h
rekeySending ns = ns & nsSendingCipherState %~ (<*>) (pure rekey) | 172 | rekeySending ns = ns & nsSendingCipherState %~ (<*>) (pure rekey) | 65 | true | true | 0 | 8 | 66 | 73 | 37 | 36 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Data.hs | bsd-3-clause | createTask :: TaskID -> Arduino () -> Arduino ()
createTask tid ps = Arduino $ primitive $ CreateTask tid ps | 108 | createTask :: TaskID -> Arduino () -> Arduino ()
createTask tid ps = Arduino $ primitive $ CreateTask tid ps | 108 | createTask tid ps = Arduino $ primitive $ CreateTask tid ps | 59 | false | true | 0 | 8 | 19 | 47 | 22 | 25 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Type.hs | bsd-3-clause | nonNumDict (TypeCUChar dict) = dict | 35 | nonNumDict (TypeCUChar dict) = dict | 35 | nonNumDict (TypeCUChar dict) = dict | 35 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
joshuaclayton/unused | src/Unused/TermSearch/Internal.hs | mit | baseFlags :: SearchBackend -> [String]
baseFlags Rg = ["-c", "-j", "1"] | 71 | baseFlags :: SearchBackend -> [String]
baseFlags Rg = ["-c", "-j", "1"] | 71 | baseFlags Rg = ["-c", "-j", "1"] | 32 | false | true | 0 | 6 | 10 | 30 | 17 | 13 | null | null |
tonyday567/hdcharts | test/example.hs | mit | circleChart :: ServerPart Response
circleChart =
responsePlay
(Pipes.each $ zipWith (\a b -> [a,b])
((\x -> XY (cos x) (sin x)) <$> (/20) <$> [0..])
((\x -> XY (sin (x + pi/2)) (sin (3*x))) <$> (/20) <$> [0..]))
(Chart.Render.render (chartCss "chart") Line.testChart2)
def | 286 | circleChart :: ServerPart Response
circleChart =
responsePlay
(Pipes.each $ zipWith (\a b -> [a,b])
((\x -> XY (cos x) (sin x)) <$> (/20) <$> [0..])
((\x -> XY (sin (x + pi/2)) (sin (3*x))) <$> (/20) <$> [0..]))
(Chart.Render.render (chartCss "chart") Line.testChart2)
def | 286 | circleChart =
responsePlay
(Pipes.each $ zipWith (\a b -> [a,b])
((\x -> XY (cos x) (sin x)) <$> (/20) <$> [0..])
((\x -> XY (sin (x + pi/2)) (sin (3*x))) <$> (/20) <$> [0..]))
(Chart.Render.render (chartCss "chart") Line.testChart2)
def | 251 | false | true | 0 | 18 | 56 | 178 | 96 | 82 | null | null |
alphaHeavy/cabal | Cabal/Distribution/System.hs | bsd-3-clause | osAliases Permissive Solaris = ["solaris2"] | 43 | osAliases Permissive Solaris = ["solaris2"] | 43 | osAliases Permissive Solaris = ["solaris2"] | 43 | false | false | 0 | 5 | 4 | 14 | 7 | 7 | null | null |
JoePym/hs-deck-builder | app/Main.hs | bsd-3-clause | getJSON :: IO B.ByteString
getJSON = B.readFile jsonFile | 56 | getJSON :: IO B.ByteString
getJSON = B.readFile jsonFile | 56 | getJSON = B.readFile jsonFile | 29 | false | true | 0 | 7 | 7 | 26 | 11 | 15 | null | null |
Submitty/AnalysisTools | src/Lichen/Parser/Python.hs | bsd-3-clause | convertExpr (Yield arg _) = Node [Tag "tuple"] <$> mapM convertYieldArg (possibly arg) | 86 | convertExpr (Yield arg _) = Node [Tag "tuple"] <$> mapM convertYieldArg (possibly arg) | 86 | convertExpr (Yield arg _) = Node [Tag "tuple"] <$> mapM convertYieldArg (possibly arg) | 86 | false | false | 0 | 8 | 12 | 41 | 19 | 22 | null | null |
kim/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs | mpl-2.0 | -- | The number of instances with 'requested' status.
icRequested :: Lens' InstancesCount (Maybe Int)
icRequested = lens _icRequested (\s a -> s { _icRequested = a }) | 166 | icRequested :: Lens' InstancesCount (Maybe Int)
icRequested = lens _icRequested (\s a -> s { _icRequested = a }) | 112 | icRequested = lens _icRequested (\s a -> s { _icRequested = a }) | 64 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
paulkeene/FP101x | chapter07/Parsing.hs | bsd-3-clause | upper :: Parser Char
upper = sat isUpper | 40 | upper :: Parser Char
upper = sat isUpper | 40 | upper = sat isUpper | 19 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
BeautifulDestinations/fb | gen/src/Facebook/Gen/CodeGenStr.hs | bsd-3-clause | langExts = V.fromList ["DeriveDataTypeable", "DeriveGeneric", "FlexibleContexts", "OverloadedStrings",
"ConstraintKinds", "CPP"] | 151 | langExts = V.fromList ["DeriveDataTypeable", "DeriveGeneric", "FlexibleContexts", "OverloadedStrings",
"ConstraintKinds", "CPP"] | 151 | langExts = V.fromList ["DeriveDataTypeable", "DeriveGeneric", "FlexibleContexts", "OverloadedStrings",
"ConstraintKinds", "CPP"] | 151 | false | false | 0 | 6 | 31 | 29 | 17 | 12 | null | null |
nikki-and-the-robots/nikki | src/Data/SelectTree.hs | lgpl-3.0 | labelA :: Accessor (SelectTree a) String
labelA = accessor getLabel setLabel | 76 | labelA :: Accessor (SelectTree a) String
labelA = accessor getLabel setLabel | 76 | labelA = accessor getLabel setLabel | 35 | false | true | 0 | 8 | 10 | 33 | 14 | 19 | null | null |
rimmington/eclogues | eclogues-impl/test/Eclogues/StateSpec.hs | bsd-3-clause | testCreateJob :: Spec
testCreateJob = describe "createJob" $ do
it "should succeed when given a unique, valid job" $
let result = schedule . createJob' $ isolatedJob' job
in result `shouldHave` jobInStage job (Queued LocalQueue)
context "when provided with dependency in Finished stage" $
... | 2,412 | testCreateJob :: Spec
testCreateJob = describe "createJob" $ do
it "should succeed when given a unique, valid job" $
let result = schedule . createJob' $ isolatedJob' job
in result `shouldHave` jobInStage job (Queued LocalQueue)
context "when provided with dependency in Finished stage" $
... | 2,412 | testCreateJob = describe "createJob" $ do
it "should succeed when given a unique, valid job" $
let result = schedule . createJob' $ isolatedJob' job
in result `shouldHave` jobInStage job (Queued LocalQueue)
context "when provided with dependency in Finished stage" $
it "should be placed... | 2,390 | false | true | 0 | 19 | 728 | 549 | 253 | 296 | null | null |
patperry/hs-ieee754 | tests/Tests.hs | bsd-3-clause | test_succIEEE_zero_F2 = succIEEE 0 @?= (minNormal * epsilon :: F) | 65 | test_succIEEE_zero_F2 = succIEEE 0 @?= (minNormal * epsilon :: F) | 65 | test_succIEEE_zero_F2 = succIEEE 0 @?= (minNormal * epsilon :: F) | 65 | false | false | 0 | 7 | 9 | 23 | 12 | 11 | null | null |
segfaulthunter/prove.hs | prove.hs | isc | getAll :: ExprSet -> [Expr]
getAll (ExprSet a n s) = a ++ n ++ s | 64 | getAll :: ExprSet -> [Expr]
getAll (ExprSet a n s) = a ++ n ++ s | 64 | getAll (ExprSet a n s) = a ++ n ++ s | 36 | false | true | 0 | 6 | 15 | 43 | 21 | 22 | null | null |
markus1189/xmonad-contrib-710 | XMonad/Layout/Groups/Helpers.hs | bsd-3-clause | -- | Move the focused window to a new group after the current one
moveToNewGroupDown :: X ()
moveToNewGroupDown = wrap G.moveToNewGroupDown | 139 | moveToNewGroupDown :: X ()
moveToNewGroupDown = wrap G.moveToNewGroupDown | 73 | moveToNewGroupDown = wrap G.moveToNewGroupDown | 46 | true | true | 0 | 6 | 21 | 22 | 11 | 11 | null | null |
iostat/relapse | src/Data/RLP.hs | mit | unpackRLPFully :: S.ByteString -> Either String RLPObject
unpackRLPFully input = handleResult $ parse rlpParser input
where handleResult = \case
Done rem res -> if S8.null rem
then Right res
else Left $ "Incomplete parse, leftover data: " ++ S8.unpack rem
Fail... | 547 | unpackRLPFully :: S.ByteString -> Either String RLPObject
unpackRLPFully input = handleResult $ parse rlpParser input
where handleResult = \case
Done rem res -> if S8.null rem
then Right res
else Left $ "Incomplete parse, leftover data: " ++ S8.unpack rem
Fail... | 547 | unpackRLPFully input = handleResult $ parse rlpParser input
where handleResult = \case
Done rem res -> if S8.null rem
then Right res
else Left $ "Incomplete parse, leftover data: " ++ S8.unpack rem
Fail rem ctxs err ->
Left $ "Parse failed: " +... | 489 | false | true | 1 | 15 | 186 | 163 | 74 | 89 | null | null |
YS-L/hs-urbandict | app/Main.hs | bsd-3-clause | options :: [OptDescr Flag]
options =
[ Option [] ["define"] (ReqArg Define "WORD") "Look up the definition of a word"
, Option [] ["today"] (NoArg Today) "Look up today's top definition"
, Option ['h'] ["help"] (NoArg Help) "Display help"
] | 251 | options :: [OptDescr Flag]
options =
[ Option [] ["define"] (ReqArg Define "WORD") "Look up the definition of a word"
, Option [] ["today"] (NoArg Today) "Look up today's top definition"
, Option ['h'] ["help"] (NoArg Help) "Display help"
] | 251 | options =
[ Option [] ["define"] (ReqArg Define "WORD") "Look up the definition of a word"
, Option [] ["today"] (NoArg Today) "Look up today's top definition"
, Option ['h'] ["help"] (NoArg Help) "Display help"
] | 224 | false | true | 0 | 8 | 50 | 89 | 47 | 42 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 378 = 377 | 9 | 378 = 377 | 9 | 378 = 377 | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
nevrenato/HetsAlloy | Maude/PreComorphism.hs | gpl-2.0 | reflSen :: Id -> Named CAS.CASLFORMULA
reflSen kind = makeNamed name $ quantifyUniversally form
where v = newVar kind
pred_type = CAS.Pred_type [kind, kind] nullRange
pn = CAS.Qual_pred_name rewID pred_type nullRange
form = CAS.Predication pn [v, v] nullRange
... | 415 | reflSen :: Id -> Named CAS.CASLFORMULA
reflSen kind = makeNamed name $ quantifyUniversally form
where v = newVar kind
pred_type = CAS.Pred_type [kind, kind] nullRange
pn = CAS.Qual_pred_name rewID pred_type nullRange
form = CAS.Predication pn [v, v] nullRange
... | 415 | reflSen kind = makeNamed name $ quantifyUniversally form
where v = newVar kind
pred_type = CAS.Pred_type [kind, kind] nullRange
pn = CAS.Qual_pred_name rewID pred_type nullRange
form = CAS.Predication pn [v, v] nullRange
name = "rew_refl_" ++ show kind
--... | 376 | false | true | 0 | 8 | 118 | 108 | 55 | 53 | null | null |
burz/sonada | Handler/Wave/Partials.hs | apache-2.0 | _waveChart' :: [Entity Module] -> Widget
_waveChart' modules = do
addScriptRemote "/static/js/Chart.min.js"
let _moduleList = _moduleList' modules False False
let _chart = _chart'
$(widgetFile "Wave/partials/_waveChart") | 236 | _waveChart' :: [Entity Module] -> Widget
_waveChart' modules = do
addScriptRemote "/static/js/Chart.min.js"
let _moduleList = _moduleList' modules False False
let _chart = _chart'
$(widgetFile "Wave/partials/_waveChart") | 236 | _waveChart' modules = do
addScriptRemote "/static/js/Chart.min.js"
let _moduleList = _moduleList' modules False False
let _chart = _chart'
$(widgetFile "Wave/partials/_waveChart") | 195 | false | true | 0 | 10 | 40 | 71 | 30 | 41 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | readVariableName = do
f <- variableStart
rest <- many variableChars
return (f:rest) | 95 | readVariableName = do
f <- variableStart
rest <- many variableChars
return (f:rest) | 95 | readVariableName = do
f <- variableStart
rest <- many variableChars
return (f:rest) | 95 | false | false | 1 | 10 | 23 | 40 | 16 | 24 | null | null |
rglew/cis194 | src/Week1/Tests.hs | mit | week1Ex4Tests = TestList [TestLabel "week1Ex4Tests" test4_1] | 60 | week1Ex4Tests = TestList [TestLabel "week1Ex4Tests" test4_1] | 60 | week1Ex4Tests = TestList [TestLabel "week1Ex4Tests" test4_1] | 60 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
olsner/ghc | compiler/simplCore/SAT.hs | bsd-3-clause | pprStaticness (Static (CoApp _)) = text "SC" | 46 | pprStaticness (Static (CoApp _)) = text "SC" | 46 | pprStaticness (Static (CoApp _)) = text "SC" | 46 | false | false | 0 | 9 | 8 | 24 | 11 | 13 | null | null |
uduki/hsQt | Qtc/Gui/QComboBox.hs | bsd-2-clause | qComboBox_deleteLater :: QComboBox a -> IO ()
qComboBox_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QComboBox_deleteLater cobj_x0 | 143 | qComboBox_deleteLater :: QComboBox a -> IO ()
qComboBox_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QComboBox_deleteLater cobj_x0 | 143 | qComboBox_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QComboBox_deleteLater cobj_x0 | 97 | false | true | 2 | 8 | 22 | 46 | 20 | 26 | null | null |
ajhc/drift | src/GenUtil.hs | mit | romRight :: Either a b -> b
fromRight (Right x) = x
| 52 | fromRight :: Either a b -> b
fromRight (Right x) = x | 52 | fromRight (Right x) = x | 23 | false | true | 0 | 9 | 12 | 34 | 15 | 19 | null | null |
ptitfred/ftv-vods | src/YouTube/Services.hs | bsd-3-clause | browseMyChannel :: Int -> Client [Playlist]
browseMyChannel count = do
requireOAuth2
myChannel <- channelId <$> findMyChannel
browseChannel myChannel count | 161 | browseMyChannel :: Int -> Client [Playlist]
browseMyChannel count = do
requireOAuth2
myChannel <- channelId <$> findMyChannel
browseChannel myChannel count | 161 | browseMyChannel count = do
requireOAuth2
myChannel <- channelId <$> findMyChannel
browseChannel myChannel count | 117 | false | true | 0 | 8 | 24 | 46 | 21 | 25 | null | null |
nushio3/ghc | compiler/utils/Util.hs | bsd-3-clause | -- same as (&&)
(<||>) :: Applicative f => f Bool -> f Bool -> f Bool
(<||>) = liftA2 (||) | 91 | (<||>) :: Applicative f => f Bool -> f Bool -> f Bool
(<||>) = liftA2 (||) | 74 | (<||>) = liftA2 (||) | 20 | true | true | 0 | 9 | 21 | 51 | 25 | 26 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/Piccolo.hs | bsd-3-clause | note21 :: Note
note21 = Note
(Pitch 1975.53 83 "b6")
22
(Range
(NoteRange
(NoteRangeAmplitude 7902.12 4 121.08)
(NoteRangeHarmonicFreq 1 1975.53))
(NoteRange
(NoteRangeAmplitude 1975.53 1 5270.0)
(NoteRangeHarmonicFreq 4 7902.12)))
[Harmoni... | 429 | note21 :: Note
note21 = Note
(Pitch 1975.53 83 "b6")
22
(Range
(NoteRange
(NoteRangeAmplitude 7902.12 4 121.08)
(NoteRangeHarmonicFreq 1 1975.53))
(NoteRange
(NoteRangeAmplitude 1975.53 1 5270.0)
(NoteRangeHarmonicFreq 4 7902.12)))
[Harmoni... | 429 | note21 = Note
(Pitch 1975.53 83 "b6")
22
(Range
(NoteRange
(NoteRangeAmplitude 7902.12 4 121.08)
(NoteRangeHarmonicFreq 1 1975.53))
(NoteRange
(NoteRangeAmplitude 1975.53 1 5270.0)
(NoteRangeHarmonicFreq 4 7902.12)))
[Harmonic 1 (-1.95) 527... | 414 | false | true | 0 | 10 | 135 | 149 | 72 | 77 | null | null |
Thell/pandoc | src/Text/Pandoc/Writers/ICML.hs | gpl-2.0 | styleToStrAttr :: Style -> (String, [(String, String)])
styleToStrAttr style =
let stlStr = unwords $ Set.toAscList $ Set.fromList style
stl = if null style
then "$ID/NormalCharacterStyle"
else "CharacterStyle/" ++ stlStr
attrs = [("AppliedCharacterStyle", stl)]
in... | 337 | styleToStrAttr :: Style -> (String, [(String, String)])
styleToStrAttr style =
let stlStr = unwords $ Set.toAscList $ Set.fromList style
stl = if null style
then "$ID/NormalCharacterStyle"
else "CharacterStyle/" ++ stlStr
attrs = [("AppliedCharacterStyle", stl)]
in... | 337 | styleToStrAttr style =
let stlStr = unwords $ Set.toAscList $ Set.fromList style
stl = if null style
then "$ID/NormalCharacterStyle"
else "CharacterStyle/" ++ stlStr
attrs = [("AppliedCharacterStyle", stl)]
in (stlStr, attrs) | 281 | false | true | 0 | 11 | 92 | 99 | 55 | 44 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Gen2/Object.hs | mit | putDeps :: SymbolTable -> Deps -> (SymbolTable, ByteString)
putDeps st deps = runPutS st (put deps) | 99 | putDeps :: SymbolTable -> Deps -> (SymbolTable, ByteString)
putDeps st deps = runPutS st (put deps) | 99 | putDeps st deps = runPutS st (put deps) | 39 | false | true | 0 | 7 | 15 | 45 | 22 | 23 | null | null |
peteg/ADHOC | Apps/Cache/Tests/030_cache_bugfinder.hs | gpl-2.0 | processor :: (EC (~>), ArrowProbe (~>) (B (~>)))
=> Integer -> (Signal, Signal, Signal, Signal) -> E (~>) () ()
processor i (proc_read, proc_write, proc_val, proc_cache_op_finished) =
probeSigE (proc_readP i) proc_read >>> probeSigE (proc_writeP i) proc_write
>>> probeSigE (proc_valP i) proc_val >>> p... | 464 | processor :: (EC (~>), ArrowProbe (~>) (B (~>)))
=> Integer -> (Signal, Signal, Signal, Signal) -> E (~>) () ()
processor i (proc_read, proc_write, proc_val, proc_cache_op_finished) =
probeSigE (proc_readP i) proc_read >>> probeSigE (proc_writeP i) proc_write
>>> probeSigE (proc_valP i) proc_val >>> p... | 464 | processor i (proc_read, proc_write, proc_val, proc_cache_op_finished) =
probeSigE (proc_readP i) proc_read >>> probeSigE (proc_writeP i) proc_write
>>> probeSigE (proc_valP i) proc_val >>> probeSigE (proc_cofP i) proc_cache_op_finished
>>> (loopE_ $ \exn -> emitE proc_write >>> whenE proc_cache_op_finished (t... | 342 | false | true | 4 | 13 | 79 | 187 | 98 | 89 | null | null |
keveri/hib | src/Hib/Plugins/Piato.hs | bsd-3-clause | name :: String
name = "piato" | 29 | name :: String
name = "piato" | 29 | name = "piato" | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
isomorphism/diagrams-gl | src/Diagrams/Backend/GL.hs | bsd-3-clause | linesVisible :: Path V2 Double -> GLLineStyle -> Bool
linesVisible _ ls = and [ ls^.lsColor /= toColor 0 0 0 0
, ls^.lsWidth > 0
] | 178 | linesVisible :: Path V2 Double -> GLLineStyle -> Bool
linesVisible _ ls = and [ ls^.lsColor /= toColor 0 0 0 0
, ls^.lsWidth > 0
] | 178 | linesVisible _ ls = and [ ls^.lsColor /= toColor 0 0 0 0
, ls^.lsWidth > 0
] | 124 | false | true | 0 | 8 | 74 | 63 | 31 | 32 | null | null |
albanD/adaptive-neural-compilation | compilation/src/TorchNetWriter.hs | gpl-3.0 | instr_to_nb "WRITE" = 9 | 23 | instr_to_nb "WRITE" = 9 | 23 | instr_to_nb "WRITE" = 9 | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
alephcloud/hs-aws-kinesis | tests/Main.hs | apache-2.0 | waitActiveT
:: Int
-- ^ upper bound on the number of seconds to wait.
-- The actual maximal number of seconds is closest smaller
-- power of two.
-> StreamName
-> EitherT T.Text IO StreamDescription
waitActiveT sec stream = retryT maxRetry $ do
DescribeStreamResponse d <- simpleKinesisT
... | 642 | waitActiveT
:: Int
-- ^ upper bound on the number of seconds to wait.
-- The actual maximal number of seconds is closest smaller
-- power of two.
-> StreamName
-> EitherT T.Text IO StreamDescription
waitActiveT sec stream = retryT maxRetry $ do
DescribeStreamResponse d <- simpleKinesisT
... | 642 | waitActiveT sec stream = retryT maxRetry $ do
DescribeStreamResponse d <- simpleKinesisT
$ DescribeStream Nothing Nothing stream
unless (streamDescriptionStreamStatus d == StreamStatusActive)
$ left "Stream is not active"
return d
where
maxRetry = floor $ logBase 2 (fromIntegral sec ::... | 419 | false | true | 1 | 12 | 139 | 128 | 59 | 69 | null | null |
chrisnc/hvx | src/HVX/Primitives.hs | bsd-3-clause | hexp :: (ApplyVex 'Convex 'Nondec v1 m1 ~ v2, ValidVex v2)
=> Expr v1 m1 -> Expr v2 (ApplyMon 'Nondec m1)
hexp e = apply Exp e | 128 | hexp :: (ApplyVex 'Convex 'Nondec v1 m1 ~ v2, ValidVex v2)
=> Expr v1 m1 -> Expr v2 (ApplyMon 'Nondec m1)
hexp e = apply Exp e | 128 | hexp e = apply Exp e | 20 | false | true | 0 | 11 | 28 | 79 | 36 | 43 | null | null |
kik/ToyPr | src/Parser/Token.hs | apache-2.0 | identifier :: Parsec String () String
identifier = P.identifier toyprToken | 74 | identifier :: Parsec String () String
identifier = P.identifier toyprToken | 74 | identifier = P.identifier toyprToken | 36 | false | true | 0 | 6 | 9 | 25 | 12 | 13 | null | null |
charlesrosenbauer/Bzo-Compiler | src/BzoPreprocessor.hs | gpl-3.0 | loadFullProject :: FilePath -> CfgSyntax -> [BzoFileModel BzoSyntax] -> IO (Either [BzoErr] [BzoFileModel BzoSyntax])
loadFullProject path (LibLines p ls) ds =
let path' = (takeDirectory $ takeDirectory path) ++ "/libs/"
libpaths = L.map (\x -> (libName x, libPath x)) ls ... | 1,417 | loadFullProject :: FilePath -> CfgSyntax -> [BzoFileModel BzoSyntax] -> IO (Either [BzoErr] [BzoFileModel BzoSyntax])
loadFullProject path (LibLines p ls) ds =
let path' = (takeDirectory $ takeDirectory path) ++ "/libs/"
libpaths = L.map (\x -> (libName x, libPath x)) ls ... | 1,417 | loadFullProject path (LibLines p ls) ds =
let path' = (takeDirectory $ takeDirectory path) ++ "/libs/"
libpaths = L.map (\x -> (libName x, libPath x)) ls -- format list of known libraries into list of tuples
(l0, l1) = unzip libpaths
l2 ... | 1,299 | false | true | 0 | 20 | 518 | 414 | 215 | 199 | null | null |
avsm/Idris | Idris/RunIO.hs | bsd-3-clause | getLock (Constant h) = case cast h of
Just h' -> h'
Nothing -> error ("Lock error in constant " ++ show h) | 156 | getLock (Constant h) = case cast h of
Just h' -> h'
Nothing -> error ("Lock error in constant " ++ show h) | 156 | getLock (Constant h) = case cast h of
Just h' -> h'
Nothing -> error ("Lock error in constant " ++ show h) | 156 | false | false | 0 | 11 | 72 | 51 | 23 | 28 | null | null |
d10genes/haskell-edu | e8/Party.hs | bsd-2-clause | rob :: Employee
rob = Emp "Rob" 8 | 33 | rob :: Employee
rob = Emp "Rob" 8 | 33 | rob = Emp "Rob" 8 | 17 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
acowley/ghc | compiler/types/Type.hs | bsd-3-clause | isUnLiftedType :: Type -> Bool
-- isUnLiftedType returns True for forall'd unlifted types:
-- x :: forall a. Int#
-- I found bindings like these were getting floated to the top level.
-- They are pretty bogus types, mind you. It would be better never to
-- construct them
i... | 383 | isUnLiftedType :: Type -> Bool
isUnLiftedType ty | Just ty' <- coreView ty = isUnLiftedType ty' | 95 | isUnLiftedType ty | Just ty' <- coreView ty = isUnLiftedType ty' | 64 | true | true | 0 | 9 | 106 | 47 | 22 | 25 | null | null |
shlevy/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | pprUnique :: Unique -> SDoc
-- Print a unique unless we are suppressing them
pprUnique uniq
= sdocWithDynFlags $ \dflags ->
ppUnless (gopt Opt_SuppressUniques dflags) $
pprUniqueAlways uniq | 199 | pprUnique :: Unique -> SDoc
pprUnique uniq
= sdocWithDynFlags $ \dflags ->
ppUnless (gopt Opt_SuppressUniques dflags) $
pprUniqueAlways uniq | 150 | pprUnique uniq
= sdocWithDynFlags $ \dflags ->
ppUnless (gopt Opt_SuppressUniques dflags) $
pprUniqueAlways uniq | 122 | true | true | 0 | 10 | 37 | 46 | 23 | 23 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 6525 = 3296 | 31 | getValueFromProduct 6525 = 3296 | 31 | getValueFromProduct 6525 = 3296 | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
beni55/cryptol | src/Cryptol/ModuleSystem/Env.hs | bsd-3-clause | addLoadedModule :: FilePath -> T.Module -> LoadedModules -> LoadedModules
addLoadedModule path tm lm
| isLoaded (T.mName tm) lm = lm
| otherwise = LoadedModules (getLoadedModules lm ++ [loaded])
where
loaded = LoadedModule
{ lmName = T.mName tm
, lmFilePath = path
, lmInterface ... | 362 | addLoadedModule :: FilePath -> T.Module -> LoadedModules -> LoadedModules
addLoadedModule path tm lm
| isLoaded (T.mName tm) lm = lm
| otherwise = LoadedModules (getLoadedModules lm ++ [loaded])
where
loaded = LoadedModule
{ lmName = T.mName tm
, lmFilePath = path
, lmInterface ... | 362 | addLoadedModule path tm lm
| isLoaded (T.mName tm) lm = lm
| otherwise = LoadedModules (getLoadedModules lm ++ [loaded])
where
loaded = LoadedModule
{ lmName = T.mName tm
, lmFilePath = path
, lmInterface = genIface tm
, lmModule = tm
} | 288 | false | true | 1 | 11 | 102 | 120 | 61 | 59 | null | null |
rueshyna/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/MoveFolders/Update.hs | mpl-2.0 | -- | The variables to be moved to the folder.
acmfuVariableId :: Lens' AccountsContainersMoveFoldersUpdate [Text]
acmfuVariableId
= lens _acmfuVariableId
(\ s a -> s{_acmfuVariableId = a})
. _Default
. _Coerce | 229 | acmfuVariableId :: Lens' AccountsContainersMoveFoldersUpdate [Text]
acmfuVariableId
= lens _acmfuVariableId
(\ s a -> s{_acmfuVariableId = a})
. _Default
. _Coerce | 183 | acmfuVariableId
= lens _acmfuVariableId
(\ s a -> s{_acmfuVariableId = a})
. _Default
. _Coerce | 115 | true | true | 0 | 11 | 49 | 53 | 28 | 25 | null | null |
BioHaskell/hRosetta | tests/test_RDCRestraints.hs | bsd-3-clause | testInput fname = do rdcSet <- parseRDCRestraintsFile $ BS.pack fname
putStrLn $ showRDCParams fname rdcSet
writeFile ((++".dat") . fst . splitExtension $ fname) $ showKDE rdcSet | 220 | testInput fname = do rdcSet <- parseRDCRestraintsFile $ BS.pack fname
putStrLn $ showRDCParams fname rdcSet
writeFile ((++".dat") . fst . splitExtension $ fname) $ showKDE rdcSet | 220 | testInput fname = do rdcSet <- parseRDCRestraintsFile $ BS.pack fname
putStrLn $ showRDCParams fname rdcSet
writeFile ((++".dat") . fst . splitExtension $ fname) $ showKDE rdcSet | 220 | false | false | 0 | 13 | 67 | 69 | 32 | 37 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x00D5' = "\x004F\x0303" | 39 | decomposeChar '\x00D5' = "\x004F\x0303" | 39 | decomposeChar '\x00D5' = "\x004F\x0303" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
awpr/wai | warp/Network/Wai/Handler/Warp/Response.hs | mit | containsNewlines :: ByteString -> Bool
containsNewlines = S.any (\w -> w == _cr || w == _lf) | 92 | containsNewlines :: ByteString -> Bool
containsNewlines = S.any (\w -> w == _cr || w == _lf) | 92 | containsNewlines = S.any (\w -> w == _cr || w == _lf) | 53 | false | true | 0 | 10 | 16 | 40 | 21 | 19 | null | null |
spechub/Hets | CSL/Analysis.hs | gpl-2.0 | -- | Extracts the axioms and the signature of a basic spec
splitSpec :: BASIC_SPEC -> Sign.Sign -> Result (Sign.Sign, [Named CMD])
splitSpec (Basic_spec specitems) sig =
do
((newsig, _), mNCmds) <- mapAccumLM anaBasicItem (sig, 0) specitems
return (newsig, catMaybes mNCmds)
{- | Add a single basic item... | 420 | splitSpec :: BASIC_SPEC -> Sign.Sign -> Result (Sign.Sign, [Named CMD])
splitSpec (Basic_spec specitems) sig =
do
((newsig, _), mNCmds) <- mapAccumLM anaBasicItem (sig, 0) specitems
return (newsig, catMaybes mNCmds)
{- | Add a single basic item to the signature. EP_defvals cannot be added if
the cor... | 361 | splitSpec (Basic_spec specitems) sig =
do
((newsig, _), mNCmds) <- mapAccumLM anaBasicItem (sig, 0) specitems
return (newsig, catMaybes mNCmds)
{- | Add a single basic item to the signature. EP_defvals cannot be added if
the corresponding EP_decl is not yet defined.
-} | 289 | true | true | 0 | 10 | 83 | 98 | 52 | 46 | null | null |
jhoxray/muon | src/Quark/Parsers/Basic.hs | bsd-3-clause | quotedString :: Parser Vars
quotedString = Col <$> quotedStringText | 67 | quotedString :: Parser Vars
quotedString = Col <$> quotedStringText | 67 | quotedString = Col <$> quotedStringText | 39 | false | true | 1 | 6 | 8 | 22 | 9 | 13 | null | null |
nevrenato/Hets_Fork | CASL/CCC/FreeTypes.hs | gpl-2.0 | conditionAxiom :: FORMULA f -> [FORMULA f]
conditionAxiom f = case f of
Quantification _ _ f' _ -> conditionAxiom f'
Implication f' _ _ _ -> [f']
_ -> [True_atom nullRange]
-- | get the axiom from right hand side of a equivalence,
-- | if there is no equi... | 360 | conditionAxiom :: FORMULA f -> [FORMULA f]
conditionAxiom f = case f of
Quantification _ _ f' _ -> conditionAxiom f'
Implication f' _ _ _ -> [f']
_ -> [True_atom nullRange]
-- | get the axiom from right hand side of a equivalence,
-- | if there is no equi... | 360 | conditionAxiom f = case f of
Quantification _ _ f' _ -> conditionAxiom f'
Implication f' _ _ _ -> [f']
_ -> [True_atom nullRange]
-- | get the axiom from right hand side of a equivalence,
-- | if there is no equivalence, then return atomic formula true | 316 | false | true | 4 | 9 | 120 | 84 | 41 | 43 | null | null |
shlevy/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | trivialCode :: Width -> (Operand -> Operand -> Instr)
-> Maybe (Operand -> Operand -> Instr)
-> CmmExpr -> CmmExpr -> NatM Register
trivialCode width instr m a b
= do is32Bit <- is32BitPlatform
trivialCode' is32Bit width instr m a b | 269 | trivialCode :: Width -> (Operand -> Operand -> Instr)
-> Maybe (Operand -> Operand -> Instr)
-> CmmExpr -> CmmExpr -> NatM Register
trivialCode width instr m a b
= do is32Bit <- is32BitPlatform
trivialCode' is32Bit width instr m a b | 269 | trivialCode width instr m a b
= do is32Bit <- is32BitPlatform
trivialCode' is32Bit width instr m a b | 113 | false | true | 0 | 11 | 77 | 93 | 45 | 48 | null | null |
SwiftsNamesake/Southpaw | lib/Southpaw/Interactive/Application.hs | mit | -- |
makeWidget :: WidgetClass self => IO self -> IORef s -> WidgetSettings self s -> IO self
makeWidget make stateref settings = do
widget <- make
applySettings widget stateref settings
-- | | 195 | makeWidget :: WidgetClass self => IO self -> IORef s -> WidgetSettings self s -> IO self
makeWidget make stateref settings = do
widget <- make
applySettings widget stateref settings
-- | | 190 | makeWidget make stateref settings = do
widget <- make
applySettings widget stateref settings
-- | | 101 | true | true | 0 | 9 | 37 | 70 | 32 | 38 | null | null |
utsav2601/cmpe295A | build/hake/Config.hs | mit | serial_debug :: Bool
serial_debug = False | 41 | serial_debug :: Bool
serial_debug = False | 41 | serial_debug = False | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
iand675/hobjc | src/Language/ObjC/Runtime.hs | bsd-3-clause | -- | Adds a property to a protocol that is under construction.
protocolAddProperty
:: MonadIO m
=> Protocol
-> String -- ^ The name of the property you want to add.
-> [Attribute] -- ^ An array of property attributes.
-> Bool -- ^ A Boolean indicating whether the property’s accessor methods are required metho... | 701 | protocolAddProperty
:: MonadIO m
=> Protocol
-> String -- ^ The name of the property you want to add.
-> [Attribute] -- ^ An array of property attributes.
-> Bool -- ^ A Boolean indicating whether the property’s accessor methods are required methods of the protocol. If @True@, the property’s accessor methods ... | 638 | protocolAddProperty p n as req = liftIO $
withCString n $ \np ->
with (mapM rawAttribute as) $ \ras ->
withArrayLen ras $ \asl asp ->
protocol_addProperty p np asp (fromIntegral asl) (if req then yes else no) yes | 220 | true | true | 0 | 13 | 137 | 139 | 71 | 68 | null | null |
siddhanathan/ghc | testsuite/tests/simplCore/should_compile/T4903.hs | bsd-3-clause | f :: Bool
-- If we don't use eq, there is no problem
f = eq Tree tree | 71 | f :: Bool
f = eq Tree tree | 26 | f = eq Tree tree | 16 | true | true | 0 | 6 | 19 | 25 | 10 | 15 | null | null |
jystic/pointfree | test/Test.hs | mit | propRoundTrip :: Expr -> Bool
propRoundTrip e = Right (TLE e) == parsePF (prettyExpr e) | 87 | propRoundTrip :: Expr -> Bool
propRoundTrip e = Right (TLE e) == parsePF (prettyExpr e) | 87 | propRoundTrip e = Right (TLE e) == parsePF (prettyExpr e) | 57 | false | true | 0 | 8 | 14 | 40 | 19 | 21 | null | null |
darnuria/Yasc | Evaluation.hs | mit | evaluating env (Atom tag) = getVar env tag | 44 | evaluating env (Atom tag) = getVar env tag | 44 | evaluating env (Atom tag) = getVar env tag | 44 | false | false | 0 | 7 | 9 | 22 | 10 | 12 | null | null |
yu-i9/HaSC | src/HaSC/Prim/Semantic.hs | mit | exprTypeCheck (A_BinaryPrim p op e1 e2)
| op `elem` ["&&", "||", "*", "/"]
= do ty1 <- exprTypeCheck e1
ty2 <- exprTypeCheck e2
if ty1 == CInt && ty2 == CInt
then return CInt
else fail $ binaryTypeError p op ty1 ty2
| op `elem` ["==", "!=", "<", "<=", ... | 889 | exprTypeCheck (A_BinaryPrim p op e1 e2)
| op `elem` ["&&", "||", "*", "/"]
= do ty1 <- exprTypeCheck e1
ty2 <- exprTypeCheck e2
if ty1 == CInt && ty2 == CInt
then return CInt
else fail $ binaryTypeError p op ty1 ty2
| op `elem` ["==", "!=", "<", "<=", ... | 889 | exprTypeCheck (A_BinaryPrim p op e1 e2)
| op `elem` ["&&", "||", "*", "/"]
= do ty1 <- exprTypeCheck e1
ty2 <- exprTypeCheck e2
if ty1 == CInt && ty2 == CInt
then return CInt
else fail $ binaryTypeError p op ty1 ty2
| op `elem` ["==", "!=", "<", "<=", ... | 889 | false | false | 0 | 13 | 376 | 330 | 163 | 167 | null | null |
dylex/hsaml2 | SAML2/XML.hs | apache-2.0 | xpXmlLang :: XP.PU XS.Language
xpXmlLang = XP.xpAttrQN (mkNName xmlNS "lang") $ XS.xpLanguage | 93 | xpXmlLang :: XP.PU XS.Language
xpXmlLang = XP.xpAttrQN (mkNName xmlNS "lang") $ XS.xpLanguage | 93 | xpXmlLang = XP.xpAttrQN (mkNName xmlNS "lang") $ XS.xpLanguage | 62 | false | true | 1 | 8 | 11 | 41 | 18 | 23 | null | null |
philopon/hbrew | src/Distribution/HBrew/Utils.hs | bsd-3-clause | getContentsRecursive :: Word -> FilePath -> IO [FilePath]
getContentsRecursive ilim dir = sub ilim ""
where sub 0 _ = return []
sub lim rel = do
cont <- filter (`notElem` [".", ".."]) `fmap` getDirectoryContents (dir </> rel)
files <- filterM (doesFileExist . (dir </>)) $ map (rel... | 496 | getContentsRecursive :: Word -> FilePath -> IO [FilePath]
getContentsRecursive ilim dir = sub ilim ""
where sub 0 _ = return []
sub lim rel = do
cont <- filter (`notElem` [".", ".."]) `fmap` getDirectoryContents (dir </> rel)
files <- filterM (doesFileExist . (dir </>)) $ map (rel... | 496 | getContentsRecursive ilim dir = sub ilim ""
where sub 0 _ = return []
sub lim rel = do
cont <- filter (`notElem` [".", ".."]) `fmap` getDirectoryContents (dir </> rel)
files <- filterM (doesFileExist . (dir </>)) $ map (rel </>) cont
dirs <- filterM (doesDirectoryExist.... | 438 | false | true | 1 | 13 | 144 | 218 | 106 | 112 | null | null |
JoeyEremondi/haskelm | src/Language/Elm/TH/HToE.hs | bsd-3-clause | translatePattern (VarP name) = return $ unFst $ P.Var $ nameToElmString name | 76 | translatePattern (VarP name) = return $ unFst $ P.Var $ nameToElmString name | 76 | translatePattern (VarP name) = return $ unFst $ P.Var $ nameToElmString name | 76 | false | false | 0 | 7 | 11 | 33 | 15 | 18 | null | null |
lindenbaum/mediabus | src/Data/MediaBus/Basics/Ticks.hs | bsd-3-clause | -- | Return a 'Proxy' for the 'GetRate' from a proxy for an instance of 'HasRate'
getRateProxy ::
HasRate i =>
proxy i ->
RateProxy (GetRate i)
getRateProxy _ = MkRateProxy | 178 | getRateProxy ::
HasRate i =>
proxy i ->
RateProxy (GetRate i)
getRateProxy _ = MkRateProxy | 96 | getRateProxy _ = MkRateProxy | 28 | true | true | 0 | 9 | 36 | 38 | 18 | 20 | null | null |
ekmett/data-lens | Data/Lens/Common.hs | bsd-3-clause | lens :: (a -> b) -> (b -> a -> a) -> Lens a b
lens get set = Lens $ \a -> store (\b -> set b a) (get a) | 103 | lens :: (a -> b) -> (b -> a -> a) -> Lens a b
lens get set = Lens $ \a -> store (\b -> set b a) (get a) | 103 | lens get set = Lens $ \a -> store (\b -> set b a) (get a) | 57 | false | true | 0 | 10 | 30 | 84 | 42 | 42 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | dtRbd :: String
dtRbd = Types.diskTemplateToRaw DTRbd | 53 | dtRbd :: String
dtRbd = Types.diskTemplateToRaw DTRbd | 53 | dtRbd = Types.diskTemplateToRaw DTRbd | 37 | false | true | 0 | 6 | 6 | 23 | 9 | 14 | null | null |
hguenther/smtlib2 | Language/SMTLib2/Internals/Evaluate.hs | gpl-3.0 | arrayModelEq _ _ _ (ArrayMap _ _ _) _
= error "Cannot decide array equality with arrays built from functions." | 112 | arrayModelEq _ _ _ (ArrayMap _ _ _) _
= error "Cannot decide array equality with arrays built from functions." | 112 | arrayModelEq _ _ _ (ArrayMap _ _ _) _
= error "Cannot decide array equality with arrays built from functions." | 112 | false | false | 1 | 6 | 21 | 30 | 13 | 17 | null | null |
bbshortcut/Palace | src/CardDB.hs | gpl-3.0 | cards :: IO [Card]
cards = bracket (dbPath >>= connectSqlite3) disconnect $
\ conn -> do
cards <- quickQuery' conn "SELECT * FROM cards" []
return $ map cardFromSql cards | 202 | cards :: IO [Card]
cards = bracket (dbPath >>= connectSqlite3) disconnect $
\ conn -> do
cards <- quickQuery' conn "SELECT * FROM cards" []
return $ map cardFromSql cards | 202 | cards = bracket (dbPath >>= connectSqlite3) disconnect $
\ conn -> do
cards <- quickQuery' conn "SELECT * FROM cards" []
return $ map cardFromSql cards | 183 | false | true | 0 | 11 | 61 | 66 | 32 | 34 | null | null |
fffej/haskellprojects | basics/data.hs | bsd-2-clause | mlist2 :: Map.Map String Double
mlist2 = Map.insert "pi" 3.14159265 $ Map.empty | 79 | mlist2 :: Map.Map String Double
mlist2 = Map.insert "pi" 3.14159265 $ Map.empty | 79 | mlist2 = Map.insert "pi" 3.14159265 $ Map.empty | 47 | false | true | 2 | 7 | 11 | 39 | 16 | 23 | null | null |
dnvriend/study-category-theory | haskell/haskell_for_java_programmers/code/19_purity_and_immutability/sample.hs | apache-2.0 | main = do
let x = 4
print(x)
-- x = 5 --error
print(x) | 65 | main = do
let x = 4
print(x)
-- x = 5 --error
print(x) | 65 | main = do
let x = 4
print(x)
-- x = 5 --error
print(x) | 65 | false | false | 0 | 9 | 24 | 34 | 16 | 18 | null | null |
quakehead/haskell-scheme | TestEval.hs | gpl-3.0 | exprList :: String -> [LispVal] -> LispVal
exprList h rest = List (Atom h : rest) | 81 | exprList :: String -> [LispVal] -> LispVal
exprList h rest = List (Atom h : rest) | 81 | exprList h rest = List (Atom h : rest) | 38 | false | true | 0 | 8 | 15 | 40 | 20 | 20 | null | null |
gergoerdi/language-java-classfile | Language/Java/ClassFile.hs | bsd-3-clause | getConstantRefMaybe :: ClassImporter (Maybe Constant)
getConstantRefMaybe =
do idx <- lift getConstIdx
if idx == 0 then return Nothing else asks (IntMap.lookup idx) | 171 | getConstantRefMaybe :: ClassImporter (Maybe Constant)
getConstantRefMaybe =
do idx <- lift getConstIdx
if idx == 0 then return Nothing else asks (IntMap.lookup idx) | 171 | getConstantRefMaybe =
do idx <- lift getConstIdx
if idx == 0 then return Nothing else asks (IntMap.lookup idx) | 117 | false | true | 0 | 11 | 29 | 59 | 28 | 31 | null | null |
gcampax/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | hasSomeUnfolding _ = True | 35 | hasSomeUnfolding _ = True | 35 | hasSomeUnfolding _ = True | 35 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
lomeo/my | src/My/Control/Monad.hs | mit | fold1M f (x:xs) = foldM f x xs | 30 | fold1M f (x:xs) = foldM f x xs | 30 | fold1M f (x:xs) = foldM f x xs | 30 | false | false | 0 | 6 | 7 | 27 | 12 | 15 | null | null |
vasily-kirichenko/haskell-book | src/ApplyingStructure.hs | bsd-3-clause | ys = M.fromList [('b', 2)] | 26 | ys = M.fromList [('b', 2)] | 26 | ys = M.fromList [('b', 2)] | 26 | false | false | 1 | 7 | 4 | 23 | 11 | 12 | null | null |
timorantalaiho/pong11 | src/Render.hs | bsd-3-clause | renderMissiles :: Int -> [MissileLaunched] -> IO()
renderMissiles currentTime [] = return () | 92 | renderMissiles :: Int -> [MissileLaunched] -> IO()
renderMissiles currentTime [] = return () | 92 | renderMissiles currentTime [] = return () | 41 | false | true | 0 | 8 | 12 | 39 | 19 | 20 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/TypeCheck/Types.hs | bsd-3-clause | maybeNull (TcInstance _ _ _ nt) = nullable nt | 45 | maybeNull (TcInstance _ _ _ nt) = nullable nt | 45 | maybeNull (TcInstance _ _ _ nt) = nullable nt | 45 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
markusle/pasty | src/Paster.hs | gpl-3.0 | paste specs cols = paste_h [] $ pick_columns colOrder cols
where
separator = outputSep specs
-- retrieve the requested order for pasting columns; ignore
-- all column indices that are larger than the number of
-- columns we have available
colOrder = filter (< length cols) $ pasteSpec specs
... | 689 | paste specs cols = paste_h [] $ pick_columns colOrder cols
where
separator = outputSep specs
-- retrieve the requested order for pasting columns; ignore
-- all column indices that are larger than the number of
-- columns we have available
colOrder = filter (< length cols) $ pasteSpec specs
... | 689 | paste specs cols = paste_h [] $ pick_columns colOrder cols
where
separator = outputSep specs
-- retrieve the requested order for pasting columns; ignore
-- all column indices that are larger than the number of
-- columns we have available
colOrder = filter (< length cols) $ pasteSpec specs
... | 689 | false | false | 0 | 8 | 187 | 128 | 65 | 63 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x0156' = "\x0052\x0327" | 39 | decomposeChar '\x0156' = "\x0052\x0327" | 39 | decomposeChar '\x0156' = "\x0052\x0327" | 39 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The time stamp when the attachment initiated.
vaAttachTime :: Lens' VolumeAttachment (Maybe UTCTime)
vaAttachTime = lens _vaAttachTime (\s a -> s { _vaAttachTime = a }) . mapping _Time | 189 | vaAttachTime :: Lens' VolumeAttachment (Maybe UTCTime)
vaAttachTime = lens _vaAttachTime (\s a -> s { _vaAttachTime = a }) . mapping _Time | 138 | vaAttachTime = lens _vaAttachTime (\s a -> s { _vaAttachTime = a }) . mapping _Time | 83 | true | true | 0 | 10 | 30 | 53 | 28 | 25 | null | null |
maciej-bendkowski/boltzmann-brain | scripts/sampler-template/app/Main.hs | bsd-3-clause | outputF [] = Nothing | 37 | outputF [] = Nothing | 37 | outputF [] = Nothing | 37 | false | false | 0 | 5 | 20 | 12 | 5 | 7 | null | null |
mindriot101/hAppPhotom | src/Main.hs | mit | getFileLines :: FilePath -> IO [String]
getFileLines f = do
text <- readFile f
return $ wordsWhen (=='\n') text | 119 | getFileLines :: FilePath -> IO [String]
getFileLines f = do
text <- readFile f
return $ wordsWhen (=='\n') text | 119 | getFileLines f = do
text <- readFile f
return $ wordsWhen (=='\n') text | 79 | false | true | 0 | 9 | 26 | 50 | 24 | 26 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.