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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ublubu/shapes | shapes/src/Physics/Transform.hs | mit | lunsafe_ :: (a -> b) -> LocalT a -> b
lunsafe_ f (LocalT _ v) = f v | 67 | lunsafe_ :: (a -> b) -> LocalT a -> b
lunsafe_ f (LocalT _ v) = f v | 67 | lunsafe_ f (LocalT _ v) = f v | 29 | false | true | 0 | 7 | 17 | 50 | 23 | 27 | null | null |
wavewave/lhc-analysis-collection | lib/HEP/Physics/Analysis/ATLAS/Exotic/Leptoquark.hs | gpl-3.0 | checkEvJJ :: (MonadPlus m) => IxStateT m EvJJEv Discriminant ()
checkEvJJ = iget >>>= \ev ->
let (_,metpt) = (phiptmet . met . evjj_rev) ev
in iguard (metpt > 30 && findMT ev > 40 && dphiJMETCut ev) >>>
iput (getDiscrim4EvJJ ev) | 271 | checkEvJJ :: (MonadPlus m) => IxStateT m EvJJEv Discriminant ()
checkEvJJ = iget >>>= \ev ->
let (_,metpt) = (phiptmet . met . evjj_rev) ev
in iguard (metpt > 30 && findMT ev > 40 && dphiJMETCut ev) >>>
iput (getDiscrim4EvJJ ev) | 270 | checkEvJJ = iget >>>= \ev ->
let (_,metpt) = (phiptmet . met . evjj_rev) ev
in iguard (metpt > 30 && findMT ev > 40 && dphiJMETCut ev) >>>
iput (getDiscrim4EvJJ ev) | 206 | false | true | 2 | 13 | 84 | 121 | 58 | 63 | null | null |
k0001/gtk2hs | tools/c2hs/gen/GenBind.hs | gpl-3.0 | expandModule :: CHSModule -> GB (CHSModule, String, String)
expandModule (CHSModule frags) =
do
-- expand hooks
--
traceInfoExpand
frags' <- expandFrags frags
delayedFrags <- getDelayedCode
-- get .chi dump
--
chi <- dumpMaps
-- check for errors and final... | 996 | expandModule :: CHSModule -> GB (CHSModule, String, String)
expandModule (CHSModule frags) =
do
-- expand hooks
--
traceInfoExpand
frags' <- expandFrags frags
delayedFrags <- getDelayedCode
-- get .chi dump
--
chi <- dumpMaps
-- check for errors and final... | 996 | expandModule (CHSModule frags) =
do
-- expand hooks
--
traceInfoExpand
frags' <- expandFrags frags
delayedFrags <- getDelayedCode
-- get .chi dump
--
chi <- dumpMaps
-- check for errors and finalise
--
errs <- errorsPresent
if errs
then do
traceIn... | 918 | false | true | 2 | 14 | 345 | 188 | 95 | 93 | null | null |
Leonti/haskell-memory-so | src/ResultsParsing.hs | bsd-3-clause | listings :: TagTree String -> [TagTreePos String]
listings = select (sel "article.resultBody") | 94 | listings :: TagTree String -> [TagTreePos String]
listings = select (sel "article.resultBody") | 94 | listings = select (sel "article.resultBody") | 44 | false | true | 0 | 9 | 11 | 40 | 17 | 23 | null | null |
ttylec/QLogic | research/concrete.hs | gpl-3.0 | x = Observable 'X' [0, 1] | 25 | x = Observable 'X' [0, 1] | 25 | x = Observable 'X' [0, 1] | 25 | false | false | 1 | 6 | 5 | 20 | 9 | 11 | null | null |
bumptech/riak-haskell-client | src/Network/Riak/Connection/Pool.hs | apache-2.0 | -- | Temporarily take a connection from a 'Pool', perform an action
-- with it, and return it to the pool afterwards.
--
-- * If the pool has a connection available, it is used
-- immediately.
--
-- * Otherwise, if the maximum number of connections has not been
-- reached, a new connection is created and used.
--
-... | 897 | withConnection :: Pool -> (Connection -> IO a) -> IO a
withConnection = Pool.withResource . pool | 96 | withConnection = Pool.withResource . pool | 41 | true | true | 0 | 9 | 168 | 57 | 38 | 19 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml20.hs | bsd-2-clause | -- | Smart constructor for 'KeyNonTraditionalKey'
mkKeyNonTraditionalKey :: ChxKey
mkKeyNonTraditionalKey = KeyNonTraditionalKey [] | 131 | mkKeyNonTraditionalKey :: ChxKey
mkKeyNonTraditionalKey = KeyNonTraditionalKey [] | 81 | mkKeyNonTraditionalKey = KeyNonTraditionalKey [] | 48 | true | true | 0 | 6 | 12 | 23 | 10 | 13 | null | null |
Philonous/xml-picklers | src/Data/XML/Pickle/Basic.hs | bsd-3-clause | remList :: [t] -> Maybe [t]
remList [] = Nothing | 48 | remList :: [t] -> Maybe [t]
remList [] = Nothing | 48 | remList [] = Nothing | 20 | false | true | 0 | 7 | 9 | 29 | 15 | 14 | null | null |
CBMM/videoutils | CutAtFrames/Main.hs | bsd-3-clause | ------------------------------------------------------------------------------
modBasename :: (Text -> Text) -> FilePath -> FilePath
modBasename fn p0 = fromText
( either (const "") id (toText (directory p0))
<> fn (either (const "") id $ toText $ basename p0)
... | 388 | modBasename :: (Text -> Text) -> FilePath -> FilePath
modBasename fn p0 = fromText
( either (const "") id (toText (directory p0))
<> fn (either (const "") id $ toText $ basename p0)
<> "."
<> fromMaybe "" (extension p0)) | 309 | modBasename fn p0 = fromText
( either (const "") id (toText (directory p0))
<> fn (either (const "") id $ toText $ basename p0)
<> "."
<> fromMaybe "" (extension p0)) | 255 | true | true | 0 | 16 | 129 | 114 | 56 | 58 | null | null |
ExNexu/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | basename n = n | 14 | basename n = n | 14 | basename n = n | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
ajscholl/primitive-simd | Generator.hs | bsd-3-clause | getRemFunc :: Int -> TypeDesc -> String
getRemFunc maxCapability typeDesc = if not $ isFloating typeDesc
then getArithmeticFunc maxCapability 2 "rem" "-- | Satisfies (quot x y) * y + (rem x y) == x." typeDesc
else "" | 224 | getRemFunc :: Int -> TypeDesc -> String
getRemFunc maxCapability typeDesc = if not $ isFloating typeDesc
then getArithmeticFunc maxCapability 2 "rem" "-- | Satisfies (quot x y) * y + (rem x y) == x." typeDesc
else "" | 224 | getRemFunc maxCapability typeDesc = if not $ isFloating typeDesc
then getArithmeticFunc maxCapability 2 "rem" "-- | Satisfies (quot x y) * y + (rem x y) == x." typeDesc
else "" | 184 | false | true | 0 | 7 | 45 | 50 | 25 | 25 | null | null |
isomorphism/hackage2 | Distribution/Server/Packages/Backup/Tags.hs | bsd-3-clause | updateTags :: PackageTags -> RestoreBackup
updateTags tags = fix $ \r -> RestoreBackup
{ restoreEntry = \(entry, bs) -> do
res <- runImport tags $ case entry of
["tags.csv"] -> importTags bs
_ -> return ()
return $ fmap updateTags res
, restoreFinalize = return . Right $ r
... | 376 | updateTags :: PackageTags -> RestoreBackup
updateTags tags = fix $ \r -> RestoreBackup
{ restoreEntry = \(entry, bs) -> do
res <- runImport tags $ case entry of
["tags.csv"] -> importTags bs
_ -> return ()
return $ fmap updateTags res
, restoreFinalize = return . Right $ r
... | 376 | updateTags tags = fix $ \r -> RestoreBackup
{ restoreEntry = \(entry, bs) -> do
res <- runImport tags $ case entry of
["tags.csv"] -> importTags bs
_ -> return ()
return $ fmap updateTags res
, restoreFinalize = return . Right $ r
, restoreComplete = update $ ReplacePackage... | 333 | false | true | 0 | 17 | 104 | 130 | 66 | 64 | null | null |
kawamuray/ganeti | src/Ganeti/HTools/Backend/Text.hs | gpl-2.0 | -- * Serialisation functions
-- | Serialize a single group.
serializeGroup :: Group.Group -> String
serializeGroup grp =
printf "%s|%s|%s|%s|%s" (Group.name grp) (Group.uuid grp)
(allocPolicyToRaw (Group.allocPolicy grp))
(intercalate "," (Group.allTags grp))
(intercalate "," (Group.... | 334 | serializeGroup :: Group.Group -> String
serializeGroup grp =
printf "%s|%s|%s|%s|%s" (Group.name grp) (Group.uuid grp)
(allocPolicyToRaw (Group.allocPolicy grp))
(intercalate "," (Group.allTags grp))
(intercalate "," (Group.networks grp)) | 273 | serializeGroup grp =
printf "%s|%s|%s|%s|%s" (Group.name grp) (Group.uuid grp)
(allocPolicyToRaw (Group.allocPolicy grp))
(intercalate "," (Group.allTags grp))
(intercalate "," (Group.networks grp)) | 233 | true | true | 0 | 10 | 70 | 97 | 49 | 48 | null | null |
Tomoaki-Hashizaki/pesca | src/PrelSequent.hs | gpl-2.0 | ---- mod. AR 5/1/1999
(....) :: Parser Char b -> Parser Char c -> Parser Char (b,c)
p1 .... p2 = p1 ... pJunk +.. p2 | 117 | (....) :: Parser Char b -> Parser Char c -> Parser Char (b,c)
p1 .... p2 = p1 ... pJunk +.. p2 | 94 | p1 .... p2 = p1 ... pJunk +.. p2 | 32 | true | true | 3 | 10 | 26 | 65 | 32 | 33 | null | null |
juodaspaulius/clafer-old-customBNFC | src/Language/Clafer/Front/lbnf/PrintLBNF.hs | mit | concatD :: [Doc] -> Doc
concatD = foldr (.) id | 46 | concatD :: [Doc] -> Doc
concatD = foldr (.) id | 46 | concatD = foldr (.) id | 22 | false | true | 0 | 6 | 9 | 25 | 14 | 11 | null | null |
Ongy/monky | Monky/MPD.hs | lgpl-3.0 | doMPDConnInit :: MPDSock -> IO (Maybe String)
doMPDConnInit s = join <$> timeout (500 * 1000) (do
v <- BS.unpack <$> recv s 64
if "OK MPD " `isPrefixOf` v
then return . Just $ drop 7 v
else return Nothing) | 217 | doMPDConnInit :: MPDSock -> IO (Maybe String)
doMPDConnInit s = join <$> timeout (500 * 1000) (do
v <- BS.unpack <$> recv s 64
if "OK MPD " `isPrefixOf` v
then return . Just $ drop 7 v
else return Nothing) | 217 | doMPDConnInit s = join <$> timeout (500 * 1000) (do
v <- BS.unpack <$> recv s 64
if "OK MPD " `isPrefixOf` v
then return . Just $ drop 7 v
else return Nothing) | 171 | false | true | 0 | 12 | 52 | 97 | 48 | 49 | null | null |
robertclancy/tapl | arith/arith.hs | gpl-2.0 | eval Fls = Fls | 14 | eval Fls = Fls | 14 | eval Fls = Fls | 14 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sternenseemann/spacecookie | src/Network/Gopher/Util.hs | gpl-3.0 | -- | Call 'setGroupID' and 'setUserID' to switch to
-- the given user and their primary group.
-- Requires special privileges.
-- Will raise an exception if either the user
-- does not exist or the current user has no
-- permission to change UID/GID.
dropPrivileges :: String -> IO ()
dropPrivileges username =... | 420 | dropPrivileges :: String -> IO ()
dropPrivileges username = do
user <- getUserEntryForName username
setGroupID $ userGroupID user
setUserID $ userID user | 159 | dropPrivileges username = do
user <- getUserEntryForName username
setGroupID $ userGroupID user
setUserID $ userID user | 125 | true | true | 0 | 8 | 82 | 59 | 29 | 30 | null | null |
brendanhay/gogol | gogol-chat/gen/Network/Google/Chat/Types/Product.hs | mpl-2.0 | -- | The onclick action. Only the top label, bottom label and content region
-- are clickable.
kvOnClick :: Lens' KeyValue (Maybe OnClick)
kvOnClick
= lens _kvOnClick (\ s a -> s{_kvOnClick = a}) | 197 | kvOnClick :: Lens' KeyValue (Maybe OnClick)
kvOnClick
= lens _kvOnClick (\ s a -> s{_kvOnClick = a}) | 102 | kvOnClick
= lens _kvOnClick (\ s a -> s{_kvOnClick = a}) | 58 | true | true | 1 | 9 | 35 | 53 | 26 | 27 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x0FB9' = "\x0F90\x0FB5" | 39 | decomposeChar '\x0FB9' = "\x0F90\x0FB5" | 39 | decomposeChar '\x0FB9' = "\x0F90\x0FB5" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
bitemyapp/ghc | compiler/rename/RnBinds.hs | bsd-3-clause | {-
-- ToDo: Put the annotations into the monad, so that they arrive in the proper
-- place and can be used when complaining.
The code tree received by the function @rnBinds@ contains definitions
in where-clauses which are all apparently mutually recursive, but which may
not really depend upon each other. For example, ... | 4,858 | rnTopBindsLHS :: MiniFixityEnv
-> HsValBinds RdrName
-> RnM (HsValBindsLR Name RdrName)
rnTopBindsLHS fix_env binds
= rnValBindsLHS (topRecNameMaker fix_env) binds | 193 | rnTopBindsLHS fix_env binds
= rnValBindsLHS (topRecNameMaker fix_env) binds | 77 | true | true | 0 | 9 | 1,141 | 52 | 26 | 26 | null | null |
gnn/Hets | OWL2/AS.hs | gpl-2.0 | isNullQName :: QName -> Bool
isNullQName qn = case qn of
QN "" "" _ "" _ -> True
_ -> False | 99 | isNullQName :: QName -> Bool
isNullQName qn = case qn of
QN "" "" _ "" _ -> True
_ -> False | 99 | isNullQName qn = case qn of
QN "" "" _ "" _ -> True
_ -> False | 70 | false | true | 0 | 8 | 29 | 51 | 23 | 28 | null | null |
mhwombat/creatur-realtra.OLD | src/ALife/Realtra/Image.hs | bsd-3-clause | getPixels
:: Either [String] Word8
-> Either [String] Word8
-> Reader (Either [String] Image)
getPixels (Right w) (Right h) = do
let w' = word8ToInt w
let h' = word8ToInt h
ps <- getRawWord8s (w' * h')
return $ mkImage <$> pure w' <*> pure h' <*> ps | 269 | getPixels
:: Either [String] Word8
-> Either [String] Word8
-> Reader (Either [String] Image)
getPixels (Right w) (Right h) = do
let w' = word8ToInt w
let h' = word8ToInt h
ps <- getRawWord8s (w' * h')
return $ mkImage <$> pure w' <*> pure h' <*> ps | 269 | getPixels (Right w) (Right h) = do
let w' = word8ToInt w
let h' = word8ToInt h
ps <- getRawWord8s (w' * h')
return $ mkImage <$> pure w' <*> pure h' <*> ps | 163 | false | true | 0 | 10 | 67 | 136 | 63 | 73 | null | null |
mainland/dph | dph-lifted-copy/Data/Array/Parallel/PArray/PDataInstances.hs | bsd-3-clause | punit :: PData ()
punit = PUnit | 32 | punit :: PData ()
punit = PUnit | 32 | punit = PUnit | 14 | false | true | 0 | 6 | 7 | 16 | 8 | 8 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F14.hs | bsd-3-clause | -- glIndexMask -----------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glIndexMask.xml OpenGL 2.x>.
glIndexMask
:: MonadIO m
=> GLuint -- ^ @mask@ of type @MaskedColorIndexValueI@.
-> m ()
glIndexMask v1 = liftIO $ dyn3 ptr_glIndexMask v1 | 320 | glIndexMask
:: MonadIO m
=> GLuint -- ^ @mask@ of type @MaskedColorIndexValueI@.
-> m ()
glIndexMask v1 = liftIO $ dyn3 ptr_glIndexMask v1 | 144 | glIndexMask v1 = liftIO $ dyn3 ptr_glIndexMask v1 | 49 | true | true | 0 | 9 | 40 | 46 | 22 | 24 | null | null |
svenkeidel/stream-bench | src/SignalLazy.hs | bsd-3-clause | (>>) :: Signal s a b -> Signal t b c -> Signal (s,t) a c
Signal f s0 >> Signal g t0 = Signal go (s0,t0)
where
go (a,(s,t)) =
let (b,s') = f (a,s)
(c,t') = g (b,t)
in (c,(s',t')) | 205 | (>>) :: Signal s a b -> Signal t b c -> Signal (s,t) a c
Signal f s0 >> Signal g t0 = Signal go (s0,t0)
where
go (a,(s,t)) =
let (b,s') = f (a,s)
(c,t') = g (b,t)
in (c,(s',t')) | 205 | Signal f s0 >> Signal g t0 = Signal go (s0,t0)
where
go (a,(s,t)) =
let (b,s') = f (a,s)
(c,t') = g (b,t)
in (c,(s',t')) | 148 | false | true | 0 | 10 | 69 | 162 | 85 | 77 | null | null |
brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/AlertPolicies/List.hs | mpl-2.0 | -- | OAuth access token.
paplAccessToken :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplAccessToken
= lens _paplAccessToken
(\ s a -> s{_paplAccessToken = a}) | 171 | paplAccessToken :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplAccessToken
= lens _paplAccessToken
(\ s a -> s{_paplAccessToken = a}) | 146 | paplAccessToken
= lens _paplAccessToken
(\ s a -> s{_paplAccessToken = a}) | 82 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
egison/egison | hs-src/Language/Egison/PrettyMath/AST.hs | mit | parsePartial :: Parser MathExpr
parsePartial = Partial <$> parseAtom <*> many1 (char '|' >> parseAtom) | 102 | parsePartial :: Parser MathExpr
parsePartial = Partial <$> parseAtom <*> many1 (char '|' >> parseAtom) | 102 | parsePartial = Partial <$> parseAtom <*> many1 (char '|' >> parseAtom) | 70 | false | true | 1 | 9 | 14 | 38 | 17 | 21 | null | null |
benma/bitd | src/BitD/Protocol/BitcoinAddress.hs | bsd-3-clause | hash160ToAddress :: Hash160 -> AddressVersion -> Address
hash160ToAddress (Hash160 h) version = Address $ encodeBase58Check ((addressVersionToVersionByte version) `BS.cons` h) | 175 | hash160ToAddress :: Hash160 -> AddressVersion -> Address
hash160ToAddress (Hash160 h) version = Address $ encodeBase58Check ((addressVersionToVersionByte version) `BS.cons` h) | 175 | hash160ToAddress (Hash160 h) version = Address $ encodeBase58Check ((addressVersionToVersionByte version) `BS.cons` h) | 118 | false | true | 0 | 10 | 18 | 59 | 29 | 30 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | defaultWin32SelfUpgradeFlags :: Win32SelfUpgradeFlags
defaultWin32SelfUpgradeFlags = Win32SelfUpgradeFlags {
win32SelfUpgradeVerbosity = toFlag normal
} | 154 | defaultWin32SelfUpgradeFlags :: Win32SelfUpgradeFlags
defaultWin32SelfUpgradeFlags = Win32SelfUpgradeFlags {
win32SelfUpgradeVerbosity = toFlag normal
} | 154 | defaultWin32SelfUpgradeFlags = Win32SelfUpgradeFlags {
win32SelfUpgradeVerbosity = toFlag normal
} | 100 | false | true | 0 | 8 | 13 | 29 | 13 | 16 | null | null |
jhickner/ngon | Ngon/Actions.hs | gpl-3.0 | incValue _ _ = Nothing | 22 | incValue _ _ = Nothing | 22 | incValue _ _ = Nothing | 22 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
davidsundelius/JLC | src/PrintJasm.hs | mit | calcStack (s:ss) = case s of
SPush v -> case v of
(VDbl _) -> calcStack ss + 2
_ -> calcStack ss + 1
SDup2 -> calcStack ss + 2
SSwap -> calcStack ss
SLoad t i -> case t of
TInt -> calcStack ss + 1
TDbl ... | 2,545 | calcStack (s:ss) = case s of
SPush v -> case v of
(VDbl _) -> calcStack ss + 2
_ -> calcStack ss + 1
SDup2 -> calcStack ss + 2
SSwap -> calcStack ss
SLoad t i -> case t of
TInt -> calcStack ss + 1
TDbl ... | 2,545 | calcStack (s:ss) = case s of
SPush v -> case v of
(VDbl _) -> calcStack ss + 2
_ -> calcStack ss + 1
SDup2 -> calcStack ss + 2
SSwap -> calcStack ss
SLoad t i -> case t of
TInt -> calcStack ss + 1
TDbl ... | 2,545 | false | false | 34 | 12 | 1,260 | 1,025 | 479 | 546 | null | null |
uduki/hsQt | Qtc/Enums/Core/QDir.hs | bsd-2-clause | fAllDirs :: Filters
fAllDirs
= ifFilters $ 1024 | 49 | fAllDirs :: Filters
fAllDirs
= ifFilters $ 1024 | 49 | fAllDirs
= ifFilters $ 1024 | 29 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
ulricha/dsh-example-queries | Queries/TPCH/Standard/Q1.hs | bsd-3-clause | itemsBefore :: Q Day -> Q [LineItem]
itemsBefore maxDate = [ li | li <- lineitems , l_shipdateQ li <= maxDate ] | 111 | itemsBefore :: Q Day -> Q [LineItem]
itemsBefore maxDate = [ li | li <- lineitems , l_shipdateQ li <= maxDate ] | 111 | itemsBefore maxDate = [ li | li <- lineitems , l_shipdateQ li <= maxDate ] | 74 | false | true | 0 | 8 | 21 | 49 | 24 | 25 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | spacing1 = do
spacing <- spacing
when (null spacing) $ fail "Expected whitespace"
return spacing | 108 | spacing1 = do
spacing <- spacing
when (null spacing) $ fail "Expected whitespace"
return spacing | 108 | spacing1 = do
spacing <- spacing
when (null spacing) $ fail "Expected whitespace"
return spacing | 108 | false | false | 1 | 11 | 26 | 42 | 16 | 26 | null | null |
kojiromike/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | ibc i (IBCMetavar n) f =
case lookup n (idris_metavars i) of
Nothing -> return f
Just t -> return f { ibc_metavars = (n, t) : ibc_metavars f } | 167 | ibc i (IBCMetavar n) f =
case lookup n (idris_metavars i) of
Nothing -> return f
Just t -> return f { ibc_metavars = (n, t) : ibc_metavars f } | 167 | ibc i (IBCMetavar n) f =
case lookup n (idris_metavars i) of
Nothing -> return f
Just t -> return f { ibc_metavars = (n, t) : ibc_metavars f } | 167 | false | false | 1 | 12 | 54 | 81 | 37 | 44 | null | null |
SamirTalwar/Smoke | src/lib/Test/Smoke/Plan.hs | mit | readTest ::
ResolvedPath Dir ->
WorkingDirectory ->
Maybe Shell ->
Maybe Command ->
Test ->
Planning TestPlan
readTest location fallbackWorkingDirectory fallbackShell fallbackCommand test = do
let workingDirectory = determineWorkingDirectory location (testWorkingDirectory test) fallbackWorkingDirectory
... | 1,178 | readTest ::
ResolvedPath Dir ->
WorkingDirectory ->
Maybe Shell ->
Maybe Command ->
Test ->
Planning TestPlan
readTest location fallbackWorkingDirectory fallbackShell fallbackCommand test = do
let workingDirectory = determineWorkingDirectory location (testWorkingDirectory test) fallbackWorkingDirectory
... | 1,178 | readTest location fallbackWorkingDirectory fallbackShell fallbackCommand test = do
let workingDirectory = determineWorkingDirectory location (testWorkingDirectory test) fallbackWorkingDirectory
command <-
maybe (throwE NoCommand) return (testCommand test <|> fallbackCommand)
executable <-
withExceptT Plan... | 1,056 | false | true | 0 | 12 | 273 | 309 | 153 | 156 | null | null |
fluffynukeit/FNIStash | src/FNIStash/File/Variables.hs | bsd-3-clause | vDAMAGE_POISON = getDamage 0x8fa06905 Poison | 46 | vDAMAGE_POISON = getDamage 0x8fa06905 Poison | 46 | vDAMAGE_POISON = getDamage 0x8fa06905 Poison | 46 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
m-alvarez/jhc | src/Doc/Pretty.hs | mit | hang i d = align (nest i d) | 34 | hang i d = align (nest i d) | 34 | hang i d = align (nest i d) | 34 | false | false | 0 | 7 | 14 | 23 | 10 | 13 | null | null |
keent/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | Get the URL to request the information on the latest snapshots
askLatestSnapshotUrl :: (MonadReader env m, HasConfig env) => m Text
askLatestSnapshotUrl = asks (configLatestSnapshotUrl . getConfig) | 202 | askLatestSnapshotUrl :: (MonadReader env m, HasConfig env) => m Text
askLatestSnapshotUrl = asks (configLatestSnapshotUrl . getConfig) | 134 | askLatestSnapshotUrl = asks (configLatestSnapshotUrl . getConfig) | 65 | true | true | 0 | 7 | 28 | 42 | 22 | 20 | null | null |
mpickering/core-kythe | src/KythePlugin.hs | bsd-3-clause | makeOutPath, makeEntriesPath :: FilePath -> Module -> FilePath
makeOutPath = makeModulePath "core" | 98 | makeOutPath, makeEntriesPath :: FilePath -> Module -> FilePath
makeOutPath = makeModulePath "core" | 98 | makeOutPath = makeModulePath "core" | 35 | false | true | 0 | 6 | 11 | 24 | 13 | 11 | null | null |
NickAger/LearningHaskell | UnderstandingServant/WhyIsServantATypeLevelDSL/WhyIsServantATypeLevelDSL.hsproj/Servant1-Non-Modular/NonModular1.hs | mit | {-
Indeed, we would like the type of linkTo to be Endpoint -> Link, Endpoint -> String -> Link, Endpoint -> String -> String -> Link and so on depending on what the Endpoint argument is. In other words, we want the return type of linkTo (when really seen as a function of one argument, which it is anyway) to depend on t... | 1,412 | linkTo2 :: Endpoint -> [String] -> Link
linkTo2 (Static str rest) captureValues = str : linkTo2 rest captureValues | 115 | linkTo2 (Static str rest) captureValues = str : linkTo2 rest captureValues | 75 | true | true | 0 | 10 | 263 | 54 | 28 | 26 | null | null |
danielgrigg/haskell-cis194 | week7/JoinList.hs | bsd-2-clause | t1 = Single (Product 3) 'a' | 27 | t1 = Single (Product 3) 'a' | 27 | t1 = Single (Product 3) 'a' | 27 | false | false | 1 | 6 | 5 | 22 | 8 | 14 | null | null |
Bigsby/langs | src/hs/dry.hs | apache-2.0 | doStuff =
putStrLn "Doing stuff!" | 38 | doStuff =
putStrLn "Doing stuff!" | 38 | doStuff =
putStrLn "Doing stuff!" | 38 | false | false | 1 | 5 | 9 | 13 | 4 | 9 | null | null |
AaronFriel/hs-tls | core/Network/TLS/Handshake/Common.hs | bsd-3-clause | onRecvStateHandshake ctx (RecvStateHandshake f) (x:xs) = do
nstate <- f x
processHandshake ctx x
onRecvStateHandshake ctx nstate xs | 143 | onRecvStateHandshake ctx (RecvStateHandshake f) (x:xs) = do
nstate <- f x
processHandshake ctx x
onRecvStateHandshake ctx nstate xs | 143 | onRecvStateHandshake ctx (RecvStateHandshake f) (x:xs) = do
nstate <- f x
processHandshake ctx x
onRecvStateHandshake ctx nstate xs | 143 | false | false | 0 | 8 | 29 | 54 | 24 | 30 | null | null |
gromakovsky/Orchid | src/Orchid/Codegen/Body.hs | mit | not = xor $ (TBool, AST.ConstantOperand $ constBool True) | 57 | not = xor $ (TBool, AST.ConstantOperand $ constBool True) | 57 | not = xor $ (TBool, AST.ConstantOperand $ constBool True) | 57 | false | false | 0 | 8 | 8 | 25 | 13 | 12 | null | null |
anwb/fp-one-on-one | lecture-10-hw.hs | mit | valid' Sub x y = x > y | 38 | valid' Sub x y = x > y | 38 | valid' Sub x y = x > y | 38 | false | false | 3 | 5 | 23 | 24 | 8 | 16 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/GuideCategories/List.hs | mpl-2.0 | -- | The part parameter specifies the guideCategory resource properties that
-- the API response will include. Set the parameter value to snippet.
gclPart :: Lens' GuideCategoriesList Text
gclPart = lens _gclPart (\ s a -> s{_gclPart = a}) | 239 | gclPart :: Lens' GuideCategoriesList Text
gclPart = lens _gclPart (\ s a -> s{_gclPart = a}) | 92 | gclPart = lens _gclPart (\ s a -> s{_gclPart = a}) | 50 | true | true | 1 | 9 | 38 | 47 | 23 | 24 | null | null |
maque/Hate | src/Hate/Graphics/Backend/Util.hs | mit | vertexLayoutToGLLayout :: VertexLayout -> GL.PrimitiveMode
vertexLayoutToGLLayout FanVertexLayout = GL.TriangleFan | 115 | vertexLayoutToGLLayout :: VertexLayout -> GL.PrimitiveMode
vertexLayoutToGLLayout FanVertexLayout = GL.TriangleFan | 114 | vertexLayoutToGLLayout FanVertexLayout = GL.TriangleFan | 55 | false | true | 0 | 6 | 9 | 22 | 11 | 11 | null | null |
bens/libmpd-haskell | src/Network/MPD/Applicative/Reflection.hs | lgpl-2.1 | config :: Command [(String, String)]
config = Command p ["config"]
where
p = map (\(k, v) -> (UTF8.toString k, UTF8.toString v)) . toAssocList <$> getResponse | 164 | config :: Command [(String, String)]
config = Command p ["config"]
where
p = map (\(k, v) -> (UTF8.toString k, UTF8.toString v)) . toAssocList <$> getResponse | 164 | config = Command p ["config"]
where
p = map (\(k, v) -> (UTF8.toString k, UTF8.toString v)) . toAssocList <$> getResponse | 127 | false | true | 1 | 11 | 30 | 90 | 44 | 46 | null | null |
leshchevds/ganeti | src/Ganeti/Query/Job.hs | bsd-2-clause | maybeJob f (Ok (v, _)) _ = rsNormal $ f v | 42 | maybeJob f (Ok (v, _)) _ = rsNormal $ f v | 42 | maybeJob f (Ok (v, _)) _ = rsNormal $ f v | 42 | false | false | 0 | 8 | 11 | 32 | 16 | 16 | null | null |
AlexanderPankiv/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | mkStaticConEntryLabel :: Name -> CafInfo -> CLabel
mkConEntryLabel name c = IdLabel name c ConEntry | 110 | mkStaticConEntryLabel :: Name -> CafInfo -> CLabel
mkConEntryLabel name c = IdLabel name c ConEntry | 110 | mkConEntryLabel name c = IdLabel name c ConEntry | 59 | false | true | 0 | 6 | 25 | 35 | 16 | 19 | null | null |
RaphaelJ/getwebb.org | Util/Extras.hs | gpl-3.0 | -- | Returns the meta data about a file.
getFileExtras :: Entity File -> YesodDB App Extras
getFileExtras (Entity fileId file) =
case fileType file of
Image -> do
Just attrs <- getBy $ UniqueImageAttrs fileId
tags <- selectList [ExifTagFile ==. fileId] []
return $ ImageEx... | 1,075 | getFileExtras :: Entity File -> YesodDB App Extras
getFileExtras (Entity fileId file) =
case fileType file of
Image -> do
Just attrs <- getBy $ UniqueImageAttrs fileId
tags <- selectList [ExifTagFile ==. fileId] []
return $ ImageExtras (entityVal attrs)
... | 1,034 | getFileExtras (Entity fileId file) =
case fileType file of
Image -> do
Just attrs <- getBy $ UniqueImageAttrs fileId
tags <- selectList [ExifTagFile ==. fileId] []
return $ ImageExtras (entityVal attrs)
(map entityVal tags)
Audio -... | 983 | true | true | 0 | 13 | 362 | 269 | 124 | 145 | null | null |
basvandijk/monad-batcher | example/example.hs | bsd-3-clause | unbatchedWorker (Scheduled (PutStrLn str) write : cmds) = do r <- try (System.IO.putStrLn str)
write r
unbatchedWorker cmds | 245 | unbatchedWorker (Scheduled (PutStrLn str) write : cmds) = do r <- try (System.IO.putStrLn str)
write r
unbatchedWorker cmds | 245 | unbatchedWorker (Scheduled (PutStrLn str) write : cmds) = do r <- try (System.IO.putStrLn str)
write r
unbatchedWorker cmds | 245 | false | false | 0 | 11 | 139 | 58 | 26 | 32 | null | null |
juhp/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | Get the path for the given compiler ignoring any local binaries.
--
-- https://github.com/commercialhaskell/stack/issues/1052
getCompilerPath :: HasCompiler env => RIO env (Path Abs File)
getCompilerPath = view $ compilerPathsL.to cpCompiler | 246 | getCompilerPath :: HasCompiler env => RIO env (Path Abs File)
getCompilerPath = view $ compilerPathsL.to cpCompiler | 115 | getCompilerPath = view $ compilerPathsL.to cpCompiler | 53 | true | true | 0 | 8 | 31 | 43 | 22 | 21 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxPRINTID_RANGE :: Int
wxPRINTID_RANGE = 11 | 43 | wxPRINTID_RANGE :: Int
wxPRINTID_RANGE = 11 | 43 | wxPRINTID_RANGE = 11 | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
urbanslug/ghc | compiler/utils/Platform.hs | bsd-3-clause | sElfTarget OSOpenBSD = True
| 30 | osElfTarget OSOpenBSD = True | 30 | osElfTarget OSOpenBSD = True | 30 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
tadeuzagallo/verve-lang | src/Core/State.hs | mit | importDsState :: [String] -> DsState -> DsState -> DsState
importDsState imports targetState importState =
importState { enums = mergedEnums }
where
mergedEnums = importedEnums ++ enums targetState
importedEnums = filter pred (enums importState)
pred (DsEnum name _) = name `elem` imports | 312 | importDsState :: [String] -> DsState -> DsState -> DsState
importDsState imports targetState importState =
importState { enums = mergedEnums }
where
mergedEnums = importedEnums ++ enums targetState
importedEnums = filter pred (enums importState)
pred (DsEnum name _) = name `elem` imports | 312 | importDsState imports targetState importState =
importState { enums = mergedEnums }
where
mergedEnums = importedEnums ++ enums targetState
importedEnums = filter pred (enums importState)
pred (DsEnum name _) = name `elem` imports | 253 | false | true | 2 | 7 | 64 | 110 | 51 | 59 | null | null |
TomMD/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | callishOp DoubleLogOp = Just MO_F64_Log | 42 | callishOp DoubleLogOp = Just MO_F64_Log | 42 | callishOp DoubleLogOp = Just MO_F64_Log | 42 | false | false | 1 | 5 | 7 | 15 | 5 | 10 | null | null |
jsavatgy/hatupist | code/fileError.hs | gpl-2.0 | renewTableS gs t = do
pt <- getPOSIXTime
let newGs = gs {
speedNows = [(pt, (total gs))] ++ take speedCount (speedNows gs)
}
let s = difs (speedNows newGs)
listStoreSetValue (gModelS (g gs)) 0 Timing {
sSecsLeft = iLeft t,
sSession = mmss t,
sTotal = total gs,
sSpeed = speed (snd s) (fst s... | 340 | renewTableS gs t = do
pt <- getPOSIXTime
let newGs = gs {
speedNows = [(pt, (total gs))] ++ take speedCount (speedNows gs)
}
let s = difs (speedNows newGs)
listStoreSetValue (gModelS (g gs)) 0 Timing {
sSecsLeft = iLeft t,
sSession = mmss t,
sTotal = total gs,
sSpeed = speed (snd s) (fst s... | 340 | renewTableS gs t = do
pt <- getPOSIXTime
let newGs = gs {
speedNows = [(pt, (total gs))] ++ take speedCount (speedNows gs)
}
let s = difs (speedNows newGs)
listStoreSetValue (gModelS (g gs)) 0 Timing {
sSecsLeft = iLeft t,
sSession = mmss t,
sTotal = total gs,
sSpeed = speed (snd s) (fst s... | 340 | false | false | 0 | 16 | 92 | 164 | 81 | 83 | null | null |
uduki/hsQt | Qtc/Enums/Gui/QPainter.hs | bsd-2-clause | ieRenderHint :: Int -> RenderHint
ieRenderHint x = QEnum (CRenderHint x) | 72 | ieRenderHint :: Int -> RenderHint
ieRenderHint x = QEnum (CRenderHint x) | 72 | ieRenderHint x = QEnum (CRenderHint x) | 38 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
Zigazou/containers | Data/Set/Base.hs | bsd-3-clause | hedgeUnion :: Ord a => MaybeS a -> MaybeS a -> Set a -> Set a -> Set a
hedgeUnion _ _ t1 Tip = t1 | 102 | hedgeUnion :: Ord a => MaybeS a -> MaybeS a -> Set a -> Set a -> Set a
hedgeUnion _ _ t1 Tip = t1 | 102 | hedgeUnion _ _ t1 Tip = t1 | 31 | false | true | 0 | 10 | 30 | 58 | 26 | 32 | null | null |
siddhanathan/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | flattenRuleDecls :: [LRuleDecls name] -> [LRuleDecl name]
flattenRuleDecls decls = concatMap (rds_rules . unLoc) decls | 118 | flattenRuleDecls :: [LRuleDecls name] -> [LRuleDecl name]
flattenRuleDecls decls = concatMap (rds_rules . unLoc) decls | 118 | flattenRuleDecls decls = concatMap (rds_rules . unLoc) decls | 60 | false | true | 0 | 7 | 14 | 45 | 22 | 23 | null | null |
rethab/combinatorrent | src/Protocol/Wire.hs | bsd-2-clause | p8 :: Word8 -> Put
p8 = putWord8 | 32 | p8 :: Word8 -> Put
p8 = putWord8 | 32 | p8 = putWord8 | 13 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
alevy/postgresql-orm | src/Database/PostgreSQL/ORM/Association.hs | gpl-3.0 | jtParam :: (Model a, Model b) => JoinTable a b -> a -> b -> [Action]
jtParam _ a b = [toField $ primaryKey a, toField $ primaryKey b] | 133 | jtParam :: (Model a, Model b) => JoinTable a b -> a -> b -> [Action]
jtParam _ a b = [toField $ primaryKey a, toField $ primaryKey b] | 133 | jtParam _ a b = [toField $ primaryKey a, toField $ primaryKey b] | 64 | false | true | 0 | 9 | 28 | 73 | 37 | 36 | null | null |
siddhanathan/ghc | compiler/main/DynFlags.hs | bsd-3-clause | setOverlappingInsts :: TurnOnFlag -> DynP ()
setOverlappingInsts False = return () | 82 | setOverlappingInsts :: TurnOnFlag -> DynP ()
setOverlappingInsts False = return () | 82 | setOverlappingInsts False = return () | 37 | false | true | 0 | 7 | 10 | 32 | 14 | 18 | null | null |
lukexi/haskell-opencv | src/OpenCV/Unsafe.hs | bsd-3-clause | unsafeWrite
:: (PrimMonad m, Storable value)
=> Mut (Mat shape channels depth) (PrimState m)
-> [Int] -- ^ position
-> Int -- ^ channel
-> value
-> m ()
unsafeWrite matM pos channel value =
unsafePrimToPrim $ withMatData (unMut matM) $ \step dataPtr ->
let elemPtr = matElemAddress data... | 416 | unsafeWrite
:: (PrimMonad m, Storable value)
=> Mut (Mat shape channels depth) (PrimState m)
-> [Int] -- ^ position
-> Int -- ^ channel
-> value
-> m ()
unsafeWrite matM pos channel value =
unsafePrimToPrim $ withMatData (unMut matM) $ \step dataPtr ->
let elemPtr = matElemAddress data... | 416 | unsafeWrite matM pos channel value =
unsafePrimToPrim $ withMatData (unMut matM) $ \step dataPtr ->
let elemPtr = matElemAddress dataPtr (fromIntegral <$> step) pos
in poke (elemPtr `plusPtr` (channel * sizeOf value)) value | 239 | false | true | 0 | 13 | 101 | 160 | 80 | 80 | null | null |
gbataille/pandoc | src/Text/Pandoc/Readers/Odt/Generic/SetMap.hs | gpl-2.0 | insert :: (Ord k, Ord v) => k -> v -> SetMap k v -> SetMap k v
insert key value setMap = M.insertWith S.union key (S.singleton value) setMap | 140 | insert :: (Ord k, Ord v) => k -> v -> SetMap k v -> SetMap k v
insert key value setMap = M.insertWith S.union key (S.singleton value) setMap | 140 | insert key value setMap = M.insertWith S.union key (S.singleton value) setMap | 77 | false | true | 0 | 9 | 28 | 76 | 37 | 39 | null | null |
mydaum/cabal | cabal-install/Distribution/Solver/Types/ComponentDeps.hs | bsd-3-clause | fromList :: Monoid a => [ComponentDep a] -> ComponentDeps a
fromList = ComponentDeps . Map.fromListWith mappend | 111 | fromList :: Monoid a => [ComponentDep a] -> ComponentDeps a
fromList = ComponentDeps . Map.fromListWith mappend | 111 | fromList = ComponentDeps . Map.fromListWith mappend | 51 | false | true | 0 | 8 | 15 | 40 | 19 | 21 | null | null |
LukaHorvat/Slides | test/Test.hs | mit | sample :: Presentation
sample =
emptyPresentation {
slides = [
Slide [
Header 2 "Title",
Sequence Immediate [
-- this delay does nothing because the parent Immediate overrides it
UnfoldConcatList Delay [
... | 1,253 | sample :: Presentation
sample =
emptyPresentation {
slides = [
Slide [
Header 2 "Title",
Sequence Immediate [
-- this delay does nothing because the parent Immediate overrides it
UnfoldConcatList Delay [
... | 1,253 | sample =
emptyPresentation {
slides = [
Slide [
Header 2 "Title",
Sequence Immediate [
-- this delay does nothing because the parent Immediate overrides it
UnfoldConcatList Delay [
Header 3 "Example",... | 1,230 | false | true | 0 | 15 | 661 | 114 | 63 | 51 | null | null |
raichoo/Idris-dev | src/Idris/Core/CaseTree.hs | bsd-3-clause | isConstType _ _ = False | 23 | isConstType _ _ = False | 23 | isConstType _ _ = False | 23 | false | false | 1 | 5 | 4 | 12 | 5 | 7 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | True if the search is case sensitive.
frrMatchCase :: Lens' FindReplaceRequest (Maybe Bool)
frrMatchCase
= lens _frrMatchCase (\ s a -> s{_frrMatchCase = a}) | 164 | frrMatchCase :: Lens' FindReplaceRequest (Maybe Bool)
frrMatchCase
= lens _frrMatchCase (\ s a -> s{_frrMatchCase = a}) | 121 | frrMatchCase
= lens _frrMatchCase (\ s a -> s{_frrMatchCase = a}) | 67 | true | true | 1 | 9 | 27 | 52 | 25 | 27 | null | null |
Sword-Smith/hfasto | src/MipsRegAlloc.hs | mit | regAllocInst spillingRewrite vtable (Mips.XORI rs rt imm) = do
rsRes <- mapReg vtable rs
rtRes <- mapReg vtable rt
let (pre1, pre2, post1) = spillWrap spillingRewrite vtable rs rt "" rsRes rtRes ""
incr
return $ pre1 ++ pre2 ++ [Mips.XORI rsRes rtRes imm] ++ post1 | 274 | regAllocInst spillingRewrite vtable (Mips.XORI rs rt imm) = do
rsRes <- mapReg vtable rs
rtRes <- mapReg vtable rt
let (pre1, pre2, post1) = spillWrap spillingRewrite vtable rs rt "" rsRes rtRes ""
incr
return $ pre1 ++ pre2 ++ [Mips.XORI rsRes rtRes imm] ++ post1 | 274 | regAllocInst spillingRewrite vtable (Mips.XORI rs rt imm) = do
rsRes <- mapReg vtable rs
rtRes <- mapReg vtable rt
let (pre1, pre2, post1) = spillWrap spillingRewrite vtable rs rt "" rsRes rtRes ""
incr
return $ pre1 ++ pre2 ++ [Mips.XORI rsRes rtRes imm] ++ post1 | 274 | false | false | 0 | 11 | 55 | 119 | 56 | 63 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | The name that all the named ranges share.
nrName :: Lens' NamedRanges (Maybe Text)
nrName = lens _nrName (\ s a -> s{_nrName = a}) | 135 | nrName :: Lens' NamedRanges (Maybe Text)
nrName = lens _nrName (\ s a -> s{_nrName = a}) | 88 | nrName = lens _nrName (\ s a -> s{_nrName = a}) | 47 | true | true | 0 | 9 | 26 | 46 | 25 | 21 | null | null |
pepincho/Functional-Programming | haskell/ex-5.hs | mit | --dist :: Point -> Point -> Double
dist (x1,y1) (x2,y2) = sqrt $ (x1-x2)^2 + (y1-y2)^2 | 86 | dist (x1,y1) (x2,y2) = sqrt $ (x1-x2)^2 + (y1-y2)^2 | 51 | dist (x1,y1) (x2,y2) = sqrt $ (x1-x2)^2 + (y1-y2)^2 | 51 | true | false | 0 | 10 | 15 | 54 | 30 | 24 | null | null |
olsner/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | mkWpEvApps :: [EvTerm] -> HsWrapper
mkWpEvApps args = mk_co_app_fn WpEvApp args | 79 | mkWpEvApps :: [EvTerm] -> HsWrapper
mkWpEvApps args = mk_co_app_fn WpEvApp args | 79 | mkWpEvApps args = mk_co_app_fn WpEvApp args | 43 | false | true | 0 | 6 | 10 | 26 | 13 | 13 | null | null |
hpacheco/HAAP | examples/minimalistic/MMDraw.hs | mit | corAltura :: Altura -> Color
corAltura a = makeColor (0.2*toEnum a) (0.2*toEnum a) (0.15*toEnum a) 1 | 100 | corAltura :: Altura -> Color
corAltura a = makeColor (0.2*toEnum a) (0.2*toEnum a) (0.15*toEnum a) 1 | 100 | corAltura a = makeColor (0.2*toEnum a) (0.2*toEnum a) (0.15*toEnum a) 1 | 71 | false | true | 0 | 8 | 15 | 62 | 29 | 33 | null | null |
juhp/stack | src/Stack/Path.hs | bsd-3-clause | fillPathInfo :: HasEnvConfig env => RIO env PathInfo
fillPathInfo = do
-- We must use a BuildConfig from an EnvConfig to ensure that it contains the
-- full environment info including GHC paths etc.
piBuildConfig <- view $ envConfigL.buildConfigL
-- This is the modified 'bin-path',
-- including... | 977 | fillPathInfo :: HasEnvConfig env => RIO env PathInfo
fillPathInfo = do
-- We must use a BuildConfig from an EnvConfig to ensure that it contains the
-- full environment info including GHC paths etc.
piBuildConfig <- view $ envConfigL.buildConfigL
-- This is the modified 'bin-path',
-- including... | 977 | fillPathInfo = do
-- We must use a BuildConfig from an EnvConfig to ensure that it contains the
-- full environment info including GHC paths etc.
piBuildConfig <- view $ envConfigL.buildConfigL
-- This is the modified 'bin-path',
-- including the local GHC or MSYS if not configured to operate o... | 924 | false | true | 0 | 10 | 218 | 140 | 66 | 74 | null | null |
dmjio/miso | src/Miso/Svg/Attribute.hs | bsd-3-clause | -- | <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/specularConstant>
specularConstant_ :: MisoString -> Attribute action
specularConstant_ = attr "specularConstant" | 179 | specularConstant_ :: MisoString -> Attribute action
specularConstant_ = attr "specularConstant" | 96 | specularConstant_ = attr "specularConstant" | 43 | true | true | 0 | 6 | 13 | 22 | 11 | 11 | null | null |
markbastian/clojure-club | src/aoc/2019/robertkennedy/08.hs | epl-1.0 | main = do
is <- map digitToInt . filter isDigit <$> readFile "08.txt"
let arr = buildArr 25 6 is
print $ checkDigit arr
putStrLn $ drawImage $ flatten arr | 171 | main = do
is <- map digitToInt . filter isDigit <$> readFile "08.txt"
let arr = buildArr 25 6 is
print $ checkDigit arr
putStrLn $ drawImage $ flatten arr | 171 | main = do
is <- map digitToInt . filter isDigit <$> readFile "08.txt"
let arr = buildArr 25 6 is
print $ checkDigit arr
putStrLn $ drawImage $ flatten arr | 171 | false | false | 1 | 11 | 46 | 74 | 30 | 44 | null | null |
forste/haReFork | refactorer/RefacAsPatterns.hs | bsd-3-clause | checkPats name pat (p:ps)
| pat == p = (Pat (HsPAsPat (nameToPNT name) p)) : checkPats name pat ps
| otherwise = p : (checkPats name pat ps) | 143 | checkPats name pat (p:ps)
| pat == p = (Pat (HsPAsPat (nameToPNT name) p)) : checkPats name pat ps
| otherwise = p : (checkPats name pat ps) | 143 | checkPats name pat (p:ps)
| pat == p = (Pat (HsPAsPat (nameToPNT name) p)) : checkPats name pat ps
| otherwise = p : (checkPats name pat ps) | 143 | false | false | 1 | 12 | 30 | 83 | 40 | 43 | null | null |
gsdlab/clafer | src/Language/Clafer/Generator/Html.hs | mit | printCard (CardSome _) = " +" | 30 | printCard (CardSome _) = " +" | 30 | printCard (CardSome _) = " +" | 30 | false | false | 0 | 7 | 6 | 15 | 7 | 8 | null | null |
nevrenato/Hets_Fork | Taxonomy/MMiSSOntologyGraph.hs | gpl-2.0 | showWholeObjectGraph :: MMiSSOntology -> A.GraphInfo -> (String, Int, Int)
-> IO ()
showWholeObjectGraph onto gv (_, _, gid) =
do oldGv <- readIORef gv
A.Result _ err <- purgeGraph gid gv
let objectList = map fst $ getTypedNodes [OntoObject] $ getClassGraph onto
objectGraph = n... | 606 | showWholeObjectGraph :: MMiSSOntology -> A.GraphInfo -> (String, Int, Int)
-> IO ()
showWholeObjectGraph onto gv (_, _, gid) =
do oldGv <- readIORef gv
A.Result _ err <- purgeGraph gid gv
let objectList = map fst $ getTypedNodes [OntoObject] $ getClassGraph onto
objectGraph = n... | 606 | showWholeObjectGraph onto gv (_, _, gid) =
do oldGv <- readIORef gv
A.Result _ err <- purgeGraph gid gv
let objectList = map fst $ getTypedNodes [OntoObject] $ getClassGraph onto
objectGraph = nfilter (`elem` objectList) $ getClassGraph onto
updateDaVinciGraph (makeObjectGraph empty
... | 501 | false | true | 0 | 13 | 187 | 205 | 98 | 107 | null | null |
Teino1978-Corp/Teino1978-Corp-alex | templates/GenericTemplate.hs | bsd-3-clause | alexScanUser user input IBOX(sc)
= case alex_scan_tkn user input ILIT(0) input sc AlexNone of
(AlexNone, input') ->
case alexGetByte input of
Nothing ->
#ifdef ALEX_DEBUG
trace ("End of input.") $
#endif
... | 887 | alexScanUser user input IBOX(sc)
= case alex_scan_tkn user input ILIT(0) input sc AlexNone of
(AlexNone, input') ->
case alexGetByte input of
Nothing ->
#ifdef ALEX_DEBUG
trace ("End of input.") $
#endif
... | 887 | alexScanUser user input IBOX(sc)
= case alex_scan_tkn user input ILIT(0) input sc AlexNone of
(AlexNone, input') ->
case alexGetByte input of
Nothing ->
#ifdef ALEX_DEBUG
trace ("End of input.") $
#endif
... | 887 | false | false | 0 | 13 | 389 | 176 | 92 | 84 | null | null |
brendanhay/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/ModifyAssignees.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
ccwmaUploadType :: Lens' CoursesCourseWorkModifyAssignees (Maybe Text)
ccwmaUploadType
= lens _ccwmaUploadType
(\ s a -> s{_ccwmaUploadType = a}) | 224 | ccwmaUploadType :: Lens' CoursesCourseWorkModifyAssignees (Maybe Text)
ccwmaUploadType
= lens _ccwmaUploadType
(\ s a -> s{_ccwmaUploadType = a}) | 153 | ccwmaUploadType
= lens _ccwmaUploadType
(\ s a -> s{_ccwmaUploadType = a}) | 82 | true | true | 1 | 9 | 34 | 52 | 25 | 27 | null | null |
spacekitteh/compdata | benchmark/Functions/Comp/Desugar.hs | bsd-3-clause | desugExpr :: SugarExpr -> Expr
desugExpr = desug | 48 | desugExpr :: SugarExpr -> Expr
desugExpr = desug | 48 | desugExpr = desug | 17 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
acowley/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | compareFixity :: Fixity -> Fixity
-> (Bool, -- Error please
Bool) -- Associate to the right: a op1 (b op2 c)
compareFixity (Fixity prec1 dir1) (Fixity prec2 dir2)
= case prec1 `compare` prec2 of
GT -> left
LT -> right
EQ -> case (dir1, dir2) of
... | 941 | compareFixity :: Fixity -> Fixity
-> (Bool, -- Error please
Bool)
compareFixity (Fixity prec1 dir1) (Fixity prec2 dir2)
= case prec1 `compare` prec2 of
GT -> left
LT -> right
EQ -> case (dir1, dir2) of
(InfixR, InfixR) -> right
... | 890 | compareFixity (Fixity prec1 dir1) (Fixity prec2 dir2)
= case prec1 `compare` prec2 of
GT -> left
LT -> right
EQ -> case (dir1, dir2) of
(InfixR, InfixR) -> right
(InfixL, InfixL) -> left
_ -> error_please
... | 784 | true | true | 0 | 11 | 410 | 153 | 87 | 66 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | exhilaratedly = id | 18 | exhilaratedly = id | 18 | exhilaratedly = id | 18 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
WraithM/haskell-opaleye | src/Opaleye/Aggregate.hs | bsd-3-clause | stringAgg :: C.Column T.SqlText -> Aggregator (C.Column T.SqlText) (C.Column T.SqlText)
stringAgg = A.makeAggr' . Just . HPQ.AggrStringAggr . IC.unColumn | 153 | stringAgg :: C.Column T.SqlText -> Aggregator (C.Column T.SqlText) (C.Column T.SqlText)
stringAgg = A.makeAggr' . Just . HPQ.AggrStringAggr . IC.unColumn | 153 | stringAgg = A.makeAggr' . Just . HPQ.AggrStringAggr . IC.unColumn | 65 | false | true | 0 | 9 | 18 | 65 | 32 | 33 | null | null |
edahlgren/protocol-buffers | hprotoc/Text/ProtocolBuffers/ProtoCompile/Gen.hs | apache-2.0 | -- name is imported, make Qual
--------------------------------------------
-- Define LANGUAGE options as [ModulePramga]
--------------------------------------------
modulePragmas :: [ModulePragma]
modulePragmas = [ LanguagePragma src (map Ident ["BangPatterns","DeriveDataTypeable","FlexibleInstances","MultiParamTypeC... | 331 | modulePragmas :: [ModulePragma]
modulePragmas = [ LanguagePragma src (map Ident ["BangPatterns","DeriveDataTypeable","FlexibleInstances","MultiParamTypeClasses"]) ] | 164 | modulePragmas = [ LanguagePragma src (map Ident ["BangPatterns","DeriveDataTypeable","FlexibleInstances","MultiParamTypeClasses"]) ] | 132 | true | true | 0 | 10 | 26 | 53 | 29 | 24 | null | null |
unisonweb/platform | codebase2/util/U/Util/Set.hs | mit | mapMaybe :: Ord b => (a -> Maybe b) -> Set a -> Set b
mapMaybe f = Set.fromList . Maybe.mapMaybe f . Set.toList | 111 | mapMaybe :: Ord b => (a -> Maybe b) -> Set a -> Set b
mapMaybe f = Set.fromList . Maybe.mapMaybe f . Set.toList | 111 | mapMaybe f = Set.fromList . Maybe.mapMaybe f . Set.toList | 57 | false | true | 0 | 9 | 23 | 62 | 29 | 33 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110426set1.hs | gpl-3.0 | totaltasklistcluster :: ScriptSetup -> ClusterSetup ZpHFull -> ClusterWork ZpHFull
totaltasklistcluster ssetup csetup =
let lst = totaltasklist ssetup csetup
in ClusterWork (head lst) lst | 195 | totaltasklistcluster :: ScriptSetup -> ClusterSetup ZpHFull -> ClusterWork ZpHFull
totaltasklistcluster ssetup csetup =
let lst = totaltasklist ssetup csetup
in ClusterWork (head lst) lst | 194 | totaltasklistcluster ssetup csetup =
let lst = totaltasklist ssetup csetup
in ClusterWork (head lst) lst | 111 | false | true | 0 | 9 | 31 | 57 | 26 | 31 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_WOLOF :: Int
wxLANGUAGE_WOLOF = 224 | 46 | wxLANGUAGE_WOLOF :: Int
wxLANGUAGE_WOLOF = 224 | 46 | wxLANGUAGE_WOLOF = 224 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
jgm/pandoc-citeproc | src/Text/CSL/Proc/Disamb.hs | bsd-3-clause | -- | Add the year suffix to the year. Needed for disambiguation.
addYearSuffix :: Output -> Output
addYearSuffix o
| OYear y k f <- o = Output [ OYear y k emptyFormatting
, OYearSuf "" k [] emptyFormatting] f
| ODate (x:xs) <- o = if any hasYear xs
... | 824 | addYearSuffix :: Output -> Output
addYearSuffix o
| OYear y k f <- o = Output [ OYear y k emptyFormatting
, OYearSuf "" k [] emptyFormatting] f
| ODate (x:xs) <- o = if any hasYear xs
then Output (x : [addYearSuffix $ ODate xs]) emptyFormat... | 759 | addYearSuffix o
| OYear y k f <- o = Output [ OYear y k emptyFormatting
, OYearSuf "" k [] emptyFormatting] f
| ODate (x:xs) <- o = if any hasYear xs
then Output (x : [addYearSuffix $ ODate xs]) emptyFormatting
... | 725 | true | true | 1 | 13 | 361 | 265 | 130 | 135 | null | null |
ulricha/dsh | src/Database/DSH/CL/Typing.hs | bsd-3-clause | inferTy (Lit ty _) = pure ty | 38 | inferTy (Lit ty _) = pure ty | 38 | inferTy (Lit ty _) = pure ty | 38 | false | false | 0 | 7 | 16 | 20 | 9 | 11 | null | null |
atwupack/LearnOpenGL | app/1_Getting-started/2_Hello-triangle/Hello-triangle2.hs | bsd-3-clause | fragmentShaderSource = "#version 330 core\n"
++ "out vec4 color;\n"
++ "void main()\n"
++ "{\n"
++ "color = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
++ "}\n" | 169 | fragmentShaderSource = "#version 330 core\n"
++ "out vec4 color;\n"
++ "void main()\n"
++ "{\n"
++ "color = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
++ "}\n" | 169 | fragmentShaderSource = "#version 330 core\n"
++ "out vec4 color;\n"
++ "void main()\n"
++ "{\n"
++ "color = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
++ "}\n" | 169 | false | false | 10 | 5 | 42 | 32 | 13 | 19 | null | null |
Ilydocus/frp-prototype | src/ue.hs | bsd-3-clause | sendResponse :: (RrcMessage,Socket) -> IO ()
sendResponse (message,sock) = do
_ <- send sock $ encode message
return () | 177 | sendResponse :: (RrcMessage,Socket) -> IO ()
sendResponse (message,sock) = do
_ <- send sock $ encode message
return () | 177 | sendResponse (message,sock) = do
_ <- send sock $ encode message
return () | 132 | false | true | 0 | 9 | 76 | 64 | 30 | 34 | null | null |
nushio3/ghc | libraries/base/Foreign/C/Error.hs | bsd-3-clause | isValidErrno :: Errno -> Bool
--
-- the configure script sets all invalid "errno"s to -1
--
isValidErrno (Errno errno) = errno /= -1 | 147 | isValidErrno :: Errno -> Bool
isValidErrno (Errno errno) = errno /= -1 | 85 | isValidErrno (Errno errno) = errno /= -1 | 41 | true | true | 0 | 7 | 38 | 33 | 18 | 15 | null | null |
miguelpagano/equ | Equ/Parser/Types.hs | gpl-3.0 | -- | Parser para el tipo variable.
parseTyVar :: ParserT a Type
parseTyVar = try $ lower >>= \l -> many letter >>= \t ->
whiteSpace lexerTy >>
return (tyVar (l:t)) | 190 | parseTyVar :: ParserT a Type
parseTyVar = try $ lower >>= \l -> many letter >>= \t ->
whiteSpace lexerTy >>
return (tyVar (l:t)) | 155 | parseTyVar = try $ lower >>= \l -> many letter >>= \t ->
whiteSpace lexerTy >>
return (tyVar (l:t)) | 126 | true | true | 0 | 14 | 57 | 65 | 33 | 32 | null | null |
jthornber/XMonadContrib | XMonad/Hooks/DebugEvents.hs | bsd-3-clause | dumpProp _ "WM_PROTOCOLS" = dumpArray dumpAtom | 75 | dumpProp _ "WM_PROTOCOLS" = dumpArray dumpAtom | 75 | dumpProp _ "WM_PROTOCOLS" = dumpArray dumpAtom | 75 | false | false | 1 | 5 | 34 | 16 | 6 | 10 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.