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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rahulmutt/ghcvm | compiler/Eta/BasicTypes/Literal.hs | bsd-3-clause | cmpLit (MachLabel a _ _) (MachLabel b _ _) = a `compare` b | 67 | cmpLit (MachLabel a _ _) (MachLabel b _ _) = a `compare` b | 67 | cmpLit (MachLabel a _ _) (MachLabel b _ _) = a `compare` b | 67 | false | false | 0 | 7 | 21 | 37 | 19 | 18 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x2226' = "\x2225\x0338" | 39 | decomposeChar '\x2226' = "\x2225\x0338" | 39 | decomposeChar '\x2226' = "\x2225\x0338" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ddssff/lens | src/Control/Lens/Indexed.hs | bsd-3-clause | -- | Composition of 'Indexed' functions with a user supplied function for combining indices.
icompose :: Indexable p c => (i -> j -> p) -> (Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> c a b -> r
icompose ijk istr jabst cab = istr . Indexed $ \i -> jabst . Indexed $ \j -> indexed cab $ ijk i j | 301 | icompose :: Indexable p c => (i -> j -> p) -> (Indexed i s t -> r) -> (Indexed j a b -> s -> t) -> c a b -> r
icompose ijk istr jabst cab = istr . Indexed $ \i -> jabst . Indexed $ \j -> indexed cab $ ijk i j | 208 | icompose ijk istr jabst cab = istr . Indexed $ \i -> jabst . Indexed $ \j -> indexed cab $ ijk i j | 98 | true | true | 0 | 12 | 70 | 137 | 67 | 70 | null | null |
mgsloan/airship | src/Airship/Internal/Decision.hs | mit | initFlowState :: FlowState s m
initFlowState = FlowState Nothing | 64 | initFlowState :: FlowState s m
initFlowState = FlowState Nothing | 64 | initFlowState = FlowState Nothing | 33 | false | true | 0 | 5 | 8 | 19 | 9 | 10 | null | null |
xu-hao/QueryArrow | test-QueryArrow/app/dedupper/TestDedupper.hs | bsd-3-clause | findSameHashes ((hash, fp):xs) = do
fps <- fileSize <$> getFileStatus fp
case lookup hash xs of
(Just dupFile) -> do
printf "===========================\n\
\Found duplicate size = %s:\n\
\=> %s \n\
\=> %s \n\n" (show fps) ... | 448 | findSameHashes ((hash, fp):xs) = do
fps <- fileSize <$> getFileStatus fp
case lookup hash xs of
(Just dupFile) -> do
printf "===========================\n\
\Found duplicate size = %s:\n\
\=> %s \n\
\=> %s \n\n" (show fps) ... | 448 | findSameHashes ((hash, fp):xs) = do
fps <- fileSize <$> getFileStatus fp
case lookup hash xs of
(Just dupFile) -> do
printf "===========================\n\
\Found duplicate size = %s:\n\
\=> %s \n\
\=> %s \n\n" (show fps) ... | 448 | false | false | 0 | 15 | 173 | 114 | 53 | 61 | null | null |
hackern/halfs | test/src/Tests/Utils.hs | bsd-3-clause | execH :: Monad m =>
String
-> env
-> String
-> HalfsT HalfsError (Maybe env) m b
-> PropertyM m b
execH nm env descrip = execE nm descrip . runHalfs env | 185 | execH :: Monad m =>
String
-> env
-> String
-> HalfsT HalfsError (Maybe env) m b
-> PropertyM m b
execH nm env descrip = execE nm descrip . runHalfs env | 185 | execH nm env descrip = execE nm descrip . runHalfs env | 54 | false | true | 0 | 12 | 64 | 73 | 34 | 39 | null | null |
mattias-lundell/timber-llvm | src/Kindle.hs | bsd-3-clause | prScope c = text "{" <+> pr c $$
text "}" | 113 | prScope c = text "{" <+> pr c $$
text "}" | 113 | prScope c = text "{" <+> pr c $$
text "}" | 113 | false | false | 0 | 7 | 82 | 26 | 11 | 15 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | How dates, times, and durations should be represented in the output.
-- This is ignored if value_render_option is FORMATTED_VALUE. The default
-- dateTime render option is SERIAL_NUMBER.
bgvbdfrDateTimeRenderOption :: Lens' BatchGetValuesByDataFilterRequest (Maybe BatchGetValuesByDataFilterRequestDateTimeRenderOpt... | 443 | bgvbdfrDateTimeRenderOption :: Lens' BatchGetValuesByDataFilterRequest (Maybe BatchGetValuesByDataFilterRequestDateTimeRenderOption)
bgvbdfrDateTimeRenderOption
= lens _bgvbdfrDateTimeRenderOption
(\ s a -> s{_bgvbdfrDateTimeRenderOption = a}) | 251 | bgvbdfrDateTimeRenderOption
= lens _bgvbdfrDateTimeRenderOption
(\ s a -> s{_bgvbdfrDateTimeRenderOption = a}) | 118 | true | true | 1 | 9 | 53 | 53 | 27 | 26 | null | null |
steve-chavez/postgrest | src/PostgREST/Request/DbRequestBuilder.hs | mit | rootWithRels :: Schema -> TableName -> [Relationship] -> Action -> (QualifiedIdentifier, [Relationship])
rootWithRels schema rootTableName allRels action = case action of
ActionRead _ -> (QualifiedIdentifier schema rootTableName, allRels) -- normal read case
_ -> (QualifiedIdentifier mempty _sourceCTENam... | 1,142 | rootWithRels :: Schema -> TableName -> [Relationship] -> Action -> (QualifiedIdentifier, [Relationship])
rootWithRels schema rootTableName allRels action = case action of
ActionRead _ -> (QualifiedIdentifier schema rootTableName, allRels) -- normal read case
_ -> (QualifiedIdentifier mempty _sourceCTENam... | 1,142 | rootWithRels schema rootTableName allRels action = case action of
ActionRead _ -> (QualifiedIdentifier schema rootTableName, allRels) -- normal read case
_ -> (QualifiedIdentifier mempty _sourceCTEName, mapMaybe toSourceRel allRels ++ allRels) -- mutation cases and calling proc
where
_sourceCTEName... | 1,037 | false | true | 1 | 10 | 216 | 191 | 103 | 88 | null | null |
abakst/liquidhaskell | tests/equationalproofs/pos/AppendAxiom.hs | bsd-3-clause | use_axiomC, use_axiomCaseC :: L a -> a -> L a -> Proof
use_axiomC = axiom_append_C | 82 | use_axiomC, use_axiomCaseC :: L a -> a -> L a -> Proof
use_axiomC = axiom_append_C | 82 | use_axiomC = axiom_append_C | 27 | false | true | 0 | 8 | 14 | 31 | 16 | 15 | null | null |
Chatanga/kage | src/Graphics/Ext/Program.hs | mit | extProgramVarN :: (Ptr GLint -> IO a) -> GetProgramPName -> ExtProgram -> GettableStateVar a
extProgramVarN f p program =
makeGettableStateVar $
with 0 $ \buf -> do
Raw.glGetProgramiv (programID program) (marshalGetProgramPName p) buf
f buf | 276 | extProgramVarN :: (Ptr GLint -> IO a) -> GetProgramPName -> ExtProgram -> GettableStateVar a
extProgramVarN f p program =
makeGettableStateVar $
with 0 $ \buf -> do
Raw.glGetProgramiv (programID program) (marshalGetProgramPName p) buf
f buf | 276 | extProgramVarN f p program =
makeGettableStateVar $
with 0 $ \buf -> do
Raw.glGetProgramiv (programID program) (marshalGetProgramPName p) buf
f buf | 183 | false | true | 0 | 11 | 70 | 92 | 43 | 49 | null | null |
shlevy/ghc | compiler/utils/Util.hs | bsd-3-clause | matchVectors :: (Bits bv, Num bv) => String -> IM.IntMap bv
matchVectors = snd . foldl' go (0 :: Int, IM.empty)
where
go (ix, im) char = let ix' = ix + 1
im' = IM.insertWith (.|.) (ord char) (2 ^ ix) im
in seq ix' $ seq im' $ (ix', im')
| 294 | matchVectors :: (Bits bv, Num bv) => String -> IM.IntMap bv
matchVectors = snd . foldl' go (0 :: Int, IM.empty)
where
go (ix, im) char = let ix' = ix + 1
im' = IM.insertWith (.|.) (ord char) (2 ^ ix) im
in seq ix' $ seq im' $ (ix', im')
| 294 | matchVectors = snd . foldl' go (0 :: Int, IM.empty)
where
go (ix, im) char = let ix' = ix + 1
im' = IM.insertWith (.|.) (ord char) (2 ^ ix) im
in seq ix' $ seq im' $ (ix', im')
| 234 | false | true | 1 | 12 | 109 | 143 | 73 | 70 | null | null |
brendanhay/gogol | gogol-replicapool/gen/Network/Google/Resource/ReplicaPool/Replicas/List.hs | mpl-2.0 | -- | Maximum count of results to be returned. Acceptable values are 0 to 100,
-- inclusive. (Default: 50)
rlMaxResults :: Lens' ReplicasList Int32
rlMaxResults
= lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
. _Coerce | 230 | rlMaxResults :: Lens' ReplicasList Int32
rlMaxResults
= lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
. _Coerce | 124 | rlMaxResults
= lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
. _Coerce | 83 | true | true | 2 | 8 | 44 | 52 | 25 | 27 | null | null |
urbanslug/ghc | compiler/typecheck/TcRules.hs | bsd-3-clause | simplifyRule :: RuleName
-> WantedConstraints -- Constraints from LHS
-> WantedConstraints -- Constraints from RHS
-> TcM ([EvVar], WantedConstraints) -- LHS evidence variables
-- See Note [Simplifying RULE constraints]
--
-- This function could be in TcSimplify, but... | 2,062 | simplifyRule :: RuleName
-> WantedConstraints -- Constraints from LHS
-> WantedConstraints -- Constraints from RHS
-> TcM ([EvVar], WantedConstraints)
simplifyRule name lhs_wanted rhs_wanted
= do { -- We allow ourselves to unify environment
-... | 1,809 | simplifyRule name lhs_wanted rhs_wanted
= do { -- We allow ourselves to unify environment
-- variables: runTcS runs with topTcLevel
tc_lvl <- getTcLevel
; (insoluble, _) <- runTcS $
do { -- First solve the LHS and *then* solve the RHS
-- See No... | 1,607 | true | true | 0 | 16 | 692 | 409 | 206 | 203 | null | null |
MaxOw/awesomium-glut | src/Graphics/UI/Awesomium/GLUT.hs | lgpl-3.0 | marshalType _ Up = WktKeyup | 29 | marshalType _ Up = WktKeyup | 29 | marshalType _ Up = WktKeyup | 29 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
mcmaniac/ghc | compiler/utils/Serialized.hs | bsd-3-clause | serializeChar :: Char -> [Word8] -> [Word8]
serializeChar = serializeString . show | 82 | serializeChar :: Char -> [Word8] -> [Word8]
serializeChar = serializeString . show | 82 | serializeChar = serializeString . show | 38 | false | true | 0 | 9 | 11 | 36 | 17 | 19 | null | null |
frenetic-lang/nettle-openflow | src/Nettle/OpenFlow/MessagesBinary.hs | bsd-3-clause | code2ErrorType typ code bytes
| typ == 0 = HelloFailed (helloErrorCodesMap ! code) [ chr (fromIntegral b) | b <- takeWhile (/=0) bytes ]
| typ == 1 = BadRequest (requestErrorCodeMap ! code) bytes
| typ == 2 = BadAction code bytes
| typ == 3 = FlowModFailed code bytes
| otherwise = error ("... | 366 | code2ErrorType typ code bytes
| typ == 0 = HelloFailed (helloErrorCodesMap ! code) [ chr (fromIntegral b) | b <- takeWhile (/=0) bytes ]
| typ == 1 = BadRequest (requestErrorCodeMap ! code) bytes
| typ == 2 = BadAction code bytes
| typ == 3 = FlowModFailed code bytes
| otherwise = error ("... | 366 | code2ErrorType typ code bytes
| typ == 0 = HelloFailed (helloErrorCodesMap ! code) [ chr (fromIntegral b) | b <- takeWhile (/=0) bytes ]
| typ == 1 = BadRequest (requestErrorCodeMap ! code) bytes
| typ == 2 = BadAction code bytes
| typ == 3 = FlowModFailed code bytes
| otherwise = error ("... | 366 | false | false | 4 | 11 | 91 | 145 | 69 | 76 | null | null |
zeyuanxy/haskell-playground | ninety-nine-haskell-problems/vol2/14.hs | mit | main :: IO ()
main = do
let value = dupli [1, 2, 3]
print value | 71 | main :: IO ()
main = do
let value = dupli [1, 2, 3]
print value | 71 | main = do
let value = dupli [1, 2, 3]
print value | 57 | false | true | 0 | 11 | 23 | 43 | 21 | 22 | null | null |
mcmaniac/ghc | compiler/iface/BinIface.hs | bsd-3-clause | allocateFastString :: BinDictionary -> FastString -> IO Word32
allocateFastString BinDictionary { bin_dict_next = j_r,
bin_dict_map = out_r} f = do
out <- readIORef out_r
let uniq = getUnique f
case lookupUFM out uniq of
Just (j, _) -> return (fromIntegral j :: W... | 523 | allocateFastString :: BinDictionary -> FastString -> IO Word32
allocateFastString BinDictionary { bin_dict_next = j_r,
bin_dict_map = out_r} f = do
out <- readIORef out_r
let uniq = getUnique f
case lookupUFM out uniq of
Just (j, _) -> return (fromIntegral j :: W... | 523 | allocateFastString BinDictionary { bin_dict_next = j_r,
bin_dict_map = out_r} f = do
out <- readIORef out_r
let uniq = getUnique f
case lookupUFM out uniq of
Just (j, _) -> return (fromIntegral j :: Word32)
Nothing -> do
j <- readFastMutInt j_r... | 460 | false | true | 0 | 14 | 176 | 172 | 82 | 90 | null | null |
vikraman/ghc | compiler/codeGen/StgCmmEnv.hs | bsd-3-clause | rhsIdInfo :: Id -> LambdaFormInfo -> FCode (CgIdInfo, LocalReg)
rhsIdInfo id lf_info
= do dflags <- getDynFlags
reg <- newTemp (gcWord dflags)
return (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)), reg) | 218 | rhsIdInfo :: Id -> LambdaFormInfo -> FCode (CgIdInfo, LocalReg)
rhsIdInfo id lf_info
= do dflags <- getDynFlags
reg <- newTemp (gcWord dflags)
return (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)), reg) | 218 | rhsIdInfo id lf_info
= do dflags <- getDynFlags
reg <- newTemp (gcWord dflags)
return (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)), reg) | 154 | false | true | 0 | 14 | 45 | 92 | 43 | 49 | null | null |
CarstenKoenig/Holidays2013 | Mandelbrot/main.hs | unlicense | statusForRendering False = promptClick | 38 | statusForRendering False = promptClick | 38 | statusForRendering False = promptClick | 38 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
hce/avwx | src/Data/Aviation/WX.hs | mit | pressureParser :: CharParsing f => f Pressure
pressureParser = choice [qnha, mmhg, qnh]
where
qnh = (\_ a b c d -> QNH $ read [a, b, c, d]) <$> char 'Q' <*> digit <*> digit <*> digit <*> digit
qnha = (\_ a b c d _ -> Altimeter $ read [a, b, c, d]) <$> text "QNH" <*> digit <*> digit <*> digit <*> digit... | 447 | pressureParser :: CharParsing f => f Pressure
pressureParser = choice [qnha, mmhg, qnh]
where
qnh = (\_ a b c d -> QNH $ read [a, b, c, d]) <$> char 'Q' <*> digit <*> digit <*> digit <*> digit
qnha = (\_ a b c d _ -> Altimeter $ read [a, b, c, d]) <$> text "QNH" <*> digit <*> digit <*> digit <*> digit... | 447 | pressureParser = choice [qnha, mmhg, qnh]
where
qnh = (\_ a b c d -> QNH $ read [a, b, c, d]) <$> char 'Q' <*> digit <*> digit <*> digit <*> digit
qnha = (\_ a b c d _ -> Altimeter $ read [a, b, c, d]) <$> text "QNH" <*> digit <*> digit <*> digit <*> digit <*> text "INS"
mmhg = (\_ a b c d -> Alt... | 400 | false | true | 2 | 25 | 119 | 237 | 124 | 113 | null | null |
omefire/lens | src/Control/Lens/Wrapped.hs | bsd-3-clause | -- | Work under a newtype wrapper.
--
-- >>> Const "hello" & _Wrapped %~ Prelude.length & getConst
-- 5
--
-- @
-- '_Wrapped' ≡ 'from' '_Unwrapped'
-- '_Unwrapped' ≡ 'from' '_Wrapped'
-- @
_Wrapped :: Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped = withIso _Wrapped' $ \ sa _ -> withIso _Wrapped' $ \ ... | 337 | _Wrapped :: Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped = withIso _Wrapped' $ \ sa _ -> withIso _Wrapped' $ \ _ bt -> iso sa bt | 146 | _Wrapped = withIso _Wrapped' $ \ sa _ -> withIso _Wrapped' $ \ _ bt -> iso sa bt | 80 | true | true | 0 | 9 | 68 | 83 | 45 | 38 | null | null |
np/hlatex | Language/LaTeX/Builder/Beamer.hs | bsd-3-clause | useinnertheme = beamerPreambleCmdArgs "useinnertheme" | 54 | useinnertheme = beamerPreambleCmdArgs "useinnertheme" | 54 | useinnertheme = beamerPreambleCmdArgs "useinnertheme" | 54 | false | false | 1 | 5 | 4 | 12 | 4 | 8 | null | null |
olsner/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | Get the Id of the 'DataCon' wrapper: a function that wraps the "actual"
-- constructor so it has the type visible in the source program: c.f. 'dataConWorkId'.
-- Returns Nothing if there is no wrapper, which occurs for an algebraic data constructor
-- and also for a newtype (whose constructor is inlined compulsori... | 721 | dataConWrapId_maybe :: DataCon -> Maybe Id
dataConWrapId_maybe dc = case dcRep dc of
NoDataConRep -> Nothing
DCR { dcr_wrap_id = wrap_id } -> Just wrap_id
-- | Returns an Id which looks like the Haskell-source constructor by using
-- the wrapper if it exists (see '... | 397 | dataConWrapId_maybe dc = case dcRep dc of
NoDataConRep -> Nothing
DCR { dcr_wrap_id = wrap_id } -> Just wrap_id
-- | Returns an Id which looks like the Haskell-source constructor by using
-- the wrapper if it exists (see 'dataConWrapId_maybe') and failing over to
-... | 354 | true | true | 0 | 10 | 164 | 59 | 32 | 27 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getControlLightsStreamReq :: KRPCHS.SpaceCenter.Control -> KRPCStreamReq (Bool)
getControlLightsStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Control_get_Lights" [makeArgument 0 thisArg]
in makeStream req | 224 | getControlLightsStreamReq :: KRPCHS.SpaceCenter.Control -> KRPCStreamReq (Bool)
getControlLightsStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Control_get_Lights" [makeArgument 0 thisArg]
in makeStream req | 224 | getControlLightsStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Control_get_Lights" [makeArgument 0 thisArg]
in makeStream req | 144 | false | true | 0 | 11 | 29 | 60 | 28 | 32 | null | null |
TorosFanny/kaleidoscope | src/chapter4/Lexer.hs | mit | whitespace = Tok.whiteSpace lexer | 33 | whitespace = Tok.whiteSpace lexer | 33 | whitespace = Tok.whiteSpace lexer | 33 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
olorin/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | Information about the disk image.
diImage :: Lens' DiskImage (Maybe DiskImageDetail)
diImage = lens _diImage (\ s a -> s{_diImage = a}) | 140 | diImage :: Lens' DiskImage (Maybe DiskImageDetail)
diImage = lens _diImage (\ s a -> s{_diImage = a}) | 101 | diImage = lens _diImage (\ s a -> s{_diImage = a}) | 50 | true | true | 0 | 9 | 23 | 46 | 25 | 21 | null | null |
google/ghc-source-gen | src/GHC/SourceGen/Expr.hs | bsd-3-clause | lambda :: [Pat'] -> HsExpr' -> HsExpr'
lambda ps e = noExt HsLam $ matchGroup LambdaExpr [match ps e] | 101 | lambda :: [Pat'] -> HsExpr' -> HsExpr'
lambda ps e = noExt HsLam $ matchGroup LambdaExpr [match ps e] | 101 | lambda ps e = noExt HsLam $ matchGroup LambdaExpr [match ps e] | 62 | false | true | 0 | 8 | 18 | 47 | 23 | 24 | null | null |
phischu/fragnix | tests/packages/scotty/System.FilePath.Posix.hs | bsd-3-clause | isPathSeparator '\\' = isWindows | 32 | isPathSeparator '\\' = isWindows | 32 | isPathSeparator '\\' = isWindows | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
juhp/gtk2hs | tools/apiGen/src/Module.hs | lgpl-3.0 | fixModuleAvailableSince :: Module -> Module
fixModuleAvailableSince module_ =
module_ {
module_since = MarshalFixup.fixModuleAvailableSince (module_cname module_)
`mplus` module_since module_
} | 212 | fixModuleAvailableSince :: Module -> Module
fixModuleAvailableSince module_ =
module_ {
module_since = MarshalFixup.fixModuleAvailableSince (module_cname module_)
`mplus` module_since module_
} | 212 | fixModuleAvailableSince module_ =
module_ {
module_since = MarshalFixup.fixModuleAvailableSince (module_cname module_)
`mplus` module_since module_
} | 168 | false | true | 0 | 10 | 37 | 46 | 24 | 22 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/BudgetsBudget.hs | mit | budgetsBudget
:: BudgetsBudgetBudgetData -- ^ 'bbBudget'
-> BudgetsBudget
budgetsBudget budgetarg =
BudgetsBudget
{ _budgetsBudgetBudget = budgetarg
, _budgetsBudgetNotificationsWithSubscribers = Nothing
} | 217 | budgetsBudget
:: BudgetsBudgetBudgetData -- ^ 'bbBudget'
-> BudgetsBudget
budgetsBudget budgetarg =
BudgetsBudget
{ _budgetsBudgetBudget = budgetarg
, _budgetsBudgetNotificationsWithSubscribers = Nothing
} | 217 | budgetsBudget budgetarg =
BudgetsBudget
{ _budgetsBudgetBudget = budgetarg
, _budgetsBudgetNotificationsWithSubscribers = Nothing
} | 139 | false | true | 0 | 7 | 32 | 42 | 21 | 21 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | vecElemInjectCast dflags IntVec W8 = Just (mo_WordTo8 dflags) | 66 | vecElemInjectCast dflags IntVec W8 = Just (mo_WordTo8 dflags) | 66 | vecElemInjectCast dflags IntVec W8 = Just (mo_WordTo8 dflags) | 66 | false | false | 1 | 7 | 12 | 27 | 10 | 17 | null | null |
themoritz/cabal | Cabal/Distribution/Compat/Graph.hs | bsd-3-clause | -- Graph-like operations
-- | /O(1)/. Convert a graph into a 'Data.Graph.Graph'.
-- Requires amortized construction of graph.
toGraph :: Graph a -> (G.Graph, G.Vertex -> a, Key a -> Maybe G.Vertex)
toGraph g = (graphForward g, graphVertexToNode g, graphKeyToVertex g) | 268 | toGraph :: Graph a -> (G.Graph, G.Vertex -> a, Key a -> Maybe G.Vertex)
toGraph g = (graphForward g, graphVertexToNode g, graphKeyToVertex g) | 141 | toGraph g = (graphForward g, graphVertexToNode g, graphKeyToVertex g) | 69 | true | true | 0 | 11 | 41 | 77 | 38 | 39 | null | null |
thomasjm/IHaskell | ipython-kernel/src/IHaskell/IPython/Message/Writer.hs | mit | ints :: [Int] -> [Int]
ints = id | 32 | ints :: [Int] -> [Int]
ints = id | 32 | ints = id | 9 | false | true | 0 | 6 | 7 | 21 | 12 | 9 | null | null |
sopvop/access-rolebased | src/Control/Access/RoleBased/Checker.hs | bsd-3-clause | hasRole :: Role -> RuleChecker ()
hasRole r = RuleChecker $ do
ch <- ask
once $ go ch
where
go gen = do
r' <- lift gen
if r `matches` r' then return () else mzero
------------------------------------------------------------------------------ | 273 | hasRole :: Role -> RuleChecker ()
hasRole r = RuleChecker $ do
ch <- ask
once $ go ch
where
go gen = do
r' <- lift gen
if r `matches` r' then return () else mzero
------------------------------------------------------------------------------ | 273 | hasRole r = RuleChecker $ do
ch <- ask
once $ go ch
where
go gen = do
r' <- lift gen
if r `matches` r' then return () else mzero
------------------------------------------------------------------------------ | 239 | false | true | 0 | 9 | 69 | 88 | 42 | 46 | null | null |
hguenther/gtl | lib/Language/GTL/LTL.hs | bsd-3-clause | delta' (Bin Or l r) = transUnion (delta' l) (delta' r) | 54 | delta' (Bin Or l r) = transUnion (delta' l) (delta' r) | 54 | delta' (Bin Or l r) = transUnion (delta' l) (delta' r) | 54 | false | false | 0 | 7 | 10 | 37 | 17 | 20 | null | null |
randen/cabal | Cabal/Distribution/Simple/PackageIndex.hs | bsd-3-clause | allPackages :: PackageIndex a -> [a]
allPackages (PackageIndex pids _) = Map.elems pids | 87 | allPackages :: PackageIndex a -> [a]
allPackages (PackageIndex pids _) = Map.elems pids | 87 | allPackages (PackageIndex pids _) = Map.elems pids | 50 | false | true | 0 | 7 | 12 | 37 | 18 | 19 | null | null |
crossroads1112/hlocate | src/HUpdate/Config.hs | gpl-3.0 | -- EOL is either a newline or a carraige return
eol :: Parser ()
eol = oneOf "\n\r" >> return () <?> "end of line" | 114 | eol :: Parser ()
eol = oneOf "\n\r" >> return () <?> "end of line" | 66 | eol = oneOf "\n\r" >> return () <?> "end of line" | 49 | true | true | 0 | 8 | 24 | 39 | 17 | 22 | null | null |
amccausl/RDF4H | src/Data/RDF/MGraph.hs | bsd-3-clause | q1 Nothing p o spoMap = Set.unions $ map (q2 p o) $ Map.toList spoMap | 70 | q1 Nothing p o spoMap = Set.unions $ map (q2 p o) $ Map.toList spoMap | 70 | q1 Nothing p o spoMap = Set.unions $ map (q2 p o) $ Map.toList spoMap | 70 | false | false | 0 | 9 | 15 | 44 | 19 | 25 | null | null |
alexliew/learn_you_a_haskell | 3_syntax_in_functions.hs | unlicense | calcBmis :: (RealFloat a) => [(a, a)] -> [a]
--calcBmis xs = [bmi w h | (w, h) <- xs]
-- where bmi weight height = weight / height ^ 2
--redone with let expression
--calcBmis xs = [bmi | (w, h) <- xs, let bmi = w / h ^ 2]
--the let expression is visible to the output expression (because there is no followup _in_; th... | 470 | calcBmis :: (RealFloat a) => [(a, a)] -> [a]
calcBmis xs = [bmi | (w, h) <- xs, let bmi = w / h ^ 2, bmi >= 25.0] | 113 | calcBmis xs = [bmi | (w, h) <- xs, let bmi = w / h ^ 2, bmi >= 25.0] | 68 | true | true | 0 | 11 | 105 | 87 | 50 | 37 | null | null |
ip1981/sproxy2 | src/Sproxy/Server.hs | mit | {- TODO:
- Log.error && exitFailure should be replaced
- by Log.fatal && wait for logger thread to print && exitFailure
-}
server :: FilePath -> IO ()
server configFile = do
cf <- readConfigFile configFile
Log.start $ cfLogLevel cf
sock <- socket AF_INET Stream 0
setSocketOption sock ReuseAddr 1
bind sock $... | 2,161 | server :: FilePath -> IO ()
server configFile = do
cf <- readConfigFile configFile
Log.start $ cfLogLevel cf
sock <- socket AF_INET Stream 0
setSocketOption sock ReuseAddr 1
bind sock $ SockAddrInet (fromIntegral $ cfListen cf) 0
maybe80 <-
if fromMaybe (443 == cfListen cf) (cfListen80 cf)
then do... | 2,036 | server configFile = do
cf <- readConfigFile configFile
Log.start $ cfLogLevel cf
sock <- socket AF_INET Stream 0
setSocketOption sock ReuseAddr 1
bind sock $ SockAddrInet (fromIntegral $ cfListen cf) 0
maybe80 <-
if fromMaybe (443 == cfListen cf) (cfListen80 cf)
then do
sock80 <- socket AF... | 2,008 | true | true | 0 | 17 | 561 | 677 | 306 | 371 | null | null |
sdiehl/ghc | utils/genapply/Main.hs | bsd-3-clause | -- Copied from Constants.hs & CgUtils.hs, i'd rather have this imported:
-- (arity,tag)
tAG_BITS = (TAG_BITS :: Int) | 116 | tAG_BITS = (TAG_BITS :: Int) | 28 | tAG_BITS = (TAG_BITS :: Int) | 28 | true | false | 0 | 5 | 17 | 14 | 9 | 5 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_GERMAN_LIECHTENSTEIN :: Int
wxLANGUAGE_GERMAN_LIECHTENSTEIN = 90 | 75 | wxLANGUAGE_GERMAN_LIECHTENSTEIN :: Int
wxLANGUAGE_GERMAN_LIECHTENSTEIN = 90 | 75 | wxLANGUAGE_GERMAN_LIECHTENSTEIN = 90 | 36 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
bgamari/shaking-up-ghc | src/Hadrian/Builder/Tar.hs | bsd-3-clause | args Extract = mconcat
[ arg "-x"
, input "*.gz" ? arg "--gzip"
, input "*.bz2" ? arg "--bzip2"
, input "*.xz" ? arg "--xz"
, arg "-f", arg =<< getInput
, arg "-C", arg =<< getOutput ] | 210 | args Extract = mconcat
[ arg "-x"
, input "*.gz" ? arg "--gzip"
, input "*.bz2" ? arg "--bzip2"
, input "*.xz" ? arg "--xz"
, arg "-f", arg =<< getInput
, arg "-C", arg =<< getOutput ] | 210 | args Extract = mconcat
[ arg "-x"
, input "*.gz" ? arg "--gzip"
, input "*.bz2" ? arg "--bzip2"
, input "*.xz" ? arg "--xz"
, arg "-f", arg =<< getInput
, arg "-C", arg =<< getOutput ] | 210 | false | false | 0 | 7 | 63 | 84 | 40 | 44 | null | null |
beni55/combinatorrent | src/Process/PeerMgr.hs | bsd-2-clause | addIncoming :: (Sock.Socket, Sock.SockAddr) -> Process CF ST ThreadId
addIncoming conn = do
ppid <- gets peerId
pool <- asks peerPool
mgrC <- asks mgrCh
v <- asks chokeRTV
cm <- gets cmMap
liftIO $ acceptor conn pool ppid mgrC v cm | 262 | addIncoming :: (Sock.Socket, Sock.SockAddr) -> Process CF ST ThreadId
addIncoming conn = do
ppid <- gets peerId
pool <- asks peerPool
mgrC <- asks mgrCh
v <- asks chokeRTV
cm <- gets cmMap
liftIO $ acceptor conn pool ppid mgrC v cm | 262 | addIncoming conn = do
ppid <- gets peerId
pool <- asks peerPool
mgrC <- asks mgrCh
v <- asks chokeRTV
cm <- gets cmMap
liftIO $ acceptor conn pool ppid mgrC v cm | 192 | false | true | 0 | 8 | 72 | 105 | 47 | 58 | null | null |
baig/pandoc-csv2table | src/Text/Table/Builder.hs | mit | toPipeMd :: CaptionPos -> Table -> String
toPipeMd l (Table c cs (Header h) rs) = addCaption l c $
row2Md Pipe h ++
mkHeaderRowSeparator Pipe cs ++
(concatMap (++"") $
... | 350 | toPipeMd :: CaptionPos -> Table -> String
toPipeMd l (Table c cs (Header h) rs) = addCaption l c $
row2Md Pipe h ++
mkHeaderRowSeparator Pipe cs ++
(concatMap (++"") $
... | 350 | toPipeMd l (Table c cs (Header h) rs) = addCaption l c $
row2Md Pipe h ++
mkHeaderRowSeparator Pipe cs ++
(concatMap (++"") $
map (row2Md Pipe) rs) | 308 | false | true | 0 | 12 | 195 | 100 | 47 | 53 | null | null |
dmbarbour/haskell-vcache | hsrc_lib/Database/VCache/Open.hs | bsd-2-clause | -- Default address for allocation. We start this high to help
-- regulate serialization sizes and simplify debugging.
vcAllocStart :: Address
vcAllocStart = 999999999 | 166 | vcAllocStart :: Address
vcAllocStart = 999999999 | 48 | vcAllocStart = 999999999 | 24 | true | true | 0 | 6 | 23 | 20 | 9 | 11 | null | null |
Slava/6.035-decaf-compiler | src/SemanticChecker.hs | mit | getMaybeType :: Context -> (Maybe LLIR.ValueRef) -> LLIR.VType
getMaybeType (Context errs builder) (Just vref) = LLIR.getType builder vref | 138 | getMaybeType :: Context -> (Maybe LLIR.ValueRef) -> LLIR.VType
getMaybeType (Context errs builder) (Just vref) = LLIR.getType builder vref | 138 | getMaybeType (Context errs builder) (Just vref) = LLIR.getType builder vref | 75 | false | true | 0 | 9 | 17 | 55 | 27 | 28 | null | null |
dudebout/game-theoretic-learning | GTL/Numeric/DynamicProgramming/PolicyIteration.hs | isc | computeStateValue :: Comp StateValueV
computeStateValue = do
Data { stateCard = xCard
, dynamicsI = dyn
, utilityI = util
, discountD = disc
} <- ask
strat <- gets strategy
let utilWithStrat = buildVector xCard $ util <# strat
dynWithStrat = buildMatrix xCard xCard $ dyn <## str... | 469 | computeStateValue :: Comp StateValueV
computeStateValue = do
Data { stateCard = xCard
, dynamicsI = dyn
, utilityI = util
, discountD = disc
} <- ask
strat <- gets strategy
let utilWithStrat = buildVector xCard $ util <# strat
dynWithStrat = buildMatrix xCard xCard $ dyn <## str... | 469 | computeStateValue = do
Data { stateCard = xCard
, dynamicsI = dyn
, utilityI = util
, discountD = disc
} <- ask
strat <- gets strategy
let utilWithStrat = buildVector xCard $ util <# strat
dynWithStrat = buildMatrix xCard xCard $ dyn <## strat
identity = ident xCard
retu... | 431 | false | true | 0 | 12 | 121 | 140 | 71 | 69 | null | null |
johnjcamilleri/maltese-functional-morphology | ResMlt.hs | lgpl-3.0 | -- require doubling when prefixed with 'n', eg LLAĦĦAQ, MMUR, RRID {OM pg90}
------------------------------------------------------------------------------
-- Helpers
classifyRoot :: Root -> VClass = \r ->
Strong Regular | 224 | classifyRoot :: Root -> VClass = \r ->
Strong Regular | 55 | classifyRoot :: Root -> VClass = \r ->
Strong Regular | 55 | true | false | 0 | 6 | 29 | 26 | 14 | 12 | null | null |
ku-fpg/kansas-amber | legacy/Rewrite/LCD.hs | bsd-3-clause | lcdBacklightOn :: LCD -> Arduino ()
lcdBacklightOn lcd = lcdBacklight lcd True | 78 | lcdBacklightOn :: LCD -> Arduino ()
lcdBacklightOn lcd = lcdBacklight lcd True | 78 | lcdBacklightOn lcd = lcdBacklight lcd True | 42 | false | true | 0 | 7 | 11 | 28 | 13 | 15 | null | null |
amiller/redblackmerkle | haskell/test_redblack.hs | agpl-3.0 | double :: State Integer ()
double = get >>= put . (* 2) | 55 | double :: State Integer ()
double = get >>= put . (* 2) | 55 | double = get >>= put . (* 2) | 28 | false | true | 3 | 7 | 12 | 37 | 17 | 20 | null | null |
cies/bloodhound | tests/tests.hs | bsd-3-clause | testServer :: Server
testServer = Server "http://localhost:9200" | 66 | testServer :: Server
testServer = Server "http://localhost:9200" | 66 | testServer = Server "http://localhost:9200" | 44 | false | true | 0 | 5 | 8 | 14 | 7 | 7 | null | null |
romac/mental | src/Mental/PrettyPrint.hs | bsd-3-clause | ppTy :: Ty -> Doc
ppTy = para ppTy' | 35 | ppTy :: Ty -> Doc
ppTy = para ppTy' | 35 | ppTy = para ppTy' | 17 | false | true | 0 | 7 | 8 | 25 | 10 | 15 | null | null |
mrmonday/Idris-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | -- | Applies parser to get a block (which has possibly indented statements)
indentedBlock :: IdrisParser a -> IdrisParser [a]
indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
r... | 434 | indentedBlock :: IdrisParser a -> IdrisParser [a]
indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
return res
-- | Applies parser to get a block with at least one statement (w... | 358 | indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
return res
-- | Applies parser to get a block with at least one statement (which has possibly indented statements) | 308 | true | true | 0 | 10 | 158 | 63 | 28 | 35 | null | null |
geekyfox/skulk | src/Skulk/Outcome.hs | mit | -- | Converts `Maybe Value` to `Outcome Value` using provided error
-- message to designate `Fail`.
fromMaybe :: String -> Maybe a -> Outcome a
fromMaybe msg = maybe (Fail msg) OK | 179 | fromMaybe :: String -> Maybe a -> Outcome a
fromMaybe msg = maybe (Fail msg) OK | 79 | fromMaybe msg = maybe (Fail msg) OK | 35 | true | true | 0 | 7 | 31 | 41 | 20 | 21 | null | null |
ditto-lang/ditto | src/Ditto/Test.hs | gpl-3.0 | trunCheck :: Exp -> Exp -> Either String ()
trunCheck a _A = runPipelineV (check a _A) (const ()) | 97 | trunCheck :: Exp -> Exp -> Either String ()
trunCheck a _A = runPipelineV (check a _A) (const ()) | 97 | trunCheck a _A = runPipelineV (check a _A) (const ()) | 53 | false | true | 0 | 8 | 18 | 52 | 25 | 27 | null | null |
thkoch2001/gitit2 | src/Error.hs | gpl-2.0 | err :: Int -> String -> IO a
err code msg = do
hPutStrLn stderr msg
exitWith $ ExitFailure code
return undefined | 118 | err :: Int -> String -> IO a
err code msg = do
hPutStrLn stderr msg
exitWith $ ExitFailure code
return undefined | 118 | err code msg = do
hPutStrLn stderr msg
exitWith $ ExitFailure code
return undefined | 89 | false | true | 0 | 9 | 27 | 56 | 23 | 33 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x1F53' = "\x03C5\x0314\x0300" | 45 | decomposeChar '\x1F53' = "\x03C5\x0314\x0300" | 45 | decomposeChar '\x1F53' = "\x03C5\x0314\x0300" | 45 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
aopp-pred/fp-truncate | test/Truncate/Test/Truncatable/Operator.hs | apache-2.0 | test_zeroHex64 :: Assertion
test_zeroHex64 = all (== h) (map (h <#) [0..52]) @?= True
where
h = Hex64 "0" | 111 | test_zeroHex64 :: Assertion
test_zeroHex64 = all (== h) (map (h <#) [0..52]) @?= True
where
h = Hex64 "0" | 111 | test_zeroHex64 = all (== h) (map (h <#) [0..52]) @?= True
where
h = Hex64 "0" | 83 | false | true | 0 | 9 | 24 | 52 | 28 | 24 | null | null |
wavewave/gnuplot | src/Graphics/Gnuplot/Simple.hs | bsd-3-clause | -- * plot functions
list :: (Tuple.C a) => [a] -> Plot2D.T Double Double
list = Plot2D.list (GraphType.Cons "lines") | 117 | list :: (Tuple.C a) => [a] -> Plot2D.T Double Double
list = Plot2D.list (GraphType.Cons "lines") | 96 | list = Plot2D.list (GraphType.Cons "lines") | 43 | true | true | 0 | 9 | 19 | 55 | 27 | 28 | null | null |
bennofs/cabal | cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | stateDependencyRelation (Failed _ _) (Failed _ _) = True | 64 | stateDependencyRelation (Failed _ _) (Failed _ _) = True | 64 | stateDependencyRelation (Failed _ _) (Failed _ _) = True | 64 | false | false | 0 | 7 | 16 | 27 | 13 | 14 | null | null |
linusyang/barrelfish | tools/mackerel/CAbsSyntax.hs | mit | pp_expr (CallInd f al)
= "(" ++ (pp_expr f) ++ ")(" ++ (concat $ intersperse ", " [ pp_expr e | e <- al ]) ++ ")" | 118 | pp_expr (CallInd f al)
= "(" ++ (pp_expr f) ++ ")(" ++ (concat $ intersperse ", " [ pp_expr e | e <- al ]) ++ ")" | 118 | pp_expr (CallInd f al)
= "(" ++ (pp_expr f) ++ ")(" ++ (concat $ intersperse ", " [ pp_expr e | e <- al ]) ++ ")" | 118 | false | false | 0 | 12 | 31 | 65 | 32 | 33 | null | null |
kmicklas/pyrec | src/Pyrec/Report.hs | mit | foldExpr :: (ExprWithErrors i -> Pyrec.IR.Expr BindT BindN i C.Type e -> e)
-> ExprWithErrors i -> e
foldExpr f e@(EE _ _ _ inner) = f e $ foldExpr f <$> inner | 173 | foldExpr :: (ExprWithErrors i -> Pyrec.IR.Expr BindT BindN i C.Type e -> e)
-> ExprWithErrors i -> e
foldExpr f e@(EE _ _ _ inner) = f e $ foldExpr f <$> inner | 173 | foldExpr f e@(EE _ _ _ inner) = f e $ foldExpr f <$> inner | 58 | false | true | 7 | 9 | 46 | 88 | 43 | 45 | null | null |
christiaanb/Idris-dev | src/Pkg/PParser.hs | bsd-3-clause | strlit = PTok.stringLiteral lexer | 36 | strlit = PTok.stringLiteral lexer | 36 | strlit = PTok.stringLiteral lexer | 36 | false | false | 0 | 6 | 6 | 11 | 5 | 6 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | esScripts :: FrozenSet String
esScripts =
ConstantUtils.mkSet [esScriptAttach,
esScriptCreate,
esScriptDetach,
esScriptGrow,
esScriptRemove,
esScriptSetinfo,
esScriptVerify,
... | 429 | esScripts :: FrozenSet String
esScripts =
ConstantUtils.mkSet [esScriptAttach,
esScriptCreate,
esScriptDetach,
esScriptGrow,
esScriptRemove,
esScriptSetinfo,
esScriptVerify,
... | 429 | esScripts =
ConstantUtils.mkSet [esScriptAttach,
esScriptCreate,
esScriptDetach,
esScriptGrow,
esScriptRemove,
esScriptSetinfo,
esScriptVerify,
esScriptSnaps... | 399 | false | true | 0 | 6 | 225 | 54 | 30 | 24 | null | null |
mbetter/JaggedSet | src/Data/JaggedSet.hs | bsd-3-clause | empty :: forall a i.(IndexKey i) => JaggedSet a i
empty = JaggedSet
{ elements = IM.empty
, maxKey = minBound
, indicies = V.fromList (map
-- the result of toKey will determine the constructor of Index we use.
(\x -> ... | 698 | empty :: forall a i.(IndexKey i) => JaggedSet a i
empty = JaggedSet
{ elements = IM.empty
, maxKey = minBound
, indicies = V.fromList (map
-- the result of toKey will determine the constructor of Index we use.
(\x -> ... | 698 | empty = JaggedSet
{ elements = IM.empty
, maxKey = minBound
, indicies = V.fromList (map
-- the result of toKey will determine the constructor of Index we use.
(\x -> case toKey x of
... | 648 | false | true | 0 | 16 | 392 | 138 | 73 | 65 | null | null |
shlevy/arithmoi | Math/NumberTheory/Primes/Sieve/Eratosthenes.hs | mit | nthPrimeCt 4 = 7 | 21 | nthPrimeCt 4 = 7 | 21 | nthPrimeCt 4 = 7 | 21 | false | false | 1 | 5 | 8 | 13 | 4 | 9 | null | null |
ernestasju/nadeko | src/Navision.hs | unlicense | parseMenuNodeType :: Parser MenuNodeType
parseMenuNodeType =
try (parseEnum MenuGroup "MenuGroup")
<|> try (parseEnum MenuItem "MenuItem")
<|> parseEnum Menu "Menu"
<|> parseEnum Root "Root" | 231 | parseMenuNodeType :: Parser MenuNodeType
parseMenuNodeType =
try (parseEnum MenuGroup "MenuGroup")
<|> try (parseEnum MenuItem "MenuItem")
<|> parseEnum Menu "Menu"
<|> parseEnum Root "Root" | 231 | parseMenuNodeType =
try (parseEnum MenuGroup "MenuGroup")
<|> try (parseEnum MenuItem "MenuItem")
<|> parseEnum Menu "Menu"
<|> parseEnum Root "Root" | 190 | false | true | 9 | 7 | 63 | 67 | 33 | 34 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | configureExOptions :: ShowOrParseArgs
-> ConstraintSource
-> [OptionField ConfigExFlags]
configureExOptions _showOrParseArgs src =
[ option [] ["cabal-lib-version"]
("Select which version of the Cabal lib to use to build packages "
++ "(useful for testing).")
co... | 1,293 | configureExOptions :: ShowOrParseArgs
-> ConstraintSource
-> [OptionField ConfigExFlags]
configureExOptions _showOrParseArgs src =
[ option [] ["cabal-lib-version"]
("Select which version of the Cabal lib to use to build packages "
++ "(useful for testing).")
co... | 1,293 | configureExOptions _showOrParseArgs src =
[ option [] ["cabal-lib-version"]
("Select which version of the Cabal lib to use to build packages "
++ "(useful for testing).")
configCabalVersion (\v flags -> flags { configCabalVersion = v })
(reqArg "VERSION" (readP_to_E ("Cannot parse cabal lib ve... | 1,166 | false | true | 0 | 16 | 397 | 325 | 177 | 148 | null | null |
haskellGardener/yusic | src/Yusic.hs | mit | toKeyGuide (G:As_Bb:D:E :[]) = Just KG_Gs_AbMinor6 | 64 | toKeyGuide (G:As_Bb:D:E :[]) = Just KG_Gs_AbMinor6 | 64 | toKeyGuide (G:As_Bb:D:E :[]) = Just KG_Gs_AbMinor6 | 64 | false | false | 0 | 11 | 19 | 33 | 16 | 17 | null | null |
easoncxz/hack-assembler | src/Parser.hs | gpl-3.0 | splitComp :: Text -> (Text, Text, Text)
splitComp line =
let
(destAndComp, jump) =
(T.strip *** (T.strip . T.dropWhile (== ';')))
(T.breakOn ";" line)
(rComp, rDest) =
(T.strip *** (T.strip . T.dropWhile (== '=')))
(T.breakOn "=" (T.reverse destAndComp))
(dest, comp) =
(T... | 382 | splitComp :: Text -> (Text, Text, Text)
splitComp line =
let
(destAndComp, jump) =
(T.strip *** (T.strip . T.dropWhile (== ';')))
(T.breakOn ";" line)
(rComp, rDest) =
(T.strip *** (T.strip . T.dropWhile (== '=')))
(T.breakOn "=" (T.reverse destAndComp))
(dest, comp) =
(T... | 382 | splitComp line =
let
(destAndComp, jump) =
(T.strip *** (T.strip . T.dropWhile (== ';')))
(T.breakOn ";" line)
(rComp, rDest) =
(T.strip *** (T.strip . T.dropWhile (== '=')))
(T.breakOn "=" (T.reverse destAndComp))
(dest, comp) =
(T.reverse *** T.reverse) (rDest, rComp)
... | 342 | false | true | 0 | 15 | 99 | 186 | 101 | 85 | null | null |
ctford/Idris-Elba-dev | src/Idris/REPL.hs | bsd-3-clause | parseArgs ("-O":n:ns) = OptLevel (read n) : parseArgs ns | 67 | parseArgs ("-O":n:ns) = OptLevel (read n) : parseArgs ns | 67 | parseArgs ("-O":n:ns) = OptLevel (read n) : parseArgs ns | 67 | false | false | 0 | 8 | 19 | 37 | 17 | 20 | null | null |
banacorn/agda-language-server | src/Server/Handler.hs | mit | inferTypeOfText
:: FilePath -> Text -> ServerM (LspM Config) (Either String String)
inferTypeOfText filepath text = runCommandM $ do
-- load first
cmd_load' filepath [] True Imp.TypeCheck $ \_ -> return ()
-- infer later
let norm = AsIs
-- localStateCommandM: restore TC state afterwards, do we need this h... | 519 | inferTypeOfText
:: FilePath -> Text -> ServerM (LspM Config) (Either String String)
inferTypeOfText filepath text = runCommandM $ do
-- load first
cmd_load' filepath [] True Imp.TypeCheck $ \_ -> return ()
-- infer later
let norm = AsIs
-- localStateCommandM: restore TC state afterwards, do we need this h... | 519 | inferTypeOfText filepath text = runCommandM $ do
-- load first
cmd_load' filepath [] True Imp.TypeCheck $ \_ -> return ()
-- infer later
let norm = AsIs
-- localStateCommandM: restore TC state afterwards, do we need this here?
typ <- localStateCommandM $ do
e <- lift $ runPM $ parse exprParser (unpack... | 433 | false | true | 0 | 17 | 111 | 165 | 76 | 89 | null | null |
xcv-/pipes-find | src/System/HFind/Expr/Bakers/FromAST.hs | mit | convertPred :: IsPred pred => LocPred -> pred
convertPred (Loc p loc) =
case p of
ScopeP p1 -> scopeP (convertPred p1) loc
NotP p1 -> notP (convertPred p1) loc
AndP p1 p2 -> andP (convertPred p1) (convertPred p2) loc
OrP p1 p2 -> orP (convertPred p1) (convertPred p2)... | 502 | convertPred :: IsPred pred => LocPred -> pred
convertPred (Loc p loc) =
case p of
ScopeP p1 -> scopeP (convertPred p1) loc
NotP p1 -> notP (convertPred p1) loc
AndP p1 p2 -> andP (convertPred p1) (convertPred p2) loc
OrP p1 p2 -> orP (convertPred p1) (convertPred p2)... | 502 | convertPred (Loc p loc) =
case p of
ScopeP p1 -> scopeP (convertPred p1) loc
NotP p1 -> notP (convertPred p1) loc
AndP p1 p2 -> andP (convertPred p1) (convertPred p2) loc
OrP p1 p2 -> orP (convertPred p1) (convertPred p2) loc
ExprP e -> exprP (convertEx... | 456 | false | true | 7 | 8 | 163 | 209 | 102 | 107 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x0229' = "\x0065\x0327" | 39 | decomposeChar '\x0229' = "\x0065\x0327" | 39 | decomposeChar '\x0229' = "\x0065\x0327" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
myfreeweb/indieweb-algorithms | test-suite/TestCommon.hs | unlicense | xml, json ∷ QuasiQuoter
xml = r | 31 | xml, json ∷ QuasiQuoter
xml = r | 31 | xml = r | 7 | false | true | 2 | 6 | 6 | 21 | 8 | 13 | null | null |
spoqa/nirum | src/Nirum/Parser.hs | gpl-3.0 | uniqueName :: [Identifier] -> String -> Parser Name
uniqueName forwardNames label' = try $ do
Name fName _ <- lookAhead nameP
when (fName `elem` forwardNames)
(fail $ "the " ++ label' ++ " `" ++ toString fName ++
"` is duplicated")
nameP
where
nameP :: Parser Name
nameP =... | 336 | uniqueName :: [Identifier] -> String -> Parser Name
uniqueName forwardNames label' = try $ do
Name fName _ <- lookAhead nameP
when (fName `elem` forwardNames)
(fail $ "the " ++ label' ++ " `" ++ toString fName ++
"` is duplicated")
nameP
where
nameP :: Parser Name
nameP =... | 336 | uniqueName forwardNames label' = try $ do
Name fName _ <- lookAhead nameP
when (fName `elem` forwardNames)
(fail $ "the " ++ label' ++ " `" ++ toString fName ++
"` is duplicated")
nameP
where
nameP :: Parser Name
nameP = name <?> label' | 284 | false | true | 0 | 14 | 99 | 115 | 56 | 59 | null | null |
nushio3/Paraiso | attic/paraiso-2010-lifegame/VVM.hs | bsd-3-clause | srcRegisters (And a b) = [a, b] | 31 | srcRegisters (And a b) = [a, b] | 31 | srcRegisters (And a b) = [a, b] | 31 | false | false | 0 | 6 | 6 | 24 | 12 | 12 | null | null |
abdulrahimnizamani/OccamStar | interpreter.hs | gpl-2.0 | matchExpExp lx w d t (HsCon x) (HsCon y) = return (t,(x == y)) | 69 | matchExpExp lx w d t (HsCon x) (HsCon y) = return (t,(x == y)) | 69 | matchExpExp lx w d t (HsCon x) (HsCon y) = return (t,(x == y)) | 69 | false | false | 0 | 8 | 20 | 47 | 24 | 23 | null | null |
thomie/cabal | Cabal/Distribution/Simple.hs | bsd-3-clause | -- | A simple implementation of @main@ for a Cabal setup script.
-- It reads the package description file using IO, and performs the
-- action specified on the command line.
defaultMain :: IO ()
defaultMain = getArgs >>= defaultMainHelper simpleUserHooks | 254 | defaultMain :: IO ()
defaultMain = getArgs >>= defaultMainHelper simpleUserHooks | 80 | defaultMain = getArgs >>= defaultMainHelper simpleUserHooks | 59 | true | true | 0 | 6 | 40 | 26 | 14 | 12 | null | null |
intolerable/reddit | test-anon/Reddit/Actions/SearchSpec.hs | bsd-2-clause | isRight :: Either a b -> Bool
isRight = const False `either` const True | 71 | isRight :: Either a b -> Bool
isRight = const False `either` const True | 71 | isRight = const False `either` const True | 41 | false | true | 0 | 6 | 13 | 32 | 16 | 16 | null | null |
dkensinger/haskell | haskellbook/print3broken.hs | gpl-3.0 | main :: IO ()
main = do
putStrLn greeting
printSecond
where greeting = "Yarrr"
-- greeting :: String
-- greeting = "Yarrrr" | 132 | main :: IO ()
main = do
putStrLn greeting
printSecond
where greeting = "Yarrr"
-- greeting :: String
-- greeting = "Yarrrr" | 132 | main = do
putStrLn greeting
printSecond
where greeting = "Yarrr"
-- greeting :: String
-- greeting = "Yarrrr" | 118 | false | true | 0 | 7 | 30 | 35 | 17 | 18 | null | null |
ryandiaz/AppDeploy | src/appcontroller.hs | bsd-3-clause | trimrhelper str accm total =
let next = ((head str):total)
in if isSpace $ head str then
trimrhelper (tail str) accm next
else trimrhelper (tail str) next next | 177 | trimrhelper str accm total =
let next = ((head str):total)
in if isSpace $ head str then
trimrhelper (tail str) accm next
else trimrhelper (tail str) next next | 177 | trimrhelper str accm total =
let next = ((head str):total)
in if isSpace $ head str then
trimrhelper (tail str) accm next
else trimrhelper (tail str) next next | 177 | false | false | 0 | 12 | 45 | 78 | 38 | 40 | null | null |
ecaustin/haskhol-deductive | src/HaskHOL/Lib/Meson.hs | bsd-2-clause | folEq :: [(FOLTerm, Int)] -> FOLTerm -> FOLTerm -> Bool
folEq insts tm1 tm2
| tm1 == tm2 = True
| otherwise =
case (tm1, tm2) of
(FNApp f fargs, FNApp g gargs) ->
let conds = zipWith (folEq insts) fargs gargs in
f == g && and conds
(_, FVar x) ->
... | 655 | folEq :: [(FOLTerm, Int)] -> FOLTerm -> FOLTerm -> Bool
folEq insts tm1 tm2
| tm1 == tm2 = True
| otherwise =
case (tm1, tm2) of
(FNApp f fargs, FNApp g gargs) ->
let conds = zipWith (folEq insts) fargs gargs in
f == g && and conds
(_, FVar x) ->
... | 655 | folEq insts tm1 tm2
| tm1 == tm2 = True
| otherwise =
case (tm1, tm2) of
(FNApp f fargs, FNApp g gargs) ->
let conds = zipWith (folEq insts) fargs gargs in
f == g && and conds
(_, FVar x) ->
case runCatch $ revAssoc x insts of
... | 599 | false | true | 0 | 15 | 270 | 261 | 126 | 135 | null | null |
input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Kernel/DB/BlockMeta.hs | mit | appendLocalBlockMeta :: LocalBlockMeta -> LocalBlockMeta -> LocalBlockMeta
appendLocalBlockMeta (LocalBlockMeta cur) = LocalBlockMeta . appendBlockMeta cur | 155 | appendLocalBlockMeta :: LocalBlockMeta -> LocalBlockMeta -> LocalBlockMeta
appendLocalBlockMeta (LocalBlockMeta cur) = LocalBlockMeta . appendBlockMeta cur | 155 | appendLocalBlockMeta (LocalBlockMeta cur) = LocalBlockMeta . appendBlockMeta cur | 80 | false | true | 0 | 6 | 14 | 39 | 18 | 21 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | ordClassName = clsQual gHC_CLASSES (fsLit "Ord") ordClassKey | 69 | ordClassName = clsQual gHC_CLASSES (fsLit "Ord") ordClassKey | 69 | ordClassName = clsQual gHC_CLASSES (fsLit "Ord") ordClassKey | 69 | false | false | 0 | 7 | 15 | 19 | 9 | 10 | null | null |
beni55/old-openresty | haskell/src/OpenResty/Request.hs | bsd-3-clause | unescape :: B.ByteString -> B.ByteString
unescape = B.pack . unEscapeString . B.unpack | 86 | unescape :: B.ByteString -> B.ByteString
unescape = B.pack . unEscapeString . B.unpack | 86 | unescape = B.pack . unEscapeString . B.unpack | 45 | false | true | 0 | 7 | 11 | 31 | 16 | 15 | null | null |
sjakobi/vector-extra | test/ListAnalogies.hs | bsd-3-clause | main :: IO ()
main = defaultMain analogies | 42 | main :: IO ()
main = defaultMain analogies | 42 | main = defaultMain analogies | 28 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
fmapfmapfmap/amazonka | amazonka-ses/gen/Network/AWS/SES/DeleteIdentity.hs | mpl-2.0 | -- | Creates a value of 'DeleteIdentityResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dirsResponseStatus'
deleteIdentityResponse
:: Int -- ^ 'dirsResponseStatus'
-> DeleteIdentityResponse
deleteIdentityResponse pRes... | 413 | deleteIdentityResponse
:: Int -- ^ 'dirsResponseStatus'
-> DeleteIdentityResponse
deleteIdentityResponse pResponseStatus_ =
DeleteIdentityResponse'
{ _dirsResponseStatus = pResponseStatus_
} | 210 | deleteIdentityResponse pResponseStatus_ =
DeleteIdentityResponse'
{ _dirsResponseStatus = pResponseStatus_
} | 120 | true | true | 0 | 7 | 70 | 41 | 22 | 19 | null | null |
Ulrar/cstodo | Application.hs | bsd-3-clause | getApplicationRepl :: IO (Int, App, Application)
getApplicationRepl = do
settings <- getAppSettings
foundation <- makeFoundation settings
wsettings <- getDevSettings $ warpSettings foundation
app1 <- makeApplication foundation
return (getPort wsettings, foundation, app1) | 291 | getApplicationRepl :: IO (Int, App, Application)
getApplicationRepl = do
settings <- getAppSettings
foundation <- makeFoundation settings
wsettings <- getDevSettings $ warpSettings foundation
app1 <- makeApplication foundation
return (getPort wsettings, foundation, app1) | 291 | getApplicationRepl = do
settings <- getAppSettings
foundation <- makeFoundation settings
wsettings <- getDevSettings $ warpSettings foundation
app1 <- makeApplication foundation
return (getPort wsettings, foundation, app1) | 242 | false | true | 0 | 10 | 50 | 88 | 40 | 48 | null | null |
SeanTater/albemarle | src/NLP/Albemarle/Cooccur.hs | bsd-3-clause | -- | Get all of the frequencies associated with a source word
wordSlice :: Int -> Cooccur -> Cooccur
wordSlice a = let
start = packIDs a 0 -- Will be inclusive
end = packIDs (a+1) 0 -- Will be exclusive
split target c = let
(left, mayv, right) = IntMap.splitLookup target c
in (maybe left (\v -> IntMap.ins... | 419 | wordSlice :: Int -> Cooccur -> Cooccur
wordSlice a = let
start = packIDs a 0 -- Will be inclusive
end = packIDs (a+1) 0 -- Will be exclusive
split target c = let
(left, mayv, right) = IntMap.splitLookup target c
in (maybe left (\v -> IntMap.insert target v left) mayv, right)
in snd . split start -- afte... | 357 | wordSlice a = let
start = packIDs a 0 -- Will be inclusive
end = packIDs (a+1) 0 -- Will be exclusive
split target c = let
(left, mayv, right) = IntMap.splitLookup target c
in (maybe left (\v -> IntMap.insert target v left) mayv, right)
in snd . split start -- after the beginning
. fst . split end | 318 | true | true | 3 | 16 | 97 | 154 | 75 | 79 | null | null |
tjakway/ghcjvm | compiler/simplCore/SAT.hs | bsd-3-clause | mergeSATInfo :: SATInfo -> SATInfo -> SATInfo
mergeSATInfo l r = zipWith mergeSA l r
where
mergeSA NotStatic _ = NotStatic
mergeSA _ NotStatic = NotStatic
mergeSA (Static (VarApp v)) (Static (VarApp v'))
| v == v' = Static (VarApp v)
| otherwise = NotStatic
mergeSA (Static (TypeApp t)) (... | 770 | mergeSATInfo :: SATInfo -> SATInfo -> SATInfo
mergeSATInfo l r = zipWith mergeSA l r
where
mergeSA NotStatic _ = NotStatic
mergeSA _ NotStatic = NotStatic
mergeSA (Static (VarApp v)) (Static (VarApp v'))
| v == v' = Static (VarApp v)
| otherwise = NotStatic
mergeSA (Static (TypeApp t)) (... | 770 | mergeSATInfo l r = zipWith mergeSA l r
where
mergeSA NotStatic _ = NotStatic
mergeSA _ NotStatic = NotStatic
mergeSA (Static (VarApp v)) (Static (VarApp v'))
| v == v' = Static (VarApp v)
| otherwise = NotStatic
mergeSA (Static (TypeApp t)) (Static (TypeApp t'))
| t `eqType` t' = S... | 724 | false | true | 3 | 10 | 280 | 286 | 138 | 148 | null | null |
projedi/fluidsynth-hs-complete | src/Sound/Fluidsynth/Settings.hs | bsd-3-clause | getRangeInt :: (MonadSettings m) => String -> m (Maybe (Int, Int))
getRangeInt name = ((fromIntegral *** fromIntegral) <$>) <$>
getRange name c'FLUID_INT_TYPE c'fluid_settings_getint_range | 191 | getRangeInt :: (MonadSettings m) => String -> m (Maybe (Int, Int))
getRangeInt name = ((fromIntegral *** fromIntegral) <$>) <$>
getRange name c'FLUID_INT_TYPE c'fluid_settings_getint_range | 191 | getRangeInt name = ((fromIntegral *** fromIntegral) <$>) <$>
getRange name c'FLUID_INT_TYPE c'fluid_settings_getint_range | 124 | false | true | 0 | 11 | 25 | 71 | 35 | 36 | null | null |
runjak/projectEuler | src/Problem37.hs | mit | primes :: [N]
primes = 2 : 3 : sieve [] (tail primes) 3
where
notDivsBy d n = n `rem` d /= 0
sieve ds (p:ps) x = foldr (filter . notDivsBy) [x+2, x+4..p*p-2] ds
`mappend` sieve (p:ds) ps (p*p) | 221 | primes :: [N]
primes = 2 : 3 : sieve [] (tail primes) 3
where
notDivsBy d n = n `rem` d /= 0
sieve ds (p:ps) x = foldr (filter . notDivsBy) [x+2, x+4..p*p-2] ds
`mappend` sieve (p:ds) ps (p*p) | 221 | primes = 2 : 3 : sieve [] (tail primes) 3
where
notDivsBy d n = n `rem` d /= 0
sieve ds (p:ps) x = foldr (filter . notDivsBy) [x+2, x+4..p*p-2] ds
`mappend` sieve (p:ds) ps (p*p) | 207 | false | true | 0 | 9 | 69 | 150 | 77 | 73 | null | null |
jwvg0425/free-game | FreeGame/Backend/GLFW.hs | bsd-3-clause | keyCallback :: IORef (Map.Map Key ButtonState) -> GLFW.Window -> GLFW.Key -> Int -> GLFW.KeyState -> GLFW.ModifierKeys -> IO ()
keyCallback keyBuffer _ key _ GLFW.KeyState'Pressed _ = modifyIORef' keyBuffer $ Map.adjust buttonDown (toEnum $ fromEnum key) | 255 | keyCallback :: IORef (Map.Map Key ButtonState) -> GLFW.Window -> GLFW.Key -> Int -> GLFW.KeyState -> GLFW.ModifierKeys -> IO ()
keyCallback keyBuffer _ key _ GLFW.KeyState'Pressed _ = modifyIORef' keyBuffer $ Map.adjust buttonDown (toEnum $ fromEnum key) | 254 | keyCallback keyBuffer _ key _ GLFW.KeyState'Pressed _ = modifyIORef' keyBuffer $ Map.adjust buttonDown (toEnum $ fromEnum key) | 126 | false | true | 0 | 12 | 36 | 100 | 48 | 52 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Resources/Calendars/Get.hs | mpl-2.0 | -- | The unique ID for the customer\'s Google account. As an account
-- administrator, you can also use the my_customer alias to represent your
-- account\'s customer ID.
rcgCustomer :: Lens' ResourcesCalendarsGet Text
rcgCustomer
= lens _rcgCustomer (\ s a -> s{_rcgCustomer = a}) | 283 | rcgCustomer :: Lens' ResourcesCalendarsGet Text
rcgCustomer
= lens _rcgCustomer (\ s a -> s{_rcgCustomer = a}) | 112 | rcgCustomer
= lens _rcgCustomer (\ s a -> s{_rcgCustomer = a}) | 64 | true | true | 1 | 9 | 46 | 46 | 24 | 22 | null | null |
trskop/command-wrapper | command-wrapper-subcommand/src/CommandWrapper/Subcommand/Options.hs | bsd-3-clause | helpFlag' :: mode -> Options.Parser mode
helpFlag' helpMode = Options.flag' helpMode helpFlagFields | 99 | helpFlag' :: mode -> Options.Parser mode
helpFlag' helpMode = Options.flag' helpMode helpFlagFields | 99 | helpFlag' helpMode = Options.flag' helpMode helpFlagFields | 58 | false | true | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
bravit/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | bsrem (ITFixed IT16) [B16 x, B16 y]
= Just $ B16 (fromIntegral (fromIntegral x `rem` fromIntegral y :: Int16)) | 114 | bsrem (ITFixed IT16) [B16 x, B16 y]
= Just $ B16 (fromIntegral (fromIntegral x `rem` fromIntegral y :: Int16)) | 114 | bsrem (ITFixed IT16) [B16 x, B16 y]
= Just $ B16 (fromIntegral (fromIntegral x `rem` fromIntegral y :: Int16)) | 114 | false | false | 0 | 11 | 22 | 60 | 30 | 30 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.