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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brendanhay/gogol | gogol-sheets/gen/Network/Google/Resource/Sheets/Spreadsheets/BatchUpdate.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
sbuUploadType :: Lens' SpreadsheetsBatchUpdate (Maybe Text)
sbuUploadType
= lens _sbuUploadType
(\ s a -> s{_sbuUploadType = a}) | 207 | sbuUploadType :: Lens' SpreadsheetsBatchUpdate (Maybe Text)
sbuUploadType
= lens _sbuUploadType
(\ s a -> s{_sbuUploadType = a}) | 136 | sbuUploadType
= lens _sbuUploadType
(\ s a -> s{_sbuUploadType = a}) | 76 | true | true | 1 | 9 | 34 | 52 | 25 | 27 | null | null |
andygill/er-systemf | Language/SystemF/Pretty.hs | bsd-3-clause | pprintType (TyCon "->" [t1,t2]) = pprintAtomicType t1 <+> symbol "->" <+> pprintType t2 | 87 | pprintType (TyCon "->" [t1,t2]) = pprintAtomicType t1 <+> symbol "->" <+> pprintType t2 | 87 | pprintType (TyCon "->" [t1,t2]) = pprintAtomicType t1 <+> symbol "->" <+> pprintType t2 | 87 | false | false | 0 | 7 | 12 | 41 | 19 | 22 | null | null |
kdkeyser/streaming-commons | Data/Streaming/Network.hs | mit | bindRandomPortGen :: SocketType -> HostPreference -> IO (Int, Socket)
bindRandomPortGen sockettype s =
loop (30 :: Int)
where
loop cnt = do
port <- getUnassignedPort
esocket <- try $ bindPortGen sockettype port s
case esocket :: Either IOException Socket of
Left e
... | 822 | bindRandomPortGen :: SocketType -> HostPreference -> IO (Int, Socket)
bindRandomPortGen sockettype s =
loop (30 :: Int)
where
loop cnt = do
port <- getUnassignedPort
esocket <- try $ bindPortGen sockettype port s
case esocket :: Either IOException Socket of
Left e
... | 822 | bindRandomPortGen sockettype s =
loop (30 :: Int)
where
loop cnt = do
port <- getUnassignedPort
esocket <- try $ bindPortGen sockettype port s
case esocket :: Either IOException Socket of
Left e
| cnt <= 1 -> error $ concat
[ "Data.Stream... | 752 | false | true | 0 | 14 | 332 | 181 | 87 | 94 | null | null |
g0v/encoding-mashup-server | src/CharDatabase.hs | bsd-3-clause | unwrapCharPair :: CharPair -> (CharName, CharInfo)
unwrapCharPair (CharPair a b) = (a, b) | 89 | unwrapCharPair :: CharPair -> (CharName, CharInfo)
unwrapCharPair (CharPair a b) = (a, b) | 89 | unwrapCharPair (CharPair a b) = (a, b) | 38 | false | true | 0 | 7 | 12 | 38 | 21 | 17 | null | null |
sumitsahrawat/IHaskell | src/IHaskell/Flags.hs | mit | ihaskellArgs :: Mode Args
ihaskellArgs =
let noMode = mode "IHaskell" defaultReport descr noArgs [helpFlag, versionFlag]
defaultReport = Args (ShowDefault helpStr) []
descr = "Haskell for Interactive Computing."
helpFlag = flagHelpSimple (add Help)
versionFlag = flagVersion (add Version)
... | 507 | ihaskellArgs :: Mode Args
ihaskellArgs =
let noMode = mode "IHaskell" defaultReport descr noArgs [helpFlag, versionFlag]
defaultReport = Args (ShowDefault helpStr) []
descr = "Haskell for Interactive Computing."
helpFlag = flagHelpSimple (add Help)
versionFlag = flagVersion (add Version)
... | 507 | ihaskellArgs =
let noMode = mode "IHaskell" defaultReport descr noArgs [helpFlag, versionFlag]
defaultReport = Args (ShowDefault helpStr) []
descr = "Haskell for Interactive Computing."
helpFlag = flagHelpSimple (add Help)
versionFlag = flagVersion (add Version)
helpStr = showText (Wrap ... | 481 | false | true | 0 | 12 | 108 | 174 | 83 | 91 | null | null |
Airtnp/Freshman_Simple_Haskell_Lib | Intro/WIW/Promoted/PromotedSymbols.hs | mit | smarlow :: Person2
smarlow = Person2 (Field 38) (Field "Simon Marlow") (Field "rts") | 84 | smarlow :: Person2
smarlow = Person2 (Field 38) (Field "Simon Marlow") (Field "rts") | 84 | smarlow = Person2 (Field 38) (Field "Simon Marlow") (Field "rts") | 65 | false | true | 0 | 7 | 12 | 36 | 18 | 18 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/Commands/Rebase.hs | gpl-2.0 | applyDescription :: String
applyDescription = "Apply a patch bundle, suspending any local patches that conflict." | 113 | applyDescription :: String
applyDescription = "Apply a patch bundle, suspending any local patches that conflict." | 113 | applyDescription = "Apply a patch bundle, suspending any local patches that conflict." | 86 | false | true | 0 | 4 | 14 | 11 | 6 | 5 | null | null |
acharal/hopes | src/frontend/Lexer.hs | gpl-2.0 | scanSkip :: ScanAction
scanSkip inp lo =
let scanSkip_aux o l (c:cs) lo
| c == '\n' = scanSkip_aux 1 (l+1) cs lo
| isSpace c = scanSkip_aux (o+1) l cs lo
| otherwise = TokSkip lo{locOffset=o, locLine=l} (c:cs)
scanSkip... | 409 | scanSkip :: ScanAction
scanSkip inp lo =
let scanSkip_aux o l (c:cs) lo
| c == '\n' = scanSkip_aux 1 (l+1) cs lo
| isSpace c = scanSkip_aux (o+1) l cs lo
| otherwise = TokSkip lo{locOffset=o, locLine=l} (c:cs)
scanSkip... | 409 | scanSkip inp lo =
let scanSkip_aux o l (c:cs) lo
| c == '\n' = scanSkip_aux 1 (l+1) cs lo
| isSpace c = scanSkip_aux (o+1) l cs lo
| otherwise = TokSkip lo{locOffset=o, locLine=l} (c:cs)
scanSkip_aux o l [] lo ... | 386 | false | true | 0 | 12 | 170 | 169 | 83 | 86 | null | null |
YelaSeamless/cgrep | src/CGrep/Strategy/Cpp/Semantic.hs | gpl-2.0 | combineMultiCard :: [MultiCard Cpp.Token] -> [MultiCard Cpp.Token]
combineMultiCard (m1:r@(m2:m3:ms))
| [TokenCard (Cpp.TokenIdentifier {Cpp.toString = "OR"})] <- m2 = combineMultiCard $ (m1++m3):ms
| otherwise = m1 : combineMultiCard r | 258 | combineMultiCard :: [MultiCard Cpp.Token] -> [MultiCard Cpp.Token]
combineMultiCard (m1:r@(m2:m3:ms))
| [TokenCard (Cpp.TokenIdentifier {Cpp.toString = "OR"})] <- m2 = combineMultiCard $ (m1++m3):ms
| otherwise = m1 : combineMultiCard r | 258 | combineMultiCard (m1:r@(m2:m3:ms))
| [TokenCard (Cpp.TokenIdentifier {Cpp.toString = "OR"})] <- m2 = combineMultiCard $ (m1++m3):ms
| otherwise = m1 : combineMultiCard r | 191 | false | true | 0 | 14 | 49 | 124 | 62 | 62 | null | null |
DrNico/rhodium | test/rhc-strap/TestRhodium/Context.hs | mit | check_pb3 :: HomC -> Gen Bool
check_pb3 f = do
o <- genObN $ length (morph f)
let ob = ObC $ o : (target f)
return $ (proj $ ObC $ target $ q f ob) <.> (q f ob)
== f <.> (proj $ pullback f ob)
-- Instances | 232 | check_pb3 :: HomC -> Gen Bool
check_pb3 f = do
o <- genObN $ length (morph f)
let ob = ObC $ o : (target f)
return $ (proj $ ObC $ target $ q f ob) <.> (q f ob)
== f <.> (proj $ pullback f ob)
-- Instances | 232 | check_pb3 f = do
o <- genObN $ length (morph f)
let ob = ObC $ o : (target f)
return $ (proj $ ObC $ target $ q f ob) <.> (q f ob)
== f <.> (proj $ pullback f ob)
-- Instances | 202 | false | true | 0 | 14 | 77 | 124 | 60 | 64 | null | null |
noughtmare/yi | yi-core/src/Yi/Misc.hs | gpl-2.0 | -- | Given a possible starting path (which if not given defaults to
-- the current directory) and a fragment of a path we find all files
-- within the given (or current) directory which can complete the
-- given path fragment. We return a pair of both directory plus the
-- filenames on their own that is without their d... | 1,698 | getAppropriateFiles :: Maybe T.Text -> T.Text -> YiM (T.Text, [ T.Text ])
getAppropriateFiles start s' = do
curDir <- case start of
Nothing -> do bufferPath <- withCurrentBuffer $ gets file
liftBase $ getFolder bufferPath
Just path -> return $ T.unpack path
let s = T.unpack $ replaceShorth... | 1,228 | getAppropriateFiles start s' = do
curDir <- case start of
Nothing -> do bufferPath <- withCurrentBuffer $ gets file
liftBase $ getFolder bufferPath
Just path -> return $ T.unpack path
let s = T.unpack $ replaceShorthands s'
sDir = if hasTrailingPathSeparator s then s else takeDirecto... | 1,154 | true | true | 0 | 15 | 383 | 358 | 173 | 185 | null | null |
nevrenato/Hets_Fork | CSL/ReduceProve.hs | gpl-2.0 | processCmdsIntern sess (x : xs) = do
(prooftree,newlemmas) <- procCmd sess x
(prooftrees,newlemmas2) <- processCmdsIntern sess xs
return (prooftree:prooftrees,newlemmas++newlemmas2) | 187 | processCmdsIntern sess (x : xs) = do
(prooftree,newlemmas) <- procCmd sess x
(prooftrees,newlemmas2) <- processCmdsIntern sess xs
return (prooftree:prooftrees,newlemmas++newlemmas2) | 187 | processCmdsIntern sess (x : xs) = do
(prooftree,newlemmas) <- procCmd sess x
(prooftrees,newlemmas2) <- processCmdsIntern sess xs
return (prooftree:prooftrees,newlemmas++newlemmas2) | 187 | false | false | 0 | 9 | 24 | 74 | 37 | 37 | null | null |
alphaHeavy/cabal | cabal-install/Distribution/Client/InstallSymlink.hs | bsd-3-clause | symlinkBinaries :: ConfigFlags
-> InstallFlags
-> InstallPlan
-> IO [(PackageIdentifier, String, FilePath)]
symlinkBinaries _ _ _ = return [] | 189 | symlinkBinaries :: ConfigFlags
-> InstallFlags
-> InstallPlan
-> IO [(PackageIdentifier, String, FilePath)]
symlinkBinaries _ _ _ = return [] | 189 | symlinkBinaries _ _ _ = return [] | 33 | false | true | 0 | 10 | 66 | 50 | 26 | 24 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/succ_5.hs | mit | srMyInt :: MyInt -> MyInt -> MyInt
srMyInt = primMulInt | 59 | srMyInt :: MyInt -> MyInt -> MyInt
srMyInt = primMulInt | 59 | srMyInt = primMulInt | 20 | false | true | 0 | 6 | 13 | 19 | 10 | 9 | null | null |
GaloisInc/haskell-tor | src/Tor/State/Routers.hs | bsd-3-clause | portMatches p (PortSpecRange p1 p2) = (p >= p1) && (p <= p2) | 60 | portMatches p (PortSpecRange p1 p2) = (p >= p1) && (p <= p2) | 60 | portMatches p (PortSpecRange p1 p2) = (p >= p1) && (p <= p2) | 60 | false | false | 0 | 7 | 12 | 39 | 19 | 20 | null | null |
sethfowler/pygmalion | src/Pygmalion/Index/Extension.hs | bsd-3-clause | cppExtensions = [".cc", ".cpp", ".C", ".hh", ".hpp", ".H"] | 58 | cppExtensions = [".cc", ".cpp", ".C", ".hh", ".hpp", ".H"] | 58 | cppExtensions = [".cc", ".cpp", ".C", ".hh", ".hpp", ".H"] | 58 | false | false | 0 | 5 | 7 | 24 | 15 | 9 | null | null |
agentm/project-m36 | src/lib/ProjectM36/DataTypes/NonEmptyList.hs | unlicense | nonEmptyListHead :: Atom -> Either AtomFunctionError Atom
nonEmptyListHead (ConstructedAtom "NECons" _ (val:_)) = pure val | 122 | nonEmptyListHead :: Atom -> Either AtomFunctionError Atom
nonEmptyListHead (ConstructedAtom "NECons" _ (val:_)) = pure val | 122 | nonEmptyListHead (ConstructedAtom "NECons" _ (val:_)) = pure val | 64 | false | true | 0 | 9 | 14 | 43 | 21 | 22 | null | null |
bennofs/cabal2nix | src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs | bsd-3-clause | libNixName "Xrender" = return "libXrender" | 69 | libNixName "Xrender" = return "libXrender" | 69 | libNixName "Xrender" = return "libXrender" | 69 | false | false | 0 | 5 | 31 | 13 | 5 | 8 | null | null |
mhuesch/scheme_compiler | src/L1Tox64/Compile.hs | bsd-3-clause | assembleInstruction (ICallRuntime r _) = return $ "call " ++ rName ++ "\n"
where
rName = case r of
Print -> "print"
Allocate -> "allocate"
ArrayError -> "print_error" | 221 | assembleInstruction (ICallRuntime r _) = return $ "call " ++ rName ++ "\n"
where
rName = case r of
Print -> "print"
Allocate -> "allocate"
ArrayError -> "print_error" | 221 | assembleInstruction (ICallRuntime r _) = return $ "call " ++ rName ++ "\n"
where
rName = case r of
Print -> "print"
Allocate -> "allocate"
ArrayError -> "print_error" | 221 | false | false | 0 | 7 | 82 | 59 | 29 | 30 | null | null |
jacekszymanski/wxHaskell | wx/src/Graphics/UI/WX/Menu.hs | lgpl-2.1 | menuGetTopMenu :: Menu a -> IO (Menu ())
menuGetTopMenu menu_
= do parent_ <- menuGetParent menu_
if (objectIsNull parent_)
then return (downcastMenu menu_)
else menuGetTopMenu parent_
-- Set all menu event handlers on a certain window (EvtHandler) | 274 | menuGetTopMenu :: Menu a -> IO (Menu ())
menuGetTopMenu menu_
= do parent_ <- menuGetParent menu_
if (objectIsNull parent_)
then return (downcastMenu menu_)
else menuGetTopMenu parent_
-- Set all menu event handlers on a certain window (EvtHandler) | 274 | menuGetTopMenu menu_
= do parent_ <- menuGetParent menu_
if (objectIsNull parent_)
then return (downcastMenu menu_)
else menuGetTopMenu parent_
-- Set all menu event handlers on a certain window (EvtHandler) | 233 | false | true | 0 | 10 | 62 | 72 | 34 | 38 | null | null |
bitemyapp/haskell-vcache | hsrc_lib/Database/VCache/Open.hs | bsd-2-clause | updWriteCt :: IORef WriteCt -> Writes -> IO ()
updWriteCt var w = modifyIORef' var $ \ wct ->
let frmCt = 1 + wct_frames wct in
let pvCt = wct_pvars wct + Map.size (write_data w) in
let synCt = wct_sync wct + L.length (write_sync w) in
WriteCt { wct_frames = frmCt, wct_pvars = pvCt, wct_sync = synCt } | 318 | updWriteCt :: IORef WriteCt -> Writes -> IO ()
updWriteCt var w = modifyIORef' var $ \ wct ->
let frmCt = 1 + wct_frames wct in
let pvCt = wct_pvars wct + Map.size (write_data w) in
let synCt = wct_sync wct + L.length (write_sync w) in
WriteCt { wct_frames = frmCt, wct_pvars = pvCt, wct_sync = synCt } | 318 | updWriteCt var w = modifyIORef' var $ \ wct ->
let frmCt = 1 + wct_frames wct in
let pvCt = wct_pvars wct + Map.size (write_data w) in
let synCt = wct_sync wct + L.length (write_sync w) in
WriteCt { wct_frames = frmCt, wct_pvars = pvCt, wct_sync = synCt } | 271 | false | true | 0 | 18 | 74 | 140 | 68 | 72 | null | null |
danstiner/transpiler | src/Batch/Lexer.hs | mit | keywords :: [Token] -> Parsec String st [Token]
keywords = mapM keyword | 71 | keywords :: [Token] -> Parsec String st [Token]
keywords = mapM keyword | 71 | keywords = mapM keyword | 23 | false | true | 0 | 8 | 11 | 36 | 17 | 19 | null | null |
ddssff/pretty-listlike | src/Text/PrettyPrint/Annotated/HughesPJ.hs | bsd-3-clause | -- | Render the @Doc@ to a String using the default @Style@ (see 'style').
render :: UString string => Doc a -> string
render = fullRender (mode style) (lineLength style) (ribbonsPerLine style)
txtPrinter mempty | 231 | render :: UString string => Doc a -> string
render = fullRender (mode style) (lineLength style) (ribbonsPerLine style)
txtPrinter mempty | 156 | render = fullRender (mode style) (lineLength style) (ribbonsPerLine style)
txtPrinter mempty | 112 | true | true | 0 | 8 | 53 | 64 | 28 | 36 | null | null |
ItsLastDay/academic_university_2016-2018 | subjects/Haskell/7/homework.hs | gpl-3.0 | myFoldr f z [] = z | 18 | myFoldr f z [] = z | 18 | myFoldr f z [] = z | 18 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/UserDataMAppings/Create.hs | mpl-2.0 | -- | V1 error format.
pldscsudmacXgafv :: Lens' ProjectsLocationsDataSetsConsentStoresUserDataMAppingsCreate (Maybe Xgafv)
pldscsudmacXgafv
= lens _pldscsudmacXgafv
(\ s a -> s{_pldscsudmacXgafv = a}) | 208 | pldscsudmacXgafv :: Lens' ProjectsLocationsDataSetsConsentStoresUserDataMAppingsCreate (Maybe Xgafv)
pldscsudmacXgafv
= lens _pldscsudmacXgafv
(\ s a -> s{_pldscsudmacXgafv = a}) | 186 | pldscsudmacXgafv
= lens _pldscsudmacXgafv
(\ s a -> s{_pldscsudmacXgafv = a}) | 85 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
mitchellwrosen/hive | hive/src/Hive/Game.hs | bsd-3-clause | gameConcerns player (GameActive game) =
player == gamePlayer game | 67 | gameConcerns player (GameActive game) =
player == gamePlayer game | 67 | gameConcerns player (GameActive game) =
player == gamePlayer game | 67 | false | false | 0 | 7 | 10 | 24 | 11 | 13 | null | null |
gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Misc.hs | bsd-3-clause | asyncMapM :: (a -> IO b) -> [a] -> IO [b]
asyncMapM f xs = mapM (async . f) xs >>= mapM wait | 92 | asyncMapM :: (a -> IO b) -> [a] -> IO [b]
asyncMapM f xs = mapM (async . f) xs >>= mapM wait | 92 | asyncMapM f xs = mapM (async . f) xs >>= mapM wait | 50 | false | true | 0 | 8 | 22 | 62 | 31 | 31 | null | null |
SamirTalwar/Smoke | src/app/Test/Smoke/App/Print.hs | mit | putRed :: Text -> Output ()
putRed = putColor Red | 49 | putRed :: Text -> Output ()
putRed = putColor Red | 49 | putRed = putColor Red | 21 | false | true | 0 | 8 | 9 | 28 | 12 | 16 | null | null |
abbradar/dnohs | src/Haskell/Desugar.hs | bsd-3-clause | desugarExpr (Ann pos (HApp exp1 exp2)) = intAnn pos <$> (App <$> desugarExpr exp1 <*> desugarExpr exp2) | 103 | desugarExpr (Ann pos (HApp exp1 exp2)) = intAnn pos <$> (App <$> desugarExpr exp1 <*> desugarExpr exp2) | 103 | desugarExpr (Ann pos (HApp exp1 exp2)) = intAnn pos <$> (App <$> desugarExpr exp1 <*> desugarExpr exp2) | 103 | false | false | 0 | 9 | 16 | 50 | 23 | 27 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Pipeline/ANFTransform.hs | bsd-3-clause | normalizeName γ (Var x)
= return $ Var (lookupWithDefaultVarEnv γ x x) | 72 | normalizeName γ (Var x)
= return $ Var (lookupWithDefaultVarEnv γ x x) | 72 | normalizeName γ (Var x)
= return $ Var (lookupWithDefaultVarEnv γ x x) | 72 | false | false | 0 | 8 | 13 | 34 | 16 | 18 | null | null |
ezyang/ghc | testsuite/tests/rename/should_fail/T9437.hs | bsd-3-clause | test :: Foo -> Foo
test foo = foo { .. } | 40 | test :: Foo -> Foo
test foo = foo { .. } | 40 | test foo = foo { .. } | 21 | false | true | 0 | 5 | 11 | 23 | 12 | 11 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/External.hs | gpl-2.0 | getViewer :: IO (Maybe String)
getViewer = Just `fmap` (getEnv "DARCS_PAGER" `catchall` getEnv "PAGER")
`catchall`
return Nothing | 153 | getViewer :: IO (Maybe String)
getViewer = Just `fmap` (getEnv "DARCS_PAGER" `catchall` getEnv "PAGER")
`catchall`
return Nothing | 153 | getViewer = Just `fmap` (getEnv "DARCS_PAGER" `catchall` getEnv "PAGER")
`catchall`
return Nothing | 122 | false | true | 2 | 8 | 40 | 63 | 29 | 34 | null | null |
d0kt0r0/Tidal | src/Sound/Tidal/old/Dirt.hs | gpl-3.0 | {- | Stut applies a type of delay to a pattern. It has three parameters,
which could be called depth, feedback and time. Depth is an integer
and the others floating point. This adds a bit of echo:
@
d1 $ stut 4 0.5 0.2 $ sound "bd sn"
@
The above results in 4 echos, each one 50% quieter than the last,
with 1/5th of a... | 546 | stut :: Pattern Integer -> Pattern Double -> Pattern Rational -> ParamPattern -> ParamPattern
stut = temporalParam3 _stut | 121 | stut = temporalParam3 _stut | 27 | true | true | 0 | 8 | 111 | 40 | 19 | 21 | null | null |
onponomarev/ganeti | src/Ganeti/Query/Query.hs | bsd-2-clause | queryFields (QueryFields (ItemTypeOpCode QRNetwork) fields) =
Ok $ fieldsExtractor Network.fieldsMap fields | 109 | queryFields (QueryFields (ItemTypeOpCode QRNetwork) fields) =
Ok $ fieldsExtractor Network.fieldsMap fields | 109 | queryFields (QueryFields (ItemTypeOpCode QRNetwork) fields) =
Ok $ fieldsExtractor Network.fieldsMap fields | 109 | false | false | 2 | 9 | 12 | 35 | 16 | 19 | null | null |
BartAdv/Idris-dev | src/Idris/IdeMode.hs | bsd-3-clause | sExpToString (IntegerAtom i) = printf "%d" i | 45 | sExpToString (IntegerAtom i) = printf "%d" i | 45 | sExpToString (IntegerAtom i) = printf "%d" i | 45 | false | false | 0 | 6 | 7 | 21 | 9 | 12 | null | null |
ducis/haAni | hs/common/Graphics/UI/GLUT/Objects.hs | gpl-2.0 | renderObject Wireframe (Cube h) = wireCube h | 57 | renderObject Wireframe (Cube h) = wireCube h | 57 | renderObject Wireframe (Cube h) = wireCube h | 57 | false | false | 0 | 7 | 19 | 20 | 9 | 11 | null | null |
AlexanderPankiv/ghc | compiler/cmm/PprC.hs | bsd-3-clause | is_cishCC CApiConv = True | 29 | is_cishCC CApiConv = True | 29 | is_cishCC CApiConv = True | 29 | false | false | 1 | 5 | 7 | 13 | 4 | 9 | null | null |
elieux/ghc | compiler/utils/Outputable.hs | bsd-3-clause | qualPackage :: PprStyle -> QueryQualifyPackage
qualPackage (PprUser q _) m = queryQualifyPackage q m | 101 | qualPackage :: PprStyle -> QueryQualifyPackage
qualPackage (PprUser q _) m = queryQualifyPackage q m | 101 | qualPackage (PprUser q _) m = queryQualifyPackage q m | 54 | false | true | 0 | 7 | 14 | 33 | 16 | 17 | null | null |
ian-ross/language-c | src/Language/C/Analysis/TravMonad.hs | bsd-3-clause | -- * inserting declarations
-- | create a reference to a struct\/union\/enum
--
-- This currently depends on the fact the structs are tagged with unique names.
-- We could use the name generation of TravMonad as well, which might be the better
-- choice when dealing with autogenerated code.
createSUERef :: (MonadCErro... | 440 | createSUERef :: (MonadCError m, MonadSymtab m) => NodeInfo -> Maybe Ident -> m SUERef
createSUERef _node_info (Just ident) = return$ NamedRef ident | 147 | createSUERef _node_info (Just ident) = return$ NamedRef ident | 61 | true | true | 0 | 8 | 72 | 69 | 35 | 34 | null | null |
spechub/Hets | Comorphisms/ExtModal2HasCASL.hs | gpl-2.0 | xZeroAndP :: [VarDecl]
xZeroAndP = [hcVarDecl (genNumVar "x" 0) worldTy, pVar nWorld] | 85 | xZeroAndP :: [VarDecl]
xZeroAndP = [hcVarDecl (genNumVar "x" 0) worldTy, pVar nWorld] | 85 | xZeroAndP = [hcVarDecl (genNumVar "x" 0) worldTy, pVar nWorld] | 62 | false | true | 0 | 8 | 11 | 36 | 19 | 17 | null | null |
bitemyapp/text-pipes | Pipes/Text.hs | bsd-3-clause | -- | Splits a 'Producer' after the given number of characters
splitAt
:: (Monad m, Integral n)
=> n
-> Lens' (Producer Text m r)
(Producer Text m (Producer Text m r))
splitAt n0 k p0 = fmap join (k (go n0 p0))
where
go 0 p = return p
go n p = do
x <- lift (next p)
case... | 789 | splitAt
:: (Monad m, Integral n)
=> n
-> Lens' (Producer Text m r)
(Producer Text m (Producer Text m r))
splitAt n0 k p0 = fmap join (k (go n0 p0))
where
go 0 p = return p
go n p = do
x <- lift (next p)
case x of
Left r -> return (return r)
... | 727 | splitAt n0 k p0 = fmap join (k (go n0 p0))
where
go 0 p = return p
go n p = do
x <- lift (next p)
case x of
Left r -> return (return r)
Right (txt, p') -> do
let len = fromIntegral (T.length txt)
if (len <= n)
... | 597 | true | true | 1 | 21 | 385 | 283 | 135 | 148 | null | null |
bixuanzju/fcore | lib/archive/CoreNew.hs | bsd-2-clause | coreTypeToNew (C.Product ts) = Product (map coreTypeToNew ts) | 61 | coreTypeToNew (C.Product ts) = Product (map coreTypeToNew ts) | 61 | coreTypeToNew (C.Product ts) = Product (map coreTypeToNew ts) | 61 | false | false | 0 | 7 | 7 | 29 | 13 | 16 | null | null |
graninas/Haskell-Algorithms | Tests/TransitionGraph/transition-graph/src/TransitionGraph/Runtime.hs | gpl-3.0 | makeTransition'
:: (Monad m, Monad lang)
=> Runtime lang m
-> Bool
-> i
-> GraphF lang i o b
-> m TransitionResult
makeTransition' runtime backable i3 g3 = do
let f3 = getLang i3 g3
transitionResult <- makeTransition runtime f3 g3
case transitionResult of
Done -> pure Done
FallbackRer... | 477 | makeTransition'
:: (Monad m, Monad lang)
=> Runtime lang m
-> Bool
-> i
-> GraphF lang i o b
-> m TransitionResult
makeTransition' runtime backable i3 g3 = do
let f3 = getLang i3 g3
transitionResult <- makeTransition runtime f3 g3
case transitionResult of
Done -> pure Done
FallbackRer... | 477 | makeTransition' runtime backable i3 g3 = do
let f3 = getLang i3 g3
transitionResult <- makeTransition runtime f3 g3
case transitionResult of
Done -> pure Done
FallbackRerun -> makeTransition' runtime backable i3 g3
Fallback ->
if backable
then pure FallbackRerun
else pu... | 350 | false | true | 0 | 12 | 131 | 153 | 71 | 82 | null | null |
benekastah/tj | lib/TJ/TypeChecker.hs | mit | opType Concat = functionType [stringType, stringType] stringType | 64 | opType Concat = functionType [stringType, stringType] stringType | 64 | opType Concat = functionType [stringType, stringType] stringType | 64 | false | false | 0 | 6 | 6 | 20 | 10 | 10 | null | null |
eklavya/Idris-dev | src/Idris/Coverage.hs | bsd-3-clause | validCoverageCase ctxt (ElaboratingArg _ _ _ e) = validCoverageCase ctxt e | 74 | validCoverageCase ctxt (ElaboratingArg _ _ _ e) = validCoverageCase ctxt e | 74 | validCoverageCase ctxt (ElaboratingArg _ _ _ e) = validCoverageCase ctxt e | 74 | false | false | 0 | 7 | 10 | 28 | 13 | 15 | null | null |
mvr/cf | src/Math/ContinuedFraction.hs | mit | boundHom :: (Ord a, Num a, HasFractionField a, Ord (FractionField a)) => Hom a -> Interval (FractionField a) -> Interval (FractionField a)
boundHom h (Interval i s _) | d > 0 = interval i' s'
| d < 0 = interval s' i'
| otherwise = Interval c c True
where d = det... | 398 | boundHom :: (Ord a, Num a, HasFractionField a, Ord (FractionField a)) => Hom a -> Interval (FractionField a) -> Interval (FractionField a)
boundHom h (Interval i s _) | d > 0 = interval i' s'
| d < 0 = interval s' i'
| otherwise = Interval c c True
where d = det... | 398 | boundHom h (Interval i s _) | d > 0 = interval i' s'
| d < 0 = interval s' i'
| otherwise = Interval c c True
where d = det h
i' = homEval h i
s' = homEval h s
c = constantFor h | 259 | false | true | 0 | 10 | 151 | 176 | 83 | 93 | null | null |
mariefarrell/Hets | CspCASLProver/CspProverConsts.hs | gpl-2.0 | cspProver_general_parallelAltOpPrio :: Int
cspProver_general_parallelAltOpPrio = 76 | 83 | cspProver_general_parallelAltOpPrio :: Int
cspProver_general_parallelAltOpPrio = 76 | 83 | cspProver_general_parallelAltOpPrio = 76 | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
mettekou/ghc | compiler/cmm/CmmPipeline.hs | bsd-3-clause | cpsTop hsc_env proc =
do
----------- Control-flow optimisations ----------------------------------
-- The first round of control-flow optimisation speeds up the
-- later passes by removing lots of empty blocks, so we do it
-- even when optimisation isn't turned on.
--
CmmP... | 10,344 | cpsTop hsc_env proc =
do
----------- Control-flow optimisations ----------------------------------
-- The first round of control-flow optimisation speeds up the
-- later passes by removing lots of empty blocks, so we do it
-- even when optimisation isn't turned on.
--
CmmP... | 10,344 | cpsTop hsc_env proc =
do
----------- Control-flow optimisations ----------------------------------
-- The first round of control-flow optimisation speeds up the
-- later passes by removing lots of empty blocks, so we do it
-- even when optimisation isn't turned on.
--
CmmP... | 10,344 | false | false | 6 | 16 | 3,143 | 937 | 525 | 412 | null | null |
sgraf812/feed-gipeda | tests/Unit.hs | bsd-3-clause | tests :: TestTree
tests = testGroup "Unit tests"
[ Unit.CommitQueue.tests
] | 79 | tests :: TestTree
tests = testGroup "Unit tests"
[ Unit.CommitQueue.tests
] | 79 | tests = testGroup "Unit tests"
[ Unit.CommitQueue.tests
] | 61 | false | true | 0 | 6 | 14 | 23 | 12 | 11 | null | null |
72636c/correct-fizz-buzz | test/FizzBuzzSpec.hs | mit | fizzBuzzSpec :: Spec
fizzBuzzSpec = do
describe "fizzBuzz" $ do
it "handles a count of 0" $ run 0 `shouldBe` []
it "handles a count of 1" $ run 1 `shouldBe` ["1"]
it "handles a count of 5" $ run 5 `shouldBe` ["Buzz", "4", "Fizz", "2", "1"] | 253 | fizzBuzzSpec :: Spec
fizzBuzzSpec = do
describe "fizzBuzz" $ do
it "handles a count of 0" $ run 0 `shouldBe` []
it "handles a count of 1" $ run 1 `shouldBe` ["1"]
it "handles a count of 5" $ run 5 `shouldBe` ["Buzz", "4", "Fizz", "2", "1"] | 253 | fizzBuzzSpec = do
describe "fizzBuzz" $ do
it "handles a count of 0" $ run 0 `shouldBe` []
it "handles a count of 1" $ run 1 `shouldBe` ["1"]
it "handles a count of 5" $ run 5 `shouldBe` ["Buzz", "4", "Fizz", "2", "1"] | 232 | false | true | 0 | 12 | 60 | 98 | 50 | 48 | null | null |
tjakway/ghcjvm | compiler/deSugar/DsCCall.hs | bsd-3-clause | maybeNarrow :: DynFlags -> TyCon -> (CoreExpr -> CoreExpr)
maybeNarrow dflags tycon
| tycon `hasKey` int8TyConKey = \e -> App (Var (mkPrimOpId Narrow8IntOp)) e
| tycon `hasKey` int16TyConKey = \e -> App (Var (mkPrimOpId Narrow16IntOp)) e
| tycon `hasKey` int32TyConKey
&& wORD_SIZE dflags > 4 =... | 691 | maybeNarrow :: DynFlags -> TyCon -> (CoreExpr -> CoreExpr)
maybeNarrow dflags tycon
| tycon `hasKey` int8TyConKey = \e -> App (Var (mkPrimOpId Narrow8IntOp)) e
| tycon `hasKey` int16TyConKey = \e -> App (Var (mkPrimOpId Narrow16IntOp)) e
| tycon `hasKey` int32TyConKey
&& wORD_SIZE dflags > 4 =... | 691 | maybeNarrow dflags tycon
| tycon `hasKey` int8TyConKey = \e -> App (Var (mkPrimOpId Narrow8IntOp)) e
| tycon `hasKey` int16TyConKey = \e -> App (Var (mkPrimOpId Narrow16IntOp)) e
| tycon `hasKey` int32TyConKey
&& wORD_SIZE dflags > 4 = \e -> App (Var (mkPrimOpId Narrow32IntOp)) e
| tycon `h... | 632 | false | true | 4 | 11 | 170 | 284 | 144 | 140 | null | null |
snoyberg/ghc | compiler/main/HscMain.hs | bsd-3-clause | hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO ()
hscMaybeWriteIface dflags iface changed summary =
let force_write_interface = gopt Opt_WriteInterface dflags
write_interface = case hscTarget dflags of
HscNothing -> False
H... | 507 | hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO ()
hscMaybeWriteIface dflags iface changed summary =
let force_write_interface = gopt Opt_WriteInterface dflags
write_interface = case hscTarget dflags of
HscNothing -> False
H... | 507 | hscMaybeWriteIface dflags iface changed summary =
let force_write_interface = gopt Opt_WriteInterface dflags
write_interface = case hscTarget dflags of
HscNothing -> False
HscInterpreted -> False
_ -> Tru... | 433 | false | true | 0 | 11 | 181 | 110 | 53 | 57 | null | null |
angerman/data-bitcode-edsl | src/EDSL/Monad/Values.hs | bsd-3-clause | extValue_ :: HasCallStack => Ty -> String -> Value -> Symbol
extValue_ t name = mkNamed t name | 94 | extValue_ :: HasCallStack => Ty -> String -> Value -> Symbol
extValue_ t name = mkNamed t name | 94 | extValue_ t name = mkNamed t name | 33 | false | true | 0 | 10 | 17 | 44 | 19 | 25 | null | null |
spockwangs/scheme.in.haskell | list6.2.hs | unlicense | isNumber _ = return $ Bool False | 32 | isNumber _ = return $ Bool False | 32 | isNumber _ = return $ Bool False | 32 | false | false | 2 | 5 | 6 | 18 | 7 | 11 | null | null |
mettekou/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | mkStableNamePrimTy :: Type -> Type
mkStableNamePrimTy ty = TyConApp stableNamePrimTyCon [ty] | 92 | mkStableNamePrimTy :: Type -> Type
mkStableNamePrimTy ty = TyConApp stableNamePrimTyCon [ty] | 92 | mkStableNamePrimTy ty = TyConApp stableNamePrimTyCon [ty] | 57 | false | true | 0 | 6 | 10 | 26 | 13 | 13 | null | null |
anton-dessiatov/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | tidyTopPair :: DynFlags
-> Bool -- show unfolding
-> TidyEnv -- The TidyEnv is used to tidy the IdInfo
-- It is knot-tied: don't look at it!
-> CafInfo
-> Name -- New name
-> (Id, CoreExpr) -- Binder and RHS before tidyi... | 1,696 | tidyTopPair :: DynFlags
-> Bool -- show unfolding
-> TidyEnv -- The TidyEnv is used to tidy the IdInfo
-- It is knot-tied: don't look at it!
-> CafInfo
-> Name -- New name
-> (Id, CoreExpr) -- Binder and RHS before tidyi... | 1,398 | tidyTopPair dflags show_unfold rhs_tidy_env caf_info name' (bndr, rhs)
= (bndr1, rhs1)
where
bndr1 = mkGlobalId details name' ty' idinfo'
details = idDetails bndr -- Preserve the IdDetails
ty' = tidyTopType (idType bndr)
rhs1 = tidyExpr rhs_tidy_env rhs
idinfo' = tidyTopIdInfo df... | 1,045 | true | true | 3 | 13 | 509 | 184 | 102 | 82 | null | null |
bhamrick/fuzzygrep | Intable.hs | mit | null (IndirectSet m) = M.null m | 31 | null (IndirectSet m) = M.null m | 31 | null (IndirectSet m) = M.null m | 31 | false | false | 0 | 7 | 5 | 20 | 9 | 11 | null | null |
bos/text | tests/Tests/Properties/Text.hs | bsd-2-clause | splitOn :: (Eq a) => [a] -> [a] -> [[a]]
splitOn pat src0
| l == 0 = error "splitOn: empty"
| otherwise = go src0
where
l = length pat
go src = search 0 src
where
search _ [] = [src]
search !n s@(_:s')
| pat `L.isPrefixOf` s = take n src : go (drop l... | 376 | splitOn :: (Eq a) => [a] -> [a] -> [[a]]
splitOn pat src0
| l == 0 = error "splitOn: empty"
| otherwise = go src0
where
l = length pat
go src = search 0 src
where
search _ [] = [src]
search !n s@(_:s')
| pat `L.isPrefixOf` s = take n src : go (drop l... | 376 | splitOn pat src0
| l == 0 = error "splitOn: empty"
| otherwise = go src0
where
l = length pat
go src = search 0 src
where
search _ [] = [src]
search !n s@(_:s')
| pat `L.isPrefixOf` s = take n src : go (drop l s)
| otherwise = ... | 335 | false | true | 1 | 11 | 157 | 186 | 92 | 94 | null | null |
andrewpetrovic/pandoc | src/Text/Pandoc/Writers/RST.hs | gpl-2.0 | inlineToRST (RawInline f x)
| f == "rst" = return $ text x
| f == "latex" || f == "tex" = do
modify $ \st -> st{ stHasRawTeX = True }
return $ ":raw-latex:`" <> text x <> "`"
| otherwise = return empty | 220 | inlineToRST (RawInline f x)
| f == "rst" = return $ text x
| f == "latex" || f == "tex" = do
modify $ \st -> st{ stHasRawTeX = True }
return $ ":raw-latex:`" <> text x <> "`"
| otherwise = return empty | 220 | inlineToRST (RawInline f x)
| f == "rst" = return $ text x
| f == "latex" || f == "tex" = do
modify $ \st -> st{ stHasRawTeX = True }
return $ ":raw-latex:`" <> text x <> "`"
| otherwise = return empty | 220 | false | false | 1 | 12 | 63 | 106 | 50 | 56 | null | null |
acowley/ghc | compiler/utils/Pretty.hs | bsd-3-clause | integer n = text (show n) | 26 | integer n = text (show n) | 26 | integer n = text (show n) | 26 | false | false | 0 | 7 | 6 | 18 | 8 | 10 | null | null |
blanu/arbre-go | Arbre/NewNative.hs | gpl-2.0 | string_eq params = stringError params | 37 | string_eq params = stringError params | 37 | string_eq params = stringError params | 37 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
joe9/barrelfish | tools/flounder/UMPCommon.hs | mit | ------------------------------------------------------------------------
-- Language mapping: C identifier names
------------------------------------------------------------------------
ump_ifscope :: UMPParams -> String -> String -> String
ump_ifscope p ifn s = ifscope ifn ((ump_drv p) ++ "_" ++ s) | 301 | ump_ifscope :: UMPParams -> String -> String -> String
ump_ifscope p ifn s = ifscope ifn ((ump_drv p) ++ "_" ++ s) | 114 | ump_ifscope p ifn s = ifscope ifn ((ump_drv p) ++ "_" ++ s) | 59 | true | true | 0 | 10 | 30 | 60 | 30 | 30 | null | null |
tjakway/ghcjvm | compiler/basicTypes/Lexeme.hs | bsd-3-clause | -- | All punctuation that cannot appear in symbols. See $special in Lexer.x.
specialSymbols :: [Char]
specialSymbols = "(),;[]`{}" | 130 | specialSymbols :: [Char]
specialSymbols = "(),;[]`{}" | 53 | specialSymbols = "(),;[]`{}" | 28 | true | true | 0 | 5 | 18 | 15 | 9 | 6 | null | null |
OliverFlecke/Funci | src/Lexer.hs | bsd-3-clause | lexer ('-':cs) = addToken (Operator Sub) cs | 43 | lexer ('-':cs) = addToken (Operator Sub) cs | 43 | lexer ('-':cs) = addToken (Operator Sub) cs | 43 | false | false | 0 | 7 | 6 | 27 | 13 | 14 | null | null |
naushadh/persistent | persistent-sqlite/Database/Persist/Sqlite.hs | mit | showSqlType (SqlNumeric precision scale) = T.concat [ "NUMERIC(", T.pack (show precision), ",", T.pack (show scale), ")" ] | 122 | showSqlType (SqlNumeric precision scale) = T.concat [ "NUMERIC(", T.pack (show precision), ",", T.pack (show scale), ")" ] | 122 | showSqlType (SqlNumeric precision scale) = T.concat [ "NUMERIC(", T.pack (show precision), ",", T.pack (show scale), ")" ] | 122 | false | false | 0 | 9 | 16 | 59 | 30 | 29 | null | null |
Javran/handy | src/Control/Handy.hs | mit | -- | compare the length of this list with a number
listLengthCmp :: [a] -> Int -> Ordering
listLengthCmp = atLength atLen atEnd
where
atEnd 0 = EQ
atEnd x
| x > 0 = LT -- not yet seen 'n' elts, so list length is < n.
| otherwise = GT
atLen [] = EQ
atLen _ = GT
-- | the length of two l... | 335 | listLengthCmp :: [a] -> Int -> Ordering
listLengthCmp = atLength atLen atEnd
where
atEnd 0 = EQ
atEnd x
| x > 0 = LT -- not yet seen 'n' elts, so list length is < n.
| otherwise = GT
atLen [] = EQ
atLen _ = GT
-- | the length of two lists are equal? | 284 | listLengthCmp = atLength atLen atEnd
where
atEnd 0 = EQ
atEnd x
| x > 0 = LT -- not yet seen 'n' elts, so list length is < n.
| otherwise = GT
atLen [] = EQ
atLen _ = GT
-- | the length of two lists are equal? | 244 | true | true | 2 | 8 | 103 | 106 | 46 | 60 | null | null |
zakharvoit/haskell-homework | Base.hs | gpl-3.0 | subInt32 = (P.-) | 16 | subInt32 = (P.-) | 16 | subInt32 = (P.-) | 16 | false | false | 1 | 6 | 2 | 14 | 6 | 8 | null | null |
jystic/hsimport | lib/HsImport/Parse.hs | bsd-3-clause | parseFileContents :: String -> HS.ParseResult HS.Module
parseFileContents = HS.parseFileContentsWithMode parseMode
where
parseMode = HS.defaultParseMode { HS.fixities = Just [] } | 187 | parseFileContents :: String -> HS.ParseResult HS.Module
parseFileContents = HS.parseFileContentsWithMode parseMode
where
parseMode = HS.defaultParseMode { HS.fixities = Just [] } | 187 | parseFileContents = HS.parseFileContentsWithMode parseMode
where
parseMode = HS.defaultParseMode { HS.fixities = Just [] } | 131 | false | true | 0 | 8 | 28 | 52 | 26 | 26 | null | null |
fehu/hgt | space-independent/src/U/Exec/Mutable/Impl.hs | mit | applyStellarInteractions sys = calculateStellarInteractions f sys
where f p = uncurry (upd sys) p >> return p | 133 | applyStellarInteractions sys = calculateStellarInteractions f sys
where f p = uncurry (upd sys) p >> return p | 133 | applyStellarInteractions sys = calculateStellarInteractions f sys
where f p = uncurry (upd sys) p >> return p | 133 | false | false | 0 | 10 | 40 | 42 | 19 | 23 | null | null |
BartAdv/idris-cil | src/IRTS/CodegenCil.hs | bsd-3-clause | loadNothing :: MethodDecl
loadNothing = ldsfld Cil.Object "" "Nothing" "Default" | 80 | loadNothing :: MethodDecl
loadNothing = ldsfld Cil.Object "" "Nothing" "Default" | 80 | loadNothing = ldsfld Cil.Object "" "Nothing" "Default" | 54 | false | true | 0 | 6 | 9 | 29 | 12 | 17 | null | null |
xmonad/xmonad | src/XMonad/Operations.hs | bsd-3-clause | hide :: Window -> X ()
hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do
cMask <- asks $ clientMask . config
io $ do selectInput d w (cMask .&. complement structureNotifyMask)
unmapWindow d w
selectInput d w cMask
setWMState w iconicState
-- this part is key: w... | 668 | hide :: Window -> X ()
hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do
cMask <- asks $ clientMask . config
io $ do selectInput d w (cMask .&. complement structureNotifyMask)
unmapWindow d w
selectInput d w cMask
setWMState w iconicState
-- this part is key: w... | 668 | hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do
cMask <- asks $ clientMask . config
io $ do selectInput d w (cMask .&. complement structureNotifyMask)
unmapWindow d w
selectInput d w cMask
setWMState w iconicState
-- this part is key: we increment the waiting... | 645 | false | true | 0 | 17 | 183 | 194 | 94 | 100 | null | null |
fmthoma/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCtO PatOrigin = ptext (sLit "a pattern") | 55 | pprCtO PatOrigin = ptext (sLit "a pattern") | 55 | pprCtO PatOrigin = ptext (sLit "a pattern") | 55 | false | false | 0 | 7 | 18 | 19 | 8 | 11 | null | null |
greydot/persistent | persistent-template/Database/Persist/TH.hs | mit | mkUniqueKeys :: EntityDef -> Q Dec
mkUniqueKeys def | entitySum def =
return $ FunD 'persistUniqueKeys [normalClause [WildP] (ListE [])] | 140 | mkUniqueKeys :: EntityDef -> Q Dec
mkUniqueKeys def | entitySum def =
return $ FunD 'persistUniqueKeys [normalClause [WildP] (ListE [])] | 140 | mkUniqueKeys def | entitySum def =
return $ FunD 'persistUniqueKeys [normalClause [WildP] (ListE [])] | 105 | false | true | 0 | 12 | 23 | 59 | 28 | 31 | null | null |
arnizamani/SeqSolver | Amath/Expr/AbsExp.hs | gpl-2.0 | comp _ (ENeg _) = GT | 20 | comp _ (ENeg _) = GT | 20 | comp _ (ENeg _) = GT | 20 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
sdiehl/ghc | compiler/simplCore/CSE.hs | bsd-3-clause | combineAlts _ alts = alts | 25 | combineAlts _ alts = alts | 25 | combineAlts _ alts = alts | 25 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
liuyang1/H99 | 1_to_20.hs | gpl-2.0 | repli [] _ = [] | 15 | repli [] _ = [] | 15 | repli [] _ = [] | 15 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
gcampax/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | pprConDeclFields :: OutputableBndr name => [LConDeclField name] -> SDoc
pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields)))
where
ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty,
cd_fld_doc = doc }))
= ppr_names ns <+> dcolon <+> ... | 970 | pprConDeclFields :: OutputableBndr name => [LConDeclField name] -> SDoc
pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields)))
where
ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty,
cd_fld_doc = doc }))
= ppr_names ns <+> dcolon <+> ... | 970 | pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields)))
where
ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty,
cd_fld_doc = doc }))
= ppr_names ns <+> dcolon <+> ppr ty <+> ppr_mbDoc doc
ppr_names [n] = ppr n
ppr_names ns = se... | 898 | false | true | 1 | 11 | 206 | 171 | 83 | 88 | null | null |
mdsteele/fallback | src/Fallback/Scenario/Compile.hs | gpl-3.0 | getScriptedBattle :: ScenarioTriggers -> AreaTag -> BattleId -> ScriptedBattle
getScriptedBattle scenario areaTag battleId =
fromMaybe (error ("getScriptedBattle: no such battle: " ++ show battleId)) $
Map.lookup battleId $ aspecScriptedBattles $ TM.get areaTag $
scenarioAreas scenario | 292 | getScriptedBattle :: ScenarioTriggers -> AreaTag -> BattleId -> ScriptedBattle
getScriptedBattle scenario areaTag battleId =
fromMaybe (error ("getScriptedBattle: no such battle: " ++ show battleId)) $
Map.lookup battleId $ aspecScriptedBattles $ TM.get areaTag $
scenarioAreas scenario | 292 | getScriptedBattle scenario areaTag battleId =
fromMaybe (error ("getScriptedBattle: no such battle: " ++ show battleId)) $
Map.lookup battleId $ aspecScriptedBattles $ TM.get areaTag $
scenarioAreas scenario | 213 | false | true | 0 | 14 | 40 | 78 | 37 | 41 | null | null |
ahmadsalim/p3-tool | p3-tool/TVL/Pretty.hs | gpl-3.0 | prettyAttributeDecl (AttrComplex tn vn sattrs) = text tn <+> text vn <+> (vcat $ map (\(tn', body) -> text tn' <+> prettyAttributeBody body) sattrs) | 148 | prettyAttributeDecl (AttrComplex tn vn sattrs) = text tn <+> text vn <+> (vcat $ map (\(tn', body) -> text tn' <+> prettyAttributeBody body) sattrs) | 148 | prettyAttributeDecl (AttrComplex tn vn sattrs) = text tn <+> text vn <+> (vcat $ map (\(tn', body) -> text tn' <+> prettyAttributeBody body) sattrs) | 148 | false | false | 0 | 12 | 23 | 69 | 34 | 35 | null | null |
bruno-cadorette/Baeta-Compiler | src/TypeInference/Base.hs | gpl-3.0 | createArrow :: Monotype -> Monotype -> Monotype
createArrow = Arrow | 67 | createArrow :: Monotype -> Monotype -> Monotype
createArrow = Arrow | 67 | createArrow = Arrow | 19 | false | true | 0 | 6 | 9 | 19 | 10 | 9 | null | null |
jgm/blaze-html | benchmarks/HtmlBenchmarks.hs | bsd-3-clause | wideTreeData :: [String]
wideTreeData = take 5000 $
cycle ["λf.(λx.fxx)(λx.fxx)", "These old days", "Foobar", "lol", "x ∈ A"] | 129 | wideTreeData :: [String]
wideTreeData = take 5000 $
cycle ["λf.(λx.fxx)(λx.fxx)", "These old days", "Foobar", "lol", "x ∈ A"] | 129 | wideTreeData = take 5000 $
cycle ["λf.(λx.fxx)(λx.fxx)", "These old days", "Foobar", "lol", "x ∈ A"] | 104 | false | true | 0 | 7 | 21 | 39 | 22 | 17 | null | null |
nevrenato/Hets_Fork | QBF/AS_BASIC_QBF.hs | gpl-2.0 | printPredItem :: PREDITEM -> Doc
printPredItem (PredItem xs _) = fsep $ map pretty xs | 85 | printPredItem :: PREDITEM -> Doc
printPredItem (PredItem xs _) = fsep $ map pretty xs | 85 | printPredItem (PredItem xs _) = fsep $ map pretty xs | 52 | false | true | 0 | 9 | 14 | 40 | 18 | 22 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateLayer.hs | mpl-2.0 | -- | A 'VolumeConfigurations' object that describes the layer's Amazon EBS volumes.
clVolumeConfigurations :: Lens' CreateLayer [VolumeConfiguration]
clVolumeConfigurations =
lens _clVolumeConfigurations (\s a -> s { _clVolumeConfigurations = a })
. _List | 267 | clVolumeConfigurations :: Lens' CreateLayer [VolumeConfiguration]
clVolumeConfigurations =
lens _clVolumeConfigurations (\s a -> s { _clVolumeConfigurations = a })
. _List | 183 | clVolumeConfigurations =
lens _clVolumeConfigurations (\s a -> s { _clVolumeConfigurations = a })
. _List | 117 | true | true | 0 | 10 | 43 | 47 | 26 | 21 | null | null |
tonyday567/web-play | src/Web/Play/Server.hs | mit | runPlayWrapped
:: (ToMessage a, FromJSON b, ToJSON b, Show b, Eq b)
=> Producer b IO ()
-> a
-> PlayState
-> IO (SWrap PlayState (Out b) (In b))
runPlayWrapped prod page'' p = do
aRun <- async $ runMVCWrapped p (mainPipe cat) (vcPlay p defaultSocketConfig prod (return ()))
aServe <- async $
serve $ ok... | 388 | runPlayWrapped
:: (ToMessage a, FromJSON b, ToJSON b, Show b, Eq b)
=> Producer b IO ()
-> a
-> PlayState
-> IO (SWrap PlayState (Out b) (In b))
runPlayWrapped prod page'' p = do
aRun <- async $ runMVCWrapped p (mainPipe cat) (vcPlay p defaultSocketConfig prod (return ()))
aServe <- async $
serve $ ok... | 388 | runPlayWrapped prod page'' p = do
aRun <- async $ runMVCWrapped p (mainPipe cat) (vcPlay p defaultSocketConfig prod (return ()))
aServe <- async $
serve $ ok $ toResponse page''
res <- wait aRun
cancel aServe
return res | 233 | false | true | 0 | 15 | 90 | 190 | 88 | 102 | null | null |
QuickChick/Luck | luck/src/Common/Types.hs | mit | ppTy :: (PP tc, PP tv) => Int -> TcType tc tv -> Doc
ppTy _ (TcVar v) = pp v | 76 | ppTy :: (PP tc, PP tv) => Int -> TcType tc tv -> Doc
ppTy _ (TcVar v) = pp v | 76 | ppTy _ (TcVar v) = pp v | 23 | false | true | 0 | 11 | 20 | 59 | 27 | 32 | null | null |
alanz/htelehash | runtests.hs | bsd-3-clause | case_near_to2 :: Assertion
case_near_to2 = do
-- Check that a line exists for the given ipp. If not, should get an undefined result
let
line2 = mkLine ipp2 (TOD 1000 999) 2345
st = (Switch {swH = Nothing
, swSeeds = []
, swSeedsIndex = (Set.fromList [])
, s... | 903 | case_near_to2 :: Assertion
case_near_to2 = do
-- Check that a line exists for the given ipp. If not, should get an undefined result
let
line2 = mkLine ipp2 (TOD 1000 999) 2345
st = (Switch {swH = Nothing
, swSeeds = []
, swSeedsIndex = (Set.fromList [])
, s... | 903 | case_near_to2 = do
-- Check that a line exists for the given ipp. If not, should get an undefined result
let
line2 = mkLine ipp2 (TOD 1000 999) 2345
st = (Switch {swH = Nothing
, swSeeds = []
, swSeedsIndex = (Set.fromList [])
, swConnected = False
... | 876 | false | true | 0 | 17 | 345 | 216 | 117 | 99 | null | null |
prl-tokyo/bigul-configuration-adaptation | Transformations/src/BiFlux/DTD/TypeDef.hs | mit | mkTypeable modname (EnumDef n _) = mkTypeable' modname n | 56 | mkTypeable modname (EnumDef n _) = mkTypeable' modname n | 56 | mkTypeable modname (EnumDef n _) = mkTypeable' modname n | 56 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
ihc/futhark | src/Futhark/Representation/ExplicitMemory/IndexFunction.hs | isc | linearWithOffset (Reshape ixfun _) element_size =
linearWithOffset ixfun element_size | 86 | linearWithOffset (Reshape ixfun _) element_size =
linearWithOffset ixfun element_size | 86 | linearWithOffset (Reshape ixfun _) element_size =
linearWithOffset ixfun element_size | 86 | false | false | 1 | 7 | 9 | 30 | 11 | 19 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Parser/Maple.hs | bsd-3-clause | maple2Patterns (InertArgs Func [InertName "PEt" , InertArgs ExpSeq [InertArgs Func [InertName "PKonst", InertArgs ExpSeq [x]], e]]) = maple2Pattern x : maple2Patterns e | 168 | maple2Patterns (InertArgs Func [InertName "PEt" , InertArgs ExpSeq [InertArgs Func [InertName "PKonst", InertArgs ExpSeq [x]], e]]) = maple2Pattern x : maple2Patterns e | 168 | maple2Patterns (InertArgs Func [InertName "PEt" , InertArgs ExpSeq [InertArgs Func [InertName "PKonst", InertArgs ExpSeq [x]], e]]) = maple2Pattern x : maple2Patterns e | 168 | false | false | 0 | 13 | 21 | 70 | 34 | 36 | null | null |
frenetic-lang/netcore-1.0 | src/Frenetic/NetCore/Reduce.hs | bsd-3-clause | atomKV (Not (NwProto x)) = (FNwProto, CFS.excludes (fromIntegral x)) | 68 | atomKV (Not (NwProto x)) = (FNwProto, CFS.excludes (fromIntegral x)) | 68 | atomKV (Not (NwProto x)) = (FNwProto, CFS.excludes (fromIntegral x)) | 68 | false | false | 0 | 9 | 8 | 38 | 19 | 19 | null | null |
m15k/hs-dtd-text | Data/XML/DTD/Render.hs | bsd-3-clause | -- | A 'Builder' for a comment. The comment text cannot be null,
-- cannot contain two consecutive '-', and cannot end in '-'.
buildComment :: Text -> Builder
buildComment cmt = pbracket $ fromText "--" <> fromText cmt <> fromText "--" | 235 | buildComment :: Text -> Builder
buildComment cmt = pbracket $ fromText "--" <> fromText cmt <> fromText "--" | 108 | buildComment cmt = pbracket $ fromText "--" <> fromText cmt <> fromText "--" | 76 | true | true | 0 | 8 | 41 | 41 | 20 | 21 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Monobasic.hs | gpl-2.0 | regex_'5cb'28Get'29'28'5b'5cs'5d'7c'24'29 = compileRegex True "\\b(Get)([\\s]|$)" | 81 | regex_'5cb'28Get'29'28'5b'5cs'5d'7c'24'29 = compileRegex True "\\b(Get)([\\s]|$)" | 81 | regex_'5cb'28Get'29'28'5b'5cs'5d'7c'24'29 = compileRegex True "\\b(Get)([\\s]|$)" | 81 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
mettekou/ghc | compiler/typecheck/TcDerivUtils.hs | bsd-3-clause | mkThetaOrigin :: CtOrigin -> TypeOrKind -> ThetaType -> ThetaOrigin
mkThetaOrigin origin t_or_k = map (mkPredOrigin origin t_or_k) | 130 | mkThetaOrigin :: CtOrigin -> TypeOrKind -> ThetaType -> ThetaOrigin
mkThetaOrigin origin t_or_k = map (mkPredOrigin origin t_or_k) | 130 | mkThetaOrigin origin t_or_k = map (mkPredOrigin origin t_or_k) | 62 | false | true | 0 | 7 | 16 | 39 | 19 | 20 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | ignHeaders :: OrgParser ()
ignHeaders = (() <$ newline) <|> (() <$ anyLine) | 75 | ignHeaders :: OrgParser ()
ignHeaders = (() <$ newline) <|> (() <$ anyLine) | 75 | ignHeaders = (() <$ newline) <|> (() <$ anyLine) | 48 | false | true | 0 | 9 | 12 | 44 | 21 | 23 | null | null |
rueshyna/gogol | gogol-pubsub/gen/Network/Google/PubSub/Types/Product.hs | mpl-2.0 | -- | The push configuration for future deliveries. An empty \`pushConfig\`
-- indicates that the Pub\/Sub system should stop pushing messages from the
-- given subscription and allow messages to be pulled and acknowledged -
-- effectively pausing the subscription if \`Pull\` is not called.
mpcrPushConfig :: Lens' Modif... | 437 | mpcrPushConfig :: Lens' ModifyPushConfigRequest (Maybe PushConfig)
mpcrPushConfig
= lens _mpcrPushConfig
(\ s a -> s{_mpcrPushConfig = a}) | 146 | mpcrPushConfig
= lens _mpcrPushConfig
(\ s a -> s{_mpcrPushConfig = a}) | 79 | true | true | 0 | 9 | 69 | 51 | 28 | 23 | null | null |
nfjinjing/mps | src/MPS/Math/FF.hs | bsd-3-clause | x % p = toFp p x | 16 | x % p = toFp p x | 16 | x % p = toFp p x | 16 | false | false | 1 | 5 | 6 | 16 | 7 | 9 | null | null |
olorin/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types/Product.hs | mpl-2.0 | -- | Contains the new 'AllocatedStorage' size for the DB instance that will
-- be applied or is in progress.
pmvAllocatedStorage :: Lens' PendingModifiedValues (Maybe Int)
pmvAllocatedStorage = lens _pmvAllocatedStorage (\ s a -> s{_pmvAllocatedStorage = a}) | 258 | pmvAllocatedStorage :: Lens' PendingModifiedValues (Maybe Int)
pmvAllocatedStorage = lens _pmvAllocatedStorage (\ s a -> s{_pmvAllocatedStorage = a}) | 149 | pmvAllocatedStorage = lens _pmvAllocatedStorage (\ s a -> s{_pmvAllocatedStorage = a}) | 86 | true | true | 0 | 9 | 36 | 47 | 26 | 21 | null | null |
keithodulaigh/Hets | Isabelle/IsaConsts.hs | gpl-2.0 | disjV :: VName
disjV = VName disj $ Just $ AltSyntax "(_ |/ _)" [31, 30] 30 | 75 | disjV :: VName
disjV = VName disj $ Just $ AltSyntax "(_ |/ _)" [31, 30] 30 | 75 | disjV = VName disj $ Just $ AltSyntax "(_ |/ _)" [31, 30] 30 | 60 | false | true | 0 | 7 | 16 | 35 | 18 | 17 | null | null |
siddhanathan/ghc | libraries/base/Data/List/NonEmpty.hs | bsd-3-clause | -- | Sort a stream.
sort :: Ord a => NonEmpty a -> NonEmpty a
sort = lift List.sort | 83 | sort :: Ord a => NonEmpty a -> NonEmpty a
sort = lift List.sort | 63 | sort = lift List.sort | 21 | true | true | 0 | 7 | 18 | 34 | 16 | 18 | null | null |
rsasse/tamarin-prover | lib/theory/src/Theory/Constraint/System/Guarded.hs | gpl-3.0 | isExGuarded :: Guarded s c v -> Bool
isExGuarded (GGuarded Ex _ _ _) = True | 75 | isExGuarded :: Guarded s c v -> Bool
isExGuarded (GGuarded Ex _ _ _) = True | 75 | isExGuarded (GGuarded Ex _ _ _) = True | 38 | false | true | 0 | 9 | 15 | 43 | 19 | 24 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.