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 OverloadedStrings, GeneralizedNewtypeDeriving #-}
module Bot.Types where
import Text.JSON
import Control.Applicative
type ChatId = (String, Int)
data Config = Config
{ cfgToken :: String
, cfgGroup :: Int
, cfgDoor :: String
, cfgGate :: String
, cfgTimeout :: Int -- Seconds
} deri... | house4hack/h4h-bot | src/Bot/Types.hs | gpl-3.0 | 2,396 | 0 | 12 | 647 | 715 | 381 | 334 | 75 | 1 |
module SerializerSpec (spec) where
import Test.Hspec
import Language.Mulang.Serializer (brace, bracket)
import Language.Mulang.Parsers.JavaScript (js)
spec :: Spec
spec = do
describe "Serializer" $ do
it "Serializes non empty asts" $ do
(brace (js "if (c) 1 else 2")) `shouldB... | mumuki/mulang | spec/SerializerSpec.hs | gpl-3.0 | 1,112 | 0 | 17 | 180 | 216 | 114 | 102 | 16 | 1 |
-- inspired by Dimensional library
module Maths.Unsafe where
import Prelude
data UPosn
data USpan
data UDiff
data UFree
class ShowType a where
showType :: a -> String
showsType :: (ShowType a) => a -> ShowS
showsType dum = (showType dum ++)
instance ShowType UPosn where
showType _ = "posn"
instance ShowType... | ktvoelker/argon | src/Maths/Unsafe.hs | gpl-3.0 | 4,273 | 0 | 15 | 1,153 | 2,035 | 1,074 | 961 | -1 | -1 |
{-
This file is part of the Haskell Qlogic Library.
The Haskell Qlogic Library 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 version.
The H... | mzini/qlogic | Qlogic/ArcSat.hs | gpl-3.0 | 7,035 | 0 | 13 | 2,250 | 2,486 | 1,286 | 1,200 | 107 | 2 |
module Language.SMTLib2.Boolector (BoolectorBackend(),boolectorBackend,withBoolector) where
import Language.SMTLib2
import Language.SMTLib2.Internals
import Language.SMTLib2.Internals.Operators
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Fix
import Data.Bits
import Data.Typeable
import Data.Pro... | hguenther/smtlib2 | backends/boolector/Language/SMTLib2/Boolector.hs | gpl-3.0 | 25,519 | 552 | 29 | 6,204 | 7,430 | 3,801 | 3,629 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Lamdu.Expr.UniqueId
( ToGuid(..), UniqueId(..)
) where
import Prelude.Compat
import Control.MonadA (MonadA)
import Data.Store.Guid (Guid)
import qualified Data.Store.Guid as Guid
import Data.Store.IRef (IRef)
import qualified Da... | rvion/lamdu | Lamdu/Expr/UniqueId.hs | gpl-3.0 | 1,836 | 0 | 8 | 389 | 508 | 289 | 219 | 34 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADT... | tlaitinen/sms | backend/Handler/DB/RouteUsergroupsUserGroup.hs | gpl-3.0 | 11,538 | 0 | 23 | 4,078 | 2,746 | 1,450 | 1,296 | 229 | 17 |
{-# LANGUAGE DeriveDataTypeable #-}
module StearnsWharf.CmdLine where
import System.Console.CmdArgs (Data,Typeable,typ,def,groupname,(&=))
data CmdLine =
CmdLine {
host :: String,
dbname :: String,
user :: String,
system :: Int,
loadcase :: Int } deriving (Show, Data, Type... | baalbek/stearnswharf | src/StearnsWharf/CmdLine.hs | lgpl-3.0 | 615 | 0 | 8 | 178 | 161 | 96 | 65 | 16 | 1 |
{-# LANGUAGE TypeSynonymInstances, TypeOperators, ViewPatterns, FlexibleInstances, RecordWildCards, FlexibleContexts, OverlappingInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, DeriveDataTypeable, UndecidableInstances, TypeFamilies, ScopedTypeVariables, OverloadedStrings #-}
module Language.Pascal.JVM.Bu... | portnov/simple-pascal-compiler | spc-jvm/Language/Pascal/JVM/Builtin.hs | lgpl-3.0 | 2,315 | 0 | 10 | 547 | 508 | 291 | 217 | 47 | 1 |
{-
- This file is part of Bilder.
-
- Bilder 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 version.
-
- Bilder i... | ingemaradahl/bilder | src/Compiler/Desugar/Extract.hs | lgpl-3.0 | 5,247 | 0 | 20 | 1,158 | 2,026 | 998 | 1,028 | 121 | 3 |
module JSON2RDF
( module JSON2RDF.Types
, module JSON2RDF.Parser.Text
) where
import JSON2RDF.Types
import JSON2RDF.Parser.Text
| markborkum/json2rdf-hs | src/JSON2RDF.hs | unlicense | 129 | 0 | 5 | 15 | 30 | 20 | 10 | 5 | 0 |
module FactorialMaybe where
import Data.Maybe (fromJust)
factorial :: (Integral a) => a -> Maybe a
factorial n
| n < 0 = Nothing
| n == 0 = Just 1
| otherwise = Just $ (*n) . fromJust . factorial $ (n-1)
| OCExercise/haskellbook-solutions | chapters/chapter08/scratch/factorial-maybe.hs | bsd-2-clause | 225 | 0 | 10 | 63 | 105 | 54 | 51 | 7 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QAction.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:35
Warning : this file is machine generated - do not m... | uduki/hsQt | Qtc/Enums/Gui/QAction.hs | bsd-2-clause | 4,381 | 0 | 18 | 996 | 1,193 | 598 | 595 | 110 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
module Drive.Intercom.API
where
import Control.Monad.Free
import Control.Monad.Free.TH
import Drive.Intercom.Types
makeFree ''IntercomF
type IntercomP = Free IntercomF
| palf/free-driver | packages/drive-intercom/lib/Drive/Intercom/API.hs | bsd-3-clause | 274 | 0 | 6 | 63 | 45 | 28 | 17 | 8 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Control.DeepSeq
import Control.Exception (evaluate)
import qualified Control.Monad as M
import qualified Data.Attoparsec.Text as Atto
import qualified Data.Char as ... | ytakano/tsukuyomi | tests/json/json_haskell_atto.hs | bsd-3-clause | 5,437 | 0 | 16 | 1,852 | 1,857 | 893 | 964 | 153 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #... | GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/archival/CrucibleTranslation.hs | bsd-3-clause | 8,364 | 0 | 30 | 1,794 | 1,616 | 839 | 777 | 146 | 1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : [email protected]
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Cryptol.Symbolic... | dylanmc/cryptol | src/Cryptol/Symbolic/BitVector.hs | bsd-3-clause | 5,289 | 0 | 21 | 1,430 | 2,336 | 1,173 | 1,163 | 122 | 3 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
-- | Templates.
module HL.V.Template where
import HL.Types
import HL.V hiding (item)
import Data.Monoid
import Yesod.Static (Static)
-- | Render a template.
template
:: [Route App]
-> Text
-> ((Route App ... | yogsototh/hl | src/HL/V/Template.hs | bsd-3-clause | 5,811 | 0 | 25 | 2,066 | 1,390 | 687 | 703 | 145 | 4 |
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
-- |
-- Module : Data.UUID.Quasi
-- Copyright : (c) 2011 Lars Petersen
--
-- License : BSD-style
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
--
-- This library supplies quasiquotation of 'U.UUID's. You sh... | lpeterse/uuid-quasi | Data/UUID/Quasi.hs | bsd-3-clause | 1,687 | 0 | 14 | 377 | 335 | 183 | 152 | -1 | -1 |
------------------------------------------------------------------------
-- |
-- Module : Data.Minecraft.Classic.Protocol
-- Copyright : (c) 2016 Michael Carpenter
-- License : BSD3
-- Maintainer : Michael Carpenter <[email protected]>
-- Stability : experimental
-- Portability : portab... | oldmanmike/hs-minecraft-protocol | src/Data/Minecraft/Internal/Builder.hs | bsd-3-clause | 1,859 | 0 | 6 | 376 | 290 | 182 | 108 | 56 | 1 |
-- |
-- Module : Network.TLS.Crypto.IES
-- License : BSD-style
-- Maintainer : Kazu Yamamoto <[email protected]>
-- Stability : experimental
-- Portability : unknown
--
module Network.TLS.Crypto.IES
(
GroupPublic
, GroupPrivate
, GroupKey
-- * Group methods
, groupGenerateKeyPair
... | erikd/hs-tls | core/Network/TLS/Crypto/IES.hs | bsd-3-clause | 7,974 | 0 | 10 | 1,486 | 2,104 | 1,066 | 1,038 | 153 | 1 |
-- |
module Graphics.BothGL.Instances.GHC where
instance MonadIO gl => GL gl where
createShader t = fmap (fmap Shader . zeroNothing) glCreateShader t
shaderSource (Shader s) bs =
allocaArray (length chunks) $ \ps ->
allocaArray (length chunks) $ \pl ->
go 0 chunks ps pl
where
chunks = Lazy.toChunks... | bergey/bothgl | src/Graphics/BothGL/Instances/GHC.hs | bsd-3-clause | 1,514 | 36 | 9 | 362 | 562 | 288 | 274 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Module : MFlow.Hack.XHtml
-- Copyright :
-- License : BSD3
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability :
--
-- |
--
----------------------------------------------------------------... | agocorona/MFlow | src/MFlow/Hack/XHtml.hs | bsd-3-clause | 983 | 0 | 9 | 167 | 123 | 84 | 39 | 11 | 0 |
-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE Overl... | rfranek/duckling | Duckling/Volume/HR/Corpus.hs | bsd-3-clause | 1,123 | 0 | 9 | 334 | 194 | 115 | 79 | 26 | 1 |
module Module5.Task1 where
-- system code
data Point3D a = Point3D a a a deriving Show
-- solution code
instance Functor Point3D where
fmap f (Point3D a b c) = Point3D (f a) (f b) (f c)
| dstarcev/stepic-haskell | src/Module5/Task1.hs | bsd-3-clause | 190 | 0 | 8 | 41 | 78 | 42 | 36 | 4 | 0 |
-- Copyright (c) 2012-2016, Christoph Pohl
-- BSD License (see http://www.opensource.org/licenses/BSD-3-Clause)
-------------------------------------------------------------------------------
--
-- Project Euler Problem 21
--
-- Let d(n) be defined as the sum of proper divisors of n (numbers less than n
-- which divide... | Psirus/euler | src/euler021.hs | bsd-3-clause | 930 | 0 | 10 | 188 | 146 | 85 | 61 | 7 | 1 |
module MsgDiagram.Parser where
import Text.Parsec
import Data.Maybe
import Data.List
import MsgDiagram.Lexer
import MsgDiagram.Model
-- | Wrapper function.
parseMsgDiagram :: String -> Either ParseError MsgDiagram
parseMsgDiagram input = runParser (runLex doParse) 1 "" input
doParse :: Pars... | jfdm/hUML | src/MsgDiagram/Parser.hs | bsd-3-clause | 953 | 0 | 9 | 295 | 210 | 103 | 107 | 26 | 1 |
-- 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. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
------------------... | facebookincubator/duckling | Duckling/Ranking/Classifiers/ZH_TW.hs | bsd-3-clause | 93,989 | 0 | 15 | 43,638 | 18,872 | 11,718 | 7,154 | 1,561 | 1 |
-- | Effects
module Csound.Air.Fx(
-- * Reverbs
reverbsc1, rever1, rever2, reverTime,
smallRoom, smallHall, largeHall, magicCave,
smallRoom2, smallHall2, largeHall2, magicCave2,
-- * Delays
MaxDelayTime, DelayTime, Feedback, Balance,
echo, fdelay, fvdelay, fvdelays, funDelays, tabDelay,... | silky/csound-expression | src/Csound/Air/Fx.hs | bsd-3-clause | 19,678 | 0 | 18 | 5,077 | 5,948 | 3,165 | 2,783 | 314 | 4 |
{-# LANGUAGE ScopedTypeVariables #-}
----------------------------------------------------------------------
-- |
-- Module : Network.HaskellNet.SMTP
-- Copyright : (c) Jun Mukai 2006
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : [email protected]
-- Stability : stable
-- Portability ... | d3zd3z/HaskellNet-old | Network/HaskellNet/SMTP.hs | bsd-3-clause | 10,485 | 0 | 17 | 3,058 | 2,407 | 1,255 | 1,152 | 206 | 11 |
module LiveJournal.Entity where
import LiveJournal.Error
import Control.Monad.Error
import Data.Int
import Data.DateTime
import Data.Map
import Data.Array
type Result m a = ErrorT LJError m a
type IOResult a = Result IO a
type Community = String
makeErrorStr :: String -> IOResult a
makeErrorStr = ErrorT . return .... | jdevelop/hslj | LiveJournal/Entity.hs | bsd-3-clause | 4,139 | 0 | 9 | 1,649 | 889 | 542 | 347 | 82 | 1 |
module BowlingGame.Kata (score, roll, startGame, Game) where
type Game = [Int]
startGame :: Game
startGame = []
roll :: Int -> Game -> Game
roll pin game = pin : game
score :: Game -> Int
score = score' 1
where
score' :: Int -> Game -> Int
score' frameInde... | Alex-Diez/haskell-tdd-kata | BowlingGameKata/BowlingGameDay06/src/BowlingGame/Kata.hs | bsd-3-clause | 1,555 | 0 | 14 | 814 | 390 | 203 | 187 | 32 | 4 |
{-# LANGUAGE PatternGuards #-}
{-# OPTIONS_GHC -fomit-interface-pragmas #-}
module Distribution.Franchise.AutoHeader ( autoHeader ) where
import Distribution.Franchise.SplitFile
import Distribution.Franchise.ConfigureState
import Distribution.Franchise.GhcState ( getDefinitions )
import Distribution.Franchise.ListUti... | droundy/franchise | Distribution/Franchise/AutoHeader.hs | bsd-3-clause | 1,199 | 0 | 12 | 363 | 255 | 137 | 118 | 19 | 2 |
-- Ninety-Nine Haskell Problems
-- link: http://www.haskell.org/haskellwiki/99_questions/
module Problems where
-- 1 Find the last element of a list
myLast :: [a] -> a
myLast (x:[]) = x
myLast (_:xs) = myLast xs
-- 2 Find the last but one element of a list
myButLast :: [a] -> a
myButLast (x:_:[]) = x
myButLast (_:... | nadirs/99problems | Problems.hs | bsd-3-clause | 4,163 | 0 | 13 | 991 | 1,869 | 996 | 873 | 89 | 3 |
module Network.Api.Pin.Tests
(
main
, test
) where
import Test.Framework
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Network.Api.Pin
main ::
IO ()
main =
defaultMain [test]
test ::
Test
test =
testGroup "Pin"
[
testProperty "Identity" prop_identity
]
pro... | markhibberd/pin | test/Network/Api/Pin/Tests.hs | bsd-3-clause | 384 | 0 | 7 | 97 | 107 | 61 | 46 | 22 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module Language.Nano.Typecheck.Subst (
-- * Substitutions
RSubst (..)
, Subst
, toList
, fromList
-- * Free Type Variables
, Free (..)
-- ... | UCSD-PL/nano-js | Language/Nano/Typecheck/Subst.hs | bsd-3-clause | 5,348 | 0 | 14 | 1,507 | 1,822 | 945 | 877 | 91 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Exception (SomeException, try)
import qualified Data.Text as T
import Snap.Http.Server
import Snap.Snaplet
import Snap.Core
import System.IO
import Application
#ifdef... | dzhus/snap-metaforms | src/Main.hs | bsd-3-clause | 2,529 | 0 | 11 | 612 | 290 | 171 | 119 | 25 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Notebook where
import Data.Default (def)
import qualified Data.Default as D
import Data.Text (Text, unpack)
import qualified Data.ByteString.Lazy as B
import qualified Data.HashMap.Lazy as H
import Control.Lens hiding ((.:))
import qualified Text.Pandoc as P
import qualified Tex... | TiloWiklund/pinot | src/Notebook.hs | bsd-3-clause | 1,126 | 0 | 11 | 374 | 281 | 170 | 111 | 27 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[HsBinds]{Abstract syntax: top-level bindings and signatures}
Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@.
-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleConte... | tjakway/ghcjvm | compiler/hsSyn/HsBinds.hs | bsd-3-clause | 39,011 | 0 | 18 | 11,260 | 6,190 | 3,335 | 2,855 | 415 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Text.PDDL.PP (
module Text.PDDL.PP
, module Text.PrettyPrint.HughesPJ
) where
import qualified Data.Text as S
import Text.PrettyPrint.HughesPJ
class PP a where
pp :: a -> D... | elliottt/pddl | src/Text/PDDL/PP.hs | bsd-3-clause | 519 | 0 | 9 | 115 | 139 | 80 | 59 | 20 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn... | cdornan/idiot | Text/RE/PCRE/Sequence.hs | bsd-3-clause | 2,514 | 0 | 10 | 669 | 538 | 314 | 224 | 50 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Polynome where
import qualified Data.List as L
import qualified Data.Map as M
import Genetic
-- import Debug.Trace
data Term' var = X var
| Const Double
| Minus (Term... | energyflowanalysis/efa-2.1 | sandbox/genetic_programming/Polynome.hs | bsd-3-clause | 3,871 | 0 | 18 | 1,018 | 2,068 | 1,128 | 940 | 95 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Tell (tellAll) where
import Core
import Data.List
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.Set as S
tellAll :: M.Map User (Maybe UserMessage) -> M.Map User [UserMessage]
-> ([IRCAction], M.Map User [UserMessage])
tellAll on... | jchmrt/btjchm | Tell.hs | mit | 1,500 | 0 | 11 | 460 | 493 | 269 | 224 | 35 | 2 |
{- |
Module : ./TPTP/Prover/EProver.hs
Description : Interface for the E Theorem Prover.
Copyright : (c) Eugen Kuksa University of Magdeburg 2017
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Eugen Kuksa <[email protected]>
Stability : provisional
Portability : non-portable (imports L... | spechub/Hets | TPTP/Prover/Darwin.hs | gpl-2.0 | 2,861 | 0 | 12 | 679 | 470 | 261 | 209 | 52 | 2 |
{-# LANGUAGE ForeignFunctionInterface #-}
-- | FreeBSD system-dependent code for 'sendfile'.
module Network.Socket.SendFile.FreeBSD (_sendFile, sendFileIter, sendfile) where
import Data.Int (Int64)
import Foreign.C.Error (eAGAIN, eINTR, getErrno, throwErrno)
import Foreign.C.Types (CInt(..), CSize(..))
import Foreign.M... | christinem/courseography | vendor/sendfile-0.7.9/src/Network/Socket/SendFile/FreeBSD.hs | gpl-3.0 | 3,666 | 0 | 14 | 922 | 1,015 | 536 | 479 | 62 | 3 |
---------------------------------------------------------------------------------
--
-- https://github.storm.gatech.edu/NetASM
--
-- File:
-- Hub/Run.hs
--
-- Project:
-- NetASM: A Network Assembly for Orchestrating Programmable Network Devices
--
-- Author:
-- Muhammad Shahbaz
--
-- Copyright... | 8l/NetASM-haskell | Apps/Hub/Run.hs | gpl-3.0 | 1,792 | 0 | 8 | 417 | 222 | 147 | 75 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Module : Test.AWS.Support.Internal
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL... | fmapfmapfmap/amazonka | amazonka-support/test/Test/AWS/Support/Internal.hs | mpl-2.0 | 621 | 0 | 4 | 140 | 25 | 21 | 4 | 4 | 0 |
module PTS.Syntax.Parser.Tests where
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit (assertEqual, assertFailure)
import PTS.Error
import PTS.Syntax
parse text = parseTerm "PTS.Syntax.Parser.Tests" text :: Either [PTSError] PTS.Syntax.Term
testParser :: String -> Term... | Blaisorblade/pts | src-test/PTS/Syntax/Parser/Tests.hs | bsd-3-clause | 3,678 | 0 | 21 | 942 | 1,694 | 855 | 839 | 63 | 2 |
module B1.Program.Chart.Colors
( black4
, blue4
, darkBlue3
, lightBlue4
, lighterBlue4
, gray4
, green3
, green4
, red3
, red4
, purple3
, purple4
, white3
, white4
, yellow3
, yellow4
, color3ToList
, outlineColor
) where
import Graphics.Rendering.OpenGL
import Graphics.UI.GLFW... | madjestic/b1 | src/B1/Program/Chart/Colors.hs | bsd-3-clause | 1,852 | 0 | 9 | 378 | 599 | 318 | 281 | 65 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE... | rrnewton/pcg-random | src/System/Random/PCG/Fast.hs | bsd-3-clause | 7,598 | 0 | 11 | 1,473 | 1,452 | 789 | 663 | 120 | 1 |
{-# OPTIONS_HADDOCK hide #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnliftedFFITypes #-}
module Foundation.System.Bindings.Hs
where
import GHC.IO
import Basement.Compat.C.Types
foreign import ccall unsafe "HsBase.h __hscore_get_errno" sysHsCoreGetErrno :: IO CInt
| vincenthz/hs-foundation | foundation/Foundation/System/Bindings/Hs.hs | bsd-3-clause | 271 | 0 | 6 | 35 | 40 | 26 | 14 | 7 | 0 |
module Fay.Types.ModulePath
( ModulePath (..)
, mkModulePath
, mkModulePaths
, mkModulePathFromQName
) where
import Fay.Compiler.QName
import qualified Fay.Exts as F
import Data.List
import Data.List.Split
import Language.Haskell.Exts.Annotated
... | beni55/fay | src/Fay/Types/ModulePath.hs | bsd-3-clause | 1,223 | 0 | 10 | 252 | 259 | 144 | 115 | 19 | 1 |
{-----------------------------------------------------------------------------
A LIBRARY OF MONADIC PARSER COMBINATORS
29th July 1996
Graham Hutton Erik Meijer
University of Nottingham University of Utrecht
This Haskell 1.3... | FranklinChen/hugs98-plus-Sep2006 | packages/HaXml/src/Text/ParserCombinators/HuttonMeijerWallace.hs | bsd-3-clause | 12,608 | 0 | 19 | 4,517 | 3,048 | 1,621 | 1,427 | 120 | 3 |
{-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "dist/dist-sandbox-261cd265/build/System/Posix/ByteString/FilePath.hs" #-}
{-# LINE 1 "System/Posix/ByteString/FilePath.hsc" #-}
{-# LINE 2 "System/Posix/ByteString/FilePath.hsc" #-}
{-# LANGUAGE Safe #-}
{-# LINE 6 "System/Posix/ByteString/FilePath.hsc" #-}
------------------... | phischu/fragnix | tests/packages/scotty/System.Posix.ByteString.FilePath.hs | bsd-3-clause | 4,193 | 0 | 14 | 811 | 887 | 481 | 406 | 74 | 3 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Hints
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability : portable
--
-- Thi... | IreneKnapp/direct-opengl | Graphics/Rendering/OpenGL/GL/Hints.hs | bsd-3-clause | 2,666 | 0 | 10 | 429 | 460 | 255 | 205 | 59 | 9 |
{-# LANGUAGE CPP #-}
{- |
Module : $Header$
Description : creating Isabelle thoeries via translations
Copyright : (c) C. Maeder, Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : non-portable(Logic)
dumping a Lib... | nevrenato/HetsAlloy | Isabelle/CreateTheories.hs | gpl-2.0 | 2,176 | 0 | 18 | 567 | 435 | 225 | 210 | 45 | 4 |
module Main where
{ import Data.Graph.Inductive;
import Data.Graph.Inductive.Example;
main :: IO ();
main = return ();
myTleer :: Gr String String;
myTleer = empty;
myT1 :: Gr String String;
myT1 = mkGraph [(1,"Eins"),(2,"Zwei"),(3,"Drei")] [(1,2,"Kante1"),(3,1,"Kante2")];
myT... | ckaestne/CIDE | other/CaseStudies/fgl/CIDEfgl/test/mytest.hs | gpl-3.0 | 711 | 0 | 9 | 155 | 389 | 242 | 147 | 15 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
A ``lint'' pass to check for Core correctness
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fprof-auto #-}
module ETA.Core.CoreLint (
lintCoreBindings, lintUnfolding,
lintPassResult, lintInteractiveExpr, lintExpr,
... | alexander-at-github/eta | compiler/ETA/Core/CoreLint.hs | bsd-3-clause | 70,068 | 349 | 25 | 20,001 | 15,881 | 8,202 | 7,679 | 1,078 | 12 |
module Data.Graph.Inductive.Graph
(Node, LNode, UNode, Edge, LEdge, UEdge, Adj, Context, MContext,
Decomp, GDecomp, UContext, UDecomp, Path, LPath(..), UPath,
Graph(..), DynGraph(..), ufold, gmap, nmap, emap, nodes, edges,
newNodes, gelem, insNode, insEdge, delNode, delEdge, delLEdge,
... | ckaestne/CIDE | other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Graph.hs | gpl-3.0 | 8,604 | 0 | 15 | 2,993 | 4,558 | 2,563 | 1,995 | 192 | 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="pl-PL">
<title>Getting started Guide</title>
<maps>
<homeID>top</homeID>
<mapref locat... | rnehra01/zap-extensions | src/org/zaproxy/zap/extension/gettingStarted/resources/help_pl_PL/helpset_pl_PL.hs | apache-2.0 | 970 | 94 | 29 | 158 | 402 | 213 | 189 | -1 | -1 |
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE DataKinds, KindSignatures, PolyKinds #-}
module Bug where
pattern PATTERN = ()
data Proxy (tag :: k) (a :: *)
wrongLift :: Proxy PATTERN ()
wrongLift = undefined
| sdiehl/ghc | testsuite/tests/patsyn/should_fail/T9161-2.hs | bsd-3-clause | 212 | 0 | 6 | 37 | 50 | 31 | 19 | -1 | -1 |
--------------------------------------------------------------------------------
-- | This module provides an wrapper API around the file system which does some
-- caching.
module Hakyll.Core.Provider
( -- * Constructing resource providers
Internal.Provider
, newProvider
-- * Querying resource prop... | Javran/hakyll | src/Hakyll/Core/Provider.hs | bsd-3-clause | 1,627 | 0 | 12 | 362 | 212 | 124 | 88 | 25 | 1 |
{-# LANGUAGE QuantifiedConstraints, StandaloneDeriving, GeneralizedNewtypeDeriving #-}
module T15290c where
import Prelude hiding ( Monad(..) )
import Data.Coerce ( Coercible )
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
join :: m (m a) -> m a
newtype StateT s m a = StateT { runStateT :: s -> m (s, a... | sdiehl/ghc | testsuite/tests/deriving/should_compile/T15290c.hs | bsd-3-clause | 701 | 0 | 12 | 155 | 314 | 171 | 143 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
ExistentialQuantification, RankNTypes,
FlexibleInstances #-}
-- Arguably, the type signature for f1 should be enough to make
-- this program compile, but in 5.04 it wasn't; the
-- extra sig in f2 was needed.
--
-- This is a pretty bo... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_compile/tc166.hs | bsd-3-clause | 620 | 0 | 9 | 185 | 148 | 83 | 65 | -1 | -1 |
module Main where
{-
If a fixity declaration hasn't been supplied for
an operator, it is defaulted to being "infixl 9".
OLD: The derived Read instances for data types containing
left-assoc constructors produces code that causes
non-termination if you use 'read' to evaluate them
( (head (reads x)) is coo... | wxwxwwxxx/ghc | testsuite/tests/deriving/should_run/drvrun005.hs | bsd-3-clause | 754 | 0 | 14 | 173 | 89 | 48 | 41 | 7 | 1 |
module Main where
import Command
import Expense
import Parser
import StringUtils
import System.Environment
import System.IO
import Data.List
seeHelp :: String
seeHelp = ", see " ++ quote "pet help"
execArgs :: [String] -> ([Expense] -> Result)
execArgs [] = error $ "No command given" ++ seeHelp
execArgs (x:xs) = cas... | fredmorcos/attic | projects/pet/archive/pet_haskell_pet2/Main.hs | isc | 1,129 | 0 | 18 | 320 | 416 | 208 | 208 | 34 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
import Control.Monad
import Control.Monad.State
import Control.Monad.Writer
newtype AppWithNewtype a = AppWithNewtype {
runAppWithNewtype' :: StateT Int (WriterT [Int] IO) a
} deriving (Monad, MonadIO, MonadState Int, MonadWriter [Int])... | ageldama/monad-transformer-basics | mtWithNewtype.hs | mit | 1,402 | 0 | 10 | 221 | 299 | 157 | 142 | 26 | 1 |
module Hebrew where
import Data.Map (Map)
import qualified Data.Map as Map
import Prepare
import Prepare.Tanach.IndexParser (index)
import Prepare.Tanach.HeaderParser (header)
import Prepare.Tanach.TanachParser (tanach)
import qualified Prepare.Tanach.Paths as Paths
import System.FilePath ((</>))
loadIndex :: FilePat... | ancientlanguage/haskell-analysis | prepare/app/Hebrew.hs | mit | 1,599 | 0 | 14 | 295 | 537 | 273 | 264 | 42 | 2 |
module Graphics.Application (
runDefaultApplication,
runAnotherApplication
) where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Control.Monad.State
import Data.IORef
import Data.Maybe
import qualified Data.Set as Set
import Data.Tree
import Data.Tree.Zipper
import qualified ... | Chatanga/kage | src/Graphics/Application.hs | mit | 9,338 | 39 | 20 | 2,212 | 2,718 | 1,370 | 1,348 | 188 | 3 |
-- Problem 22
--
--Using names.txt (right click and 'Save Link/Target As...'), a 46K text
--file containing over five-thousand first names, begin by sorting it into
--alphabetical order. Then working out the alphabetical value for each
--name, multiply this value by its alphabetical position in the list to
--obtain a n... | RossMeikleham/Project-Euler-Haskell | 22.hs | mit | 1,156 | 0 | 16 | 238 | 250 | 138 | 112 | 14 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.AbstractWorker
(error, AbstractWorker, castToAbstractWorker, gTypeAbstractWorker)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, ... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/AbstractWorker.hs | mit | 1,169 | 0 | 7 | 112 | 310 | 204 | 106 | 19 | 1 |
module Generator (
randomInt
, randomIntStreamFromGenerator
, randomIntListFromGenerator
, randomIntStream
, randomIntList
, randomStringFromGenerator
, randomStringStreamFromGenerator
, randomStringStream
, randomStreamOfStringStreams
, randomListOfStringStreams
, randomByte... | chris-wood/ccnx-pktgen | src/Generator.hs | mit | 4,429 | 0 | 15 | 839 | 1,617 | 882 | 735 | 80 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Server
( createServer
) where
import Control.Concurrent
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Network
import qualified Paradise.API as API
import qualified Paradise.Client as Paradise
import ... | Hamcha/netslum | Server.hs | mit | 2,274 | 0 | 15 | 707 | 633 | 302 | 331 | 59 | 1 |
{-
**************************************************************
* Filename : RRegTypes.hs *
* Author : Markus Forsberg *
* [email protected] *
* Last Modified : 5 July, 2001 ... | SAdams601/ParRegexSearch | test/fst-0.9.0.1/FST/RRegTypes.hs | mit | 4,271 | 0 | 12 | 1,656 | 1,058 | 544 | 514 | 62 | 1 |
module WildcardSpec where
import Text.Wildcard
import Test.Hspec
import Test.QuickCheck hiding ((.&.))
spec :: Spec
spec = do
describe "test" $ do
it "matches to any string with *" $ property $ \x ->
(x :: String) `match` "*"
it "bachward match" $ property $ \x ->
("hoge" +... | ayachigin/wildcard | test/WildcardSpec.hs | mit | 743 | 0 | 16 | 232 | 258 | 137 | 121 | 18 | 1 |
module Streamer.SessionManager.DigestsFile
( consumeDgstFile
, collectDigestFileEntries
) where
import Data.Maybe
import Streamer.Util ( maybeRead )
import Control.Concurrent ( threadDelay )
import System.IO ( IOMode(ReadMode)
... | adizere/nifty-tree | src/Streamer/SessionManager/DigestsFile.hs | mit | 4,870 | 0 | 19 | 1,420 | 821 | 440 | 381 | 70 | 3 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for @xm list --long@ parser -}
{-
Copyright (C) 2013 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation... | narurien/ganeti-ceph | test/hs/Test/Ganeti/Hypervisor/Xen/XmParser.hs | gpl-2.0 | 7,668 | 9 | 17 | 1,611 | 1,492 | 788 | 704 | 116 | 2 |
{-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances, MultiParamTypeClasses #-}
module Algebraic2.Central where
import Algebraic2.Instance
import Algebraic2.Class
import Expression.Op
import Challenger.Partial
import Inter.Types
import qualified Autolib.TES.Binu as B
import Autolib.ToDoc
import Autolib.Reader
impor... | Erdwolf/autotool-bonn | src/Algebraic2/Central.hs | gpl-2.0 | 2,824 | 33 | 22 | 831 | 980 | 493 | 487 | 72 | 1 |
import System.IO
-- f = g 2
-- g a 1 = []
-- g a n = if n `mod` a == 0 then a : g a (n `div` a) else g (a+1) n
-- h x = [y | y<-[1..x], x `mod` y == 0]
-- i = j 0
-- j a (x:y:s) = if x == y then j (a+1) (y:s) else (a+1) : j 0 (y:s); j a [_] = [a+1]
-- j _ [] = []
-- k = product . map (1+) . i . f
-- main = putStrLn . ... | xkollar/handy-haskell | other/pt-2012-01/main.hs | gpl-3.0 | 2,392 | 3 | 13 | 673 | 728 | 392 | 336 | 30 | 4 |
{-# LANGUAGE GADTs #-}
module SKI where
data T t where
S :: T ((a -> b -> c) -> (a -> b) -> a -> c)
K :: T (a -> b -> a)
I :: T (a -> a)
(:$) :: T (a -> b) -> T a -> T b
instance Show (T t) where
show S = "s"
show K = "k"
show I = "i"
show (a :$ b) = show a ++ "(" ++ show b ++ ")"
type TChurch a = ... | KenetJervet/mapensee | haskell/theorem-proving/SKI/SKI.hs | gpl-3.0 | 631 | 28 | 19 | 233 | 380 | 206 | 174 | 24 | 1 |
{-# language DeriveFunctor, GeneralizedNewtypeDeriving #-}
module Control.Iterative.Internal (IterativeT(..), runIterativeT) where
import Control.Monad.Reader (MonadReader(..))
import Control.Monad.State.Strict (MonadState(..), get, put)
import Control.Monad.Trans.Class (MonadTrans(..), lift)
import Control.Monad.Tran... | ocramz/sparse-linear-algebra | src/Control/Iterative/Internal.hs | gpl-3.0 | 2,418 | 0 | 11 | 564 | 558 | 322 | 236 | 32 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module InnerEar.Exercises.FrequencyEnvelope (frequencyEnvelopeExercise) where
import Reflex
import Reflex.Dom
import Data.Map
import Text.JSON
import Text.JSON.Generic
import Sound.MusicW
import InnerEar.Exercises.MultipleChoice
import InnerEar.Types.ExerciseId
import InnerEar.Typ... | luisnavarrodelangel/InnerEar | src/InnerEar/Exercises/FrequencyEnvelope.hs | gpl-3.0 | 4,808 | 0 | 16 | 719 | 1,777 | 937 | 840 | 103 | 1 |
module Main(main) where
import Test.HUnit
import RLang.Parser
import RLang.L1DataTypes
import qualified Data.ByteString.Lazy.Char8 as BS
import Data.Text
import System.IO.Unsafe
import System.Exit
readTestCaseFile :: String -> BS.ByteString
readTestCaseFile filepath = BS.pack $ unsafePerformIO $ readFile filepath
--... | czakian/Roxy | tests/TestParser.hs | gpl-3.0 | 2,934 | 0 | 12 | 473 | 734 | 386 | 348 | 47 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Instances/AddAccessConfig.hs | mpl-2.0 | 4,878 | 0 | 19 | 1,191 | 628 | 370 | 258 | 99 | 1 |
module Obj where
import System.FilePath (takeFileName)
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.List (intercalate, foldl')
import Data.Maybe (mapMaybe, fromMaybe, fromJust)
import Control.Monad.State
import Data.Char
import Types
import Util
import Debug.Trace
-- | Will the lookup... | eriksvedang/Carp | src/Obj.hs | mpl-2.0 | 32,278 | 0 | 19 | 9,634 | 10,130 | 5,186 | 4,944 | 584 | 42 |
import Data.List
data Tree a = Empty | Nd a (Tree a) (Tree a) deriving (Show)
fromList :: Ord a => [a] -> Tree a
fromList [] = Empty
fromList (x:xs) = Nd x lhs rhs
where
lhs = fromList $ filter (< x) xs
rhs = fromList $ filter (> x) xs
f :: IO String
f = do
print "daewon"
return "daewon"
with :: Strin... | daewon/til | haskell/haskell_the_hard/aa/test.hs | mpl-2.0 | 486 | 0 | 9 | 132 | 238 | 120 | 118 | 19 | 1 |
module CostasLikeArrays.A320575Spec (main, spec) where
import Test.Hspec
import CostasLikeArrays.A320575 (a320575)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A320575" $
it "correctly computes the first 6 elements" $
map a320575 [1..6] `shouldBe` expectedValue where
expectedValue = [1,2,... | peterokagey/haskellOEIS | test/CostasLikeArrays/A320575Spec.hs | apache-2.0 | 330 | 0 | 8 | 57 | 112 | 64 | 48 | 10 | 1 |
import QDSL01
import Language.Haskell.TH.Lib
import Language.Haskell.TH
main = do
let pow1 = $$(power 4)
print $ pow1 3
print $ (3*3*3*3 :: Float)
expr <- runQ $ power 4
putStrLn.pprint.unType $ expr
return ()
| egaburov/funstuff | Haskell/thsk/qdsl01.hs | apache-2.0 | 227 | 0 | 12 | 51 | 106 | 52 | 54 | -1 | -1 |
module JDBC.Types.Blob
( freeBlob,
getBinaryStreamBlob,
getBinaryStreamBlob2,
getBytesBlob,
lengthBlob,
positionBlob,
positionBlob2,
setBinaryStreamBlob,
setBytesBlob,
setBytesBlob2,
truncateBlob)
where
import Java
import Interop.Java.IO
import JDBC.Types
foreign import java unsafe "@in... | Jyothsnasrinivas/eta-jdbc | src/JDBC/Types/Blob.hs | apache-2.0 | 2,011 | 47 | 8 | 394 | 527 | 279 | 248 | -1 | -1 |
-- |Set labels for control flow analysis.
module CFA.Labels (Label (..)
, buildLabels, buildLabels', isBuiltinLabel,
labelSource, labelPos, labelName,primeLabel, labelSources
, unsafeLabelIx,deconstructLabel,propLabel) where
import Data.Generics
import Text.ParserCombinators.Parsec.Pos (SourcePos,sourceLine,sour... | brownplt/ovid | src/CFA/Labels.hs | bsd-2-clause | 3,038 | 0 | 10 | 491 | 940 | 493 | 447 | 56 | 2 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Hoodle.Render.BBox
-- Copyright : (c) 2011, 2012 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <[email protected]>
-- Stability : experimental
-- Po... | wavewave/hoodle-render | src/trash/Old/BBoxOld.hs | bsd-2-clause | 6,129 | 30 | 22 | 1,662 | 1,830 | 946 | 884 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Trustworthy #-}
-- | This module was written based on
-- <http://hackage.haskell.org/package/reinterpret-cast-0.1.0/docs/src/Data-ReinterpretCast-Internal-ImplArray.html>.
--
-- Implements casting via a 1-elemnt STUArray, as described in
-- <http://stackoverflo... | LTI2000/hinterface | src/Util/FloatCast.hs | bsd-3-clause | 1,430 | 0 | 8 | 305 | 293 | 166 | 127 | 26 | 1 |
import qualified Wigner.Transformations as T
import qualified Wigner.Symbols as S
import qualified Wigner.DefineExpression as D
import qualified Wigner.OperatorAlgebra as O
import Wigner.Texable
import Wigner.Expression
import qualified Data.Map as M
import qualified Data.List as L
index :: Integer -> Index
index i =... | fjarri/wigner | examples/me_psi.hs | bsd-3-clause | 1,325 | 8 | 13 | 270 | 549 | 272 | 277 | 26 | 1 |
module Tools where
import qualified Tct.Core.Data as TcT
import qualified Tct.Core.Main as TcT
import qualified Tools.HoCA as HoCA
import qualified Tools.TRS as TRS
data Tool a = Tool { tctConfig :: TcT.TctConfig a
, toolName :: String
, defaultInput :: FilePath }
data Some... | mzini/tct-homepage | src/Tools.hs | bsd-3-clause | 610 | 0 | 10 | 150 | 169 | 107 | 62 | -1 | -1 |
module FileData.Data2 where
dataVersion :: Int
dataVersion = 2
type Version = Int
type Levels = [Level]
data Data = Data Version Levels deriving (Show, Read)
type Id = Int
type Ids = [Id]
type Entities = [Entity]
type Layers = [Layer]
type Gravity = Double
data Level = Level Entities Layers derivi... | dan-t/layers | src/FileData/Data2.hs | bsd-3-clause | 994 | 0 | 6 | 268 | 282 | 170 | 112 | 27 | 1 |
import Book
main :: IO ()
main = interact $ fromBooklist . read
| YoshikuniJujo/funpaala | samples/25_nml/encodeBooks.hs | bsd-3-clause | 65 | 0 | 6 | 14 | 27 | 14 | 13 | 3 | 1 |
module CommonMUnitTests (commonMUnitTests) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import qualified Data.EnumMap.Strict as EM
import Test.Tasty
import Test.Tasty.HUnit
import Game.LambdaHack.Client.CommonM
import Game.LambdaHack.Common.Area
import ... | LambdaHack/LambdaHack | test/CommonMUnitTests.hs | bsd-3-clause | 1,665 | 0 | 13 | 375 | 428 | 254 | 174 | 44 | 1 |
{-# LANGUAGE Rank2Types, FlexibleContexts #-}
module Numeric.AD.Lagrangian.Internal where
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Storable as S
import qualified Data.Packed.Vector as V
import qualified Data.Packed.Matrix as M
import GHC.IO (unsafePerformIO)
import Numeric.AD
import Nu... | jfischoff/lagrangian | src/Numeric/AD/Lagrangian/Internal.hs | bsd-3-clause | 5,088 | 0 | 15 | 1,474 | 1,040 | 596 | 444 | 70 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module DataFlow.JSONGraphFormat.RendererSpec where
import Control.Monad (when)
import Data.Aeson ((.=), object, toJSON, ToJSON, encode)
import qualified Data.Aeson as A
import Data.Vector (fromList)
import qualified Data.Map as M
import Test.Hspec (Spec, describe, it, expectationFa... | sonyxperiadev/dataflow | test/DataFlow/JSONGraphFormat/RendererSpec.hs | bsd-3-clause | 4,457 | 0 | 26 | 1,946 | 1,254 | 648 | 606 | 98 | 1 |
--------------------------------------------------------------------------------
-- Copyright © 2011 National Institute of Aerospace / Galois, Inc.
--------------------------------------------------------------------------------
-- | An tagless interpreter for Copilot specifications.
{-# LANGUAGE Trustworthy #-} -- B... | leepike/copilot-core | src/Copilot/Core/Interpret/Render.hs | bsd-3-clause | 2,747 | 0 | 12 | 537 | 760 | 424 | 336 | 65 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.