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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ian-Stewart-Binks/courseography | hs/Scripts.hs | gpl-3.0 | analyticsScripts :: [String]
analyticsScripts = [
"/static/js/common/google_analytics.js"
] | 99 | analyticsScripts :: [String]
analyticsScripts = [
"/static/js/common/google_analytics.js"
] | 99 | analyticsScripts = [
"/static/js/common/google_analytics.js"
] | 70 | false | true | 0 | 5 | 15 | 17 | 10 | 7 | null | null |
bkoropoff/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyTTNameType t@(P _ n _) | n == reflm "Ref" = return $ Ref | 61 | reifyTTNameType t@(P _ n _) | n == reflm "Ref" = return $ Ref | 61 | reifyTTNameType t@(P _ n _) | n == reflm "Ref" = return $ Ref | 61 | false | false | 0 | 9 | 13 | 39 | 18 | 21 | null | null |
acowley/ply-loader | src/PLY/Binary.hs | bsd-3-clause | getScalarT Tfloat = Sfloat . unsafeCoerce <$> getWord32host | 59 | getScalarT Tfloat = Sfloat . unsafeCoerce <$> getWord32host | 59 | getScalarT Tfloat = Sfloat . unsafeCoerce <$> getWord32host | 59 | false | false | 0 | 6 | 7 | 17 | 8 | 9 | null | null |
agentm/project-m36 | src/lib/ProjectM36/TransactionGraph.hs | unlicense | createMergeTransaction stamp' newId strat@UnionMergeStrategy t2 =
createUnionMergeTransaction stamp' newId strat t2 | 117 | createMergeTransaction stamp' newId strat@UnionMergeStrategy t2 =
createUnionMergeTransaction stamp' newId strat t2 | 117 | createMergeTransaction stamp' newId strat@UnionMergeStrategy t2 =
createUnionMergeTransaction stamp' newId strat t2 | 117 | false | false | 0 | 6 | 12 | 27 | 13 | 14 | null | null |
shlevy/ghc | compiler/types/OptCoercion.hs | bsd-3-clause | -- Eta rules
opt_trans_rule is co1@(TyConAppCo r tc cos1) co2
| Just cos2 <- etaTyConAppCo_maybe tc co2
= ASSERT( cos1 `equalLength` cos2 )
fireTransRule "EtaCompL" co1 co2 $
mkTyConAppCo r tc (opt_transList is cos1 cos2) | 233 | opt_trans_rule is co1@(TyConAppCo r tc cos1) co2
| Just cos2 <- etaTyConAppCo_maybe tc co2
= ASSERT( cos1 `equalLength` cos2 )
fireTransRule "EtaCompL" co1 co2 $
mkTyConAppCo r tc (opt_transList is cos1 cos2) | 220 | opt_trans_rule is co1@(TyConAppCo r tc cos1) co2
| Just cos2 <- etaTyConAppCo_maybe tc co2
= ASSERT( cos1 `equalLength` cos2 )
fireTransRule "EtaCompL" co1 co2 $
mkTyConAppCo r tc (opt_transList is cos1 cos2) | 220 | true | false | 0 | 9 | 46 | 88 | 42 | 46 | null | null |
AlexanderPankiv/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | -- | Iterated application of 'mkArrowKind'
mkArrowKinds :: [Kind] -> Kind -> Kind
mkArrowKinds arg_kinds result_kind = foldr mkArrowKind result_kind arg_kinds | 158 | mkArrowKinds :: [Kind] -> Kind -> Kind
mkArrowKinds arg_kinds result_kind = foldr mkArrowKind result_kind arg_kinds | 115 | mkArrowKinds arg_kinds result_kind = foldr mkArrowKind result_kind arg_kinds | 76 | true | true | 0 | 6 | 20 | 39 | 19 | 20 | null | null |
jtapolczai/FileSync | System/IO/FileSync/JoinStrategies.hs | apache-2.0 | showFileAction (Delete LeftSide fp) = "D L: " ++ fp | 54 | showFileAction (Delete LeftSide fp) = "D L: " ++ fp | 54 | showFileAction (Delete LeftSide fp) = "D L: " ++ fp | 54 | false | false | 0 | 6 | 12 | 22 | 10 | 12 | null | null |
kojiromike/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | process fn (DocStr (Right c) _) -- constants only have overviews
= do ist <- getIState
iRenderResult $ pprintConstDocs ist c (constDocs c) | 149 | process fn (DocStr (Right c) _) -- constants only have overviews
= do ist <- getIState
iRenderResult $ pprintConstDocs ist c (constDocs c) | 149 | process fn (DocStr (Right c) _) -- constants only have overviews
= do ist <- getIState
iRenderResult $ pprintConstDocs ist c (constDocs c) | 149 | false | false | 0 | 10 | 33 | 53 | 25 | 28 | null | null |
WSCU/JSEuterpea | Euterpea Examples/Transformations.hs | gpl-3.0 | --(G# B D#) gs minor
mKeep11 = tr (tp mKeep1) | 48 | mKeep11 = tr (tp mKeep1) | 24 | mKeep11 = tr (tp mKeep1) | 24 | true | false | 0 | 7 | 12 | 16 | 8 | 8 | null | null |
xmonad/xmonad-contrib | XMonad/Actions/Search.hs | bsd-3-clause | {- | This function wraps up a search engine and creates a new one, which works
like the argument, but goes directly to a URL if one is given rather than
searching.
> myIntelligentGoogleEngine = intelligent google
Now if you search for https:\/\/xmonad.org it will directly open in your browser-}
intelligent :: SearchEngine -> SearchEngine
intelligent (SearchEngine name site) = searchEngineF name (\s -> if takeWhile (/= ':') s `elem` ["http", "https", "ftp"] then s else site s) | 491 | intelligent :: SearchEngine -> SearchEngine
intelligent (SearchEngine name site) = searchEngineF name (\s -> if takeWhile (/= ':') s `elem` ["http", "https", "ftp"] then s else site s) | 184 | intelligent (SearchEngine name site) = searchEngineF name (\s -> if takeWhile (/= ':') s `elem` ["http", "https", "ftp"] then s else site s) | 140 | true | true | 0 | 11 | 88 | 75 | 42 | 33 | null | null |
onponomarev/ganeti | src/Ganeti/Query/Filter.hs | bsd-2-clause | -- test strings via 'compareNameComponent'
eqFilter QffHostname (QuotedString y) (JSString x) =
Ok $ goodLookupResult (fromJSString x `compareNameComponent` y) | 161 | eqFilter QffHostname (QuotedString y) (JSString x) =
Ok $ goodLookupResult (fromJSString x `compareNameComponent` y) | 118 | eqFilter QffHostname (QuotedString y) (JSString x) =
Ok $ goodLookupResult (fromJSString x `compareNameComponent` y) | 118 | true | false | 0 | 9 | 20 | 45 | 23 | 22 | null | null |
Kinokkory/Kinokkory.github.io | okmij/zipper/ZipperTraversable.hs | gpl-2.0 | zip_up (Z _ k) = zip_up $ k Nothing | 37 | zip_up (Z _ k) = zip_up $ k Nothing | 37 | zip_up (Z _ k) = zip_up $ k Nothing | 37 | false | false | 0 | 7 | 10 | 24 | 11 | 13 | null | null |
osa1/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | itBitsName IT16 = "Bits16" | 26 | itBitsName IT16 = "Bits16" | 26 | itBitsName IT16 = "Bits16" | 26 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F14.hs | bsd-3-clause | -- glIndexfv -------------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glIndex.xml OpenGL 2.x>.
glIndexfv
:: MonadIO m
=> Ptr GLfloat -- ^ @c@ pointing to @1@ element of type @ColorIndexValueF@.
-> m ()
glIndexfv v1 = liftIO $ dyn44 ptr_glIndexfv v1 | 331 | glIndexfv
:: MonadIO m
=> Ptr GLfloat -- ^ @c@ pointing to @1@ element of type @ColorIndexValueF@.
-> m ()
glIndexfv v1 = liftIO $ dyn44 ptr_glIndexfv v1 | 159 | glIndexfv v1 = liftIO $ dyn44 ptr_glIndexfv v1 | 46 | true | true | 2 | 9 | 45 | 50 | 23 | 27 | null | null |
utky/lycopene | src/Lycopene/Core/Identifier.hs | apache-2.0 | domain :: Domain -> [Word8]
domain = B.unpack . C.pack . ("/" ++ ) | 66 | domain :: Domain -> [Word8]
domain = B.unpack . C.pack . ("/" ++ ) | 66 | domain = B.unpack . C.pack . ("/" ++ ) | 38 | false | true | 0 | 8 | 13 | 41 | 20 | 21 | null | null |
gspia/half-baked | hb6-filesending-reflex/server/Main.hs | bsd-2-clause | ------------------------------------------------------------------------------
-- See
-- https://github.com/jaspervdj/websockets-snap/blob/master/example/server.hs
-- and
-- https://github.com/jaspervdj/websockets/tree/master/example
newWSServerState :: WSServerState
newWSServerState = [] | 290 | newWSServerState :: WSServerState
newWSServerState = [] | 55 | newWSServerState = [] | 21 | true | true | 0 | 6 | 15 | 25 | 13 | 12 | null | null |
eklavya/Idris-dev | src/Idris/ElabDecls.hs | bsd-3-clause | elabDecl' what info (PInterface doc s f cs n nfc ps pdocs fds ds cn cd)
| what /= EDefns
= do logElab 1 $ "Elaborating interface " ++ show n
elabInterface info (s { syn_params = [] }) doc f cs n nfc ps pdocs fds ds cn cd | 235 | elabDecl' what info (PInterface doc s f cs n nfc ps pdocs fds ds cn cd)
| what /= EDefns
= do logElab 1 $ "Elaborating interface " ++ show n
elabInterface info (s { syn_params = [] }) doc f cs n nfc ps pdocs fds ds cn cd | 235 | elabDecl' what info (PInterface doc s f cs n nfc ps pdocs fds ds cn cd)
| what /= EDefns
= do logElab 1 $ "Elaborating interface " ++ show n
elabInterface info (s { syn_params = [] }) doc f cs n nfc ps pdocs fds ds cn cd | 235 | false | false | 0 | 12 | 64 | 111 | 53 | 58 | null | null |
mgold/Elm | src/Canonicalize.hs | bsd-3-clause | -- CONVERSIONS
declsToValues :: D.Valid -> [Var.Value]
declsToValues (D.Decls defs unions aliases _) =
let
fromDef (A.A _ def) =
map Var.Value (P.boundVarList (Valid.getPattern def))
fromUnion (A.A _ (D.Type name _ ctors)) =
Var.Union name (Var.Listing (map fst ctors) False)
fromAlias (A.A _ (D.Type name _ tipe)) =
case tipe of
A.A _ (Type.RRecord _ Nothing) ->
[ Var.Alias name, Var.Value name ]
_ ->
[ Var.Alias name ]
in
concat
[ map fromUnion unions
, concatMap fromAlias aliases
, concatMap fromDef defs
] | 615 | declsToValues :: D.Valid -> [Var.Value]
declsToValues (D.Decls defs unions aliases _) =
let
fromDef (A.A _ def) =
map Var.Value (P.boundVarList (Valid.getPattern def))
fromUnion (A.A _ (D.Type name _ ctors)) =
Var.Union name (Var.Listing (map fst ctors) False)
fromAlias (A.A _ (D.Type name _ tipe)) =
case tipe of
A.A _ (Type.RRecord _ Nothing) ->
[ Var.Alias name, Var.Value name ]
_ ->
[ Var.Alias name ]
in
concat
[ map fromUnion unions
, concatMap fromAlias aliases
, concatMap fromDef defs
] | 598 | declsToValues (D.Decls defs unions aliases _) =
let
fromDef (A.A _ def) =
map Var.Value (P.boundVarList (Valid.getPattern def))
fromUnion (A.A _ (D.Type name _ ctors)) =
Var.Union name (Var.Listing (map fst ctors) False)
fromAlias (A.A _ (D.Type name _ tipe)) =
case tipe of
A.A _ (Type.RRecord _ Nothing) ->
[ Var.Alias name, Var.Value name ]
_ ->
[ Var.Alias name ]
in
concat
[ map fromUnion unions
, concatMap fromAlias aliases
, concatMap fromDef defs
] | 558 | true | true | 0 | 15 | 186 | 256 | 126 | 130 | null | null |
continuouspi/cpiwb | CPi/Signals.hs | gpl-3.0 | -- min common cover
test1 = not (uniform tSig1 tSig2) | 53 | test1 = not (uniform tSig1 tSig2) | 33 | test1 = not (uniform tSig1 tSig2) | 33 | true | false | 0 | 7 | 9 | 18 | 9 | 9 | null | null |
AaronFriel/eff-experiments | src/Eff/Internal/Eff1.hs | bsd-3-clause | tell :: Member (Writer o) r => o -> Eff r ()
tell o = send $ Writer o | 69 | tell :: Member (Writer o) r => o -> Eff r ()
tell o = send $ Writer o | 69 | tell o = send $ Writer o | 24 | false | true | 0 | 8 | 18 | 47 | 22 | 25 | null | null |
DavidAlphaFox/ghc | libraries/terminfo/System/Console/Terminfo/Color.hs | bsd-3-clause | withForegroundColor :: TermStr s => Capability (Color -> s -> s)
withForegroundColor = withColorCmd setForegroundColor | 118 | withForegroundColor :: TermStr s => Capability (Color -> s -> s)
withForegroundColor = withColorCmd setForegroundColor | 118 | withForegroundColor = withColorCmd setForegroundColor | 53 | false | true | 0 | 9 | 14 | 35 | 17 | 18 | null | null |
jgoerzen/dtmconv | HaXml-1.12/src/Text/XML/HaXml/Html/Pretty.hs | gpl-2.0 | cp (Choice cs m) = parens (hcat (intersperse (text "|") (map cp cs))) <>
modifier m | 116 | cp (Choice cs m) = parens (hcat (intersperse (text "|") (map cp cs))) <>
modifier m | 116 | cp (Choice cs m) = parens (hcat (intersperse (text "|") (map cp cs))) <>
modifier m | 116 | false | false | 0 | 12 | 48 | 55 | 26 | 29 | null | null |
spacekitteh/compdata | src/Data/Comp/Multi/Variables.hs | bsd-3-clause | compSubst :: (Ord v, HasVars f v, HTraversable f)
=> CxtSubst h a f v -> CxtSubst h a f v -> CxtSubst h a f v
compSubst s1 = Map.map (\ (A t) -> A (appSubst s1 t)) | 173 | compSubst :: (Ord v, HasVars f v, HTraversable f)
=> CxtSubst h a f v -> CxtSubst h a f v -> CxtSubst h a f v
compSubst s1 = Map.map (\ (A t) -> A (appSubst s1 t)) | 173 | compSubst s1 = Map.map (\ (A t) -> A (appSubst s1 t)) | 53 | false | true | 0 | 10 | 48 | 106 | 51 | 55 | null | null |
cameronbwhite/ComputationalStructures | Haskell/RegExp.hs | bsd-3-clause | parseBinary :: (LogicExp -> LogicExp -> LogicExp) -> String -> Parser LogicExp
parseBinary exp str = do
spaces
char '('
spaces
x <- parseExpr
spaces
string str
spaces
y <- parseExpr
spaces
char ')'
spaces
return $ exp x y | 269 | parseBinary :: (LogicExp -> LogicExp -> LogicExp) -> String -> Parser LogicExp
parseBinary exp str = do
spaces
char '('
spaces
x <- parseExpr
spaces
string str
spaces
y <- parseExpr
spaces
char ')'
spaces
return $ exp x y | 269 | parseBinary exp str = do
spaces
char '('
spaces
x <- parseExpr
spaces
string str
spaces
y <- parseExpr
spaces
char ')'
spaces
return $ exp x y | 190 | false | true | 0 | 8 | 87 | 100 | 42 | 58 | null | null |
bamos/snowglobe | analysis/SnowGlobe/Queries.hs | apache-2.0 | dayReport:: TimeZone -> LocalTime -> [EnrichedEvent] -> String
dayReport tz queryDay events = formatReport report
where report = [("Statistics", eventStats daysEvents),
("Pages", dayPages),
("Referrers", dayReferrers),
("Organizations", organizations),
("Locations", locations)]
-- ("Visitors", intercalate "\n\n" visitorInfo)]
dayReferrers = sortedEventInfo referrerStr $ map head visitors
referrerStr = fromMaybe "" . prettyReferrer
dayPages = sortedEventInfo pageUrl daysEvents
organizations = sortedEventInfo orgStr $ map head visitors
orgStr = getOrganization . userIpaddress
locations = sortedEventInfo locationStr $ map head visitors
locationStr e = locationInfo (geoCity e) (geoRegionName e) (geoCountry e)
-- visitorInfo = map getVisitorInfo sortedVisitors
-- sortedVisitors = sortBy (flip compare `on` length) visitors
visitors = groupByVisitors daysEvents
daysEvents = getDaysEvents tz queryDay events
-- Summarize a week's statistics, pages, and visitors. | 1,186 | dayReport:: TimeZone -> LocalTime -> [EnrichedEvent] -> String
dayReport tz queryDay events = formatReport report
where report = [("Statistics", eventStats daysEvents),
("Pages", dayPages),
("Referrers", dayReferrers),
("Organizations", organizations),
("Locations", locations)]
-- ("Visitors", intercalate "\n\n" visitorInfo)]
dayReferrers = sortedEventInfo referrerStr $ map head visitors
referrerStr = fromMaybe "" . prettyReferrer
dayPages = sortedEventInfo pageUrl daysEvents
organizations = sortedEventInfo orgStr $ map head visitors
orgStr = getOrganization . userIpaddress
locations = sortedEventInfo locationStr $ map head visitors
locationStr e = locationInfo (geoCity e) (geoRegionName e) (geoCountry e)
-- visitorInfo = map getVisitorInfo sortedVisitors
-- sortedVisitors = sortBy (flip compare `on` length) visitors
visitors = groupByVisitors daysEvents
daysEvents = getDaysEvents tz queryDay events
-- Summarize a week's statistics, pages, and visitors. | 1,186 | dayReport tz queryDay events = formatReport report
where report = [("Statistics", eventStats daysEvents),
("Pages", dayPages),
("Referrers", dayReferrers),
("Organizations", organizations),
("Locations", locations)]
-- ("Visitors", intercalate "\n\n" visitorInfo)]
dayReferrers = sortedEventInfo referrerStr $ map head visitors
referrerStr = fromMaybe "" . prettyReferrer
dayPages = sortedEventInfo pageUrl daysEvents
organizations = sortedEventInfo orgStr $ map head visitors
orgStr = getOrganization . userIpaddress
locations = sortedEventInfo locationStr $ map head visitors
locationStr e = locationInfo (geoCity e) (geoRegionName e) (geoCountry e)
-- visitorInfo = map getVisitorInfo sortedVisitors
-- sortedVisitors = sortBy (flip compare `on` length) visitors
visitors = groupByVisitors daysEvents
daysEvents = getDaysEvents tz queryDay events
-- Summarize a week's statistics, pages, and visitors. | 1,123 | false | true | 8 | 9 | 335 | 259 | 124 | 135 | null | null |
brendanhay/gogol | gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs | mpl-2.0 | -- | Output only. The type of analysis. This field can be used as a filter in
-- list requests.
nKind :: Lens' Note (Maybe NoteKind)
nKind = lens _nKind (\ s a -> s{_nKind = a}) | 177 | nKind :: Lens' Note (Maybe NoteKind)
nKind = lens _nKind (\ s a -> s{_nKind = a}) | 81 | nKind = lens _nKind (\ s a -> s{_nKind = a}) | 44 | true | true | 1 | 9 | 36 | 50 | 26 | 24 | null | null |
rueshyna/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs | mpl-2.0 | -- | OAuth bearer token.
psgBearerToken :: Lens' ProjectsSinksGet (Maybe Text)
psgBearerToken
= lens _psgBearerToken
(\ s a -> s{_psgBearerToken = a}) | 158 | psgBearerToken :: Lens' ProjectsSinksGet (Maybe Text)
psgBearerToken
= lens _psgBearerToken
(\ s a -> s{_psgBearerToken = a}) | 133 | psgBearerToken
= lens _psgBearerToken
(\ s a -> s{_psgBearerToken = a}) | 79 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | URL for the full review text, for reviews gathered from the web.
rFullTextURL :: Lens' Review (Maybe Text)
rFullTextURL
= lens _rFullTextURL (\ s a -> s{_rFullTextURL = a}) | 179 | rFullTextURL :: Lens' Review (Maybe Text)
rFullTextURL
= lens _rFullTextURL (\ s a -> s{_rFullTextURL = a}) | 109 | rFullTextURL
= lens _rFullTextURL (\ s a -> s{_rFullTextURL = a}) | 67 | true | true | 1 | 9 | 32 | 50 | 25 | 25 | null | null |
tsahyt/clingo-haskell | src/Clingo/Internal/AST.hs | mit | rawTerm (TermBOp l u) = AstTermBOp <$> rawLocation l
<*> (new =<< rawBinaryOperation u) | 123 | rawTerm (TermBOp l u) = AstTermBOp <$> rawLocation l
<*> (new =<< rawBinaryOperation u) | 123 | rawTerm (TermBOp l u) = AstTermBOp <$> rawLocation l
<*> (new =<< rawBinaryOperation u) | 123 | false | false | 0 | 8 | 49 | 38 | 18 | 20 | null | null |
snoyberg/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | ctEvCoercion :: CtEvidence -> Coercion
ctEvCoercion ev@(CtWanted { ctev_dest = HoleDest hole, ctev_pred = pred })
= case getEqPredTys_maybe pred of
Just (role, ty1, ty2) -> mkHoleCo hole role ty1 ty2
_ -> pprPanic "ctEvTerm" (ppr ev) | 267 | ctEvCoercion :: CtEvidence -> Coercion
ctEvCoercion ev@(CtWanted { ctev_dest = HoleDest hole, ctev_pred = pred })
= case getEqPredTys_maybe pred of
Just (role, ty1, ty2) -> mkHoleCo hole role ty1 ty2
_ -> pprPanic "ctEvTerm" (ppr ev) | 267 | ctEvCoercion ev@(CtWanted { ctev_dest = HoleDest hole, ctev_pred = pred })
= case getEqPredTys_maybe pred of
Just (role, ty1, ty2) -> mkHoleCo hole role ty1 ty2
_ -> pprPanic "ctEvTerm" (ppr ev) | 228 | false | true | 7 | 10 | 70 | 105 | 49 | 56 | null | null |
vdweegen/UvA-Software_Testing | Lab5/Willem/Lecture5'.hs | gpl-3.0 | succNode (s,p:ps) = extendNode (s,ps) p | 39 | succNode (s,p:ps) = extendNode (s,ps) p | 39 | succNode (s,p:ps) = extendNode (s,ps) p | 39 | false | false | 0 | 6 | 5 | 31 | 16 | 15 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Tile.hs | mit | -------------------------------------------------------------------------------
-- Contruction
-------------------------------------------------------------------------------
mkCoin, mkBamboo, mkCharacter :: Values -> Tile
mkCoin = Tile SC | 245 | mkCoin, mkBamboo, mkCharacter :: Values -> Tile
mkCoin = Tile SC | 69 | mkCoin = Tile SC | 21 | true | true | 2 | 5 | 20 | 29 | 16 | 13 | null | null |
sopvop/cabal | Cabal/Distribution/Simple/Command.hs | bsd-3-clause | getChoiceByLongFlag _ _ =
error "Distribution.command.getChoiceByLongFlag: expected a choice option" | 102 | getChoiceByLongFlag _ _ =
error "Distribution.command.getChoiceByLongFlag: expected a choice option" | 102 | getChoiceByLongFlag _ _ =
error "Distribution.command.getChoiceByLongFlag: expected a choice option" | 102 | false | false | 0 | 5 | 11 | 14 | 6 | 8 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_WEIGHT_ARRAY_STRIDE_OES :: GLenum
gl_WEIGHT_ARRAY_STRIDE_OES = 0x86AA | 72 | gl_WEIGHT_ARRAY_STRIDE_OES :: GLenum
gl_WEIGHT_ARRAY_STRIDE_OES = 0x86AA | 72 | gl_WEIGHT_ARRAY_STRIDE_OES = 0x86AA | 35 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
jchmrt/btjchm | Calc.hs | mit | rpn :: [Out] -> Double
rpn operators = rpn' operators []
where
rpn' :: [Out] -> [Double] -> Double
rpn' [] (f:_) = f
rpn' (Num f:ops) fs = rpn' ops (f:fs)
rpn' (Op c:ops) fs = rpn' ops (lookupOp c fs)
rpn' _ _ = nan | 237 | rpn :: [Out] -> Double
rpn operators = rpn' operators []
where
rpn' :: [Out] -> [Double] -> Double
rpn' [] (f:_) = f
rpn' (Num f:ops) fs = rpn' ops (f:fs)
rpn' (Op c:ops) fs = rpn' ops (lookupOp c fs)
rpn' _ _ = nan | 237 | rpn operators = rpn' operators []
where
rpn' :: [Out] -> [Double] -> Double
rpn' [] (f:_) = f
rpn' (Num f:ops) fs = rpn' ops (f:fs)
rpn' (Op c:ops) fs = rpn' ops (lookupOp c fs)
rpn' _ _ = nan | 214 | false | true | 0 | 8 | 68 | 148 | 74 | 74 | null | null |
polux/hgom | src/Gom/CodeGen/Common/Helpers.hs | gpl-3.0 | while = text "while" | 25 | while = text "while" | 25 | while = text "while" | 25 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
IreneKnapp/Faction | libfaction/Distribution/Simple/Program/Builtin.hs | bsd-3-clause | ghcProgram :: Program
ghcProgram = (simpleProgram "ghc") {
programFindVersion = findProgramVersion "--numeric-version" id
} | 129 | ghcProgram :: Program
ghcProgram = (simpleProgram "ghc") {
programFindVersion = findProgramVersion "--numeric-version" id
} | 129 | ghcProgram = (simpleProgram "ghc") {
programFindVersion = findProgramVersion "--numeric-version" id
} | 107 | false | true | 0 | 8 | 19 | 37 | 17 | 20 | null | null |
sethfowler/pygmalion | src/Pygmalion/Database/IO.hs | bsd-3-clause | updateDef :: DBHandle -> DefUpdate -> IO ()
updateDef h (DefUpdate n usrHash sfHash l c k ctx) = do
let kind = fromEnum k
execStatement h updateDefStmt (usrHash, n, sfHash, l, c, kind, ctx) | 197 | updateDef :: DBHandle -> DefUpdate -> IO ()
updateDef h (DefUpdate n usrHash sfHash l c k ctx) = do
let kind = fromEnum k
execStatement h updateDefStmt (usrHash, n, sfHash, l, c, kind, ctx) | 197 | updateDef h (DefUpdate n usrHash sfHash l c k ctx) = do
let kind = fromEnum k
execStatement h updateDefStmt (usrHash, n, sfHash, l, c, kind, ctx) | 153 | false | true | 0 | 10 | 42 | 90 | 46 | 44 | null | null |
jozefg/hi | src/TC/Unify.hs | mit | nullSubst :: Subst t
nullSubst = M.empty | 40 | nullSubst :: Subst t
nullSubst = M.empty | 40 | nullSubst = M.empty | 19 | false | true | 0 | 5 | 6 | 16 | 8 | 8 | null | null |
termite2/tsl | Frontend/Inline.hs | bsd-3-clause | ctxInsTmpVar :: Maybe Ident -> I.Type -> State CFACtx I.Var
ctxInsTmpVar mn t = do
lst <- gets ctxLastVar
mepid <- gets ctxEPID
sc <- gets ctxScope
let nsid = maybe (NSID Nothing Nothing) (\epid -> epid2nsid epid sc) mepid
vname = mkVarNameS nsid $ maybe ("$tmp" ++ show (lst + 1)) sname mn
v = I.Var False I.VarTmp vname t
modify $ (\ctx -> ctx { ctxLastVar = lst + 1
, ctxVar = v:(ctxVar ctx)})
return v | 480 | ctxInsTmpVar :: Maybe Ident -> I.Type -> State CFACtx I.Var
ctxInsTmpVar mn t = do
lst <- gets ctxLastVar
mepid <- gets ctxEPID
sc <- gets ctxScope
let nsid = maybe (NSID Nothing Nothing) (\epid -> epid2nsid epid sc) mepid
vname = mkVarNameS nsid $ maybe ("$tmp" ++ show (lst + 1)) sname mn
v = I.Var False I.VarTmp vname t
modify $ (\ctx -> ctx { ctxLastVar = lst + 1
, ctxVar = v:(ctxVar ctx)})
return v | 480 | ctxInsTmpVar mn t = do
lst <- gets ctxLastVar
mepid <- gets ctxEPID
sc <- gets ctxScope
let nsid = maybe (NSID Nothing Nothing) (\epid -> epid2nsid epid sc) mepid
vname = mkVarNameS nsid $ maybe ("$tmp" ++ show (lst + 1)) sname mn
v = I.Var False I.VarTmp vname t
modify $ (\ctx -> ctx { ctxLastVar = lst + 1
, ctxVar = v:(ctxVar ctx)})
return v | 420 | false | true | 0 | 16 | 153 | 206 | 100 | 106 | null | null |
edsko/cabal | cabal-install/Distribution/Client/Upload.hs | bsd-3-clause | upload :: Verbosity -> RepoContext
-> Maybe Username -> Maybe Password -> [FilePath]
-> IO ()
upload verbosity repoCtxt mUsername mPassword paths = do
let repos = repoContextRepos repoCtxt
transport <- repoContextGetTransport repoCtxt
targetRepo <-
case [ remoteRepo | Just remoteRepo <- map maybeRepoRemote repos ] of
[] -> die "Cannot upload. No remote repositories are configured."
rs -> remoteRepoTryUpgradeToHttps transport (last rs)
let targetRepoURI = remoteRepoURI targetRepo
rootIfEmpty x = if null x then "/" else x
uploadURI = targetRepoURI {
uriPath = rootIfEmpty (uriPath targetRepoURI)
FilePath.Posix.</> "upload"
}
Username username <- maybe promptUsername return mUsername
Password password <- maybe promptPassword return mPassword
let auth = Just (username,password)
forM_ paths $ \path -> do
notice verbosity $ "Uploading " ++ path ++ "... "
handlePackage transport verbosity uploadURI auth path | 1,052 | upload :: Verbosity -> RepoContext
-> Maybe Username -> Maybe Password -> [FilePath]
-> IO ()
upload verbosity repoCtxt mUsername mPassword paths = do
let repos = repoContextRepos repoCtxt
transport <- repoContextGetTransport repoCtxt
targetRepo <-
case [ remoteRepo | Just remoteRepo <- map maybeRepoRemote repos ] of
[] -> die "Cannot upload. No remote repositories are configured."
rs -> remoteRepoTryUpgradeToHttps transport (last rs)
let targetRepoURI = remoteRepoURI targetRepo
rootIfEmpty x = if null x then "/" else x
uploadURI = targetRepoURI {
uriPath = rootIfEmpty (uriPath targetRepoURI)
FilePath.Posix.</> "upload"
}
Username username <- maybe promptUsername return mUsername
Password password <- maybe promptPassword return mPassword
let auth = Just (username,password)
forM_ paths $ \path -> do
notice verbosity $ "Uploading " ++ path ++ "... "
handlePackage transport verbosity uploadURI auth path | 1,052 | upload verbosity repoCtxt mUsername mPassword paths = do
let repos = repoContextRepos repoCtxt
transport <- repoContextGetTransport repoCtxt
targetRepo <-
case [ remoteRepo | Just remoteRepo <- map maybeRepoRemote repos ] of
[] -> die "Cannot upload. No remote repositories are configured."
rs -> remoteRepoTryUpgradeToHttps transport (last rs)
let targetRepoURI = remoteRepoURI targetRepo
rootIfEmpty x = if null x then "/" else x
uploadURI = targetRepoURI {
uriPath = rootIfEmpty (uriPath targetRepoURI)
FilePath.Posix.</> "upload"
}
Username username <- maybe promptUsername return mUsername
Password password <- maybe promptPassword return mPassword
let auth = Just (username,password)
forM_ paths $ \path -> do
notice verbosity $ "Uploading " ++ path ++ "... "
handlePackage transport verbosity uploadURI auth path | 944 | false | true | 14 | 11 | 269 | 281 | 138 | 143 | null | null |
spinda/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/DsUtils.hs | bsd-3-clause | -- (selectMatchVars ps tys) chooses variables of type tys
-- to use for matching ps against. If the pattern is a variable,
-- we try to use that, to save inventing lots of fresh variables.
--
-- OLD, but interesting note:
-- But even if it is a variable, its type might not match. Consider
-- data T a where
-- T1 :: Int -> T Int
-- T2 :: a -> T a
--
-- f :: T a -> a -> Int
-- f (T1 i) (x::Int) = x
-- f (T2 i) (y::a) = 0
-- Then we must not choose (x::Int) as the matching variable!
-- And nowadays we won't, because the (x::Int) will be wrapped in a CoPat
selectMatchVars :: [Pat Id] -> DsM [Id]
selectMatchVars ps = mapM selectMatchVar ps | 689 | selectMatchVars :: [Pat Id] -> DsM [Id]
selectMatchVars ps = mapM selectMatchVar ps | 83 | selectMatchVars ps = mapM selectMatchVar ps | 43 | true | true | 0 | 7 | 182 | 50 | 32 | 18 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | button8recv :: Pattern Int -> ControlPattern
button8recv busid = pI "^button8" busid | 84 | button8recv :: Pattern Int -> ControlPattern
button8recv busid = pI "^button8" busid | 84 | button8recv busid = pI "^button8" busid | 39 | false | true | 0 | 7 | 11 | 33 | 13 | 20 | null | null |
capitanbatata/sandbox | tagless/src/LambdaCalc/HOTLTTF.hs | gpl-3.0 | view :: S () a -> String
view e = unS e 0 | 41 | view :: S () a -> String
view e = unS e 0 | 41 | view e = unS e 0 | 16 | false | true | 0 | 7 | 12 | 30 | 14 | 16 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The VPN connection options.
vcOptions :: Lens' VpnConnection (Maybe VpnConnectionOptions)
vcOptions = lens _vcOptions (\s a -> s { _vcOptions = a }) | 153 | vcOptions :: Lens' VpnConnection (Maybe VpnConnectionOptions)
vcOptions = lens _vcOptions (\s a -> s { _vcOptions = a }) | 120 | vcOptions = lens _vcOptions (\s a -> s { _vcOptions = a }) | 58 | true | true | 2 | 9 | 24 | 55 | 25 | 30 | null | null |
stevejb71/xhaskell | luhn/luhn_test.hs | mit | exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess | 163 | exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess | 163 | exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess | 128 | false | true | 0 | 12 | 34 | 69 | 32 | 37 | null | null |
wavewave/lhc-analysis-collection | exe/2013-06-10-XQLD-2sq.hs | gpl-3.0 | phase3work :: WebDAVConfig -> WorkSetup ADMXQLD111 -> IO ()
phase3work wdav wsetup = do
uploadEventFull NoUploadHEP wdav wsetup
return () | 145 | phase3work :: WebDAVConfig -> WorkSetup ADMXQLD111 -> IO ()
phase3work wdav wsetup = do
uploadEventFull NoUploadHEP wdav wsetup
return () | 144 | phase3work wdav wsetup = do
uploadEventFull NoUploadHEP wdav wsetup
return () | 84 | false | true | 0 | 9 | 27 | 55 | 23 | 32 | null | null |
snoyberg/ghc | compiler/basicTypes/VarEnv.hs | bsd-3-clause | extendVarEnv_Acc = addToUFM_Acc | 31 | extendVarEnv_Acc = addToUFM_Acc | 31 | extendVarEnv_Acc = addToUFM_Acc | 31 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
yliu120/K3 | src/Language/K3/Interpreter/Builtins.hs | apache-2.0 | -- <source>HasRead :: () -> Bool
genBuiltin (channelMethod -> ("HasRead", Just n)) _ = vfun $ \_ -> checkChannel
where checkChannel = liftEngine (hasRead n) >>= maybe invalid (return . VBool)
invalid = throwE $ RunTimeInterpretationError $ "Invalid source \"" ++ n ++ "\""
-- <source>Read :: () -> t | 310 | genBuiltin (channelMethod -> ("HasRead", Just n)) _ = vfun $ \_ -> checkChannel
where checkChannel = liftEngine (hasRead n) >>= maybe invalid (return . VBool)
invalid = throwE $ RunTimeInterpretationError $ "Invalid source \"" ++ n ++ "\""
-- <source>Read :: () -> t | 277 | genBuiltin (channelMethod -> ("HasRead", Just n)) _ = vfun $ \_ -> checkChannel
where checkChannel = liftEngine (hasRead n) >>= maybe invalid (return . VBool)
invalid = throwE $ RunTimeInterpretationError $ "Invalid source \"" ++ n ++ "\""
-- <source>Read :: () -> t | 277 | true | false | 0 | 9 | 60 | 92 | 48 | 44 | null | null |
isomorphism/csound-expression | src/Csound/Tab.hs | bsd-3-clause | -- | Writes tables in sequential locations.
--
-- This opcode writes to a table in sequential locations to and from an a-rate
-- variable. Some thought is required before using it. It has at least two major,
-- and quite different, applications which are discussed below.
--
-- > kstart tablewa kfn, asig, koff
--
-- csound docs: <http://www.csounds.com/manual/html/tablewa.html>
tablewa :: Tab -> Sig -> Sig -> SE Sig
tablewa b1 b2 b3 = fmap (Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
where f a1 a2 a3 = opcs "tablewa" [(Kr,[Kr,Ar,Kr])] [a1,a2,a3]
-- | Transforms phasor that is defined in seconds to relative phasor that ranges in 0 to 1. | 689 | tablewa :: Tab -> Sig -> Sig -> SE Sig
tablewa b1 b2 b3 = fmap (Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
where f a1 a2 a3 = opcs "tablewa" [(Kr,[Kr,Ar,Kr])] [a1,a2,a3]
-- | Transforms phasor that is defined in seconds to relative phasor that ranges in 0 to 1. | 307 | tablewa b1 b2 b3 = fmap (Sig . return) $ SE $ (depT =<<) $ lift $ f <$> unTab b1 <*> unSig b2 <*> unSig b3
where f a1 a2 a3 = opcs "tablewa" [(Kr,[Kr,Ar,Kr])] [a1,a2,a3]
-- | Transforms phasor that is defined in seconds to relative phasor that ranges in 0 to 1. | 267 | true | true | 1 | 13 | 133 | 153 | 80 | 73 | null | null |
acowley/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | legalFIPrimResultTyCon :: DynFlags -> TyCon -> Validity
-- Check result type of 'foreign import prim'. Allow simple unlifted
-- types and also unboxed tuple result types '... -> (# , , #)'
legalFIPrimResultTyCon dflags tc
| isUnLiftedTyCon tc
, (isUnboxedTupleTyCon tc
|| case tyConPrimRep tc of -- Note [Marshalling VoidRep]
VoidRep -> False
_ -> True)
= validIfUnliftedFFITypes dflags
| otherwise
= NotValid unlifted_only | 472 | legalFIPrimResultTyCon :: DynFlags -> TyCon -> Validity
legalFIPrimResultTyCon dflags tc
| isUnLiftedTyCon tc
, (isUnboxedTupleTyCon tc
|| case tyConPrimRep tc of -- Note [Marshalling VoidRep]
VoidRep -> False
_ -> True)
= validIfUnliftedFFITypes dflags
| otherwise
= NotValid unlifted_only | 339 | legalFIPrimResultTyCon dflags tc
| isUnLiftedTyCon tc
, (isUnboxedTupleTyCon tc
|| case tyConPrimRep tc of -- Note [Marshalling VoidRep]
VoidRep -> False
_ -> True)
= validIfUnliftedFFITypes dflags
| otherwise
= NotValid unlifted_only | 283 | true | true | 0 | 12 | 112 | 91 | 42 | 49 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/IAM/Types/Product.hs | mpl-2.0 | -- | A single identity requesting access for a Cloud Platform resource.
-- Follows the same format of Binding.members. Required
bdMember :: Lens' BindingDelta (Maybe Text)
bdMember = lens _bdMember (\ s a -> s{_bdMember = a}) | 225 | bdMember :: Lens' BindingDelta (Maybe Text)
bdMember = lens _bdMember (\ s a -> s{_bdMember = a}) | 97 | bdMember = lens _bdMember (\ s a -> s{_bdMember = a}) | 53 | true | true | 1 | 9 | 36 | 51 | 26 | 25 | null | null |
Peaker/git-mediate | src/Environment.hs | gpl-2.0 | getConflictStyle :: IO String
getConflictStyle =
do (exitCode, output, _) <- readProcessWithExitCode "git" ["config", "merge.conflictstyle"] stdin
case exitCode of
ExitSuccess -> pure $ stripNewline output
ExitFailure 1 -> pure "unset"
ExitFailure _ -> E.throwIO exitCode
where
stdin = "" | 349 | getConflictStyle :: IO String
getConflictStyle =
do (exitCode, output, _) <- readProcessWithExitCode "git" ["config", "merge.conflictstyle"] stdin
case exitCode of
ExitSuccess -> pure $ stripNewline output
ExitFailure 1 -> pure "unset"
ExitFailure _ -> E.throwIO exitCode
where
stdin = "" | 349 | getConflictStyle =
do (exitCode, output, _) <- readProcessWithExitCode "git" ["config", "merge.conflictstyle"] stdin
case exitCode of
ExitSuccess -> pure $ stripNewline output
ExitFailure 1 -> pure "unset"
ExitFailure _ -> E.throwIO exitCode
where
stdin = "" | 319 | false | true | 0 | 11 | 99 | 97 | 47 | 50 | null | null |
nh2/WashNGo | WASH/HTML/HTMLMonadAttrs.hs | bsd-3-clause | cellspacing :: Monad m => String -> WithHTML x m ()
cellspacing = attr "cellspacing" | 85 | cellspacing :: Monad m => String -> WithHTML x m ()
cellspacing = attr "cellspacing" | 85 | cellspacing = attr "cellspacing" | 33 | false | true | 0 | 8 | 15 | 34 | 16 | 18 | null | null |
alexander-at-github/eta | compiler/ETA/TypeCheck/TcEvidence.hs | bsd-3-clause | ppr_co p co@(TcTyConAppCo _ tc [_,_])
| tc `hasKey` funTyConKey = ppr_fun_co p co | 83 | ppr_co p co@(TcTyConAppCo _ tc [_,_])
| tc `hasKey` funTyConKey = ppr_fun_co p co | 83 | ppr_co p co@(TcTyConAppCo _ tc [_,_])
| tc `hasKey` funTyConKey = ppr_fun_co p co | 83 | false | false | 0 | 8 | 15 | 53 | 25 | 28 | null | null |
spechub/Hets | Comorphisms/SoftFOL2CommonLogic.hs | gpl-2.0 | idName :: NAME
idName = mkSimpleId "ID" | 39 | idName :: NAME
idName = mkSimpleId "ID" | 39 | idName = mkSimpleId "ID" | 24 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
mb21/qua-kit | libs/hs/luci-connect/examples/MultiParametricService.hs | mit | -- | entry point
main :: IO ()
main = void $ runReallySimpleLuciClient (ServiceState 0 0) processMessages | 105 | main :: IO ()
main = void $ runReallySimpleLuciClient (ServiceState 0 0) processMessages | 88 | main = void $ runReallySimpleLuciClient (ServiceState 0 0) processMessages | 74 | true | true | 0 | 8 | 16 | 34 | 17 | 17 | null | null |
gcampax/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | wiredInNameTyThing_maybe :: Name -> Maybe TyThing
wiredInNameTyThing_maybe (Name {n_sort = WiredIn _ thing _}) = Just thing | 123 | wiredInNameTyThing_maybe :: Name -> Maybe TyThing
wiredInNameTyThing_maybe (Name {n_sort = WiredIn _ thing _}) = Just thing | 123 | wiredInNameTyThing_maybe (Name {n_sort = WiredIn _ thing _}) = Just thing | 73 | false | true | 0 | 10 | 16 | 43 | 21 | 22 | null | null |
stevezhee/pec | Pec/C.hs | bsd-3-clause | tLHS :: Define -> Define
tLHS x = rewriteBi f x
where
tbl = [ (v,e) | AssignS (VarE v) e <- universeBi x, isFreshVar v ]
f (VarE v) = lookup v tbl
f _ = Nothing | 169 | tLHS :: Define -> Define
tLHS x = rewriteBi f x
where
tbl = [ (v,e) | AssignS (VarE v) e <- universeBi x, isFreshVar v ]
f (VarE v) = lookup v tbl
f _ = Nothing | 169 | tLHS x = rewriteBi f x
where
tbl = [ (v,e) | AssignS (VarE v) e <- universeBi x, isFreshVar v ]
f (VarE v) = lookup v tbl
f _ = Nothing | 144 | false | true | 1 | 10 | 46 | 105 | 48 | 57 | null | null |
brendanhay/gogol | gogol-datastore/gen/Network/Google/Datastore/Types/Product.hs | mpl-2.0 | -- | The standard List next-page token.
gdavlirNextPageToken :: Lens' GoogleDatastoreAdminV1ListIndexesResponse (Maybe Text)
gdavlirNextPageToken
= lens _gdavlirNextPageToken
(\ s a -> s{_gdavlirNextPageToken = a}) | 222 | gdavlirNextPageToken :: Lens' GoogleDatastoreAdminV1ListIndexesResponse (Maybe Text)
gdavlirNextPageToken
= lens _gdavlirNextPageToken
(\ s a -> s{_gdavlirNextPageToken = a}) | 182 | gdavlirNextPageToken
= lens _gdavlirNextPageToken
(\ s a -> s{_gdavlirNextPageToken = a}) | 97 | true | true | 0 | 9 | 31 | 48 | 25 | 23 | null | null |
spechub/Hets | CSL/Keywords.hs | gpl-2.0 | roundallS :: String
roundallS = "roundall" | 42 | roundallS :: String
roundallS = "roundall" | 42 | roundallS = "roundall" | 22 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
nejla/nejla-common | src/NejlaCommon/Persistence/Compat.hs | bsd-3-clause | unForeignRefs :: ReferenceDef -> Maybe EntityNameHS
unForeignRefs (ForeignRef x) = Just x | 89 | unForeignRefs :: ReferenceDef -> Maybe EntityNameHS
unForeignRefs (ForeignRef x) = Just x | 89 | unForeignRefs (ForeignRef x) = Just x | 37 | false | true | 0 | 9 | 11 | 34 | 15 | 19 | null | null |
bredelings/BAli-Phy | haskell/SModel/Codons.hs | gpl-2.0 | -- maybe this should be t*(q %*% dNdS_matrix) in order to avoid losing scaling factors? Probably this doesn't matter at the moment.
dNdS omega (ReversibleMarkov a s q pi l t r) = reversible_markov a s q2 pi where q2 = q %*% dNdS_matrix a omega | 244 | dNdS omega (ReversibleMarkov a s q pi l t r) = reversible_markov a s q2 pi where q2 = q %*% dNdS_matrix a omega | 111 | dNdS omega (ReversibleMarkov a s q pi l t r) = reversible_markov a s q2 pi where q2 = q %*% dNdS_matrix a omega | 111 | true | false | 0 | 8 | 46 | 55 | 27 | 28 | null | null |
nevrenato/HetsAlloy | Common/Utils.hs | gpl-2.0 | -- no input from stdin
{- | runs an action in a different directory without changing the current
directory globally. -}
withinDirectory :: FilePath -> IO a -> IO a
withinDirectory p a = do
d <- getCurrentDirectory
setCurrentDirectory p
r <- a
setCurrentDirectory d
return r
-- | calls openTempFile but directly writes content and closes the file | 362 | withinDirectory :: FilePath -> IO a -> IO a
withinDirectory p a = do
d <- getCurrentDirectory
setCurrentDirectory p
r <- a
setCurrentDirectory d
return r
-- | calls openTempFile but directly writes content and closes the file | 236 | withinDirectory p a = do
d <- getCurrentDirectory
setCurrentDirectory p
r <- a
setCurrentDirectory d
return r
-- | calls openTempFile but directly writes content and closes the file | 192 | true | true | 0 | 8 | 75 | 70 | 30 | 40 | null | null |
DavidEGrayson/drvdiff | src/Derivation.hs | mit | drvEnvVarAsSet :: String -> Derivation -> [String]
drvEnvVarAsSet name drv =
case drvEnvVar name drv of
Nothing -> []
Just str -> toList $ fromList $
(split . dropInitBlank . dropFinalBlank . condense . dropDelims . oneOf)
" \t\n" str
-- TODO: Why is this sometimes returning empty strings? And why are there
-- empty strings at the end and the beginning of the list? | 398 | drvEnvVarAsSet :: String -> Derivation -> [String]
drvEnvVarAsSet name drv =
case drvEnvVar name drv of
Nothing -> []
Just str -> toList $ fromList $
(split . dropInitBlank . dropFinalBlank . condense . dropDelims . oneOf)
" \t\n" str
-- TODO: Why is this sometimes returning empty strings? And why are there
-- empty strings at the end and the beginning of the list? | 398 | drvEnvVarAsSet name drv =
case drvEnvVar name drv of
Nothing -> []
Just str -> toList $ fromList $
(split . dropInitBlank . dropFinalBlank . condense . dropDelims . oneOf)
" \t\n" str
-- TODO: Why is this sometimes returning empty strings? And why are there
-- empty strings at the end and the beginning of the list? | 347 | false | true | 0 | 15 | 95 | 96 | 47 | 49 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/array/Data/Array/Base.hs | bsd-3-clause | -- | Returns the element of an immutable array at the specified index.
(!) :: (IArray a e, Ix i) => a i e -> i -> e
(!) arr i = case bounds arr of
(l,u) -> unsafeAt arr $ safeIndex (l,u) (numElements arr) i
| 222 | (!) :: (IArray a e, Ix i) => a i e -> i -> e
(!) arr i = case bounds arr of
(l,u) -> unsafeAt arr $ safeIndex (l,u) (numElements arr) i
| 151 | (!) arr i = case bounds arr of
(l,u) -> unsafeAt arr $ safeIndex (l,u) (numElements arr) i
| 106 | true | true | 0 | 11 | 61 | 100 | 52 | 48 | null | null |
sdx23/acid-state-dist | src/Data/Acid/Centered/Slave.hs | mit | -- | Open a local State as Slave for a Master.
--
-- The directory for the local state files is the default one ("state/[typeOf
-- state]").
enslaveState :: (IsAcidic st, Typeable st) =>
String -- ^ hostname of the Master
-> PortNumber -- ^ port to connect to
-> st -- ^ initial state
-> IO (AcidState st)
enslaveState address port initialState =
enslaveStateFrom ("state" </> show (typeOf initialState)) address port initialState | 500 | enslaveState :: (IsAcidic st, Typeable st) =>
String -- ^ hostname of the Master
-> PortNumber -- ^ port to connect to
-> st -- ^ initial state
-> IO (AcidState st)
enslaveState address port initialState =
enslaveStateFrom ("state" </> show (typeOf initialState)) address port initialState | 359 | enslaveState address port initialState =
enslaveStateFrom ("state" </> show (typeOf initialState)) address port initialState | 128 | true | true | 0 | 11 | 142 | 86 | 46 | 40 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvKvmSpiceIpVersion :: String
hvKvmSpiceIpVersion = "spice_ip_version" | 70 | hvKvmSpiceIpVersion :: String
hvKvmSpiceIpVersion = "spice_ip_version" | 70 | hvKvmSpiceIpVersion = "spice_ip_version" | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
holdenlee/notebook | src/NestedCategories.hs | mit | --getCategory = return . return . takeBaseName . takeDirectory . toFilePath
buildNestedCategories' :: MonadMetadata m => Pattern -> (String -> Identifier) -> m Tags
buildNestedCategories' = buildTagsWith getNestedCategory | 225 | buildNestedCategories' :: MonadMetadata m => Pattern -> (String -> Identifier) -> m Tags
buildNestedCategories' = buildTagsWith getNestedCategory | 145 | buildNestedCategories' = buildTagsWith getNestedCategory | 56 | true | true | 0 | 9 | 31 | 40 | 20 | 20 | null | null |
cessationoftime/leksah | src/IDE/Pane/Files.hs | gpl-2.0 | refreshPackage :: TreeStore FileRecord -> TreePath -> IDEPackage -> IDEAction
refreshPackage store path p = do
let dir = ipdBuildDir p
mbIter <- liftIO $ treeModelGetIter store path
when (isJust mbIter) $ do
contents <- dirContents dir
setDirectories store mbIter $ map PackageRecord (ipdSandboxSources p) ++ contents
-- | Refreshes the child nodes of the node at the given 'TreePath'. | 415 | refreshPackage :: TreeStore FileRecord -> TreePath -> IDEPackage -> IDEAction
refreshPackage store path p = do
let dir = ipdBuildDir p
mbIter <- liftIO $ treeModelGetIter store path
when (isJust mbIter) $ do
contents <- dirContents dir
setDirectories store mbIter $ map PackageRecord (ipdSandboxSources p) ++ contents
-- | Refreshes the child nodes of the node at the given 'TreePath'. | 415 | refreshPackage store path p = do
let dir = ipdBuildDir p
mbIter <- liftIO $ treeModelGetIter store path
when (isJust mbIter) $ do
contents <- dirContents dir
setDirectories store mbIter $ map PackageRecord (ipdSandboxSources p) ++ contents
-- | Refreshes the child nodes of the node at the given 'TreePath'. | 337 | false | true | 0 | 14 | 89 | 115 | 52 | 63 | null | null |
erikd/yesod | yesod-core/Yesod/Core/Handler.hs | mit | -- | Bypass remaining handler code and output the given content with the given
-- status code.
sendResponseStatus :: (MonadHandler m, ToTypedContent c) => H.Status -> c -> m a
sendResponseStatus s = handlerError . HCContent s . toTypedContent | 242 | sendResponseStatus :: (MonadHandler m, ToTypedContent c) => H.Status -> c -> m a
sendResponseStatus s = handlerError . HCContent s . toTypedContent | 147 | sendResponseStatus s = handlerError . HCContent s . toTypedContent | 66 | true | true | 0 | 8 | 38 | 55 | 28 | 27 | null | null |
beni55/hspec-snap | src/Test/Hspec/Snap.hs | bsd-3-clause | shouldEqual :: (Show a, Eq a)
=> a
-> a
-> SnapHspecM b ()
shouldEqual a b = if a == b
then setResult Success
else setResult (Fail Nothing ("Should have held: " ++ show a ++ " == " ++ show b)) | 272 | shouldEqual :: (Show a, Eq a)
=> a
-> a
-> SnapHspecM b ()
shouldEqual a b = if a == b
then setResult Success
else setResult (Fail Nothing ("Should have held: " ++ show a ++ " == " ++ show b)) | 272 | shouldEqual a b = if a == b
then setResult Success
else setResult (Fail Nothing ("Should have held: " ++ show a ++ " == " ++ show b)) | 177 | false | true | 0 | 13 | 122 | 97 | 47 | 50 | null | null |
kvelicka/Fizz | Colour.hs | lgpl-2.1 | transfer (X11 names) alpha minv maxv
= lookupTab $ buildTable (minv, maxv) (map (x11Rgb (realToFrac alpha)) names) | 118 | transfer (X11 names) alpha minv maxv
= lookupTab $ buildTable (minv, maxv) (map (x11Rgb (realToFrac alpha)) names) | 118 | transfer (X11 names) alpha minv maxv
= lookupTab $ buildTable (minv, maxv) (map (x11Rgb (realToFrac alpha)) names) | 118 | false | false | 0 | 12 | 20 | 56 | 28 | 28 | null | null |
wirebirdlabs/incredible | logic/Types.hs | mit | badResult :: UnificationResult -> Bool
badResult Solved = False | 63 | badResult :: UnificationResult -> Bool
badResult Solved = False | 63 | badResult Solved = False | 24 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
mmarx/jebediah | cli/vehicle-assembly-building/Main.hs | gpl-3.0 | main :: IO ()
main = play "mididings:in_1" patch song | 53 | main :: IO ()
main = play "mididings:in_1" patch song | 53 | main = play "mididings:in_1" patch song | 39 | false | true | 0 | 6 | 9 | 23 | 11 | 12 | null | null |
codemac/yi-editor | src/Yi/Buffer/Misc.hs | gpl-2.0 | -- | Execute a @BufferM@ value on a given buffer, using a dummy window. The new state of
-- the buffer is discarded.
runBufferDummyWindow :: FBuffer -> BufferM a -> a
runBufferDummyWindow b = fst . runBuffer (dummyWindow $ bkey b) b | 234 | runBufferDummyWindow :: FBuffer -> BufferM a -> a
runBufferDummyWindow b = fst . runBuffer (dummyWindow $ bkey b) b | 115 | runBufferDummyWindow b = fst . runBuffer (dummyWindow $ bkey b) b | 65 | true | true | 0 | 9 | 43 | 46 | 23 | 23 | null | null |
green-haskell/ghc | compiler/types/TypeRep.hs | bsd-3-clause | tidyType env (ForAllTy tv ty) = ForAllTy tvp $! (tidyType envp ty)
where
(envp, tvp) = tidyTyVarBndr env tv
---------------
-- | Grabs the free type variables, tidies them
-- and then uses 'tidyType' to work over the type itself | 303 | tidyType env (ForAllTy tv ty) = ForAllTy tvp $! (tidyType envp ty)
where
(envp, tvp) = tidyTyVarBndr env tv
---------------
-- | Grabs the free type variables, tidies them
-- and then uses 'tidyType' to work over the type itself | 303 | tidyType env (ForAllTy tv ty) = ForAllTy tvp $! (tidyType envp ty)
where
(envp, tvp) = tidyTyVarBndr env tv
---------------
-- | Grabs the free type variables, tidies them
-- and then uses 'tidyType' to work over the type itself | 303 | false | false | 0 | 7 | 114 | 56 | 29 | 27 | null | null |
ulricha/dsh-example-queries | Queries/TPCH/BuildingBlocks.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Various predicates and filters
-- | Return all orders with a given status
ordersWithStatus :: Text -> Q [Order]
ordersWithStatus status =
[ o | o <- orders, o_orderstatusQ o == toQ status ] | 278 | ordersWithStatus :: Text -> Q [Order]
ordersWithStatus status =
[ o | o <- orders, o_orderstatusQ o == toQ status ] | 119 | ordersWithStatus status =
[ o | o <- orders, o_orderstatusQ o == toQ status ] | 81 | true | true | 0 | 8 | 40 | 52 | 27 | 25 | null | null |
ndreynolds/hsURL | src/Http/Request.hs | mit | request :: String -> String -> Request
request method uri = Request { method=method
, uri=uri
, params=[]
, headers=[]
, body=emptyBody
, version="HTTP/1.1"
} | 332 | request :: String -> String -> Request
request method uri = Request { method=method
, uri=uri
, params=[]
, headers=[]
, body=emptyBody
, version="HTTP/1.1"
} | 332 | request method uri = Request { method=method
, uri=uri
, params=[]
, headers=[]
, body=emptyBody
, version="HTTP/1.1"
} | 293 | false | true | 0 | 7 | 198 | 66 | 39 | 27 | null | null |
sgraf812/fndiff | src/Signature.hs | mit | loc :: Location
loc = undefined | 31 | loc :: Location
loc = undefined | 31 | loc = undefined | 15 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
Blaisorblade/stack | src/test/Stack/NixSpec.hs | bsd-3-clause | setup :: IO T
setup = do
manager <- newTLSManager
unsetEnv "STACK_YAML"
return T{..} | 90 | setup :: IO T
setup = do
manager <- newTLSManager
unsetEnv "STACK_YAML"
return T{..} | 90 | setup = do
manager <- newTLSManager
unsetEnv "STACK_YAML"
return T{..} | 76 | false | true | 0 | 9 | 19 | 44 | 18 | 26 | null | null |
penteract/HigherOrderHornRefinement | HOCHC/DataTypes.hs | bsd-3-clause | -- replaces all unbound occurences of a variable in a MonoType
-- this affects instances of Bool<t>
replaceInMT :: [(Variable,Term)] -> MonoType -> MonoType
replaceInMT rs IntT = IntT | 183 | replaceInMT :: [(Variable,Term)] -> MonoType -> MonoType
replaceInMT rs IntT = IntT | 83 | replaceInMT rs IntT = IntT | 26 | true | true | 0 | 7 | 28 | 40 | 21 | 19 | null | null |
carlohamalainen/ghc-mod | Language/Haskell/GhcMod/GHCApi.hs | bsd-3-clause | withDynFlags :: (DynFlags -> DynFlags) -> Ghc a -> Ghc a
withDynFlags setFlag body = G.gbracket setup teardown (\_ -> body)
where
setup = do
dflag <- G.getSessionDynFlags
void $ G.setSessionDynFlags (setFlag dflag)
return dflag
teardown = void . G.setSessionDynFlags
----------------------------------------------------------------
-- | Set 'DynFlags' equivalent to "-w:". | 408 | withDynFlags :: (DynFlags -> DynFlags) -> Ghc a -> Ghc a
withDynFlags setFlag body = G.gbracket setup teardown (\_ -> body)
where
setup = do
dflag <- G.getSessionDynFlags
void $ G.setSessionDynFlags (setFlag dflag)
return dflag
teardown = void . G.setSessionDynFlags
----------------------------------------------------------------
-- | Set 'DynFlags' equivalent to "-w:". | 408 | withDynFlags setFlag body = G.gbracket setup teardown (\_ -> body)
where
setup = do
dflag <- G.getSessionDynFlags
void $ G.setSessionDynFlags (setFlag dflag)
return dflag
teardown = void . G.setSessionDynFlags
----------------------------------------------------------------
-- | Set 'DynFlags' equivalent to "-w:". | 351 | false | true | 0 | 10 | 83 | 108 | 53 | 55 | null | null |
koodilehto/kryptoradio | data_sources/exchange/Market/Bitstamp.hs | agpl-3.0 | extract Pusher{..} = case (event,channel) of
("data","diff_order_book") -> either fail Just $ parseEither orderParser payload
("trade","live_trades") -> either fail Just $ parseEither tradeParser payload
_ -> Nothing
where
-- Dig all bids and asks and capsule them again
orderParser (Object o) = do
bids <- map (conv Bid) <$> o .: "bids"
asks <- map (conv Ask) <$> o .: "asks"
return $ bids++asks
orderParser _ = mzero
-- Trades happen once at a time. Take it out and put inside singleton list
tradeParser (Object o) = do
price <- fixScifi <$> o .: "price"
amount <- fixScifi <$> o .: "amount"
return [(Key Trade price "USD" "XBT" "BITSTAMP",amount)]
conv entry (price,amount) = (Key entry (read price) "USD" "XBT" "BITSTAMP",read amount) | 806 | extract Pusher{..} = case (event,channel) of
("data","diff_order_book") -> either fail Just $ parseEither orderParser payload
("trade","live_trades") -> either fail Just $ parseEither tradeParser payload
_ -> Nothing
where
-- Dig all bids and asks and capsule them again
orderParser (Object o) = do
bids <- map (conv Bid) <$> o .: "bids"
asks <- map (conv Ask) <$> o .: "asks"
return $ bids++asks
orderParser _ = mzero
-- Trades happen once at a time. Take it out and put inside singleton list
tradeParser (Object o) = do
price <- fixScifi <$> o .: "price"
amount <- fixScifi <$> o .: "amount"
return [(Key Trade price "USD" "XBT" "BITSTAMP",amount)]
conv entry (price,amount) = (Key entry (read price) "USD" "XBT" "BITSTAMP",read amount) | 806 | extract Pusher{..} = case (event,channel) of
("data","diff_order_book") -> either fail Just $ parseEither orderParser payload
("trade","live_trades") -> either fail Just $ parseEither tradeParser payload
_ -> Nothing
where
-- Dig all bids and asks and capsule them again
orderParser (Object o) = do
bids <- map (conv Bid) <$> o .: "bids"
asks <- map (conv Ask) <$> o .: "asks"
return $ bids++asks
orderParser _ = mzero
-- Trades happen once at a time. Take it out and put inside singleton list
tradeParser (Object o) = do
price <- fixScifi <$> o .: "price"
amount <- fixScifi <$> o .: "amount"
return [(Key Trade price "USD" "XBT" "BITSTAMP",amount)]
conv entry (price,amount) = (Key entry (read price) "USD" "XBT" "BITSTAMP",read amount) | 806 | false | false | 0 | 12 | 188 | 282 | 139 | 143 | null | null |
TransformingMusicology/tabcode-haskell | src/TabCode/Serialiser/MEIXML/Elements.hs | gpl-3.0 | getChildren (MEICourse _ cs) = cs | 33 | getChildren (MEICourse _ cs) = cs | 33 | getChildren (MEICourse _ cs) = cs | 33 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
liskin/gooddata-haskell | GoodData/Expand.hs | bsd-3-clause | substURI ∷ ( Typeable a ) ⇒ M.Map AnyURI AnyURI → URI a → URI a
substURI dict u =
case anyURI u `M.lookup` dict of
Just u' → fromAnyURI u'
Nothing → u | 170 | substURI ∷ ( Typeable a ) ⇒ M.Map AnyURI AnyURI → URI a → URI a
substURI dict u =
case anyURI u `M.lookup` dict of
Just u' → fromAnyURI u'
Nothing → u | 170 | substURI dict u =
case anyURI u `M.lookup` dict of
Just u' → fromAnyURI u'
Nothing → u | 106 | false | true | 3 | 8 | 53 | 78 | 38 | 40 | null | null |
siddhanathan/yi | yi-mode-javascript/src/Yi/Syntax/JavaScript.hs | gpl-2.0 | -- | Weighted recovery.
hate :: Int -> P s a -> P s a
hate n = power n recoverWith
where
power 0 _ = id
power m f = f . power (m - 1) f
-- * Utility stuff | 172 | hate :: Int -> P s a -> P s a
hate n = power n recoverWith
where
power 0 _ = id
power m f = f . power (m - 1) f
-- * Utility stuff | 148 | hate n = power n recoverWith
where
power 0 _ = id
power m f = f . power (m - 1) f
-- * Utility stuff | 118 | true | true | 0 | 8 | 59 | 82 | 39 | 43 | null | null |
cartazio/resin | src/Resin/Binders/Tree/Internal.hs | bsd-2-clause | rightExtendInject (InjectRefl (MonoRefl f)) rP = CompactCompose (MonoRefl f) (MonoRefl rP) 1 | 92 | rightExtendInject (InjectRefl (MonoRefl f)) rP = CompactCompose (MonoRefl f) (MonoRefl rP) 1 | 92 | rightExtendInject (InjectRefl (MonoRefl f)) rP = CompactCompose (MonoRefl f) (MonoRefl rP) 1 | 92 | false | false | 0 | 9 | 11 | 42 | 20 | 22 | null | null |
pikajude/explain | src/Main.hs | mit | explainFU FieldWildcard = ".." | 30 | explainFU FieldWildcard = ".." | 30 | explainFU FieldWildcard = ".." | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
gregorycollins/cabal2macpkg | Distribution/OSX/InstallerScript.hs | bsd-3-clause | ------------------------------------------------------------------------
mkReadme :: (ArrowXml a) => String -> a n XmlTree
mkReadme = blurb "readme" | 148 | mkReadme :: (ArrowXml a) => String -> a n XmlTree
mkReadme = blurb "readme" | 75 | mkReadme = blurb "readme" | 25 | true | true | 0 | 8 | 14 | 38 | 18 | 20 | null | null |
AndreasPK/stack | test/integration/IntegrationSpec.hs | bsd-3-clause | main :: IO ()
main = do
currDir <- canonicalizePath "test/integration"
let findExe name = do
mexe <- findExecutable name
case mexe of
Nothing -> error $ name ++ " not found on PATH"
Just exe -> return exe
runghc <- findExe "runghc"
stack <- findExe "stack"
let testDir = currDir </> "tests"
tests <- getDirectoryContents testDir >>= filterM (hasTest testDir) . sort
envOrig <- getEnvironment
withSystemTempDirectory "stack-integration-home" $ \newHome -> do
let env' = Map.toList
$ Map.insert "STACK_EXE" stack
$ Map.insert "HOME" newHome
$ Map.insert "APPDATA" newHome
$ Map.delete "GHC_PACKAGE_PATH"
$ Map.fromList
$ map (first (map toUpper)) envOrig
origStackRoot <- getAppUserDataDirectory "stack"
hspec $ mapM_ (test runghc env' currDir origStackRoot newHome) tests | 990 | main :: IO ()
main = do
currDir <- canonicalizePath "test/integration"
let findExe name = do
mexe <- findExecutable name
case mexe of
Nothing -> error $ name ++ " not found on PATH"
Just exe -> return exe
runghc <- findExe "runghc"
stack <- findExe "stack"
let testDir = currDir </> "tests"
tests <- getDirectoryContents testDir >>= filterM (hasTest testDir) . sort
envOrig <- getEnvironment
withSystemTempDirectory "stack-integration-home" $ \newHome -> do
let env' = Map.toList
$ Map.insert "STACK_EXE" stack
$ Map.insert "HOME" newHome
$ Map.insert "APPDATA" newHome
$ Map.delete "GHC_PACKAGE_PATH"
$ Map.fromList
$ map (first (map toUpper)) envOrig
origStackRoot <- getAppUserDataDirectory "stack"
hspec $ mapM_ (test runghc env' currDir origStackRoot newHome) tests | 990 | main = do
currDir <- canonicalizePath "test/integration"
let findExe name = do
mexe <- findExecutable name
case mexe of
Nothing -> error $ name ++ " not found on PATH"
Just exe -> return exe
runghc <- findExe "runghc"
stack <- findExe "stack"
let testDir = currDir </> "tests"
tests <- getDirectoryContents testDir >>= filterM (hasTest testDir) . sort
envOrig <- getEnvironment
withSystemTempDirectory "stack-integration-home" $ \newHome -> do
let env' = Map.toList
$ Map.insert "STACK_EXE" stack
$ Map.insert "HOME" newHome
$ Map.insert "APPDATA" newHome
$ Map.delete "GHC_PACKAGE_PATH"
$ Map.fromList
$ map (first (map toUpper)) envOrig
origStackRoot <- getAppUserDataDirectory "stack"
hspec $ mapM_ (test runghc env' currDir origStackRoot newHome) tests | 976 | false | true | 0 | 22 | 332 | 285 | 126 | 159 | null | null |
kim/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types.hs | mpl-2.0 | -- | The prefix applied to the log file names.
lsS3KeyPrefix :: Lens' LoggingStatus (Maybe Text)
lsS3KeyPrefix = lens _lsS3KeyPrefix (\s a -> s { _lsS3KeyPrefix = a }) | 167 | lsS3KeyPrefix :: Lens' LoggingStatus (Maybe Text)
lsS3KeyPrefix = lens _lsS3KeyPrefix (\s a -> s { _lsS3KeyPrefix = a }) | 120 | lsS3KeyPrefix = lens _lsS3KeyPrefix (\s a -> s { _lsS3KeyPrefix = a }) | 70 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
Laar/CodeGenerating | src/Code/Generating/Utils/Syntax/Type.hs | bsd-3-clause | despecializeType :: Type -> Type
despecializeType = traverseType go
where
go (TyList t) = Just $ TyCon (Special ListCon) `TyApp` despecializeType t
go (TyTuple b t) = Just . foldl TyApp tupCon $ map despecializeType t
where tupCon = TyCon . Special $ TupleCon b (length t)
go _ = Nothing
-----------------------------------------------------------------------------
-- | Pure version of `traverseTypeM`. | 460 | despecializeType :: Type -> Type
despecializeType = traverseType go
where
go (TyList t) = Just $ TyCon (Special ListCon) `TyApp` despecializeType t
go (TyTuple b t) = Just . foldl TyApp tupCon $ map despecializeType t
where tupCon = TyCon . Special $ TupleCon b (length t)
go _ = Nothing
-----------------------------------------------------------------------------
-- | Pure version of `traverseTypeM`. | 460 | despecializeType = traverseType go
where
go (TyList t) = Just $ TyCon (Special ListCon) `TyApp` despecializeType t
go (TyTuple b t) = Just . foldl TyApp tupCon $ map despecializeType t
where tupCon = TyCon . Special $ TupleCon b (length t)
go _ = Nothing
-----------------------------------------------------------------------------
-- | Pure version of `traverseTypeM`. | 427 | false | true | 2 | 12 | 114 | 131 | 63 | 68 | null | null |
jsavatgy/hatupist | code/fileError.hs | gpl-2.0 | colLines [] = [] | 16 | colLines [] = [] | 16 | colLines [] = [] | 16 | false | false | 1 | 6 | 3 | 17 | 6 | 11 | null | null |
nevrenato/HetsAlloy | Common/Keywords.hs | gpl-2.0 | varsS :: String
varsS = "vars" | 30 | varsS :: String
varsS = "vars" | 30 | varsS = "vars" | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
snowleopard/shaking-up-ghc | src/Hadrian/Utilities.hs | bsd-3-clause | -- | Parse a 'Bool' from a @"YES"@ or @"NO"@ string. Returns @Nothing@ in case
-- of a parse failure.
parseYesNo :: String -> Maybe Bool
parseYesNo "YES" = Just True | 165 | parseYesNo :: String -> Maybe Bool
parseYesNo "YES" = Just True | 63 | parseYesNo "YES" = Just True | 28 | true | true | 0 | 6 | 30 | 26 | 13 | 13 | null | null |
rueshyna/gogol | gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs | mpl-2.0 | -- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
-- approval status has changed. This field will always be present.
paeProductId :: Lens' ProductApprovalEvent (Maybe Text)
paeProductId
= lens _paeProductId (\ s a -> s{_paeProductId = a}) | 268 | paeProductId :: Lens' ProductApprovalEvent (Maybe Text)
paeProductId
= lens _paeProductId (\ s a -> s{_paeProductId = a}) | 123 | paeProductId
= lens _paeProductId (\ s a -> s{_paeProductId = a}) | 67 | true | true | 1 | 9 | 41 | 51 | 26 | 25 | null | null |
wherkendell/diagrams-contrib | src/Diagrams/Swimunit/Dotmatrix.hs | bsd-3-clause | dotchar_E__B6x9 :: Dotchar
dotchar_E__B6x9 = Dotchar
[" "
,"EEEEE "
,"E "
,"E "
,"EEEE "
,"E "
,"E "
,"EEEEE "
," "] | 269 | dotchar_E__B6x9 :: Dotchar
dotchar_E__B6x9 = Dotchar
[" "
,"EEEEE "
,"E "
,"E "
,"EEEE "
,"E "
,"E "
,"EEEEE "
," "] | 269 | dotchar_E__B6x9 = Dotchar
[" "
,"EEEEE "
,"E "
,"E "
,"EEEE "
,"E "
,"E "
,"EEEEE "
," "] | 242 | false | true | 0 | 6 | 176 | 47 | 26 | 21 | null | null |
rlpowell/hblog | lib/HBlog/Rectifier.hs | mit | getHeaders _ = [] | 17 | getHeaders _ = [] | 17 | getHeaders _ = [] | 17 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
quyse/flaw | flaw-visual/Flaw/Visual/Fog.hs | mit | exponentialHeightSkyFog :: Node Float3 -> Node Float3 -> Node Float2 -> Program (Node Float)
exponentialHeightSkyFog eyePosition toPointDirection fogParams = do
let k1 = x_ fogParams
let k2 = y_ fogParams
temp $ if_ (z_ toPointDirection `less_` constf 0.01) (constf 0) $ exp $ exp (k1 * z_ eyePosition + k2) / (z_ toPointDirection * k1)
| 344 | exponentialHeightSkyFog :: Node Float3 -> Node Float3 -> Node Float2 -> Program (Node Float)
exponentialHeightSkyFog eyePosition toPointDirection fogParams = do
let k1 = x_ fogParams
let k2 = y_ fogParams
temp $ if_ (z_ toPointDirection `less_` constf 0.01) (constf 0) $ exp $ exp (k1 * z_ eyePosition + k2) / (z_ toPointDirection * k1)
| 344 | exponentialHeightSkyFog eyePosition toPointDirection fogParams = do
let k1 = x_ fogParams
let k2 = y_ fogParams
temp $ if_ (z_ toPointDirection `less_` constf 0.01) (constf 0) $ exp $ exp (k1 * z_ eyePosition + k2) / (z_ toPointDirection * k1)
| 251 | false | true | 0 | 14 | 62 | 144 | 67 | 77 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.