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 TypeSynonymInstances #-} module Kwil.Lexer where import Data.Char import Data.List import Data.Maybe (listToMaybe) import Control.Monad.Trans.State.Lazy import Control.Monad data Token = LowerCaseID String | UpperCaseID String | Equals | LBracket ...
rtpg/kwil
Kwil/Lexer.hs
Haskell
bsd-3-clause
5,667
{-# LANGUAGE FlexibleInstances , TypeSynonymInstances #-} module Data.String.ToString (ToString (..)) where import Data.CaseInsensitive (CI, foldedCase) import qualified Data.ByteString.Lazy.UTF8 as LBU import qualified Data.ByteString.UTF8 as SBU import qualified Data.Text as ST import qu...
silkapp/tostring
src/Data/String/ToString.hs
Haskell
bsd-3-clause
783
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Duration.UK.Corpus ( corpus , negativeCorpus ) where i...
facebookincubator/duckling
Duckling/Duration/UK/Corpus.hs
Haskell
bsd-3-clause
2,019
-- JavaScript Contract Compiler module Main where import System.Console.GetOpt import System.Environment import System.Directory import System.FilePath import System.Exit import Control.Monad import BrownPLT.JavaScript.Contracts import Paths_JsContracts -- created by Cabal import BrownPLT.JavaScript.Parser (parseJavaS...
brownplt/javascript-contracts
src/Jscc.hs
Haskell
bsd-3-clause
3,294
{-| Module : Numeric.ER.ShowHTML Description : Misc facilities for HTML rendering. Copyright : (c) Michal Konecny License : BSD3 Maintainer : mikkonecny@gmail.com Stability : experimental Portability : portable -} module Numeric.ER.ShowHTML where import qual...
michalkonecny/polypaver
src/Numeric/ER/ShowHTML.hs
Haskell
bsd-3-clause
1,285
module BuildParseTests (test) where import Blaze.ByteString.Builder (Builder, toByteString) import Data.ByteString (ByteString) import Data.Attoparsec.ByteString (Parser, parseOnly, endOfInput) import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Network.SPDY.Frame...
kcharter/spdy-base
test/BuildParseTests.hs
Haskell
bsd-3-clause
4,180
{-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE PartialTypeSignatures #-} module Language.CodeGen.LLVM where import Prelude hiding (init) import ...
svenkeidel/hsynth
src/Language/CodeGen/LLVM.hs
Haskell
bsd-3-clause
7,098
{-# OPTIONS_GHC -w #-} module Parser where import AST import Lexer -- parser produced by Happy Version 1.18.10 data HappyAbsSyn t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 = HappyTerminal (Token) | HappyErrorToken Int | HappyAbsSyn4 t4 | HappyAbsSyn5 t5 | HappyAbsSyn6 t6 | HappyAbsSyn7 t7 | HappyAbs...
davnils/minijava-compiler
src/Parser.hs
Haskell
bsd-3-clause
52,493
{-# LANGUAGE OverloadedStrings #-} module MateVMRuntime.Utilities where import Data.Word import qualified Data.Map as M import qualified Data.ByteString.Lazy as B import Data.List import JVM.ClassFile import Data.IORef import System.IO.Unsafe import MateVMRuntime.Types import MateVMRuntime.NativeSizes import Syste...
LouisJenkinsCS/Minimal-JVM
MateVMRuntime/Utilities.hs
Haskell
bsd-3-clause
2,414
{-# LANGUAGE LambdaCase #-} module ShaderRick where import Graphics.GL.Pal import Data.IORef import Control.Monad.Trans shaderRecompiler :: MonadIO m => FilePath -> FilePath -> (Program -> IO r) -> m (IO (r, String)) shaderRecompiler vertShaderPath fragShaderPath makeResult = liftIO $ do (shader, anyError) <- crea...
lukexi/tinyrick
src/ShaderRick.hs
Haskell
bsd-3-clause
888
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.DeepSeq import Criterion.Main import Data.Binary import Data.ByteString.Lazy (ByteString) import Data.Group import Data.Maybe import MCL.Curves.Fp254BNb main :: IO () main = defaultMain [ bgroup "Fp" [ benc...
arybczak/haskell-mcl
benchmark/Main.hs
Haskell
bsd-3-clause
5,452
{-# LANGUAGE NoMonomorphismRestriction #-} ------------------------------------------------------------------------------------- -- | -- Copyright : (c) Hans Hoglund 2012 -- -- License : BSD-style -- -- Maintainer : hans@hanshoglund.se -- Stability : experimental -- Portability : portable -- -- Provides over...
music-suite/music-pitch
src/Music/Pitch/Literal/Pitch.hs
Haskell
bsd-3-clause
12,962
module Main where import Control.Monad (when) import Data.Maybe (fromMaybe) import System.Environment (getArgs) import Text.Printf (printf) import qualified System.Console.GetOpt as GetOpt import Parser import Tokenizer -- Options parsing data Options = Options { optInput :: Maybe FilePath, optVerbose :: B...
christianlavoie/origami-computational-model
src/Main.hs
Haskell
bsd-3-clause
2,056
-- | module VK.App (app , module Exp) where import React.Flux import System.IO.Unsafe (unsafePerformIO) import VK.App.Actions import VK.App.Store import VK.App.Types as Exp import VK.App.Views import VK.DOM.Router as Exp app...
eryx67/vk-api-example
src/VK/App.hs
Haskell
bsd-3-clause
635
{-# LANGUAGE TypeFamilies, BangPatterns, TypeOperators, FlexibleContexts, FlexibleInstances, ScopedTypeVariables #-} module Main where import Data.NeuralNetwork hiding (cost') import Data.NeuralNetwork.Backend.BLASHS import qualified Data.Vector as V import qualified Data.Vector.Storable as SV import Data.List(...
pierric/neural-network
Backend-blashs/Example/MNIST/Main.hs
Haskell
bsd-3-clause
5,095
module Opaleye.Internal.Tag where -- | Tag is for use as a source of unique IDs in QueryArr newtype Tag = UnsafeTag Int deriving (Read, Show) start :: Tag start = UnsafeTag 1 next :: Tag -> Tag next = UnsafeTag . (+1) . unsafeUnTag unsafeUnTag :: Tag -> Int unsafeUnTag (UnsafeTag i) = i tagWith :: Tag -> String ->...
WraithM/haskell-opaleye
src/Opaleye/Internal/Tag.hs
Haskell
bsd-3-clause
375
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} module Mars.Command.Load (Load (..)) where import Data.Aeson as Aeson import Data.String.Conv import Data.Text (Text) import Data.Typeable import GHC.Generics import Mars.Command import System.IO (hPutStrLn, stder...
lorcanmcdonald/mars
src/Mars/Command/Load.hs
Haskell
bsd-3-clause
1,281
{-# LANGUAGE NoMonomorphismRestriction, ExtendedDefaultRules#-} module DocTest.Flat.Endian where import qualified DocTest import Test.Tasty(TestTree,testGroup) import Flat.Endian import Numeric (showHex) tests :: IO TestTree tests = testGroup "Flat.Endian" <$> sequence [ DocTest.test "src/Data/Flat/Endian.hs:36" ["T...
tittoassini/flat
test/DocTest/Data/Flat/Endian.hs
Haskell
bsd-3-clause
712
module Air.Data.Default where import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as L -- BEGIN -- copy from data.default import Data.Ratio import qualified Data.Set as S import qualified Data.Map as M import Data.Int (Int8, Int16, Int32, Int64) import Data.Word (Word8, Word16, W...
nfjinjing/air
src/Air/Data/Default.hs
Haskell
bsd-3-clause
2,370
{-# LANGUAGE ForeignFunctionInterface, OverloadedStrings, CPP #-} module IOSMain where import Graphics.UI.SDL as SDL import HXSDL foreign export ccall "haskell_main" main :: IO () main = withInit [InitVideo] $ withWindow "Hello World!" (Position 100 100) (Size 640 480) [WindowShown] $ \win -> withRenderer win (...
EDeijl/HXSDL
src/iOSMain.hs
Haskell
mit
387
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} module Network.Wai.Handler.Warp.Request ( recvRequest , headerLines ) where import Control.Applicative import qualified Control.Concurrent as Conc (yield) import Control.Exception (...
beni55/wai
warp/Network/Wai/Handler/Warp/Request.hs
Haskell
mit
8,515
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Morphism.Futu -- Copyright : (C) 2008 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward Kmett <ekmett@gmail.com> -- Stability : ...
urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav
Control/Morphism/Futu.hs
Haskell
apache-2.0
1,865
{-# LANGUAGE ForeignFunctionInterface #-} module Main (module Main, module Arc4) where import Control.Concurrent import Control.Monad.Reader -- import Data.Char -- import Data.List import Data.Word import Network.Socket import System.Console.GetOpt import System.Environment import System.Exit import System.IO import ...
TC1211/TCP
src/3a/tester-src/Examples/reliable/tester.hs
Haskell
apache-2.0
7,264
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-} -- | Filter for compressing the 'Response' body. module Happstack.Server.Compression ( compressedResponseFilter , compressedResponseFilter' , compressWithFilter , gzipFilter , deflateFilter , identityFilter , starFilter , stand...
arybczak/happstack-server
src/Happstack/Server/Compression.hs
Haskell
bsd-3-clause
923
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.FetchUtils -- Copyright : (c) David Himmelstrup 2005 -- Duncan Coutts 2011 -- License : BSD-like -- -- Maintainer : cabal-devel@gmail.com -- Stability : provisional --...
martinvlk/cabal
cabal-install/Distribution/Client/FetchUtils.hs
Haskell
bsd-3-clause
6,921
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "src/Data/BitUtil.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Data.BitUtil -- Copyrig...
phischu/fragnix
tests/packages/scotty/Data.BitUtil.hs
Haskell
bsd-3-clause
2,131
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-} {- | Haskell-specific web worker API. The URL is expected to point to a script that is the same as the caller, or at least a script that has been produced by GHCJS and contains the same static values. -} module JavaScript.Web.Worker.Haskell ( Haskel...
tavisrudd/ghcjs-base
JavaScript/Web/Worker/Haskell.hs
Haskell
mit
895
----------------------------------------------------------------------------- -- | -- Copyright : (c) 2006-2014 Duncan Coutts -- License : BSD-style -- -- Maintainer : duncan@community.haskell.org -- -- Compression and decompression of data streams in the gzip format. -- -- The format is described in detail i...
CloudI/CloudI
src/api/haskell/external/zlib-0.6.2.1/Codec/Compression/GZip.hs
Haskell
mit
3,981
{-# LANGUAGE BangPatterns, CPP #-} -- | File descriptor cache to avoid locks in kernel. module Network.Wai.Handler.Warp.FdCache ( withFdCache , Fd , Refresh #ifndef WINDOWS , openFile , closeFile , setFileCloseOnExec #endif ) where #ifndef WINDOWS #if __GLASGOW_HASKELL__ < 709 import Control.Applicat...
utdemir/wai
warp/Network/Wai/Handler/Warp/FdCache.hs
Haskell
mit
4,467
{-# CFILES a.c #-} foreign import ccall unsafe "foo" foo :: Int -> Int main = print $ foo 6
dcreager/cabal
tests/systemTests/exeWithC/test.hs
Haskell
bsd-3-clause
93
module PatBindIn1 where main :: Int main = foo 3 foo :: Int -> Int foo x = (h + t) + (snd tup) where tup :: (Int, Int) h :: Int t :: Int tup@(h, t) = head $ (zip [1 .. 10] [3 .. 15]) tup :: (Int, Int) h :: Int t :: Int tup@(h, t) = head $ (zip [1 .. 10] [3 .. 15])
mpickering/HaRe
old/testing/demote/PatBindIn1AST.hs
Haskell
bsd-3-clause
310
-- From comment:76 in Trac #9858 -- This exploit still works in GHC 7.10.1. -- By Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn {-# LANGUAGE Safe #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ImpredicativeTypes #-} module T9858a where import Data.Typeable type E = (:~:) typ...
urbanslug/ghc
testsuite/tests/typecheck/should_fail/T9858a.hs
Haskell
bsd-3-clause
733
module A (T,t) where data T = T t = T instance Eq T where t1 == t2 = True
hferreiro/replay
testsuite/tests/driver/recomp008/A1.hs
Haskell
bsd-3-clause
79
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE DataKinds #-} module Control.Monad.Apiary.Filter.Capture ( path, fetch, fetch', a...
philopon/apiary
src/Control/Monad/Apiary/Filter/Capture.hs
Haskell
mit
1,884
{-# htermination readsPrec :: Int -> String -> [(Int,String)] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_readsPrec_5.hs
Haskell
mit
66
{-# htermination (mapM :: (b -> Maybe a) -> (List b) -> Maybe (List a)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Maybe a = Nothing | Just a ; map :: (b -> a) -> (List b) -> (List a); map f Nil = Nil; map f (Cons x xs) = Cons (f x) (map f xs);...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/mapM_1.hs
Haskell
mit
783
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Kafka.IntegrationSpec where import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar) import Control.Monad (forM, forM_) import Control.Monad.Loops import Data.Either import Data.Map ...
haskell-works/kafka-client
tests-it/Kafka/IntegrationSpec.hs
Haskell
mit
12,117
module Handler.AnalogOutSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getAnalogOutR" $ do error "Spec not implemented: getAnalogOutR"
aufheben/lambda-arduino
test/Handler/AnalogOutSpec.hs
Haskell
mit
183
{-# htermination addToFM :: FiniteMap () b -> () -> b -> FiniteMap () b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_addToFM_2.hs
Haskell
mit
94
-- ex3.1.hs swapTriple :: (a,b,c) -> (b,c,a) swapTriple (x,y,z) = (y,z,x) duplicate :: a -> (a, a) duplicate x = (x, x) nothing :: a -> Maybe a nothing _ = Nothing index :: [a] -> [ (Int, a) ] index [] = [] index [x] = [(0,x)] index (x:xs) = let indexed@((n,_):_) = index xs in (n+1,x):indexed maybeA...
hnfmr/beginning_haskell
ex3.1.hs
Haskell
mit
352
module Proteome.Grep.Parse where import Chiasma.Data.Ident (generateIdent, identText) import Data.Attoparsec.Text (parseOnly) import qualified Data.Text as Text (strip, stripPrefix) import Ribosome.Menu.Data.MenuItem (MenuItem(MenuItem)) import Text.Parser.Char (anyChar, char, noneOf) import Text.Parser.Combinators (m...
tek/proteome
packages/proteome/lib/Proteome/Grep/Parse.hs
Haskell
mit
1,558
module Language.Dash.VM.VMSpec where import Data.Word import Language.Dash.Asm.Assembler import Language.Dash.IR.Opcode import Language.Dash.IR.Data import Language.Dash.VM.DataEncoding import Language.Dash.VM.VM import Language.Dash.Limits import ...
arne-schroppe/dash
test/Language/Dash/VM/VMSpec.hs
Haskell
mit
14,363
----------------------------------------------------------------------------- -- | -- Module : Reader.Parser -- License : MIT (see the LICENSE file) -- Maintainer : Felix Klein (klein@react.uni-saarland.de) -- -- Parsing module containing all neccessary parsers. -- -----------------------------------------...
reactive-systems/syfco
src/lib/Reader/Parser.hs
Haskell
mit
2,459
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-csvmappingparameters.html module Stratosphere.ResourceProperties.KinesisAnalytic...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsApplicationCSVMappingParameters.hs
Haskell
mit
2,947
type Fname = String type Var = String data Program = Prog [Fundef] Exp deriving Show data Fundef = Fun String [String] Exp deriving Show data Exp = I Int | V Var | B Bool | Nil | Fname String | App Exp Exp deriving Show type Code = [Instn] data Instn = PUSH Int | PUSHINT Int | PUSHGLOBAL String | PUS...
sushantmahajan/programs
haskell/assign2.hs
Haskell
cc0-1.0
3,308
{-# LANGUAGE BangPatterns #-} module Ylang.Primitive ( addBin, andBin, orBin, xorBin, notUnary, adds, ands, ors, xors, nots ) where import Ylang.Display import Ylang.Value type BinOp a = a -> a -> Either String a type Variadic a = [a] -> Either String a variadic :: BinOp Va...
VoQn/ylang
Ylang/Primitive.hs
Haskell
apache-2.0
3,350
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE BangPatterns #-} module Lib.LiftedIO (print, putStrLn, newIORef, modifyIORef', readIORef, writeIORef, IOREF.IORef) where ------------------------------------------------------------------------------------...
kernelim/gitomail
src/Lib/LiftedIO.hs
Haskell
apache-2.0
1,159
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Risk where import Control.Monad.Random import Control.Monad import Data.List (sort, foldr) import Data.Ratio ------------------------------------------------------------ -- Die values newtype DieValue = DV { unDV :: Int } deriving (Eq, Ord, Show, Num) first :: ...
parsonsmatt/cis194
hw12/Risk.hs
Haskell
apache-2.0
1,882
{- Copyright 2016, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish 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 ...
dorchard/camfort
src/Camfort/Specification/Stencils/CheckBackend.hs
Haskell
apache-2.0
5,966
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# OP...
Motions/motions
test/BasicSpec.hs
Haskell
apache-2.0
13,670
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} module Web.Twitter.Conduit.Request ( HasParam, APIRequest (..), ) where import Data.Aeson import GHC.TypeLits (Symbol) import Network.HTTP.Client.MultipartFormData import qualified Network.H...
himura/twitter-conduit
src/Web/Twitter/Conduit/Request.hs
Haskell
bsd-2-clause
3,255
{-# LANGUAGE FlexibleInstances #-} module Util.UnixDiff where import Data.Algorithm.Diff import qualified Data.Algorithm.DiffOutput as O import Language.Clojure.AST data GroupDiffAction = OMod LineRange LineRange | OIns LineRange Int | ODel LineRange Int deriving (Show) ...
nazrhom/vcs-clojure
src/Util/UnixDiff.hs
Haskell
bsd-3-clause
1,872
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} module MVC.EventHandler where import Control.Lens import Control.Monad import Control.Monad.Reader (Mon...
cmahon/mvc-service
library/MVC/EventHandler.hs
Haskell
bsd-3-clause
7,244
----------------------------------------------------------------------------- -- | -- Module : Main -- Description : Copies all files with the specified filename beginning -- from the first directory to the second directory -- Copyright : (c) Artem Tsushko, 2015 -- License : BSD3 -- Mainta...
artemtsushko/matching-files-copier
src/Main.hs
Haskell
bsd-3-clause
2,799
module MultiVersion where import Data.List import qualified Data.Map as Map import Data.Version import Distribution.Simple.PackageIndex (allPackages) import Distribution.Package (PackageIdentifier(..), PackageName(..)) import Distribution.InstalledPackageInfo (InstalledPackageInfo(..)) import Config import Installed...
glguy/GhcPkgUtils
MultiVersion.hs
Haskell
bsd-3-clause
990
{-# LANGUAGE OverloadedStrings #-} module Spec.Helpers where import Base import Models (true, false) import Util (toSqlKey) fromBool :: Bool -> TValueId fromBool True = true fromBool _ = false (==.) :: Int64 -> Bool -> Formula PropertyId (==.) p v = Atom (toSqlKey p) v (&&.) :: Formula a -> Formula a -> Formula ...
jamesdabbs/pi-base-2
test/Spec/Helpers.hs
Haskell
bsd-3-clause
813
----------------------------------------------------------------------------- -- | -- Module : Distribution.Package -- Copyright : Isaac Jones 2003-2004 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- Defines a package identifier along with a parser and pretty printer for it. -- '...
dcreager/cabal
Distribution/Package.hs
Haskell
bsd-3-clause
5,898
{-# LANGUAGE OverloadedStrings #-} module Data.IHO.S52.SVG.Renderer (renderVectorInstructions) where import Data.Text (Text) import Data.Monoid import Data.Either import Data.Map (Map) import qualified Data.Map as Map import Text.Blaze.Svg (Svg) import Text.Blaze.Internal ((!)) import qualified Text.Blaze.Internal ...
alios/iho-presentation
Data/IHO/S52/SVG/Renderer.hs
Haskell
bsd-3-clause
7,278
{- PickSquare.hs (adapted from picksquare.c which is (c) Silicon Graphics, Inc.) Copyright (c) Sven Panne 2003 <sven_panne@yahoo.com> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE Use of multiple names and picking are demonstrated. A 3x3 grid ...
OS2World/DEV-UTIL-HUGS
demos/GLUT/examples/RedBook/PickSquare.hs
Haskell
bsd-3-clause
4,192
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {- | Module : Text.Garnett.Completers.BashCompleter Copyright : Copyright (C) 2014 Julian K. Arni License : BSD3 Maintainer : Julian K. Arni <jkarni@gmail.com Stability : alpha Convert a GarnettFile to a bash completion script. -} module...
jkarni/Garnett
src/Text/Garnett/Completers/BashCompleter.hs
Haskell
bsd-3-clause
3,256
{-# LANGUAGE MultiParamTypeClasses #-} module Data.Binary.Indexed where import Data.Binary import Data.Binary.Get import Data.Binary.Put import Data.ByteString.Lazy class HBinary phi h where hput :: phi ix -> h ix -> Put hget :: phi ix -> Get (h ix) hdecode :: HBinary phi h => phi ix -> ByteString -> h ix hdecod...
sebastiaanvisser/islay
src/Data/Binary/Indexed.hs
Haskell
bsd-3-clause
438
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveTraversable #-} module Rawr.Note where import GHC.Generics import Text.Printf import Data.Aeson import qualified Data.List as DL import Data.Maybe import qualified Data.ByteString.Lazy.Char8 as DB8 dat...
drhodes/jade2hdl
rawr/src/Rawr/Note.hs
Haskell
bsd-3-clause
2,631
{-# OPTIONS_GHC -F -pgmF htfpp #-} module VectorTests.Vector3 where import Geometry.Space import Test.Framework import VectorTests.VectorGenerators () prop_vectorProductAnticommutativity :: Vector3 Double -> Vector3 Double -> Bool prop_vectorProductAnticommutativity a b = cross a b == neg (cross b a) p...
achirkin/fgeom
test/VectorTests/Vector3.hs
Haskell
bsd-3-clause
600
module OTPSpec (main, spec) where import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
pbogdan/otp-auth
test/OTPSpec.hs
Haskell
bsd-3-clause
200
---------------------------------------------------------------------------- -- | -- Module : H -- Copyright : (c) Sergey Vinokurov 2016 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -- Created : Sunday, 23 October 2016 ----------------------------------------------------...
sergv/tags-server
test-data/0007resolvable_import_cycle/H.hs
Haskell
bsd-3-clause
459
{-# LANGUAGE OverloadedStrings #-} import Cataskell.Game import Cataskell.Serialize import Control.Monad.Random import Control.Monad.State import Control.Lens import System.Random import System.Environment (getArgs) import Control.Exception (assert) import Data.List (findIndex) import Data.Aeson import qualified Data.B...
corajr/cataskell
cataskell-example/Main.hs
Haskell
bsd-3-clause
1,372
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | Database schema versioning and Migration -- -- module NejlaCommon.Persistence.Migration ( sql , sqlFile ,...
nejla/nejla-common
src/NejlaCommon/Persistence/Migration.hs
Haskell
bsd-3-clause
5,718
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Stack.Init ( initProject , InitOpts (..) ) where import Control.Exception (assert) import Control.Exception.En...
harendra-kumar/stack
src/Stack/Init.hs
Haskell
bsd-3-clause
20,472
{-# LANGUAGE OverloadedStrings #-} module Dhall.Test.Schemas where import Data.Text (Text) import Dhall.Parser (Header (..)) import Prelude hiding (FilePath) import Test.Tasty (TestTree) import Turtle (FilePath) import qualified Data.Text as Text import qualified Data.Text.IO ...
Gabriel439/Haskell-Dhall-Library
dhall/tests/Dhall/Test/Schemas.hs
Haskell
bsd-3-clause
2,250
{-| Module : Grammar.Size Description : Definition of the Size datatype. Copyright : (c) Davide Mancusi, 2017 License : BSD3 Maintainer : arekfu@gmail.com Stability : experimental Portability : POSIX This module exports the 'Size' data type. -} module Grammar.Size ( Size , mean ) where -- system import...
arekfu/grammar-haskell
src/Grammar/Size.hs
Haskell
bsd-3-clause
603
{-# LANGUAGE OverloadedStrings, TemplateHaskell #-} module Web.Slack.Types.Topic where import Data.Aeson import Data.Text (Text) import Control.Applicative import Control.Lens.TH import Prelude type Purpose = Topic data Topic = Topic { _topicValue :: Text , _topicCreator :: Text , ...
madjar/slack-api
src/Web/Slack/Types/Topic.hs
Haskell
mit
540
module Server where import Control.Exception (bracket, finally, handleJust, tryJust) import Control.Monad (guard) import Data.IORef (IORef, newIORef, readIORef, writeIORef) import GHC.IO.Exception (IOErrorType(ResourceVanished)) import Network (PortID(UnixSocket), Socket, accept, listenOn, sClose) import System.Direct...
pacak/hdevtools
src/Server.hs
Haskell
mit
3,921
<?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="zh-CN"> <title>Form Handler | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/formhandler/src/main/javahelp/org/zaproxy/zap/extension/formhandler/resources/help_zh_CN/helpset_zh_CN.hs
Haskell
apache-2.0
974
module Main (main) where import Network.Info main = do ns <- getNetworkInterfaces mapM (putStrLn . showInterface) ns showInterface :: NetworkInterface -> String showInterface n = name n ++ "\n" ++ "IPv4 Address: " ++ show (ipv4 n) ++ "\n" ++ "IPv6 Address: " ++ show (...
olorin/network-info
test/src/Main.hs
Haskell
bsd-3-clause
397
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif ----------------------------------------------------------------------------- -- | -...
ddssff/lens
src/GHC/Generics/Lens.hs
Haskell
bsd-3-clause
4,250
-- | -- Module : React -- Copyright : (C) 2014-15 Joel Burget -- License : MIT -- Maintainer : Joel Burget <joelburget@gmail.com> -- Stability : experimental -- Portability : non-portable -- -- Usage: -- -- This tutorial assumes only a basic understanding of React, the DOM, and -- browser events. I ...
joelburget/react-haskell
src/React.hs
Haskell
mit
2,455
module ListImplicitUsed where import Data.List foo = sort
serokell/importify
test/test-data/base@basic/30-ListImplicitUsed.hs
Haskell
mit
70
{- ****************************************************************************** * H M T C * * * * Module: Name * *...
jbracker/supermonad-plugin
examples/monad/hmtc/original/Name.hs
Haskell
bsd-3-clause
910
-- | Data.Graph is sorely lacking in several ways, This just tries to fill in -- some holes and provide a more convinient interface {-# LANGUAGE RecursiveDo #-} module Util.Graph( Graph(), Util.Graph.components, Util.Graph.dff, Util.Graph.reachable, Util.Graph.scc, Util.Graph.topSort, cycli...
hvr/jhc
src/Util/Graph.hs
Haskell
mit
9,869
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sr-CS"> <title>Directory List v2.3 LC</title> <maps> <homeID>directorylistv2_3_lc</homeID> ...
thc202/zap-extensions
addOns/directorylistv2_3_lc/src/main/javahelp/help_sr_CS/helpset_sr_CS.hs
Haskell
apache-2.0
984
{-| This modules defines the 'QueryArr' arrow, which is an arrow that represents selecting data from a database, and composing multiple queries together. -} module Opaleye.SQLite.QueryArr (QueryArr, Query) where import Opaleye.SQLite.Internal.QueryArr (QueryArr, Query)
bergmark/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/QueryArr.hs
Haskell
bsd-3-clause
283
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Read.Lex -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer...
mightymoose/liquidhaskell
benchmarks/base-4.5.1.0/Text/Read/Lex.hs
Haskell
bsd-3-clause
17,364
{-# LANGUAGE CPP #-} module Examples.Hello where import Options.Applicative #if __GLASGOW_HASKELL__ <= 702 import Data.Monoid (<>) :: Monoid a => a -> a -> a (<>) = mappend #endif data Sample = Sample { hello :: String , quiet :: Bool } deriving Show sample :: Parser Sample sample = Sample <$> strOption ...
begriffs/optparse-applicative
tests/Examples/Hello.hs
Haskell
bsd-3-clause
812
module PatternMatch7 where g = (\(y:ys) -> (case y of p | p == 45 -> 12 _ -> 52)) f x = (\(p:ps) -> (case p of l | x == 45 -> 12 _ -> 52))
kmate/HaRe
old/testing/foldDef/PatternMatch7_TokOut.hs
Haskell
bsd-3-clause
205
module Main where main :: IO () main = putStrLn "This is foo from has-exe-foo-too"
AndreasPK/stack
test/integration/tests/1198-multiple-exes-with-same-name/files/has-exe-foo-too/app/Main.hs
Haskell
bsd-3-clause
84
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} #if !MIN_VERSION_base(4,8,0) {-# LANGUAGE DeriveDataTypeable #-} import Control.Applicative ((<$>), (<*>), (*>)) #endif import Control.DeepSeq import ...
fpco/store
bench/Bench.hs
Haskell
mit
9,639
module Game.Render.Core.Error ( initLogging , logGL ) where import System.Log.Logger import Control.Monad import System.Log.Handler.Simple import System.Log.Handler (setFormatter) import System.Log.Formatter import qualified Graphics.Rendering.OpenGL as GL initLogging :: IO () initLogging = do h <- f...
mfpi/q-inqu
Game/Render/Core/Error.hs
Haskell
mit
730
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE PackageImports #-} module Blocks where import Control.Concurrent.STM (TQueue, atomically, newTQueueIO, tryReadTQueue, writeTQueue) import Control.Applicative import Control.Monad import Control.Lens ((+~), (^.), contains) import Data.Foldable (fold...
bgaster/blocks
Blocks.hs
Haskell
mit
26,497
module Game ( Game , Unfinished , Position , Coordinate , start , move , isFinished , bounds , openPositions , marks ) where import Game.Internal
amar47shah/NICTA-TicTacToe
src/Game.hs
Haskell
mit
267
-- | -- Module : Main -- Description : -- Copyright : (c) Jonatan H Sundqvist, 2015 -- License : MIT -- Maintainer : Jonatan H Sundqvist -- Stability : experimental|stable -- Portability : POSIX (not sure) -- -- Created December 21 2015 -- TODO | - -- - -- SPEC | - -- - ---------------...
SwiftsNamesake/Elrond
app/Main.hs
Haskell
mit
2,092
{-# LANGUAGE QuasiQuotes #-} module TestLedgerProcess (ledgerProcessSpec) where import Test.Hspec (Spec, describe, it, shouldReturn) import Data.String.Interpolate (i) import Data.String.Interpolate.Util (unindent) import Text.RE.Replace import Text.RE.TDFA.String import qualified Data.Expenses.Ledger.Process as L...
rgoulter/expenses-csv-utils
test/TestLedgerProcess.hs
Haskell
mit
5,361
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE...
mstksg/neural
src/Data/Neural/FeedForward.hs
Haskell
mit
12,834
module Typing.Expr (i_expr) where import Typing.Constraint import Typing.Env import Typing.Substitution import Typing.Subtyping import Typing.TypeError import Typing.Types import Typing.Util import Absyn.Base import Absyn.Meta import qualified Absyn.Untyped as U import qualified Absyn.Typed as T import Util.Error im...
tadeuzagallo/verve-lang
src/Typing/Expr.hs
Haskell
mit
10,404
{-# LANGUAGE Arrows #-} module Game.Client.Objects.Network where import FRP.Yampa as Yampa import FRP.Yampa.Geometry import Graphics.UI.SDL as SDL import Graphics.UI.SDL.Events as SDL.Events import Graphics.UI.SDL.Keysym as SDL.Keysym import Game.Shared.Types import Game.Shared.Networking import...
Mattiemus/LaneWars
Game/Client/Objects/Network.hs
Haskell
mit
6,036
{-# LANGUAGE TemplateHaskell #-} module SoOSiM.Components.Thread.Types where import Control.Lens import Control.Concurrent.STM.TQueue import SoOSiM.Components.Common import SoOSiM.Components.ResourceDescriptor import SoOSiM.Components.SoOSApplicationGraph data ThreadState = Blocked | Waiting | Executing | Killed d...
christiaanb/SoOSiM-components
src/SoOSiM/Components/Thread/Types.hs
Haskell
mit
1,994
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Arduino.SamplePrograms.SevenSegment -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Control a single seven-segment disp...
aufheben/lambda-arduino
packages/hArduino-0.9/System/Hardware/Arduino/SamplePrograms/SevenSegment.hs
Haskell
mit
3,812
module Graphics.Rendering.OpenGL.Extensions where import Data.List as List import Graphics.Rendering.OpenGL as OpenGL originFrustum :: Rational -> Rational -> Rational -> Rational -> IO() originFrustum = \width height near far -> do let x_radius = ((/) width 2) let y_radius = ((/) height 2) let bounds = [(...
stevedonnelly/haskell
code/Graphics/Rendering/OpenGL/Extensions.hs
Haskell
mit
1,028
#!/usr/bin/env runhaskell main = putStrLn "Hello World!"
pwittchen/learning-haskell
tasks/00_hello_world.hs
Haskell
apache-2.0
57
{-# LANGUAGE TemplateHaskell #-} module Hack3.Lens where import Hack3 import Control.Lens makeLenses ''Env makeLenses ''Response
nfjinjing/hack3-lens
src/Hack3/Lens.hs
Haskell
apache-2.0
133
{-# LANGUAGE CPP, TupleSections, BangPatterns, LambdaCase #-} {-# OPTIONS_GHC -Wwarn #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Interface.Create -- Copyright : (c) Simon Marlow 2003-2006, -- David Waern 2006-2009, -- ...
mrBliss/haddock
haddock-api/src/Haddock/Interface/Create.hs
Haskell
bsd-2-clause
36,249