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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
beni55/haste-compiler | libraries/ghc-7.10/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | wantReadableHandle_ fun h@(DuplexHandle _ m _) act
= wantReadableHandle' fun h m act | 86 | wantReadableHandle_ fun h@(DuplexHandle _ m _) act
= wantReadableHandle' fun h m act | 86 | wantReadableHandle_ fun h@(DuplexHandle _ m _) act
= wantReadableHandle' fun h m act | 86 | false | false | 0 | 8 | 14 | 35 | 17 | 18 | null | null |
ghc-android/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | isTcClsNameSpace _ = False | 34 | isTcClsNameSpace _ = False | 34 | isTcClsNameSpace _ = False | 34 | false | false | 0 | 5 | 11 | 9 | 4 | 5 | null | null |
airobert/yices_haskell | Math/SMT/Yices/Syntax.hs | bsd-3-clause | -- quantifires
showExpY (FORALL idtyps e) = paren $ showString "forall "
. (paren $ showListSepByWith showIdTyp " " idtyps) . space . showsPrec 0 e | 156 | showExpY (FORALL idtyps e) = paren $ showString "forall "
. (paren $ showListSepByWith showIdTyp " " idtyps) . space . showsPrec 0 e | 141 | showExpY (FORALL idtyps e) = paren $ showString "forall "
. (paren $ showListSepByWith showIdTyp " " idtyps) . space . showsPrec 0 e | 141 | true | false | 0 | 10 | 34 | 56 | 27 | 29 | null | null |
ademinn/RefactoringVerification | src/lib/FJ/Semantic.hs | bsd-3-clause | getClass :: PT.Program -> Type -> Maybe PT.Class
getClass program t = find (\cls -> PT.clsName cls == t) program | 112 | getClass :: PT.Program -> Type -> Maybe PT.Class
getClass program t = find (\cls -> PT.clsName cls == t) program | 112 | getClass program t = find (\cls -> PT.clsName cls == t) program | 63 | false | true | 0 | 10 | 19 | 53 | 26 | 27 | null | null |
wouwouwou/2017_module_8 | src/haskell/series4/series4.hs | apache-2.0 | toOperator "=" = Eq | 20 | toOperator "=" = Eq | 20 | toOperator "=" = Eq | 20 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
nushio3/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | decodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "decodeDoubleInteger") decodeDoubleIntegerIdKey | 105 | decodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "decodeDoubleInteger") decodeDoubleIntegerIdKey | 105 | decodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "decodeDoubleInteger") decodeDoubleIntegerIdKey | 105 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
sdiehl/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | promotedJustDataCon = promoteDataCon justDataCon | 51 | promotedJustDataCon = promoteDataCon justDataCon | 51 | promotedJustDataCon = promoteDataCon justDataCon | 51 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Seq/BraunSeq.hs | mit | lhead (B x _ _) = x | 19 | lhead (B x _ _) = x | 19 | lhead (B x _ _) = x | 19 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
daleooo/barrelfish | build/hake/Config.hs | mit | ethersrv_debug :: Bool
ethersrv_debug = False | 45 | ethersrv_debug :: Bool
ethersrv_debug = False | 45 | ethersrv_debug = False | 22 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
emwap/feldspar-compiler | lib/Feldspar/Compiler/Imperative/Frontend.hs | bsd-3-clause | litD :: Double -> Expression t
litD n = ConstExpr (DoubleConst n) | 65 | litD :: Double -> Expression t
litD n = ConstExpr (DoubleConst n) | 65 | litD n = ConstExpr (DoubleConst n) | 34 | false | true | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
agocorona/tryhplay | examples/examples.hs | gpl-3.0 | buttons= p "Different input elements:" ++> checkButton
**> br ++> br
++> radio
**> br ++> br
++> select
<++ br
where
... | 1,104 | buttons= p "Different input elements:" ++> checkButton
**> br ++> br
++> radio
**> br ++> br
++> select
<++ br
where
... | 1,104 | buttons= p "Different input elements:" ++> checkButton
**> br ++> br
++> radio
**> br ++> br
++> select
<++ br
where
... | 1,104 | false | false | 0 | 18 | 518 | 327 | 162 | 165 | null | null |
HIPERFIT/contracts | Haskell/LexifiContracts.hs | mit | -- European option on DJ_Eurostoxx_50, starting
european :: MContract
european = (start, -- 2011-12-09
transl duration -- on 2012-11-30
(scale (maxx 0 (obs (idx,0) - strike))
(transfOne EUR "them" "us")))
where start = at "2011-12-09" :: Date
... | 589 | european :: MContract
european = (start, -- 2011-12-09
transl duration -- on 2012-11-30
(scale (maxx 0 (obs (idx,0) - strike))
(transfOne EUR "them" "us")))
where start = at "2011-12-09" :: Date
duration = dateDiff start (at "2012-11-3... | 540 | european = (start, -- 2011-12-09
transl duration -- on 2012-11-30
(scale (maxx 0 (obs (idx,0) - strike))
(transfOne EUR "them" "us")))
where start = at "2011-12-09" :: Date
duration = dateDiff start (at "2012-11-30")
... | 518 | true | true | 0 | 14 | 225 | 108 | 60 | 48 | null | null |
DominikDitoIvosevic/Uni | IRG/src/Irg/Lab2/Geometry/Shapes.hs | mit | myTrace :: Show a => a -> a
myTrace x = if False then traceShowId x else x | 74 | myTrace :: Show a => a -> a
myTrace x = if False then traceShowId x else x | 74 | myTrace x = if False then traceShowId x else x | 46 | false | true | 0 | 8 | 17 | 42 | 19 | 23 | null | null |
supermario/stack | src/Stack/Ghci.hs | bsd-3-clause | -- | Launch a GHCi session for the given local package targets with the
-- given options and configure it with the load paths and extensions
-- of those targets.
ghci
:: (HasConfig r, HasBuildConfig r, HasHttpManager r, MonadMask m, HasLogLevel r, HasTerminal r, HasEnvConfig r, MonadReader r m, MonadIO m, MonadThro... | 2,227 | ghci
:: (HasConfig r, HasBuildConfig r, HasHttpManager r, MonadMask m, HasLogLevel r, HasTerminal r, HasEnvConfig r, MonadReader r m, MonadIO m, MonadThrow m, MonadLogger m, MonadCatch m, MonadBaseControl IO m)
=> GhciOpts -> m ()
ghci GhciOpts{..} = do
(targets,mainIsTargets,pkgs) <- ghciSetup ghciMainIs g... | 2,065 | ghci GhciOpts{..} = do
(targets,mainIsTargets,pkgs) <- ghciSetup ghciMainIs ghciTargets
bconfig <- asks getBuildConfig
mainFile <- figureOutMainFile mainIsTargets targets pkgs
wc <- getWhichCompiler
let pkgopts = concatMap ghciPkgOpts pkgs
modulesToLoad
| ghciNoLoadModules = []
... | 1,826 | true | true | 3 | 20 | 721 | 503 | 245 | 258 | null | null |
karljs/blunderbot | src/BlunderLib/Util.hs | bsd-3-clause | incRank :: Position -> Maybe Position
incRank (Pos f R1) = Just (Pos f R2) | 74 | incRank :: Position -> Maybe Position
incRank (Pos f R1) = Just (Pos f R2) | 74 | incRank (Pos f R1) = Just (Pos f R2) | 36 | false | true | 0 | 7 | 14 | 40 | 19 | 21 | null | null |
frozencemetery/hdata | HData.hs | gpl-3.0 | -- works only on sorted
-- be sure this does what you want
collect :: (Eq a) => [a] -> [(a, Int)]
collect [] = [] | 113 | collect :: (Eq a) => [a] -> [(a, Int)]
collect [] = [] | 54 | collect [] = [] | 15 | true | true | 0 | 8 | 25 | 45 | 26 | 19 | null | null |
sphaso/firebase-haskell-client | test/Spec.hs | bsd-3-clause | spec :: Spec
spec = do
describe "Integration" IT.spec
describe "Unit" UT.spec | 93 | spec :: Spec
spec = do
describe "Integration" IT.spec
describe "Unit" UT.spec | 93 | spec = do
describe "Integration" IT.spec
describe "Unit" UT.spec | 80 | false | true | 0 | 8 | 27 | 31 | 14 | 17 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F01.hs | bsd-3-clause | ptr_glActiveShaderProgramEXT :: FunPtr (GLuint -> GLuint -> IO ())
ptr_glActiveShaderProgramEXT = unsafePerformIO $ getCommand "glActiveShaderProgramEXT" | 153 | ptr_glActiveShaderProgramEXT :: FunPtr (GLuint -> GLuint -> IO ())
ptr_glActiveShaderProgramEXT = unsafePerformIO $ getCommand "glActiveShaderProgramEXT" | 153 | ptr_glActiveShaderProgramEXT = unsafePerformIO $ getCommand "glActiveShaderProgramEXT" | 86 | false | true | 1 | 10 | 14 | 40 | 18 | 22 | null | null |
NicolasDP/hit | Data/Git/Named.hs | bsd-3-clause | toRefTy :: String -> RefSpecTy
toRefTy s
| "refs/tags/" `isPrefixOf` s = RefTag $ RefName $ drop 10 s
| "refs/heads/" `isPrefixOf` s = RefBranch $ RefName $ drop 11 s
| "refs/remotes/" `isPrefixOf` s = RefRemote $ RefName $ drop 13 s
| "refs/patches/" `isPrefixOf` s = RefPatches $ drop 13 s
| "... | 562 | toRefTy :: String -> RefSpecTy
toRefTy s
| "refs/tags/" `isPrefixOf` s = RefTag $ RefName $ drop 10 s
| "refs/heads/" `isPrefixOf` s = RefBranch $ RefName $ drop 11 s
| "refs/remotes/" `isPrefixOf` s = RefRemote $ RefName $ drop 13 s
| "refs/patches/" `isPrefixOf` s = RefPatches $ drop 13 s
| "... | 562 | toRefTy s
| "refs/tags/" `isPrefixOf` s = RefTag $ RefName $ drop 10 s
| "refs/heads/" `isPrefixOf` s = RefBranch $ RefName $ drop 11 s
| "refs/remotes/" `isPrefixOf` s = RefRemote $ RefName $ drop 13 s
| "refs/patches/" `isPrefixOf` s = RefPatches $ drop 13 s
| "refs/stash" == s =... | 531 | false | true | 1 | 8 | 203 | 206 | 99 | 107 | null | null |
feliposz/learning-stuff | haskell/learn_chapter9.hs | mit | upperS = S.pack [65..90] | 24 | upperS = S.pack [65..90] | 24 | upperS = S.pack [65..90] | 24 | false | false | 1 | 6 | 3 | 20 | 8 | 12 | null | null |
glutamate/probably-baysig | src/Strategy/MALA.hs | bsd-3-clause | extState
:: Target
-> Parameters
-> ContinuousParams
-> Parameters
-> ContinuousParams
-> Double
-> Double
-> Parameters
nextState target current cMean proposal pMean e z
| z < pAccent = proposal
| otherwise = current
where
ratio = acceptProb target current cMean proposal pMean e
pAc... | 377 | nextState
:: Target
-> Parameters
-> ContinuousParams
-> Parameters
-> ContinuousParams
-> Double
-> Double
-> Parameters
nextState target current cMean proposal pMean e z
| z < pAccent = proposal
| otherwise = current
where
ratio = acceptProb target current cMean proposal pMean e
pA... | 377 | nextState target current cMean proposal pMean e z
| z < pAccent = proposal
| otherwise = current
where
ratio = acceptProb target current cMean proposal pMean e
pAccent | isNaN ratio = 0
| otherwise = ratio | 239 | false | true | 4 | 13 | 105 | 119 | 56 | 63 | null | null |
ezyang/ghc | testsuite/tests/ghc-api/T7478/T7478.hs | bsd-3-clause | main :: IO ()
main = do
[libdir] <- getArgs
runGhc (Just libdir) $ do
liftIO $ putStrLn "----- 0 ------"
compileInGhc ["A.hs", "B.hs"] $ \msg -> print (0 :: Int, msg)
liftIO $ putStrLn "----- 1 ------"
compileInGhc ["A.hs", "B.hs"] $ \msg -> print (1 :: Int, msg)
liftIO $ putStrLn "----- 2 ------"
co... | 371 | main :: IO ()
main = do
[libdir] <- getArgs
runGhc (Just libdir) $ do
liftIO $ putStrLn "----- 0 ------"
compileInGhc ["A.hs", "B.hs"] $ \msg -> print (0 :: Int, msg)
liftIO $ putStrLn "----- 1 ------"
compileInGhc ["A.hs", "B.hs"] $ \msg -> print (1 :: Int, msg)
liftIO $ putStrLn "----- 2 ------"
co... | 371 | main = do
[libdir] <- getArgs
runGhc (Just libdir) $ do
liftIO $ putStrLn "----- 0 ------"
compileInGhc ["A.hs", "B.hs"] $ \msg -> print (0 :: Int, msg)
liftIO $ putStrLn "----- 1 ------"
compileInGhc ["A.hs", "B.hs"] $ \msg -> print (1 :: Int, msg)
liftIO $ putStrLn "----- 2 ------"
compileInGhc ["C... | 357 | false | true | 0 | 13 | 83 | 168 | 84 | 84 | null | null |
tjakway/ghcjvm | compiler/basicTypes/Unique.hs | bsd-3-clause | dataConRepNameUnique, dataConWorkerUnique :: Unique -> Unique
dataConWorkerUnique u = incrUnique u | 99 | dataConRepNameUnique, dataConWorkerUnique :: Unique -> Unique
dataConWorkerUnique u = incrUnique u | 99 | dataConWorkerUnique u = incrUnique u | 37 | false | true | 0 | 5 | 11 | 23 | 12 | 11 | null | null |
KevinCotrone/numeric-tools | Numeric/Tools/Mesh.hs | bsd-3-clause | -- | Create uniform mesh
uniformMeshN :: Double -- ^ Lower bound
-> Double -- ^ Mesh step
-> Int -- ^ Number of points
-> UniformMesh
uniformMeshN a dx n
| n < 2 = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: too few points"
| dx <= 0 = error "Numeric.To... | 411 | uniformMeshN :: Double -- ^ Lower bound
-> Double -- ^ Mesh step
-> Int -- ^ Number of points
-> UniformMesh
uniformMeshN a dx n
| n < 2 = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: too few points"
| dx <= 0 = error "Numeric.Tool.Interpolation.Mesh.uni... | 386 | uniformMeshN a dx n
| n < 2 = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: too few points"
| dx <= 0 = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: nonpositive step"
| otherwise = UniformMesh a dx n | 232 | true | true | 2 | 8 | 113 | 77 | 38 | 39 | null | null |
hvr/text | Data/Text/Lazy/Encoding.hs | bsd-2-clause | -- | Encode text using big endian UTF-16 encoding.
encodeUtf16BE :: Text -> B.ByteString
encodeUtf16BE txt = B.fromChunks (foldrChunks ((:) . TE.encodeUtf16BE) [] txt) | 167 | encodeUtf16BE :: Text -> B.ByteString
encodeUtf16BE txt = B.fromChunks (foldrChunks ((:) . TE.encodeUtf16BE) [] txt) | 116 | encodeUtf16BE txt = B.fromChunks (foldrChunks ((:) . TE.encodeUtf16BE) [] txt) | 78 | true | true | 0 | 10 | 23 | 49 | 26 | 23 | null | null |
christiaanb/SoOSiM-components | src/SoOSiM/Components/Thread/Interface.hs | mit | -- | Create a new thread body / instance
threadInstance ::
ThreadId -- ^ (copy of) ThreadId
-> ComponentId -- ^ ComponentID of the scheduler controlling the thread
-> TVar Thread -- ^ Reference to the thread meta-data
-> NodeId -- ^ Node on which to instantiate the thread
-> String -- ^ Name o... | 517 | threadInstance ::
ThreadId -- ^ (copy of) ThreadId
-> ComponentId -- ^ ComponentID of the scheduler controlling the thread
-> TVar Thread -- ^ Reference to the thread meta-data
-> NodeId -- ^ Node on which to instantiate the thread
-> String -- ^ Name of the application the thread belongs to
... | 476 | threadInstance tid sid th nid an =
createComponentNPS (Just nid) Nothing (Just $ TH_State tid sid (Just th) an) (ThreadIFace (tid,an)) | 136 | true | true | 0 | 11 | 114 | 104 | 54 | 50 | null | null |
hherman1/HWA | src/Data/Graph/Inductive/Query/SP/DAG.hs | bsd-3-clause | genVectors ::
Int -- ^ Length of the vectors, ie, length of the graph or topsort
-> a
-> b
-> IO (IOVector a, IOVector b)
genVectors n val1 val2 = do
distances <- new (n + 1)
predecessors <- new (n + 1)
set distances val1
set predecessors val2
return (distances,predecessors) | 312 | genVectors ::
Int -- ^ Length of the vectors, ie, length of the graph or topsort
-> a
-> b
-> IO (IOVector a, IOVector b)
genVectors n val1 val2 = do
distances <- new (n + 1)
predecessors <- new (n + 1)
set distances val1
set predecessors val2
return (distances,predecessors) | 312 | genVectors n val1 val2 = do
distances <- new (n + 1)
predecessors <- new (n + 1)
set distances val1
set predecessors val2
return (distances,predecessors) | 173 | false | true | 0 | 10 | 88 | 108 | 51 | 57 | null | null |
rfranek/duckling | Duckling/Time/DE/Rules.hs | bsd-3-clause | ruleNamedmonthDayofmonthNonOrdinal :: Rule
ruleNamedmonthDayofmonthNonOrdinal = Rule
{ name = "<named-month> <day-of-month> (non ordinal)"
, pattern =
[ Predicate isAMonth
, Predicate isDOMInteger
]
, prod = \tokens -> case tokens of
(Token Time td:token:_) -> Token Time <$> intersectDOM td toke... | 344 | ruleNamedmonthDayofmonthNonOrdinal :: Rule
ruleNamedmonthDayofmonthNonOrdinal = Rule
{ name = "<named-month> <day-of-month> (non ordinal)"
, pattern =
[ Predicate isAMonth
, Predicate isDOMInteger
]
, prod = \tokens -> case tokens of
(Token Time td:token:_) -> Token Time <$> intersectDOM td toke... | 344 | ruleNamedmonthDayofmonthNonOrdinal = Rule
{ name = "<named-month> <day-of-month> (non ordinal)"
, pattern =
[ Predicate isAMonth
, Predicate isDOMInteger
]
, prod = \tokens -> case tokens of
(Token Time td:token:_) -> Token Time <$> intersectDOM td token
_ -> Nothing
} | 301 | false | true | 0 | 14 | 76 | 96 | 50 | 46 | null | null |
psibi/persistent | persistent/Database/Persist/Sql/Run.hs | mit | liftSqlPersistMPool
:: (MonadIO m, IsSqlBackend backend)
=> ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> m a
liftSqlPersistMPool x pool = liftIO (runSqlPersistMPool x pool) | 200 | liftSqlPersistMPool
:: (MonadIO m, IsSqlBackend backend)
=> ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> m a
liftSqlPersistMPool x pool = liftIO (runSqlPersistMPool x pool) | 200 | liftSqlPersistMPool x pool = liftIO (runSqlPersistMPool x pool) | 63 | false | true | 0 | 12 | 34 | 80 | 37 | 43 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/Simple/GHCJS.hs | bsd-3-clause | configure :: Verbosity -> Maybe FilePath -> Maybe FilePath
-> ProgramConfiguration
-> IO (Compiler, Maybe Platform, ProgramConfiguration)
configure verbosity hcPath hcPkgPath conf0 = do
(ghcjsProg, ghcjsVersion, conf1) <-
requireProgramVersion verbosity ghcjsProgram
(orLaterVersion (Vers... | 3,165 | configure :: Verbosity -> Maybe FilePath -> Maybe FilePath
-> ProgramConfiguration
-> IO (Compiler, Maybe Platform, ProgramConfiguration)
configure verbosity hcPath hcPkgPath conf0 = do
(ghcjsProg, ghcjsVersion, conf1) <-
requireProgramVersion verbosity ghcjsProgram
(orLaterVersion (Vers... | 3,165 | configure verbosity hcPath hcPkgPath conf0 = do
(ghcjsProg, ghcjsVersion, conf1) <-
requireProgramVersion verbosity ghcjsProgram
(orLaterVersion (Version [0,1] []))
(userMaybeSpecifyPath "ghcjs" hcPath conf0)
Just ghcjsGhcVersion <- findGhcjsGhcVersion verbosity (programPath ghcjsProg)
let implInf... | 3,007 | false | true | 0 | 18 | 791 | 619 | 309 | 310 | null | null |
dalaing/sdl2 | src/SDL/Raw/Event.hs | bsd-3-clause | gameControllerGetStringForButton :: MonadIO m => GameControllerButton -> m CString
gameControllerGetStringForButton v1 = liftIO $ gameControllerGetStringForButtonFFI v1 | 168 | gameControllerGetStringForButton :: MonadIO m => GameControllerButton -> m CString
gameControllerGetStringForButton v1 = liftIO $ gameControllerGetStringForButtonFFI v1 | 168 | gameControllerGetStringForButton v1 = liftIO $ gameControllerGetStringForButtonFFI v1 | 85 | false | true | 0 | 7 | 15 | 35 | 16 | 19 | null | null |
ZjMNZHgG5jMXw/privacy-option | Language/POL/Syntax.hs | bsd-3-clause | sortAnd :: (Ord a, Ord p, Ord l)
=> Contract a p l m -> Contract a p l m
sortAnd = unfoldAnd . foldAnd consFoldedAnd nullFoldedAnd | 138 | sortAnd :: (Ord a, Ord p, Ord l)
=> Contract a p l m -> Contract a p l m
sortAnd = unfoldAnd . foldAnd consFoldedAnd nullFoldedAnd | 138 | sortAnd = unfoldAnd . foldAnd consFoldedAnd nullFoldedAnd | 57 | false | true | 1 | 8 | 34 | 70 | 32 | 38 | null | null |
JAnthelme/relation-tool | src/Relvar/Pretty/BoxesText.hs | bsd-3-clause | -- XXX make QC properties for takeP
-- | \"Padded take\": @takeP a n xs@ is the same as @take n xs@, if @n
-- <= length xs@; otherwise it is @xs@ followed by enough copies of
-- @a@ to make the length equal to @n@.
takeP :: a -> Int -> [a] -> [a]
takeP _ n _ | n <= 0 = [] | 282 | takeP :: a -> Int -> [a] -> [a]
takeP _ n _ | n <= 0 = [] | 62 | takeP _ n _ | n <= 0 = [] | 30 | true | true | 0 | 10 | 74 | 58 | 29 | 29 | null | null |
alexgadea/fun | Fun/Parser/Internal.hs | gpl-3.0 | keywordEnd :: ParserD ()
keywordEnd = keyword "end" | 51 | keywordEnd :: ParserD ()
keywordEnd = keyword "end" | 51 | keywordEnd = keyword "end" | 26 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags XorIOp = Just (mo_wordXor dflags) | 60 | translateOp dflags XorIOp = Just (mo_wordXor dflags) | 60 | translateOp dflags XorIOp = Just (mo_wordXor dflags) | 60 | false | false | 0 | 7 | 14 | 22 | 9 | 13 | null | null |
thalerjonathan/phd | coding/prototyping/haskell/sir/src/SIRClassic.hs | gpl-3.0 | exportSIRDynamics :: [(Float, Float, Float)] -> IO ()
exportSIRDynamics d = do
h <- openFile filePath WriteMode
hPutStr h (encode d)
hClose h
return ()
-- | 162 | exportSIRDynamics :: [(Float, Float, Float)] -> IO ()
exportSIRDynamics d = do
h <- openFile filePath WriteMode
hPutStr h (encode d)
hClose h
return ()
-- | 162 | exportSIRDynamics d = do
h <- openFile filePath WriteMode
hPutStr h (encode d)
hClose h
return ()
-- | 108 | false | true | 0 | 9 | 33 | 76 | 36 | 40 | null | null |
rashack/alpha-words.hs | app/Main.hs | bsd-3-clause | lengthOrdered :: [[a]] -> [[a]]
lengthOrdered = sortOn length | 61 | lengthOrdered :: [[a]] -> [[a]]
lengthOrdered = sortOn length | 61 | lengthOrdered = sortOn length | 29 | false | true | 0 | 7 | 8 | 30 | 17 | 13 | null | null |
snoyberg/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | pprConDecl :: (OutputableBndrId name) => ConDecl name -> SDoc
pprConDecl (ConDeclH98 { con_name = L _ con
, con_qvars = mtvs
, con_cxt = mcxt
, con_details = details
, con_doc = doc })
= sep [ppr_mbDoc doc, pprHsForAll tvs cxt... | 813 | pprConDecl :: (OutputableBndrId name) => ConDecl name -> SDoc
pprConDecl (ConDeclH98 { con_name = L _ con
, con_qvars = mtvs
, con_cxt = mcxt
, con_details = details
, con_doc = doc })
= sep [ppr_mbDoc doc, pprHsForAll tvs cxt... | 813 | pprConDecl (ConDeclH98 { con_name = L _ con
, con_qvars = mtvs
, con_cxt = mcxt
, con_details = details
, con_doc = doc })
= sep [ppr_mbDoc doc, pprHsForAll tvs cxt, ppr_details details]
where
ppr_details (InfixC... | 751 | false | true | 4 | 15 | 308 | 256 | 131 | 125 | null | null |
antonlogvinenko/javelin | src/Javelin/Lib/ByteCode/Stats.hs | mit | oc (ANewArray _) = "anewarray" | 30 | oc (ANewArray _) = "anewarray" | 30 | oc (ANewArray _) = "anewarray" | 30 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
asztal/transact-sql | Language/TransactSql/Types.hs | bsd-3-clause | len HierarchyId = Varying 1 892 | 31 | len HierarchyId = Varying 1 892 | 31 | len HierarchyId = Varying 1 892 | 31 | false | false | 0 | 5 | 5 | 15 | 6 | 9 | null | null |
Teaspot-Studio/bmstu-commi-genetics-haste | Commi/Util.hs | bsd-3-clause | debugMsg :: (MonadIO m, Show a) => a -> m ()
debugMsg = liftIO . writeLog . show | 80 | debugMsg :: (MonadIO m, Show a) => a -> m ()
debugMsg = liftIO . writeLog . show | 80 | debugMsg = liftIO . writeLog . show | 35 | false | true | 0 | 8 | 17 | 43 | 22 | 21 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxALIGN_CENTRE :: Int
wxALIGN_CENTRE = 2304 | 43 | wxALIGN_CENTRE :: Int
wxALIGN_CENTRE = 2304 | 43 | wxALIGN_CENTRE = 2304 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
khajavi/pandoc | src/Text/Pandoc/Readers/Markdown.hs | gpl-2.0 | -- auxiliary function for source
source' :: GenParser Char st (String, [Char])
source' = do
skipSpaces
let sourceURL excludes = many $
optional (char '\\') >> (noneOf (' ':excludes) <|> (notFollowedBy' linkTitle >> char ' '))
src <- try (char '<' >> sourceURL ">\t\n" >>~ char '>') <|> sourceURL "\t\n"
t... | 422 | source' :: GenParser Char st (String, [Char])
source' = do
skipSpaces
let sourceURL excludes = many $
optional (char '\\') >> (noneOf (' ':excludes) <|> (notFollowedBy' linkTitle >> char ' '))
src <- try (char '<' >> sourceURL ">\t\n" >>~ char '>') <|> sourceURL "\t\n"
tit <- option "" linkTitle
skipS... | 389 | source' = do
skipSpaces
let sourceURL excludes = many $
optional (char '\\') >> (noneOf (' ':excludes) <|> (notFollowedBy' linkTitle >> char ' '))
src <- try (char '<' >> sourceURL ">\t\n" >>~ char '>') <|> sourceURL "\t\n"
tit <- option "" linkTitle
skipSpaces
eof
return (uriEscapeSpaces $ remove... | 343 | true | true | 0 | 15 | 84 | 164 | 77 | 87 | null | null |
frantisekfarka/ghc-dsi | compiler/main/HscMain.hs | bsd-3-clause | makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails
makeSimpleDetails hsc_env tc_result = mkBootModDetailsTc hsc_env tc_result | 131 | makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails
makeSimpleDetails hsc_env tc_result = mkBootModDetailsTc hsc_env tc_result | 131 | makeSimpleDetails hsc_env tc_result = mkBootModDetailsTc hsc_env tc_result | 74 | false | true | 0 | 7 | 14 | 36 | 16 | 20 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Runtime/Builtin.hs | mit | code'missing :: Var v => SuperNormal v
code'missing
= unop0 1 $ \[link,b]
-> TLetD b UN (TPrm MISS [link])
$ boolift b | 123 | code'missing :: Var v => SuperNormal v
code'missing
= unop0 1 $ \[link,b]
-> TLetD b UN (TPrm MISS [link])
$ boolift b | 123 | code'missing
= unop0 1 $ \[link,b]
-> TLetD b UN (TPrm MISS [link])
$ boolift b | 84 | false | true | 2 | 10 | 27 | 67 | 32 | 35 | null | null |
topliceanu/learn | haskell/functions.hs | mit | -- given an input number return a list with all prime numbers up to the input.
primes :: Int -> [Int]
primes n = [x | x <- [2..n], prime x] | 139 | primes :: Int -> [Int]
primes n = [x | x <- [2..n], prime x] | 60 | primes n = [x | x <- [2..n], prime x] | 37 | true | true | 0 | 9 | 30 | 51 | 25 | 26 | null | null |
Warbo/quickcheck | examples/Heap_Program.hs | bsd-3-clause | heap (Merge p q) = heap p `merge` heap q | 46 | heap (Merge p q) = heap p `merge` heap q | 46 | heap (Merge p q) = heap p `merge` heap q | 46 | false | false | 0 | 6 | 15 | 30 | 14 | 16 | null | null |
vigoos/Farrago-OS | aura-master/aura-master/src/aura.hs | gpl-2.0 | version :: Settings -> IO ()
version ss = do
putStrLn auraLogo
putStrLn $ "AURA Version " ++ auraVersion
putStrLn " by Colin Woodbury\n"
mapM_ putStrLn . translatorMsg . langOf $ ss | 189 | version :: Settings -> IO ()
version ss = do
putStrLn auraLogo
putStrLn $ "AURA Version " ++ auraVersion
putStrLn " by Colin Woodbury\n"
mapM_ putStrLn . translatorMsg . langOf $ ss | 189 | version ss = do
putStrLn auraLogo
putStrLn $ "AURA Version " ++ auraVersion
putStrLn " by Colin Woodbury\n"
mapM_ putStrLn . translatorMsg . langOf $ ss | 160 | false | true | 0 | 10 | 39 | 64 | 28 | 36 | null | null |
phaazon/linear | src/Linear/V3.hs | bsd-3-clause | _yz f = _xyz $ \(V3 a b c) -> f (V2 b c) <&> \(V2 b' c') -> V3 a b' c' | 70 | _yz f = _xyz $ \(V3 a b c) -> f (V2 b c) <&> \(V2 b' c') -> V3 a b' c' | 70 | _yz f = _xyz $ \(V3 a b c) -> f (V2 b c) <&> \(V2 b' c') -> V3 a b' c' | 70 | false | false | 1 | 10 | 22 | 66 | 31 | 35 | null | null |
holzensp/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | -- TODO: Several primop implementations (e.g. 'doNewByteArrayOp') use
-- ByteOff (or some other fixed width signed type) to represent
-- array sizes or indices. This means that these will overflow for
-- large enough sizes.
-- | Decide whether an out-of-line primop should be replaced by an
-- inline implem... | 1,081 | shouldInlinePrimOp :: DynFlags
-> PrimOp -- ^ The primop
-> [CmmExpr] -- ^ The primop arguments
-> Maybe ([LocalReg] -> FCode ())
shouldInlinePrimOp dflags NewByteArrayOp_Char [(CmmLit (CmmInt n w))]
| asUnsigned w n <= fromIntegral (maxInlineAllocSize dfl... | 387 | shouldInlinePrimOp dflags NewByteArrayOp_Char [(CmmLit (CmmInt n w))]
| asUnsigned w n <= fromIntegral (maxInlineAllocSize dflags) =
Just $ \ [res] -> doNewByteArrayOp res (fromInteger n) | 195 | true | true | 0 | 12 | 236 | 130 | 72 | 58 | null | null |
mlite/hLLVM | src/Llvm/Asm/Parser/Rhs.hs | bsd-3-clause | pStore :: P MemOp
pStore = do { reserved "store"
; at <- option False (reserved "atomic" >> return True)
; b <- option (IsNot Volatile) (reserved "volatile" >> return (Is Volatile))
; tv <- pTypedValue
; ignore comma
; ptr <- pTypedPointer
; if at ... | 814 | pStore :: P MemOp
pStore = do { reserved "store"
; at <- option False (reserved "atomic" >> return True)
; b <- option (IsNot Volatile) (reserved "volatile" >> return (Is Volatile))
; tv <- pTypedValue
; ignore comma
; ptr <- pTypedPointer
; if at ... | 814 | pStore = do { reserved "store"
; at <- option False (reserved "atomic" >> return True)
; b <- option (IsNot Volatile) (reserved "volatile" >> return (Is Volatile))
; tv <- pTypedValue
; ignore comma
; ptr <- pTypedPointer
; if at then
... | 796 | false | true | 1 | 17 | 368 | 252 | 120 | 132 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F04.hs | bsd-3-clause | -- glConvolutionFilter2D -------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glConvolutionFilter2D.xml OpenGL 2.x>.
glConvolutionFilter2D
:: MonadIO m
=> GLenum -- ^ @target@ of type [ConvolutionTarget](Graphics-GL-Groups.html#ConvolutionTarget).... | 854 | glConvolutionFilter2D
:: MonadIO m
=> GLenum -- ^ @target@ of type [ConvolutionTarget](Graphics-GL-Groups.html#ConvolutionTarget).
-> GLenum -- ^ @internalformat@ of type [InternalFormat](Graphics-GL-Groups.html#InternalFormat).
-> GLsizei -- ^ @width@.
-> GLsizei -- ^ @height@.
-> GLenum -- ^ @format@ of t... | 668 | glConvolutionFilter2D v1 v2 v3 v4 v5 v6 v7 = liftIO $ dyn167 ptr_glConvolutionFilter2D v1 v2 v3 v4 v5 v6 v7 | 107 | true | true | 0 | 15 | 111 | 103 | 53 | 50 | null | null |
danchoi/jsonextfilter | Main.hs | mit | pIndex = Index <$> AT.decimal <* AT.char ']' | 44 | pIndex = Index <$> AT.decimal <* AT.char ']' | 44 | pIndex = Index <$> AT.decimal <* AT.char ']' | 44 | false | false | 1 | 7 | 7 | 24 | 10 | 14 | null | null |
GaloisInc/halvm-ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | panicBadLink :: GhcLink -> a
panicBadLink other = panic ("link: GHC not built to link this way: " ++
show other) | 140 | panicBadLink :: GhcLink -> a
panicBadLink other = panic ("link: GHC not built to link this way: " ++
show other) | 140 | panicBadLink other = panic ("link: GHC not built to link this way: " ++
show other) | 111 | false | true | 0 | 8 | 48 | 31 | 15 | 16 | null | null |
tpltnt/Tidal | Sound/Tidal/Pattern.hs | gpl-3.0 | prw1 = preplaceWith1 | 20 | prw1 = preplaceWith1 | 20 | prw1 = preplaceWith1 | 20 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
cullina/Extractor | src/Huffman.hs | bsd-3-clause | zipWithMin (k:ks) unused pairs =
case takeMin unused of
(Just x, unused') -> zipWithMin ks unused' ((k, x) : pairs)
(Nothing, unused') -> ([], unused) | 172 | zipWithMin (k:ks) unused pairs =
case takeMin unused of
(Just x, unused') -> zipWithMin ks unused' ((k, x) : pairs)
(Nothing, unused') -> ([], unused) | 172 | zipWithMin (k:ks) unused pairs =
case takeMin unused of
(Just x, unused') -> zipWithMin ks unused' ((k, x) : pairs)
(Nothing, unused') -> ([], unused) | 172 | false | false | 1 | 11 | 46 | 88 | 44 | 44 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-data/Data/Drasil/Concepts/Physics.hs | bsd-2-clause | elasticity = dcc "elasticity" (cnIES "elasticity")
"the ratio of the relative velocities of two colliding objects after and before a collision" | 145 | elasticity = dcc "elasticity" (cnIES "elasticity")
"the ratio of the relative velocities of two colliding objects after and before a collision" | 145 | elasticity = dcc "elasticity" (cnIES "elasticity")
"the ratio of the relative velocities of two colliding objects after and before a collision" | 145 | false | false | 1 | 6 | 22 | 25 | 9 | 16 | null | null |
RayRacine/aws | Aws/Core/Sign4/Test.hs | bsd-3-clause | grph :: [B.ByteString] -> [B.ByteString] -> [B.ByteString]
grph rhs [] = reverse rhs | 85 | grph :: [B.ByteString] -> [B.ByteString] -> [B.ByteString]
grph rhs [] = reverse rhs | 85 | grph rhs [] = reverse rhs | 26 | false | true | 0 | 8 | 13 | 44 | 23 | 21 | null | null |
brendanhay/gogol | gogol-partners/gen/Network/Google/Resource/Partners/Users/DeleteCompanyRelation.hs | mpl-2.0 | -- | V1 error format.
udcrXgafv :: Lens' UsersDeleteCompanyRelation (Maybe Xgafv)
udcrXgafv
= lens _udcrXgafv (\ s a -> s{_udcrXgafv = a}) | 140 | udcrXgafv :: Lens' UsersDeleteCompanyRelation (Maybe Xgafv)
udcrXgafv
= lens _udcrXgafv (\ s a -> s{_udcrXgafv = a}) | 118 | udcrXgafv
= lens _udcrXgafv (\ s a -> s{_udcrXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
jfranklin9000/urbit | pkg/hs/urbit-king/test/DawnTests.hs | mit | shasByteStrings = (Dawn.shas testSalt testString) @?= expected
where
expected = cordToAtomBytes
"0wfKW.mXzrj.c~IBb.lKd6k.2njoG.bRLcD.9eszA.gSSs8.mHRah" | 163 | shasByteStrings = (Dawn.shas testSalt testString) @?= expected
where
expected = cordToAtomBytes
"0wfKW.mXzrj.c~IBb.lKd6k.2njoG.bRLcD.9eszA.gSSs8.mHRah" | 163 | shasByteStrings = (Dawn.shas testSalt testString) @?= expected
where
expected = cordToAtomBytes
"0wfKW.mXzrj.c~IBb.lKd6k.2njoG.bRLcD.9eszA.gSSs8.mHRah" | 163 | false | false | 0 | 8 | 23 | 31 | 15 | 16 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ispecDiskSize :: String
ispecDiskSize = ConstantUtils.ispecDiskSize | 67 | ispecDiskSize :: String
ispecDiskSize = ConstantUtils.ispecDiskSize | 67 | ispecDiskSize = ConstantUtils.ispecDiskSize | 43 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
sgillespie/ghc | compiler/hsSyn/HsLit.hs | bsd-3-clause | pmPprHsLit (HsWordPrim _ w) = integer w | 41 | pmPprHsLit (HsWordPrim _ w) = integer w | 41 | pmPprHsLit (HsWordPrim _ w) = integer w | 41 | false | false | 0 | 7 | 8 | 20 | 9 | 11 | null | null |
oldmanmike/ghc | compiler/main/Packages.hs | bsd-3-clause | readPackageConfig :: DynFlags -> FilePath -> IO (FilePath, [PackageConfig])
readPackageConfig dflags conf_file = do
isdir <- doesDirectoryExist conf_file
proto_pkg_configs <-
if isdir
then readDirStylePackageConfig conf_file
else do
isfile <- doesFileExist conf_file
if isf... | 2,547 | readPackageConfig :: DynFlags -> FilePath -> IO (FilePath, [PackageConfig])
readPackageConfig dflags conf_file = do
isdir <- doesDirectoryExist conf_file
proto_pkg_configs <-
if isdir
then readDirStylePackageConfig conf_file
else do
isfile <- doesFileExist conf_file
if isf... | 2,547 | readPackageConfig dflags conf_file = do
isdir <- doesDirectoryExist conf_file
proto_pkg_configs <-
if isdir
then readDirStylePackageConfig conf_file
else do
isfile <- doesFileExist conf_file
if isfile
then do
mpkgs <- tryReadOldFileStylePack... | 2,471 | false | true | 0 | 22 | 771 | 410 | 199 | 211 | null | null |
Pnom/haskell-ast-pretty | Test/examples/Attributes.hs | mit | -- | Determine if this Attribute is valid for use with SubGraphs.
usedBySubGraphs :: Attribute -> Bool
usedBySubGraphs Rank{} = True | 139 | usedBySubGraphs :: Attribute -> Bool
usedBySubGraphs Rank{} = True | 73 | usedBySubGraphs Rank{} = True | 29 | true | true | 0 | 6 | 27 | 23 | 12 | 11 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Utils.hs | bsd-2-clause | -- | A 'head' version in the I/O monad, for validating parameters
-- without which we cannot continue.
exitIfEmpty :: String -> [a] -> IO a
exitIfEmpty _ (x:_) = return x | 170 | exitIfEmpty :: String -> [a] -> IO a
exitIfEmpty _ (x:_) = return x | 67 | exitIfEmpty _ (x:_) = return x | 30 | true | true | 0 | 7 | 31 | 42 | 22 | 20 | null | null |
tadeuzagallo/verve-lang | src/Interpreter/Env.hs | mit | addVal :: Env -> (Var, Value) -> Env
addVal env (x, v) = ValueBind x v env | 74 | addVal :: Env -> (Var, Value) -> Env
addVal env (x, v) = ValueBind x v env | 74 | addVal env (x, v) = ValueBind x v env | 37 | false | true | 0 | 9 | 16 | 48 | 24 | 24 | null | null |
mrkkrp/stack | src/Stack/Types/PackageIdentifier.hs | bsd-3-clause | -- | Get a Text representation of the package identifier; name-ver.
packageIdentifierText :: PackageIdentifier -> Text
packageIdentifierText = T.pack . packageIdentifierString | 176 | packageIdentifierText :: PackageIdentifier -> Text
packageIdentifierText = T.pack . packageIdentifierString | 108 | packageIdentifierText = T.pack . packageIdentifierString | 57 | true | true | 0 | 6 | 21 | 22 | 12 | 10 | null | null |
luinix/haskell_snail | .cabal-sandbox/share/x86_64-osx-ghc-7.6.3/hlint-1.8.59/Default.hs | gpl-3.0 | error "Evaluate" = take n [] ==> [] where note = IncreasesLaziness | 66 | error "Evaluate" = take n [] ==> [] where note = IncreasesLaziness | 66 | error "Evaluate" = take n [] ==> [] where note = IncreasesLaziness | 66 | false | false | 2 | 6 | 11 | 35 | 14 | 21 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/book/1996-Bird-de_Moor-Algebra_of_Programming/aop/src/Aop.hs | unlicense | foldR (c,h) NilR = c | 28 | foldR (c,h) NilR = c | 28 | foldR (c,h) NilR = c | 28 | false | false | 0 | 6 | 12 | 17 | 9 | 8 | null | null |
fmapfmapfmap/amazonka | amazonka-ses/test/Main.hs | mpl-2.0 | main :: IO ()
main = defaultMain $ testGroup "SES"
[ testGroup "tests" tests
, testGroup "fixtures" fixtures
] | 125 | main :: IO ()
main = defaultMain $ testGroup "SES"
[ testGroup "tests" tests
, testGroup "fixtures" fixtures
] | 125 | main = defaultMain $ testGroup "SES"
[ testGroup "tests" tests
, testGroup "fixtures" fixtures
] | 111 | false | true | 2 | 7 | 33 | 49 | 21 | 28 | null | null |
yigitozkavci/glow | src/Parser.hs | mit | binaryDef :: Parser Expr
binaryDef = do
reserved "def"
typeDecl <- parseTypeDecl
reserved "binary"
o <- op
prec <- int
args <- parens $ commaSep typedIdentifier
reservedOp "="
body <- expr
return $ BinaryDef typeDecl o args body | 246 | binaryDef :: Parser Expr
binaryDef = do
reserved "def"
typeDecl <- parseTypeDecl
reserved "binary"
o <- op
prec <- int
args <- parens $ commaSep typedIdentifier
reservedOp "="
body <- expr
return $ BinaryDef typeDecl o args body | 246 | binaryDef = do
reserved "def"
typeDecl <- parseTypeDecl
reserved "binary"
o <- op
prec <- int
args <- parens $ commaSep typedIdentifier
reservedOp "="
body <- expr
return $ BinaryDef typeDecl o args body | 221 | false | true | 0 | 10 | 55 | 96 | 39 | 57 | null | null |
AndreasPK/stack | src/Path/Extra.hs | bsd-3-clause | -- | Collapse intermediate "." and ".." directories from a path.
--
-- > collapseFilePath "./foo" == "foo"
-- > collapseFilePath "/bar/../baz" == "/baz"
-- > collapseFilePath "/../baz" == "/../baz"
-- > collapseFilePath "parent/foo/baz/../bar" == "parent/foo/bar"
-- > collapseFilePath "parent/foo/baz/../../bar" == "p... | 1,049 | collapseFilePath :: FilePath -> FilePath
collapseFilePath = FP.joinPath . reverse . foldl go [] . FP.splitDirectories
where
go rs "." = rs
go r@(p:rs) ".." = case p of
".." -> "..":r
(checkPathSeparator -> True) -> "..":r
_ ->... | 568 | collapseFilePath = FP.joinPath . reverse . foldl go [] . FP.splitDirectories
where
go rs "." = rs
go r@(p:rs) ".." = case p of
".." -> "..":r
(checkPathSeparator -> True) -> "..":r
_ -> rs
go _ (checkPathSeparator -> True)... | 527 | true | true | 2 | 10 | 250 | 194 | 101 | 93 | null | null |
rahulmutt/ghcvm | compiler/Eta/DeSugar/Coverage.hs | bsd-3-clause | isGoodBreakExpr (HsIf {}) = True | 37 | isGoodBreakExpr (HsIf {}) = True | 37 | isGoodBreakExpr (HsIf {}) = True | 37 | false | false | 0 | 7 | 9 | 16 | 8 | 8 | null | null |
mightymoose/liquidhaskell | src/Language/Haskell/Liquid/Bare/Misc.hs | bsd-3-clause | joinVar :: [Var] -> (Var, s, t) -> (Var, s, t)
joinVar vs (v,s,t) = case L.find ((== showPpr v) . showPpr) vs of
Just v' -> (v',s,t)
Nothing -> (v,s,t) | 197 | joinVar :: [Var] -> (Var, s, t) -> (Var, s, t)
joinVar vs (v,s,t) = case L.find ((== showPpr v) . showPpr) vs of
Just v' -> (v',s,t)
Nothing -> (v,s,t) | 197 | joinVar vs (v,s,t) = case L.find ((== showPpr v) . showPpr) vs of
Just v' -> (v',s,t)
Nothing -> (v,s,t) | 150 | false | true | 0 | 10 | 76 | 118 | 65 | 53 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Compiler/GhcjsHooks.hs | mit | ghcjsOneShot :: GhcjsEnv -> GhcjsSettings -> Bool -> HscEnv -> Phase -> [(String, Maybe Phase)] -> IO ()
ghcjsOneShot env settings native hsc_env stop_phase srcs = do
o_files <- mapM (compileFile hsc_env stop_phase) srcs
Gen2.ghcjsDoLink env settings native (hsc_dflags hsc_env) stop_phase o_files
-----------------... | 369 | ghcjsOneShot :: GhcjsEnv -> GhcjsSettings -> Bool -> HscEnv -> Phase -> [(String, Maybe Phase)] -> IO ()
ghcjsOneShot env settings native hsc_env stop_phase srcs = do
o_files <- mapM (compileFile hsc_env stop_phase) srcs
Gen2.ghcjsDoLink env settings native (hsc_dflags hsc_env) stop_phase o_files
-----------------... | 369 | ghcjsOneShot env settings native hsc_env stop_phase srcs = do
o_files <- mapM (compileFile hsc_env stop_phase) srcs
Gen2.ghcjsDoLink env settings native (hsc_dflags hsc_env) stop_phase o_files
--------------------------------------------------
-- Driver hooks | 264 | false | true | 0 | 13 | 50 | 111 | 55 | 56 | null | null |
marcellussiegburg/autotool | test/src/Extract.hs | gpl-2.0 | io :: MonadIO m => IO a -> m a
io = liftIO | 42 | io :: MonadIO m => IO a -> m a
io = liftIO | 42 | io = liftIO | 11 | false | true | 0 | 8 | 12 | 34 | 14 | 20 | null | null |
antonlogvinenko/javelin | src/Javelin/Lib/ByteCode/Stats.hs | mit | oc (Ret _) = "ret" | 18 | oc (Ret _) = "ret" | 18 | oc (Ret _) = "ret" | 18 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
tiann/haskell-learning | haskell99/p10/main.hs | apache-2.0 | encode' :: Eq a => [a] -> [(Int, a)]
encode' l = foldl (\acc x -> splitList x : acc) [] (group l) | 97 | encode' :: Eq a => [a] -> [(Int, a)]
encode' l = foldl (\acc x -> splitList x : acc) [] (group l) | 97 | encode' l = foldl (\acc x -> splitList x : acc) [] (group l) | 60 | false | true | 0 | 9 | 22 | 69 | 36 | 33 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/ImpGen/GPU/Base.hs | isc | compileGroupResult _ _ WriteReturns {} =
compilerLimitationS "compileGroupResult: WriteReturns not handled yet." | 114 | compileGroupResult _ _ WriteReturns {} =
compilerLimitationS "compileGroupResult: WriteReturns not handled yet." | 114 | compileGroupResult _ _ WriteReturns {} =
compilerLimitationS "compileGroupResult: WriteReturns not handled yet." | 114 | false | false | 0 | 6 | 13 | 20 | 9 | 11 | null | null |
csabahruska/gpipe-quake3 | ShaderParser.hs | bsd-3-clause | surfaceParm = pass <$> kw "surfaceparm" <* (
kw "water" <|> kw "slime" <|> kw "lava" <|> kw "playerclip" <|> kw "monsterclip"
<|> kw "nodrop" <|> kw "nonsolid" <|> kw "origin" <|> kw "trans" <|> kw "detail"
<|> kw "structural" <|> kw "areaportal" <|> kw "clusterpor... | 828 | surfaceParm = pass <$> kw "surfaceparm" <* (
kw "water" <|> kw "slime" <|> kw "lava" <|> kw "playerclip" <|> kw "monsterclip"
<|> kw "nodrop" <|> kw "nonsolid" <|> kw "origin" <|> kw "trans" <|> kw "detail"
<|> kw "structural" <|> kw "areaportal" <|> kw "clusterpor... | 828 | surfaceParm = pass <$> kw "surfaceparm" <* (
kw "water" <|> kw "slime" <|> kw "lava" <|> kw "playerclip" <|> kw "monsterclip"
<|> kw "nodrop" <|> kw "nonsolid" <|> kw "origin" <|> kw "trans" <|> kw "detail"
<|> kw "structural" <|> kw "areaportal" <|> kw "clusterpor... | 828 | false | false | 5 | 43 | 256 | 282 | 120 | 162 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/types/TyCon.hs | bsd-3-clause | tyConSingleAlgDataCon_maybe _
= Nothing | 43 | tyConSingleAlgDataCon_maybe _
= Nothing | 43 | tyConSingleAlgDataCon_maybe _
= Nothing | 43 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
phylake/avm3 | vm/store.hs | mit | xform_opCode {- 0x28 -} i u d s m t (Abc.PushNaN) = [PushNaN] | 61 | xform_opCode {- 0x28 -} i u d s m t (Abc.PushNaN) = [PushNaN] | 61 | xform_opCode {- 0x28 -} i u d s m t (Abc.PushNaN) = [PushNaN] | 61 | false | false | 0 | 7 | 12 | 30 | 16 | 14 | null | null |
urbanslug/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | pprParendTcCo co = ppr_co TyConPrec co | 38 | pprParendTcCo co = ppr_co TyConPrec co | 38 | pprParendTcCo co = ppr_co TyConPrec co | 38 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
AlephAlpha/Samau | OldSamau/CP737.hs | gpl-2.0 | readCP737File = readEncodedFile cp737 | 37 | readCP737File = readEncodedFile cp737 | 37 | readCP737File = readEncodedFile cp737 | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | cvEnodedrbd :: (String, String, String)
cvEnodedrbd =
("node",
Types.cVErrorCodeToRaw CvENODEDRBD,
"Error parsing the DRBD status file") | 144 | cvEnodedrbd :: (String, String, String)
cvEnodedrbd =
("node",
Types.cVErrorCodeToRaw CvENODEDRBD,
"Error parsing the DRBD status file") | 144 | cvEnodedrbd =
("node",
Types.cVErrorCodeToRaw CvENODEDRBD,
"Error parsing the DRBD status file") | 104 | false | true | 0 | 8 | 23 | 41 | 21 | 20 | null | null |
rvion/stack | src/Stack/Config.hs | bsd-3-clause | -- | Get the latest snapshot resolver available.
getLatestResolver
:: (MonadIO m, MonadThrow m, MonadReader env m, HasConfig env, HasHttpManager env, MonadLogger m)
=> m Resolver
getLatestResolver = do
snapshots <- getSnapshots
let mlts = do
(x,y) <- listToMaybe (reverse (IntMap.toList (snap... | 511 | getLatestResolver
:: (MonadIO m, MonadThrow m, MonadReader env m, HasConfig env, HasHttpManager env, MonadLogger m)
=> m Resolver
getLatestResolver = do
snapshots <- getSnapshots
let mlts = do
(x,y) <- listToMaybe (reverse (IntMap.toList (snapshotsLts snapshots)))
return (LTS x y... | 462 | getLatestResolver = do
snapshots <- getSnapshots
let mlts = do
(x,y) <- listToMaybe (reverse (IntMap.toList (snapshotsLts snapshots)))
return (LTS x y)
snap = fromMaybe (Nightly (snapshotsNightly snapshots)) mlts
return (ResolverSnapshot snap)
-- Interprets ConfigMonoid opti... | 324 | true | true | 0 | 19 | 113 | 157 | 77 | 80 | null | null |
zoomhub/zoomhub | vendor/servant/servant-server/test/Servant/HoistSpec.hs | mit | server' :: App Int :<|> (String -> App Bool)
server' = hoistServer api f server | 79 | server' :: App Int :<|> (String -> App Bool)
server' = hoistServer api f server | 79 | server' = hoistServer api f server | 34 | false | true | 0 | 8 | 14 | 35 | 17 | 18 | null | null |
dsorokin/aivika-experiment-chart | examples/ChemicalReaction/Experiment.hs | bsd-3-clause | b = resultByName "b" | 20 | b = resultByName "b" | 20 | b = resultByName "b" | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
diku-dk/futhark | src/Language/Futhark/TypeChecker/Terms/Pat.hs | isc | patternDims :: Pat -> [Ident]
patternDims (PatParens p _) = patternDims p | 73 | patternDims :: Pat -> [Ident]
patternDims (PatParens p _) = patternDims p | 73 | patternDims (PatParens p _) = patternDims p | 43 | false | true | 0 | 7 | 11 | 32 | 16 | 16 | null | null |
hce/avwx | src/Data/Aviation/WX.hs | mit | directionParser :: (Monad f, CharParsing f) => f (Maybe Direction)
directionParser = Nothing `option` (Just <$> choice
[ "NE" `means` NorthEast, "NW" `means` NorthWest
, "SE" `means` SouthEast, "SW" `means` SouthWest
, "NDV" `means` NDV
, "N" `means` North, "S" `means` South
, "E" `means` East, "W" ... | 335 | directionParser :: (Monad f, CharParsing f) => f (Maybe Direction)
directionParser = Nothing `option` (Just <$> choice
[ "NE" `means` NorthEast, "NW" `means` NorthWest
, "SE" `means` SouthEast, "SW" `means` SouthWest
, "NDV" `means` NDV
, "N" `means` North, "S" `means` South
, "E" `means` East, "W" ... | 335 | directionParser = Nothing `option` (Just <$> choice
[ "NE" `means` NorthEast, "NW" `means` NorthWest
, "SE" `means` SouthEast, "SW" `means` SouthWest
, "NDV" `means` NDV
, "N" `means` North, "S" `means` South
, "E" `means` East, "W" `means` West ]) | 268 | false | true | 0 | 10 | 69 | 132 | 81 | 51 | null | null |
vincenthz/hs-foundation | foundation/benchs/Fake/ByteString.hs | bsd-3-clause | reverse = undefined | 23 | reverse = undefined | 23 | reverse = undefined | 23 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
jkoppel/Strafunski-ATermLib | Data/ATerm/ReadWrite.hs | bsd-3-clause | -- shared --
writeTAF :: ATerm -> WriteTable -> (String,WriteTable)
writeTAF t tbl = case getIndexWT t tbl of
(Just i) -> (makeAbbrev i,tbl)
Nothing -> (str, condAddElementWT t str tbl')
where ... | 348 | writeTAF :: ATerm -> WriteTable -> (String,WriteTable)
writeTAF t tbl = case getIndexWT t tbl of
(Just i) -> (makeAbbrev i,tbl)
Nothing -> (str, condAddElementWT t str tbl')
where (str,tbl') = w... | 334 | writeTAF t tbl = case getIndexWT t tbl of
(Just i) -> (makeAbbrev i,tbl)
Nothing -> (str, condAddElementWT t str tbl')
where (str,tbl') = writeTAF' t tbl | 264 | true | true | 0 | 10 | 163 | 104 | 53 | 51 | null | null |
kim/amazonka | amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types.hs | mpl-2.0 | -- | Whether the field can be used to sort the search results.
loSortEnabled :: Lens' LiteralOptions (Maybe Bool)
loSortEnabled = lens _loSortEnabled (\s a -> s { _loSortEnabled = a }) | 184 | loSortEnabled :: Lens' LiteralOptions (Maybe Bool)
loSortEnabled = lens _loSortEnabled (\s a -> s { _loSortEnabled = a }) | 121 | loSortEnabled = lens _loSortEnabled (\s a -> s { _loSortEnabled = a }) | 70 | true | true | 0 | 9 | 31 | 46 | 25 | 21 | null | null |
Acce0ss/myperf | genperf.hs | mit | distFromSide :: Float
distFromSide = spacing / 5 | 48 | distFromSide :: Float
distFromSide = spacing / 5 | 48 | distFromSide = spacing / 5 | 26 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
phischu/fragnix | tests/packages/scotty/Data.IntMap.Internal.hs | bsd-3-clause | mapLT :: (IntMap a -> IntMap a) -> SplitLookup a -> SplitLookup a
mapLT f (SplitLookup lt fnd gt) = SplitLookup (f lt) fnd gt | 125 | mapLT :: (IntMap a -> IntMap a) -> SplitLookup a -> SplitLookup a
mapLT f (SplitLookup lt fnd gt) = SplitLookup (f lt) fnd gt | 125 | mapLT f (SplitLookup lt fnd gt) = SplitLookup (f lt) fnd gt | 59 | false | true | 0 | 8 | 24 | 71 | 32 | 39 | null | null |
zoep/jebus | src/Ast.hs | mit | walk (SApp term1 term2) env p =
do
let (a, p') = T.fresh p
node1 <- walk term1 env p'
node2 <- walk term2 (T.substEnv (subst node1) env) (pool node1)
sub <- T.unify (T.substType (subst node2) (typ node1)) (Arrow (typ node2) (Tvar a))
let comp = Composition sub (Composition (subst node2) (subst n... | 516 | walk (SApp term1 term2) env p =
do
let (a, p') = T.fresh p
node1 <- walk term1 env p'
node2 <- walk term2 (T.substEnv (subst node1) env) (pool node1)
sub <- T.unify (T.substType (subst node2) (typ node1)) (Arrow (typ node2) (Tvar a))
let comp = Composition sub (Composition (subst node2) (subst n... | 516 | walk (SApp term1 term2) env p =
do
let (a, p') = T.fresh p
node1 <- walk term1 env p'
node2 <- walk term2 (T.substEnv (subst node1) env) (pool node1)
sub <- T.unify (T.substType (subst node2) (typ node1)) (Arrow (typ node2) (Tvar a))
let comp = Composition sub (Composition (subst node2) (subst n... | 516 | false | false | 0 | 14 | 138 | 262 | 128 | 134 | null | null |
daniel-ziegler/provability | src/Modal/Formulas.hs | bsd-3-clause | simplifyBox :: ModalFormula v -> ModalFormula v
simplifyBox t@(Val True) = t | 76 | simplifyBox :: ModalFormula v -> ModalFormula v
simplifyBox t@(Val True) = t | 76 | simplifyBox t@(Val True) = t | 28 | false | true | 0 | 8 | 11 | 33 | 16 | 17 | null | null |
tolysz/postgresql-simple | src/Database/PostgreSQL/Simple/Internal.hs | bsd-3-clause | buildAction conn q xs (EscapeIdentifier s) =
either (fmtErrorBs q xs) byteString <$> escapeIdentifier conn s | 112 | buildAction conn q xs (EscapeIdentifier s) =
either (fmtErrorBs q xs) byteString <$> escapeIdentifier conn s | 112 | buildAction conn q xs (EscapeIdentifier s) =
either (fmtErrorBs q xs) byteString <$> escapeIdentifier conn s | 112 | false | false | 0 | 8 | 19 | 43 | 20 | 23 | null | null |
romanb/amazonka | amazonka-autoscaling/gen/Network/AWS/AutoScaling/ExecutePolicy.hs | mpl-2.0 | -- | 'ExecutePolicy' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'epAutoScalingGroupName' @::@ 'Maybe' 'Text'
--
-- * 'epHonorCooldown' @::@ 'Maybe' 'Bool'
--
-- * 'epPolicyName' @::@ 'Text'
--
executePolicy :: Text -- ^ 'epPolicyName'
-> ExecutePolicy
executePolicy ... | 459 | executePolicy :: Text -- ^ 'epPolicyName'
-> ExecutePolicy
executePolicy p1 = ExecutePolicy
{ _epPolicyName = p1
, _epAutoScalingGroupName = Nothing
, _epHonorCooldown = Nothing
} | 226 | executePolicy p1 = ExecutePolicy
{ _epPolicyName = p1
, _epAutoScalingGroupName = Nothing
, _epHonorCooldown = Nothing
} | 153 | true | true | 0 | 7 | 105 | 53 | 34 | 19 | null | null |
ryanoneill/yorgey-haskell | Week04/Homework.hs | mit | fun2 n | even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1) | 79 | fun2 n | even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1) | 79 | fun2 n | even n = n + fun2 (n `div` 2)
| otherwise = fun2 (3 * n + 1) | 79 | false | false | 0 | 9 | 30 | 57 | 27 | 30 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.