code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
--The following iterative sequence is defined for the set of positive integers: --n → n/2 (n is even) --n → 3n + 1 (n is odd) --Using the rule above and starting with 13, we generate the following sequence: --13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 --It can be seen that this sequence (starting at 13 and finishing...
jongensvantechniek/Project-Euler
problem014-haskell/problem14.hs
Haskell
mit
1,427
module Main where import Render.Setup import Graphics.UI.GLUT import Data.Time main :: IO () main = do (progName, _args) <- getArgsAndInitialize start <- getCurrentTime initialDisplayMode $= [ SingleBuffered, RGBMode ] initialWindowSize $= Size 512 512 initialWindowPosition $= Position 100 100 _ <- ...
dongy7/raytracer
src/Main.hs
Haskell
mit
576
module Twilio.IVRSpec where import Test.Hspec import Twilio.IVR import Control.Lens import Control.Lens.Setter import Control.Monad.Coroutine import Control.Monad.Coroutine.SuspensionFunctors import Text.XML.Light -- never use for production purposes, NOT TRUE XML EQUIVALENCE instance Eq Content where x == y ...
steven777400/TwilioIVR
test/Twilio/IVRSpec.hs
Haskell
mit
2,244
module Neural_Net where import System.Random import qualified System.Posix.Types as P import qualified GHC.IO.Handle.Types as T import Data.Dynamic import qualified Data.Array.Repa as R import qualified Data.Array.Repa.Eval as R import qualified Data...
hamsal/DM-AtariAI
src/Neural_Net.hs
Haskell
mit
11,066
{- Reasonably fast enumerations for combinations, `recombinations', and permutations. 2009 Nathan Blythe, Dr. Oscar Boykin (see LICENSE for details) A combination is a length m subset of {0 .. n - 1}. A `recombination' is a length m submultiset of {0 .. n - 1}. A permutation is a length m ordered subset o...
nblythe/MUB-Search
Combinadics.hs
Haskell
mit
9,472
module Akarui.FOL.PrettyPrint ( PrettyPrint(..) ) where import qualified Data.Text as T import Akarui.FOL.Symbols class PrettyPrint t where prettyPrint :: Symbols -> t -> T.Text
PhDP/Manticore
Akarui/FOL/PrettyPrint.hs
Haskell
apache-2.0
182
module Lambda.Deconstruct ( -- * Convenient polymorphic deconstruction app , lam , var -- * Combinator , (|>) , (<!>) -- ** From "Control.Applicative" , Alternative , (<|>) ) where import Control.Applicative ( Alternative , empty , (<|>) ) i...
edom/ptt
src/Lambda/Deconstruct.hs
Haskell
apache-2.0
1,138
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.Handler where import GHC.Generics import Openshift.V1.ExecAction import Openshift.V1.HTTPGetAction import Openshift.V1.TCPSocketAc...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/Handler.hs
Haskell
apache-2.0
889
module Helpers.Binary (lastBits, bitsList, splitBits) where -- Number of partitions of the binary expansion of n into consecutive blocks with no leading zeroes. -- 23 = 0b11011 -> [0, 0b1, 0b11, 0b011, 0b1011] = [0,1,3,3,11] lastBits :: Int -> [Int] lastBits n = recurse 0 n where recurse _ 0 = [] recurse k n' = (n...
peterokagey/haskellOEIS
src/Helpers/Binary.hs
Haskell
apache-2.0
733
-- | -- Module : Text.Megaparsec.ByteString -- Copyright : © 2015 Megaparsec contributors -- © 2007 Paolo Martini -- License : BSD3 -- -- Maintainer : Mark Karpov <markkarpov@opmbx.org> -- Stability : experimental -- Portability : portable -- -- Convenience definitions for working wit...
neongreen/megaparsec
Text/Megaparsec/ByteString.hs
Haskell
bsd-2-clause
1,330
{-# LANGUAGE TypeFamilies, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, TypeSynonymInstances #-} module HEP.ModelScan.MSSMScan.Model.MSUGRA where import HEP.ModelScan.MSSMScan.Model import qualified Data.ByteString.Lazy.Char8 as B import Data.ByteString.Lex.Lazy.Double instance Model M...
wavewave/MSSMScan
src/HEP/ModelScan/MSSMScan/Model/MSUGRA.hs
Haskell
bsd-2-clause
1,236
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} module Control.Monad.Shmonad.ExpressionSpec (main, spec, VStr(..), VInt(..)) where import Test.Hspec import Test.QuickCheck import Control.Monad import Control.Monad.Shmonad.Expression import Control.Applicative ((<$>), (<*>)) import Data.Char (i...
corajr/shmonad
test/Control/Monad/Shmonad/ExpressionSpec.hs
Haskell
bsd-2-clause
5,547
module AERN2.PPoly.Eval where import MixedTypesNumPrelude import qualified AERN2.Poly.Cheb as Cheb hiding (evalDf) import AERN2.Poly.Cheb (ChPoly) import qualified AERN2.Poly.Cheb.Eval as ChE (evalDirect, evalDf, evalLDf) import AERN2.PPoly.Type import AERN2.MP.Ball import AERN2.Poly.Ball import AERN2.Interval import...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/PPoly/Eval.hs
Haskell
bsd-3-clause
2,584
{-# LANGUAGE DeriveDataTypeable , DeriveFunctor , DeriveFoldable , DeriveTraversable #-} module Language.TNT.Location ( Point (..) , Location (..) , Located (..) ) where import Control.Comonad import Data.Data import Data.Foldable import Data.Functor.Apply import Data.Semigroup...
sonyandy/tnt
Language/TNT/Location.hs
Haskell
bsd-3-clause
1,206
----------------------------------------------------------------------------- -- | -- Module : Data.Group.Combinators -- Copyright : (c) Edward Kmett 2009 -- License : BSD-style -- Maintainer : ekmett@gmail.com -- Stability : experimental -- Portability : portable -- -- Utilities for working with Gr...
ekmett/monoids
Data/Group/Combinators.hs
Haskell
bsd-3-clause
1,410
{-# LANGUAGE GADTs #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} module Language.SynArrow where import Prelude hiding ((.),id,init) import Control.Category import ...
svenkeidel/hsynth
src/Language/SynArrow.hs
Haskell
bsd-3-clause
3,579
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} module Fragment.Tuple.Rules.Type ( TupleNormalizeConstraint , tupleNormalizeRules ) where import Control.Lens (review, previe...
dalaing/type-systems
src/Fragment/Tuple/Rules/Type.hs
Haskell
bsd-3-clause
914
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Examples.Uninterpreted.Function -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Demonstrates function counter-examples ---------...
josefs/sbv
Data/SBV/Examples/Uninterpreted/Function.hs
Haskell
bsd-3-clause
759
{-# LANGUAGE OverloadedStrings #-} module Main where import CMark (Node(..)) import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) import Data.Morgue.Agenda import Data.Morgue.Agenda.Types import Data.Text (Text, pack, stripSuffix) import qualified Data.Text as T import qualified Data.Text.IO as TIO import System....
ibabushkin/morgue
app/Dump.hs
Haskell
bsd-3-clause
1,619
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.IBM.VertexArrayLists -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portabl...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/IBM/VertexArrayLists.hs
Haskell
bsd-3-clause
1,481
{-# LANGUAGE TypeFamilies #-} module LOGL.Internal.Shader ( ) where import Graphics.GLUtil import LOGL.Internal.Resource instance Resource ShaderProgram where type LoadParam ShaderProgram = (String, FilePath, FilePath) load (name, vfile, ffile) = do shader <- simpleShaderProgram vfile ffile r...
atwupack/LearnOpenGL
src/LOGL/Internal/Shader.hs
Haskell
bsd-3-clause
368
------------------------------------------------------------------------------- ---- | ---- Module : Parser ---- Copyright : (c) Syoyo Fujita ---- License : BSD-style ---- ---- Maintainer : syoyo@lighttransport.com ---- Stability : experimental ---- Portability : GHC 6.10 ---- ---- Parser : A ...
syoyo/LLL
LLL/Parser.hs
Haskell
bsd-3-clause
10,335
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances ...
texodus/forml
src/hs/lib/Forml/Types/Namespace.hs
Haskell
bsd-3-clause
1,574
-- (c) 1999-2005 by Martin Erwig [see file COPYRIGHT] -- | Static and Dynamic Inductive Graphs module Data.Graph.Inductive.Graph ( -- * General Type Defintions -- ** Node and Edge Types Node,LNode,UNode, Edge,LEdge,UEdge, -- ** Types Supporting Inductive Graph View Adj,Context,MContext,Decomp,...
FranklinChen/hugs98-plus-Sep2006
packages/fgl/Data/Graph/Inductive/Graph.hs
Haskell
bsd-3-clause
16,059
{-# LANGUAGE TupleSections, GADTs, StandaloneDeriving, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} module IndexedState where newtype IStateT m i o a = IStateT { runIState :: i -> m (o, a) } class IMonad m where ireturn :: a -> m i i a (>>>=) :: m i j a -> (a -> m j k b) -> m i k b (>>>) :: I...
homam/fsm-conversational-ui
src/IndexedState.hs
Haskell
bsd-3-clause
8,330
-- Copyright (c) 2017 Eric McCorkle. 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. Redistributions of source code must retain the above copyright -- notice, this list of conditions...
emc2/clash-riscv
src/RISCV/ISA/Registers/Regular.hs
Haskell
bsd-3-clause
3,540
{-# LANGUAGE FlexibleContexts, ConstraintKinds #-} ----------------------------------------------------------------------------- -- | -- Module : Call.Util.Deck -- Copyright : (c) Fumiaki Kinoshita 2014 -- License : BSD3 -- -- Maintainer : Fumiaki Kinoshita <fumiexcel@gmail.com> -- Stability : experi...
fumieval/audiovisual
src/Audiovisual/Sampler.hs
Haskell
bsd-3-clause
1,505
{-# LANGUAGE CPP, OverloadedStrings #-} -- | DNS Resolver and generic (lower-level) lookup functions. module Network.DNS.Resolver ( -- * Documentation -- ** Configuration for resolver FileOrNumericHost(..), ResolvConf(..), defaultResolvConf -- ** Intermediate data type for resolver , ResolvSeed, makeResolv...
greydot/dns
Network/DNS/Resolver.hs
Haskell
bsd-3-clause
17,032
{-# LANGUAGE PatternSynonyms #-} module System.Win32.SystemServices.Services ( HandlerFunction , ServiceMainFunction , SCM_ACCESS_RIGHTS (..) , SVC_ACCESS_RIGHTS (..) , SERVICE_ACCEPT (..) , SERVICE_CONTROL (..) , SERVICE_ERROR (..) , SERVICE_STATE (..) , pattern SERVICE_CONTINUE_PEN...
nick0x01/Win32-services
src/System/Win32/SystemServices/Services.hs
Haskell
bsd-3-clause
18,709
import Criterion.Main import IOCP.Windows main = defaultMain [bench "getLastError" getLastError]
joeyadams/hs-windows-iocp
lab/bench-getLastError.hs
Haskell
bsd-3-clause
98
{-# LANGUAGE OverloadedStrings #-} module ReadXLSX.AllSheetsToJSON where import Codec.Xlsx import Data.Aeson (encode, Value) import Data.ByteString.Lazy (ByteString) import qualified Data.Map as DM import Data.Text (Text) import ReadXLSX.S...
stla/jsonxlsx
src/ReadXLSX/AllSheetsToJSON.hs
Haskell
bsd-3-clause
1,648
module Termination.Generaliser where import Core.Renaming (Out) import Core.Syntax (Var) import Evaluator.Syntax import Utilities (FinMap, FinSet, Tag, Tagged, injectTag, tag, tagInt) import qualified Data.IntMap as IM import qualified Data.IntSet as IS data Generaliser = Generaliser { generaliseStackFrame :: ...
osa1/chsc
Termination/Generaliser.hs
Haskell
bsd-3-clause
1,227
{-# LANGUAGE RecordWildCards #-} module Target ( targetRules ) where import Control.Applicative ((<$>)) import Control.Monad (forM_, when) import Development.Shake import Development.Shake.FilePath import Config import Dirs import LocalCommand import HaddockMaster import OS import Paths import PlatformDB i...
bgamari/haskell-platform
hptool/src/Target.hs
Haskell
bsd-3-clause
6,025
----------------------------------------------------------------------------- -- | -- Module : Language.Pylon.Util.Generics -- Copyright : Lukas Heidemann 2014 -- License : BSD -- -- Maintainer : lukasheidemann@gmail.com -- Stability : experimental -- Portability : semi-portable -------------------...
zrho/pylon
src/Language/Pylon/Util/Generics.hs
Haskell
bsd-3-clause
1,242
{-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -fno-warn-partial-type-signatures #-} module MultiClockFifo where import CLaSH.Prelude import CLaSH.Prelude.Explicit import Data.Maybe (isJust) fifoMem wclk rclk addrSize wfull raddr wdataM = asyncRam' wclk rclk (pow2SNat addrSize) ...
trxeste/wrk
haskell/cl3sh/MultiClockFifo.hs
Haskell
bsd-3-clause
2,032
-------------------------------------------------------------------------- -- | -- Module : Language.Assembly.X86 -- Copyright : (c) Martin Grabmueller and Dirk Kleeblatt -- License : BSD3 -- -- Maintainer : martin@grabmueller.de,klee@cs.tu-berlin.de -- Stability : provisional -- Portability : porta...
cnc-patch/disass
src/Language/Assembly/X86.hs
Haskell
bsd-3-clause
5,729
module Control.ComonadTrans where import Prelude() import Control.Comonad class ComonadTrans f where lower :: Comonad g => f g a -> g a
tonymorris/lens-proposal
src/Control/ComonadTrans.hs
Haskell
bsd-3-clause
152
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Check -- Copyright : Lennart Kolmodin 2008 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This has code for checking for various p...
garetxe/cabal
Cabal/Distribution/PackageDescription/Check.hs
Haskell
bsd-3-clause
74,822
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-} module Behave.Units ( module Export , DMoisture , DFraction , DRatio ...
albertov/behave-hs
src/Behave/Units.hs
Haskell
bsd-3-clause
3,872
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Data/Text/Internal/Read.hs" #-} -- | -- Module : Data.Text.Internal.Read -- Copyright : (c) 2014 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : GHC -- -- Common internal functions for reading...
phischu/fragnix
tests/packages/scotty/Data.Text.Internal.Read.hs
Haskell
bsd-3-clause
1,641
module Hint.Sandbox ( sandboxed ) where import Hint.Base import Hint.Context import Hint.Configuration import Hint.Util import {-# SOURCE #-} Hint.Typecheck ( typeChecks_unsandboxed ) import Control.Monad.Catch sandboxed :: MonadInterpreter m => (Expr -> m a) -> (Expr -> m a) sandboxed = if ghcVersion >= 610 then i...
konn/hint-forked
src/Hint/Sandbox.hs
Haskell
bsd-3-clause
3,665
{-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} #ifdef TRUSTWORTHY {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Internal.FieldTH -- Copyright : (C) 2014-2015 Edward Kmett, (C) 2014 Eric Mertens -- License ...
timjb/lens
src/Control/Lens/Internal/FieldTH.hs
Haskell
bsd-3-clause
21,608
module Test () where {-@ foo :: {vv:[{v:[a]|((len v) = 1)}]|((len vv)= 1)} -> [[a]] @-} foo [[x]] = [[x]]
abakst/liquidhaskell
tests/pos/grty2.hs
Haskell
bsd-3-clause
110
module Vec0 () where import Language.Haskell.Liquid.Prelude import Data.Vector hiding(map, concat, zipWith, filter, foldl, foldr, (++)) xs = [1,2,3,4] :: [Int] vs = fromList xs --prop0 = liquidAssertB (x >= 0) -- where x = Prelude.head xs -- --prop1 = liquidAssertB (n > 0) -- where n = Prelude.lengt...
mightymoose/liquidhaskell
tests/neg/vector0a.hs
Haskell
bsd-3-clause
472
module T5776 where -- The point about this test is that we should get a rule like this: -- "foo" [ALWAYS] -- forall (@ a) -- ($dEq :: Eq a) -- ($dEq1 :: Eq a) -- (x :: a) -- (y :: a) -- (z :: a). -- T5776.f (g @ a $dEq1 x y) -- (g @ a $dEq y z) -...
ezyang/ghc
testsuite/tests/simplCore/should_compile/T5776.hs
Haskell
bsd-3-clause
713
module Main where import Control.Monad (forever, when) import Data.List (intercalate) import Data.Traversable (traverse) import Morse (stringToMorse, morseToChar) import System.Environment (getArgs) import System.Exit (exitFailure, exitSuccess) import System.IO (hGetLine, hIsEOF, stdin) convertToM...
candu/haskellbook
ch14/morse/src/Main.hs
Haskell
mit
1,530
module Handler.Repo where import Import import Data.Maybe (fromJust) import qualified GitHub as GH getRepoR :: Text -> Text -> Handler Html getRepoR ownerLogin name = do -- TODO: Factor all this out. userId <- requireAuthId user <- runDB $ get userId let token = userToken $ fromJust user client <...
jspahrsummers/ScrumBut
Handler/Repo.hs
Haskell
mit
541
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UnicodeSyntax #-} module Main where import Test.Hspec import Test.QuickCheck import Data.Word (Word8) import ...
ayberkt/pixs
tests/Spec.hs
Haskell
mit
7,253
{-# LANGUAGE OverloadedStrings #-} module JoScript.Util.JsonTest (tests) where import Prelude (flip, String, ($), Int) import Test.HUnit import JoScript.Util.Json import Data.Aeson hiding (withObject) tests = [ TestLabel "JoScript.Util.JsonTest.withObject" withObjectUniques , TestLabel "JoScript.Util.JsonTes...
AKST/jo
source/test/JoScript/Util/JsonTest.hs
Haskell
mit
848
{-| Module: Treb.Routes Description: Trebuchet types. Copyright: Travis Whitaker 2015 License: MIT Maintainer: twhitak@its.jnj.com Stability: Provisional Portability: POSIX -} {-# LANGUAGE DataKinds, PolyKinds, RankNTypes, TypeFamilies, TypeOperators, ScopedTypeVariables, OverloadedStrings, ...
MadSciGuys/trebuchet
src/Treb/Routes.hs
Haskell
mit
2,268
module Network.S3URLSpec ( main , spec ) where import Prelude import Control.Lens import Data.Aeson import Data.Monoid ((<>)) import Network.S3URL import Network.AWS ( Endpoint , Region(..) , _svcEndpoint , endpointHost , endpointPort , endpointSecure ) import Network.AWS.S3 (B...
pbrisbin/tee-io
test/Network/S3URLSpec.hs
Haskell
mit
2,253
import Graphics.Gloss import System.IO.Unsafe import System.Environment import Data.Char -- | Main entry point to the application. -- | module Main where -- | The main entry point. main = animate (InWindow "Sierpinski Triangles" (500, 650) (20, 20)) black (picture_sierpinski getDegree) getDegree :: Int getDegre...
kylegodbey/haskellProject
src/sierpinski.hs
Haskell
mit
1,256
module Util.TextPos ( TextPos(..), append ) where import qualified Data.ByteString.UTF8 as BS import Data.Monoid type Line = Int type Column = Int data TextPos = TextPos !Line !Column deriving (Eq,Show) instance Monoid TextPos where mempty = TextPos 0 0 mappend (TextPo...
DrNico/rhodium
tools/rhc-strap/Util/TextPos.hs
Haskell
mit
648
module Data.AER where
fhaust/aer
src/Data/AER.hs
Haskell
mit
29
module Decibel (Decibel, mkDecibel, toDecibel, fromDecibel) where data Decibel a = Decibel a instance Show a => Show (Decibel a) where show (Decibel a) = show a mkDecibel :: a -> Decibel a mkDecibel x = Decibel x -- from linear to decibels toDecibel :: (Floating ...
Vetii/SCFDMA
src/Decibel.hs
Haskell
mit
517
let timeAction action = getCurrentTime >>= (\t1 -> action >>= (\g -> getCurrentTime >>= (\t2 -> let timeInUnits = (realToFrac $ diffUTCTime t2 t1 :: Float) in return timeInUnits))) let runData f = randomIO >>= (\randomChar -> if (last (show f)) == randomChar then return () else return ()) -- TODO: deepseq let timeDat...
jprider63/LMonad
benchmark/bench.hs
Haskell
mit
683
-- Generated by protobuf-simple. DO NOT EDIT! module Types.Fixed64List where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype Fixed64List = Fixed64List { value :: PB.Seq PB.Word64 } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default Fixed64List where defau...
sru-systems/protobuf-simple
test/Types/Fixed64List.hs
Haskell
mit
852
-- This is a helper module, defining some commonly used code. -- Other lessons can import this module. module Helper ( module Lesson01 ) where import Lesson01 (Suit (..), Rank (..), Card (..), deck)
snoyberg/haskell-impatient-poker-players
src/Helper.hs
Haskell
mit
208
dopt_set dfs f = dfs{ dumpFlags = IntSet.insert (fromEnum f) (dumpFlags dfs) }
chreekat/vim-haskell-syntax
test/golden/toplevel/with-rec-update-after-eq.hs
Haskell
mit
79
module Main where import Test.Tasty -- import Test.Tasty.QuickCheck as QC -- import Test.Tasty.HUnit as HU -- import Test.Tasty.Golden as TG -- import Test.Tasty.Hspec tests :: TestTree tests = testGroup "cabal-new" [ -- testCase "something" specs ] main :: IO () main = defaultMain tests
erochest/cabal-new
specs/Specs.hs
Haskell
apache-2.0
305
-- Defines a list of tests that test the "show" aspects of expressions -- that is, how they are rendered in to strings by the "show" function module UnitTests.Show where import Test.HUnit (Test(TestCase, TestLabel)) import CAS import UnitTests.Base tests = [ TestLabel "Rendering plain symbols" $ ...
abid-mujtaba/haskell-cas
test/UnitTests/Show.hs
Haskell
apache-2.0
3,493
<?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="ru-RU"> <title>Getting started Guide</title> <maps> <homeID>top</homeID> <mapref locati...
secdec/zap-extensions
addOns/gettingStarted/src/main/javahelp/org/zaproxy/zap/extension/gettingStarted/resources/help_ru_RU/helpset_ru_RU.hs
Haskell
apache-2.0
977
{- Copyright 2018 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
tgdavies/codeworld
codeworld-prediction/src/CodeWorld/Prediction/Trivial.hs
Haskell
apache-2.0
5,164
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextEdit_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do n...
keera-studios/hsQt
Qtc/Gui/QTextEdit_h.hs
Haskell
bsd-2-clause
72,016
module GTKInitialization ( initUI , buildUI , setupUI , startUI ) where import BattleContext import GTKContext import GTKMainWindow import GTKButtonPanel import GTKOverlay import GTKUnit import qualified Data.Text as DT import Data.IORef import Control.Monad.Trans import Control.Monad.Trans.Reader import...
nbrk/ld
executable/GTK.hs
Haskell
bsd-2-clause
2,269
module TestImport ( module TestImport , module X ) where import Test.Hspec as X import Data.Text as X (Text) import Database.Persist.Sqlite as X import Control.Monad.IO.Class as X (liftIO, MonadIO) import Control.Monad ...
rzetterberg/orgmode-sql
test/TestImport.hs
Haskell
bsd-3-clause
2,708
import qualified Wigner.Transformations as T import qualified Wigner.Symbols as S import qualified Wigner.DefineExpression as D import qualified Wigner.OperatorAlgebra as O import Wigner.Texable import Wigner.Expression import qualified Data.Map as M import qualified Data.List as L index :: Integer -> Index index i =...
fjarri/wigner
examples/master_equation.hs
Haskell
bsd-3-clause
1,759
-- | https://github.com/eugenkiss/7guis/wiki#the-seven-tasks module LGtk.Demos.SevenGuis.Timer (timer) where import Control.Monad import Control.Lens import LGtk import Numeric timer :: Widget timer = do d <- newRef 10.0 e <- liftM (lensMap _2) $ extendRef d (lens fst $ \(_, t) d -> (d, min t d) ) (0, 0) ...
divipp/lgtk
lgtkdemo/LGtk/Demos/SevenGuis/Timer.hs
Haskell
bsd-3-clause
1,044
-- | Functions to create a Fragment for (parts of) an abstract syntax tree. module Language.Python.TypeInference.CFG.ToFragment ( convertModule, runConversion, ConversionState ) where import Control.Monad.State import Data.Map (Map) import Data.Maybe import Data.Set (Set) import Language.Python.Common.SrcL...
lfritz/python-type-inference
python-type-inference/src/Language/Python/TypeInference/CFG/ToFragment.hs
Haskell
bsd-3-clause
45,554
----------------------------------------------------------------------------- -- | -- Module : Text.Show.Functions -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Por...
OS2World/DEV-UTIL-HUGS
libraries/Text/Show/Functions.hs
Haskell
bsd-3-clause
694
-- | Ch04a module Ch04a where multThree :: (Num a) => a -> a -> a -> a multThree x y z = x * y * z compareWithHundred :: (Num a, Ord a) => a -> Ordering compareWithHundred = flip compare 100 divideByTen :: (Floating a) => a -> a divideByTen = (/ 10) isUpperAlphanum :: Char -> Bool isUpperAlphanum = (`elem` ['A'..'...
codingiam/sandbox-hs
src/Ch04a.hs
Haskell
bsd-3-clause
2,303
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Main where #if !(MIN_VERSION_base(4,11,0)) import Data.Monoid ((<>)) #endif import qualified Graphics.Vty as V import Brick.Main (App(..), defaultMain, resizeOrQuit, neverShowCursor) import Brick.Types ( Widget , Padding(..) ) import Brick.Widgets.C...
sjakobi/brick
programs/MarkupDemo.hs
Haskell
bsd-3-clause
1,202
{-# LANGUAGE NoImplicitPrelude #-} module Protocol.ROC.PointTypes.PointType48 where import Data.Binary.Get (getByteString,getWord8,Get) import Data.ByteString (ByteString) import Data.Word (Word8) import Prelude (($), return, Eq, ...
plow-technologies/roc-translator
src/Protocol/ROC/PointTypes/PointType48.hs
Haskell
bsd-3-clause
13,232
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DataKinds #-} #if __GLASGOW_HASKELL__ < 800 {-# OPTIONS_GHC -fcontext-stack=26 #-} #else {-# OPTIONS_GHC -freduction-depth=0 #-} #endif -------------------------------------------------------------------------------- -- | -- Module : Databas...
YoEight/eventstore
Database/EventStore/Internal/Operation/ReadEvent/Message.hs
Haskell
bsd-3-clause
2,800
module Day11 where import Control.Arrow import Data.Function import Data.List import Data.Maybe partOne = nextGoodPass input partTwo = nextGoodPass partOne nextGoodPass :: String -> String nextGoodPass s = fromJust $ find goodPass $ filter (/= s) $ iterate nextWord s nextWord...
z0isch/advent-of-code
src/Day11.hs
Haskell
bsd-3-clause
1,085
-- | All types. module Senza.Types (Senza) where import Text.Blaze.Html (Markup) -- | The type for an HTML value. In case blaze changes its type again. type Senza = Markup
chrisdone/senza
src/Senza/Types.hs
Haskell
bsd-3-clause
179
module TestImportFile (tests) where import Asserts import Bucket.Import import Bucket.Types import Control.Exception import Fixtures import Prelude hiding (catch) import System.FilePath import Test.Hspec.HUnit() import Test.Hspec.Monadic import Test.Hspec.QuickCheck import Test.HUnit import Test.QuickCheck tests = de...
rickardlindberg/orgapp
tests/TestImportFile.hs
Haskell
bsd-3-clause
3,329
module MatchTheTypes where import Data.List (sort) i :: Num a => a i = 1 f :: Fractional a => a f = 1.0 g :: RealFrac a => a g = 1.0 freud :: Ord a => a -> a freud x = x freud' :: Int -> Int freud' x = x myX = 1 :: Int sigmund :: Int -> Int sigmund x = myX jung :: Ord a => [a] -> a jung xs = head (sort xs) j...
chengzh2008/hpffp
src/ch06-Typeclasses/matchTheTypes.hs
Haskell
bsd-3-clause
714
module RDSTests.EventSubscriptionTests ( runEventSubscriptionTests ) where import Control.Applicative ((<$>)) import Control.Monad.IO.Class (liftIO) import Data.Text (Text) import Test.Hspec import Cloud.AWS.RDS import Cloud.AWS.RDS.Types (SourceType(..), DBInstance(..)) import Util import RDSTests.Util ...
worksap-ate/aws-sdk
test/RDSTests/EventSubscriptionTests.hs
Haskell
bsd-3-clause
3,090
module Main where import AOC2015.Day01 import AOC2015.Day02 import AOC2015.Day03 import AOC2015.Day04 import AOC2015.Day05 import AOC2015.Day06 import AOC2015.Day07 import AOC2015.Day08 import AOC2015.Day09 import AOC2015.Day10 import AOC2015.Day11 import AOC2015.Day12 import AOC2015.Day13 import AOC2015.Day14 import ...
bitrauser/aoc
src/Main.hs
Haskell
bsd-3-clause
599
module Main where import ABS (x:i:ni:num_div:obj:i_divides:f:n:primeb:reminder:res:the_end) = [1..] main_ :: Method main_ [] this wb k = Assign n (Val (I 2500)) $ Assign x (Sync is_prime [n]) $ k is_prime :: Method is_prime [pn] this wb k = Assign i (Val (I 1)) $ Assign ni (Val (I pn)) $ Assign num_d...
abstools/abs-haskell-formal
benchmarks/2_primality_test/progs/2500.hs
Haskell
bsd-3-clause
1,111
module Prosper.Money where type Money = Double
WraithM/prosper
src/Prosper/Money.hs
Haskell
bsd-3-clause
48
{-# LANGUAGE MultiParamTypeClasses #-} module Physics.Falling2d.OrthonormalBasis2d ( ) where import Data.Vect.Double.Base import Physics.Falling.Math.OrthonormalBasis instance OrthonormalBasis Vec2 Normal2 where canonicalBasis = [ toNormalUnsafe $ Vec2 1.0 0.0, toNormalUnsafe $ Vec2 0.0 1.0 ] completeBasis n = ...
sebcrozet/falling2d
Physics/Falling2d/OrthonormalBasis2d.hs
Haskell
bsd-3-clause
409
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} module Lucid.Foundation.Callouts.Joyride where import Lucid.Base import Lucid.Html5 import qualified Data.Text as T import Data.Monoid joyride_list_ :: T.Text joyride_list_ = " joyride-list " joyride_tip_guide_ :: T.Text joyride_tip_guide_ = ...
athanclark/lucid-foundation
src/Lucid/Foundation/Callouts/Joyride.hs
Haskell
bsd-3-clause
632
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Indexed.Command -- Copyright : (C) 2012 Edward Kmett -- License : BSD-style (see the file LICENSE)...
ekmett/indexed
src/Indexed/Command.hs
Haskell
bsd-3-clause
734
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} -- | -- Module : Codec.Rot13 -- Description : Fast ROT13 cipher for Haskell. -- Copyright : (c) Kyle Van Berendonck, 2014 -- License : BSD3 -- Maintainer : kvanberendonck@gmail.com -- Stability : experim...
kvanberendonck/codec-rot13
src/Codec/Rot13.hs
Haskell
bsd-3-clause
6,251
{-# LANGUAGE OverloadedStrings #-} module Graphics.Storyboard.Box where import Data.Monoid import qualified Data.Set as Set import Data.Set (Set) import Data.Text (Text) import Graphics.Blank as Blank import qualified Graphics.Blank.Style as Style import Graphics.Sto...
tonymorris/story-board
src/Graphics/Storyboard/Box.hs
Haskell
bsd-3-clause
4,086
{-# LANGUAGE RankNTypes #-} module Node.Message.Decoder ( Decoder (..) , DecoderStep (..) , ByteOffset , continueDecoding , hoistDecoder , hoistDecoderStep , pureDone , pureFail , purePartial ) where import qualified Data.ByteString as BS import Data.Int (Int64) impor...
input-output-hk/pos-haskell-prototype
networking/src/Node/Message/Decoder.hs
Haskell
mit
1,954
module Data.String.Util ( split ) where -- | /O(n)/ Splits a 'String' into components delimited by separators, -- where the predicate returns True for a separator element. The -- resulting components do not contain the separators. Two adjacent -- separators result in an empty component in the output. eg. -- -- >>...
beni55/string
src/Data/String/Util.hs
Haskell
mit
557
module TypeConstraint where {-- snippet OrdStack --} data (Ord a) => OrdStack a = Bottom | Item a (OrdStack a) deriving (Show) {-- /snippet OrdStack --} {-- snippet isIncreasing --} isIncreasing :: (Ord a) => OrdStack a -> Bool isIncreasing (Item a rest@(Item b ...
binesiyu/ifl
examples/ch10/TypeConstraint.hs
Haskell
mit
550
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : Glome.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:42 Warning : this file is machine generated - do not mod...
keera-studios/hsQt
extra-pkgs/Glome/Qt/Glome.hs
Haskell
bsd-2-clause
682
module Main where import Lib main :: IO () main = someFunc {-99 Haskell Problems-} {-| Get the last element of a list-} myLast :: [a] -> a myLast [x] = x myLast (_:xs) = myLast xs {-| Get the second to last element of a list-} myButtLast :: [a] -> a myButtLast [x, _] = x myButtLast (_:xs) = myButtLast xs {-| Get...
MauriceIsAG/HaskellScratch
.stack-work/intero/intero1846heo.hs
Haskell
bsd-3-clause
7,113
import Development.Shake import Development.Shake.System import System.FilePath main :: IO () main = shake $ do ("subdirectory" </> "foo") *> \x -> do system' $ ["touch",x] want ["subdirectory/foo"]
beni55/openshake
tests/creates-directory-implicitly/Shakefile.hs
Haskell
bsd-3-clause
218
module ShallowVector where import qualified Data.Vector.Unboxed as V import Types import Debug.Trace {-# RULES "darkenBy.brightenBy" forall im1 n. darkenBy n (brightenBy n im1) = im1 #-} {-# RULES "brightenBy.darkenBy" forall im1 n. brightenBy n (darkenBy n im1) = im1 #-} -- TODO: overload + and - to be brightenBy ...
robstewart57/small-image-processing-dsl-implementations
haskell/small-image-processing-dsl/src/ShallowVector.hs
Haskell
bsd-3-clause
2,036
{-# LANGUAGE PatternGuards #-} module Main (main) where import Network.HTTP hiding (password) import Network.Browser import Network.URI (URI(..), parseRelativeReference, relativeTo) import Distribution.Client import Distribution.Client.Cron (cron, rethrowSignalsAsExceptions, Signal(.....
agrafix/hackage-server
BuildClient.hs
Haskell
bsd-3-clause
35,442
----------------------------------------------------------------------------- -- -- Object-file symbols (called CLabel for histerical raisins). -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module CLabel ( CLabel, -- abstract type...
mcmaniac/ghc
compiler/cmm/CLabel.hs
Haskell
bsd-3-clause
46,035
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcInstDecls: Typechecking instance declarations -} {-# LANGUAGE CPP #-} module ETA.TypeCheck.TcInstDcls ( tcInstDecls1, tcInstDecls2 ) where import ETA.HsSyn.HsSyn import ETA.TypeCheck.TcBinds import ETA.TypeCheck.TcTyCl...
pparkkin/eta
compiler/ETA/TypeCheck/TcInstDcls.hs
Haskell
bsd-3-clause
64,101
-- | This module defines 'TriggerEvent', which describes actions that may create -- new 'Event's that can be triggered from 'IO'. {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE UndecidableInstances #-} module Reflex.TriggerEvent.Class ( TriggerEvent (..) ) where import Refl...
ryantrinkle/reflex
src/Reflex/TriggerEvent/Class.hs
Haskell
bsd-3-clause
2,839
module Dwarf.Types ( -- * Dwarf information DwarfInfo(..) , pprDwarfInfo , pprAbbrevDecls -- * Dwarf frame , DwarfFrame(..), DwarfFrameProc(..), DwarfFrameBlock(..) , pprDwarfFrame -- * Utilities , pprByte , pprData4' , pprDwWord , pprWord , pprLEBWord , pprLEBInt , wordAlign , sec...
urbanslug/ghc
compiler/nativeGen/Dwarf/Types.hs
Haskell
bsd-3-clause
17,462
{-| Module : Idris.Elab.Type Description : Code to elaborate types. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE PatternGuards #-} module Idris.Elab.Type ( buildType, elabType, elabType' , elabPostulate, elabExtern ) where import Idris.AbsSyntax import Idris.ASTUtils...
ozgurakgun/Idris-dev
src/Idris/Elab/Type.hs
Haskell
bsd-3-clause
11,785