code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneDeriving #-}
... | ml9951/ghc | libraries/base/GHC/Generics.hs | bsd-3-clause | 30,581 | 0 | 14 | 6,424 | 3,476 | 2,243 | 1,233 | -1 | -1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveFoldable #-}
-- | See <https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst>
module Distribution.Backpack.ModuleScope (
-- * Module scopes
ModuleScope(..),
ModuleProvides,
ModuleRequires,
... | mydaum/cabal | Cabal/Distribution/Backpack/ModuleScope.hs | bsd-3-clause | 4,689 | 0 | 11 | 857 | 642 | 368 | 274 | 64 | 3 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, UnboxedTuples, MagicHash #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.MVar
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries... | frantisekfarka/ghc-dsi | libraries/base/Control/Concurrent/MVar.hs | bsd-3-clause | 9,356 | 0 | 14 | 2,093 | 1,051 | 600 | 451 | 88 | 1 |
{-# LANGUAGE RecordWildCards, DeriveGeneric, CPP, TupleSections, TemplateHaskell #-}
module TipToiYaml
( tt2ttYaml, ttYaml2tt
, readTipToiYaml, writeTipToiYaml,writeTipToiCodeYaml
, ttyProduct_Id
, debugGame
)
where
import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString.Lazy.C... | colinba/tip-toi-reveng | src/TipToiYaml.hs | mit | 44,095 | 0 | 29 | 14,025 | 10,153 | 5,375 | 4,778 | 903 | 6 |
{-|
- This module adds servant combinators.
-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGuAGE RecordWildC... | tsani/apollo | src/Apollo/Types/Servant.hs | mit | 3,357 | 0 | 24 | 812 | 647 | 358 | 289 | -1 | -1 |
{-# LANGUAGE TupleSections #-}
-- | Environments implemented as association lists.
module ListEnv where
type Env k v = [(k,v)]
-- | Query
lookup :: (Eq k) => k -> Env k v -> Maybe v
lookup = Prelude.lookup
lookupSafe :: (Eq k, Show k) => k -> Env k v -> v
lookupSafe k = maybe (error $ "internal error: unbound key "... | andreasabel/helf | src/ListEnv.hs | mit | 881 | 0 | 10 | 228 | 484 | 257 | 227 | 22 | 1 |
{-|
Module: Flaw.Visual.Texture.Mip
Description: Mipmap generation support.
License: MIT
-}
{-# LANGUAGE Strict #-}
module Flaw.Visual.Texture.Mip
( generateMips
) where
import Control.Monad
import Data.Bits
import qualified Data.ByteArray as BA
import qualified Data.ByteString.Unsafe as B
import Data.Word
impor... | quyse/flaw | flaw-visual/Flaw/Visual/Texture/Mip.hs | mit | 5,414 | 0 | 46 | 1,285 | 1,607 | 881 | 726 | 97 | 14 |
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE StandaloneDeriving #-}
module Examples.TranslationExample where
import Examples.SampleContracts
import HOAS
import PrettyPrinting
import qualified Contract as C
import qualified RebindableEDSL as R
import EDSL
import ContractTranslation
import Examples.PayoffToHaskell
i... | annenkov/contracts | Coq/Extraction/contracts-haskell/src/Examples/TranslationExample.hs | mit | 4,726 | 0 | 13 | 839 | 1,773 | 926 | 847 | 84 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
-- some js combinators and helpers
module Lucid.Js
( module Lucid.Js
, module Language.Javascript.JMacro
, module Language.Javascript.JMacro.D3Expr
) where
import Blaze.ByteString.Builder
import Control.Appli... | tonyday567/hdcharts | src/Lucid/Js.hs | mit | 3,501 | 0 | 13 | 750 | 1,433 | 757 | 676 | 88 | 2 |
module Aws.DynamoDb.Commands.Conduit
( module Aws.DynamoDb.Commands
, module Aws.DynamoDb.Commands.Query.Conduit
) where
import Aws.DynamoDb.Commands
import Aws.DynamoDb.Commands.Query.Conduit
| srijs/haskell-aws-dynamodb-conduit | src/Aws/DynamoDb/Commands/Conduit.hs | mit | 200 | 0 | 5 | 21 | 40 | 29 | 11 | 5 | 0 |
module Complex (Complex((:+)), ii) where
-- This module is similar to Data.Complex, but with lighter constraints
infix 6 :+
data Complex a = a :+ a
ii :: Num a => Complex a
ii = 0 :+ 1
instance Num a => Num (Complex a) where
(a :+ b) + (c :+ d) = (a + c) :+ (b + d)
(a :+ b) - (c :+ d) = (a - c) :+ (b - d... | miniBill/entangle | src/lib/Complex.hs | mit | 1,824 | 0 | 14 | 641 | 707 | 361 | 346 | 48 | 1 |
module TestWriter where
import Control.Monad.Writer
logNumber :: Int -> Writer [String] Int
logNumber x = writer (x, ["Got number: " ++ show x])
multWithLog :: Writer [String] Int
multWithLog = do
a <- logNumber 3
b <- logNumber 5
return (a*b)
gcdReverse :: Int -> Int -> Writer [String] Int
gcdRever... | rockdragon/julia-programming | code/haskell/TestWriter.hs | mit | 874 | 0 | 14 | 213 | 416 | 212 | 204 | 26 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module Xml.TrackSpec (spec) where
import Data.Text (Text)
import Data.Traversable (traverse)
import Lastfm
import Lastfm.Track
import Test.Hspec
import Text.Xml.Lens
import SpecHelper
spec :: Spec
spec = do
it "addTags" $
shouldHaveXml_ . privately... | supki/liblastfm | test/api/Xml/TrackSpec.hs | mit | 4,865 | 0 | 18 | 1,064 | 1,362 | 640 | 722 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- | Please see the README at:
--
-- https://github.com/jwiegley/fuzzcheck/blob/master... | jwiegley/fuzzcheck | Test/FuzzCheck.hs | mit | 3,083 | 0 | 18 | 848 | 1,163 | 603 | 560 | 82 | 1 |
data OperatingSystem =
GnuPlusLinux
| OpenBSDPlusNevermindJustBSDStill
| Mac
| Windows
deriving (Eq, Show, Enum)
data ProgLang =
Haskell
| Agda
| Idris
| PureScript
deriving (Eq, Show, Enum)
data Programmer =
Programmer { os :: OperatingSystem
, lang :: ProgLang }
deriving (Eq... | candu/haskellbook | ch11/programmer.hs | mit | 780 | 0 | 8 | 154 | 223 | 134 | 89 | 27 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
module Betfair.APING.Types.PriceSize
( PriceSize(..... | joe9/betfair-api | src/Betfair/APING/Types/PriceSize.hs | mit | 712 | 0 | 9 | 169 | 124 | 77 | 47 | 18 | 0 |
{-# LANGUAGE OverloadedStrings, DefaultSignatures, MultiParamTypeClasses, FunctionalDependencies, ForeignFunctionInterface #-}
module Web.Authenticate.SQRL.SecureStorage where
import Web.Authenticate.SQRL.Types
import Web.Authenticate.SQRL.Client.Types
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
... | TimLuq/sqrl-auth-client-hs | src/Web/Authenticate/SQRL/SecureStorage.hs | mit | 42,264 | 0 | 32 | 10,242 | 8,261 | 4,410 | 3,851 | 511 | 7 |
import Probability
model = do
i <- bernoulli 0.5
y <- normal 0.0 1.0
let x = if (i == 1) then y else 0.0
return ["i" %=% i, "x" %=% x]
main = do
mcmc model
| bredelings/BAli-Phy | tests/prob_prog/demos/3/Main.hs | gpl-2.0 | 193 | 0 | 12 | 74 | 86 | 42 | 44 | 8 | 2 |
{- |
Module : $Header$
Description : Interface to the theorem prover e-krhyper in CASC-mode.
Copyright : (c) Dominik Luecke, Uni Bremen 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : needs POSIX
Check out
http://ww... | nevrenato/HetsAlloy | SoftFOL/ProveHyperHyper.hs | gpl-2.0 | 11,196 | 0 | 23 | 2,990 | 2,065 | 1,096 | 969 | 223 | 5 |
{-# LANGUAGE RankNTypes #-}
-- |
-- Module: BitStream
-- Copyright: (C) 2015-2018, Virtual Forge GmbH
-- License: GPL2
-- Maintainer: Hans-Christian Esperer <hc@hcesperer.org>
-- Stability: experimental
-- Portability: portable
-- |
-- (De-)compress SAPCAR files
module Codec.Archive.SAPCAR.BitStream
( BitStream
... | VirtualForgeGmbH/hascar | src/Codec/Archive/SAPCAR/BitStream.hs | gpl-2.0 | 3,894 | 0 | 14 | 923 | 1,240 | 628 | 612 | 90 | 4 |
module TestHuffman where
import qualified Data.ByteString.Lazy as ByteString
import Test.QuickCheck
import Test.QuickCheck.Instances
import qualified Huffman
prop_convertWord32ToBits w n =
1 <= n && n <= 32 ==> length (Huffman.convertWord32ToBits w n) == fromIntegral n
prop_decodeEncode buf =
ByteString.length... | authchir/SoSe17-FFP-haskell-http2-server | test/TestHuffman.hs | gpl-3.0 | 487 | 0 | 10 | 74 | 151 | 79 | 72 | -1 | -1 |
import Prelude
import System.Process
import QFeldspar.QDSL
{-
Syntax:
GHC Haskell (almost)
Typed Quotations
domain-specific constructs
=
fully applied variables
Primitives:
- constructors and destructors for each datatype
- overloaded arithmetic operators
- overloaded comparative... | shayan-najd/QFeldspar | Examples/DSLDISS/Live.hs | gpl-3.0 | 5,078 | 20 | 16 | 1,787 | 928 | 494 | 434 | -1 | -1 |
{- New approach to solve Wadler's expression
problem Similar to alacarte, but without the problem of
injections. Same technique was used for causal functions.
We study here if it is possible to add new operations, since
in the implementation of causal functions, only one was necessary
-}
{-# LANGUAGE
Deriv... | balez/lambda-coinduction | ModularDatatypes/Existential.hs | gpl-3.0 | 2,992 | 0 | 11 | 665 | 785 | 412 | 373 | -1 | -1 |
module Functors where
data Barry t k p = Barry { yabba :: p, dabba :: t k }
instance Functor (Barry a b) where
fmap f (Barry {yabba = x, dabba = y}) = Barry {yabba = f x, dabba = y}
-- BOOOOM, head explosion
-- fmap (++ "!") getLine
-- fmap (fmap (*6) (subtract 1)) $ Just 4
-- fmap ((*6) . (subtract 1)) $ ... | cevaris/LYAHFGG | src/Functors.hs | gpl-3.0 | 510 | 0 | 10 | 131 | 171 | 97 | 74 | 8 | 0 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/State/Doodad.hs | gpl-3.0 | 5,866 | 0 | 22 | 1,481 | 1,353 | 731 | 622 | 87 | 4 |
{-# LANGUAGE TypeSynonymInstances , FlexibleInstances #-}
module HMeans.Data where
import HMeans.Common
import HMeans.Algebra
import qualified Data.IntSet as ISet
import qualified Data.IntMap.Strict as IMap
import qualified Data.Map.Strict as Map
import Debug.Trace
class Data a where
getId ... | ehlemur/HMeans | src/HMeans/Data.hs | gpl-3.0 | 605 | 0 | 9 | 141 | 187 | 104 | 83 | 16 | 1 |
{-# language TypeFamilies #-}
module M where
data family F a
data instance F Int = D Int
| lspitzner/brittany | data/Test214.hs | agpl-3.0 | 89 | 0 | 6 | 18 | 24 | 15 | 9 | 4 | 0 |
{-
passman
Copyright (C) 2018-2021 Jonathan Lamothe
<jonathan@jlamothe.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later vers... | jlamothe/passman | test/Spec/PWSetService.hs | lgpl-3.0 | 2,071 | 0 | 8 | 401 | 489 | 268 | 221 | 47 | 1 |
-----------------------------------------------------------------------------
--
-- Module : TestEncoder
-- Description :
-- Copyright : (c) Tobias Reinhardt, 2015 <tobioso92_@hotmail.com
-- License : Apache License, Version 2.0
--
-- Maintainer : Tobias Reinhardt <tobioso92_@hotmail.com>
-- Portability... | tobiasreinhardt/show | IniConfiguration/tests/TestEncoder.hs | apache-2.0 | 1,449 | 8 | 17 | 326 | 304 | 183 | 121 | 19 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
module Seraph.Free where
-------------------------------------------------------------------------------
import Control.Exception
import Prelude hiding (log)
import System.... | MichaelXavier/Seraph | src/Seraph/Free.hs | bsd-2-clause | 2,375 | 0 | 9 | 558 | 372 | 216 | 156 | 32 | 0 |
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-|
Module : Reflex.Dom.HTML5.Component
Description : Components providing pre-defined functionality.
Copyright : (c) gspia 2017 -
License : BSD
Maintainer : gspia
= Components
A set of components with some helper functions to easy up the writing
of user... | gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Component.hs | bsd-3-clause | 556 | 0 | 5 | 90 | 46 | 35 | 11 | 6 | 0 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
#ifdef STMHASKELL
import Control.STMHaskell.STM --full abort STM (STM Haskell)
#elif defined(FABORT)
import Control.Full.STM --full abort STM (NoRec)
#elif defined(ORDERED)
import Control.Ordered.STM
#elif defined(CPSFULL)
import Control.CPSFull.STM
#elif d... | ml9951/ghc | libraries/pastm/examples/Synthetic.hs | bsd-3-clause | 2,029 | 0 | 15 | 577 | 572 | 285 | 287 | -1 | -1 |
{- | This module contains the definition of the TimeStepSummary
-}
module TimeStepSummary (
TimeStepSummary(..)
) where
{- | The TimeStepSummary type class summarizes all of the operations that
were carried out on the object in a single time step. Summaries should
be capable of being "concatenated" toget... | ekinan/HaskellTurtleGraphics | src/TimeStep/TimeStepSummary.hs | bsd-3-clause | 889 | 0 | 6 | 218 | 68 | 43 | 25 | 9 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Data.Sparse where
import qualified Data.List as L
import Debug.Trace
--import qualified Data.Vector.Generic as V
import qualified Data.Vector.Unboxed as U
import Prelude hiding (pred, (!!))
... | spott/sparse | src/Data/Sparse.hs | bsd-3-clause | 6,823 | 0 | 16 | 2,715 | 2,194 | 1,146 | 1,048 | 95 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE BangPatterns #-}
module ContractGen where
impor... | byteally/webapi | webapi-swagger/src/ContractGen.hs | bsd-3-clause | 107,791 | 0 | 43 | 29,935 | 23,387 | 11,854 | 11,533 | 1,574 | 38 |
--------------------------------------------------------------------------------
module Parse.Territory where
import Data.Char (isLetter)
import Text.ParserCombinators.ReadP
import Parse.Common
--------------------------------------------------------------------------------
visaTerritory :: ReadP String
visaTerri... | mietek/catools | src/caparse/Parse/Territory.hs | bsd-3-clause | 10,076 | 0 | 9 | 3,336 | 2,192 | 1,267 | 925 | 308 | 1 |
import Factorial
num = 20
main = print $ (round (fac (num * 2) / (fac num * fac num)) :: Integer)
| stulli/projectEuler | eu15.hs | bsd-3-clause | 100 | 0 | 12 | 24 | 57 | 30 | 27 | 3 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes #-}
module Ivory.Compile.C.Modules where
import Paths_ivory_backend_c (version)
import Prelude ()
import Prelude.Compat
import Text.PrettyPrint.Mainland
#if MIN_VERSION_mainland_pretty(0,6,0)
import ... | GaloisInc/ivory | ivory-backend-c/src/Ivory/Compile/C/Modules.hs | bsd-3-clause | 6,083 | 0 | 15 | 1,800 | 1,567 | 827 | 740 | 112 | 2 |
{-# LANGUAGE PatternGuards, ScopedTypeVariables, RecordWildCards, ViewPatterns #-}
-- | Check the input/output pairs in the tests/ directory
module Test.InputOutput(testInputOutput) where
import Control.Applicative
import Data.Tuple.Extra
import Control.Exception
import Control.Monad
import Control.Monad.IO.Class
imp... | ndmitchell/hlint | src/Test/InputOutput.hs | bsd-3-clause | 4,369 | 0 | 23 | 1,125 | 1,698 | 885 | 813 | 88 | 8 |
{-# LANGUAGE InstanceSigs #-}
module EitherT where
import Control.Monad.Trans.Class
import Control.Monad
newtype EitherT e m a = EitherT { runEitherT :: m (Either e a) }
instance Functor m => Functor (EitherT e m) where
fmap f (EitherT ma) = EitherT $ (fmap.fmap) f ma
instance Applicative m => Applicative (Either... | stites/composition | src/EitherT.hs | bsd-3-clause | 1,136 | 0 | 14 | 266 | 535 | 267 | 268 | 27 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative ((<*>))
import Control.Exception (try, SomeException)
import Data.Text as T
import qualified Network.Lastfm.Album as LastAlbum
import Network.Lastfm (... | rethab/tagger | src/Tagger/Main.hs | bsd-3-clause | 1,649 | 0 | 17 | 565 | 456 | 242 | 214 | 36 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module LineParsers (
ParserDef,
ParserDefs,
loadParsers,
findParser,
isEmptyLine,
isSingleLineComment,
isMultiLineCommentStart,
isMultiLineCommentEnd,
getName,
getExt
) where
import Text.Regex.Posix
import Data.Map as Map
import Data.Maybe
import Data.List as Lis... | LFDM/hstats | src/lib/LineParsers.hs | bsd-3-clause | 2,663 | 0 | 15 | 566 | 767 | 418 | 349 | 71 | 2 |
{-# LANGUAGE ExplicitNamespaces #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Promotion.TH
-- Copyright : (C) 2013 Richard Eisenberg
-- License : BSD-style (see LICENSE)
-- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)
-- Stability : exp... | int-index/singletons | src/Data/Promotion/TH.hs | bsd-3-clause | 2,176 | 0 | 5 | 306 | 311 | 218 | 93 | 33 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.PolygonOffsetClamp
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Porta... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/PolygonOffsetClamp.hs | bsd-3-clause | 745 | 0 | 5 | 101 | 57 | 43 | 14 | 9 | 0 |
{-# LANGUAGE CPP #-}
module TcInteract (
solveSimpleGivens, -- Solves [EvVar],GivenLoc
solveSimpleWanteds -- Solves Cts
) where
#include "HsVersions.h"
import BasicTypes ()
import HsTypes ( hsIPNameFS )
import FastString
import TcCanonical
import TcFlatten
import VarSet
import Type
import Kind (isK... | gcampax/ghc | compiler/typecheck/TcInteract.hs | bsd-3-clause | 79,229 | 110 | 23 | 23,625 | 11,462 | 5,959 | 5,503 | -1 | -1 |
module SchemeParser where
import Text.ParserCombinators.Parsec hiding (spaces)
import System.Environment
import Control.Monad
import Control.Monad.Error
import Types
import Error
symbol :: Parser Char
symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
spaces :: Parser()
spaces = skipMany1 space
parseString :: Parser LispVal
pars... | programming-language-kungfu/scheme | src/SchemeParser.hs | bsd-3-clause | 1,647 | 0 | 11 | 521 | 494 | 236 | 258 | 53 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
-- |
-- Module : Main
-- Copyright : (c) The President and Fellows of Harvard College 2009-2010
-- Copyright : (c) Geoffrey Mainland 2012
-- License : BSD-style
--
-- Maintainer : Geoffrey Mainland <mainland@apeiro... | mainland/nikola | examples/blackscholes/Main.hs | bsd-3-clause | 4,080 | 0 | 17 | 1,248 | 1,135 | 620 | 515 | 93 | 2 |
module GSS
( GState, Pos, create, add, pop, fetchDescriptor, mkGState )
where
import Data.Map as M
import Data.Set as S
import Data.Maybe
import Data.List
-- | Position in the input stream
type Pos = Int
-- | Type of GSS node. Nodes should be created using 'create'
data Node lab = Root | Node lab Pos deriving (Eq,Or... | adept/hagll | GSS.hs | bsd-3-clause | 3,947 | 0 | 12 | 1,028 | 1,228 | 692 | 536 | 73 | 2 |
module Utils.Compat where
import MonadLib
import Network.CGI.Monad
import qualified Control.Monad.Trans as MTL
instance MonadT CGIT where
lift = MTL.lift
instance BaseM m n => BaseM (CGIT m) n where
inBase = lift . inBase
instance MonadCGI m => MonadCGI (ReaderT r m) where
cgiAddHeader h s = lift (cgiAddHeade... | glguy/hpaste | src/Utils/Compat.hs | bsd-3-clause | 673 | 0 | 8 | 147 | 271 | 138 | 133 | -1 | -1 |
-- |Types used during code generation, shared between 'Generate' and
-- Generate.PostProcessing
module Generate.Types where
import Control.Applicative
import Control.Monad.RW
import Data.Monoid
import BuildData
import Data.XCB.Types
{-
output from genertion:
an HsModule
However, as an intermediate result, we n... | aslatter/xhb | build-utils/src/Generate/Types.hs | bsd-3-clause | 1,137 | 0 | 9 | 220 | 85 | 54 | 31 | 11 | 0 |
-- -----------------------------------------------------------------------------
-- Copyright 2002, Simon Marlow.
-- Copyright 2006, Bjorn Bringert.
-- Copyright 2009, Henning Thielemann.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted prov... | xpika/mohws | src/Network/MoHWS/HTTP/Request.hs | bsd-3-clause | 6,818 | 0 | 14 | 1,555 | 1,419 | 809 | 610 | 124 | 3 |
--
--
--
-----------------
-- Exercise 3.15.
-----------------
--
--
--
module E'3'15 where
import E'3'13 ( max, maxThree )
import E'3'14 ( min, minThree )
import Prelude hiding ( min , max )
import qualified Prelude ( min , max )
import Test.QuickCheck ( quickCheck , verboseCheck )
prop_maxThree :: Integer ->... | pascal-knodel/haskell-craft | _/links/E'3'15.hs | mit | 1,828 | 0 | 17 | 704 | 457 | 251 | 206 | 27 | 1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Error
-- Copyright : (c) Michael Weber <michael.weber@post.rwth-aachen.de> 2001,
-- (c) Jeff Newbern 2003-2006,
-- (c) Andriy Palamarchuk 2006
--... | jwiegley/ghc-release | libraries/transformers/Control/Monad/Trans/Error.hs | gpl-3.0 | 7,992 | 0 | 21 | 2,189 | 2,268 | 1,184 | 1,084 | 141 | 2 |
module DevelMain (update) where
import Rapid
import Control.Wire.Controller (control)
import Holotype (holotype)
update :: IO ()
update =
rapid 0 $ \r ->
restart r "holotype" $
(control holotype)
| deepfire/mood | proto/DevelMain.hs | agpl-3.0 | 235 | 0 | 9 | 68 | 73 | 41 | 32 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Util
import Test.Hspec
import Test.Hspec.HUnit
import Test.HUnit
import Model
main = hspec $ describe "validateContent"
[ it "adds IDs to DITA content" $
"<p id=\"x2\">foo</p><p id=\"x1\">bar</p>" @=? validateContent TFDitaConcept "<p>foo</p><p id=\"x1\">bar</p>"
... | snoyberg/yesodwiki | runtests.hs | bsd-2-clause | 482 | 0 | 10 | 81 | 76 | 40 | 36 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module HollaBack.Date.Conversion (decideTimestamp,
timestamp,
dowDiff) where
import Control.Applicative ((<$>),
(<*>),
pure)
import Data.Time.Calendar (Day(..),... | bitemyapp/HollaBack | HollaBack/Date/Conversion.hs | bsd-2-clause | 4,367 | 0 | 10 | 1,251 | 1,195 | 640 | 555 | 95 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Processor/memory topology
module Haskus.System.Linux.Topology
( CPUMap(..)
, parseMemInfo
, readMemInfo
, parseCPUMap
, readCPUMap
, member
, Node(..)
, NUMA(..)
, loadNUMA
, nodeMemoryStatus
, nodeCPUs
)
where
import Text.Megaparsec
import T... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/Topology.hs | bsd-3-clause | 4,197 | 0 | 18 | 1,016 | 1,316 | 692 | 624 | 102 | 3 |
{-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
import Control.Monad
f :: Int -> Int
f = (+ 3)
| jystic/hsimport | tests/goldenFiles/ModuleTest16.hs | bsd-3-clause | 129 | 0 | 5 | 37 | 39 | 25 | 14 | 8 | 1 |
-- | Functions and utilities to detect the importent modules, classes
-- and types of the plugin.
module Control.Super.Plugin.Detect
( -- * Searching for Modules
ModuleQuery(..)
, findModuleByQuery
, findModule
, defaultFindEitherModuleErrMsg
-- * Searching for Classes
, ClassQuery(..)
, isOption... | jbracker/supermonad-plugin | src/Control/Super/Plugin/Detect.hs | bsd-3-clause | 17,094 | 0 | 21 | 3,309 | 3,624 | 1,950 | 1,674 | 258 | 3 |
fix :: (a -> a) -> a
fix f = f (fix f)
fix2 :: (a -> b -> a) -> (b -> a -> b) -> a
fix2 f g = f (fix2 f g) (fix2 g f)
| YoshikuniJujo/funpaala | samples/others/recLocal.hs | bsd-3-clause | 119 | 0 | 9 | 40 | 100 | 51 | 49 | 4 | 1 |
{-# LANGUAGE PArr #-}
{-# OPTIONS -fvectorise #-}
module Sort ( medianIndex, collect, sort ) where
import Data.Array.Parallel.Prelude
import qualified Data.Array.Parallel.Prelude.Double as D
import Data.Array.Parallel.Prelude.Int as I
import qualified Prelude as P
kthSmallestIndex :: [:(Int,D.Double):] -> Int -> Int... | mainland/dph | icebox/examples/delaunay/Sort.hs | bsd-3-clause | 1,470 | 84 | 12 | 405 | 597 | 396 | 201 | -1 | -1 |
{- -*- Mode: haskell; -*-
Haskell LDAP Interface
This code is under a 3-clause BSD license; see COPYING for details.
-}
{- |
Module : LDAP
Copyright : Copyright (C) 2005-2007 John Goerzen
License : BSD
Maintainer : John Goerzen,
Maintainer : jgoerzen\@complete.org
Stability : provisional
... | jgoerzen/ldap-haskell | LDAP.hs | bsd-3-clause | 1,290 | 0 | 6 | 368 | 112 | 76 | 36 | 15 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANG... | spacekitteh/compdata | src/Data/Comp/Multi/Annotation.hs | bsd-3-clause | 2,590 | 0 | 11 | 582 | 542 | 304 | 238 | 42 | 1 |
module Cis194.Hw.CalcSpec (main, spec) where
import Test.Hspec
import Cis194.Hw.Calc
import Cis194.Hw.ExprT
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Calculator - eval" $ do
it "should add and multiply numbers" $ do
eval (Mul (Add (Lit 2) (Lit 3)) (Lit 4)) `shouldBe` 20
describe... | halarnold2000/cis194 | test/Cis194/Hw/CalcSpec.hs | bsd-3-clause | 2,421 | 0 | 20 | 625 | 1,083 | 540 | 543 | 56 | 1 |
module PatternMatch6 where
g = f undefined
f x = (\(p:ps) -> (case p of
x | x == 45 -> 12
_ -> 52))
| kmate/HaRe | old/testing/foldDef/PatternMatch6_TokOut.hs | bsd-3-clause | 132 | 0 | 14 | 57 | 64 | 34 | 30 | 5 | 2 |
<?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>Active Scan Rules - Blpha | ZAP Extension</title>
<maps>
<homeID>top</homeID... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/wavsepRpt/resources/help_sr_CS/helpset_sr_CS.hs | apache-2.0 | 987 | 80 | 67 | 163 | 422 | 213 | 209 | -1 | -1 |
-- Copyright (c) 2000 Galois Connections, Inc.
-- All rights reserved. This software is distributed as
-- free software under the license in the file "LICENSE",
-- which is included in the distribution.
module Eval where
import Control.Monad
import Data.Array
import Geometry
import CSG
import Surface
import Data
im... | shlevy/ghc | testsuite/tests/programs/galois_raytrace/Eval.hs | bsd-3-clause | 12,604 | 0 | 30 | 3,666 | 4,666 | 2,455 | 2,211 | 232 | 6 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | Jxck/yesod-tutorial | Settings.hs | bsd-2-clause | 2,411 | 0 | 9 | 436 | 267 | 171 | 96 | -1 | -1 |
{-# LANGUAGE TypeFamilies, NamedWildCards, PolyKinds #-}
-- All declarations below are accepted when the NamedWildCards extension is not
-- enabled and the identifiers starting with _ are parsed as type variables.
-- They should remain valid when the extension is on.
--
-- See Trac #11098 and comments in #10982
modul... | olsner/ghc | testsuite/tests/partial-sigs/should_compile/NamedWildcardsAsTyVars.hs | bsd-3-clause | 906 | 0 | 7 | 229 | 275 | 164 | 111 | -1 | -1 |
-- The instance decl is illegal without UndecidableInstances
module ShouldFail where
data Rec f = In (f (Rec f))
instance Eq (f (Rec f)) => Eq (Rec f) where
(In x) == (In y) = x == y
| siddhanathan/ghc | testsuite/tests/typecheck/should_fail/tcfail108.hs | bsd-3-clause | 196 | 0 | 10 | 51 | 87 | 45 | 42 | -1 | -1 |
module Y2016.M10.D26.Exercise where
import Data.Map (Map)
import Data.Time
import Analytics.Trading.Data.Row (Symbol) -- http://lpaste.net/109658
import Analytics.Trading.Scan.Top5s -- http://lpaste.net/1443717939034324992
-- below imports available from 1HaskellADay git repository
import Y2016.M10.D19.Exerci... | geophf/1HaskellADay | exercises/HAD/Y2016/M10/D26/Exercise.hs | mit | 2,167 | 0 | 9 | 383 | 198 | 121 | 77 | 16 | 1 |
module State where
import Control.Monad
import Test.QuickCheck
newtype State s a = MkState {unState :: s -> (a,s)}
instance Functor (State s) where
fmap f (MkState x) = MkState (\s -> let (a, s') = x s in (f a, s'))
instance Applicative (State s) where
pure x = MkState (\s -> (x,s))
MkState f <*> MkState x ... | NickAger/LearningHaskell | Monads and all that/State Monad.hsproj/State.hs | mit | 1,100 | 0 | 13 | 405 | 571 | 289 | 282 | 41 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module DataController where
import Control.Monad (unless, when)
import Data.Acid
import qualified Data.Text as Text
import Data.Time.Clock
import Control.Concurrent (forkIO, ThreadId)
import Subscriptions
import LatestStore
import Shared
import Duration
import Protocol (ImmediateRes... | TK009/sensorbox | src/DataController.hs | mit | 3,948 | 0 | 20 | 1,352 | 873 | 443 | 430 | 80 | 3 |
-- -------------------------------------------------------------------------------------
-- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
-- For email, run on linux (perl v5.8.5):
-- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0... | cbrghostrider/Hacking | HackerRank/Contests/ProjectEuler/002_evenFibs.hs | mit | 639 | 0 | 13 | 121 | 143 | 75 | 68 | 6 | 1 |
import Data.Array
import qualified Data.Ix as Ix
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Skip
| Copy Value Register
| Bump Direction Register
| Add Direction Register Register
| MultiplyAndAdd... | SamirTalwar/advent-of-code | 2016/AOC_23_2.hs | mit | 5,821 | 0 | 18 | 1,330 | 2,158 | 1,108 | 1,050 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Galua.Debugger.View.Analysis where
import qualified Data.Aeson as JS
import qualified Data.Aeson.Types as JS
import Data.Aeson ((.=))
import Data.Text(Text)
import qualified Data.Text as Text
import Data.Text.Encoding(decodeUtf8)
... | GaloisInc/galua | galua-dbg/src/Galua/Debugger/View/Analysis.hs | mit | 4,975 | 0 | 14 | 1,778 | 1,377 | 720 | 657 | 103 | 8 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.URLUtils (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.URLUtils
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Generated.URLUt... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/URLUtils.hs | mit | 337 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
main = do
print $ filter issqrt [a*1100+b*11 | a <- [1..9], b <- [0..9]] where
isqrt = round . sqrt . fromIntegral
issqrt x = (isqrt x) * (isqrt x) == x
| Voleking/ICPC | references/aoapc-book/BeginningAlgorithmContests/haskell/ch2/p2-1.hs | mit | 163 | 0 | 12 | 43 | 102 | 52 | 50 | 4 | 1 |
module Main (main) where
import qualified Sudoku
main :: IO ()
main = Sudoku.main
| rmcgibbo/sudoku | executable/Main.hs | mit | 84 | 0 | 6 | 16 | 30 | 18 | 12 | 4 | 1 |
{- |
Module : $Header$
Description : definition of the datatype describing
the abstract FreeCAD terms and and a few tools describing simple
mathematical operations on those building-blocks (3d vectors,
rotation matrices, rotation quaternions)
Copyright : (c) Robert... | nevrenato/Hets_Fork | FreeCAD/As.hs | gpl-2.0 | 3,829 | 0 | 10 | 1,028 | 540 | 325 | 215 | 37 | 0 |
module FalseLangermann where
import Data.List
import Control.Monad.State.Lazy
import System.Random
import Text.Printf
import Data.ByteString.Lazy (ByteString)
import GDCN.Trusted.Data.Binary (encode, decode)
type Vector = [Double]
type Matrix = [Vector]
-- Constant variables
dimensions :: Int
dimensions = 2
mCon... | GDCN/GDCN | GDCN_proj/dGDCN/data/FalseWork/code/FalseLangermann.hs | gpl-3.0 | 2,686 | 0 | 13 | 634 | 1,100 | 590 | 510 | 73 | 1 |
module HumanPlayer where
import System.IO
import Games
humanPlayer :: Game b m => Player b m
humanPlayer game =
do --putStrLn $ "Valid moves: " ++ show (moves (turn game) (state game))
putStr $ "Move for player " ++ show (turn game + 1) ++ ": "
hFlush stdout
moveTxt <- getLine
case readMove (tur... | krame505/board_games | haskell/HumanPlayer.hs | gpl-3.0 | 626 | 0 | 14 | 204 | 186 | 87 | 99 | 18 | 3 |
{-
- Copyright (C) 2013 Alexander Berntsen <alexander@plaimi.net>
- Copyright (C) 2013 Stian Ellingsen <stian@plaimi.net>
-
- This file is part of bweakfwu.
-
- bweakfwu is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Fou... | plaimi/bweakfwu | src/bweakfwu/Movable.hs | gpl-3.0 | 2,781 | 0 | 10 | 575 | 363 | 206 | 157 | 25 | 1 |
module Main where
import System.Term
main :: IO ()
main = initialize
| mdibaiee/serverman | app/Main.hs | gpl-3.0 | 75 | 0 | 6 | 18 | 24 | 14 | 10 | 4 | 1 |
module Fathens.Bitcoin.Binary.Num (
Word256(..)
, BigEndianFixed(..)
, toWord256
, fromBigEndian
, toBigEndian
, putBigEndianFixed
) where
import Control.Monad
import Data.Bits
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BS
import Data.Wor... | sawatani/bitcoin-hall | src/Fathens/Bitcoin/Binary/Num.hs | gpl-3.0 | 4,334 | 0 | 14 | 1,090 | 1,651 | 847 | 804 | 113 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeVTLDevices.hs | mpl-2.0 | 6,420 | 0 | 14 | 1,374 | 895 | 528 | 367 | 92 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-consumersurveys/gen/Network/Google/Resource/ConsumerSurveys/MobileApppanels/Update.hs | mpl-2.0 | 3,476 | 0 | 13 | 737 | 387 | 234 | 153 | 63 | 1 |
{-# LANGUAGE BangPatterns
, FlexibleContexts #-}
module Vision.Image.Parallel (computeP) where
import Control.Concurrent (
forkIO, getNumCapabilities, newEmptyMVar, putMVar, takeMVar)
import Control.Monad.ST (ST, stToIO)
import Data.Vector (enumFromN, forM, forM_)
import Foreign.Storable (Storable)
imp... | RaphaelJ/friday | src/Vision/Image/Parallel.hs | lgpl-3.0 | 2,177 | 0 | 23 | 617 | 599 | 317 | 282 | 41 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{- |
Module : Neovim.RPC.FunctionCall
Description : Functions for calling functions
Copyright : (c) Sebastian Witte
License : Apache-2.0
Maintainer : woozletoff@gmail.com
Stability : experimental
-}
module Neovim.RPC.FunctionCall (
... | lslah/nvim-hs | library/Neovim/RPC/FunctionCall.hs | apache-2.0 | 4,925 | 0 | 15 | 1,234 | 1,025 | 542 | 483 | 83 | 3 |
module Walk.A293689 (a293689, a293689_list) where
import Helpers.Primes (isPrime)
-- The Prime Ant
-- [3 4 5 6 ...]
-- [2]
-- [4 5 6 ...]
-- [3 2]
-- [5 6 7 ...]
-- [4 3 2]
-- [2 5 6 7 ...]
-- [5 2]
a293689 :: Int -> Int
a293689 = (!!) a293689_list
a293689_list :: [Int]
a293689_list = scanl (+) 0 firstDifferences... | peterokagey/haskellOEIS | src/Walk/A293689.hs | apache-2.0 | 1,996 | 0 | 15 | 594 | 311 | 189 | 122 | 15 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="id-ID">
<title>Passive Scan Rules - Alpha | ZAP Extension</title>
<maps>
<homeID>top</homeI... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/pscanrulesAlpha/resources/help_id_ID/helpset_id_ID.hs | apache-2.0 | 990 | 80 | 67 | 163 | 422 | 213 | 209 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Openshift.V1.BuildSource where
import GHC.Generics
import Data.Text
import Openshift.V1.BinaryBuildSource
impo... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/BuildSource.hs | apache-2.0 | 1,815 | 0 | 18 | 303 | 244 | 148 | 96 | 26 | 0 |
module FractalFlame.Flam3.Flame
( postProcessFlame
, module FractalFlame.Flam3.Types.Flame
)
where
import System.Random
import FractalFlame.Flam3.Types.Flame
import FractalFlame.Generator.Types.Generator
import FractalFlame.Palette
import FractalFlame.Symmetry
-- | Postprocessing steps to get a Flame ready f... | anthezium/fractal_flame_renderer_haskell | FractalFlame/Flam3/Flame.hs | bsd-2-clause | 705 | 0 | 12 | 108 | 152 | 89 | 63 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module TestText where
import Test.Hspec
import Pretty()
import Types
import TestCommon
testBuiltInText :: Spec
testBuiltInText =
describe "Built-in Text Functions" $ do
describe "CONCATENATE" $
checkBuiltIn BiCheck
... | ahodgen/archer-calc | tests/TestText.hs | bsd-2-clause | 5,687 | 0 | 15 | 2,290 | 827 | 456 | 371 | 109 | 1 |
{-
(c) The University of Glasgow 2006-2008
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
-}
{-# LANGUAGE CPP, NondecreasingIndentation #-}
-- | Module for constructing @ModIface@ values (interface files),
-- writing them to disk and comparing two versions to see if
-- recompilation is required.
module MkI... | GaloisInc/halvm-ghc | compiler/iface/MkIface.hs | bsd-3-clause | 78,588 | 3 | 22 | 24,783 | 14,100 | 7,408 | 6,692 | -1 | -1 |
module FRP.Sodium.GameEngine2D.Geometry where
type Coord = Float
type Point = (Coord, Coord)
type Vector = (Coord, Coord)
type Rect = (Point, Vector) -- Central point and size from centre to edge
scale :: Coord -> Vector -> Vector
scale s (vx, vy) = (vx*s, vy*s)
negateVector :: Vector -> Vector
negateVector (vx, ... | the-real-blackh/sodium-2d-game-engine | FRP/Sodium/GameEngine2D/Geometry.hs | bsd-3-clause | 9,010 | 0 | 15 | 2,294 | 3,641 | 2,023 | 1,618 | 198 | 4 |
{-|
Module : Language.MDL.Interp.InterpState
Description : Stores state for the interpreter
The 'InterpState' data structure stores all the state of the interpreter as it
executes each 'Expr'
-}
module Language.MDL.Interp.InterpState (
InterpState(..),
Lighting(..),
PointLight(..),
ShadingType(..),
top... | jbaum98/graphics | src/Language/MDL/Interp/InterpState.hs | bsd-3-clause | 1,424 | 0 | 11 | 352 | 259 | 156 | 103 | 38 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
module Lib.Database ( createUsers
, allUsersQuery
, getUserQuery
, getUser
, createDatabase
, connectDb
... | stephenpascoe/haskell-fingerd | src/Lib/Database.hs | bsd-3-clause | 3,285 | 0 | 11 | 984 | 776 | 447 | 329 | 87 | 3 |
{-# LANGUAGE CPP,TemplateHaskell,DeriveDataTypeable #-}
module Data.Encoding.ISO88596
(ISO88596(..)) where
import Data.Array ((!),Array)
import Data.Word (Word8)
import Data.Map (Map,lookup,member)
import Data.Encoding.Base
import Prelude hiding (lookup)
import Control.OldException (throwDyn)
import Data.Typeable
da... | abuiles/turbinado-blog | tmp/dependencies/encoding-0.4.1/Data/Encoding/ISO88596.hs | bsd-3-clause | 804 | 2 | 14 | 108 | 250 | 140 | 110 | 21 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- | Locations of items.
module Penny.Cursor where
import qualified Control.Lens as Lens
import Text.Show.Pretty (PrettyVal)
import qualified Text.Show.Pretty as Pretty
import qualified P... | massysett/penny | penny/lib/Penny/Cursor.hs | bsd-3-clause | 811 | 0 | 10 | 136 | 173 | 102 | 71 | 20 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.