code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Language.Sampler where
import Language.Syntax
import Language.Type
import Language.Inter
import Autolib.Util.Zufall
import Autolib.Util.Wort ( alle )
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Set
import Data.Typeable
import Data.List
dat... | Erdwolf/autotool-bonn | src/Language/Sampler.hs | gpl-2.0 | 1,807 | 0 | 17 | 558 | 463 | 248 | 215 | 46 | 2 |
module Lib.TimeIt
( timeIt
) where
import Data.Time (getCurrentTime, diffUTCTime, NominalDiffTime)
timeIt :: IO a -> IO (NominalDiffTime, a)
timeIt act = do
before <- getCurrentTime
res <- act
after <- getCurrentTime
return (after `diffUTCTime` before, res)
| nadavshemer/buildsome | src/Lib/TimeIt.hs | gpl-2.0 | 272 | 0 | 9 | 51 | 95 | 51 | 44 | 9 | 1 |
main = do
let l1 = [1,2,3,4]
print l1
let l2 = 5:l1
print l2
print $ l1 !! 1
print $ head l1
print $ tail l1
print $ last l1
print $ init l1
print $ length l1
print $ null l1
print $ null []
print $ null [[]]
print $ reverse l1
print $ take 3 l1
print $ ... | solvery/lang-features | haskell/list_2.hs | gpl-2.0 | 1,042 | 0 | 11 | 366 | 644 | 319 | 325 | 37 | 2 |
{-# LANGUAGE RankNTypes #-}
module Control.Monad.MaybeCPS where
-- IDEA: Use continuation passing style to get rid of pattern matching in
-- successful cases.
--
-- Didn't really work for the entailment check.
--
-- cf. http://www.haskell.org/haskellwiki/Performance/Monads
import Control.Monad
newtype MaybeCPS a = M... | meiersi/scyther-proof | src/Control/Monad/MaybeCPS.hs | gpl-3.0 | 828 | 0 | 14 | 196 | 209 | 113 | 96 | 13 | 1 |
{-# OPTIONS_GHC -w #-}
module GtkBlast.ROW_ROW_FIGHT_THE_POWER
(
i ,am ,playing ,the ,game
,the ,one ,that'll ,take ,me ,to ,my ,end
,i ,am ,waiting ,for ,the ,rain
,to ,wash ,up ,who ,i ,am
,libera ,me ,from ,S,osach
,{-ROW-}ROW__FIGHT_THE_POWER (DO)
,THE(..), I... | exbb2/BlastItWithPiss | src/GtkBlast/ROW_ROW_FIGHT_THE_POWER.hs | gpl-3.0 | 2,140 | 0 | 13 | 581 | 858 | 507 | 351 | -1 | -1 |
{- | The public face of Template Haskell
For other documentation, refer to:
<http://www.haskell.org/haskellwiki/Template_Haskell>
-}
module Language.Haskell.TH(
-- * The monad and its operations
Q,
runQ,
-- ** Administration: errors, locations and IO
reportError, -- :: String -> Q ()
reportWarning, ... | jwiegley/ghc-release | libraries/template-haskell/Language/Haskell/TH.hs | gpl-3.0 | 4,547 | 96 | 5 | 963 | 1,074 | 734 | 340 | 80 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
import Prelude hiding (minimum,
maximum,
min,
Left,
Right)
import Data.Int
import Data.Maybe
import Data.Char
import Debug.Trac... | zakharvoit/discrete-math-labs | Season2/BinaryTrees/Tree23/Tree23.hs | gpl-3.0 | 8,844 | 32 | 12 | 2,994 | 4,052 | 2,013 | 2,039 | 235 | 4 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, BangPatterns #-}
module Sound.Tidal.Core where
import Prelude hiding ((<*), (*>))
import Data.Fixed (mod')
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe)
import Sound.Tidal.Pattern
-- ** Elemental pa... | d0kt0r0/Tidal | src/Sound/Tidal/Core.hs | gpl-3.0 | 21,476 | 0 | 18 | 5,060 | 8,385 | 4,274 | 4,111 | 538 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-|
Most data types are defined here to avoid import cycles.
Here is an overview of the hledger data model:
> Journal -- a journal is read from one or more data files. It contains..
> [Transaction] -- journal transactions (aka entries), which have date, ... | Lainepress/hledger | hledger-lib/Hledger/Data/Types.hs | gpl-3.0 | 8,735 | 0 | 16 | 2,351 | 1,262 | 774 | 488 | 124 | 0 |
{- |
Module : Tct.Method.Matrix.ArcticMI
Copyright : (c) Martin Avanzini <martin.avanzini@uibk.ac.at>,
Georg Moser <georg.moser@uibk.ac.at>,
Andreas Schnabl <andreas.schnabl@uibk.ac.at>
License : LGPL (see COPYING)
Maintainer : Andreas Schnabl <andreas.schnabl@uibk.ac.a... | mzini/TcT | source/Tct/Method/Matrix/ArcticMI.hs | gpl-3.0 | 20,450 | 0 | 20 | 6,315 | 5,853 | 3,006 | 2,847 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module NetService.PlotChart
where
import Control.Lens
import Data.Colour
import Data.Colour.Names
import Data.Default.Class
import qualified Data.Maybe as Maybe
import qualified Data.Time ... | ak1211/tractor | src/NetService/PlotChart.hs | agpl-3.0 | 2,487 | 0 | 22 | 777 | 614 | 321 | 293 | -1 | -1 |
module Fusc where
fusc :: Int -> Int
fusc 0 = 0
fusc 1 = 1
fusc n
|even n = fusc $ div n 2
|otherwise = (fusc $ div n 2) + (fusc $ 1 + div n 2)
--
| ice1000/OI-codes | codewars/authoring/haskell/Fusc.hs | agpl-3.0 | 155 | 0 | 9 | 50 | 97 | 48 | 49 | 7 | 1 |
module HLol.API.Stats (
getRankedStats,
getSummaries
) where
import HLol.Data.Stats (RankedStatsDto, PlayerStatsSummaryListDto)
import HLol.Network.Rest
getRankedStats :: Int -> IO (Either LolError RankedStatsDto)
getRankedStats summonerId = get $ "/v1.3/stats/by-summoner/" ++ show summonerId ++ "/ranked"... | tetigi/hlol | src/HLol/API/Stats.hs | agpl-3.0 | 484 | 0 | 8 | 66 | 121 | 65 | 56 | 9 | 1 |
module Main where
import qualified AG.J2SAttrSem as AGS
import System.Environment
import UU.Parsing
import J2s.Parser
import J2s.Scanner
import UU.Scanner.Position
import Data.String.Utils
-- AST generation
{-
main :: IO()
main = do
g <- readJavaFile
putStrLn (show g)
readJavaFile = do
[path] <- g... | andreagenso/java2scala | src/Main.hs | apache-2.0 | 1,006 | 0 | 12 | 236 | 205 | 106 | 99 | 22 | 1 |
module Tables.A268978 (a268978) where
import Data.List (genericLength)
import Helpers.Table (triangleByRows)
import Tables.A007318 (a007318_row)
a268978 :: Integer -> Integer
a268978 i = a268978_t n k where
(n, k) = (n' + 1, k' + 1)
(n', k') = triangleByRows (i - 1)
a268978_t :: Integer -> Integer -> Integer
a268... | peterokagey/haskellOEIS | src/Tables/A268978.hs | apache-2.0 | 467 | 0 | 9 | 83 | 184 | 101 | 83 | 12 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Hrpg.Framework.Mobs.Mob
( Mob (..)
, mobCombatData
, isMobDead
, spawnMob
) where
import Control.Monad
import Control.Monad.Random
import Data.Text
import Data.UUID
import Hrpg.Framework.Combat.CombatData
impor... | cwmunn/hrpg | src/Hrpg/Framework/Mobs/Mob.hs | bsd-3-clause | 1,888 | 0 | 12 | 438 | 560 | 306 | 254 | 59 | 2 |
module LambdaQuest.SystemF.Parse where
import LambdaQuest.SystemF.Type
import Text.Parsec
import qualified Text.Parsec.Token as PT
import Data.List (elemIndex)
import Data.Foldable (foldl')
import Data.Void
import qualified LambdaQuest.Common.Parse as CP
type Parser = Parsec String ()
class ExtraTypeParser x where
... | minoki/LambdaQuest | src/LambdaQuest/SystemF/Parse.hs | bsd-3-clause | 7,340 | 0 | 16 | 2,738 | 1,959 | 992 | 967 | 146 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module CacheDNS.APP.CmdParser
( parseConfigOptions
) where
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
import Control.Applicative
import Control.Exception (Exception, IOException, catch)
import Data.Monoid ((<>... | DavidAlphaFox/CacheDNS | app/CacheDNS/APP/CmdParser.hs | bsd-3-clause | 1,945 | 0 | 15 | 607 | 508 | 275 | 233 | 45 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import System.IO
import Text.XML.Pipe
import Network
import Network.PeyoTLS.ReadFile
import Network.XmlPush.HttpPull.Tls.Client
import TestPusher
main :: IO ()
main = do
h <- connectTo "localhost" $ PortNumber 443
ca <- readCertificateStore ["certs/cacert.sample_pem"]
k <- readK... | YoshikuniJujo/xml-push | examples/httpPullTlsCl.hs | bsd-3-clause | 1,240 | 8 | 13 | 202 | 519 | 269 | 250 | 33 | 1 |
module Main where
import System.Environment (getArgs, getProgName)
import Control.Exception (bracketOnError)
import System.IO (openTempFile, Handle, hClose, hPutStr, hFlush, stdout)
import System.Directory (removeFile, renameFile, doesFileExist, createDirectoryIfMissing, getHomeDirectory)
import Data.List (delete)
imp... | asayers/TaskAgent | todo.hs | bsd-3-clause | 4,973 | 0 | 16 | 1,206 | 1,382 | 712 | 670 | 107 | 6 |
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.UI.SDL.Framerate
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
-----------------------... | joelburget/sdl2-gfx | Graphics/UI/SDL/Framerate.hs | bsd-3-clause | 1,926 | 0 | 13 | 363 | 397 | 211 | 186 | -1 | -1 |
module Math.LinearAlgebra.Sparse.Algorithms
(
-- ** Staircase form
module Math.LinearAlgebra.Sparse.Algorithms.Staircase
-- ** Diagonal form
, module Math.LinearAlgebra.Sparse.Algorithms.Diagonal
-- ** Solving linear systems (in integer domain)
, module Math.LinearAlgebra.Sparse.Algorithms.SolveLinear
)
where
import... | laughedelic/sparse-lin-alg | Math/LinearAlgebra/Sparse/Algorithms.hs | bsd-3-clause | 477 | 0 | 5 | 38 | 64 | 49 | 15 | 8 | 0 |
{-#LANGUAGE TypeSynonymInstances#-}
-----------------------------------------------------------------------------
--
-- Module : Language.Haskell.Pretty.AnnotatedPretty
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- | Pretty Printting for the anno... | emcardoso/CTi | src/Haskell/Pretty/AnnotatedPretty.hs | bsd-3-clause | 14,573 | 198 | 18 | 3,095 | 5,343 | 2,621 | 2,722 | 312 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module Text.Md.ParseUtils (
spaceChar
, skipSpaces
, newlineQuote
, blankline
, blanklines
)
where
import Data.Maybe
import Debug.Trace
import Control.Monad
import Text.Parsec (Stream, ParsecT, (<|>))
import qualified Text.Parsec as P
import qualified Te... | tiqwab/md-parser | src/Text/Md/ParseUtils.hs | bsd-3-clause | 1,642 | 0 | 17 | 309 | 433 | 230 | 203 | 31 | 1 |
module DeepBanana.Layer.CUDA.Numeric (
llog
, inv
, lexp
, scale
, scaleByCst
, scaleByCst_
, multiply
, add
, add_
) where
import DeepBanana.Device
import DeepBanana.Layer
import DeepBanana.Layer.CUDA.Monad
import DeepBanana.Prelude
import DeepBanana.Tensor
-- elementwise log (useful for cost f... | alexisVallet/deep-banana | src/DeepBanana/Layer/CUDA/Numeric.hs | bsd-3-clause | 3,346 | 0 | 24 | 898 | 1,436 | 748 | 688 | -1 | -1 |
module Lava.Stable where
import Lava.Signal
import Lava.Operators
import Lava.Generic
import Lava.Sequent
import Lava.Ref
import Lava.MyST
( STRef
, newSTRef
, readSTRef
, writeSTRef
, runST
, unsafeInterleaveST
)
import Data.List
( isPrefixOf
)
----------------------------------------------------... | dfordivam/lava | Lava/Stable.hs | bsd-3-clause | 1,318 | 0 | 22 | 471 | 381 | 185 | 196 | 39 | 4 |
module A
where
aString :: String
aString = "test string"
| 23Skidoo/ghc-parmake | tests/data/executable/A.hs | bsd-3-clause | 65 | 0 | 4 | 18 | 14 | 9 | 5 | 3 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.ShaderAtomicCounters
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : por... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/ShaderAtomicCounters.hs | bsd-3-clause | 2,006 | 0 | 4 | 172 | 133 | 96 | 37 | 33 | 0 |
{-# language CPP #-}
-- No documentation found for Chapter "PipelineCacheCreateFlagBits"
module Vulkan.Core10.Enums.PipelineCacheCreateFlagBits ( PipelineCacheCreateFlags
, PipelineCacheCreateFlagBits( PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT
... | expipiplus1/vulkan | src/Vulkan/Core10/Enums/PipelineCacheCreateFlagBits.hs | bsd-3-clause | 3,080 | 1 | 10 | 684 | 338 | 205 | 133 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.PrettyPrint.Annotated.HughesPJClass
-- Copyright : (c) Trevor Elliott <revor@galois.com> 2015
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : David Terei <code@davidterei.com>
-- Stabilit... | ddssff/pretty-listlike | src/Text/PrettyPrint/Annotated/HughesPJClass.hs | bsd-3-clause | 4,886 | 0 | 10 | 1,059 | 1,698 | 919 | 779 | 79 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module DragonCurve (
main
, benchDiagram
) where
import Diagrams.Backend.SVG.CmdLine
import Diagrams.Prelude
import Diagrams.TwoD.Vector
data Tok = F | P | M | X | Y deriving (Eq, Show)
rewriteFunction :: Tok -> [Tok]
rewriteFunction X = [X, P, Y, F, ... | diagrams/diagrams-bench | examples/DragonCurve.hs | bsd-3-clause | 977 | 0 | 9 | 218 | 435 | 244 | 191 | 26 | 4 |
{-# LANGUAGE TypeFamilies, QuasiQuotes, OverloadedStrings, PackageImports #-}
import System.IO
import Control.Arrow
import Text.Papillon
import Data.Char
import "monads-tf" Control.Monad.State
type TagIO = StateT ([Xml], [(Name, Attrs)]) IO
readHandle :: Handle -> TagIO [Xml]
readHandle h = do
c <- liftIO $ hGetCha... | YoshikuniJujo/forest | subprojects/xml/testXml.hs | bsd-3-clause | 3,077 | 4 | 21 | 724 | 1,038 | 530 | 508 | 71 | 5 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.PackageDescription.Parse
-- Copyright : Isaac Jones 2003-2005
-- License : BSD3
--
-- Maintainer : cabal-dev... | kolmodin/cabal | Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | 55,753 | 333 | 19 | 17,366 | 11,589 | 6,276 | 5,313 | 883 | 26 |
module Yawn.Configuration (
Configuration,
port,
host,
defaultIndexFile,
requestTimeOut,
keepAliveTimeOut,
socketBufSize,
maxClients,
showIndex,
defaultMimeType,
serverName,
serverVersion,
mimeFile,
logRoot,
publicRoot,
loadConfig
) where
import System.IO (hPutStrLn, stderr)
import Yawn... | ameingast/yawn | src/Yawn/Configuration.hs | bsd-3-clause | 2,844 | 0 | 11 | 894 | 744 | 394 | 350 | 68 | 2 |
--
-- Adapted from K-Means sample from "Parallel and Concurrent Programming in
-- Haskell", (c) Simon Marlow, 2013.
--
module TestCore where
import Data.List
import Data.Word
-- -----------------------------------------------------------------------------
-- Points
type Point = (Double, Double)
zeroPoint :: Point
... | tmcdonell/accelerate-kmeans | test/TestCore.hs | bsd-3-clause | 767 | 0 | 8 | 131 | 195 | 115 | 80 | 15 | 1 |
module Tests where
| maoe/text-keepalived | tests/Tests.hs | bsd-3-clause | 22 | 0 | 2 | 6 | 4 | 3 | 1 | 1 | 0 |
module FruitShopKata.Day4 (process) where
type Bill = (Money, [Product])
type Money = Int
type Product = String
process :: [Product] -> [Money]
-- process = map fst . tail . scanl addProduct (0, [])
process products = map fst (tail (scanl addProduct (0, []) products))
whe... | Alex-Diez/haskell-tdd-kata | old-katas/src/FruitShopKata/Day4.hs | bsd-3-clause | 1,349 | 0 | 19 | 569 | 372 | 205 | 167 | 22 | 3 |
main = let
x =
y = 3
in 4 | roberth/uu-helium | test/parser/PositionInsertedBrace2.hs | gpl-3.0 | 37 | 1 | 9 | 21 | 23 | 10 | 13 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Text.XmlHtml.XML.Parse where
import Control.Applicative
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import Text.XmlHtml.Common
import Text.XmlHtml.TextParser
import qualified T... | 23Skidoo/xmlhtml | src/Text/XmlHtml/XML/Parse.hs | bsd-3-clause | 22,675 | 0 | 19 | 8,010 | 5,380 | 2,642 | 2,738 | 356 | 37 |
-- |
-- Module : Data.Hourglass.Internal.Unix
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- Time lowlevel helpers for the unix operating system
--
-- depend on localtime_r and gmtime_r.
-- Some obscure unix system might ... | ppelleti/hs-hourglass | Data/Hourglass/Internal/Unix.hs | bsd-3-clause | 5,804 | 0 | 16 | 1,533 | 1,244 | 666 | 578 | 104 | 2 |
module Language.Ava.TypeCheck.Composable where
class (Composeable a) where
comp :: a -> a -> Bool
| owainlewis/ava | src/Language/Ava/TypeCheck/Composable.hs | bsd-3-clause | 101 | 2 | 7 | 17 | 28 | 17 | 11 | 3 | 0 |
{-# LANGUAGE BangPatterns #-}
module Common.World
( World(..)
, advanceWorld)
where
import Common.Body
import qualified Data.Vector.Unboxed as V
data World
= World
{ -- | Bodies in the simulation.
worldBodies :: !(V.Vector Body)
-- | Number of steps taken in the simulation so far.
, worldSteps :: !Int }... | mainland/dph | dph-examples/examples/real/NBody/Common/World.hs | bsd-3-clause | 1,002 | 50 | 16 | 220 | 272 | 155 | 117 | 33 | 1 |
{-# LANGUAGE StrictData #-}
--------------------------------------------------------------------------------
-- |
-- Module : HEP.Data.HepMC.Type
-- Copyright : (c) 2017 Chan Beom Park
-- License : BSD-style
-- Maintainer : Chan Beom Park <cbpark@gmail.com>
-- Stability : experimental
-- Portability... | cbpark/hep-kinematics | src/HEP/Data/HepMC/Type.hs | bsd-3-clause | 8,986 | 0 | 12 | 4,498 | 1,106 | 710 | 396 | 103 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Haddock
-- Copyright : (c) Andrea Vezzosi 2009
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- Interfacing with Haddock
--
----------------... | jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/Haddock.hs | gpl-3.0 | 4,208 | 2 | 19 | 1,084 | 939 | 511 | 428 | 75 | 4 |
module Settings.Builders.Ghc (ghcBuilderArgs, haddockGhcArgs) where
import Hadrian.Haskell.Cabal
import Hadrian.Haskell.Cabal.Type
import Flavour
import Packages
import Settings.Builders.Common
import Settings.Warnings
ghcBuilderArgs :: Args
ghcBuilderArgs = mconcat [compileAndLinkHs, compileC, findHsDependencies]
... | snowleopard/shaking-up-ghc | src/Settings/Builders/Ghc.hs | bsd-3-clause | 5,006 | 0 | 15 | 1,602 | 1,269 | 667 | 602 | 114 | 2 |
module Fun00013 where
data Manifest sh a = Syntax a => Manifest (Data [Internal a]) (Data [Length])
| charleso/intellij-haskforce | tests/gold/parser/Fun00013.hs | apache-2.0 | 101 | 0 | 10 | 18 | 45 | 25 | 20 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sr-CS">
<title>Advanced SQLInjection Scanner</title>
<maps>
<homeID>sqliplugin</homeID>
... | kingthorin/zap-extensions | addOns/sqliplugin/src/main/javahelp/help_sr_CS/helpset_sr_CS.hs | apache-2.0 | 981 | 77 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
{-# Language LambdaCase #-}
module Main where
import Common
import Control.Monad
import Text.Megaparsec
import Text.Megaparsec.Char
main :: IO ()
main =
do xs <- lines <$> readInputFile 9
print (sum (map decode1 xs))
print (sum (map decode2 xs))
decode1 :: String -> Int
decode1 = mkDecode (\n xs -> n * l... | glguy/advent2016 | Day09.hs | isc | 829 | 0 | 12 | 238 | 289 | 149 | 140 | 24 | 1 |
module System.Posix.FileLock (lock,unlock,withLock,FileLock,LockType(..)) where
import Control.Exception (bracket)
import Control.Monad.IO.Class (MonadIO(..), liftIO)
import qualified System.Posix.Files as Posix
import qualified System.Posix.IO as Posix
import qualified System.Posix.Types as Posix
import System.IO
da... | singpolyma/posix-filelock-haskell | System/Posix/FileLock.hs | isc | 1,436 | 2 | 11 | 243 | 445 | 245 | 200 | 28 | 3 |
{
module Lexer (
Token(..),
scanTokens
) where
import Syntax
}
%wrapper "basic"
$digit = 0-9
$alpha = [a-zA-Z]
$eol = [\n]
$ordinal = first | second | third | fourth | fifth | sixth | seventh | eighth | ninth | tenth | eleventh | twelfth | thirteenth | fourteenth | fifteenth | sixteenth
tokens :-
'Let the ... | JohnKossa/Contractual-C | Lexer.hs | mit | 2,280 | 18 | 8 | 879 | 273 | 232 | 41 | -1 | -1 |
import Data.List
import Data.Char
import System.IO
import System.Environment
import Control.Monad
import qualified Data.Map.Strict as Map
import Data.Map.Strict ( Map )
import qualified Data.Text as Text
import Data.Text ( Text )
import Data.Either (partitionEithers)
import Data.Ord (comparing)
import IgrepCashbook2
... | igrep/igrep-cashbook | hs/sum.hs | mit | 2,566 | 0 | 16 | 536 | 939 | 471 | 468 | 64 | 1 |
-- |
-- Module: Math.NumberTheory.Primes.FactorisationTests
-- Copyright: (c) 2017 Andrew Lelechenko
-- Licence: MIT
-- Maintainer: Andrew Lelechenko <andrew.lelechenko@gmail.com>
-- Stability: Provisional
--
-- Tests for Math.NumberTheory.Primes.Factorisation
--
{-# OPTIONS_GHC -fno-warn-type-defaults #... | cfredric/arithmoi | test-suite/Math/NumberTheory/Primes/FactorisationTests.hs | mit | 4,213 | 0 | 17 | 547 | 1,623 | 1,003 | 620 | 64 | 1 |
-- | procedural level generation (from https://jeremykun.com/2012/07/29/the-cellular-automaton-method-for-cave-generation/)
module Cave where
import CellularAutomata2D
import GUI
main :: IO ()
main = randomSpace (100, 100) [True, False] >>= runCellularAutomata2D caveRule >> return ()
caveRule :: Rule Bool
caveRule =... | orion-42/cellular-automata-2d | Cave.hs | mit | 429 | 0 | 8 | 53 | 115 | 63 | 52 | 9 | 1 |
import Data.List (findIndex)
-- combination nCr
comb :: Integral a=>a->a->a
comb n r | d>0 = (s n (r-d))`div`(s (r-d) (r-d-1))
| otherwise= (s n r) `div`(s r (r-1)) where
s = subpower
d = 2*r-n
-- i * i-1 * ... * i-j+i
subpower :: Integral a=>a->a->a
subpower i j = product [i,i-1..i-j+1]
-- max:... | yuto-matsum/contest-util-hs | src/Euler/053.hs | mit | 525 | 0 | 11 | 112 | 286 | 152 | 134 | 10 | 1 |
{-# LANGUAGE StandaloneDeriving, FlexibleInstances #-}
module Derivation where
import qualified Prelude as P
import Lib
import qualified Data.List as L
c2hl :: List a -> [a]
c2hl Nil = []
c2hl (Cons x xs) = x : (c2hl xs)
deriving instance (P.Eq Cand)
deriving instance (P.Ord Cand)
deriving instance (P.Show Cand)
deri... | mukeshtiwari/formalized-voting | SchulzeCounting/Derivation.hs | mit | 4,639 | 1 | 22 | 1,062 | 2,479 | 1,247 | 1,232 | 89 | 3 |
{-# htermination (last :: (List a) -> a) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
last :: (List a) -> a;
last (Cons x Nil) = x;
last (Cons vv xs) = last xs;
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/last_1.hs | mit | 221 | 0 | 8 | 56 | 90 | 50 | 40 | 6 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.PluginArray
(item, item_, itemUnsafe, itemUnchecked, namedItem, namedItem_,
namedItemUnsafe, namedItemUnc... | ghcjs/jsaddle-dom | src/JSDOM/Generated/PluginArray.hs | mit | 4,043 | 0 | 14 | 618 | 998 | 565 | 433 | -1 | -1 |
-----------------------------------------------------------------------------
-- Copyright : (c) Hanzhong Xu, Meng Meng 2016,
-- License : MIT License
--
-- Maintainer : hanzh.xu@gmail.com
-- Stability : experimental
-- Portability : portable
---------------------------------------------------------------... | PseudoPower/AFSM | draft/testIOSF.hs | mit | 1,274 | 0 | 11 | 242 | 300 | 153 | 147 | 29 | 1 |
module SolutionsTo50
( solutionsTo50
) where
import System.IO
import Data.List
import Control.Applicative
import MyMath.Fibonacci
import Util.Misc (isPalindromic)
import Data.Char
solutionsTo50 :: Int -> IO ()
solutionsTo50 n = do
putStr $ "The solution to problem " ++ show n ++ " is "
solutionsTo50_ n
solu... | james-ralston/project-euler | src/SolutionsTo50.hs | mit | 4,094 | 0 | 23 | 1,290 | 1,102 | 553 | 549 | 84 | 2 |
module SudokuSorted where
import Data.List
numlist = [1..9]
allp (i,j) = concat [block,line,col]
where block = [(i + dx - mod i 3,j + dy - mod j 3) |dx<-[0..2],dy<-[0..2]]
line = [(i,dy)| dy <- [0..9]]
col = [(dx,j)| dx<-[0..9]]
get pos all = (map head).group.sort $ [ k | (xy,k)<- all, elem ... | ztuowen/sudoku | SudokuSorted.hs | mit | 1,193 | 0 | 13 | 302 | 769 | 421 | 348 | 25 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Unison.Symbol where
import Data.Text (Text)
import GHC.Generics
import Unison.Var (Var(..))
import qualified Data.Set as Set
import qualified Data.Text as Text
data Symbol = Symbol !Word Text deriving (Generic)... | paulp/unison | parser-typechecker/src/Unison/Symbol.hs | mit | 1,261 | 0 | 13 | 266 | 548 | 283 | 265 | 35 | 1 |
{-# LANGUAGE CPP #-}
module Main where
import Prelude hiding (div,id,span)
import Transient.Base
#ifdef ghcjs_HOST_OS
hiding ( option)
#endif
import GHCJS.HPlay.View
#ifdef ghcjs_HOST_OS
hiding (map)
#else
hiding (map, option)
#endif
import Transient.Move
import Transient.Indeterminism
i... | geraldus/transient-universe | examples/webapp.hs | mit | 3,749 | 0 | 18 | 1,345 | 808 | 395 | 413 | 78 | 2 |
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Math.Symbolic.Expression where
import Data.Word
import Data.Maybe
import Data.List
import Data.Ratio
import Data.String
import Data.Monoid
import Data.Generics (Typeable, Data)
import Control.Arrow
import qualified Data.Text as T
import Data.Text (Text)
... | NatureShade/SymbolicHaskell | src/Math/Symbolic/Expression.hs | mit | 3,616 | 0 | 14 | 1,017 | 1,979 | 1,001 | 978 | 97 | 4 |
module Main where
import Data.List
newline str = str ++ "\n"
main =
interact (newline . show . length . words)
| dicander/progp_haskell | word_count_simple.hs | mit | 117 | 0 | 9 | 27 | 44 | 24 | 20 | 5 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
import qualified Bonlang as B
import Bonlang.Lang
import Bonlang.Lexer
import Control.Monad.Except
import ... | charlydagos/bonlang | test/Spec.hs | mit | 6,488 | 2 | 14 | 2,026 | 1,260 | 653 | 607 | 102 | 2 |
module HasseTree where
import Data.List
type ItemSet = [String] -- an item set is a collection of items, which are identified with strings
type Item = String
-- a node in the Hasse diagram search tree contains an item, a counter for the support of the item set that is
-- constructed by traversing the tree to this... | gaetjen/FunFreakyPatMan | src/HasseTree.hs | mit | 3,525 | 0 | 11 | 581 | 1,118 | 583 | 535 | 52 | 1 |
{-# LANGUAGE NullaryTypeClasses #-}
module Algorithms.Data
where
import Geometry
class Algorithm d where
algorithmVisualize :: d -> IO [Point2D]
algorithmWindowTitle :: d -> String
| CGenie/haskell-algorithms | src/Algorithms/Data.hs | gpl-2.0 | 195 | 0 | 9 | 38 | 43 | 24 | 19 | 6 | 0 |
{-
Given: Two positive integers a and b (a<b<10000).
Return: The sum of all odd integers from a through b, inclusively.
-}
a = 100
b = 200
sumOdd a b = sum $ filter odd [a..b]
main = do
print $ sumOdd a b
| forgit/Rosalind | ini4.hs | gpl-2.0 | 209 | 2 | 8 | 49 | 59 | 27 | 32 | 5 | 1 |
{-# LANGUAGE DeriveDataTypeable, MultiParamTypeClasses #-}
module Baum.RedBlack
( make_quiz )
where
-- $Id$
import Baum.RedBlack.Type
import Baum.RedBlack.Ops
import Baum.RedBlack.Show
import qualified Baum.Such.Class as C
import qualified Baum.Such.Central
import qualified Tree as T
import Autolib.ToDoc
import... | Erdwolf/autotool-bonn | src/Baum/RedBlack.hs | gpl-2.0 | 943 | 0 | 7 | 162 | 231 | 135 | 96 | 29 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module DB where
import Data.Int
import Data.Maybe
import Control.Applicative
import qualified Data.Text.Lazy as T
import qualified Data.Text as TT (concat)
import Database.SQLite.Simple
import Database.SQLite.Simple.FromField
import ... | jgalat0/tictactoe | src/DB.hs | gpl-3.0 | 6,075 | 0 | 23 | 1,988 | 1,896 | 940 | 956 | 160 | 3 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
module Lamdu.GUI.ExpressionEdit.CaseEdit
( make
) where
import Prelude.Compat
import qualified Control.Lens as Lens
import Control.Lens.Operators
import Control.Lens.Tuple
import Control.MonadA (MonadA)
import qualif... | rvion/lamdu | Lamdu/GUI/ExpressionEdit/CaseEdit.hs | gpl-3.0 | 8,582 | 0 | 23 | 2,493 | 2,203 | 1,146 | 1,057 | -1 | -1 |
module Hazel.CoreSpec (spec)
where
import Test.Hspec
import Hazel.Core ()
import Hazel.TestCases
spec :: Spec
spec = describe "Show instances" $ do
it "shows plain role names" $
show role `shouldBe` "hasChild"
it "shows plain concept names" $
show top `shouldBe` "Thing"
it "shows conjuctions" $
... | hazel-el/hazel | test/Hazel/CoreSpec.hs | gpl-3.0 | 673 | 0 | 10 | 135 | 160 | 81 | 79 | 18 | 1 |
{-# LANGUAGE CPP #-}
module Data.AtFieldTH (make) where
import qualified Data.Char as Char
import qualified Data.List as List
import Language.Haskell.TH.Syntax
make :: Name -> Q [Dec]
make typeName = do
TyConI typeCons <- reify typeName
(makeAtName, typeVars, ctor) <-
case typeCons of
Data... | nimia/bottle | bottlelib/Data/AtFieldTH.hs | gpl-3.0 | 4,991 | 0 | 15 | 1,083 | 1,567 | 803 | 764 | 87 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
module Command where
import System.Console.CmdArgs
data HPythia8Generate = Generate { config :: FilePath }
deriving (Show,Data,Typeable)
generate :: HPythia8Generate
generate = Generate { config = "HPythia8.conf" }
mode :: HPythia8Generate
mode = modes [generate]
... | wavewave/HPythia8-generate | exe/Command.hs | gpl-3.0 | 321 | 0 | 8 | 59 | 75 | 45 | 30 | 9 | 1 |
-- searchable spaces, based on code by Martin Escardo
module Searchable where
data Searchable a = Finder ((a -> Bool) -> a)
find :: Searchable a -> (a -> Bool) -> a
find (Finder epsilon) p = epsilon p
-- auxiliary function search
search :: Searchable a -> (a -> Bool) -> Maybe a
search s p =
let x = find s p
... | aljosaVodopija/eksaktnaRealna | Searchable.hs | gpl-3.0 | 1,942 | 0 | 16 | 608 | 748 | 383 | 365 | 38 | 4 |
module Herguis.Setup(buildInterface) where
import Control.Monad
import Control.Monad.Trans(liftIO)
import Data.IORef
import Data.List
import Data.Tree
import Data.Time.Clock
import Graphics.UI.Gtk
import Graphics.UI.Gtk.SourceView
import Text.Printf
import qualified Herguis.Action as Action
import Herguis.Entities
s... | mgmillani/herguis | Herguis/Setup.hs | gpl-3.0 | 6,669 | 4 | 18 | 899 | 1,920 | 902 | 1,018 | 146 | 2 |
{-# LANGUAGE ForeignFunctionInterface
, EmptyDataDecls
#-}
module Rollsum where
import Data.Word
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.ByteString.Internal as BI
import Foreign
import Foreign.C
blobModulo = 16383
foreign import ccall uns... | br0ns/hindsight | src/Rollsum.hs | gpl-3.0 | 2,355 | 0 | 18 | 607 | 832 | 421 | 411 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games-management/gen/Network/Google/Resource/GamesManagement/Quests/ResetForAllPlayers.hs | mpl-2.0 | 3,385 | 0 | 13 | 718 | 314 | 194 | 120 | 51 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Deactivate.hs | mpl-2.0 | 7,008 | 0 | 18 | 1,587 | 951 | 559 | 392 | 129 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Instances/TestIAMPermissions.hs | mpl-2.0 | 4,543 | 0 | 18 | 1,061 | 550 | 326 | 224 | 90 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-iam/gen/Network/AWS/IAM/CreateUser.hs | mpl-2.0 | 4,370 | 0 | 13 | 950 | 638 | 385 | 253 | 79 | 1 |
-- Copyright (C) 2017 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library i... | dashea/bdcs | importer/Import/URI.hs | lgpl-2.1 | 2,200 | 0 | 11 | 457 | 352 | 202 | 150 | 27 | 1 |
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
import Control.Monad
import Data.Map as Map hiding (map)
import Numeric
import Data.Char
main = getArgs >>= putStrLn . show . eval . readExpr . (!!0)
readExpr :: String -> LispVal
readExpr input = case parse parseExpr "lisp" input of
... | spockwangs/scheme.in.haskell | list4.2.hs | unlicense | 4,857 | 0 | 14 | 1,797 | 1,453 | 727 | 726 | 123 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
module X02 where
import Protolude
-- http://dev.stephendiehl.com/hask/#phantom-types
-- newtypes to distinguish between plaintext and cryptotext
newtype PlaintextNT = PlaintextNT Text
newtype CryptotextNT = CryptotextNT Text
data Key = Key
encryptNT :: Key -> Plaint... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/phantoms/hc-phantom/src/X02.hs | unlicense | 930 | 0 | 7 | 169 | 196 | 107 | 89 | -1 | -1 |
import Control.Monad
import Data.Bits
import Data.List (foldl')
makeSlice l r =
let blockN n = div n 4
makeBlock n = [n * 4, 1, (n * 4) + 3, 0]
lBlock = drop (mod l 4) $ makeBlock $ blockN l
rBlock = take (1 + (mod r 4)) $ makeBlock $ blockN r
blockDiff = (blockN r) - (blockN l)
... | itsbruce/hackerrank | alg/bits/xorSequence.hs | unlicense | 879 | 0 | 15 | 301 | 440 | 218 | 222 | 25 | 1 |
module TypesClasses where
addThree :: Int -> Int -> Int -> Int
addThree x y z = x + y + z
factorial :: Integer -> Integer
factorial n = product [1..n]
circumference :: Float -> Float
circumference r = 2 * pi * r
circumference' :: Double -> Double
circumference' r = 2 * pi * r
-- :t read
-- read :: Read a => Str... | mboogerd/hello-haskell | src/lyah/TypesClasses.hs | apache-2.0 | 640 | 0 | 7 | 137 | 122 | 67 | 55 | 9 | 1 |
{-
Copyright 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to ... | deepmind/logical-entailment-dataset | Main.hs | apache-2.0 | 32,522 | 1 | 22 | 6,636 | 13,798 | 6,949 | 6,849 | 659 | 6 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module AndroidLintSummary.CLI where
import BasicPrelude hiding (fromString)
import AndroidLintSummary
import Control.Lens ((^.))
import Options.Applicative
import Ra... | VikingDen/android-lint-summary | src/AndroidLintSummary/CLI.hs | apache-2.0 | 2,685 | 0 | 18 | 921 | 625 | 323 | 302 | 57 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : Base.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:34
Warning : this file is machine generated - do not modi... | keera-studios/hsQt | Qtc/Classes/Base.hs | bsd-2-clause | 928 | 0 | 8 | 157 | 153 | 98 | 55 | 19 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Module : Data.Array.Nikola.Backend.CUDA.Haskell.Compile
-- Copyright : (c) Geoffrey Mainland 2012
-- License : BSD-style
--
-- Maintainer : Geoffrey Mainland <mainland@apeiron.net>
-- Stability ... | mainland/nikola | src/Data/Array/Nikola/Backend/CUDA/Haskell/Compile.hs | bsd-3-clause | 11,273 | 0 | 15 | 3,556 | 4,121 | 2,063 | 2,058 | -1 | -1 |
f = head
g = f [f]
--a x y = x + y
h = f | happlebao/Core-Haskell | Hello.hs | bsd-3-clause | 42 | 0 | 6 | 18 | 23 | 13 | 10 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module RunIdea
( exportEnvVars,
JavaVersion(Java7, Java8),
IdeaVersion(Idea14, Idea15)
) where
import Turtle
import Data.Maybe
import Prelude hiding (FilePath)
data JavaVersion
= Java7
| Java8
data IdeaVersion
= Idea14
| Idea15
exportEnvVars ::... | DPakJ989/d-env | src/RunIdea.hs | bsd-3-clause | 1,267 | 0 | 12 | 294 | 349 | 176 | 173 | 43 | 2 |
-- |
-- Copyright : (C) 2012-2013 Parallel Scientific Labs, LLC.
-- License : BSD3
--
-- Support for managing pools of CCI transfer buffers.
{-# LANGUAGE ForeignFunctionInterface #-}
module Network.Transport.CCI.Pool
( Pool
, PoolRef
, Buffer(bHandle)
, newPool
, freePool
, newBuffer
, freeBuffer
, g... | haskell-distributed/network-transport-cci | src/Network/Transport/CCI/Pool.hs | bsd-3-clause | 11,412 | 82 | 23 | 3,210 | 2,731 | 1,482 | 1,249 | 203 | 7 |
--------------------------------------------------------------------------------
-- |
-- Module : Sequence.Fasta
-- Copyright : (c) [2009..2010] Trevor L. McDonell
-- License : BSD
--
-- Reading sequence data in the FASTA format. Each sequence consists of a head
-- (prefixed by a ''>'') and a set of lines containi... | tmcdonell/hfx | src/haskell/Sequence/Fasta.hs | bsd-3-clause | 1,862 | 0 | 12 | 441 | 279 | 171 | 108 | 19 | 2 |
{-# LANGUAGE OverloadedStrings, StandaloneDeriving #-}
module Web.Neo (
-- * Run Neo Actions
runNeoT,defaultRunNeoT,NeoT,NeoError(..),
Hostname,Port,
-- * Basic Types
Node(..),Edge(..),Properties,Label,
-- * Create Nodes and Edges
newNode,setNodeProperty,addNodeLabel,
newEdge,setEdgeProp... | phischu/haskell-neo | src/Web/Neo.hs | bsd-3-clause | 747 | 0 | 5 | 147 | 145 | 100 | 45 | 15 | 0 |
--
-- Utils.hs
-- Copyright (C) 2017 jragonfyre <jragonfyre@jragonfyre>
--
-- Distributed under terms of the MIT license.
--
module Utils
( allValues
) where
allValues :: (Bounded a, Enum a) => [a]
allValues = [minBound..]
| jragonfyre/TRPG | src/Utils.hs | bsd-3-clause | 232 | 0 | 6 | 45 | 46 | 30 | 16 | 4 | 1 |
{-# LANGUAGE MultiParamTypeClasses
,FlexibleInstances
,TypeSynonymInstances
,TemplateHaskell #-}
module GivenFind.Chemistry
( SearchChemSymbols(..)
) where
import GivenFind
import GivenFind.Questions
import GivenFind.Geography (listOfTemperatures, listOfDistances)
... | juliagoda/givenfind | src/GivenFind/Chemistry.hs | bsd-3-clause | 11,607 | 0 | 24 | 2,437 | 3,394 | 1,873 | 1,521 | 105 | 4 |
{-# LANGUAGE ConstraintKinds, ScopedTypeVariables, TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE BangPatterns #-}
module Data.SuffixArray (
suffixSort,
sais,
) where
import Control.Applicative
import Control.Monad
import Control.Monad.ST
import Control.Monad.Primitive
import Control.Monad.Tran... | tanakh/sufsort | Data/SuffixArray.hs | bsd-3-clause | 7,684 | 20 | 30 | 2,345 | 3,225 | 1,621 | 1,604 | 165 | 4 |
{-# language CPP #-}
-- No documentation found for Chapter "Promoted_From_VK_KHR_maintenance1"
module Vulkan.Core11.Promoted_From_VK_KHR_maintenance1 ( trimCommandPool
, CommandPoolTrimFlags(..)
, Result(..)... | expipiplus1/vulkan | src/Vulkan/Core11/Promoted_From_VK_KHR_maintenance1.hs | bsd-3-clause | 6,089 | 5 | 13 | 1,251 | 656 | 431 | 225 | -1 | -1 |
import Test.Tasty
import Test.Tasty.HUnit
import qualified Data.Vector.Storable.Mutable as MV
import qualified Data.Vector.Storable as V
import Numeric.LinearAlgebra.UnsymmetricEigen
import Control.Monad
import Foreign.C.Types
import System.IO.Unsafe
import Data.Complex
import Data.List
import Data.Ord
main = defaul... | cmiller730/HEigs | test/test-unsymmetric.hs | bsd-3-clause | 2,472 | 1 | 19 | 793 | 1,008 | 531 | 477 | 58 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.