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
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} module CorePrelude ( -- * Standard -- ** Operators (Prelude.$) , (Prelude.$!) , (Prelude.&&) , (Prelude.||) , (Control.Category..) -- ** Functions , Prelude.not , Prelude.otherwise , Prelude.fst , Prelude.snd ...
snoyberg/basic-prelude
src/CorePrelude.hs
Haskell
mit
6,110
flip f = \a b -> f b a
scravy/nodash
doc/Function/flip.hs
Haskell
mit
23
module Tools.Mill.Table where import Data.ByteString import Text.Parsec.Prim import Text.Parsec.Char import Text.Parsec.Combinator import Text.Parsec.ByteString (GenParser) import qualified Data.ByteString.Char8 as C import Control.Applicative ((<$>), (<*>), (*>), (<*)) type Colname = ByteString type DataLine...
lucasdicioccio/mill
Tools/Mill/Table.hs
Haskell
mit
518
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Data.CmdItemSpec (main, spec) where #if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>), (<*>)) #endif import Test.Hspec import Test.Hspec.Laws import Test.QuickCheck import Test.QuickCheck.Instances (...
geraud/cmd-item
test/Data/CmdItemSpec.hs
Haskell
mit
551
module Barycenter where barTriang :: (Double, Double) -> (Double, Double) -> (Double, Double) -> (Double, Double) barTriang (a, b) (c, d) (e, f) = (x, y) where x = (a + c + e) / 3 y = (b + d + f) / 3
cojoj/Codewars
Haskell/Codewars.hsproj/Barycenter.hs
Haskell
mit
225
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-integration.html module Stratosphere.Resources.ApiGatewayV2Integration where import Stratosphere....
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ApiGatewayV2Integration.hs
Haskell
mit
8,500
module Problem047 where import Data.List main = print $ head $ dropWhile (not . c) [1..] where c x = all (== 4) $ map (nods !!) $ map (+ x) [0..3] nods = map (length . nub . divisors) [0..] divisors 0 = [] divisors 1 = [] divisors x = divisors' primes [] x where divisors' _ ds 1 = ds divisors' (p:ps)...
vasily-kartashov/playground
euler/problem-047.hs
Haskell
apache-2.0
593
{-# LANGUAGE OverloadedStrings #-} module Model.Service where import Control.Applicative import Control.Monad import Data.Aeson import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C import Data.Map (Map) import ...
alexandrelucchesi/pfec
server-common/src/Model/Service.hs
Haskell
apache-2.0
2,064
{-# LANGUAGE TemplateHaskell #-} import HMSTimeSpec import FFMpegCommandSpec main :: IO () main = do runHMSTimeSpecTests runFFMpegCommandTests return ()
connrs/ffsplitgen
out/production/ffsplitgen/test/Spec.hs
Haskell
apache-2.0
167
import Data.Char ans :: String -> String ans [] = [] ans (c:cs) | isUpper c = (toLower c):(ans cs) | isLower c = (toUpper c):(ans cs) | otherwise = c:(ans cs) main = do c <- getContents let i = lines c o = map ans i mapM_ putStrLn o
a143753/AOJ
ITP1_8_A.hs
Haskell
apache-2.0
259
{-# LANGUAGE TupleSections, OverloadedStrings, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Handler.Asset where import Import import qualified Data.Text import Database.Persist.GenericSql import Handler.Utils import Handler.Rent (assetRentFormWidgetM) import Handler.Review (reviewF...
Tener/personal-library-yesod
Handler/Asset.hs
Haskell
bsd-2-clause
8,574
{-# LANGUAGE CPP, DeriveDataTypeable, MagicHash, UnboxedTuples #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.STM.TMVar -- Copyright : (c) The University of Glasgow 2004 -...
gridaphobe/packages-stm
Control/Concurrent/STM/TMVar.hs
Haskell
bsd-3-clause
4,893
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Snap.Chat.Internal.Types where ------------------------------------------------------------------------------ import Control....
snapframework/cufp2011
sample-implementation/Snap/Chat/Internal/Types.hs
Haskell
bsd-3-clause
4,997
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -Wall -fno-warn-orphans -fno-warn-type-defaults #-} -- | Orphan 'FromJSON' and 'ToJSON' instances for certain Cryptol -- types. Since the...
ntc2/cryptol
cryptol-server/Cryptol/Aeson.hs
Haskell
bsd-3-clause
7,781
{-# LANGUAGE PackageImports ,FlexibleInstances ,MultiParamTypeClasses#-} module PkgCereal(PkgCereal(..),Data.Serialize.Serialize,sd) where import Control.Exception import Types hiding (Serialize) import qualified Types as T import Test.Data import Test.Data.Values import qualified Data.ByteString.Lazy as L import "c...
tittoassini/flat
benchmarks/PkgCereal.hs
Haskell
bsd-3-clause
5,593
{-# LANGUAGE ExistentialQuantification #-} module Main where import Scheme() import Text.ParserCombinators.Parsec hiding (spaces) import System.Environment import Numeric import GHC.Real import Data.Char import Data.Complex import Data.IORef import Data.Maybe import Control.Monad.Except import System.IO symbol :: Pa...
wat-aro/scheme
app/Main.hs
Haskell
bsd-3-clause
29,792
{-# LANGUAGE FlexibleContexts, RankNTypes #-} module EC2Tests.AvailabilityZoneTests ( runAvailabilityZoneTests ) where import Data.Text (Text) import Test.Hspec import Cloud.AWS.EC2 import Util import EC2Tests.Util region :: Text region = "ap-northeast-1" runAvailabilityZoneTests :: IO () runAvailabili...
worksap-ate/aws-sdk
test/EC2Tests/AvailabilityZoneTests.hs
Haskell
bsd-3-clause
673
import Distribution.Simple import Distribution.Simple.Setup import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import qualified Distribution.LV2 as LV2 main = defaultMainWithHooks simpleUserHooks { confHook = LV2.confHook simpleUserHooks }
mmartin/haskell-lv2
examples/amp-lv2/Setup.hs
Haskell
bsd-3-clause
268
-- | Description: Applicative order evaluation Krivine machine. module Rossum.Krivine.Eager where import Data.Maybe import Rossum.Krivine.Term data Sided a = L | V a | R deriving (Show) type Configuration = (Env, Maybe Term, Stack (Sided Closure)) -- | Step an applicative order Krivine machin...
thsutton/rossum
src/Rossum/Krivine/Eager.hs
Haskell
bsd-3-clause
1,276
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Language.Haskell.Liquid.Prelude [lq| assume foo :: {v:Bool | (Prop v)} |] foo = False bar = liquidAssertB foo
spinda/liquidhaskell
tests/gsoc15/unknown/pos/Assume.hs
Haskell
bsd-3-clause
174
module MultiLinear.Class where import Rotation.SO2 import Rotation.SO3 import Exponential.SO3 import qualified Linear.Matrix as M import Data.Distributive import Linear.V3 class MultiLinear f where (!*!) :: Num a => f a -> f a -> f a transpose :: Num a => f a -> f a r0 = rotation (V3 0.1 0.1 0.1) r1 = rotatio...
massudaw/mtk
MultiLinear/Class.hs
Haskell
bsd-3-clause
682
module Genotype.Types where import Data.Text (Text) data BasePair = C | T | A | G deriving (Eq, Show) data Name = Name Text Text (Maybe Char) deriving (Eq, Show) data Datum = Missing | Estimated BasePair | Certain BasePair deriving (Eq, Show) data Genotype = Genotype { geno_name :: Name , geno_subpopLa...
Jonplussed/genotype-parser
src/Genotype/Types.hs
Haskell
bsd-3-clause
391
{-# OPTIONS_GHC -fno-warn-unused-binds #-} {- | Provides a representation for (top-level) integer term rewrite systems. See <http://aprove.informatik.rwth-aachen.de/help_new/inttrs.html> for details. Example: @ outer(x, r) -> inner(1, 1, x, r) [ x >= 0 && r <= 100000 ] inner(f, i, x, r) -> inner(f + i...
ComputationWithBoundedResources/tct-inttrs
src/Tct/IntTrs.hs
Haskell
bsd-3-clause
26,631
{-# LANGUAGE FlexibleContexts #-} import Plots import Plots.Axis import Plots.Types hiding (B) import Data.List import Diagrams.Prelude import Diagrams.Backend.Rasterific mydata1 = [(1,3), (2,5.5), (3.2, 6), (3.5, 6.1)] mydata2 = mydata1 & each . _1 *~ 0.5 mydata3 = [V2 1.2 2.7, V2 2 5.1, V2 3.2 2.6, V2 3.5 5] -- ...
bergey/plots
examples/ribbonopacity.hs
Haskell
bsd-3-clause
1,247
{-# LANGUAGE FlexibleContexts #-} module Database.Redis.Internal where import Control.Monad.Trans ( MonadIO, liftIO ) import Control.Failure ( MonadFailure, failure ) import Data.Convertible.Base ( convertUnsafe ) import Data.Convertible.Instances ( ) import Database.Redis.Core import System.IO...
brandur/redis-haskell
src/Database/Redis/Internal.hs
Haskell
bsd-3-clause
3,957
{-# OPTIONS -fglasgow-exts #-} module LogicExample where import Language.GroteTrap import Data.Generics hiding (Prefix) import Data.Set hiding (map) -- Logic data structure. data Logic = Var String | Or [Logic] | And [Logic] | Impl Logic Logic | Not Logic deriving (Show, Eq, Typeable, Data) type Logi...
MedeaMelana/GroteTrap
LogicExample.hs
Haskell
bsd-3-clause
1,566
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} module Syntax.Internal where import Control.Lens.Prism import Data.Map (Map) import Data.Text (Text) import Data.Vector (Vector) import Syntax.Common -- Would like to merge t...
Danten/lejf
src/Syntax/Internal.hs
Haskell
bsd-3-clause
4,829
import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.UserHooks import System.Directory import System.Exit import System.FilePath import System.Process testSuiteExe = "b1-tests" main :: IO () main = defaultMainWithHooks hooks hooks :: ...
btmura/b1
Setup.hs
Haskell
bsd-3-clause
642
module Data.MediaBus.Media.SyncStreamSpec ( spec, ) where import Control.Lens import Control.Monad.State import Data.Function import Data.MediaBus import Debug.Trace import Test.Hspec import Test.QuickCheck import FakePayload spec :: Spec spec = describe "setSequenceNumberAndTimestamp" $ do it "increases th...
lindenbaum/mediabus
specs/Data/MediaBus/Media/SyncStreamSpec.hs
Haskell
bsd-3-clause
3,912
{-| Module : Graphics.Mosaico.Ventana Description : Ventanas interactivas con distribuciones de rectángulos Copyright : ⓒ Manuel Gómez, 2015 License : BSD3 Maintainer : targen@gmail.com Stability : experimental Portability : portable Representación orientada a objetos de una ventana interactiva donde se ...
mgomezch/mosaico-lib
src/Graphics/Mosaico/Ventana.hs
Haskell
bsd-3-clause
8,806
{-| Implementation of the Ganeti confd utilities. This holds a few utility functions that could be useful in both clients and servers. -} {- Copyright (C) 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the fol...
mbakke/ganeti
src/Ganeti/Confd/Utils.hs
Haskell
bsd-2-clause
6,028
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | Main stack tool entry point. module Main where import...
lukexi/stack
src/main/Main.hs
Haskell
bsd-3-clause
41,959
foo x y = do c <- getChar return c
mpickering/ghc-exactprint
tests/examples/transform/Rename1.hs
Haskell
bsd-3-clause
47
module Dotnet.System.Xml.XmlNodeList where import Dotnet import qualified Dotnet.System.Object import Dotnet.System.Collections.IEnumerator import Dotnet.System.Xml.XmlNodeTy data XmlNodeList_ a type XmlNodeList a = Dotnet.System.Object.Object (XmlNodeList_ a) foreign import dotnet "method Dotnet.System.Xml.XmlNod...
FranklinChen/Hugs
dotnet/lib/Dotnet/System/Xml/XmlNodeList.hs
Haskell
bsd-3-clause
866
{-# LANGUAGE OverloadedStrings, BangPatterns #-} {-# LANGUAGE CPP #-} -- | -- Module : Crypto.PasswordStore -- Copyright : (c) Peter Scott, 2011 -- License : BSD-style -- -- Maintainer : pjscott@iastate.edu -- Stability : experimental -- Portability : portable -- -- Securely store hashed, salted passwords...
MaxGabriel/yesod
yesod-auth/Yesod/PasswordStore.hs
Haskell
mit
18,769
{-# OPTIONS_GHC -fno-warn-orphans #-} module Rules.Selftest (selftestRules) where import Hadrian.Haskell.Cabal import Test.QuickCheck import Base import Context import Oracles.ModuleFiles import Oracles.Setting import Packages import Settings import Target import Utilities instance Arbitrary Way where arbitrary ...
snowleopard/shaking-up-ghc
src/Rules/Selftest.hs
Haskell
bsd-3-clause
3,927
module DoIn1 where io s = do s <- getLine let q = (s ++ s) putStr q putStr "foo"
kmate/HaRe
old/testing/removeDef/DoIn1AST.hs
Haskell
bsd-3-clause
121
module Lit where {-@ test :: {v:Int | v == 3} @-} test = length "cat"
abakst/liquidhaskell
tests/pos/lit.hs
Haskell
bsd-3-clause
71
module Foo ( foo ) where foo :: IO () foo = putStrLn "foo2"
juhp/stack
test/integration/tests/2781-shadow-bug/files/foo/v2/Foo.hs
Haskell
bsd-3-clause
69
-- (c) The GHC Team -- -- Functions to evaluate whether or not a string is a valid identifier. -- There is considerable overlap between the logic here and the logic -- in Lexer.x, but sadly there seems to be way to merge them. module Lexeme ( -- * Lexical characteristics of Haskell names -- | Us...
green-haskell/ghc
compiler/basicTypes/Lexeme.hs
Haskell
bsd-3-clause
8,645
{-# LANGUAGE OverloadedStrings, BangPatterns #-} {-# LANGUAGE CPP #-} -- | -- Module : Crypto.PasswordStore -- Copyright : (c) Peter Scott, 2011 -- License : BSD-style -- -- Maintainer : pjscott@iastate.edu -- Stability : experimental -- Portability : portable -- -- Securely store hashed, salted passwords...
ygale/yesod
yesod-auth/Yesod/PasswordStore.hs
Haskell
mit
18,769
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GADTs #-} module T6137 where data Sum a b = L a | R b data Sum1 (a :: k1 -> *) (b :: k2 -> *) :: Sum k1 k2 -> * where LL :: a i -> Sum1 a b (L i) RR :: b i -> Sum1 a b (R i) data Code...
urbanslug/ghc
testsuite/tests/polykinds/T6137.hs
Haskell
bsd-3-clause
699
{-# LANGUAGE UndecidableInstances #-} module Tc173b where import Tc173a is :: () is = isFormValue (Just "")
urbanslug/ghc
testsuite/tests/typecheck/should_compile/Tc173b.hs
Haskell
bsd-3-clause
109
-- | Defines readers for reading tags of BACnet values module BACnet.Tag.Reader ( readNullAPTag, readNullCSTag, readBoolAPTag, readBoolCSTag, readUnsignedAPTag, readUnsignedCSTag, readSignedAPTag, readSignedCSTag, readRealAPTag, readRealCSTag, readDoubleAPTag, readDoubl...
michaelgwelch/bacnet
src/BACnet/Tag/Reader.hs
Haskell
mit
6,726
import Test.Hspec import Language.Paradocs.Renderer import Language.Paradocs.RendererState import Language.Paradocs.MonadStorage import qualified Data.HashMap.Strict as HashMap main :: IO () main = hspec $ do describe "%read" $ do let storage = HashMap.fromList [ ...
pasberth/paradocs
test/ReadInstructionSpec.hs
Haskell
mit
549
{-# LANGUAGE CPP #-} module Language.Haskell.Source.Enumerator ( enumeratePath ) where import Conduit import Control.Applicative import Control.Monad import Data.List import Distribution.PackageDescription import qualified Distribution.Verbosity as...
danstiner/hfmt
src/Language/Haskell/Source/Enumerator.hs
Haskell
mit
3,124
module BinaryTreesSpec (main, spec) where import Test.Hspec import BinaryTrees import Control.Exception (evaluate) main :: IO () main = hspec spec spec :: Spec spec = do describe "Preparering" $ do it "returns (Branch 1 Empty Empty) when x = 1" $ do leaf (1 :: Int) `shouldBe` Branch 1 Empty Empty desc...
yyotti/99Haskell
src/test/BinaryTreesSpec.hs
Haskell
mit
41,856
----------------------------------------------------------------------------- -- -- Module : Main -- Copyright : (c) 2013-15 Phil Freeman, (c) 2014-15 Gary Burgess -- License : MIT (http://opensource.org/licenses/MIT) -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- P...
michaelficarra/purescript
psc/Main.hs
Haskell
mit
6,388
module Text.Docvim.Visitor.Options (extractOptions) where import Control.Applicative import Text.Docvim.AST import Text.Docvim.Visitor -- | Extracts a list of nodes (if any exist) from the `@options` section(s) of -- the source code. -- -- It is not recommended to have multiple `@options` sections in a project. If --...
wincent/docvim
lib/Text/Docvim/Visitor/Options.hs
Haskell
mit
690
module Main where import System.Environment main :: IO () main = do -- args <- getArgs -- (arg0:arg1:restArgs) <- getArgs -- putStrLn $ "sum: " ++ show (read arg0 + read arg1) name <- getLine putStrLn $ "Your name is: " ++ name
dreame4/scheme-in-haskell
hello.hs
Haskell
mit
236
module Network.Skype.Protocol.User where import Data.Typeable (Typeable) import Network.Skype.Protocol.Types data UserProperty = UserHandle UserID | UserFullName UserFullName | UserBirthday (Maybe UserBirthday) | UserSex UserSex | UserLanguage (M...
emonkak/skype4hs
src/Network/Skype/Protocol/User.hs
Haskell
mit
3,059
{-# LANGUAGE CPP #-} module TCDExtra where import TCD import Data.Functor ((<$>)) import Data.List import System.Directory import System.FilePath import Text.Printf -- This is designed to match libtcd's dump_tide_record as closely as possible formatTideRecord :: TideRecord -> IO String formatTideRecord r = unli...
neilmayhew/Tides
TCDExtra.hs
Haskell
mit
3,769
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, DoAndIfThenElse #-} -- | This module provides a way in which the Haskell standard input may be forwarded to the IPython -- frontend and thus allows the notebook to use the standard input. -- -- This relies on the implementation of file handles in GHC, and is generally...
gibiansky/IHaskell
src/IHaskell/IPython/Stdin.hs
Haskell
mit
4,526
{-# LANGUAGE UnicodeSyntax #-} module Data.BEncode.Parser ( string , value ) where import Control.Applicative ((<|>)) import qualified Data.Attoparsec.ByteString.Char8 as AP (Parser, char, decimal, take) import qualified Data.Attoparsec.Combinator as AP (manyTill) import Data.BEncode.Types import Data.ByteStr...
drdo/swarm-bencode
Data/BEncode/Parser.hs
Haskell
mit
839
module Code where type BlockName = String type BlockId = Int type BlockCode = String
christiaanb/SoOSiM
examples/Twente/Code.hs
Haskell
mit
88
{-# LANGUAGE OverloadedStrings #-} -- You need to `cabal install css` import Language.CSS hiding (borderRadius, boxShadow, textShadow) import Data.Text.Lazy (Text,append,intercalate,pack) import qualified Data.Text.Lazy.IO as LIO import System (getArgs) main = do [path] <- getArgs LIO.writeFile path style style...
timjb/eine
public/style.hs
Haskell
mit
7,314
{-# LANGUAGE OverloadedStrings #-} module EDDA.Schema.ShipyardV2Test where import Test.HUnit import Data.Maybe (fromJust,isJust) import Data.Aeson import Data.Aeson.Types import qualified Data.ByteString.Char8 as C import qualified Data.HashSet as HS import Control.Monad.Trans.Reader import EDDA.Config import EDDA.S...
troydm/edda
test/EDDA/Schema/ShipyardV2Test.hs
Haskell
mit
1,666
-- generate code for combinators import List (intersperse) import Char (toUpper) import IO type Var = Char data Expr = EVar Var | EApp Expr Expr isVar, isApp :: Expr -> Bool isVar (EVar _) = True isVar _ = False isApp (EApp _ _) = True isApp _ = False eVar :: Expr -> Var eVar (EVar x) = x instance Sho...
bokesan/skred
tools/CombGen.hs
Haskell
mit
11,196
module Tuura.Fantasi.Main (main) where import Tuura.Fantasi.Options import qualified Pangraph.GraphML.Parser as P import qualified Tuura.Fantasi.VHDL.Writer as VHDL import Data.ByteString (readFile, writeFile) import Prelude hiding (readFile, writeFile) import Data.Maybe (maybe) main :: IO () main = do ...
tuura/fantasi
src/fantasi/Tuura/Fantasi/Main.hs
Haskell
mit
896
{-# LANGUAGE CPP #-} module Test.Hspec.Core.FailureReport ( FailureReport (..) , writeFailureReport , readFailureReport ) where import Prelude () import Test.Hspec.Core.Compat #ifndef __GHCJS__ import System.SetEnv (setEnv) import Test.Hspec.Core.Util (safeTry) #endif import ...
hspec/hspec
hspec-core/src/Test/Hspec/Core/FailureReport.hs
Haskell
mit
2,326
-- | Query and update documents {-# LANGUAGE OverloadedStrings, RecordWildCards, NamedFieldPuns, TupleSections, FlexibleContexts, FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving, StandaloneDeriving, TypeSynonymInstances, TypeFamilies, CPP, DeriveDataTypeable, ScopedTypeVariab...
Yuras/mongodb
Database/MongoDB/Query.hs
Haskell
apache-2.0
69,101
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, RecordWildCards, UnboxedTuples, UnliftedFFITypes #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- | -- Module : Data.Text.Array -- Copyright : (c) 2009, 2010, 2011 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- P...
bgamari/text
src/Data/Text/Array.hs
Haskell
bsd-2-clause
7,903
module Compiler.CodeGeneration.CompilationState where import Control.Monad.State import Data.Set as Set import Data.Ix import Compiler.CodeGeneration.InstructionSet import Compiler.CodeGeneration.SymbolResolution import Compiler.CodeGeneration.LabelResolution import Compiler.CodeGeneration...
michaelmelanson/cminus-compiler
Compiler/CodeGeneration/CompilationState.hs
Haskell
bsd-2-clause
5,583
module RePack where import CLaSH.Prelude topEntity :: (Unsigned 1,Unsigned 1) topEntity = (unpack (pack True), unpack (pack False))
ggreif/clash-compiler
tests/shouldwork/BitVector/RePack.hs
Haskell
bsd-2-clause
134
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Trustworthy #-} -- | Provide primitives to communicate among family members. It provides an API for sequential 'linkMAC' and concurrent ('forkMAC') setting module MAC.Control ( -- Defined here linkMAC -- Secure communication for sequential programs...
alejandrorusso/mac-privacy
MAC/Control.hs
Haskell
bsd-3-clause
1,392
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Tinfoil.Key( genSymmetricKey ) where import P import System.IO (IO) import Tinfoil.Data.Key import Tinfoil.Data.Random import Tinfoil.Random -- | Generate a 256-bit symmetric cryptogr...
ambiata/tinfoil
src/Tinfoil/Key.hs
Haskell
bsd-3-clause
445
{-# LANGUAGE RecordWildCards, ScopedTypeVariables, BangPatterns, CPP #-} -- -- | Interacting with the interpreter, whether it is running on an -- external process or in the current process. -- module GHCi ( -- * High-level interface to the interpreter evalStmt, EvalStatus_(..), EvalStatus, EvalResult(..), EvalEx...
sdiehl/ghc
compiler/ghci/GHCi.hs
Haskell
bsd-3-clause
22,786
{-# LANGUAGE OverloadedStrings #-} module CommitMsgParsers ( loadParsers , findCategory , unknownCategory , ParserDef , getParserName ) where import Text.Regex.Posix import Data.Map as Map import Data.List as List import Data.Maybe import Control.Applicative import qualified Data.Yaml as Y import Data.Yaml (FromJSO...
LFDM/hstats
src/lib/CommitMsgParsers.hs
Haskell
bsd-3-clause
1,128
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- | This module includes the machinery necessary to use hint to load -- action code dynamically. It includes a Template Haskell function -- to gather the necessary compile-time information about code -- location, compiler arguments, etc, and bind tha...
janrain/snap
src/Snap/Loader/Hint.hs
Haskell
bsd-3-clause
10,281
module CSPM.Evaluator.Dot ( combineDots, dataTypeInfo, extensions, extensionsSet, oneFieldExtensions, productions, productionsSet, splitIntoFields, compressIntoEnumeratedSet, ) where import CSPM.Syntax.Names import {-# SOURCE #-} CSPM.Evaluator.Exceptions import CSPM.Evaluator.Monad import CSPM.Evaluat...
sashabu/libcspm
src/CSPM/Evaluator/Dot.hs
Haskell
bsd-3-clause
20,468
-- | Parsing argument-like things. module Data.Attoparsec.Args (EscapingMode(..), argsParser) where import Control.Applicative import Data.Attoparsec.Text ((<?>)) import qualified Data.Attoparsec.Text as P import Data.Attoparsec.Types (Parser) import Data.Text (Text) -- | Mode...
hesselink/stack
src/Data/Attoparsec/Args.hs
Haskell
bsd-3-clause
1,096
{-# LANGUAGE ParallelListComp, OverloadedStrings #-} module Main where import Web.Scotty import Graphics.Blank import Control.Concurrent import Control.Monad import Data.Array import Data.Maybe -- import Data.Binary (decodeFile) import System.Environment import System.FilePath import BreakthroughGame import Generi...
Tener/deeplearning-thesis
gui/breakthrough-gui.hs
Haskell
bsd-3-clause
14,979
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Serv.Api.Types ( EntityId(..) , failure , failureNoBody , failureReqBody , Respon...
orangefiredragon/bear
src/Serv/Api/Types.hs
Haskell
bsd-3-clause
3,478
{-# LANGUAGE Unsafe, CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Metrology.Unsafe -- Copyright : (C) 2013 Richard Eisenberg -- License : BSD-style (see LICENSE) -- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu) -- Stability : expe...
goldfirere/units
units/Data/Metrology/Unsafe.hs
Haskell
bsd-3-clause
1,751
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DataKinds #-} module Lucid.Ink.Internal where import GHC.Exts (IsString(..)) import Data.Text (Text) import qualified Data.Text as T import Data.Monoid ((<>)) data O...
kylcarte/ink-ui
src/Lucid/Ink/Internal.hs
Haskell
bsd-3-clause
2,010
{-# LANGUAGE CPP #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Internal.PQResultUtils -- Copyright: (c) 2011 MailRank, Inc. -- (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-m...
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/Internal/PQResultUtils.hs
Haskell
bsd-3-clause
5,167
{-# LANGUAGE LambdaCase, TupleSections, RecordWildCards #-} module Transformations.Optimising.SparseCaseOptimisation where import qualified Data.Map as Map import Data.Set (Set) import qualified Data.Set as Set import Data.Functor.Foldable as Foldable import Control.Monad.Trans.Except import Grin.Grin import Grin.Pr...
andorp/grin
grin/src/Transformations/Optimising/SparseCaseOptimisation.hs
Haskell
bsd-3-clause
2,324
execSymZCFA :: Call -> StateSpace Sym_Delta ZCFA_AAM execSymZCFA = exec Sym_Delta ZCFA_AAM
davdar/quals
writeup-old/sections/03AAMByExample/05Recovering0CFA/02Exec.hs
Haskell
bsd-3-clause
91
----------------------------------------------------------------------------- -- | -- Module : Tests.Simple -- Copyright : (c)2011, Texas Instruments France -- License : BSD-style (see the file LICENSE) -- -- Maintainer : c-favergeon-borgialli@ti.com -- Stability : provisional -- Portability : port...
ChristopheF/OpenCLTestFramework
Client/Tests/Simple.hs
Haskell
bsd-3-clause
5,676
{-# LANGUAGE ScopedTypeVariables, TypeOperators, OverloadedStrings #-} {-# LANGUAGE DeriveGeneric, FlexibleInstances, QuasiQuotes #-} {-# LANGUAGE CPP, FlexibleContexts, UndecidableInstances, RecordWildCards #-} {-# LANGUAGE DeriveFunctor, LambdaCase, OverloadedStrings #-} {-# LANGUAGE TupleSections, GeneralizedNewtype...
skedgeme/wrecker
examples/Server.hs
Haskell
bsd-3-clause
6,724
module Chipher where import Control.Arrow import Data.Char import Data.List type Keyword = String charPairs :: Keyword -> String -> [(Char, Char)] charPairs k s = reverse . snd $ foldl' (\ (k, acc) s -> if s == ' ' then (k, (' ', ' ') : acc) else let (kh : kt...
vasily-kirichenko/haskell-book
src/Chipher.hs
Haskell
bsd-3-clause
844
module ProjectEuler.Problem092 (solution092, genericSolution092) where import Data.Digits import Util digitsSquareSum :: Integer -> Integer digitsSquareSum = sum . map sq . digits 10 chainEndsWith :: Integer -> Integer chainEndsWith x = let next = digitsSquareSum x in if next == 1 || next == 89 ...
guillaume-nargeot/project-euler-haskell
src/ProjectEuler/Problem092.hs
Haskell
bsd-3-clause
564
{-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude , BangPatterns , MagicHash , UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE AutoDeriveTypeable, StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Module ...
spacekitteh/smcghc
libraries/base/GHC/ForeignPtr.hs
Haskell
bsd-3-clause
18,737
module Main where import Control.Applicative import Evaluate import Parser.AST import Parser.RPN import Pipes import qualified Pipes.Prelude as P import System.IO import Text.Parsec.Error (errorMessages, messageString) evaluatePrint :: Cons...
lightquake/sym
REPL.hs
Haskell
bsd-3-clause
691
{-# LANGUAGE OverloadedStrings, Rank2Types, PatternGuards #-} module Haste.Config ( Config (..), AppStart, def, stdJSLibs, startCustom, fastMultiply, safeMultiply, debugLib) where import Data.JSTarget import Control.Shell (replaceExtension, (</>)) import Data.ByteString.Builder import Data.Monoid import Haste.Envir...
akru/haste-compiler
src/Haste/Config.hs
Haskell
bsd-3-clause
5,667
------------------------------------------------------------------------- -- -- Main.hs -- -- The main module of the Huffman example -- -- (c) Addison-Wesley, 1996-2011. -- ------------------------------------------------------------------------- -- The main module of the Huffman example module Main (main, ...
Numberartificial/workflow
snipets/src/Craft/Chapter15/Main.hs
Haskell
mit
1,168
-- | Response types used by the security feature {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Distribution.Server.Features.Security.ResponseContentTypes ( TUFFile(..) , mkTUFFile , IsTUFFile(..) , Time...
agrafix/hackage-server
Distribution/Server/Features/Security/ResponseContentTypes.hs
Haskell
bsd-3-clause
3,578
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@h...
themoritz/cabal
Cabal/Distribution/Simple/Haddock.hs
Haskell
bsd-3-clause
31,077
<?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>Дополнение Eval Villain</title> <maps> <homeID>evalvillain</homeID> <map...
kingthorin/zap-extensions
addOns/evalvillain/src/main/javahelp/org/zaproxy/addon/evalvillain/resources/help_ru_RU/helpset_ru_RU.hs
Haskell
apache-2.0
1,018
module Main where import Eval import Type import Check import Parser import Pretty import Syntax import Data.Maybe import Control.Monad.Trans import System.Console.Haskeline eval' :: Expr -> Expr eval' = fromJust . eval process :: String -> IO () process line = do let res = parseExpr line case res of Left ...
yupferris/write-you-a-haskell
chapter5/calc_typed/Main.hs
Haskell
mit
726
----------------------------------------------------------------------------- -- | -- Module : XMonad.Prompt.AppLauncher -- Copyright : (C) 2008 Luis Cabellos -- License : BSD3 -- -- Maintainer : zhen.sydow@gmail.com -- Stability : unstable -- Portability : unportable -- -- A module for launch appli...
adinapoli/xmonad-contrib
XMonad/Prompt/AppLauncher.hs
Haskell
bsd-3-clause
2,634
module B1 where data Data1 a = C1 a Int Int | C4 Float | C2 Int | C3 Float addedC4 = error "added C4 Float to Data1" g (C1 x y z) = y g (C4 a) = addedC4 g (C2 x) = x g (C3 x) = 42
kmate/HaRe
old/testing/addCon/B1AST.hs
Haskell
bsd-3-clause
189
-- | A description of the platform we're compiling for. -- module Platform ( Platform(..), Arch(..), OS(..), ArmISA(..), ArmISAExt(..), ArmABI(..), PPC_64ABI(..), target32Bit, isARM, osElfTarget, osMachOTarget, platformUse...
olsner/ghc
compiler/utils/Platform.hs
Haskell
bsd-3-clause
4,415
import Test.Cabal.Prelude -- Test building a vanilla library/executable which uses Template Haskell main = setupAndCabalTest $ setup_build []
mydaum/cabal
cabal-testsuite/PackageTests/TemplateHaskell/vanilla/setup.test.hs
Haskell
bsd-3-clause
142
{-# LANGUAGE DeriveFoldable #-} module Main where import Data.Semigroup -- Just a list without any special fusion rules. data List a = Nil | Cons a (List a) deriving Foldable instance Semigroup (List a) where Nil <> ys = ys Cons x xs <> ys = Cons x (xs <> ys) replicateList :: Int -> a -> List a replicateList 0 ...
ezyang/ghc
testsuite/tests/perf/should_run/DeriveNull.hs
Haskell
bsd-3-clause
591
{-# LANGUAGE TypeFamilies, ConstraintKinds, UndecidableInstances #-} module Ctx where import GHC.Prim( Constraint ) type family Indirect :: * -> Constraint type instance Indirect = Show class Cls a where f :: a -> String instance Indirect a => Cls [a] where f = show
tibbe/ghc
testsuite/tests/typecheck/should_compile/tc255.hs
Haskell
bsd-3-clause
279
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Foo where class C a instance C Int newtype Foo = Foo Int deriving C
wxwxwwxxx/ghc
testsuite/tests/parser/should_compile/read057.hs
Haskell
bsd-3-clause
128
module Main where import qualified Data.ByteString as B import Language.STL.Lex import Language.STL.Lex.Normalize import Language.STL.Parse import Prelude hiding (lex) import System.IO main :: IO () main = withFile "main.stl" ReadMode $ \h -> do m <- fmap lex (B.hGetContents h) case m of Success ts ->...
pikajude/stl
src/stl.hs
Haskell
mit
426
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} ------------------------------------------- -- | -- Module : Web.Stripe.Balance -- Copyright : (c) David Johnson, 2014 -- Maintainer : djohnson.m@gmail.com ...
dmjio/stripe
stripe-core/src/Web/Stripe/Balance.hs
Haskell
mit
4,788
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE DeriveGeneric #-} module FP15.Evaluator.FPValue where import GHC.Generics(Generic) import Data.IORef import Control.DeepSeq import FP15.Disp import FP15.Value type Rev = (Int, Int) data FPRef a = FPRef Rev (IORef a) -- | The 'FPValu...
Ming-Tang/FP15
src/FP15/Evaluator/FPValue.hs
Haskell
mit
2,944