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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
keitax/wikirick
|
spec/RepositorySpec.hs
|
bsd-3-clause
|
setupDir :: Expectation -> Expectation
setupDir e = do
D.createDirectory repositoryDir
D.createDirectory $ repositoryDir </> "RCS"
e `finally` D.removeDirectoryRecursive repositoryDir
| 189
|
setupDir :: Expectation -> Expectation
setupDir e = do
D.createDirectory repositoryDir
D.createDirectory $ repositoryDir </> "RCS"
e `finally` D.removeDirectoryRecursive repositoryDir
| 189
|
setupDir e = do
D.createDirectory repositoryDir
D.createDirectory $ repositoryDir </> "RCS"
e `finally` D.removeDirectoryRecursive repositoryDir
| 150
| false
| true
| 0
| 10
| 25
| 59
| 26
| 33
| null | null |
plaprade/haskoin
|
haskoin-core/src/Network/Haskoin/Script/Evaluator.hs
|
unlicense
|
eval OP_NUMEQUAL = (==) <$> popInt <*> popInt >>= pushBool
| 61
|
eval OP_NUMEQUAL = (==) <$> popInt <*> popInt >>= pushBool
| 61
|
eval OP_NUMEQUAL = (==) <$> popInt <*> popInt >>= pushBool
| 61
| false
| false
| 1
| 7
| 12
| 27
| 12
| 15
| null | null |
olsner/ghc
|
testsuite/tests/programs/life_space_leak/Main.hs
|
bsd-3-clause
|
take3 n (C1 x xs) = C1 x (take3 (n-1) xs)
| 41
|
take3 n (C1 x xs) = C1 x (take3 (n-1) xs)
| 41
|
take3 n (C1 x xs) = C1 x (take3 (n-1) xs)
| 41
| false
| false
| 0
| 9
| 10
| 41
| 19
| 22
| null | null |
rvion/lamdu
|
Lamdu/Sugar/Convert/Monad.hs
|
gpl-3.0
|
typeProtectedSetToVal ::
MonadA m =>
ConvertM m
(ExprIRef.ValIProperty m -> ExprIRef.ValI m -> T m (ExprIRef.ValI m))
typeProtectedSetToVal =
do
typeProtect <- typeProtectTransaction
let setToVal dest valI =
do
mResult <- typeProtect $ DataOps.replace dest valI
case mResult of
Just result -> return result
Nothing -> DataOps.setToWrapper valI dest
return setToVal
| 508
|
typeProtectedSetToVal ::
MonadA m =>
ConvertM m
(ExprIRef.ValIProperty m -> ExprIRef.ValI m -> T m (ExprIRef.ValI m))
typeProtectedSetToVal =
do
typeProtect <- typeProtectTransaction
let setToVal dest valI =
do
mResult <- typeProtect $ DataOps.replace dest valI
case mResult of
Just result -> return result
Nothing -> DataOps.setToWrapper valI dest
return setToVal
| 508
|
typeProtectedSetToVal =
do
typeProtect <- typeProtectTransaction
let setToVal dest valI =
do
mResult <- typeProtect $ DataOps.replace dest valI
case mResult of
Just result -> return result
Nothing -> DataOps.setToWrapper valI dest
return setToVal
| 378
| false
| true
| 0
| 16
| 194
| 136
| 60
| 76
| null | null |
JacquesCarette/literate-scientific-software
|
code/drasil-code/Language/Drasil/Chunk/Code.hs
|
bsd-2-clause
|
constraintLookup' :: (HasUID q) => q -> ConstraintMap
-> ([Constraint] -> [Constraint]) -> (q , [Constraint])
constraintLookup' q m filt = (q, maybe [] filt (Map.lookup (q^.uid) m))
| 203
|
constraintLookup' :: (HasUID q) => q -> ConstraintMap
-> ([Constraint] -> [Constraint]) -> (q , [Constraint])
constraintLookup' q m filt = (q, maybe [] filt (Map.lookup (q^.uid) m))
| 203
|
constraintLookup' q m filt = (q, maybe [] filt (Map.lookup (q^.uid) m))
| 71
| false
| true
| 0
| 11
| 49
| 93
| 51
| 42
| null | null |
gridaphobe/ghc
|
compiler/basicTypes/VarEnv.hs
|
bsd-3-clause
|
extendVarEnv = addToUFM
| 27
|
extendVarEnv = addToUFM
| 27
|
extendVarEnv = addToUFM
| 27
| false
| false
| 0
| 4
| 6
| 6
| 3
| 3
| null | null |
slpopejoy/fadno-xml
|
src/Fadno/MusicXml/MusicXml20.hs
|
bsd-2-clause
|
parseMiscellaneousField :: P.XParse MiscellaneousField
parseMiscellaneousField =
MiscellaneousField
<$> (P.xtext >>= return)
<*> (P.xattr (P.name "name") >>= parseToken)
| 192
|
parseMiscellaneousField :: P.XParse MiscellaneousField
parseMiscellaneousField =
MiscellaneousField
<$> (P.xtext >>= return)
<*> (P.xattr (P.name "name") >>= parseToken)
| 192
|
parseMiscellaneousField =
MiscellaneousField
<$> (P.xtext >>= return)
<*> (P.xattr (P.name "name") >>= parseToken)
| 137
| false
| true
| 6
| 11
| 39
| 61
| 29
| 32
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_SMOOTH :: GLenum
gl_SMOOTH = 0x1D01
| 38
|
gl_SMOOTH :: GLenum
gl_SMOOTH = 0x1D01
| 38
|
gl_SMOOTH = 0x1D01
| 18
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
peter-fogg/pardoc
|
src/Text/Pandoc/Readers/Org.hs
|
gpl-2.0
|
parseFromString :: OrgParser a -> String -> OrgParser a
parseFromString parser str' = do
oldLastPreCharPos <- orgStateLastPreCharPos <$> getState
updateState $ \s -> s{ orgStateLastPreCharPos = Nothing }
result <- P.parseFromString parser str'
updateState $ \s -> s{ orgStateLastPreCharPos = oldLastPreCharPos }
return result
--
-- Adaptions and specializations of parsing utilities
--
| 397
|
parseFromString :: OrgParser a -> String -> OrgParser a
parseFromString parser str' = do
oldLastPreCharPos <- orgStateLastPreCharPos <$> getState
updateState $ \s -> s{ orgStateLastPreCharPos = Nothing }
result <- P.parseFromString parser str'
updateState $ \s -> s{ orgStateLastPreCharPos = oldLastPreCharPos }
return result
--
-- Adaptions and specializations of parsing utilities
--
| 397
|
parseFromString parser str' = do
oldLastPreCharPos <- orgStateLastPreCharPos <$> getState
updateState $ \s -> s{ orgStateLastPreCharPos = Nothing }
result <- P.parseFromString parser str'
updateState $ \s -> s{ orgStateLastPreCharPos = oldLastPreCharPos }
return result
--
-- Adaptions and specializations of parsing utilities
--
| 341
| false
| true
| 0
| 10
| 64
| 104
| 52
| 52
| null | null |
petester42/haskell-hockey
|
src/Hockey/Processing.hs
|
mit
|
processGames :: Database -> Day -> Day -> IO ()
processGames db from to = do
values <- getGames db from to
db `process` (upsertMany (fst values))
db `process` (upsertMany (snd values))
| 196
|
processGames :: Database -> Day -> Day -> IO ()
processGames db from to = do
values <- getGames db from to
db `process` (upsertMany (fst values))
db `process` (upsertMany (snd values))
| 196
|
processGames db from to = do
values <- getGames db from to
db `process` (upsertMany (fst values))
db `process` (upsertMany (snd values))
| 148
| false
| true
| 0
| 11
| 43
| 91
| 45
| 46
| null | null |
exercism/xhaskell
|
exercises/practice/twelve-days/.meta/examples/success-standard/src/TwelveDays.hs
|
mit
|
verse 7 = ("seventh", "seven Swans-a-Swimming")
| 48
|
verse 7 = ("seventh", "seven Swans-a-Swimming")
| 48
|
verse 7 = ("seventh", "seven Swans-a-Swimming")
| 48
| false
| false
| 1
| 5
| 6
| 18
| 8
| 10
| null | null |
dancor/melang
|
src/Main/tat-count-pairs.hs
|
mit
|
--test = take 10000000
test = id
| 32
|
test = id
| 9
|
test = id
| 9
| true
| false
| 1
| 5
| 6
| 11
| 4
| 7
| null | null |
binarin/learnopengl
|
src/GLHost.hs
|
bsd-3-clause
|
foreverSt :: Monad m => a -> (a -> m (Maybe a)) -> m ()
foreverSt a f = do
ma <- f a
case ma of
Just a' -> foreverSt a' f
Nothing -> return ()
| 154
|
foreverSt :: Monad m => a -> (a -> m (Maybe a)) -> m ()
foreverSt a f = do
ma <- f a
case ma of
Just a' -> foreverSt a' f
Nothing -> return ()
| 154
|
foreverSt a f = do
ma <- f a
case ma of
Just a' -> foreverSt a' f
Nothing -> return ()
| 98
| false
| true
| 0
| 12
| 48
| 94
| 43
| 51
| null | null |
arnizamani/GslcTagger
|
gslctagger.hs
|
gpl-3.0
|
readNittio = (string "nittio" <++ string "nitti" <++ string "nitto" <++ string "ninety" <++ string "ninty") >> return (N 90)
| 125
|
readNittio = (string "nittio" <++ string "nitti" <++ string "nitto" <++ string "ninety" <++ string "ninty") >> return (N 90)
| 125
|
readNittio = (string "nittio" <++ string "nitti" <++ string "nitto" <++ string "ninety" <++ string "ninty") >> return (N 90)
| 125
| false
| false
| 0
| 11
| 20
| 53
| 24
| 29
| null | null |
yi-editor/yi
|
yi-keymap-emacs/src/Yi/Keymap/Emacs/Utils.hs
|
gpl-2.0
|
evalRegionE :: YiM ()
evalRegionE = do
-- FIXME: do something sensible.
void $ withCurrentBuffer (getSelectRegionB >>= readRegionB)
return ()
-- * Code for various commands
-- This ideally should be put in their own module,
-- without a prefix, so M-x ... would be easily implemented
-- by looking up that module's contents
-- | Insert next character, "raw"
| 365
|
evalRegionE :: YiM ()
evalRegionE = do
-- FIXME: do something sensible.
void $ withCurrentBuffer (getSelectRegionB >>= readRegionB)
return ()
-- * Code for various commands
-- This ideally should be put in their own module,
-- without a prefix, so M-x ... would be easily implemented
-- by looking up that module's contents
-- | Insert next character, "raw"
| 365
|
evalRegionE = do
-- FIXME: do something sensible.
void $ withCurrentBuffer (getSelectRegionB >>= readRegionB)
return ()
-- * Code for various commands
-- This ideally should be put in their own module,
-- without a prefix, so M-x ... would be easily implemented
-- by looking up that module's contents
-- | Insert next character, "raw"
| 343
| false
| true
| 0
| 10
| 67
| 47
| 25
| 22
| null | null |
randen/cabal
|
Cabal/Distribution/Version.hs
|
bsd-3-clause
|
-- | Directly construct a 'VersionIntervals' from a list of intervals.
--
-- Each interval must be non-empty. The sequence must be in increasing order
-- and no intervals may overlap or touch. If any of these conditions are not
-- satisfied the function returns @Nothing@.
--
mkVersionIntervals :: [VersionInterval] -> Maybe VersionIntervals
mkVersionIntervals intervals
| invariant (VersionIntervals intervals) = Just (VersionIntervals intervals)
| otherwise = Nothing
| 502
|
mkVersionIntervals :: [VersionInterval] -> Maybe VersionIntervals
mkVersionIntervals intervals
| invariant (VersionIntervals intervals) = Just (VersionIntervals intervals)
| otherwise = Nothing
| 226
|
mkVersionIntervals intervals
| invariant (VersionIntervals intervals) = Just (VersionIntervals intervals)
| otherwise = Nothing
| 160
| true
| true
| 1
| 10
| 99
| 66
| 33
| 33
| null | null |
input-output-hk/pos-haskell-prototype
|
core/test/Test/Pos/Core/ExampleHelpers.hs
|
mit
|
exampleAddress'4 :: Address'
exampleAddress'4 = makeAddress' easd attrs
where
easd = UnknownASD 7 "test value"
attrs = AddrAttributes Nothing (SingleKeyDistr sId) NetworkMainOrStage
[sId] = exampleStakeholderIds 7 1
| 229
|
exampleAddress'4 :: Address'
exampleAddress'4 = makeAddress' easd attrs
where
easd = UnknownASD 7 "test value"
attrs = AddrAttributes Nothing (SingleKeyDistr sId) NetworkMainOrStage
[sId] = exampleStakeholderIds 7 1
| 229
|
exampleAddress'4 = makeAddress' easd attrs
where
easd = UnknownASD 7 "test value"
attrs = AddrAttributes Nothing (SingleKeyDistr sId) NetworkMainOrStage
[sId] = exampleStakeholderIds 7 1
| 200
| false
| true
| 1
| 7
| 40
| 64
| 30
| 34
| null | null |
8l/barrelfish
|
hake/ArchDefaults.hs
|
mit
|
ldFlags arch =
map Str Config.cOptFlags ++
[ In InstallTree arch "/lib/crt0.o",
In InstallTree arch "/lib/crtbegin.o",
Str "-fno-builtin",
Str "-nostdlib" ]
| 183
|
ldFlags arch =
map Str Config.cOptFlags ++
[ In InstallTree arch "/lib/crt0.o",
In InstallTree arch "/lib/crtbegin.o",
Str "-fno-builtin",
Str "-nostdlib" ]
| 183
|
ldFlags arch =
map Str Config.cOptFlags ++
[ In InstallTree arch "/lib/crt0.o",
In InstallTree arch "/lib/crtbegin.o",
Str "-fno-builtin",
Str "-nostdlib" ]
| 183
| false
| false
| 1
| 8
| 47
| 57
| 25
| 32
| null | null |
alevy/postgresql-orm
|
src/Database/PostgreSQL/ORM/CreateTable.hs
|
gpl-3.0
|
modelCreateStatement :: forall a. (Model a, Generic a, GDefTypes (Rep a))
=> a -> Query
modelCreateStatement a = customModelCreateStatement except constraints a
where ModelCreateInfo except constraint = modelCreateInfo :: ModelCreateInfo a
constraints = if S.null constraint then [] else [constraint]
-- | Create a the database table for a model.
| 378
|
modelCreateStatement :: forall a. (Model a, Generic a, GDefTypes (Rep a))
=> a -> Query
modelCreateStatement a = customModelCreateStatement except constraints a
where ModelCreateInfo except constraint = modelCreateInfo :: ModelCreateInfo a
constraints = if S.null constraint then [] else [constraint]
-- | Create a the database table for a model.
| 378
|
modelCreateStatement a = customModelCreateStatement except constraints a
where ModelCreateInfo except constraint = modelCreateInfo :: ModelCreateInfo a
constraints = if S.null constraint then [] else [constraint]
-- | Create a the database table for a model.
| 269
| false
| true
| 1
| 10
| 81
| 110
| 53
| 57
| null | null |
vikraman/ghc
|
compiler/types/Coercion.hs
|
bsd-3-clause
|
ppr_forall_co _ _ = panic "ppr_forall_co"
| 41
|
ppr_forall_co _ _ = panic "ppr_forall_co"
| 41
|
ppr_forall_co _ _ = panic "ppr_forall_co"
| 41
| false
| false
| 0
| 5
| 5
| 14
| 6
| 8
| null | null |
gcampax/ghc
|
compiler/main/HscTypes.hs
|
bsd-3-clause
|
hscSourceString' _ _ HsBootFile = "[boot]"
| 43
|
hscSourceString' _ _ HsBootFile = "[boot]"
| 43
|
hscSourceString' _ _ HsBootFile = "[boot]"
| 43
| false
| false
| 0
| 5
| 6
| 13
| 6
| 7
| null | null |
FranklinChen/IHaskell
|
src/IHaskell/IPython.hs
|
mit
|
makeAbsolute :: FilePath -> IO FilePath
makeAbsolute = fmap FP.normalise . absolutize
where
absolutize path -- avoid the call to `getCurrentDirectory` if we can
| FP.isRelative path = fmap (FP.</> path) getCurrentDirectory
| otherwise = return path
#endif
| 273
|
makeAbsolute :: FilePath -> IO FilePath
makeAbsolute = fmap FP.normalise . absolutize
where
absolutize path -- avoid the call to `getCurrentDirectory` if we can
| FP.isRelative path = fmap (FP.</> path) getCurrentDirectory
| otherwise = return path
#endif
| 273
|
makeAbsolute = fmap FP.normalise . absolutize
where
absolutize path -- avoid the call to `getCurrentDirectory` if we can
| FP.isRelative path = fmap (FP.</> path) getCurrentDirectory
| otherwise = return path
#endif
| 233
| false
| true
| 1
| 9
| 55
| 72
| 35
| 37
| null | null |
rueshyna/gogol
|
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/List.hs
|
mpl-2.0
|
-- | Optional. The number of models to retrieve per \"page\" of results. If
-- there are more remaining results than this number, the response message
-- will contain a valid value in the \`next_page_token\` field. The default
-- value is 20, and the maximum page size is 100.
pmlPageSize :: Lens' ProjectsModelsList (Maybe Int32)
pmlPageSize
= lens _pmlPageSize (\ s a -> s{_pmlPageSize = a}) .
mapping _Coerce
| 419
|
pmlPageSize :: Lens' ProjectsModelsList (Maybe Int32)
pmlPageSize
= lens _pmlPageSize (\ s a -> s{_pmlPageSize = a}) .
mapping _Coerce
| 142
|
pmlPageSize
= lens _pmlPageSize (\ s a -> s{_pmlPageSize = a}) .
mapping _Coerce
| 88
| true
| true
| 0
| 10
| 76
| 58
| 31
| 27
| null | null |
trskop/type-proxies
|
src/Data/Proxy/Exception.hs
|
bsd-3-clause
|
-- | Type proxy for 'RecConError'.
recConError :: Proxy RecConError
recConError = Proxy
| 87
|
recConError :: Proxy RecConError
recConError = Proxy
| 52
|
recConError = Proxy
| 19
| true
| true
| 1
| 5
| 12
| 19
| 8
| 11
| null | null |
Blaisorblade/stack
|
etc/scripts/release.hs
|
bsd-3-clause
|
-- | @--arch@ command-line option name.
archOptName :: String
archOptName = "arch"
| 82
|
archOptName :: String
archOptName = "arch"
| 42
|
archOptName = "arch"
| 20
| true
| true
| 0
| 6
| 11
| 19
| 8
| 11
| null | null |
Paow/encore
|
src/ir/AST/Util.hs
|
bsd-3-clause
|
putChildren _ e@(CharLiteral {}) = error "'putChildren l CharLiteral' expects l to have 0 elements"
| 99
|
putChildren _ e@(CharLiteral {}) = error "'putChildren l CharLiteral' expects l to have 0 elements"
| 99
|
putChildren _ e@(CharLiteral {}) = error "'putChildren l CharLiteral' expects l to have 0 elements"
| 99
| false
| false
| 0
| 8
| 14
| 27
| 13
| 14
| null | null |
thomie/vector
|
Data/Vector.hs
|
bsd-3-clause
|
tail = G.tail
| 13
|
tail = G.tail
| 13
|
tail = G.tail
| 13
| false
| false
| 1
| 6
| 2
| 12
| 4
| 8
| null | null |
ra1u/lambdaya-bus
|
examples/MatrixMultiply/MatrixMul3x3.hs
|
lgpl-3.0
|
-- | sequential circuit (same circuit as matrixMul3x3, different type signature)
matrixMul3x3sig :: Signal (M3x3,M3x3) -> Signal M3x3
matrixMul3x3sig = fmap matrixMul3x3
| 169
|
matrixMul3x3sig :: Signal (M3x3,M3x3) -> Signal M3x3
matrixMul3x3sig = fmap matrixMul3x3
| 88
|
matrixMul3x3sig = fmap matrixMul3x3
| 35
| true
| true
| 0
| 8
| 21
| 37
| 17
| 20
| null | null |
andorp/bead
|
src/Bead/Controller/UserStories.hs
|
bsd-3-clause
|
createGroup :: CourseKey -> Group -> UserStory GroupKey
createGroup ck g = logAction INFO ("creats group " ++ show (groupName g)) $ do
authorize P_Create P_Group
join $ withUserAndPersist $ \u -> do
let user = u_username u
admined <- Persist.isAdministratedCourse user ck
if admined
then do key <- Persist.saveGroup ck g
now <- liftIO getCurrentTime
c <- Persist.loadCourse ck
let msg = Notification.NE_GroupCreated (courseName c) (u_name u) (groupName g)
cas <- Persist.courseAdmins ck
let affected = cas \\ [user]
Persist.notifyUsers (Notification.Notification msg now Notification.System) affected
return $ do
putStatusMessage $ msg_UserStory_CreateGroup "The group has been created."
return key
else return . errorPage $ userError nonAdministratedCourse
| 917
|
createGroup :: CourseKey -> Group -> UserStory GroupKey
createGroup ck g = logAction INFO ("creats group " ++ show (groupName g)) $ do
authorize P_Create P_Group
join $ withUserAndPersist $ \u -> do
let user = u_username u
admined <- Persist.isAdministratedCourse user ck
if admined
then do key <- Persist.saveGroup ck g
now <- liftIO getCurrentTime
c <- Persist.loadCourse ck
let msg = Notification.NE_GroupCreated (courseName c) (u_name u) (groupName g)
cas <- Persist.courseAdmins ck
let affected = cas \\ [user]
Persist.notifyUsers (Notification.Notification msg now Notification.System) affected
return $ do
putStatusMessage $ msg_UserStory_CreateGroup "The group has been created."
return key
else return . errorPage $ userError nonAdministratedCourse
| 917
|
createGroup ck g = logAction INFO ("creats group " ++ show (groupName g)) $ do
authorize P_Create P_Group
join $ withUserAndPersist $ \u -> do
let user = u_username u
admined <- Persist.isAdministratedCourse user ck
if admined
then do key <- Persist.saveGroup ck g
now <- liftIO getCurrentTime
c <- Persist.loadCourse ck
let msg = Notification.NE_GroupCreated (courseName c) (u_name u) (groupName g)
cas <- Persist.courseAdmins ck
let affected = cas \\ [user]
Persist.notifyUsers (Notification.Notification msg now Notification.System) affected
return $ do
putStatusMessage $ msg_UserStory_CreateGroup "The group has been created."
return key
else return . errorPage $ userError nonAdministratedCourse
| 861
| false
| true
| 0
| 20
| 265
| 271
| 123
| 148
| null | null |
kim/amazonka
|
amazonka-autoscaling/gen/Network/AWS/AutoScaling/PutScheduledUpdateGroupAction.hs
|
mpl-2.0
|
-- | 'PutScheduledUpdateGroupAction' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'psugaAutoScalingGroupName' @::@ 'Text'
--
-- * 'psugaDesiredCapacity' @::@ 'Maybe' 'Int'
--
-- * 'psugaEndTime' @::@ 'Maybe' 'UTCTime'
--
-- * 'psugaMaxSize' @::@ 'Maybe' 'Int'
--
-- * 'psugaMinSize' @::@ 'Maybe' 'Int'
--
-- * 'psugaRecurrence' @::@ 'Maybe' 'Text'
--
-- * 'psugaScheduledActionName' @::@ 'Text'
--
-- * 'psugaStartTime' @::@ 'Maybe' 'UTCTime'
--
-- * 'psugaTime' @::@ 'Maybe' 'UTCTime'
--
putScheduledUpdateGroupAction :: Text -- ^ 'psugaAutoScalingGroupName'
-> Text -- ^ 'psugaScheduledActionName'
-> PutScheduledUpdateGroupAction
putScheduledUpdateGroupAction p1 p2 = PutScheduledUpdateGroupAction
{ _psugaAutoScalingGroupName = p1
, _psugaScheduledActionName = p2
, _psugaTime = Nothing
, _psugaStartTime = Nothing
, _psugaEndTime = Nothing
, _psugaRecurrence = Nothing
, _psugaMinSize = Nothing
, _psugaMaxSize = Nothing
, _psugaDesiredCapacity = Nothing
}
| 1,181
|
putScheduledUpdateGroupAction :: Text -- ^ 'psugaAutoScalingGroupName'
-> Text -- ^ 'psugaScheduledActionName'
-> PutScheduledUpdateGroupAction
putScheduledUpdateGroupAction p1 p2 = PutScheduledUpdateGroupAction
{ _psugaAutoScalingGroupName = p1
, _psugaScheduledActionName = p2
, _psugaTime = Nothing
, _psugaStartTime = Nothing
, _psugaEndTime = Nothing
, _psugaRecurrence = Nothing
, _psugaMinSize = Nothing
, _psugaMaxSize = Nothing
, _psugaDesiredCapacity = Nothing
}
| 654
|
putScheduledUpdateGroupAction p1 p2 = PutScheduledUpdateGroupAction
{ _psugaAutoScalingGroupName = p1
, _psugaScheduledActionName = p2
, _psugaTime = Nothing
, _psugaStartTime = Nothing
, _psugaEndTime = Nothing
, _psugaRecurrence = Nothing
, _psugaMinSize = Nothing
, _psugaMaxSize = Nothing
, _psugaDesiredCapacity = Nothing
}
| 450
| true
| true
| 0
| 6
| 311
| 104
| 73
| 31
| null | null |
bamboo/idris-cil
|
src/IRTS/Cil/MaxStack.hs
|
bsd-3-clause
|
netStackChange _ (Ldobj _ ) = 0
| 35
|
netStackChange _ (Ldobj _ ) = 0
| 35
|
netStackChange _ (Ldobj _ ) = 0
| 35
| false
| false
| 0
| 7
| 10
| 17
| 8
| 9
| null | null |
fmapfmapfmap/amazonka
|
amazonka-autoscaling/gen/Network/AWS/AutoScaling/DeleteLaunchConfiguration.hs
|
mpl-2.0
|
-- | Creates a value of 'DeleteLaunchConfigurationResponse' with the minimum fields required to make a request.
--
deleteLaunchConfigurationResponse
:: DeleteLaunchConfigurationResponse
deleteLaunchConfigurationResponse = DeleteLaunchConfigurationResponse'
| 260
|
deleteLaunchConfigurationResponse
:: DeleteLaunchConfigurationResponse
deleteLaunchConfigurationResponse = DeleteLaunchConfigurationResponse'
| 145
|
deleteLaunchConfigurationResponse = DeleteLaunchConfigurationResponse'
| 70
| true
| true
| 1
| 5
| 26
| 17
| 8
| 9
| null | null |
bitemyapp/mueval
|
Mueval/Resources.hs
|
bsd-3-clause
|
totalMemoryLimitHard = dataSizeLimitHard
| 40
|
totalMemoryLimitHard = dataSizeLimitHard
| 40
|
totalMemoryLimitHard = dataSizeLimitHard
| 40
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
nightscape/platform
|
node/tests/Unison/Test/ResourcePool.hs
|
mit
|
parallelSequence_ :: [IO a] -> IO ()
parallelSequence_ ios = void $ parallelSequence ios
| 88
|
parallelSequence_ :: [IO a] -> IO ()
parallelSequence_ ios = void $ parallelSequence ios
| 88
|
parallelSequence_ ios = void $ parallelSequence ios
| 51
| false
| true
| 0
| 7
| 13
| 36
| 17
| 19
| null | null |
cfredric/NumberTheory
|
NumberTheory_Tests.hs
|
gpl-3.0
|
sampleComposites :: [Integer]
sampleComposites = filter (not . flip elem samplePrimes) sampleMixed
| 98
|
sampleComposites :: [Integer]
sampleComposites = filter (not . flip elem samplePrimes) sampleMixed
| 98
|
sampleComposites = filter (not . flip elem samplePrimes) sampleMixed
| 68
| false
| true
| 0
| 8
| 11
| 31
| 16
| 15
| null | null |
a143753/AOJ
|
0036.hs
|
apache-2.0
|
ans [] = []
| 11
|
ans [] = []
| 11
|
ans [] = []
| 11
| false
| false
| 0
| 6
| 3
| 13
| 6
| 7
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_DRAW_BUFFER10_NV :: GLenum
gl_DRAW_BUFFER10_NV = 0x882F
| 58
|
gl_DRAW_BUFFER10_NV :: GLenum
gl_DRAW_BUFFER10_NV = 0x882F
| 58
|
gl_DRAW_BUFFER10_NV = 0x882F
| 28
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
nevrenato/Hets_Fork
|
CommonLogic/Tools.hs
|
gpl-2.0
|
-- | Retrieves all predicates from a text
prd_text :: TEXT -> Set.Set NAME
prd_text t =
case t of
Text ps _ -> prd_phrases ps
Named_text _ nt _ -> prd_text nt
| 180
|
prd_text :: TEXT -> Set.Set NAME
prd_text t =
case t of
Text ps _ -> prd_phrases ps
Named_text _ nt _ -> prd_text nt
| 138
|
prd_text t =
case t of
Text ps _ -> prd_phrases ps
Named_text _ nt _ -> prd_text nt
| 105
| true
| true
| 0
| 8
| 54
| 58
| 27
| 31
| null | null |
j1r1k/portager
|
src/Portager/DSL.hs
|
bsd-3-clause
|
-- |Appends unstable keyword for globally configured architecture to a 'PackageConfiguration'.
unstable :: PortageT PackageConfiguration ()
unstable = do
a <- lift $ asks _arch
keywords [ Keyword ("~" <> arch a) ]
| 217
|
unstable :: PortageT PackageConfiguration ()
unstable = do
a <- lift $ asks _arch
keywords [ Keyword ("~" <> arch a) ]
| 122
|
unstable = do
a <- lift $ asks _arch
keywords [ Keyword ("~" <> arch a) ]
| 77
| true
| true
| 1
| 13
| 36
| 60
| 26
| 34
| null | null |
dolio/irc-core
|
src/Client/Mask.hs
|
isc
|
translate (x : xs)
| isMetaChar x = '\\' : x : translate xs
| otherwise = x : translate xs
| 114
|
translate (x : xs)
| isMetaChar x = '\\' : x : translate xs
| otherwise = x : translate xs
| 114
|
translate (x : xs)
| isMetaChar x = '\\' : x : translate xs
| otherwise = x : translate xs
| 114
| false
| false
| 0
| 8
| 44
| 52
| 23
| 29
| null | null |
joashc/cryptodiner
|
network/DcPeerSpec.hs
|
gpl-3.0
|
awaitPeers :: DcPeer [Participant]
awaitPeers = do
state <- awaitStateCondition $ (> 1) . numPeers
return $ state ^. peers
| 126
|
awaitPeers :: DcPeer [Participant]
awaitPeers = do
state <- awaitStateCondition $ (> 1) . numPeers
return $ state ^. peers
| 126
|
awaitPeers = do
state <- awaitStateCondition $ (> 1) . numPeers
return $ state ^. peers
| 91
| false
| true
| 0
| 10
| 23
| 47
| 24
| 23
| null | null |
ComputationWithBoundedResources/ara-inference
|
src/Data/Rewriting/ARA/ByInferenceRules/CmdLineArguments/Parse.hs
|
mit
|
-- |This function parses the Arguments. It gets them and then parses it, and
-- returns a ArgumentOptions object or throws an ioError Exception.
--
-- There is the possiblitiy of optionally giving the filePath. If it is not
-- given, then the default filepath will be taken and a warning will be
-- displayed.
parseArgOpts :: (Monad m) => IO (m ArgumentOptions)
parseArgOpts = do
argv <- getArgs -- get arguments
progName <- getProgName -- get Program name
let -- create help text
header = "Usage: " ++ progName ++ " [OPTION...] filePath"
helpMessage = usageInfo header options
(o, files, err) = getOpt Permute options argv
-- case errors occured, throw exception, else call functions for each option
-- selected
if not (null err)
then throw $ FatalException $ concat err ++ "\n" ++ helpMessage
else do
opt <- foldlM (flip id) defaultOptions o
if helpText opt
then throw $ ShowTextOnly helpMessage
else case files of
[] -> throw $
ShowTextOnly $ "Error: No input file was given!\n\n" ++ helpMessage
[f] -> return $ return $ opt { filePath = f }
(_ : _) -> throw $
FatalException $ "Could not parse command line arguments. " ++
"There were to many input files given. \n\n" ++ helpMessage
--
-- Parse.hs ends here
| 1,517
|
parseArgOpts :: (Monad m) => IO (m ArgumentOptions)
parseArgOpts = do
argv <- getArgs -- get arguments
progName <- getProgName -- get Program name
let -- create help text
header = "Usage: " ++ progName ++ " [OPTION...] filePath"
helpMessage = usageInfo header options
(o, files, err) = getOpt Permute options argv
-- case errors occured, throw exception, else call functions for each option
-- selected
if not (null err)
then throw $ FatalException $ concat err ++ "\n" ++ helpMessage
else do
opt <- foldlM (flip id) defaultOptions o
if helpText opt
then throw $ ShowTextOnly helpMessage
else case files of
[] -> throw $
ShowTextOnly $ "Error: No input file was given!\n\n" ++ helpMessage
[f] -> return $ return $ opt { filePath = f }
(_ : _) -> throw $
FatalException $ "Could not parse command line arguments. " ++
"There were to many input files given. \n\n" ++ helpMessage
--
-- Parse.hs ends here
| 1,207
|
parseArgOpts = do
argv <- getArgs -- get arguments
progName <- getProgName -- get Program name
let -- create help text
header = "Usage: " ++ progName ++ " [OPTION...] filePath"
helpMessage = usageInfo header options
(o, files, err) = getOpt Permute options argv
-- case errors occured, throw exception, else call functions for each option
-- selected
if not (null err)
then throw $ FatalException $ concat err ++ "\n" ++ helpMessage
else do
opt <- foldlM (flip id) defaultOptions o
if helpText opt
then throw $ ShowTextOnly helpMessage
else case files of
[] -> throw $
ShowTextOnly $ "Error: No input file was given!\n\n" ++ helpMessage
[f] -> return $ return $ opt { filePath = f }
(_ : _) -> throw $
FatalException $ "Could not parse command line arguments. " ++
"There were to many input files given. \n\n" ++ helpMessage
--
-- Parse.hs ends here
| 1,155
| true
| true
| 0
| 17
| 519
| 263
| 138
| 125
| null | null |
skadinyo/conc
|
haskell/solution2.hs
|
epl-1.0
|
eul12 fac = iter triangleNumber
where
iter (x:xs)
| (countFactor x) >= fac = x
| otherwise = iter xs
----------
| 130
|
eul12 fac = iter triangleNumber
where
iter (x:xs)
| (countFactor x) >= fac = x
| otherwise = iter xs
----------
| 130
|
eul12 fac = iter triangleNumber
where
iter (x:xs)
| (countFactor x) >= fac = x
| otherwise = iter xs
----------
| 130
| false
| false
| 0
| 10
| 39
| 58
| 27
| 31
| null | null |
GaloisInc/halvm-ghc
|
compiler/nativeGen/PPC/CodeGen.hs
|
bsd-3-clause
|
swizzleRegisterRep (Any _ codefn) format = Any format codefn
| 66
|
swizzleRegisterRep (Any _ codefn) format = Any format codefn
| 66
|
swizzleRegisterRep (Any _ codefn) format = Any format codefn
| 66
| false
| false
| 0
| 7
| 14
| 24
| 11
| 13
| null | null |
davdar/maam
|
src/FP/Monads.hs
|
bsd-3-clause
|
evalKon :: Kon r r -> r
evalKon aM = runKon aM id
| 49
|
evalKon :: Kon r r -> r
evalKon aM = runKon aM id
| 49
|
evalKon aM = runKon aM id
| 25
| false
| true
| 0
| 6
| 12
| 28
| 13
| 15
| null | null |
ladinu/cs457
|
src/Wk01NamingValues.hs
|
mit
|
pie:: Double -- Mis-spelling deliberate
pie = 3.14159
| 68
|
pie:: Double
pie = 3.14159
| 26
|
pie = 3.14159
| 13
| true
| true
| 0
| 6
| 22
| 20
| 8
| 12
| null | null |
simonmichael/shelltestrunner
|
src/Utils/Debug.hs
|
gpl-3.0
|
dbg6 :: Show a => String -> a -> a
dbg6 = dbgAt 6
| 49
|
dbg6 :: Show a => String -> a -> a
dbg6 = dbgAt 6
| 49
|
dbg6 = dbgAt 6
| 14
| false
| true
| 0
| 7
| 13
| 29
| 14
| 15
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/FocusEvent.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent.relatedTarget Mozilla FocusEvent.relatedTarget documentation>
getRelatedTargetUnchecked ::
(MonadDOM m) => FocusEvent -> m EventTarget
getRelatedTargetUnchecked self
= liftDOM ((self ^. js "relatedTarget") >>= fromJSValUnchecked)
| 324
|
getRelatedTargetUnchecked ::
(MonadDOM m) => FocusEvent -> m EventTarget
getRelatedTargetUnchecked self
= liftDOM ((self ^. js "relatedTarget") >>= fromJSValUnchecked)
| 195
|
getRelatedTargetUnchecked self
= liftDOM ((self ^. js "relatedTarget") >>= fromJSValUnchecked)
| 96
| true
| true
| 0
| 10
| 53
| 51
| 26
| 25
| null | null |
fgaray/telegram-bot
|
src/Main.hs
|
gpl-3.0
|
client :: LoggerSet -> Manager -> TelegramClient ()
client logger manager = forever $ do
lastOffset <- liftIO . runDB $ getLastOffset
log logger (fromString . show $ lastOffset)
token <- ask
updates <- liftIO $ getUpdates token lastOffset Nothing Nothing manager
case updates of
Left err -> log logger (fromString $ show err)
Right us -> do
newUpdates <- fmap catMaybes . liftIO $ runDB (mapM saveUpdateMessage (result us))
mapM_ (processAction logger) newUpdates
liftIO $ threadDelay 3000000
| 557
|
client :: LoggerSet -> Manager -> TelegramClient ()
client logger manager = forever $ do
lastOffset <- liftIO . runDB $ getLastOffset
log logger (fromString . show $ lastOffset)
token <- ask
updates <- liftIO $ getUpdates token lastOffset Nothing Nothing manager
case updates of
Left err -> log logger (fromString $ show err)
Right us -> do
newUpdates <- fmap catMaybes . liftIO $ runDB (mapM saveUpdateMessage (result us))
mapM_ (processAction logger) newUpdates
liftIO $ threadDelay 3000000
| 557
|
client logger manager = forever $ do
lastOffset <- liftIO . runDB $ getLastOffset
log logger (fromString . show $ lastOffset)
token <- ask
updates <- liftIO $ getUpdates token lastOffset Nothing Nothing manager
case updates of
Left err -> log logger (fromString $ show err)
Right us -> do
newUpdates <- fmap catMaybes . liftIO $ runDB (mapM saveUpdateMessage (result us))
mapM_ (processAction logger) newUpdates
liftIO $ threadDelay 3000000
| 505
| false
| true
| 0
| 19
| 142
| 195
| 89
| 106
| null | null |
jecisc/TP_PF_L3
|
PF-TP5/src/PF-TP_Interprete_Fini_FerlicotDelbecque_Cyril/Main.hs
|
mit
|
envB :: Environnement ValeurB
envB = [("add", addB)
, ("quot", quotB)]
| 79
|
envB :: Environnement ValeurB
envB = [("add", addB)
, ("quot", quotB)]
| 79
|
envB = [("add", addB)
, ("quot", quotB)]
| 49
| false
| true
| 1
| 7
| 19
| 36
| 19
| 17
| null | null |
avh4/elm-format
|
elm-format-lib/src/Parse/Parse.hs
|
bsd-3-clause
|
-- RUN PARSERS
parse :: String -> IParser a -> Result.Result wrn Error.Error a
parse source parser =
case iParse parser source of
Right result ->
return result
Left err ->
let
pos = (Parsec.errorPos err)
in
Result.throw (A.Region pos pos) (Error.Parse err)
| 310
|
parse :: String -> IParser a -> Result.Result wrn Error.Error a
parse source parser =
case iParse parser source of
Right result ->
return result
Left err ->
let
pos = (Parsec.errorPos err)
in
Result.throw (A.Region pos pos) (Error.Parse err)
| 294
|
parse source parser =
case iParse parser source of
Right result ->
return result
Left err ->
let
pos = (Parsec.errorPos err)
in
Result.throw (A.Region pos pos) (Error.Parse err)
| 230
| true
| true
| 0
| 14
| 96
| 113
| 53
| 60
| null | null |
geraldus/yesod
|
yesod-core/src/Yesod/Core/Internal/Util.hs
|
mit
|
{- | Get the time 365 days from now in RFC 1123 format. For use as an expiry
date on a resource that never expires. See RFC 2616 section 14.21 for details.
-}
getCurrentMaxExpiresRFC1123 :: IO T.Text
getCurrentMaxExpiresRFC1123 = fmap (formatRFC1123 . addUTCTime (60*60*24*365)) getCurrentTime
| 293
|
getCurrentMaxExpiresRFC1123 :: IO T.Text
getCurrentMaxExpiresRFC1123 = fmap (formatRFC1123 . addUTCTime (60*60*24*365)) getCurrentTime
| 134
|
getCurrentMaxExpiresRFC1123 = fmap (formatRFC1123 . addUTCTime (60*60*24*365)) getCurrentTime
| 93
| true
| true
| 0
| 12
| 44
| 47
| 24
| 23
| null | null |
tpsinnem/Idris-dev
|
src/Idris/Core/ProofTerm.hs
|
bsd-3-clause
|
-- | Replace the top of a term path with another term path. In other
-- words, "graft" one term path into another.
replaceTop :: TermPath -> TermPath -> TermPath
replaceTop p Top = p
| 182
|
replaceTop :: TermPath -> TermPath -> TermPath
replaceTop p Top = p
| 67
|
replaceTop p Top = p
| 20
| true
| true
| 0
| 6
| 34
| 26
| 14
| 12
| null | null |
snoyberg/ghc
|
libraries/base/GHC/Event/PSQ.hs
|
bsd-3-clause
|
rloser k p v tl m tr = RLoser (1 + size' tl + size' tr) (E k p v) tl m tr
| 73
|
rloser k p v tl m tr = RLoser (1 + size' tl + size' tr) (E k p v) tl m tr
| 73
|
rloser k p v tl m tr = RLoser (1 + size' tl + size' tr) (E k p v) tl m tr
| 73
| false
| false
| 1
| 9
| 22
| 66
| 27
| 39
| null | null |
IMOKURI/snmptrapreceiver
|
src/TrapTypes.hs
|
mit
|
construction :: [ASN1]
construction = [Start Sequence, End Sequence, End (Container Context 4), End (Container Context 7)]
| 122
|
construction :: [ASN1]
construction = [Start Sequence, End Sequence, End (Container Context 4), End (Container Context 7)]
| 122
|
construction = [Start Sequence, End Sequence, End (Container Context 4), End (Container Context 7)]
| 99
| false
| true
| 0
| 9
| 16
| 61
| 29
| 32
| null | null |
apyrgio/ganeti
|
src/Ganeti/Query/Query.hs
|
bsd-2-clause
|
-- | Query fields call.
queryFields :: QueryFields -> ErrorResult QueryFieldsResult
queryFields (QueryFields (ItemTypeOpCode QRNode) fields) =
Ok $ fieldsExtractor Node.fieldsMap fields
| 187
|
queryFields :: QueryFields -> ErrorResult QueryFieldsResult
queryFields (QueryFields (ItemTypeOpCode QRNode) fields) =
Ok $ fieldsExtractor Node.fieldsMap fields
| 163
|
queryFields (QueryFields (ItemTypeOpCode QRNode) fields) =
Ok $ fieldsExtractor Node.fieldsMap fields
| 103
| true
| true
| 2
| 11
| 23
| 54
| 24
| 30
| null | null |
ksaveljev/hake-2
|
src/Game/Monsters/MFloat.hs
|
bsd-3-clause
|
floaterWham :: EntThink
floaterWham =
GenericEntThink "floater_wham" $ \selfRef -> do
soundAttack3 <- use $ mFloatGlobals.mFloatSoundAttack3
sound <- use $ gameBaseGlobals.gbGameImport.giSound
sound (Just selfRef) Constants.chanWeapon soundAttack3 1 Constants.attnNorm 0
r <- Lib.rand
let aim = V3 (fromIntegral Constants.meleeDistance) 0 0
GameWeapon.fireHit selfRef aim (5 + fromIntegral (r `mod` 6)) (-50)
return True
| 452
|
floaterWham :: EntThink
floaterWham =
GenericEntThink "floater_wham" $ \selfRef -> do
soundAttack3 <- use $ mFloatGlobals.mFloatSoundAttack3
sound <- use $ gameBaseGlobals.gbGameImport.giSound
sound (Just selfRef) Constants.chanWeapon soundAttack3 1 Constants.attnNorm 0
r <- Lib.rand
let aim = V3 (fromIntegral Constants.meleeDistance) 0 0
GameWeapon.fireHit selfRef aim (5 + fromIntegral (r `mod` 6)) (-50)
return True
| 452
|
floaterWham =
GenericEntThink "floater_wham" $ \selfRef -> do
soundAttack3 <- use $ mFloatGlobals.mFloatSoundAttack3
sound <- use $ gameBaseGlobals.gbGameImport.giSound
sound (Just selfRef) Constants.chanWeapon soundAttack3 1 Constants.attnNorm 0
r <- Lib.rand
let aim = V3 (fromIntegral Constants.meleeDistance) 0 0
GameWeapon.fireHit selfRef aim (5 + fromIntegral (r `mod` 6)) (-50)
return True
| 428
| false
| true
| 0
| 15
| 83
| 154
| 74
| 80
| null | null |
taxell/SHK
|
src/LexJSH.hs
|
mit
|
lexOp _ ('%' : '=' : rest) = '%' : '=' : ' ' : lexOp True rest
| 62
|
lexOp _ ('%' : '=' : rest) = '%' : '=' : ' ' : lexOp True rest
| 62
|
lexOp _ ('%' : '=' : rest) = '%' : '=' : ' ' : lexOp True rest
| 62
| false
| false
| 1
| 7
| 17
| 41
| 19
| 22
| null | null |
snowleopard/shaking-up-ghc
|
src/Rules/Documentation.hs
|
bsd-3-clause
|
archiveRoot :: FilePath
archiveRoot = docRoot -/- "archives"
| 60
|
archiveRoot :: FilePath
archiveRoot = docRoot -/- "archives"
| 60
|
archiveRoot = docRoot -/- "archives"
| 36
| false
| true
| 0
| 6
| 7
| 22
| 9
| 13
| null | null |
changlinli/remote-arduino-music
|
RemoteMusic.hs
|
gpl-3.0
|
senseInputResetStation False = return ()
| 40
|
senseInputResetStation False = return ()
| 40
|
senseInputResetStation False = return ()
| 40
| false
| false
| 0
| 6
| 4
| 14
| 6
| 8
| null | null |
jjingram/satori
|
src/Emit.hs
|
bsd-3-clause
|
codegenTop _ _ (Declare name args) = declare T.i64 name fnargs
where
fnargs = toSig args
| 94
|
codegenTop _ _ (Declare name args) = declare T.i64 name fnargs
where
fnargs = toSig args
| 94
|
codegenTop _ _ (Declare name args) = declare T.i64 name fnargs
where
fnargs = toSig args
| 94
| false
| false
| 0
| 7
| 21
| 41
| 19
| 22
| null | null |
nevrenato/Hets_Fork
|
Fpl/As.der.hs
|
gpl-2.0
|
optVarDecls :: [String] -> AParser st ([VAR_DECL], [Token])
optVarDecls ks =
(oParenT >> separatedBy (varDecl ks) anSemi << cParenT)
<|> return ([], [])
| 160
|
optVarDecls :: [String] -> AParser st ([VAR_DECL], [Token])
optVarDecls ks =
(oParenT >> separatedBy (varDecl ks) anSemi << cParenT)
<|> return ([], [])
| 160
|
optVarDecls ks =
(oParenT >> separatedBy (varDecl ks) anSemi << cParenT)
<|> return ([], [])
| 100
| false
| true
| 3
| 10
| 30
| 84
| 44
| 40
| null | null |
brownplt/javascript-contracts
|
src/BrownPLT/JavaScript/Contracts/Template.hs
|
bsd-3-clause
|
substFieldList :: String -- ^ placeholder field name
-> [(String,ParsedExpression)] -- ^list of fields
-> JavaScriptTemplate
-> JavaScriptTemplate
substFieldList fieldId fields (ExpressionTemplate body) =
ExpressionTemplate (everywhere (mkT subst) body) where
fields' = map (\(name,expr) -> (PropId noPos (Id noPos name),expr)) fields
subst [(PropId _ (Id _ id'), _)] | id' == fieldId = fields'
subst lst = lst
| 470
|
substFieldList :: String -- ^ placeholder field name
-> [(String,ParsedExpression)] -- ^list of fields
-> JavaScriptTemplate
-> JavaScriptTemplate
substFieldList fieldId fields (ExpressionTemplate body) =
ExpressionTemplate (everywhere (mkT subst) body) where
fields' = map (\(name,expr) -> (PropId noPos (Id noPos name),expr)) fields
subst [(PropId _ (Id _ id'), _)] | id' == fieldId = fields'
subst lst = lst
| 470
|
substFieldList fieldId fields (ExpressionTemplate body) =
ExpressionTemplate (everywhere (mkT subst) body) where
fields' = map (\(name,expr) -> (PropId noPos (Id noPos name),expr)) fields
subst [(PropId _ (Id _ id'), _)] | id' == fieldId = fields'
subst lst = lst
| 278
| false
| true
| 0
| 13
| 117
| 157
| 83
| 74
| null | null |
Tosainu/pwn.hs
|
test/Pwn/AsmSpec.hs
|
mit
|
spec :: Spec
spec = do
describe "Pwn.Asm.asm" $ do
it "assemble i386 code" $ do
let src = "xor ebx, ebx ; mov eax, 0x1 ; int 0x80"
bin = "\x31\xdb\xb8\x01\x00\x00\x00\xcd\x80"
ret <- pwnWith linux64Config $ asm src
ret `shouldBe` (Right bin)
it "assemble x86-64 code" $ do
let src = "xor rdi, rdi ; mov rax, 0x3c ; syscall"
bin = "\x48\x31\xff\x48\xc7\xc0\x3c\x00\x00\x00\x0f\x05"
ret <- pwnWith linux64Config $ asm src
ret `shouldBe` (Right bin)
it "assemble invalid code" $ do
ret1 <- pwnWith linux32Config $ asm "nyanyanya"
(isLeft ret1) `shouldBe` True
ret2 <- pwnWith linux64Config $ asm "nyanyanya"
(isLeft ret2) `shouldBe` True
it "assemble with invalid config" $ do
ret <- pwnWith invalidConfig $ asm "nop"
(isLeft ret) `shouldBe` True
describe "Pwn.Asm.disasm" $ do
it "disassemble i386 code" $ do
let bin = "\x31\xdb\xb8\x01\x00\x00\x00\xcd\x80"
Right ret <- pwnWith linux32Config $ disasm bin
let retl = BS.lines ret
length retl `shouldBe` 4
"31 db" `BS.isInfixOf` (retl !! 1) `shouldBe` True
"b8 01 00 00 00" `BS.isInfixOf` (retl !! 2) `shouldBe` True
"cd 80" `BS.isInfixOf` (retl !! 3) `shouldBe` True
it "disassemble x86-64 code" $ do
let bin = "\x48\x31\xff\x48\xc7\xc0\x3c\x00\x00\x00\x0f\x05"
Right ret <- pwnWith linux64Config $ disasm bin
let retl = BS.lines ret
length retl `shouldBe` 4
"48 31 ff" `BS.isInfixOf` (retl !! 1) `shouldBe` True
"48 c7 c0 3c 00 00 00" `BS.isInfixOf` (retl !! 2) `shouldBe` True
"0f 05" `BS.isInfixOf` (retl !! 3) `shouldBe` True
it "disassemble with invalid config" $ do
ret <- pwnWith invalidConfig $ disasm "'x90"
(isLeft ret) `shouldBe` True
| 1,883
|
spec :: Spec
spec = do
describe "Pwn.Asm.asm" $ do
it "assemble i386 code" $ do
let src = "xor ebx, ebx ; mov eax, 0x1 ; int 0x80"
bin = "\x31\xdb\xb8\x01\x00\x00\x00\xcd\x80"
ret <- pwnWith linux64Config $ asm src
ret `shouldBe` (Right bin)
it "assemble x86-64 code" $ do
let src = "xor rdi, rdi ; mov rax, 0x3c ; syscall"
bin = "\x48\x31\xff\x48\xc7\xc0\x3c\x00\x00\x00\x0f\x05"
ret <- pwnWith linux64Config $ asm src
ret `shouldBe` (Right bin)
it "assemble invalid code" $ do
ret1 <- pwnWith linux32Config $ asm "nyanyanya"
(isLeft ret1) `shouldBe` True
ret2 <- pwnWith linux64Config $ asm "nyanyanya"
(isLeft ret2) `shouldBe` True
it "assemble with invalid config" $ do
ret <- pwnWith invalidConfig $ asm "nop"
(isLeft ret) `shouldBe` True
describe "Pwn.Asm.disasm" $ do
it "disassemble i386 code" $ do
let bin = "\x31\xdb\xb8\x01\x00\x00\x00\xcd\x80"
Right ret <- pwnWith linux32Config $ disasm bin
let retl = BS.lines ret
length retl `shouldBe` 4
"31 db" `BS.isInfixOf` (retl !! 1) `shouldBe` True
"b8 01 00 00 00" `BS.isInfixOf` (retl !! 2) `shouldBe` True
"cd 80" `BS.isInfixOf` (retl !! 3) `shouldBe` True
it "disassemble x86-64 code" $ do
let bin = "\x48\x31\xff\x48\xc7\xc0\x3c\x00\x00\x00\x0f\x05"
Right ret <- pwnWith linux64Config $ disasm bin
let retl = BS.lines ret
length retl `shouldBe` 4
"48 31 ff" `BS.isInfixOf` (retl !! 1) `shouldBe` True
"48 c7 c0 3c 00 00 00" `BS.isInfixOf` (retl !! 2) `shouldBe` True
"0f 05" `BS.isInfixOf` (retl !! 3) `shouldBe` True
it "disassemble with invalid config" $ do
ret <- pwnWith invalidConfig $ disasm "'x90"
(isLeft ret) `shouldBe` True
| 1,883
|
spec = do
describe "Pwn.Asm.asm" $ do
it "assemble i386 code" $ do
let src = "xor ebx, ebx ; mov eax, 0x1 ; int 0x80"
bin = "\x31\xdb\xb8\x01\x00\x00\x00\xcd\x80"
ret <- pwnWith linux64Config $ asm src
ret `shouldBe` (Right bin)
it "assemble x86-64 code" $ do
let src = "xor rdi, rdi ; mov rax, 0x3c ; syscall"
bin = "\x48\x31\xff\x48\xc7\xc0\x3c\x00\x00\x00\x0f\x05"
ret <- pwnWith linux64Config $ asm src
ret `shouldBe` (Right bin)
it "assemble invalid code" $ do
ret1 <- pwnWith linux32Config $ asm "nyanyanya"
(isLeft ret1) `shouldBe` True
ret2 <- pwnWith linux64Config $ asm "nyanyanya"
(isLeft ret2) `shouldBe` True
it "assemble with invalid config" $ do
ret <- pwnWith invalidConfig $ asm "nop"
(isLeft ret) `shouldBe` True
describe "Pwn.Asm.disasm" $ do
it "disassemble i386 code" $ do
let bin = "\x31\xdb\xb8\x01\x00\x00\x00\xcd\x80"
Right ret <- pwnWith linux32Config $ disasm bin
let retl = BS.lines ret
length retl `shouldBe` 4
"31 db" `BS.isInfixOf` (retl !! 1) `shouldBe` True
"b8 01 00 00 00" `BS.isInfixOf` (retl !! 2) `shouldBe` True
"cd 80" `BS.isInfixOf` (retl !! 3) `shouldBe` True
it "disassemble x86-64 code" $ do
let bin = "\x48\x31\xff\x48\xc7\xc0\x3c\x00\x00\x00\x0f\x05"
Right ret <- pwnWith linux64Config $ disasm bin
let retl = BS.lines ret
length retl `shouldBe` 4
"48 31 ff" `BS.isInfixOf` (retl !! 1) `shouldBe` True
"48 c7 c0 3c 00 00 00" `BS.isInfixOf` (retl !! 2) `shouldBe` True
"0f 05" `BS.isInfixOf` (retl !! 3) `shouldBe` True
it "disassemble with invalid config" $ do
ret <- pwnWith invalidConfig $ disasm "'x90"
(isLeft ret) `shouldBe` True
| 1,870
| false
| true
| 0
| 17
| 543
| 575
| 278
| 297
| null | null |
urbanslug/ghc
|
compiler/types/TyCon.hs
|
bsd-3-clause
|
-- | Are we able to extract informationa 'TyVar' to class argument list
-- mappping from a given 'TyCon'?
isTyConAssoc :: TyCon -> Bool
isTyConAssoc tc = isJust (tyConAssoc_maybe tc)
| 182
|
isTyConAssoc :: TyCon -> Bool
isTyConAssoc tc = isJust (tyConAssoc_maybe tc)
| 76
|
isTyConAssoc tc = isJust (tyConAssoc_maybe tc)
| 46
| true
| true
| 0
| 7
| 29
| 29
| 15
| 14
| null | null |
jcsaenzcarrasco/MPhil-thesis
|
Graphs.hs
|
mit
|
mergesort pred xs = merge pred (mergesort pred xs1) (mergesort pred xs2)
where
(xs1,xs2) = splitm xs
| 109
|
mergesort pred xs = merge pred (mergesort pred xs1) (mergesort pred xs2)
where
(xs1,xs2) = splitm xs
| 109
|
mergesort pred xs = merge pred (mergesort pred xs1) (mergesort pred xs2)
where
(xs1,xs2) = splitm xs
| 109
| false
| false
| 1
| 7
| 25
| 57
| 25
| 32
| null | null |
cmears/mines-solver
|
TimeAccounting.hs
|
mit
|
accountInit :: IO Account
accountInit = newIORef M.empty
| 56
|
accountInit :: IO Account
accountInit = newIORef M.empty
| 56
|
accountInit = newIORef M.empty
| 30
| false
| true
| 0
| 6
| 7
| 25
| 10
| 15
| null | null |
adinapoli/api-tools
|
src/Data/API/Changes.hs
|
bsd-3-clause
|
typeDelcFreeVars (NUnionType alts) = Set.unions . map typeFreeVars
. Map.elems $ alts
| 139
|
typeDelcFreeVars (NUnionType alts) = Set.unions . map typeFreeVars
. Map.elems $ alts
| 139
|
typeDelcFreeVars (NUnionType alts) = Set.unions . map typeFreeVars
. Map.elems $ alts
| 139
| false
| false
| 0
| 8
| 65
| 35
| 16
| 19
| null | null |
rgrempel/frelm.org
|
src/Data/Range.hs
|
mit
|
readPersistValue :: Parsec Text () a -> PersistValue -> Either Text (Range a)
readPersistValue subparser value =
case value of
PersistDbSpecific str ->
first tshow $ parse (postgresRange subparser) "" (decodeUtf8 str)
_ -> Left $ "Got unexpected persist value: " ++ tshow value
| 309
|
readPersistValue :: Parsec Text () a -> PersistValue -> Either Text (Range a)
readPersistValue subparser value =
case value of
PersistDbSpecific str ->
first tshow $ parse (postgresRange subparser) "" (decodeUtf8 str)
_ -> Left $ "Got unexpected persist value: " ++ tshow value
| 309
|
readPersistValue subparser value =
case value of
PersistDbSpecific str ->
first tshow $ parse (postgresRange subparser) "" (decodeUtf8 str)
_ -> Left $ "Got unexpected persist value: " ++ tshow value
| 231
| false
| true
| 0
| 11
| 75
| 100
| 47
| 53
| null | null |
ducis/cassandra-minimalist
|
cassandra-cql-0.3.0.1/Database/Cassandra/CQL1.hs
|
apache-2.0
|
epoch :: UTCTime
epoch = UTCTime (fromGregorian 1970 1 1) 0
| 59
|
epoch :: UTCTime
epoch = UTCTime (fromGregorian 1970 1 1) 0
| 59
|
epoch = UTCTime (fromGregorian 1970 1 1) 0
| 42
| false
| true
| 0
| 7
| 10
| 33
| 14
| 19
| null | null |
aristidb/GameOfLife
|
Display.hs
|
bsd-3-clause
|
minmax :: [Int] -> (Int, Int)
minmax [] = (0, 0)
| 48
|
minmax :: [Int] -> (Int, Int)
minmax [] = (0, 0)
| 48
|
minmax [] = (0, 0)
| 18
| false
| true
| 0
| 8
| 10
| 41
| 21
| 20
| null | null |
DavidAlphaFox/ghc
|
libraries/containers/Data/IntSet/Base.hs
|
bsd-3-clause
|
equal (Tip kx1 bm1) (Tip kx2 bm2)
= kx1 == kx2 && bm1 == bm2
| 62
|
equal (Tip kx1 bm1) (Tip kx2 bm2)
= kx1 == kx2 && bm1 == bm2
| 62
|
equal (Tip kx1 bm1) (Tip kx2 bm2)
= kx1 == kx2 && bm1 == bm2
| 62
| false
| false
| 3
| 7
| 16
| 46
| 20
| 26
| null | null |
DaMSL/K3
|
src/Language/K3/Runtime/Engine.hs
|
apache-2.0
|
{- Connection and connection map accessors -}
llAddress :: Address -> NT.EndPointAddress
llAddress addr = NT.EndPointAddress $ BS.pack $ show addr ++ ":0"
| 155
|
llAddress :: Address -> NT.EndPointAddress
llAddress addr = NT.EndPointAddress $ BS.pack $ show addr ++ ":0"
| 108
|
llAddress addr = NT.EndPointAddress $ BS.pack $ show addr ++ ":0"
| 65
| true
| true
| 0
| 8
| 23
| 40
| 20
| 20
| null | null |
geophf/1HaskellADay
|
exercises/HAD/Control/Scan/CSV.hs
|
mit
|
-- *Main> rend ',' "1,2,3" ~> ["1","2","3"]
-- csv = rend ',' -- so we could just write this.
-- No, we need to make csv "-escape-aware
csv :: String -> [String]
csv "" = []
| 176
|
csv :: String -> [String]
csv "" = []
| 37
|
csv "" = []
| 11
| true
| true
| 0
| 8
| 38
| 32
| 16
| 16
| null | null |
JacquesCarette/literate-scientific-software
|
code/drasil-example/Drasil/GlassBR/Unitals.hs
|
bsd-2-clause
|
cWeightMax = mkQuantDef (unitary "cWeightMax"
(nounPhraseSP "maximum permissible input charge weight")
(subMax (eqSymb charWeight)) kilogram Rational) (dbl 910)
| 165
|
cWeightMax = mkQuantDef (unitary "cWeightMax"
(nounPhraseSP "maximum permissible input charge weight")
(subMax (eqSymb charWeight)) kilogram Rational) (dbl 910)
| 165
|
cWeightMax = mkQuantDef (unitary "cWeightMax"
(nounPhraseSP "maximum permissible input charge weight")
(subMax (eqSymb charWeight)) kilogram Rational) (dbl 910)
| 165
| false
| false
| 0
| 11
| 22
| 49
| 24
| 25
| null | null |
spechub/Hets
|
CSL/Keywords.hs
|
gpl-2.0
|
booleanKeywords :: [String]
booleanKeywords = [ evenpS, fixpS, freeofS, numberpS, ordpS, primepS
, convergenceS]
| 130
|
booleanKeywords :: [String]
booleanKeywords = [ evenpS, fixpS, freeofS, numberpS, ordpS, primepS
, convergenceS]
| 130
|
booleanKeywords = [ evenpS, fixpS, freeofS, numberpS, ordpS, primepS
, convergenceS]
| 102
| false
| true
| 0
| 7
| 31
| 42
| 23
| 19
| null | null |
nevrenato/HetsAlloy
|
Common/AnnoParser.hs
|
gpl-2.0
|
fromPos :: Pos -> SourcePos
fromPos p = Pos.newPos (Id.sourceName p) (Id.sourceLine p) (Id.sourceColumn p)
| 106
|
fromPos :: Pos -> SourcePos
fromPos p = Pos.newPos (Id.sourceName p) (Id.sourceLine p) (Id.sourceColumn p)
| 106
|
fromPos p = Pos.newPos (Id.sourceName p) (Id.sourceLine p) (Id.sourceColumn p)
| 78
| false
| true
| 0
| 8
| 14
| 56
| 26
| 30
| null | null |
fhaust/rt-ransac
|
test/Spec.hs
|
bsd-3-clause
|
-- check that the algorithms can handle noise
propACowNoisy (NLFP α β δ ps) = monadicIO $ do
acow <- run $ ACow.ransac 100 2 0.5 (Just . fitLine) distanceToLine (< 0.1) ps
assert $ case acow of
Just ((α',β'),_) -> abs (α - α') < 1e-1 && abs (β - β') < 1e-1
Nothing -> False
| 296
|
propACowNoisy (NLFP α β δ ps) = monadicIO $ do
acow <- run $ ACow.ransac 100 2 0.5 (Just . fitLine) distanceToLine (< 0.1) ps
assert $ case acow of
Just ((α',β'),_) -> abs (α - α') < 1e-1 && abs (β - β') < 1e-1
Nothing -> False
| 248
|
propACowNoisy (NLFP α β δ ps) = monadicIO $ do
acow <- run $ ACow.ransac 100 2 0.5 (Just . fitLine) distanceToLine (< 0.1) ps
assert $ case acow of
Just ((α',β'),_) -> abs (α - α') < 1e-1 && abs (β - β') < 1e-1
Nothing -> False
| 248
| true
| false
| 0
| 17
| 79
| 135
| 69
| 66
| null | null |
kazu-yamamoto/network-uri
|
tests/uri001.hs
|
bsd-3-clause
|
testURIRef056 = testURIRef RelRf "../../../../g"
| 48
|
testURIRef056 = testURIRef RelRf "../../../../g"
| 48
|
testURIRef056 = testURIRef RelRf "../../../../g"
| 48
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
Fuuzetsu/stack
|
src/Stack/Setup.hs
|
bsd-3-clause
|
bootGhcjs :: StackM env m
=> Version -> Path Abs File -> Path Abs Dir -> [String] -> m ()
bootGhcjs ghcjsVersion stackYaml destDir bootOpts = do
envConfig <- loadGhcjsEnvConfig stackYaml (destDir </> $(mkRelDir "bin"))
menv <- liftIO $ configEnvOverride (view configL envConfig) defaultEnvSettings
-- Install cabal-install if missing, or if the installed one is old.
mcabal <- getCabalInstallVersion menv
shouldInstallCabal <- case mcabal of
Nothing -> do
$logInfo "No cabal-install binary found for use with GHCJS."
return True
Just v
| v < $(mkVersion "1.22.4") -> do
$logInfo $
"The cabal-install found on PATH is too old to be used for booting GHCJS (version " <>
versionText v <>
")."
return True
| v >= $(mkVersion "1.23") -> do
$logWarn $
"The cabal-install found on PATH is a version stack doesn't know about, version " <>
versionText v <>
". This may or may not work.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470"
return False
| ghcjsVersion >= $(mkVersion "0.2.0.20160413") && v >= $(mkVersion "1.22.8") -> do
$logWarn $
"The cabal-install found on PATH, version " <>
versionText v <>
", is >= 1.22.8.\n" <>
"That version has a bug preventing ghcjs < 0.2.0.20160413 from booting.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470"
return True
| otherwise -> return False
let envSettings = defaultEnvSettings { esIncludeGhcPackagePath = False }
menv' <- liftIO $ configEnvOverride (view configL envConfig) envSettings
when shouldInstallCabal $ do
$logInfo "Building a local copy of cabal-install from source."
runInnerStackT envConfig $
build (\_ -> return ())
Nothing
defaultBuildOptsCLI { boptsCLITargets = ["cabal-install"] }
mcabal' <- getCabalInstallVersion menv'
case mcabal' of
Nothing ->
$logError $
"Failed to get cabal-install version after installing it.\n" <>
"This shouldn't happen, because it gets built to the snapshot bin directory, which should be treated as being on the PATH."
Just v | v >= $(mkVersion "1.22.8") && v < $(mkVersion "1.23") ->
$logWarn $
"Installed version of cabal-install is in a version range which may not work.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470\n" <>
"This version is specified by the stack.yaml file included in the ghcjs tarball.\n"
_ -> return ()
$logSticky "Booting GHCJS (this will take a long time) ..."
logProcessStderrStdout Nothing "ghcjs-boot" menv' bootOpts
$logStickyDone "GHCJS booted."
| 3,140
|
bootGhcjs :: StackM env m
=> Version -> Path Abs File -> Path Abs Dir -> [String] -> m ()
bootGhcjs ghcjsVersion stackYaml destDir bootOpts = do
envConfig <- loadGhcjsEnvConfig stackYaml (destDir </> $(mkRelDir "bin"))
menv <- liftIO $ configEnvOverride (view configL envConfig) defaultEnvSettings
-- Install cabal-install if missing, or if the installed one is old.
mcabal <- getCabalInstallVersion menv
shouldInstallCabal <- case mcabal of
Nothing -> do
$logInfo "No cabal-install binary found for use with GHCJS."
return True
Just v
| v < $(mkVersion "1.22.4") -> do
$logInfo $
"The cabal-install found on PATH is too old to be used for booting GHCJS (version " <>
versionText v <>
")."
return True
| v >= $(mkVersion "1.23") -> do
$logWarn $
"The cabal-install found on PATH is a version stack doesn't know about, version " <>
versionText v <>
". This may or may not work.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470"
return False
| ghcjsVersion >= $(mkVersion "0.2.0.20160413") && v >= $(mkVersion "1.22.8") -> do
$logWarn $
"The cabal-install found on PATH, version " <>
versionText v <>
", is >= 1.22.8.\n" <>
"That version has a bug preventing ghcjs < 0.2.0.20160413 from booting.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470"
return True
| otherwise -> return False
let envSettings = defaultEnvSettings { esIncludeGhcPackagePath = False }
menv' <- liftIO $ configEnvOverride (view configL envConfig) envSettings
when shouldInstallCabal $ do
$logInfo "Building a local copy of cabal-install from source."
runInnerStackT envConfig $
build (\_ -> return ())
Nothing
defaultBuildOptsCLI { boptsCLITargets = ["cabal-install"] }
mcabal' <- getCabalInstallVersion menv'
case mcabal' of
Nothing ->
$logError $
"Failed to get cabal-install version after installing it.\n" <>
"This shouldn't happen, because it gets built to the snapshot bin directory, which should be treated as being on the PATH."
Just v | v >= $(mkVersion "1.22.8") && v < $(mkVersion "1.23") ->
$logWarn $
"Installed version of cabal-install is in a version range which may not work.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470\n" <>
"This version is specified by the stack.yaml file included in the ghcjs tarball.\n"
_ -> return ()
$logSticky "Booting GHCJS (this will take a long time) ..."
logProcessStderrStdout Nothing "ghcjs-boot" menv' bootOpts
$logStickyDone "GHCJS booted."
| 3,140
|
bootGhcjs ghcjsVersion stackYaml destDir bootOpts = do
envConfig <- loadGhcjsEnvConfig stackYaml (destDir </> $(mkRelDir "bin"))
menv <- liftIO $ configEnvOverride (view configL envConfig) defaultEnvSettings
-- Install cabal-install if missing, or if the installed one is old.
mcabal <- getCabalInstallVersion menv
shouldInstallCabal <- case mcabal of
Nothing -> do
$logInfo "No cabal-install binary found for use with GHCJS."
return True
Just v
| v < $(mkVersion "1.22.4") -> do
$logInfo $
"The cabal-install found on PATH is too old to be used for booting GHCJS (version " <>
versionText v <>
")."
return True
| v >= $(mkVersion "1.23") -> do
$logWarn $
"The cabal-install found on PATH is a version stack doesn't know about, version " <>
versionText v <>
". This may or may not work.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470"
return False
| ghcjsVersion >= $(mkVersion "0.2.0.20160413") && v >= $(mkVersion "1.22.8") -> do
$logWarn $
"The cabal-install found on PATH, version " <>
versionText v <>
", is >= 1.22.8.\n" <>
"That version has a bug preventing ghcjs < 0.2.0.20160413 from booting.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470"
return True
| otherwise -> return False
let envSettings = defaultEnvSettings { esIncludeGhcPackagePath = False }
menv' <- liftIO $ configEnvOverride (view configL envConfig) envSettings
when shouldInstallCabal $ do
$logInfo "Building a local copy of cabal-install from source."
runInnerStackT envConfig $
build (\_ -> return ())
Nothing
defaultBuildOptsCLI { boptsCLITargets = ["cabal-install"] }
mcabal' <- getCabalInstallVersion menv'
case mcabal' of
Nothing ->
$logError $
"Failed to get cabal-install version after installing it.\n" <>
"This shouldn't happen, because it gets built to the snapshot bin directory, which should be treated as being on the PATH."
Just v | v >= $(mkVersion "1.22.8") && v < $(mkVersion "1.23") ->
$logWarn $
"Installed version of cabal-install is in a version range which may not work.\n" <>
"See this issue: https://github.com/ghcjs/ghcjs/issues/470\n" <>
"This version is specified by the stack.yaml file included in the ghcjs tarball.\n"
_ -> return ()
$logSticky "Booting GHCJS (this will take a long time) ..."
logProcessStderrStdout Nothing "ghcjs-boot" menv' bootOpts
$logStickyDone "GHCJS booted."
| 3,040
| false
| true
| 0
| 21
| 1,088
| 556
| 246
| 310
| null | null |
mbernat/aoc16-haskell
|
src/Day1.hs
|
bsd-3-clause
|
move :: State -> Move -> State
move (State pos dir) m@(Move t s) = newState
where
newState = walk turnedState s
turnedState = State pos (turn dir t)
| 158
|
move :: State -> Move -> State
move (State pos dir) m@(Move t s) = newState
where
newState = walk turnedState s
turnedState = State pos (turn dir t)
| 158
|
move (State pos dir) m@(Move t s) = newState
where
newState = walk turnedState s
turnedState = State pos (turn dir t)
| 127
| false
| true
| 0
| 8
| 38
| 74
| 37
| 37
| null | null |
oldmanmike/ghc
|
compiler/cmm/CmmType.hs
|
bsd-3-clause
|
widthFromBytes 2 = W16
| 23
|
widthFromBytes 2 = W16
| 23
|
widthFromBytes 2 = W16
| 23
| false
| false
| 1
| 5
| 4
| 13
| 4
| 9
| null | null |
Fornost461/drafts-and-stuff
|
Haskell/samples/List.hs
|
cc0-1.0
|
deleteFromTo i j lst | i < j = let newLst = deleteAt i lst
in deleteFromTo i (j-1) newLst
| otherwise = lst
| 173
|
deleteFromTo i j lst | i < j = let newLst = deleteAt i lst
in deleteFromTo i (j-1) newLst
| otherwise = lst
| 173
|
deleteFromTo i j lst | i < j = let newLst = deleteAt i lst
in deleteFromTo i (j-1) newLst
| otherwise = lst
| 173
| false
| false
| 0
| 10
| 89
| 62
| 28
| 34
| null | null |
ingemaradahl/bilder
|
src/Compiler/Clean.hs
|
lgpl-3.0
|
stmDeps (SVoidReturn) = []
| 26
|
stmDeps (SVoidReturn) = []
| 26
|
stmDeps (SVoidReturn) = []
| 26
| false
| false
| 0
| 6
| 3
| 14
| 7
| 7
| null | null |
ekalosak/haskell-practice
|
Graph.hs
|
lgpl-3.0
|
initpospath n g = [[a, n] | a <- getadjnodes n g]
| 49
|
initpospath n g = [[a, n] | a <- getadjnodes n g]
| 49
|
initpospath n g = [[a, n] | a <- getadjnodes n g]
| 49
| false
| false
| 0
| 8
| 11
| 33
| 17
| 16
| null | null |
justinethier/husk-scheme
|
hs-src/Language/Scheme/Compiler/Types.hs
|
mit
|
ast2Str (List ls) = "List [" ++ joinL (map ast2Str ls) "," ++ "]"
| 65
|
ast2Str (List ls) = "List [" ++ joinL (map ast2Str ls) "," ++ "]"
| 65
|
ast2Str (List ls) = "List [" ++ joinL (map ast2Str ls) "," ++ "]"
| 65
| false
| false
| 0
| 9
| 13
| 36
| 17
| 19
| null | null |
aparent/qacg
|
src/QACG/CircUtils/QacgBoolTest.hs
|
bsd-3-clause
|
exp1 = Xor $ map V ["a","b","c"]
| 32
|
exp1 = Xor $ map V ["a","b","c"]
| 32
|
exp1 = Xor $ map V ["a","b","c"]
| 32
| false
| false
| 0
| 7
| 6
| 24
| 13
| 11
| null | null |
facebookincubator/duckling
|
Duckling/Time/EL/Corpus.hs
|
bsd-3-clause
|
negativeCorpus :: NegativeCorpus
negativeCorpus = (context, testOptions, examples)
where
examples =
[ "ένας ενήληκας"
, "τρεισήμισι και μισή"
]
| 167
|
negativeCorpus :: NegativeCorpus
negativeCorpus = (context, testOptions, examples)
where
examples =
[ "ένας ενήληκας"
, "τρεισήμισι και μισή"
]
| 167
|
negativeCorpus = (context, testOptions, examples)
where
examples =
[ "ένας ενήληκας"
, "τρεισήμισι και μισή"
]
| 134
| false
| true
| 0
| 5
| 42
| 34
| 20
| 14
| null | null |
ony/hledger
|
hledger-lib/Hledger/Data/Posting.hs
|
gpl-3.0
|
postingsDateSpan ps = DateSpan (Just $ postingDate $ head ps') (Just $ addDays 1 $ postingDate $ last ps')
where ps' = sortBy (comparing postingDate) ps
-- --date2-sensitive version, as above.
| 197
|
postingsDateSpan ps = DateSpan (Just $ postingDate $ head ps') (Just $ addDays 1 $ postingDate $ last ps')
where ps' = sortBy (comparing postingDate) ps
-- --date2-sensitive version, as above.
| 197
|
postingsDateSpan ps = DateSpan (Just $ postingDate $ head ps') (Just $ addDays 1 $ postingDate $ last ps')
where ps' = sortBy (comparing postingDate) ps
-- --date2-sensitive version, as above.
| 197
| false
| false
| 0
| 10
| 35
| 69
| 33
| 36
| null | null |
taiki45/hs-vm
|
src/VM/Machine.hs
|
mit
|
inc :: PC -> PC
inc = (+1)
| 26
|
inc :: PC -> PC
inc = (+1)
| 26
|
inc = (+1)
| 10
| false
| true
| 0
| 7
| 7
| 26
| 12
| 14
| null | null |
FranklinChen/hugs98-plus-Sep2006
|
packages/xhtml/Text/XHtml/Transitional/Elements.hs
|
bsd-3-clause
|
center :: Html -> Html
center = tag "center"
| 71
|
center :: Html -> Html
center = tag "center"
| 71
|
center = tag "center"
| 35
| false
| true
| 0
| 7
| 35
| 25
| 10
| 15
| null | null |
apyrgio/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
metadGroup :: String
metadGroup = Runtime.daemonGroup (DaemonGroup GanetiMetad)
| 79
|
metadGroup :: String
metadGroup = Runtime.daemonGroup (DaemonGroup GanetiMetad)
| 79
|
metadGroup = Runtime.daemonGroup (DaemonGroup GanetiMetad)
| 58
| false
| true
| 0
| 7
| 7
| 22
| 11
| 11
| null | null |
flofehrenbacher/music-project
|
EasyNotes/View/Fun.hs
|
gpl-3.0
|
-- | Renders a list of vertices (described by x-, y- and z-coordinate)
-- as desired primitive shape
renderAs :: PrimitiveMode -> [(GLfloat, GLfloat, GLfloat)] -> IO ()
renderAs figure ps = renderPrimitive figure$makeVertexes ps
where makeVertexes :: [(GLfloat, GLfloat, GLfloat)] -> IO()
makeVertexes = mapM_ (\(x,y,z)->vertex$Vertex3 x y z)
| 356
|
renderAs :: PrimitiveMode -> [(GLfloat, GLfloat, GLfloat)] -> IO ()
renderAs figure ps = renderPrimitive figure$makeVertexes ps
where makeVertexes :: [(GLfloat, GLfloat, GLfloat)] -> IO()
makeVertexes = mapM_ (\(x,y,z)->vertex$Vertex3 x y z)
| 255
|
renderAs figure ps = renderPrimitive figure$makeVertexes ps
where makeVertexes :: [(GLfloat, GLfloat, GLfloat)] -> IO()
makeVertexes = mapM_ (\(x,y,z)->vertex$Vertex3 x y z)
| 187
| true
| true
| 0
| 11
| 63
| 115
| 63
| 52
| null | null |
beni55/haste-compiler
|
libraries/ghc-7.10/ghc-prim/GHC/Prim.hs
|
bsd-3-clause
|
-- | Reads vector; offset in scalar elements.
indexWord8OffAddrAsWord8X32# :: Addr# -> Int# -> Word8X32#
indexWord8OffAddrAsWord8X32# = let x = x in x
| 152
|
indexWord8OffAddrAsWord8X32# :: Addr# -> Int# -> Word8X32#
indexWord8OffAddrAsWord8X32# = let x = x in x
| 104
|
indexWord8OffAddrAsWord8X32# = let x = x in x
| 45
| true
| true
| 0
| 8
| 24
| 38
| 17
| 21
| null | null |
jacekszymanski/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxLANGUAGE_FIJI :: Int
wxLANGUAGE_FIJI = 76
| 43
|
wxLANGUAGE_FIJI :: Int
wxLANGUAGE_FIJI = 76
| 43
|
wxLANGUAGE_FIJI = 76
| 20
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
nevrenato/Hets_Fork
|
Common/Utils.hs
|
gpl-2.0
|
-- no input from stdin
{- | runs an action in a different directory without changing the current
directory globally. -}
withinDirectory :: FilePath -> IO a -> IO a
withinDirectory p a = do
d <- getCurrentDirectory
setCurrentDirectory p
r <- a
setCurrentDirectory d
return r
-- | calls openTempFile but directly writes content and closes the file
| 362
|
withinDirectory :: FilePath -> IO a -> IO a
withinDirectory p a = do
d <- getCurrentDirectory
setCurrentDirectory p
r <- a
setCurrentDirectory d
return r
-- | calls openTempFile but directly writes content and closes the file
| 236
|
withinDirectory p a = do
d <- getCurrentDirectory
setCurrentDirectory p
r <- a
setCurrentDirectory d
return r
-- | calls openTempFile but directly writes content and closes the file
| 192
| true
| true
| 0
| 8
| 75
| 70
| 30
| 40
| null | null |
eugenkiss/loopgotowhile
|
tests/Language/LoopGotoWhile/While/Extended/Tests.hs
|
bsd-3-clause
|
isRight :: Either a b -> Bool
isRight (Right _) = True
| 54
|
isRight :: Either a b -> Bool
isRight (Right _) = True
| 54
|
isRight (Right _) = True
| 24
| false
| true
| 0
| 7
| 11
| 29
| 14
| 15
| null | null |
keithodulaigh/Hets
|
Static/CheckGlobalContext.hs
|
gpl-2.0
|
checkGMorphismInNodes :: DGraph -> State Statistics ()
checkGMorphismInNodes dgraph =
mapM_ (checkGMorphismInNode dgraph) $ getDGNodeLab dgraph
| 147
|
checkGMorphismInNodes :: DGraph -> State Statistics ()
checkGMorphismInNodes dgraph =
mapM_ (checkGMorphismInNode dgraph) $ getDGNodeLab dgraph
| 147
|
checkGMorphismInNodes dgraph =
mapM_ (checkGMorphismInNode dgraph) $ getDGNodeLab dgraph
| 92
| false
| true
| 0
| 7
| 19
| 44
| 20
| 24
| null | null |
cschneid/RedHask
|
src/Executor.hs
|
bsd-3-clause
|
execute (Set key value) = "Execute set: " ++ key ++ " with value: " ++ value
| 76
|
execute (Set key value) = "Execute set: " ++ key ++ " with value: " ++ value
| 76
|
execute (Set key value) = "Execute set: " ++ key ++ " with value: " ++ value
| 76
| false
| false
| 0
| 7
| 16
| 30
| 14
| 16
| null | null |
forste/haReFork
|
refactorer/RefacGenFold.hs
|
bsd-3-clause
|
rewritePatsInExp p (Exp (HsNegApp s e))
= (Exp (HsNegApp s e'))
where
e' = rewritePatsInExp p e
| 109
|
rewritePatsInExp p (Exp (HsNegApp s e))
= (Exp (HsNegApp s e'))
where
e' = rewritePatsInExp p e
| 109
|
rewritePatsInExp p (Exp (HsNegApp s e))
= (Exp (HsNegApp s e'))
where
e' = rewritePatsInExp p e
| 109
| false
| false
| 0
| 9
| 30
| 51
| 25
| 26
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.