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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Main where
import MigratePersonStatementsPersonId
main = moveToNewTable
| tippenein/scrape_the_truth | migrations/Main.hs | mit | 81 | 0 | 4 | 10 | 12 | 8 | 4 | 3 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards, OverloadedStrings, DeriveGeneric, GeneralizedNewtypeDeriving #-}
module Tach.Periodic where
import Prelude hiding (foldl)
import Tach.Periodic.Internal
import System.Random
import Control.Applicative
import GHC.Generics
import Data.Maybe
import ... | smurphy8/tach | core-libs/tach-periodic/src/Tach/Periodic.hs | mit | 7,433 | 0 | 22 | 1,574 | 2,858 | 1,491 | 1,367 | 148 | 5 |
fact :: Double -> Double
fact 0 = 1
fact n = n * fact(n-1)
solve :: Double -> Double
solve x = sum $ map (\y -> x ** y / fact y) [0,1..9]
main :: IO ()
main = getContents >>= mapM_ print. map solve. map (read::String->Double). tail. words | jerryzh168/hackerrank | FunctionalProgramming/Introduction/EvaluatingEX.hs | mit | 240 | 0 | 10 | 52 | 147 | 75 | 72 | 7 | 1 |
-- Dieses Modul definiert einen Algebraischen Datentyp der im Codegenerator zur Generierung des Zielcodes benötigt. Er enthält die % TODO : Referenz
-- Komponenten ID, sowie benannte Ein- und Ausgangspins.
module System.ArrowVHDL.Circuit.PinTransit
where
-- Benötigt werden Modul-Definitionen aus \hsSource{Circuit... | frosch03/arrowVHDL | src/System/ArrowVHDL/Circuit/PinTransit.hs | cc0-1.0 | 6,501 | 0 | 12 | 1,277 | 786 | 445 | 341 | 45 | 1 |
module Main where
import Primes (
primeFactors,
mergeFactorLists,
multiplyFactorList)
import Util (runLength)
main :: IO ()
main =
let
numbers = [1..20]
factorLists = map (runLength.primeFactors) numbers
merged = foldl mergeFactorLists [] factorLists
result = multiplyFa... | liefswanson/projectEuler | app/p1/q5/Main.hs | gpl-2.0 | 363 | 0 | 11 | 101 | 97 | 53 | 44 | 14 | 1 |
module Requests
(
registerRequest,
cookieRequest
) where
-- sandbox imports
import Network.Http.Client (http, Method(GET), setAuthorizationBasic, RequestBuilder, setHeader )
-- local imports
import Types
registerRequest :: Cookie -> RequestBuilder()
registerRequest (Cookie token _ _ _) =
http GET "/FIT/st/course... | Tr1p0d/WisRegister | src/Requests.hs | gpl-3.0 | 1,571 | 0 | 14 | 171 | 265 | 131 | 134 | 30 | 1 |
module QHaskell.TraversalGenerator where
import Prelude
import Language.Haskell.TH.Syntax hiding (unQ)
import Language.Haskell.TH hiding (match)
import QHaskell.Expression.Utils.TemplateHaskell
import Data.Char
import Control.Applicative
lowerFirst :: String -> String
lowerFirst [] = []
lowerFirst (x : xs) = ... | shayan-najd/QHaskell | QHaskell/TraversalGenerator.hs | gpl-3.0 | 11,119 | 0 | 32 | 5,988 | 2,827 | 1,488 | 1,339 | -1 | -1 |
module Amoeba.GameStorage.GameStorage where
import Amoeba.GameLogic.Facade as GL
import Amoeba.GameLogic.GameLogicAccessor as GL
import qualified Control.Concurrent.STM.TVar as STM
-- Seems wrong.
initGameStorage :: GL.Game -> IO GameLogicAccessor
initGameStorage = createGameLogicAccessor
| graninas/The-Amoeba-World | src/Amoeba/GameStorage/GameStorage.hs | gpl-3.0 | 294 | 0 | 6 | 32 | 53 | 36 | 17 | 6 | 1 |
-- Perform one of several analyses of apache log files
--
-- Neil Mayhew - 2013-10-08
--
-- Adapted from: https://variadic.me/posts/2012-02-25-adventures-in-parsec-attoparsec.html
{-# LANGUAGE OverloadedStrings, DeriveGeneric, CPP #-}
{-# OPTIONS_GHC -Wno-name-shadowing -Wno-orphans #-}
module Main where
import Pars... | neilmayhew/DebianAnalytics | Analyze.hs | gpl-3.0 | 11,750 | 0 | 34 | 3,711 | 3,859 | 2,031 | 1,828 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Class.DateTime where
import Data.Time.Clock(UTCTime(..))
import Data.Time.Calendar(fromGregorian,toGregorian)
class DateTimeClass a where
toYMD :: a -> (Integer, (Word, Word))
toHMS :: a -> (Word , (Word, Word))
year :: a -> Integ... | shinjiro-itagaki/shinjirecs | shinjirecs-api/src/Class/DateTime.hs | gpl-3.0 | 1,130 | 0 | 15 | 275 | 410 | 238 | 172 | 30 | 0 |
module Paste.Tests where
import Data.Functor
import qualified Data.Text as T
import qualified Test.QuickCheck.Monadic as QCM
import Test.Tasty
import Test.Tasty.HUnit
import qualified Test.Tasty.QuickCheck as QC
import Test.Tasty.QuickCheck (testProperty)
import ... | nantes-fp/workshop-haskell-minipaste | test/Paste/Tests.hs | gpl-3.0 | 844 | 0 | 11 | 201 | 230 | 125 | 105 | 22 | 1 |
module Ampersand.Input
( module Ampersand.Input.ADL1.CtxError
, module Ampersand.Input.Parsing
) where
import Ampersand.Input.ADL1.CtxError (CtxError,Warning,Guarded(..),showErr,showWarning,showWarnings)
import Ampersand.Input.Parsing (parseADL,parseMeta,parseSystemContext,parseRule,runParser)
| AmpersandTarski/ampersand | src/Ampersand/Input.hs | gpl-3.0 | 313 | 0 | 6 | 34 | 77 | 52 | 25 | 5 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
module NS3473Column.System where
-- import Data.Maybe (fromJust)
import Control.Monad.Writer (Writer,runWriter,tell)
import Text.Printf (printf)
import qualified NS3473.Concrete as M
import qualified NS3473.Rebars as R
import qual... | baalbek/ns3473column | src/NS3473Column/System.hs | gpl-3.0 | 2,581 | 0 | 14 | 913 | 620 | 332 | 288 | 56 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Campaigns/Patch.hs | mpl-2.0 | 3,553 | 0 | 15 | 836 | 507 | 298 | 209 | 72 | 1 |
-- |
-- Module : Numbers.Map
-- Copyright : (c) 2012 Brendan Hay <brendan@soundcloud.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- you can obtain i... | brendanhay/numbersd | src/Numbers/Map.hs | mpl-2.0 | 2,375 | 0 | 15 | 662 | 855 | 448 | 407 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetSSLProxies/Get.hs | mpl-2.0 | 3,688 | 0 | 15 | 842 | 393 | 237 | 156 | 67 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-vault/gen/Network/Google/Resource/Vault/Matters/Holds/Get.hs | mpl-2.0 | 5,150 | 0 | 19 | 1,290 | 861 | 500 | 361 | 124 | 1 |
module Handler.Notification where
import Import hiding (delete)
import Model.Notification
import Model.Project
import Model.User
import View.Time
import qualified Data.Foldable as F
import Data.List (sort)
import qualified Data.Text as T
-- Merge two notification ty... | akegalj/snowdrift | Handler/Notification.hs | agpl-3.0 | 5,120 | 0 | 17 | 1,382 | 1,192 | 594 | 598 | -1 | -1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperato... | alanz/annotations-play | src/ch6-generics.hs | unlicense | 22,716 | 0 | 21 | 6,028 | 5,575 | 2,903 | 2,672 | 381 | 3 |
module SquareCube where
mySqr = [x^2 | x <- [1..5]]
myCube = [x^3 | x <- [1..5]]
tuples = [(x, y) | x <- mySqr, y <- myCube, x < 50, y < 50]
numTupes = length tuples
-- alternative:
allLessThan :: Integer -> [Integer] -> [Integer]
allLessThan x xs = takeWhile (< x) xs
allLessThan50 :: [Integer] -> [Integer]
allL... | thewoolleyman/haskellbook | 09/06/maor/squarecube.hs | unlicense | 461 | 0 | 8 | 93 | 225 | 125 | 100 | 11 | 1 |
module Braxton.A284434Spec (main, spec) where
import Test.Hspec
import Braxton.A284434 (a284434)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A284434" $
it "correctly computes the first 5 elements" $
take 5 (map a284434 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,1,6,2]
| peterokagey/haskellOEIS | test/Braxton/A284434pec.hs | apache-2.0 | 317 | 0 | 10 | 59 | 115 | 65 | 50 | 10 | 1 |
-- Empty module to serve as the default current module.
module Hugs where
import Control.Concurrent
import Data.List
import IO
import System.Environment
main = do
threadDelay 3000
putStrLine "Was it worth the wait?"
main3 = do
prog <- getProgName
args <- getArgs
putStrLn $ unwords (prog : ar... | pdbartlett/misc-stuff | unfuddle/PdbMisc/Haskell/Tutorial/Hugs.hs | apache-2.0 | 1,861 | 0 | 14 | 600 | 859 | 433 | 426 | 66 | 3 |
module Utils where
import Data.Maybe
import Data.Char
import Data.List
cross f g (a, b) = (f a, g b)
showlist sh sep [] = ""
showlist sh sep (t1:ts) = sh t1 ++ concat [sep ++ sh t | t <- ts]
separate sep [] = []
separate sep (t1:ts) = t1 : concat [[sep, t] | t <- ts]
breaks2' p [] = []
breaks2' p (x:xs)
| p x =... | Kelketek/proto-import | Utils.hs | bsd-2-clause | 466 | 0 | 9 | 133 | 284 | 148 | 136 | 17 | 1 |
{-# LANGUAGE OverloadedStrings, RankNTypes #-}
module Model.Tarball
where
import Import
import Control.Monad
import Data.Conduit
import Data.Conduit.Binary
import qualified Data.Conduit.List as CL
import Data.Conduit.Zlib
import Database.Persist.GenericSql.Raw
import qualified Data.Text as S
import Data.Text.Encod... | qnikst/ygruq | Model/Tarball.hs | bsd-2-clause | 2,075 | 0 | 17 | 744 | 569 | 300 | 269 | 57 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Tests for the lock data structure
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. R... | ganeti-github-testing/ganeti-test-1 | test/hs/Test/Ganeti/Locking/Locks.hs | bsd-2-clause | 4,567 | 0 | 15 | 1,030 | 750 | 419 | 331 | 72 | 1 |
{-# LANGUAGE CPP #-}
-------------------------------------------------------------------------------
--
-- | Dynamic flags
--
-- Most flags are dynamic flags, which means they can change from compilation
-- to compilation using @OPTIONS_GHC@ pragmas, and in a multi-session GHC each
-- session can be using different dy... | gcampax/ghc | compiler/main/DynFlags.hs | bsd-3-clause | 176,930 | 0 | 34 | 47,780 | 32,462 | 17,839 | 14,623 | -1 | -1 |
module Network.EmailSend(MailBackend(..), SendingReceipt) where
import Data.ByteString (ByteString)
type SendingReceipt = Maybe String
class MailBackend a where
sendMessage :: a -> String -> String -> ByteString -> IO SendingReceipt
| weissi/haskell-email | Network/EmailSend.hs | bsd-3-clause | 240 | 0 | 11 | 35 | 70 | 39 | 31 | 5 | 0 |
{-# OPTIONS -fno-warn-type-defaults -fno-warn-unused-binds -fno-warn-orphans #-}
{-# LANGUAGE FlexibleInstances, ExistentialQuantification #-}
module Test.TestParseTime where
import Control.Monad
import Data.Char
import Data.Ratio
import Data.Time
import Data.Time.Calendar.OrdinalDate
import Data.Time.Calendar.WeekDa... | bergmark/time | test/Test/TestParseTime.hs | bsd-3-clause | 23,340 | 0 | 45 | 4,413 | 7,183 | 3,814 | 3,369 | 419 | 2 |
module Main
where
import Control.DeepSeq (NFData(rnf))
import Common
import qualified Data.List
import qualified TS.B01
import qualified Data.Table as T
main :: IO ()
main = do
return $! rnf elements
return $! rnf test
test :: TS.B01.TS
test = fromList elements
elements :: [C01]
elements = map (\x -> C01 x (x `... | Palmik/data-store | benchmarks/src/TSSO.hs | bsd-3-clause | 551 | 0 | 10 | 116 | 245 | 139 | 106 | 19 | 1 |
module Module4.Task23 where
data Tree a = Leaf a | Node (Tree a) (Tree a)
height :: Tree a -> Int
height (Leaf _) = 0
height (Node l r) = 1 + max (height l) (height r)
size :: Tree a -> Int
size (Leaf _) = 1
size (Node l r) = 1 + size l + size r
| dstarcev/stepic-haskell | src/Module4/Task23.hs | bsd-3-clause | 260 | 0 | 8 | 75 | 154 | 78 | 76 | 8 | 1 |
module Ifrit.Client.DummySpec where
import Ifrit.Client.Dummy
import Ifrit.Framework
import Test.Hspec
spec = do
describe "A dummy client" $ do
it "can send a simple message" $ do
let message = TitledMessage "awesome title" "amazing content!"
response <- send Dummy message
response `shouldBe`... | frio/ifrit | test/hs/Ifrit/Client/DummySpec.hs | bsd-3-clause | 487 | 0 | 16 | 105 | 120 | 59 | 61 | 13 | 1 |
--
-- Copyright © 2014-2015 Anchor Systems, Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
-- the 3-clause BSD licence.
--
{-# LANGUAGE OverloadedStrings ... | anchor/synchronise | lib/Synchronise/Identifier.hs | bsd-3-clause | 3,734 | 0 | 11 | 721 | 757 | 430 | 327 | 76 | 1 |
module Graphics.Gnuplot.Private.ColorSpecification where
import Graphics.Gnuplot.Utility (quote, )
import Data.List.HT (padLeft, )
import Data.Word (Word8, )
import Numeric (showHex, )
data T =
Name String
| RGB8 {red, green, blue :: Word8}
| PaletteFrac Double
toString :: T -> String
toString c =
ca... | kubkon/gnuplot | src/Graphics/Gnuplot/Private/ColorSpecification.hs | bsd-3-clause | 548 | 0 | 15 | 137 | 192 | 108 | 84 | 17 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Types ( GhcSource(..)
, Options(..)
, HsenvState(..)
, DirStructure(..)
, HsenvException(..)
, Verbosity(..)
) where
import Control.Monad.Error (Error)
data GhcSource = System -- ... | tmhedberg/hsenv | src/Types.hs | bsd-3-clause | 2,479 | 0 | 9 | 1,055 | 267 | 179 | 88 | 34 | 0 |
{-# LANGUAGE NamedFieldPuns, OverloadedStrings #-}
module MusicPad.Core.Scene where
import MusicPad.Env
import Prelude ()
import qualified Prelude as P
import MusicPad.Model.Sample
import MusicPad.Toolkit.Console
import MusicPad.Model
import Rika.Engine.Render.GL.Helper (camera_view_space_hit_test, camera_view_m)
i... | nfjinjing/level5 | src/MusicPad/Core/Scene.hs | bsd-3-clause | 17,397 | 25 | 29 | 4,773 | 5,077 | 2,566 | 2,511 | -1 | -1 |
module Prose.CharSet ((∩),(∪),(⊙),(∖),(¬),
module Data.CharSet)
where
import Data.CharSet hiding (map,filter)
(⊙) :: [Char] -> CharSet
(⊙) = fromList
(∩) = intersection
(∪) = union
infixl 7 ∩
infixl 6 ∪
(∖) = difference
infixl 6 ∖
(¬) = complement
infixl 7 ¬
| llelf/prose | Prose/CharSet.hs | bsd-3-clause | 319 | 0 | 6 | 75 | 122 | 84 | 38 | 13 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
import Prelude.Unicode
| m00nlight/99-problems | haskell/p-91.hs | bsd-3-clause | 56 | 0 | 4 | 8 | 7 | 4 | 3 | 2 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Main
( main
) where
import Control.Monad.IO.Class (liftIO)
import Data.Aeson (FromJSON (..), defaultOptions,
genericParseJSON, genericToJSON,
... | bitemyapp/bloodhound | examples/Tweet.hs | bsd-3-clause | 3,937 | 0 | 17 | 896 | 897 | 466 | 431 | 77 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[ConFold]{Constant Folder}
Conceptually, constant folding should be parameterized with the kind
of target machine to get identical behaviour during compilation time
and runtime. We cheat a little bit here...
ToDo:
check boundaries before folding... | ml9951/ghc | compiler/prelude/PrelRules.hs | bsd-3-clause | 59,291 | 825 | 14 | 17,696 | 11,894 | 6,457 | 5,437 | 869 | 9 |
module B1.Data.Price.Google
( getGooglePrices
, parseGoogleCsv
) where
import Control.Exception
import Data.Either
import Data.Maybe
import Data.Time
import Network.HTTP hiding (close)
import Network.Stream hiding (close)
import System.IO
import System.Locale
import B1.Data.Price
import B1.Data.String.Utils
--... | madjestic/b1 | src/B1/Data/Price/Google.hs | bsd-3-clause | 3,613 | 0 | 13 | 732 | 983 | 516 | 467 | 81 | 2 |
module GLogger.Server (
initLogger,
cleanLog,
logDebug,
logInfo,
logNotice,
logWarning,
logError,
logCritical,
logAlert,
logEmergency
) where
import qualified System.Log.Logger as SL
import System.Log.Handler.Simple (fileHandler)
import System.Log.Handler (setFormatter)
import System.Log.Formatte... | cernat-catalin/haskellGame | src/GLogger/Server.hs | bsd-3-clause | 1,815 | 0 | 14 | 314 | 595 | 302 | 293 | 56 | 1 |
{-# OPTIONS_GHC -O2 -fllvm -funbox-strict-fields -mavx -mavx2 -mavx512f #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE FlexibleContexts #-}
import Control.DeepSeq
import Control.Monad
imp... | mikeizbicki/simd | examples/criterion-distance.hs | bsd-3-clause | 12,055 | 0 | 16 | 4,254 | 3,920 | 2,012 | 1,908 | 252 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module GasModelSpec (spec) where
import Test.Hspec
import Test.Hspec.Golden as G
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.Set as S
import qualified Data.Text as T
import qualif... | kadena-io/pact | tests/GasModelSpec.hs | bsd-3-clause | 8,571 | 0 | 17 | 1,555 | 2,188 | 1,167 | 1,021 | 169 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{- |
Module : Data.Random.Extras
Copyright : 2010 Aristid Breitkreuz
License : BSD3
Stability : experimental
Portability : portable
Additional monadic random functions, based on random-fu.
-}
module Data.Random.Extras
(
-- * Random functions
-- ** Shuffling
s... | aristidb/random-extras | Data/Random/Extras.hs | bsd-3-clause | 6,599 | 1 | 15 | 1,512 | 1,730 | 938 | 792 | 97 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-|
Module : Numeric.AERN.RealArithmetic.Basis.MPFR.MixedFieldOps
Description : rounded basic arithmetic operations mixing MP... | michalkonecny/aern | aern-mpfr-rounded/src/Numeric/AERN/RealArithmetic/Basis/MPFR/MixedFieldOps.hs | bsd-3-clause | 10,427 | 0 | 9 | 2,411 | 2,441 | 1,298 | 1,143 | 167 | 0 |
#include "Prelude.hs"
root = ()
tests = [
(0 == 1, False), (1 == 1, True),
(0 /= 1, True), (1 /= 1, False),
(1 + 2, 3),
(3 - 2, 1),
(3 * 2, 6),
(3 `div` 2, 1), (4 `div` 2, 2),
(1 <= 2, True), (2 <= 2, True),
(1 < 2, True), (2 < 2, False),
(2 >= 2, True), (1 >= 2, False),
(3 > 2, True), (... | batterseapower/supercompilation-by-evaluation | examples/PreludeTest.hs | bsd-3-clause | 1,335 | 0 | 10 | 374 | 978 | 591 | 387 | 33 | 1 |
module Voting.Ranked.Types where
newtype Ballot a = Ballot [a]
| nuttycom/haskell-voting | src/Voting/Ranked/Types.hs | bsd-3-clause | 64 | 0 | 6 | 10 | 19 | 13 | 6 | 2 | 0 |
module Main where
import Tree
import Graphics.UI.FLTK.LowLevel.FLTKHS
import qualified Graphics.UI.FLTK.LowLevel.FL as FL
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
main :: IO ()
main = do
win <- make_window
showWidget win
_ <- FL.run
return ()
| deech/fltkhs-fluid-examples | src/fluid-tree.hs | mit | 302 | 0 | 8 | 42 | 87 | 52 | 35 | 12 | 1 |
module Utils (mparam, defparam, toKey, generatePasscode) where
import Control.Monad.IO.Class (liftIO)
import Data.Text.Lazy (Text)
import System.Random (randomRs, newStdGen)
import Database.Persist.Sql (ToBackendKey, SqlBackend, Key, toSqlKey)
import Web.Scotty (ActionM, Parsable, param, rescue)
mparam :: (Parsable... | vyorkin/assignment | api/src/Utils.hs | mit | 907 | 0 | 9 | 140 | 310 | 172 | 138 | -1 | -1 |
--
--
--
-----------------
-- Exercise 7.34.
-----------------
--
--
--
module E'7'34 where
import Data.List ( isPrefixOf , drop )
subst :: String -> String -> String -> String
subst "" _ string = string
subst _ _ "" = ""
subst oldSubstring newSubstring string@( stringCharacter : remainingStringCharacters )
| ... | pascal-knodel/haskell-craft | _/links/E'7'34.hs | mit | 606 | 0 | 10 | 130 | 140 | 77 | 63 | 8 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : $Header$
Description : CSMOF signature and sentences
Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013
License : GPLv2 or higher, see LICENSE.txt
Maintainer : dcalegar@fing.edu.uy
Stability : provisional
Portability : portabl... | mariefarrell/Hets | CSMOF/Sign.hs | gpl-2.0 | 4,660 | 0 | 19 | 1,465 | 1,360 | 723 | 637 | 100 | 2 |
-- |
-- Copyright: © 2018 Herbert Valerio Riedel
-- SPDX-License-Identifier: GPL-3.0-or-later
--
module WorkerApi.Client where
import Prelude.Local
import Control.Monad.Except (ExceptT (..))
import Servant.API
import Servant.HttpStreams
import PkgId
import ... | Rizary/hackage-matrix-builder | src-lib/WorkerApi/Client.hs | gpl-3.0 | 1,501 | 0 | 14 | 448 | 303 | 160 | 143 | 34 | 1 |
{-# LANGUAGE CPP #-}
-- |
-- Module : Statistics.Resampling.Bootstrap
-- Copyright : (c) 2009, 2011 Bryan O'Sullivan
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- The bootstrap method for statistical inference.
module Statistics.Resampling.B... | bos/statistics | Statistics/Resampling/Bootstrap.hs | bsd-2-clause | 4,131 | 0 | 14 | 1,116 | 892 | 507 | 385 | 62 | 1 |
module Main where
import Options.Applicative
import qualified Data.Yaml as Y
import Data.Yaml.Pretty
import qualified Data.ByteString.Char8 as B
data Options =
Options { --variables :: String
dashes :: Bool
,files :: [String]}
cfg :: Parser Options
cfg =
Options <$>
-- strOption (short 'V' ... | michelk/yaml-overrides.hs | bin/yaml-concat.hs | bsd-3-clause | 1,213 | 0 | 14 | 358 | 334 | 175 | 159 | 32 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTSyntax #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE UnliftedNewtypes #-}
module UnliftedNewtypesUnassociatedFamily where
import GHC.Int (Int(I#))
import GHC.Ex... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/UnliftedNewtypesUnifySig.hs | bsd-3-clause | 582 | 4 | 9 | 94 | 154 | 94 | 60 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Database.PostgreSQL.Simple.Notification
-- Copyright : (c) 2011-2015 Leon P Smith
-- (c) 2012 Joey Adams
-- Licens... | tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/Notification.hs | bsd-3-clause | 6,773 | 0 | 22 | 1,935 | 660 | 372 | 288 | 61 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Either.Combinators
-- Copyright : (c) 2010-2014 Gregory Crosswhite, Chris Done, Edward Kmett
-- License : BSD-style
--
-- Maintainer : ekmett@gmail.com
-- Stability : provisional
-- Portability : port... | anand-singh/either | src/Data/Either/Combinators.hs | bsd-3-clause | 7,130 | 0 | 11 | 1,422 | 1,131 | 693 | 438 | 64 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TemplateHaskell #-}
module Network.Wai.Ghcjs (
mkDevelopmentApp,
BuildConfig(..),
Exec(..),
mkProductionApp,
serveGhcjs,
) where
import Control.Monad
import Language.Haskell.TH
import Network.Wai.Ghcjs... | soenkehahn/wai-shake | src/Network/Wai/Ghcjs.hs | bsd-3-clause | 1,299 | 0 | 10 | 225 | 132 | 90 | 42 | 19 | 1 |
module Utils
(
parseFromFile
, parseString
, shouldAccept
, shouldReject
) where
import Control.Applicative ((<*))
import Test.Hspec
import Text.Parsec (eof)
import Uroboro.Parser (parse, Parser)
-- |Exceptions instead of Either.
parseIO :: Parser a -> String -> String -> IO a
parseIO par... | tewe/uroboro | test/Utils.hs | mit | 1,093 | 0 | 12 | 255 | 391 | 193 | 198 | 29 | 2 |
module Compiler.OptimiseLp(optimiseLp) where
import Compiler.Lp
import Compiler.Util
optimiseLp :: Program -> Program
optimiseLp = collapsePrimArgs . deadCode . specialise
---------------------------------------------------------------------
-- Remove adjacent strings for primitive calls
collapsePrimArgs :: Pro... | silkapp/tagsoup | dead/parser/Compiler/OptimiseLp.hs | bsd-3-clause | 2,257 | 0 | 15 | 594 | 851 | 439 | 412 | 42 | 4 |
module Dotnet.System.UriPartial where
import Dotnet
import qualified Dotnet.System.Enum
data UriPartial_ a
type UriPartial a = Dotnet.System.Enum.Enum (UriPartial_ a)
| alekar/hugs | dotnet/lib/Dotnet/System/UriPartial.hs | bsd-3-clause | 171 | 0 | 7 | 22 | 41 | 27 | 14 | -1 | -1 |
module Data.RDF.PatriciaTreeGraph_Test (triplesOf',uniqTriplesOf',empty',mkRdf') where
import Data.RDF.Types
import Data.RDF.PatriciaTreeGraph (PatriciaTreeGraph)
import Data.RDF.GraphTestUtils
import qualified Data.Map as Map
import Control.Monad
import Test.QuickCheck
instance Arbitrary PatriciaTreeGraph where
a... | LeifW/rdf4h | testsuite/tests/Data/RDF/PatriciaTreeGraph_Test.hs | bsd-3-clause | 717 | 0 | 10 | 84 | 166 | 97 | 69 | 17 | 1 |
{-# LANGUAGE RecordWildCards #-}
-- | DSL for testing the modular solver
module UnitTests.Distribution.Solver.Modular.DSL (
ExampleDependency(..)
, Dependencies(..)
, ExTest(..)
, ExPreference(..)
, ExampleDb
, ExampleVersionRange
, ExamplePkgVersion
, ExamplePkgName
, ExampleAvailable(..)
, Examp... | headprogrammingczar/cabal | cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs | bsd-3-clause | 19,362 | 0 | 20 | 5,211 | 3,949 | 2,205 | 1,744 | 293 | 19 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module WWRec where
class Rule f a where
get :: Decorator f => f a
class Monad f => Decorator f where
foo :: Rule f a => f a
data A1 = MkA1 A2
data A2 = MkA2 A3
data A3... | sdiehl/ghc | testsuite/tests/perf/compiler/WWRec.hs | bsd-3-clause | 2,654 | 0 | 8 | 624 | 1,177 | 604 | 573 | 69 | 0 |
module Main(main) where
import Control.Monad
import Control.Exception
import Control.Monad.Trans.Cont
import GHC.Exts
type RAW a = ContT () IO a
-- See https://gitlab.haskell.org/ghc/ghc/issues/11555
catchSafe1, catchSafe2 :: IO a -> (SomeException -> IO a) -> IO a
catchSafe1 a b = lazy a `catch` b
catchSafe2 a b =... | sdiehl/ghc | testsuite/tests/stranal/should_run/T11555a.hs | bsd-3-clause | 988 | 0 | 12 | 242 | 423 | 218 | 205 | 28 | 2 |
{-# LANGUAGE CPP #-}
module Distribution.Client.Dependency.Modular.Preference where
-- Reordering or pruning the tree in order to prefer or make certain choices.
import qualified Data.List as L
import qualified Data.Map as M
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid
#endif
import Data.Ord
import Distribution.C... | DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | bsd-3-clause | 13,140 | 0 | 20 | 3,327 | 3,082 | 1,590 | 1,492 | 152 | 4 |
module USCC(decls) where
import UFree
import UAbstract(Decls,Def,defaNames,Var(..),decl')
import TiSCC
import FreeNames
import DefinedNames
import HsIdent(HsIdentI(..))
decls = map decl' . sccD :: [Def] -> Decls
instance FreeNames Var Def where
freeNames = map (flip (,) ValueNames . HsVar) . free
instance DefinedN... | forste/haReFork | tools/hs2alfa/USCC.hs | bsd-3-clause | 397 | 0 | 11 | 62 | 153 | 88 | 65 | -1 | -1 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
{-# LANGUAGE TypeFamilies, EmptyCase, LambdaCase #-}
-- Check interaction between Newtypes and Type Families
module EmptyCase007 where
import Data.Kind (Type)
type family FA a :: Type -- just an open type family
type instance FA Int = (Char, Bool)
type instance FA C... | sdiehl/ghc | testsuite/tests/pmcheck/should_compile/EmptyCase007.hs | bsd-3-clause | 1,274 | 0 | 7 | 260 | 291 | 175 | 116 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
module T14048b where
import Data.Kind
data family Foo :: Constraint
| sdiehl/ghc | testsuite/tests/typecheck/should_fail/T14048b.hs | bsd-3-clause | 133 | 0 | 4 | 20 | 18 | 13 | 5 | 5 | 0 |
module Main where
import Parser
import Codegen
import Emit
import Control.Monad.Trans
import System.IO
import System.Environment
import System.Console.Haskeline
import qualified LLVM.General.AST as AST
initModule :: AST.Module
initModule = emptyModule "my cool jit"
process :: AST.Module -> String -> IO (Maybe AST... | yigitozkavci/glow | src/Main.hs | mit | 1,210 | 0 | 17 | 312 | 417 | 201 | 216 | 41 | 3 |
module Text.Ponder.Char
( Parser
, parse
, run
, item
, satisfy
, char
, string
, oneOf
) where
import Control.Monad
import Control.Monad.State
import Control.Monad.Error
import Control.Monad.Identity
import Control.Applicative
import Text.Ponder.Prim
type Parser a = ParserT String String Identity a
parse :: Parser... | matt76k/ponder | Text/Ponder/Char.hs | mit | 1,407 | 0 | 14 | 476 | 546 | 287 | 259 | 38 | 2 |
module Graphics.D3D11Binding.Interface.D3DBlob where
import Data.Word
import Foreign.Ptr
import Graphics.D3D11Binding.Interface.Unknown
data ID3DBlob = ID3DBlob
foreign import stdcall "GetBufferPointer" c_getBufferPointer
:: Ptr ID3DBlob -> IO (Ptr ())
foreign import stdcall "GetBufferSize" c_getBufferSize
::... | jwvg0425/d3d11binding | src/Graphics/D3D11Binding/Interface/D3DBlob.hs | mit | 696 | 0 | 11 | 95 | 188 | 96 | 92 | 16 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Common
import Config
import TL
import Control.Applicative ((<$>))
import Control.Monad (when)
import Control.Monad.Logger
import Control.Monad.Trans
import Control.Monad.Trans.Resource
impo... | chiro/tchhh | src/Main.hs | mit | 3,198 | 0 | 17 | 623 | 1,081 | 566 | 515 | 87 | 2 |
{-# language NoImplicitPrelude, DoAndIfThenElse, OverloadedStrings, ExtendedDefaultRules #-}{-# LANGUAGE CPP #-}
module IHaskellPrelude (
module IHaskellPrelude,
module X,
-- Select reexports
Data.Typeable.Typeable,
Data.Typeable.cast,
#if MIN_VERSION_ghc(7,8,0)
Data.Typeable.Proxy,
GHC.Exts.IsString,
... | sumitsahrawat/IHaskell | main/IHaskellPrelude.hs | mit | 4,841 | 0 | 10 | 1,282 | 1,183 | 745 | 438 | 110 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
-- | Chell is a simple and intuitive library for automated testing. It natively
-- supports assertion-based testing, and can use companion libraries
-- such as @chell-quickcheck@ to support more complex testing st... | shlevy/chell | lib/Test/Chell.hs | mit | 17,183 | 69 | 26 | 3,534 | 4,655 | 2,502 | 2,153 | 329 | 3 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.UIEvent
(js_initUIEvent, initUIEvent, js_getView, getView, js_getDetail,
getDetail, js_getKeyCode, getKeyCode, js_getCharCode, getCharCode,
js_getLayerX, getLayerX, js_getLayerY, getLayerY, ... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/UIEvent.hs | mit | 4,904 | 70 | 13 | 773 | 1,254 | 689 | 565 | 73 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
module Control.FRP.Wire(Wire, runWire, stepWire) where
import Prelude hiding (id, (.))
import Control.Category
import Control.Arrow
import Control.Arrow.Tran... | prophile/state-wire | Control/FRP/Wire.hs | mit | 3,371 | 2 | 17 | 941 | 1,664 | 878 | 786 | 77 | 1 |
{-# LANGUAGE RecordWildCards
, ForeignFunctionInterface
, TemplateHaskell
, BangPatterns
, FlexibleContexts #-}
module RustNBodyExperiment ( RustNBodyExperiment
) where
import Control.Monad.IO.Class
import Control.Lens
import Control.Mo... | blitzcode/rust-exp | hs-src/RustNBodyExperiment.hs | mit | 4,666 | 0 | 19 | 2,023 | 1,017 | 518 | 499 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-subnetgroup.html
module Stratosphere.Resources.ElastiCacheSubnetGroup where
import Stratosphere.... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/ElastiCacheSubnetGroup.hs | mit | 2,747 | 0 | 15 | 309 | 370 | 211 | 159 | 36 | 1 |
{- |
Module : $Header$
Description : Helper functions for dealing with terms
(mainly for pretty printing which is
directly adapted from hollight)
Copyright : (c) Jonathan von Schroeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : jonathan.von... | nevrenato/Hets_Fork | HolLight/Helper.hs | gpl-2.0 | 18,314 | 332 | 22 | 8,398 | 6,419 | 3,419 | 3,000 | 420 | 18 |
module GraphTheory.Main where
import Notes
import Sets.Basics.Terms
import GraphTheory.Macro
import GraphTheory.Terms
graphTheory :: Note
graphTheory = chapter "Graph Theory" $ do
graphDefinition
graphDefinition :: Note
graphDefinition = de $ do
lab graphDefinitionLa... | NorfairKing/the-notes | src/GraphTheory/Main.hs | gpl-2.0 | 538 | 0 | 14 | 145 | 158 | 86 | 72 | 15 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Fresh.InferMonad where
import Control.Monad (when, foldM, forM)
import Data.Map (Map)
import qualified Data.Set as Set
import Data.STRef
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State (StateT(..))
import Control.Monad.State.Class (MonadState... | sinelaw/fresh | src/Fresh/InferMonad.hs | gpl-2.0 | 8,454 | 0 | 21 | 2,232 | 3,281 | 1,622 | 1,659 | 174 | 7 |
module PulseLambda.Error
( throwParsingError
) where
import PulseLambda.Location
throwParsingError :: Location -> String -> a
throwParsingError loc str = error $! show loc ++ ": " ++ str | brunoczim/PulseLambda | PulseLambda/Error.hs | gpl-3.0 | 187 | 0 | 8 | 28 | 54 | 29 | 25 | 5 | 1 |
{-
Copyright (c) 2014 Genome Research Ltd.
Author: Nicholas A. Clarke <nicholas.clarke@sanger.ac.uk>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your opti... | nc6/tabula | Tabula/Record/Environment.hs | gpl-3.0 | 2,641 | 0 | 15 | 602 | 481 | 262 | 219 | 33 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Api.Queue (resource) where
import Control.Monad.Except
import Data.String
import Rest
import qualified Rest.Resource as R
import Api.Package (validatePackage)
import Api.Root ... | imalsogreg/hackage-matrix-builder | src/Api/Queue.hs | gpl-3.0 | 2,102 | 0 | 14 | 591 | 623 | 330 | 293 | 52 | 1 |
module Lamdu.Sugar.Internal
( BodyU, ExpressionU
, replaceWith
) where
import Data.UUID.Types (UUID)
import qualified Data.Store.Property as Property
import Data.Store.Transaction (Transaction)
import qualified Lamdu.Expr.IRef as ExprIRef
import qualified Lamdu.Sugar.Internal.EntityId a... | da-x/lamdu | Lamdu/Sugar/Internal.hs | gpl-3.0 | 757 | 0 | 9 | 173 | 197 | 114 | 83 | 20 | 1 |
module Main (main) where
import Control.Concurrent (threadDelay)
import Control.Exception
import Control.Monad (replicateM, forever)
import Data.Aeson
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 as LB
import Data.Default (Default(..))
import Data.List (find)
import Data.Text... | enolan/pia-forward | src/Main.hs | gpl-3.0 | 3,756 | 0 | 24 | 1,014 | 1,083 | 572 | 511 | -1 | -1 |
instance (Monoid w) => Monad (Writer w) where
(Writer (a, w)) >>= k = let (a', w') = runWriter (k a)
in Writer (a', w `mappend` w')
return a = Writer (a, mempty) | hmemcpy/milewski-ctfp-pdf | src/content/3.5/code/haskell/snippet15.hs | gpl-3.0 | 197 | 0 | 12 | 68 | 106 | 55 | 51 | 4 | 0 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE StandaloneDeriving #-}
-- | This mo... | Ferdinand-vW/sessiontypes | src/Control/SessionTypes/STTerm.hs | gpl-3.0 | 6,850 | 0 | 15 | 1,584 | 1,708 | 896 | 812 | 75 | 1 |
module Game.Toliman.Graphical.UI (
module State,
module Events,
module Widgets,
module Types ) where
import Game.Toliman.Graphical.UI.State as State
import Game.Toliman.Graphical.UI.Events as Events
import Game.Toliman.Graphical.UI.Widgets as Widgets
import Game.Toliman.Graphical.UI.Types as Types
| duncanburke/toliman-graphical | src-lib/Game/Toliman/Graphical/UI.hs | mpl-2.0 | 312 | 0 | 4 | 42 | 66 | 51 | 15 | 9 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/Get.hs | mpl-2.0 | 4,777 | 0 | 19 | 1,180 | 821 | 474 | 347 | 112 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE RecordWildCards #-}
module Commands.Reddit
(
startrek,
wcgw,
meme,
randomReddit,
... | tsahyt/lmrbot | src/Commands/Reddit.hs | agpl-3.0 | 3,499 | 1 | 20 | 1,035 | 1,065 | 545 | 520 | 87 | 5 |
module Gameboy.Assembler (
parseInstructions,
encodeInstructions,
assemble
) where
import Prelude hiding (and, or)
import Data.Maybe
import Data.Char
import Data.Word
import Control.Monad
import Text.Parsec
import qualified Data.Vector.Unboxed as VU
import Gameboy.Instructions
data Register16
= AFRegister16
... | kyren/hsgb | lib/Gameboy/Assembler.hs | unlicense | 18,206 | 0 | 52 | 4,053 | 6,609 | 3,177 | 3,432 | 466 | 14 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
Copyright 2017 The CodeWorld Authors. All rights reserved.
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
... | parvmor/codeworld | codeworld-server/src/Collaboration.hs | apache-2.0 | 4,696 | 0 | 20 | 1,145 | 1,130 | 564 | 566 | 77 | 3 |
module Palindromes.A248122Spec (main, spec) where
import Test.Hspec
import Palindromes.A248122 (a248122)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A248122" $
it "correctly computes the first 10 elements" $
take 10 (map a248122 [0..]) `shouldBe` expectedValue where
expectedValue = [0,0,... | peterokagey/haskellOEIS | test/Palindromes/A248122Spec.hs | apache-2.0 | 353 | 0 | 10 | 59 | 130 | 75 | 55 | 10 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
-- | Implementation of the ethereum-analyzer API.
module Ethereum.Analyzer.Web.Server.Handlers
( server
) where
import Protolude
import Control.Monad.Except (ExceptT(..))
import Control.Monad.Log (Severity, logInfo)
impor... | zchn/ethereum-analyzer | ethereum-analyzer-webui/src/Ethereum/Analyzer/Web/Server/Handlers.hs | apache-2.0 | 1,992 | 0 | 11 | 317 | 566 | 316 | 250 | 38 | 1 |
module Braxton.A274701 (a274701) where
import Braxton.A259280 (a259280)
import Helpers.ListHelpers (firstDifferences)
a274701 :: Int -> Integer
a274701 n = a274701_list !! (n - 1)
a274701_list :: [Integer]
a274701_list = firstDifferences $ map a259280 [1..]
| peterokagey/haskellOEIS | src/Braxton/A274701.hs | apache-2.0 | 260 | 0 | 7 | 35 | 84 | 48 | 36 | 7 | 1 |
module Arbitrary.Model where
import Model.Types
import Test.QuickCheck
instance Arbitrary Side where
arbitrary = elements [SLeft, SRight]
instance Arbitrary PlayMode where
arbitrary = do
side <- arbitrary
elements [ BeforeKickOff
, PlayOn
, TimeOver
... | klangner/splayer | test-src/Arbitrary/Model.hs | bsd-2-clause | 584 | 0 | 10 | 272 | 118 | 63 | 55 | 19 | 0 |
-- -*- Mode: Haskell; -*-
--
-- QuickCheck tests for Megaparsec's lexer.
--
-- Copyright © 2015 Megaparsec contributors
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are
-- met:
--
-- * Redistributions of source code must r... | neongreen/megaparsec | tests/Lexer.hs | bsd-2-clause | 9,267 | 0 | 15 | 2,645 | 2,724 | 1,411 | 1,313 | 178 | 4 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Web.Pagure.HookReceiver.Post
-- Copyright : (C) 2015 Ricky Elrod
-- License : BSD2 (see LICENSE file)
-- Maintainer : Ricky Elrod <relrod@redhat.com>
-- Stability : experimental
-- Portabili... | fedora-infra/pagure-hook-receiver | src/Web/Pagure/HookReceiver/Post.hs | bsd-2-clause | 1,117 | 0 | 20 | 206 | 239 | 128 | 111 | 19 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.