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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sapek/pandoc
|
src/Text/Pandoc/Readers/Org.hs
|
gpl-2.0
|
-- | Parses the start (opening character) of emphasis
emphasisStart :: Char -> OrgParser Char
emphasisStart c = try $ do
guard =<< afterEmphasisPreChar
guard =<< notAfterString
char c
lookAhead (noneOf emphasisForbiddenBorderChars)
pushToInlineCharStack c
return c
-- | Parses the closing character of emphasis
| 323
|
emphasisStart :: Char -> OrgParser Char
emphasisStart c = try $ do
guard =<< afterEmphasisPreChar
guard =<< notAfterString
char c
lookAhead (noneOf emphasisForbiddenBorderChars)
pushToInlineCharStack c
return c
-- | Parses the closing character of emphasis
| 269
|
emphasisStart c = try $ do
guard =<< afterEmphasisPreChar
guard =<< notAfterString
char c
lookAhead (noneOf emphasisForbiddenBorderChars)
pushToInlineCharStack c
return c
-- | Parses the closing character of emphasis
| 229
| true
| true
| 0
| 10
| 56
| 71
| 31
| 40
| null | null |
ssaavedra/liquidhaskell
|
benchmarks/containers-0.5.0.0/Data/Map/Base1.hs
|
bsd-3-clause
|
mapAccum :: (a -> b -> (a,c)) -> a -> Map k b -> (a,Map k c)
mapAccum f a m
= mapAccumWithKey (\a' _ x' -> f a' x') a m
| 121
|
mapAccum :: (a -> b -> (a,c)) -> a -> Map k b -> (a,Map k c)
mapAccum f a m
= mapAccumWithKey (\a' _ x' -> f a' x') a m
| 121
|
mapAccum f a m
= mapAccumWithKey (\a' _ x' -> f a' x') a m
| 60
| false
| true
| 0
| 11
| 33
| 94
| 46
| 48
| null | null |
tjakway/ghcjvm
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
pgm_P :: DynFlags -> (String,[Option])
pgm_P dflags = sPgm_P (settings dflags)
| 94
|
pgm_P :: DynFlags -> (String,[Option])
pgm_P dflags = sPgm_P (settings dflags)
| 94
|
pgm_P dflags = sPgm_P (settings dflags)
| 39
| false
| true
| 0
| 9
| 26
| 42
| 20
| 22
| null | null |
sdiehl/ghc
|
compiler/basicTypes/MkId.hs
|
bsd-3-clause
|
lazyIdName, oneShotName, noinlineIdName :: Name
lazyIdName = mkWiredInIdName gHC_MAGIC (fsLit "lazy") lazyIdKey lazyId
| 144
|
lazyIdName, oneShotName, noinlineIdName :: Name
lazyIdName = mkWiredInIdName gHC_MAGIC (fsLit "lazy") lazyIdKey lazyId
| 144
|
lazyIdName = mkWiredInIdName gHC_MAGIC (fsLit "lazy") lazyIdKey lazyId
| 96
| false
| true
| 2
| 7
| 38
| 34
| 17
| 17
| null | null |
ComputationWithBoundedResources/tct-core
|
src/Tct/Core/Main.hs
|
bsd-3-clause
|
run' :: TctM a -> (TctROState -> TctROState) -> IO a
run' m k = do
time <- Time.getClockTime
tdir <- getTemporaryDirectory
let
state tmp = TctROState
{ startTime = time
, stopTime = Nothing
, tempDirectory = tmp
, kvPairs = M.empty }
withTempDirectory tdir "tctx" (runReaderT (runTctM m) . k . state)
| 351
|
run' :: TctM a -> (TctROState -> TctROState) -> IO a
run' m k = do
time <- Time.getClockTime
tdir <- getTemporaryDirectory
let
state tmp = TctROState
{ startTime = time
, stopTime = Nothing
, tempDirectory = tmp
, kvPairs = M.empty }
withTempDirectory tdir "tctx" (runReaderT (runTctM m) . k . state)
| 351
|
run' m k = do
time <- Time.getClockTime
tdir <- getTemporaryDirectory
let
state tmp = TctROState
{ startTime = time
, stopTime = Nothing
, tempDirectory = tmp
, kvPairs = M.empty }
withTempDirectory tdir "tctx" (runReaderT (runTctM m) . k . state)
| 298
| false
| true
| 0
| 13
| 104
| 123
| 62
| 61
| null | null |
pasberth/paradocs
|
Language/Paradocs/PrettyPrint.hs
|
mit
|
printASTErrors (Failure msgStr renderState) = do
Leijen.hPutDoc System.stderr $ docMessage msgStr docError renderState
| 120
|
printASTErrors (Failure msgStr renderState) = do
Leijen.hPutDoc System.stderr $ docMessage msgStr docError renderState
| 120
|
printASTErrors (Failure msgStr renderState) = do
Leijen.hPutDoc System.stderr $ docMessage msgStr docError renderState
| 120
| false
| false
| 0
| 9
| 14
| 38
| 17
| 21
| null | null |
ExNexu/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
namesIn :: [(Name, PTerm)] -> IState -> PTerm -> [Name]
namesIn uvars ist tm = nub $ ni [] tm
where
ni env (PRef _ _ n)
| not (n `elem` env)
= case lookupTy n (tt_ctxt ist) of
[] -> [n]
_ -> if n `elem` (map fst uvars) then [n] else []
ni env (PApp _ f as) = ni env f ++ concatMap (ni env) (map getTm as)
ni env (PAppBind _ f as) = ni env f ++ concatMap (ni env) (map getTm as)
ni env (PCase _ c os) = ni env c ++
-- names in 'os', not counting the names bound in the cases
(nub (concatMap (ni env) (map snd os))
\\ nub (concatMap (ni env) (map fst os)))
ni env (PIfThenElse _ c t f) = concatMap (ni env) [c, t, f]
ni env (PLam fc n nfc ty sc) = ni env ty ++ ni (n:env) sc
ni env (PPi p n _ ty sc) = niTacImp env p ++ ni env ty ++ ni (n:env) sc
ni env (PRewrite _ l r _) = ni env l ++ ni env r
ni env (PTyped l r) = ni env l ++ ni env r
ni env (PPair _ _ _ l r) = ni env l ++ ni env r
ni env (PDPair _ _ _ (PRef _ _ n) t r) = ni env t ++ ni (n:env) r
ni env (PDPair _ _ _ l t r) = ni env l ++ ni env t ++ ni env r
ni env (PAlternative ns a as) = concatMap (ni env) as
ni env (PHidden tm) = ni env tm
ni env (PUnifyLog tm) = ni env tm
ni env (PDisamb _ tm) = ni env tm
ni env (PNoImplicits tm) = ni env tm
ni env _ = []
niTacImp env (TacImp _ _ scr) = ni env scr
niTacImp _ _ = []
-- Return which of the given names are used in the given term.
| 1,602
|
namesIn :: [(Name, PTerm)] -> IState -> PTerm -> [Name]
namesIn uvars ist tm = nub $ ni [] tm
where
ni env (PRef _ _ n)
| not (n `elem` env)
= case lookupTy n (tt_ctxt ist) of
[] -> [n]
_ -> if n `elem` (map fst uvars) then [n] else []
ni env (PApp _ f as) = ni env f ++ concatMap (ni env) (map getTm as)
ni env (PAppBind _ f as) = ni env f ++ concatMap (ni env) (map getTm as)
ni env (PCase _ c os) = ni env c ++
-- names in 'os', not counting the names bound in the cases
(nub (concatMap (ni env) (map snd os))
\\ nub (concatMap (ni env) (map fst os)))
ni env (PIfThenElse _ c t f) = concatMap (ni env) [c, t, f]
ni env (PLam fc n nfc ty sc) = ni env ty ++ ni (n:env) sc
ni env (PPi p n _ ty sc) = niTacImp env p ++ ni env ty ++ ni (n:env) sc
ni env (PRewrite _ l r _) = ni env l ++ ni env r
ni env (PTyped l r) = ni env l ++ ni env r
ni env (PPair _ _ _ l r) = ni env l ++ ni env r
ni env (PDPair _ _ _ (PRef _ _ n) t r) = ni env t ++ ni (n:env) r
ni env (PDPair _ _ _ l t r) = ni env l ++ ni env t ++ ni env r
ni env (PAlternative ns a as) = concatMap (ni env) as
ni env (PHidden tm) = ni env tm
ni env (PUnifyLog tm) = ni env tm
ni env (PDisamb _ tm) = ni env tm
ni env (PNoImplicits tm) = ni env tm
ni env _ = []
niTacImp env (TacImp _ _ scr) = ni env scr
niTacImp _ _ = []
-- Return which of the given names are used in the given term.
| 1,602
|
namesIn uvars ist tm = nub $ ni [] tm
where
ni env (PRef _ _ n)
| not (n `elem` env)
= case lookupTy n (tt_ctxt ist) of
[] -> [n]
_ -> if n `elem` (map fst uvars) then [n] else []
ni env (PApp _ f as) = ni env f ++ concatMap (ni env) (map getTm as)
ni env (PAppBind _ f as) = ni env f ++ concatMap (ni env) (map getTm as)
ni env (PCase _ c os) = ni env c ++
-- names in 'os', not counting the names bound in the cases
(nub (concatMap (ni env) (map snd os))
\\ nub (concatMap (ni env) (map fst os)))
ni env (PIfThenElse _ c t f) = concatMap (ni env) [c, t, f]
ni env (PLam fc n nfc ty sc) = ni env ty ++ ni (n:env) sc
ni env (PPi p n _ ty sc) = niTacImp env p ++ ni env ty ++ ni (n:env) sc
ni env (PRewrite _ l r _) = ni env l ++ ni env r
ni env (PTyped l r) = ni env l ++ ni env r
ni env (PPair _ _ _ l r) = ni env l ++ ni env r
ni env (PDPair _ _ _ (PRef _ _ n) t r) = ni env t ++ ni (n:env) r
ni env (PDPair _ _ _ l t r) = ni env l ++ ni env t ++ ni env r
ni env (PAlternative ns a as) = concatMap (ni env) as
ni env (PHidden tm) = ni env tm
ni env (PUnifyLog tm) = ni env tm
ni env (PDisamb _ tm) = ni env tm
ni env (PNoImplicits tm) = ni env tm
ni env _ = []
niTacImp env (TacImp _ _ scr) = ni env scr
niTacImp _ _ = []
-- Return which of the given names are used in the given term.
| 1,546
| false
| true
| 1
| 12
| 597
| 900
| 422
| 478
| null | null |
ulyssesp/AoC
|
src/day21.hs
|
bsd-3-clause
|
move' s x y = move s y x
| 24
|
move' s x y = move s y x
| 24
|
move' s x y = move s y x
| 24
| false
| false
| 0
| 5
| 8
| 20
| 9
| 11
| null | null |
colinba/tip-toi-reveng
|
src/tttool.hs
|
mit
|
yamlFileParser :: Parser FilePath
yamlFileParser = strArgument $ mconcat
[ metavar "YAML"
, help "Yaml file to read"
]
| 130
|
yamlFileParser :: Parser FilePath
yamlFileParser = strArgument $ mconcat
[ metavar "YAML"
, help "Yaml file to read"
]
| 130
|
yamlFileParser = strArgument $ mconcat
[ metavar "YAML"
, help "Yaml file to read"
]
| 96
| false
| true
| 0
| 8
| 30
| 33
| 16
| 17
| null | null |
sos22/ppres
|
ppres/driver/Classifier.hs
|
gpl-2.0
|
boolAnd x y = BooleanAnd x y
| 28
|
boolAnd x y = BooleanAnd x y
| 28
|
boolAnd x y = BooleanAnd x y
| 28
| false
| false
| 0
| 5
| 6
| 16
| 7
| 9
| null | null |
jack793/Haskell-examples
|
Homework1/app/hanoi.hs
|
gpl-3.0
|
transform game (k, selectors) =
arrange selectors $ hanoi k $ arrange selectors game
| 90
|
transform game (k, selectors) =
arrange selectors $ hanoi k $ arrange selectors game
| 90
|
transform game (k, selectors) =
arrange selectors $ hanoi k $ arrange selectors game
| 90
| false
| false
| 0
| 7
| 19
| 38
| 17
| 21
| null | null |
acowley/ghc
|
compiler/utils/StringBuffer.hs
|
bsd-3-clause
|
-- -----------------------------------------------------------------------------
-- Parsing integer strings in various bases
parseUnsignedInteger :: StringBuffer -> Int -> Integer -> (Char->Int) -> Integer
parseUnsignedInteger (StringBuffer buf _ cur) len radix char_to_int
= inlinePerformIO $ withForeignPtr buf $ \ptr -> return $! let
go i x | i == len = x
| otherwise = case fst (utf8DecodeChar (ptr `plusPtr` (cur + i))) of
char -> go (i + 1) (x * radix + toInteger (char_to_int char))
in go 0 0
| 534
|
parseUnsignedInteger :: StringBuffer -> Int -> Integer -> (Char->Int) -> Integer
parseUnsignedInteger (StringBuffer buf _ cur) len radix char_to_int
= inlinePerformIO $ withForeignPtr buf $ \ptr -> return $! let
go i x | i == len = x
| otherwise = case fst (utf8DecodeChar (ptr `plusPtr` (cur + i))) of
char -> go (i + 1) (x * radix + toInteger (char_to_int char))
in go 0 0
| 409
|
parseUnsignedInteger (StringBuffer buf _ cur) len radix char_to_int
= inlinePerformIO $ withForeignPtr buf $ \ptr -> return $! let
go i x | i == len = x
| otherwise = case fst (utf8DecodeChar (ptr `plusPtr` (cur + i))) of
char -> go (i + 1) (x * radix + toInteger (char_to_int char))
in go 0 0
| 328
| true
| true
| 0
| 21
| 111
| 183
| 91
| 92
| null | null |
SAdams601/HaRe
|
old/testing/introPattern/SubPatternIn1.hs
|
bsd-3-clause
|
g :: Int -> T -> Int
g z (C1 x b c) = x
| 39
|
g :: Int -> T -> Int
g z (C1 x b c) = x
| 39
|
g z (C1 x b c) = x
| 18
| false
| true
| 0
| 10
| 14
| 40
| 18
| 22
| null | null |
pscollins/Termonoid
|
src/Parser.hs
|
gpl-3.0
|
isEsc :: Char -> Bool
isEsc = (== '\x1b')
parsePrim' :: String -> [PrimDisplayExpr]
| 84
|
isEsc :: Char -> Bool
isEsc = (== '\x1b')
parsePrim' :: String -> [PrimDisplayExpr]
| 84
|
isEsc = (== '\x1b')
parsePrim' :: String -> [PrimDisplayExpr]
| 62
| false
| true
| 0
| 6
| 14
| 29
| 17
| 12
| null | null |
SAdams601/HaRe
|
old/testing/duplication/RecursionIn1_TokOut.hs
|
bsd-3-clause
|
fac n = n * fac (n-1)
| 21
|
fac n = n * fac (n-1)
| 21
|
fac n = n * fac (n-1)
| 21
| false
| false
| 2
| 7
| 6
| 28
| 11
| 17
| null | null |
lukexi/text-gl
|
src/Graphics/GL/TextBuffer/Render.hs
|
bsd-2-clause
|
renderTextPreCorrectedOfSameFont :: (MonadIO m, MonadReader Font m)
=> TextRenderer -> M44 GLfloat -> m ()
renderTextPreCorrectedOfSameFont textRenderer modelM44 = do
rendererVAO <- updateRenderResources textRenderer
Font{..} <- ask
let TextMetrics{..} = textRenderer ^. txrTextMetrics
GlyphUniforms{..} = fntUniforms
uniformM44 uModel modelM44
let numVertices = 4
numInstances = fromIntegral txmNumChars
withVAO rendererVAO $
glDrawArraysInstanced GL_TRIANGLE_STRIP 0 numVertices numInstances
return ()
| 609
|
renderTextPreCorrectedOfSameFont :: (MonadIO m, MonadReader Font m)
=> TextRenderer -> M44 GLfloat -> m ()
renderTextPreCorrectedOfSameFont textRenderer modelM44 = do
rendererVAO <- updateRenderResources textRenderer
Font{..} <- ask
let TextMetrics{..} = textRenderer ^. txrTextMetrics
GlyphUniforms{..} = fntUniforms
uniformM44 uModel modelM44
let numVertices = 4
numInstances = fromIntegral txmNumChars
withVAO rendererVAO $
glDrawArraysInstanced GL_TRIANGLE_STRIP 0 numVertices numInstances
return ()
| 608
|
renderTextPreCorrectedOfSameFont textRenderer modelM44 = do
rendererVAO <- updateRenderResources textRenderer
Font{..} <- ask
let TextMetrics{..} = textRenderer ^. txrTextMetrics
GlyphUniforms{..} = fntUniforms
uniformM44 uModel modelM44
let numVertices = 4
numInstances = fromIntegral txmNumChars
withVAO rendererVAO $
glDrawArraysInstanced GL_TRIANGLE_STRIP 0 numVertices numInstances
return ()
| 467
| false
| true
| 0
| 11
| 162
| 156
| 71
| 85
| null | null |
li-zhirui/EoplLangs
|
src/ImplicitRefsCont/Parser.hs
|
bsd-3-clause
|
callExpr :: Parser Expression
callExpr = parens $ do
rator <- expression
rands <- many expression
return $ CallExpr rator rands
-- | BeginExpr ::= begin BeginBody end
--
-- BeginBody ::= Expression BeginBodyTail
--
-- BeginBodyTail ::= <empty>
-- ::= ; Expression BeginBodyTail
| 304
|
callExpr :: Parser Expression
callExpr = parens $ do
rator <- expression
rands <- many expression
return $ CallExpr rator rands
-- | BeginExpr ::= begin BeginBody end
--
-- BeginBody ::= Expression BeginBodyTail
--
-- BeginBodyTail ::= <empty>
-- ::= ; Expression BeginBodyTail
| 304
|
callExpr = parens $ do
rator <- expression
rands <- many expression
return $ CallExpr rator rands
-- | BeginExpr ::= begin BeginBody end
--
-- BeginBody ::= Expression BeginBodyTail
--
-- BeginBodyTail ::= <empty>
-- ::= ; Expression BeginBodyTail
| 274
| false
| true
| 0
| 9
| 70
| 53
| 27
| 26
| null | null |
jdevelop/hslj
|
LiveJournal/Transport.hs
|
bsd-3-clause
|
runRequest :: (ResponseTransformer a b) => LJRequest -> CustomResponseParser String a -> IOResult b
runRequest request responseParser = do
curl <- liftIO CU.initialize
result <- liftIO ( CU.do_curl_ curl "http://www.livejournal.com/interface/flat" curlOptions )
applyResultP . parseResponse _customObjectFactory _customObjectDAO . extractResponse $ result
where
_customObjectFactory = customObjectFactory responseParser
_customObjectDAO = customObjectDAO responseParser
curlOptions = makeRequest request : CU.method_POST
makeRequest = CurlPostFields . DL.map makeParamNV . params
makeParamNV (RequestParam name value) = name ++ "=" ++ value
| 696
|
runRequest :: (ResponseTransformer a b) => LJRequest -> CustomResponseParser String a -> IOResult b
runRequest request responseParser = do
curl <- liftIO CU.initialize
result <- liftIO ( CU.do_curl_ curl "http://www.livejournal.com/interface/flat" curlOptions )
applyResultP . parseResponse _customObjectFactory _customObjectDAO . extractResponse $ result
where
_customObjectFactory = customObjectFactory responseParser
_customObjectDAO = customObjectDAO responseParser
curlOptions = makeRequest request : CU.method_POST
makeRequest = CurlPostFields . DL.map makeParamNV . params
makeParamNV (RequestParam name value) = name ++ "=" ++ value
| 696
|
runRequest request responseParser = do
curl <- liftIO CU.initialize
result <- liftIO ( CU.do_curl_ curl "http://www.livejournal.com/interface/flat" curlOptions )
applyResultP . parseResponse _customObjectFactory _customObjectDAO . extractResponse $ result
where
_customObjectFactory = customObjectFactory responseParser
_customObjectDAO = customObjectDAO responseParser
curlOptions = makeRequest request : CU.method_POST
makeRequest = CurlPostFields . DL.map makeParamNV . params
makeParamNV (RequestParam name value) = name ++ "=" ++ value
| 596
| false
| true
| 4
| 11
| 129
| 176
| 82
| 94
| null | null |
snoyberg/ghc
|
compiler/hsSyn/HsExpr.hs
|
bsd-3-clause
|
pprDo PArrComp stmts = paBrackets $ pprComp stmts
| 55
|
pprDo PArrComp stmts = paBrackets $ pprComp stmts
| 55
|
pprDo PArrComp stmts = paBrackets $ pprComp stmts
| 55
| false
| false
| 0
| 6
| 13
| 20
| 8
| 12
| null | null |
oldmanmike/ghc
|
compiler/hsSyn/HsUtils.hs
|
bsd-3-clause
|
nlLitPat :: HsLit -> LPat id
nlLitPat l = noLoc (LitPat l)
| 58
|
nlLitPat :: HsLit -> LPat id
nlLitPat l = noLoc (LitPat l)
| 58
|
nlLitPat l = noLoc (LitPat l)
| 29
| false
| true
| 0
| 7
| 11
| 34
| 15
| 19
| null | null |
sgraf812/lowgl
|
Graphics/GL/Low/Texture.hs
|
bsd-2-clause
|
-- | Set the active texture unit. The default is zero.
setActiveTextureUnit :: (MonadIO m, Enum a) => a -> m ()
setActiveTextureUnit n =
(glActiveTexture . fromIntegral) (GL_TEXTURE0 + fromEnum n)
| 198
|
setActiveTextureUnit :: (MonadIO m, Enum a) => a -> m ()
setActiveTextureUnit n =
(glActiveTexture . fromIntegral) (GL_TEXTURE0 + fromEnum n)
| 143
|
setActiveTextureUnit n =
(glActiveTexture . fromIntegral) (GL_TEXTURE0 + fromEnum n)
| 86
| true
| true
| 0
| 8
| 33
| 59
| 30
| 29
| null | null |
dysinger/amazonka
|
amazonka-swf/gen/Network/AWS/SWF/PollForDecisionTask.hs
|
mpl-2.0
|
-- | The name of the domain containing the task lists to poll.
pfdtDomain :: Lens' PollForDecisionTask Text
pfdtDomain = lens _pfdtDomain (\s a -> s { _pfdtDomain = a })
| 169
|
pfdtDomain :: Lens' PollForDecisionTask Text
pfdtDomain = lens _pfdtDomain (\s a -> s { _pfdtDomain = a })
| 106
|
pfdtDomain = lens _pfdtDomain (\s a -> s { _pfdtDomain = a })
| 61
| true
| true
| 0
| 9
| 30
| 40
| 22
| 18
| null | null |
SimSaladin/ggtd
|
src/GGTD/Sort.hs
|
bsd-3-clause
|
sortFunc :: SortAtom -> (Relation, Context') -> (Relation, Context') -> Ordering
sortFunc x = case x of
SFlag flag -> comparing $ Down . viewFlag flag
SCreated -> comparing $ _created . lab' . snd
SRelation f -> f `on` fst
SDesc s -> \a b -> case sortFunc s a b of
LT -> GT
GT -> LT
EQ -> EQ
| 415
|
sortFunc :: SortAtom -> (Relation, Context') -> (Relation, Context') -> Ordering
sortFunc x = case x of
SFlag flag -> comparing $ Down . viewFlag flag
SCreated -> comparing $ _created . lab' . snd
SRelation f -> f `on` fst
SDesc s -> \a b -> case sortFunc s a b of
LT -> GT
GT -> LT
EQ -> EQ
| 415
|
sortFunc x = case x of
SFlag flag -> comparing $ Down . viewFlag flag
SCreated -> comparing $ _created . lab' . snd
SRelation f -> f `on` fst
SDesc s -> \a b -> case sortFunc s a b of
LT -> GT
GT -> LT
EQ -> EQ
| 334
| false
| true
| 0
| 11
| 185
| 140
| 71
| 69
| null | null |
kim/amazonka
|
amazonka-ml/gen/Network/AWS/MachineLearning/CreateDataSourceFromS.hs
|
mpl-2.0
|
-- | 'CreateDataSourceFromS3' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'cdsfsComputeStatistics' @::@ 'Maybe' 'Bool'
--
-- * 'cdsfsDataSourceId' @::@ 'Text'
--
-- * 'cdsfsDataSourceName' @::@ 'Maybe' 'Text'
--
-- * 'cdsfsDataSpec' @::@ 'S3DataSpec'
--
createDataSourceFromS3 :: Text -- ^ 'cdsfsDataSourceId'
-> S3DataSpec -- ^ 'cdsfsDataSpec'
-> CreateDataSourceFromS3
createDataSourceFromS3 p1 p2 = CreateDataSourceFromS3
{ _cdsfsDataSourceId = p1
, _cdsfsDataSpec = p2
, _cdsfsDataSourceName = Nothing
, _cdsfsComputeStatistics = Nothing
}
| 665
|
createDataSourceFromS3 :: Text -- ^ 'cdsfsDataSourceId'
-> S3DataSpec -- ^ 'cdsfsDataSpec'
-> CreateDataSourceFromS3
createDataSourceFromS3 p1 p2 = CreateDataSourceFromS3
{ _cdsfsDataSourceId = p1
, _cdsfsDataSpec = p2
, _cdsfsDataSourceName = Nothing
, _cdsfsComputeStatistics = Nothing
}
| 372
|
createDataSourceFromS3 p1 p2 = CreateDataSourceFromS3
{ _cdsfsDataSourceId = p1
, _cdsfsDataSpec = p2
, _cdsfsDataSourceName = Nothing
, _cdsfsComputeStatistics = Nothing
}
| 209
| true
| true
| 0
| 7
| 157
| 68
| 44
| 24
| null | null |
oldmanmike/ghc
|
compiler/nativeGen/PPC/CodeGen.hs
|
bsd-3-clause
|
-- the lower 32-bit temporary which contains the
-- result; use getHiVRegFromLo to find the other
-- VRegUnique. Rules of this simplified insn
-- selection game are therefore that the returned
-- Reg may be modified
-- | Compute an expression into a register, but
-- we don't mind which one it is.
getSomeReg :: CmmExpr -> NatM (Reg, InstrBlock)
getSomeReg expr = do
r <- getRegister expr
case r of
Any rep code -> do
tmp <- getNewRegNat rep
return (tmp, code tmp)
Fixed _ reg code ->
return (reg, code)
| 643
|
getSomeReg :: CmmExpr -> NatM (Reg, InstrBlock)
getSomeReg expr = do
r <- getRegister expr
case r of
Any rep code -> do
tmp <- getNewRegNat rep
return (tmp, code tmp)
Fixed _ reg code ->
return (reg, code)
| 241
|
getSomeReg expr = do
r <- getRegister expr
case r of
Any rep code -> do
tmp <- getNewRegNat rep
return (tmp, code tmp)
Fixed _ reg code ->
return (reg, code)
| 193
| true
| true
| 0
| 14
| 231
| 109
| 55
| 54
| null | null |
intolerable/GroupProject
|
test/Emulator/CPU/InstructionsSpec.hs
|
bsd-2-clause
|
exec :: Flags -> ConditionState () -> Flags
exec f (ConditionState x) = execState x f
| 85
|
exec :: Flags -> ConditionState () -> Flags
exec f (ConditionState x) = execState x f
| 85
|
exec f (ConditionState x) = execState x f
| 41
| false
| true
| 0
| 8
| 15
| 40
| 19
| 21
| null | null |
yupferris/write-you-a-haskell
|
chapter7/poly_constraints/src/Env.hs
|
mit
|
lookup :: Name -> Env -> Maybe Scheme
lookup key (TypeEnv tys) = Map.lookup key tys
| 83
|
lookup :: Name -> Env -> Maybe Scheme
lookup key (TypeEnv tys) = Map.lookup key tys
| 83
|
lookup key (TypeEnv tys) = Map.lookup key tys
| 45
| false
| true
| 0
| 7
| 15
| 40
| 19
| 21
| null | null |
eugenkiss/loopgotowhile
|
src/Language/LoopGotoWhile/Shared/Transform.hs
|
bsd-3-clause
|
getVarNamesInAExp :: AExp -> [VarIdent]
getVarNamesInAExp = nub . f
where f (Const _) = []
f (Var var) = [var]
f (AOp _ e1 e2) = f e1 ++ f e2
-- | Return a list without duplicates of all variable identifiers in the
-- boolean expression.
| 265
|
getVarNamesInAExp :: AExp -> [VarIdent]
getVarNamesInAExp = nub . f
where f (Const _) = []
f (Var var) = [var]
f (AOp _ e1 e2) = f e1 ++ f e2
-- | Return a list without duplicates of all variable identifiers in the
-- boolean expression.
| 265
|
getVarNamesInAExp = nub . f
where f (Const _) = []
f (Var var) = [var]
f (AOp _ e1 e2) = f e1 ++ f e2
-- | Return a list without duplicates of all variable identifiers in the
-- boolean expression.
| 225
| false
| true
| 2
| 8
| 75
| 87
| 45
| 42
| null | null |
mapinguari/SC_HS_Proxy
|
src/Proxy/Query/Upgrade.hs
|
mit
|
mineralsBase U238Shells = 150
| 29
|
mineralsBase U238Shells = 150
| 29
|
mineralsBase U238Shells = 150
| 29
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
urbanslug/ghc
|
testsuite/tests/rts/stablename001.hs
|
bsd-3-clause
|
-- Test that we get the same StableName even after a GC. This is easy
-- to get wrong, by not following indirections properly.
main = do
let x = [1..10]
seq x (return ())
n1 <- makeStableName x
performGC
n2 <- makeStableName x
print (n1 == n2)
| 257
|
main = do
let x = [1..10]
seq x (return ())
n1 <- makeStableName x
performGC
n2 <- makeStableName x
print (n1 == n2)
| 128
|
main = do
let x = [1..10]
seq x (return ())
n1 <- makeStableName x
performGC
n2 <- makeStableName x
print (n1 == n2)
| 128
| true
| false
| 1
| 11
| 61
| 78
| 34
| 44
| null | null |
d0kt0r0/estuary
|
client/src/Estuary/Help/MiniTidal.hs
|
gpl-3.0
|
-- exampleText "unit" =
exampleText "chop" = "chop 16 $ sound \"arpy ~ feel*2 newnotes\""
| 89
|
exampleText "chop" = "chop 16 $ sound \"arpy ~ feel*2 newnotes\""
| 65
|
exampleText "chop" = "chop 16 $ sound \"arpy ~ feel*2 newnotes\""
| 65
| true
| false
| 0
| 5
| 14
| 10
| 5
| 5
| null | null |
vincenthz/hs-crypto-pubkey
|
Crypto/PubKey/RSA/Prim.hs
|
bsd-2-clause
|
-- | multiply 2 integers in Zm only performing the modulo operation if necessary
multiplication :: Integer -> Integer -> Integer -> Integer
multiplication a b m = (a * b) `mod` m
| 178
|
multiplication :: Integer -> Integer -> Integer -> Integer
multiplication a b m = (a * b) `mod` m
| 97
|
multiplication a b m = (a * b) `mod` m
| 38
| true
| true
| 0
| 7
| 32
| 44
| 24
| 20
| null | null |
diminishedprime/.org
|
reading-list/haskell_programming_from_first_principles/03_03.hs
|
mit
|
world :: String
world = "world!"
| 32
|
world :: String
world = "world!"
| 32
|
world = "world!"
| 16
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
acowley/ghc
|
libraries/template-haskell/Language/Haskell/TH/PprLib.hs
|
bsd-3-clause
|
doubleQuotes = liftM HPJ.doubleQuotes
| 37
|
doubleQuotes = liftM HPJ.doubleQuotes
| 37
|
doubleQuotes = liftM HPJ.doubleQuotes
| 37
| false
| false
| 0
| 6
| 3
| 11
| 5
| 6
| null | null |
cdxr/haskell-hurl
|
Physics/Hurl/Internal/Space.hs
|
mit
|
-- | A synonym for @addObject Static@
addStatic :: (Traversable f) => V2 Double -> f Solid -> Space -> IO (Object f)
addStatic = addObject Static
| 145
|
addStatic :: (Traversable f) => V2 Double -> f Solid -> Space -> IO (Object f)
addStatic = addObject Static
| 107
|
addStatic = addObject Static
| 28
| true
| true
| 0
| 11
| 26
| 51
| 25
| 26
| null | null |
jyp/prettiest
|
paper/BenchmarkXML.hs
|
gpl-3.0
|
pcContent (CRef r) = PC.text r
| 30
|
pcContent (CRef r) = PC.text r
| 30
|
pcContent (CRef r) = PC.text r
| 30
| false
| false
| 0
| 7
| 5
| 20
| 9
| 11
| null | null |
Numberartificial/workflow
|
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter22.hs
|
mit
|
tupled' :: String -> (String, String)
tupled' = liftA2 (,) composed fmapped
| 75
|
tupled' :: String -> (String, String)
tupled' = liftA2 (,) composed fmapped
| 75
|
tupled' = liftA2 (,) composed fmapped
| 37
| false
| true
| 0
| 6
| 11
| 31
| 17
| 14
| null | null |
pparkkin/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp UnsafeFreezeArrayArrayOp = _ILIT(246)
| 50
|
tagOf_PrimOp UnsafeFreezeArrayArrayOp = _ILIT(246)
| 50
|
tagOf_PrimOp UnsafeFreezeArrayArrayOp = _ILIT(246)
| 50
| false
| false
| 0
| 6
| 3
| 15
| 7
| 8
| null | null |
Tarrasch/Nollform
|
Handler/View.hs
|
bsd-2-clause
|
getViewR :: Handler RepHtml
getViewR = do
mu <- maybeAuth
let fromDnollk = fromMaybe False (fmap (isNollkUser . snd) mu)
xs <- case mu of
(Just u) | fromDnollk -> do
let query = selectList [] [SvarCreatedDesc] 0 0
list <- fmap (map snd) $ runDB query
return $ nubBy ((==) `on` svarEpost) list
_ -> return ([] :: [Svar])
defaultLayout $ do
h2id <- lift newIdent
setTitle "Nollenkätsvaren"
addWidget $(widgetFile "view")
| 531
|
getViewR :: Handler RepHtml
getViewR = do
mu <- maybeAuth
let fromDnollk = fromMaybe False (fmap (isNollkUser . snd) mu)
xs <- case mu of
(Just u) | fromDnollk -> do
let query = selectList [] [SvarCreatedDesc] 0 0
list <- fmap (map snd) $ runDB query
return $ nubBy ((==) `on` svarEpost) list
_ -> return ([] :: [Svar])
defaultLayout $ do
h2id <- lift newIdent
setTitle "Nollenkätsvaren"
addWidget $(widgetFile "view")
| 531
|
getViewR = do
mu <- maybeAuth
let fromDnollk = fromMaybe False (fmap (isNollkUser . snd) mu)
xs <- case mu of
(Just u) | fromDnollk -> do
let query = selectList [] [SvarCreatedDesc] 0 0
list <- fmap (map snd) $ runDB query
return $ nubBy ((==) `on` svarEpost) list
_ -> return ([] :: [Svar])
defaultLayout $ do
h2id <- lift newIdent
setTitle "Nollenkätsvaren"
addWidget $(widgetFile "view")
| 503
| false
| true
| 0
| 18
| 184
| 204
| 96
| 108
| null | null |
raptros/chatless-hs
|
src/Api/Ops/Topic/Base.hs
|
bsd-3-clause
|
respondMessagesCreated :: MonadRespond m => [Msg.MessageRef] -> m ResponseReceived
respondMessagesCreated msgs
| null msgs = respondEmptyBody noContent204 []
| otherwise = respondOk $ Json msgs
| 201
|
respondMessagesCreated :: MonadRespond m => [Msg.MessageRef] -> m ResponseReceived
respondMessagesCreated msgs
| null msgs = respondEmptyBody noContent204 []
| otherwise = respondOk $ Json msgs
| 201
|
respondMessagesCreated msgs
| null msgs = respondEmptyBody noContent204 []
| otherwise = respondOk $ Json msgs
| 118
| false
| true
| 1
| 8
| 32
| 63
| 29
| 34
| null | null |
ndmitchell/tagsoup
|
test/TagSoup/Generate/Translate.hs
|
bsd-3-clause
|
translate :: IO ()
translate = do
let parse x = fmap fromParseResult $ parseFileWithMode mode x
mode = defaultParseMode{fixities=infixr_ 5 ["&"] ++ baseFixities}
spec <- parse "Text/HTML/TagSoup/Specification.hs"
impl <- parse "Text/HTML/TagSoup/Implementation.hs"
putStrLn "Translating... "
writeFile "TagSoup/Generate/programs/TagSoup.hs" $ regen $ mergeModules spec impl
putStrLn "done"
| 421
|
translate :: IO ()
translate = do
let parse x = fmap fromParseResult $ parseFileWithMode mode x
mode = defaultParseMode{fixities=infixr_ 5 ["&"] ++ baseFixities}
spec <- parse "Text/HTML/TagSoup/Specification.hs"
impl <- parse "Text/HTML/TagSoup/Implementation.hs"
putStrLn "Translating... "
writeFile "TagSoup/Generate/programs/TagSoup.hs" $ regen $ mergeModules spec impl
putStrLn "done"
| 421
|
translate = do
let parse x = fmap fromParseResult $ parseFileWithMode mode x
mode = defaultParseMode{fixities=infixr_ 5 ["&"] ++ baseFixities}
spec <- parse "Text/HTML/TagSoup/Specification.hs"
impl <- parse "Text/HTML/TagSoup/Implementation.hs"
putStrLn "Translating... "
writeFile "TagSoup/Generate/programs/TagSoup.hs" $ regen $ mergeModules spec impl
putStrLn "done"
| 402
| false
| true
| 0
| 15
| 76
| 122
| 53
| 69
| null | null |
knotman90/google-interview
|
haskell/wikibook.hs
|
gpl-3.0
|
myfoldl1 f (x:xs) = myfoldl f x xs
| 34
|
myfoldl1 f (x:xs) = myfoldl f x xs
| 34
|
myfoldl1 f (x:xs) = myfoldl f x xs
| 34
| false
| false
| 0
| 6
| 7
| 29
| 12
| 17
| null | null |
minad/omega
|
src/ParserAll.hs
|
bsd-3-clause
|
symbol p = suspendLayout $ P.symbol omegaTokens p
| 49
|
symbol p = suspendLayout $ P.symbol omegaTokens p
| 49
|
symbol p = suspendLayout $ P.symbol omegaTokens p
| 49
| false
| false
| 0
| 7
| 7
| 20
| 9
| 11
| null | null |
mariefarrell/Hets
|
Propositional/Parse_AS_Basic.hs
|
gpl-2.0
|
-- | Parser for formulae containing 'and' and 'or'
andOrFormula :: AParser st AS_BASIC.FORMULA
andOrFormula = do
f <- primFormula
do c <- andKey
(fs, ps) <- primFormula `separatedBy` andKey
return . AS_BASIC.Conjunction (f : fs) . catRange $ c : ps
<|> do
c <- orKey
(fs, ps) <- primFormula `separatedBy` orKey
return . AS_BASIC.Disjunction (f : fs) . catRange $ c : ps
<|> return f
-- | Parser for formulae with implications
| 461
|
andOrFormula :: AParser st AS_BASIC.FORMULA
andOrFormula = do
f <- primFormula
do c <- andKey
(fs, ps) <- primFormula `separatedBy` andKey
return . AS_BASIC.Conjunction (f : fs) . catRange $ c : ps
<|> do
c <- orKey
(fs, ps) <- primFormula `separatedBy` orKey
return . AS_BASIC.Disjunction (f : fs) . catRange $ c : ps
<|> return f
-- | Parser for formulae with implications
| 410
|
andOrFormula = do
f <- primFormula
do c <- andKey
(fs, ps) <- primFormula `separatedBy` andKey
return . AS_BASIC.Conjunction (f : fs) . catRange $ c : ps
<|> do
c <- orKey
(fs, ps) <- primFormula `separatedBy` orKey
return . AS_BASIC.Disjunction (f : fs) . catRange $ c : ps
<|> return f
-- | Parser for formulae with implications
| 366
| true
| true
| 0
| 17
| 110
| 155
| 78
| 77
| null | null |
spechub/Hets
|
TPTP/Parser.hs
|
gpl-2.0
|
-- <th1_unary_connective> ::= !! | ?? | @@+ | @@- | @=
th1_unary_connective :: CharParser st TH1_unary_connective
th1_unary_connective = parserTrace "th1_unary_connective" (
(strTok "!!" >> return TH1_PiForAll)
<|> (strTok "??" >> return TH1_PiSigmaExists)
<|> (strTok "@@+" >> return TH1_PiIndefiniteDescription)
<|> (strTok "@@-" >> return TH1_PiDefiniteDescription)
<|> (strTok "@=" >> return TH1_PiEquality)
<?> "th1_unary_connective"
)
| 454
|
th1_unary_connective :: CharParser st TH1_unary_connective
th1_unary_connective = parserTrace "th1_unary_connective" (
(strTok "!!" >> return TH1_PiForAll)
<|> (strTok "??" >> return TH1_PiSigmaExists)
<|> (strTok "@@+" >> return TH1_PiIndefiniteDescription)
<|> (strTok "@@-" >> return TH1_PiDefiniteDescription)
<|> (strTok "@=" >> return TH1_PiEquality)
<?> "th1_unary_connective"
)
| 399
|
th1_unary_connective = parserTrace "th1_unary_connective" (
(strTok "!!" >> return TH1_PiForAll)
<|> (strTok "??" >> return TH1_PiSigmaExists)
<|> (strTok "@@+" >> return TH1_PiIndefiniteDescription)
<|> (strTok "@@-" >> return TH1_PiDefiniteDescription)
<|> (strTok "@=" >> return TH1_PiEquality)
<?> "th1_unary_connective"
)
| 340
| true
| true
| 0
| 14
| 67
| 110
| 53
| 57
| null | null |
eigengrau/haskell-sg
|
Data/SG/Geometry/TwoDim.hs
|
bsd-3-clause
|
findAllIntersections2 :: (Fractional a, Eq a) => ([Line2' a], [Line2' a]) -> [((Line2' a, a), (Line2' a, a))]
findAllIntersections2 (as, bs)
= catMaybes [ case intersectLines2 a b of
Just (ad, bd) -> Just ((a,ad), (b,bd))
Nothing -> Nothing
| a <- as, b <- bs]
| 302
|
findAllIntersections2 :: (Fractional a, Eq a) => ([Line2' a], [Line2' a]) -> [((Line2' a, a), (Line2' a, a))]
findAllIntersections2 (as, bs)
= catMaybes [ case intersectLines2 a b of
Just (ad, bd) -> Just ((a,ad), (b,bd))
Nothing -> Nothing
| a <- as, b <- bs]
| 302
|
findAllIntersections2 (as, bs)
= catMaybes [ case intersectLines2 a b of
Just (ad, bd) -> Just ((a,ad), (b,bd))
Nothing -> Nothing
| a <- as, b <- bs]
| 192
| false
| true
| 0
| 12
| 87
| 157
| 86
| 71
| null | null |
vdweegen/UvA-Software_Testing
|
Lab2/Cas/Exercises.hs
|
gpl-3.0
|
-- validate length
ibanValidLength :: String -> Bool
ibanValidLength x = length x >= 4 && length x <= 38
| 104
|
ibanValidLength :: String -> Bool
ibanValidLength x = length x >= 4 && length x <= 38
| 85
|
ibanValidLength x = length x >= 4 && length x <= 38
| 51
| true
| true
| 0
| 8
| 19
| 37
| 18
| 19
| null | null |
andorp/bead
|
src/Bead/View/Pagelets.hs
|
bsd-3-clause
|
linkToPageWithText :: P.Page a b c d e -> String -> Html
linkToPageWithText g t = H.p $ H.a ! A.href (routeOf g) ! A.id (fieldName g) $ fromString t
| 148
|
linkToPageWithText :: P.Page a b c d e -> String -> Html
linkToPageWithText g t = H.p $ H.a ! A.href (routeOf g) ! A.id (fieldName g) $ fromString t
| 148
|
linkToPageWithText g t = H.p $ H.a ! A.href (routeOf g) ! A.id (fieldName g) $ fromString t
| 91
| false
| true
| 0
| 10
| 29
| 82
| 39
| 43
| null | null |
adinapoli/Shelly.hs
|
src/Shelly.hs
|
bsd-3-clause
|
bashPipeFail :: (FilePath -> [Text] -> Sh a) -> FilePath -> [Text] -> Sh a
bashPipeFail runner fp args = runner "set -o pipefail;" (toTextIgnore fp : args)
| 155
|
bashPipeFail :: (FilePath -> [Text] -> Sh a) -> FilePath -> [Text] -> Sh a
bashPipeFail runner fp args = runner "set -o pipefail;" (toTextIgnore fp : args)
| 155
|
bashPipeFail runner fp args = runner "set -o pipefail;" (toTextIgnore fp : args)
| 80
| false
| true
| 0
| 9
| 27
| 68
| 34
| 34
| null | null |
Noeda/Megaman
|
src/NetHack/Control/ItemListing.hs
|
mit
|
updateInventoryIfNecessary :: NHAction ()
updateInventoryIfNecessary = do
needsUpdate <- resetInventoryNeedsUpdate
when needsUpdate $ do
answer 'i'
emptyInventory <- isSomewhereOnScreen "Not carrying anything."
if emptyInventory
then putInventoryM M.empty
else updateInventoryFromScreen
| 314
|
updateInventoryIfNecessary :: NHAction ()
updateInventoryIfNecessary = do
needsUpdate <- resetInventoryNeedsUpdate
when needsUpdate $ do
answer 'i'
emptyInventory <- isSomewhereOnScreen "Not carrying anything."
if emptyInventory
then putInventoryM M.empty
else updateInventoryFromScreen
| 314
|
updateInventoryIfNecessary = do
needsUpdate <- resetInventoryNeedsUpdate
when needsUpdate $ do
answer 'i'
emptyInventory <- isSomewhereOnScreen "Not carrying anything."
if emptyInventory
then putInventoryM M.empty
else updateInventoryFromScreen
| 272
| false
| true
| 0
| 12
| 56
| 65
| 29
| 36
| null | null |
ComputationWithBoundedResources/ara-inference
|
doc/tpdb_trs/Haskell/basic_haskell/show_2.hs
|
mit
|
esEsOrdering EQ LT = MyFalse
| 28
|
esEsOrdering EQ LT = MyFalse
| 28
|
esEsOrdering EQ LT = MyFalse
| 28
| false
| false
| 1
| 5
| 4
| 16
| 5
| 11
| null | null |
jmitchell/Idris-dev
|
src/Idris/IdrisDoc.hs
|
bsd-3-clause
|
nbsp :: H.Html
nbsp = preEscapedToHtml (" " :: String)
| 59
|
nbsp :: H.Html
nbsp = preEscapedToHtml (" " :: String)
| 59
|
nbsp = preEscapedToHtml (" " :: String)
| 44
| false
| true
| 0
| 6
| 8
| 22
| 12
| 10
| null | null |
mdsteele/fallback
|
src/Fallback/State/Item.hs
|
gpl-3.0
|
potionFlavorText Strawberry = "Strawberries are blushing because their seeds\
\ are on the outside."
| 102
|
potionFlavorText Strawberry = "Strawberries are blushing because their seeds\
\ are on the outside."
| 102
|
potionFlavorText Strawberry = "Strawberries are blushing because their seeds\
\ are on the outside."
| 102
| false
| false
| 1
| 5
| 15
| 13
| 4
| 9
| null | null |
UCSD-PL/RefScript
|
src/Language/Rsc/Pretty/Types.hs
|
bsd-3-clause
|
ppMut (TVar v _ ) = pp v
| 30
|
ppMut (TVar v _ ) = pp v
| 30
|
ppMut (TVar v _ ) = pp v
| 30
| false
| false
| 0
| 7
| 13
| 20
| 9
| 11
| null | null |
leonidas/lambda-webdev
|
src/hs/Main.hs
|
mit
|
main = run 8000 app
| 19
|
main = run 8000 app
| 19
|
main = run 8000 app
| 19
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
leshchevds/ganeti
|
src/Ganeti/HTools/Program/Hscan.hs
|
bsd-2-clause
|
writeData nlen name opts (Ok cdata) = do
now <- getClockTime
let fixdata = processData now cdata
case fixdata of
Bad err -> printf "\nError for %s: failed to process data. Details:\n%s\n"
name err >> return False
Ok processed -> writeDataInner nlen name opts cdata processed
-- | Inner function for writing cluster data to disk.
| 358
|
writeData nlen name opts (Ok cdata) = do
now <- getClockTime
let fixdata = processData now cdata
case fixdata of
Bad err -> printf "\nError for %s: failed to process data. Details:\n%s\n"
name err >> return False
Ok processed -> writeDataInner nlen name opts cdata processed
-- | Inner function for writing cluster data to disk.
| 358
|
writeData nlen name opts (Ok cdata) = do
now <- getClockTime
let fixdata = processData now cdata
case fixdata of
Bad err -> printf "\nError for %s: failed to process data. Details:\n%s\n"
name err >> return False
Ok processed -> writeDataInner nlen name opts cdata processed
-- | Inner function for writing cluster data to disk.
| 358
| false
| false
| 0
| 11
| 85
| 93
| 42
| 51
| null | null |
ashgti/DTI
|
src/Language/Perl/Core.hs
|
mit
|
apply cont (EvalFunc func) args = do
{- An EvalFunc extends the evaluator so it needs access to the current continuation;
pass it as the first argument. -}
func (cont : args)
| 186
|
apply cont (EvalFunc func) args = do
{- An EvalFunc extends the evaluator so it needs access to the current continuation;
pass it as the first argument. -}
func (cont : args)
| 186
|
apply cont (EvalFunc func) args = do
{- An EvalFunc extends the evaluator so it needs access to the current continuation;
pass it as the first argument. -}
func (cont : args)
| 186
| false
| false
| 0
| 9
| 43
| 33
| 16
| 17
| null | null |
pparkkin/eta
|
compiler/ETA/Utils/OrdList.hs
|
bsd-3-clause
|
foldrOL :: (a->b->b) -> b -> OrdList a -> b
foldrOL _ z None = z
| 71
|
foldrOL :: (a->b->b) -> b -> OrdList a -> b
foldrOL _ z None = z
| 71
|
foldrOL _ z None = z
| 27
| false
| true
| 0
| 9
| 22
| 50
| 23
| 27
| null | null |
baldo/epass
|
demo/TestClient.hs
|
bsd-3-clause
|
main :: IO ()
main = do
hdl <- connectTo "" $ UnixSocket "test.socket"
hPutStr hdl "Test123\n"
hFlush hdl
inBox <- wrapReadHandle hdl
(\ inBox e -> inBox <! (MsgError $ show e))
outBox <- wrapWriteHandle hdl
(\ _ e -> inBox <! (MsgError $ show e))
loop inBox outBox 1
mapM_ close [inBox, outBox]
hClose hdl
| 375
|
main :: IO ()
main = do
hdl <- connectTo "" $ UnixSocket "test.socket"
hPutStr hdl "Test123\n"
hFlush hdl
inBox <- wrapReadHandle hdl
(\ inBox e -> inBox <! (MsgError $ show e))
outBox <- wrapWriteHandle hdl
(\ _ e -> inBox <! (MsgError $ show e))
loop inBox outBox 1
mapM_ close [inBox, outBox]
hClose hdl
| 375
|
main = do
hdl <- connectTo "" $ UnixSocket "test.socket"
hPutStr hdl "Test123\n"
hFlush hdl
inBox <- wrapReadHandle hdl
(\ inBox e -> inBox <! (MsgError $ show e))
outBox <- wrapWriteHandle hdl
(\ _ e -> inBox <! (MsgError $ show e))
loop inBox outBox 1
mapM_ close [inBox, outBox]
hClose hdl
| 361
| false
| true
| 0
| 14
| 125
| 149
| 69
| 80
| null | null |
mightymoose/liquidhaskell
|
tests/neg/string00.hs
|
bsd-3-clause
|
prop2 = liquidAssertB (1 /= 1)
| 30
|
prop2 = liquidAssertB (1 /= 1)
| 30
|
prop2 = liquidAssertB (1 /= 1)
| 30
| false
| false
| 0
| 7
| 5
| 16
| 8
| 8
| null | null |
josuf107/Adverb
|
Adverb/Common.hs
|
gpl-3.0
|
ritualistically = id
| 20
|
ritualistically = id
| 20
|
ritualistically = id
| 20
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
rickerbh/AoC
|
AoC2016/src/AoC201608.hs
|
mit
|
sortGrid :: (Ord a) => [((a, a), t)] -> [((a, a), t)]
sortGrid grid = sortBy (\((x, y), v) ((x', y'), v') -> if y `compare` y' == EQ then x `compare` x' else y `compare` y') grid
| 178
|
sortGrid :: (Ord a) => [((a, a), t)] -> [((a, a), t)]
sortGrid grid = sortBy (\((x, y), v) ((x', y'), v') -> if y `compare` y' == EQ then x `compare` x' else y `compare` y') grid
| 178
|
sortGrid grid = sortBy (\((x, y), v) ((x', y'), v') -> if y `compare` y' == EQ then x `compare` x' else y `compare` y') grid
| 124
| false
| true
| 0
| 11
| 37
| 132
| 78
| 54
| null | null |
osa1/sequent-core
|
src/Language/SequentCore/Simpl/Env.hs
|
bsd-3-clause
|
substCo :: SimplEnv -> Coercion -> Coercion
substCo env co = Coercion.substCo (getCvSubst env) co
| 97
|
substCo :: SimplEnv -> Coercion -> Coercion
substCo env co = Coercion.substCo (getCvSubst env) co
| 97
|
substCo env co = Coercion.substCo (getCvSubst env) co
| 53
| false
| true
| 0
| 7
| 14
| 41
| 19
| 22
| null | null |
yyotti/euler_haskell
|
test/P002Spec.hs
|
mit
|
main :: IO ()
main = hspec spec
| 31
|
main :: IO ()
main = hspec spec
| 31
|
main = hspec spec
| 17
| false
| true
| 0
| 7
| 7
| 25
| 10
| 15
| null | null |
msakai/folkung
|
Haskell/Paradox/AnalysisTypes.hs
|
mit
|
getPreds :: T s (STRef s (Map Symbol [TypeId s]))
getPreds = MkT (\idfs preds funs vars fail ok -> ok preds)
| 108
|
getPreds :: T s (STRef s (Map Symbol [TypeId s]))
getPreds = MkT (\idfs preds funs vars fail ok -> ok preds)
| 108
|
getPreds = MkT (\idfs preds funs vars fail ok -> ok preds)
| 58
| false
| true
| 0
| 11
| 21
| 62
| 31
| 31
| null | null |
rleshchinskiy/vector
|
Data/Vector.hs
|
bsd-3-clause
|
fold1M' = G.fold1M'
| 19
|
fold1M' = G.fold1M'
| 19
|
fold1M' = G.fold1M'
| 19
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
bruno-cadorette/Baeta-Compiler
|
src/Compile.hs
|
gpl-3.0
|
fmap2 f = fmap (fmap f)
| 23
|
fmap2 f = fmap (fmap f)
| 23
|
fmap2 f = fmap (fmap f)
| 23
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
ghorn/classy-dvda
|
src/Classy/Casadi/Bindings.hs
|
bsd-3-clause
|
horzcat :: CasadiModule -> [SXM] -> IO SXM
horzcat (CasadiModule cm) ins =
handlePy (\x -> ("horzcat: " ++) . show <$> formatException x >>= error) $
callMethodHs cm "horzcat" [ins] noKwParms
| 195
|
horzcat :: CasadiModule -> [SXM] -> IO SXM
horzcat (CasadiModule cm) ins =
handlePy (\x -> ("horzcat: " ++) . show <$> formatException x >>= error) $
callMethodHs cm "horzcat" [ins] noKwParms
| 195
|
horzcat (CasadiModule cm) ins =
handlePy (\x -> ("horzcat: " ++) . show <$> formatException x >>= error) $
callMethodHs cm "horzcat" [ins] noKwParms
| 152
| false
| true
| 0
| 12
| 35
| 82
| 42
| 40
| null | null |
andrewthad/persistent
|
persistent-template/Database/Persist/TH.hs
|
mit
|
lowerFirst :: Text -> Text
lowerFirst t =
case uncons t of
Just (a, b) -> cons (toLower a) b
Nothing -> t
| 125
|
lowerFirst :: Text -> Text
lowerFirst t =
case uncons t of
Just (a, b) -> cons (toLower a) b
Nothing -> t
| 125
|
lowerFirst t =
case uncons t of
Just (a, b) -> cons (toLower a) b
Nothing -> t
| 98
| false
| true
| 0
| 10
| 42
| 63
| 29
| 34
| null | null |
alphaHeavy/quickfix-hs
|
src/AlphaHeavy/FIX/FIX42/Factory.hs
|
bsd-3-clause
|
executionReport ::
Price ->
Quantity ->
ExecID ->
ExecTransType ->
ExecType ->
Price ->
Quantity ->
Quantity ->
OrdStatus ->
OrderID -> Quantity -> Side -> Symbol -> ExecutionReport
executionReport avgPx cumQty execID execTransType execType lastPx
lastShares leavesQty ordStatus orderID orderQty side symbol
= ExecutionReport (AlphaHeavy.FIX.Field avgPx)
(AlphaHeavy.FIX.Field cumQty)
(AlphaHeavy.FIX.Field execID)
(AlphaHeavy.FIX.Enumeration execTransType)
(AlphaHeavy.FIX.Enumeration execType)
(AlphaHeavy.FIX.Field lastPx)
(AlphaHeavy.FIX.Field lastShares)
(AlphaHeavy.FIX.Field leavesQty)
(AlphaHeavy.FIX.Enumeration ordStatus)
(AlphaHeavy.FIX.Field orderID)
(AlphaHeavy.FIX.Field orderQty)
(AlphaHeavy.FIX.Enumeration side)
(AlphaHeavy.FIX.Field symbol)
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
| 1,504
|
executionReport ::
Price ->
Quantity ->
ExecID ->
ExecTransType ->
ExecType ->
Price ->
Quantity ->
Quantity ->
OrdStatus ->
OrderID -> Quantity -> Side -> Symbol -> ExecutionReport
executionReport avgPx cumQty execID execTransType execType lastPx
lastShares leavesQty ordStatus orderID orderQty side symbol
= ExecutionReport (AlphaHeavy.FIX.Field avgPx)
(AlphaHeavy.FIX.Field cumQty)
(AlphaHeavy.FIX.Field execID)
(AlphaHeavy.FIX.Enumeration execTransType)
(AlphaHeavy.FIX.Enumeration execType)
(AlphaHeavy.FIX.Field lastPx)
(AlphaHeavy.FIX.Field lastShares)
(AlphaHeavy.FIX.Field leavesQty)
(AlphaHeavy.FIX.Enumeration ordStatus)
(AlphaHeavy.FIX.Field orderID)
(AlphaHeavy.FIX.Field orderQty)
(AlphaHeavy.FIX.Enumeration side)
(AlphaHeavy.FIX.Field symbol)
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
| 1,504
|
executionReport avgPx cumQty execID execTransType execType lastPx
lastShares leavesQty ordStatus orderID orderQty side symbol
= ExecutionReport (AlphaHeavy.FIX.Field avgPx)
(AlphaHeavy.FIX.Field cumQty)
(AlphaHeavy.FIX.Field execID)
(AlphaHeavy.FIX.Enumeration execTransType)
(AlphaHeavy.FIX.Enumeration execType)
(AlphaHeavy.FIX.Field lastPx)
(AlphaHeavy.FIX.Field lastShares)
(AlphaHeavy.FIX.Field leavesQty)
(AlphaHeavy.FIX.Enumeration ordStatus)
(AlphaHeavy.FIX.Field orderID)
(AlphaHeavy.FIX.Field orderQty)
(AlphaHeavy.FIX.Enumeration side)
(AlphaHeavy.FIX.Field symbol)
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
| 1,072
| false
| true
| 0
| 17
| 606
| 296
| 153
| 143
| null | null |
Fuuzetsu/haddock
|
haddock-library/test/Documentation/Haddock/ParserSpec.hs
|
bsd-2-clause
|
parseString :: String -> Doc String
parseString = Parse.toRegular . Parse.parseString
| 85
|
parseString :: String -> Doc String
parseString = Parse.toRegular . Parse.parseString
| 85
|
parseString = Parse.toRegular . Parse.parseString
| 49
| false
| true
| 0
| 6
| 10
| 26
| 13
| 13
| null | null |
iron-codegen/iron
|
library/Iron/IR.hs
|
bsd-3-clause
|
mkLambdaExpr :: Embeddable t (AnnExpr d b) => ExprAnn -> Vector b -> t -> t
mkLambdaExpr a vs = embed . EnvT a . LambdaExpr vs
| 126
|
mkLambdaExpr :: Embeddable t (AnnExpr d b) => ExprAnn -> Vector b -> t -> t
mkLambdaExpr a vs = embed . EnvT a . LambdaExpr vs
| 126
|
mkLambdaExpr a vs = embed . EnvT a . LambdaExpr vs
| 50
| false
| true
| 1
| 10
| 26
| 68
| 30
| 38
| null | null |
kishoredbn/barrelfish
|
hake/RuleDefs.hs
|
mit
|
libvfs_deps_nonfs t = LibDeps $ (vfsdeps [VFS_RamFS, VFS_BlockdevFS, VFS_FAT] t)
| 85
|
libvfs_deps_nonfs t = LibDeps $ (vfsdeps [VFS_RamFS, VFS_BlockdevFS, VFS_FAT] t)
| 85
|
libvfs_deps_nonfs t = LibDeps $ (vfsdeps [VFS_RamFS, VFS_BlockdevFS, VFS_FAT] t)
| 85
| false
| false
| 0
| 8
| 14
| 30
| 16
| 14
| null | null |
Zoetermeer/latro
|
src/Latro/Typecheck.hs
|
mit
|
metaOccursInTyCon :: Ty -> TyCon -> Bool
metaOccursInTyCon tyMeta@(TyMeta _ metaId) tyCon =
case tyCon of
TyConTyFun _ ty -> metaOccursIn tyMeta ty
TyConUnique _ tyCon -> metaOccursInTyCon tyMeta tyCon
_ -> False
| 226
|
metaOccursInTyCon :: Ty -> TyCon -> Bool
metaOccursInTyCon tyMeta@(TyMeta _ metaId) tyCon =
case tyCon of
TyConTyFun _ ty -> metaOccursIn tyMeta ty
TyConUnique _ tyCon -> metaOccursInTyCon tyMeta tyCon
_ -> False
| 226
|
metaOccursInTyCon tyMeta@(TyMeta _ metaId) tyCon =
case tyCon of
TyConTyFun _ ty -> metaOccursIn tyMeta ty
TyConUnique _ tyCon -> metaOccursInTyCon tyMeta tyCon
_ -> False
| 185
| false
| true
| 6
| 6
| 46
| 74
| 38
| 36
| null | null |
gamelost/pcgen-rules
|
src/JEPFormula.hs
|
apache-2.0
|
evalJEPFormulae _ (CharBonusTo _) =
warning "evaluating charbonusto() is not implemented"
0
| 95
|
evalJEPFormulae _ (CharBonusTo _) =
warning "evaluating charbonusto() is not implemented"
0
| 95
|
evalJEPFormulae _ (CharBonusTo _) =
warning "evaluating charbonusto() is not implemented"
0
| 95
| false
| false
| 1
| 6
| 15
| 26
| 10
| 16
| null | null |
bamboo/idris-cil
|
src/IRTS/CodegenCil.hs
|
bsd-3-clause
|
emitConst (B32 i) = emitConst . BI . fromIntegral $ i
| 53
|
emitConst (B32 i) = emitConst . BI . fromIntegral $ i
| 53
|
emitConst (B32 i) = emitConst . BI . fromIntegral $ i
| 53
| false
| false
| 0
| 7
| 10
| 27
| 13
| 14
| null | null |
TomMD/cryptol
|
src/Cryptol/Prims/Eval.hs
|
bsd-3-clause
|
arithUnary :: (Integer -> Integer) -> Unary
arithUnary op = loop
where
loop ty x
| Just (len,a) <- isTSeq ty = case numTValue len of
-- words and finite sequences
Nat w | isTBit a -> VWord (BV w (op (fromWord x)))
| otherwise -> VSeq False (map (loop a) (fromSeq x))
Inf -> toStream (map (loop a) (fromSeq x))
-- functions
| Just (_,ety) <- isTFun ty =
lam $ \ y -> loop ety (fromVFun x y)
-- tuples
| Just (_,tys) <- isTTuple ty =
let as = fromVTuple x
in VTuple (zipWith loop tys as)
-- records
| Just fs <- isTRec ty =
VRecord [ (f, loop fty (lookupRecord f x)) | (f,fty) <- fs ]
| otherwise = evalPanic "arithUnary" ["Invalid arguments"]
| 740
|
arithUnary :: (Integer -> Integer) -> Unary
arithUnary op = loop
where
loop ty x
| Just (len,a) <- isTSeq ty = case numTValue len of
-- words and finite sequences
Nat w | isTBit a -> VWord (BV w (op (fromWord x)))
| otherwise -> VSeq False (map (loop a) (fromSeq x))
Inf -> toStream (map (loop a) (fromSeq x))
-- functions
| Just (_,ety) <- isTFun ty =
lam $ \ y -> loop ety (fromVFun x y)
-- tuples
| Just (_,tys) <- isTTuple ty =
let as = fromVTuple x
in VTuple (zipWith loop tys as)
-- records
| Just fs <- isTRec ty =
VRecord [ (f, loop fty (lookupRecord f x)) | (f,fty) <- fs ]
| otherwise = evalPanic "arithUnary" ["Invalid arguments"]
| 740
|
arithUnary op = loop
where
loop ty x
| Just (len,a) <- isTSeq ty = case numTValue len of
-- words and finite sequences
Nat w | isTBit a -> VWord (BV w (op (fromWord x)))
| otherwise -> VSeq False (map (loop a) (fromSeq x))
Inf -> toStream (map (loop a) (fromSeq x))
-- functions
| Just (_,ety) <- isTFun ty =
lam $ \ y -> loop ety (fromVFun x y)
-- tuples
| Just (_,tys) <- isTTuple ty =
let as = fromVTuple x
in VTuple (zipWith loop tys as)
-- records
| Just fs <- isTRec ty =
VRecord [ (f, loop fty (lookupRecord f x)) | (f,fty) <- fs ]
| otherwise = evalPanic "arithUnary" ["Invalid arguments"]
| 696
| false
| true
| 0
| 16
| 227
| 349
| 168
| 181
| null | null |
seckcoder/vector
|
Data/Vector.hs
|
bsd-3-clause
|
unsafeInit = G.unsafeInit
| 25
|
unsafeInit = G.unsafeInit
| 25
|
unsafeInit = G.unsafeInit
| 25
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
bennofs/vplan
|
src/Data/VPlan/Print.hs
|
gpl-3.0
|
-- | @gshow p a@ returns a string representation of a. If p is True, the result is enclosed in round parentheses.
gshow :: (Data a) => Bool -> a -> Box
gshow = gshowQ id
| 169
|
gshow :: (Data a) => Bool -> a -> Box
gshow = gshowQ id
| 55
|
gshow = gshowQ id
| 17
| true
| true
| 0
| 7
| 35
| 32
| 17
| 15
| null | null |
phischu/fragnix
|
tests/packages/scotty/Paths_warp.hs
|
bsd-3-clause
|
getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
| 118
|
getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
| 118
|
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name)
| 75
| false
| true
| 0
| 11
| 22
| 49
| 22
| 27
| null | null |
itayd/hh
|
src/hh.hs
|
bsd-3-clause
|
modes :: [(Mode,Behaviour)]
modes = [(Freq, Behaviour "freq" dataFileName (reverse . freqSort) onlyStr ),
(Recent, Behaviour "recent" dataFileName (reverse . same) onlyStr ),
(Favorites, Behaviour "favs" favoritesFileName (reverse . same) onlyStr )]
where
same = flip zip [1..]
sel_attr = def_attr `with_style` standout
fav_attr = def_attr `with_style` bold
fav_sel_attr = sel_attr `with_style` bold
onlyStr False False = string def_attr . fst
onlyStr True False = string fav_attr . fst
onlyStr False True = string sel_attr . fst
onlyStr True True = string fav_sel_attr . fst
| 781
|
modes :: [(Mode,Behaviour)]
modes = [(Freq, Behaviour "freq" dataFileName (reverse . freqSort) onlyStr ),
(Recent, Behaviour "recent" dataFileName (reverse . same) onlyStr ),
(Favorites, Behaviour "favs" favoritesFileName (reverse . same) onlyStr )]
where
same = flip zip [1..]
sel_attr = def_attr `with_style` standout
fav_attr = def_attr `with_style` bold
fav_sel_attr = sel_attr `with_style` bold
onlyStr False False = string def_attr . fst
onlyStr True False = string fav_attr . fst
onlyStr False True = string sel_attr . fst
onlyStr True True = string fav_sel_attr . fst
| 781
|
modes = [(Freq, Behaviour "freq" dataFileName (reverse . freqSort) onlyStr ),
(Recent, Behaviour "recent" dataFileName (reverse . same) onlyStr ),
(Favorites, Behaviour "favs" favoritesFileName (reverse . same) onlyStr )]
where
same = flip zip [1..]
sel_attr = def_attr `with_style` standout
fav_attr = def_attr `with_style` bold
fav_sel_attr = sel_attr `with_style` bold
onlyStr False False = string def_attr . fst
onlyStr True False = string fav_attr . fst
onlyStr False True = string sel_attr . fst
onlyStr True True = string fav_sel_attr . fst
| 753
| false
| true
| 0
| 9
| 290
| 211
| 115
| 96
| null | null |
vinnymac/glot-www
|
Model/Language.hs
|
mit
|
languageFileExt Fsharp = "fs"
| 29
|
languageFileExt Fsharp = "fs"
| 29
|
languageFileExt Fsharp = "fs"
| 29
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ben-schulz/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
basename :: Name -> Name
basename (NS n _) = basename n
| 55
|
basename :: Name -> Name
basename (NS n _) = basename n
| 55
|
basename (NS n _) = basename n
| 30
| false
| true
| 0
| 9
| 11
| 34
| 15
| 19
| null | null |
music-suite/music-score
|
src/Music/Score/Export/MusicXml.hs
|
bsd-3-clause
|
notateTie (Any ta, Any tb)
| ta && tb = MusicXml.beginTie . MusicXml.endTie -- TODO flip order?
| tb = MusicXml.beginTie
| ta = MusicXml.endTie
| otherwise = id
| 183
|
notateTie (Any ta, Any tb)
| ta && tb = MusicXml.beginTie . MusicXml.endTie -- TODO flip order?
| tb = MusicXml.beginTie
| ta = MusicXml.endTie
| otherwise = id
| 183
|
notateTie (Any ta, Any tb)
| ta && tb = MusicXml.beginTie . MusicXml.endTie -- TODO flip order?
| tb = MusicXml.beginTie
| ta = MusicXml.endTie
| otherwise = id
| 183
| false
| false
| 3
| 8
| 51
| 66
| 33
| 33
| null | null |
nushio3/ghc
|
compiler/stgSyn/StgLint.hs
|
bsd-3-clause
|
-- LATER: ppr alts
mkDefltMsg :: Id -> TyCon -> MsgDoc
mkDefltMsg bndr tc
= ($$) (text "Binder of a case expression doesn't match type of scrutinee:")
(ppr bndr $$ ppr (idType bndr) $$ ppr tc)
| 204
|
mkDefltMsg :: Id -> TyCon -> MsgDoc
mkDefltMsg bndr tc
= ($$) (text "Binder of a case expression doesn't match type of scrutinee:")
(ppr bndr $$ ppr (idType bndr) $$ ppr tc)
| 184
|
mkDefltMsg bndr tc
= ($$) (text "Binder of a case expression doesn't match type of scrutinee:")
(ppr bndr $$ ppr (idType bndr) $$ ppr tc)
| 148
| true
| true
| 0
| 11
| 47
| 71
| 33
| 38
| null | null |
jgjverheij/clash-cosim
|
CoSimCLaSH.hs
|
bsd-2-clause
|
wordUnpack' :: (Integral a, Bits a) => a -> Int32 -> a
wordUnpack' x y = (shiftL x 32) .|. (4294967295 .&. (fromIntegral y))
| 136
|
wordUnpack' :: (Integral a, Bits a) => a -> Int32 -> a
wordUnpack' x y = (shiftL x 32) .|. (4294967295 .&. (fromIntegral y))
| 136
|
wordUnpack' x y = (shiftL x 32) .|. (4294967295 .&. (fromIntegral y))
| 81
| false
| true
| 1
| 9
| 35
| 72
| 35
| 37
| null | null |
aslatter/xhb
|
Graphics/XHB/Shared.hs
|
bsd-3-clause
|
isCard32 :: Word32 -> a
isCard32 = undefined
| 44
|
isCard32 :: Word32 -> a
isCard32 = undefined
| 44
|
isCard32 = undefined
| 20
| false
| true
| 0
| 5
| 7
| 15
| 8
| 7
| null | null |
noughtmare/yi
|
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
|
gpl-2.0
|
-- GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
switch 'A' '*' = '\x0391'
| 77
|
switch 'A' '*' = '\x0391'
| 25
|
switch 'A' '*' = '\x0391'
| 25
| true
| false
| 0
| 5
| 13
| 12
| 6
| 6
| null | null |
eiji-a/aya
|
src/Aya/Algebra.hs
|
bsd-3-clause
|
ez3 = initDirection 0 0 1 :: Direction3
| 39
|
ez3 = initDirection 0 0 1 :: Direction3
| 39
|
ez3 = initDirection 0 0 1 :: Direction3
| 39
| false
| false
| 0
| 5
| 7
| 19
| 9
| 10
| null | null |
frawgie/cis194
|
HW2.hs
|
mit
|
-- Exercise 1
formableBy :: String -> Hand -> Bool
formableBy [] _ = True
| 74
|
formableBy :: String -> Hand -> Bool
formableBy [] _ = True
| 59
|
formableBy [] _ = True
| 22
| true
| true
| 0
| 6
| 15
| 27
| 14
| 13
| null | null |
ryantrinkle/ghcjs
|
src/Gen2/Printer.hs
|
mit
|
ghcjsRenderJs :: RenderJs
ghcjsRenderJs = defaultRenderJs { renderJsV = ghcjsRenderJsV
, renderJsS = ghcjsRenderJsS
}
| 181
|
ghcjsRenderJs :: RenderJs
ghcjsRenderJs = defaultRenderJs { renderJsV = ghcjsRenderJsV
, renderJsS = ghcjsRenderJsS
}
| 181
|
ghcjsRenderJs = defaultRenderJs { renderJsV = ghcjsRenderJsV
, renderJsS = ghcjsRenderJsS
}
| 155
| false
| true
| 0
| 7
| 78
| 32
| 16
| 16
| null | null |
stefanocerruti/haskell-primer-alpha
|
src/TimeSeries.hs
|
bsd-3-clause
|
movingAvg vals n = if (length nextVals) == n
then (meanMaybe nextVals):(movingAvg restVals n)
else []
where nextVals = take n vals
restVals = tail vals
| 225
|
movingAvg vals n = if (length nextVals) == n
then (meanMaybe nextVals):(movingAvg restVals n)
else []
where nextVals = take n vals
restVals = tail vals
| 225
|
movingAvg vals n = if (length nextVals) == n
then (meanMaybe nextVals):(movingAvg restVals n)
else []
where nextVals = take n vals
restVals = tail vals
| 225
| false
| false
| 0
| 8
| 99
| 69
| 35
| 34
| null | null |
polux/hgom
|
test/Tests.hs
|
gpl-3.0
|
testSuite :: String -> [Test]
testSuite classpath =
[ regressionSuite
, Gom.SymbolTableTests.testSuite
, crossModuleSuite classpath
]
| 142
|
testSuite :: String -> [Test]
testSuite classpath =
[ regressionSuite
, Gom.SymbolTableTests.testSuite
, crossModuleSuite classpath
]
| 142
|
testSuite classpath =
[ regressionSuite
, Gom.SymbolTableTests.testSuite
, crossModuleSuite classpath
]
| 112
| false
| true
| 0
| 6
| 24
| 36
| 20
| 16
| null | null |
byorgey/Idris-dev
|
src/IRTS/CodegenC.hs
|
bsd-3-clause
|
bcc :: Int -> BC -> String
bcc i (ASSIGN l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
| 94
|
bcc :: Int -> BC -> String
bcc i (ASSIGN l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
| 94
|
bcc i (ASSIGN l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
| 67
| false
| true
| 0
| 9
| 26
| 62
| 28
| 34
| null | null |
swoertz/pia
|
src/Interpretation.hs
|
gpl-3.0
|
-- | 'monotone' checks if every 'Function' in the given 'Interpretation' is monotone
-- it returns 'Yes' if every 'Function' is monontone, 'No' if any 'Function' is not monotone and otherwise 'Maybe'
monotone :: Interpretation -> YesNoMaybe
monotone (Interpretation {functions = fs}) = foldl1 (//) (map (Polynomial.monotone . polynomial) fs)
| 342
|
monotone :: Interpretation -> YesNoMaybe
monotone (Interpretation {functions = fs}) = foldl1 (//) (map (Polynomial.monotone . polynomial) fs)
| 142
|
monotone (Interpretation {functions = fs}) = foldl1 (//) (map (Polynomial.monotone . polynomial) fs)
| 101
| true
| true
| 0
| 10
| 50
| 56
| 31
| 25
| null | null |
geophf/1HaskellADay
|
exercises/HAD/Data/Archive.hs
|
mit
|
rels _ = []
| 22
|
rels _ = []
| 22
|
rels _ = []
| 22
| false
| false
| 0
| 5
| 14
| 11
| 5
| 6
| null | null |
oldmanmike/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
genericWordAdd2Op _ _ = panic "genericWordAdd2Op"
| 49
|
genericWordAdd2Op _ _ = panic "genericWordAdd2Op"
| 49
|
genericWordAdd2Op _ _ = panic "genericWordAdd2Op"
| 49
| false
| false
| 0
| 5
| 5
| 14
| 6
| 8
| null | null |
ribag/ganeti-experiments
|
src/Ganeti/OpParams.hs
|
gpl-2.0
|
pJQueueNotifyExec :: Field
pJQueueNotifyExec =
withDoc "'OpTestJQueue' notify_exec" $
defaultFalse "notify_exec"
| 116
|
pJQueueNotifyExec :: Field
pJQueueNotifyExec =
withDoc "'OpTestJQueue' notify_exec" $
defaultFalse "notify_exec"
| 116
|
pJQueueNotifyExec =
withDoc "'OpTestJQueue' notify_exec" $
defaultFalse "notify_exec"
| 89
| false
| true
| 0
| 6
| 14
| 21
| 10
| 11
| null | null |
xymostech/Hi-editor
|
src/Util.hs
|
bsd-3-clause
|
removeAtPosition :: Int -> [a] -> [a]
removeAtPosition _ [] = []
| 64
|
removeAtPosition :: Int -> [a] -> [a]
removeAtPosition _ [] = []
| 64
|
removeAtPosition _ [] = []
| 26
| false
| true
| 0
| 7
| 11
| 34
| 18
| 16
| null | null |
schnecki/HaskellMachineLearning
|
src/Data/ML/DecisionTree/Ops.hs
|
gpl-3.0
|
mapI f (Decision att imp i branches) = Decision att imp (f i) (fmap (mapI f) branches)
| 86
|
mapI f (Decision att imp i branches) = Decision att imp (f i) (fmap (mapI f) branches)
| 86
|
mapI f (Decision att imp i branches) = Decision att imp (f i) (fmap (mapI f) branches)
| 86
| false
| false
| 0
| 9
| 16
| 54
| 25
| 29
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.