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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module TRS.Position where
-- $Id$
import TRS.Term
import Control.Monad ( guard )
import Maybe ( fromMaybe )
type Position = [ Int ]
positions :: Term a -> [ Position ]
positions ( Node x cs ) = [] : do
(p, c) <- zip [ 0 .. ] cs
ps <- positions c
return $ p : ps
mpeek :: Term a -> Position -> Maybe (... | florianpilz/autotool | src/TRS/Position.hs | gpl-2.0 | 750 | 0 | 12 | 229 | 396 | 202 | 194 | 23 | 1 |
{-# LANGUAGE RankNTypes #-}
-- This program must be called with GHC's libdir as the single command line
-- argument.
module Main where
-- import Data.Generics
import Data.Data
import Data.List
import System.IO
import GHC
import BasicTypes
import DynFlags
import MonadUtils
import Outputable
import ApiAnnotation
import... | fmthoma/ghc | testsuite/tests/ghc-api/annotations/t10357.hs | bsd-3-clause | 3,635 | 1 | 20 | 1,145 | 1,026 | 550 | 476 | 72 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnExpr]{Renaming of expressions}
Basically dependency analysis.
Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In
general, all of these functions return a renamed thing, and a set of
free variables.
-}
{-# LANGUAGE CPP, ScopedTyp... | DavidAlphaFox/ghc | compiler/rename/RnExpr.hs | bsd-3-clause | 56,016 | 103 | 22 | 16,506 | 14,408 | 7,641 | 6,767 | 842 | 11 |
{-
(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 CoreLint (
lintCoreBindings, lintUnfolding,
lintPassResult, lintInteractiveExpr, lintExpr,
lintAn... | forked-upstream-packages-for-ghcjs/ghc | compiler/coreSyn/CoreLint.hs | bsd-3-clause | 67,840 | 44 | 25 | 19,603 | 16,119 | 8,177 | 7,942 | 1,065 | 12 |
-- TODO: [wrengr 2015.10.23] (a) remove this file entirely, or (b) move it somewhere more helpful.
{-|
Functions on lists and sequences.
Some of the functions follow the style of Data.Random.Extras
(from the random-extras package), but are written for use with
PRNGs from the "mwc-random" package rather than f... | zaxtax/hakaru | haskell/Language/Hakaru/Util/Extras.hs | bsd-3-clause | 3,337 | 1 | 17 | 926 | 1,258 | 655 | 603 | 60 | 3 |
import StackTest
main :: IO ()
main = do
stack ["test"]
stack ["build", "foo:test:foo"]
| juhp/stack | test/integration/tests/4044-no-run-tests-config/Main.hs | bsd-3-clause | 93 | 0 | 8 | 19 | 40 | 20 | 20 | 5 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.Script
-- Copyright : (c) Trevor Elliott <trevor@galois.com>
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Trevor Elliott <trevor@galois.com>
-- Stability : unstable
-- Portability : unpo... | adinapoli/xmonad-contrib | XMonad/Hooks/Script.hs | bsd-3-clause | 1,404 | 0 | 10 | 265 | 114 | 76 | 38 | 8 | 1 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeSynonymInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Maximize
-- Copyright : (c) 2007 James Webb
-- License : BSD3-style (see LICEN... | markus1189/xmonad-contrib-710 | XMonad/Layout/Maximize.hs | bsd-3-clause | 3,083 | 0 | 14 | 734 | 580 | 328 | 252 | 36 | 1 |
import StackTest
import System.Directory
main :: IO ()
main = do
createDirectoryIfMissing True "foo/src"
readFile "foo/v1/Foo.hs" >>= writeFile "foo/src/Foo.hs"
stack ["bench"]
readFile "foo/v2/Foo.hs" >>= writeFile "foo/src/Foo.hs"
stack ["bench"]
| juhp/stack | test/integration/tests/2781-shadow-bug/Main.hs | bsd-3-clause | 260 | 0 | 8 | 39 | 76 | 34 | 42 | 9 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Matching guarded right-hand-sides (GRHSs)
-}
{-# LANGUAGE CPP #-}
module DsGRHSs ( dsGuarded, dsGRHSs, dsGRHS ) where
#include "HsVersions.h"
import {-# SOURCE #-} DsExpr ( dsLExpr, dsLocalBinds )
import {-# SOURCE #-... | urbanslug/ghc | compiler/deSugar/DsGRHSs.hs | bsd-3-clause | 5,921 | 0 | 15 | 1,647 | 1,153 | 580 | 573 | -1 | -1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE NoImplicitPrelude #-}
module ImpSafe02 ( MyWord ) where
-- While Data.Word is safe it imports trustworthy
-- modules in base, hence base needs to be trusted.
-- Note: Worthwhile giving out better error messages for cases
-- like this if I can.
import Data.Word
type MyWord = Word
| urbanslug/ghc | testsuite/tests/safeHaskell/check/pkg01/ImpSafe02.hs | bsd-3-clause | 318 | 0 | 4 | 57 | 26 | 19 | 7 | 5 | 0 |
module T5745 where
import T5745a
f :: T
f = f
| urbanslug/ghc | testsuite/tests/rename/should_fail/T5745.hs | bsd-3-clause | 48 | 0 | 4 | 13 | 17 | 11 | 6 | 4 | 1 |
{-# LANGUAGE MagicHash #-}
module Main (main) where
import GHC.Base
import GHC.Integer
main :: IO ()
main = case i of
I# i# ->
print (gcd (smallInteger i#) (smallInteger i#))
{-# NOINLINE i #-}
i :: Int
i = minBound
| wxwxwwxxx/ghc | testsuite/tests/lib/integer/gcdInteger.hs | bsd-3-clause | 240 | 0 | 12 | 64 | 82 | 45 | 37 | 11 | 1 |
module LanguageModel where
import Data.Array.IArray
import Data.Char
import Data.Function
import Data.List
import Control.Monad
-- trigram frequencies taken from http://www.data-compression.com/english.html
-- table format: abcdefghijklmnopqstuvwxyzS
score ngrams s = sum $ map (scoreTrigram ngrams) $ trigrams s
sco... | tom-szczarkowski/matasano-crypto-puzzles-solutions | set3/LanguageModel.hs | mit | 1,674 | 0 | 17 | 528 | 773 | 392 | 381 | 35 | 2 |
module Trie (Trie(Node), trieFrom) where
import Data.Function (on)
import Utils (equivalentClasses)
data Trie a = Node [a] [Trie a] deriving (Eq, Show)
trieFrom :: (a->a->Bool)->[[a]]->Trie a
trieFrom eq strings = Node [] (trieFrom' eq strings)
trieFrom' :: (a->a->Bool)->[[a]]->[Trie a]
trieFrom'... | chaoxu/haskell-algorithm | Trie.hs | mit | 512 | 0 | 11 | 110 | 247 | 133 | 114 | 13 | 1 |
module Main where
fibNextPair :: (Integer, Integer) -> (Integer, Integer)
fibNextPair (x, y) = (y, x + y)
fibNthPair :: Integer -> (Integer, Integer)
fibNthPair 0 = (0, 1)
fibNthPair 1 = (1, 1)
fibNthPair n = fibNextPair(fibNthPair(n - 1))
fib :: Integer -> Integer
fib = fst ... | skywind3000/language | haskell/fib3.hs | mit | 365 | 0 | 9 | 110 | 148 | 84 | 64 | 10 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.ByteString.Lazy as L
import Data.ByteString.Lazy.Char8 (pack, unpack, index, group, isPrefixOf, tails)
import qualified Data.ByteString.Lazy.Char8 as C8
import Data.ByteString.Lazy.Builder (lazyByteStringHex, to... | CarstenKoenig/AdventOfCode2016 | Day14/Main.hs | mit | 3,610 | 0 | 18 | 641 | 1,330 | 754 | 576 | 79 | 2 |
module Error where
import CommonTypes
import Control.Monad.Error
data CompilerError alphabet
= IllegalCharacter Position [alphabet] -- string containing illegal character & current token match prefix
| UnexpectedEndOfFile [alphabet] -- string read while encountering premature EOF
| InvalidDiscardableProdu... | mrwonko/wonkococo | wcc/Error.hs | mit | 1,815 | 0 | 11 | 292 | 359 | 189 | 170 | 27 | 1 |
{-# OPTIONS_GHC -W #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative
import Control.Monad.Error
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import qualified Data.Has... | spanners/dissertation | dissertation/code/elm-lang.org/server/Server.hs | mit | 10,649 | 0 | 19 | 3,724 | 2,300 | 1,166 | 1,134 | 225 | 3 |
--------------------------------------------------------------------
-- |
-- Module : Parser
-- Copyright : (c) Stephen Diehl 2013
-- License : MIT
-- Maintainer: stephen.m.diehl@gmail.com
-- Stability : experimental
-- Portability: non-portable
--
-------------------------------------------------------------... | TorosFanny/kaleidoscope | src/chapter7/Parser.hs | mit | 3,315 | 0 | 12 | 780 | 1,158 | 554 | 604 | 129 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeFamilies #-}
module Demos (Demo(..), selectDemo, demoTournament, demoArrow) where
import Data.List.Split (chunksOf)
import Diagrams.Backend.Rasterific.CmdLine
import Diagrams.Prelude
data Demo
= Arrow' Int
| Trails Int... | mihaimaruseac/petulant-octo-avenger | src-draw/Demos.hs | mit | 13,143 | 0 | 23 | 3,396 | 4,242 | 2,211 | 2,031 | -1 | -1 |
{-# LANGUAGE CPP #-}
module System.Signal where
import Foreign.C.Types
#ifdef mingw32_HOST_OS
import Control.Exception.Base (assert)
import Foreign
#else
import Control.Monad (void)
import qualified System.Posix.Signals as Posix
#endif
type Signal = CInt
-- | SIGABRT - Abnormal termination
sigABRT... | pmlodawski/signal | src/System/Signal.hs | mit | 1,204 | 0 | 10 | 225 | 239 | 136 | 103 | 21 | 1 |
import Text.Show.Functions
data Cliente = Cliente {
nombre :: Nombre,
resistencia :: Resistencia,
amigos :: [Cliente],
bebidas :: [Bebida]
} deriving (Show)
type Nombre = String
type Resistencia = Double
type Bebida = Cliente -> Cliente
rodri = Cliente "Rodrigo" 150 [] []
marcos = Cliente "Marcos" 40 [rodri... | sanuzzi/NightClub | clientes.hs | mit | 1,291 | 0 | 10 | 238 | 399 | 210 | 189 | 40 | 1 |
import qualified Graphics.UI.GLFW as GLFW
import Graphics.GL
import Graphics.Oculus
import Data.Bits
import Control.Monad
import Linear
--import Data.Time
import SetupGLFW
import ShaderLoader
import Cube
--------------------------------------
-- A test of the simple "Scaffold" API
-----------------------------------... | lukexi/oculus-mini | test/TestScaffold.hs | mit | 1,991 | 1 | 11 | 535 | 446 | 228 | 218 | 42 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module IgrepCashbook
( Entry(..)
, buildSummary
, summaryToConsoleOutput
, parseLines
, entryLine
, toEntryLine
) where
import Control.Applicative (ma... | igrep/igrep-cashbook | hs2/src/IgrepCashbook.hs | mit | 8,042 | 1 | 28 | 2,459 | 2,156 | 1,134 | 1,022 | 202 | 3 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Buffer.Region
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- This module defines buffer operation on regions
module Yi.Buffer.Region
(
module... | atsukotakahashi/wi | src/library/Yi/Buffer/Region.hs | gpl-2.0 | 3,890 | 0 | 14 | 976 | 986 | 510 | 476 | 77 | 3 |
{- |
Module : ./RelationalScheme/ParseRS.hs
Description : abstract syntax for Relational Schemes
Copyright : Dominik Luecke, Uni Bremen 2008
License : GPLv2 or higher, see LICENSE.txt or LIZENZ.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : portable
Parser ... | gnn/Hets | RelationalScheme/ParseRS.hs | gpl-2.0 | 6,491 | 0 | 22 | 2,360 | 1,724 | 820 | 904 | 226 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- |
-- Copyright ... | ekr/tamarin-prover | lib/theory/src/Theory/Constraint/System/Guarded.hs | gpl-3.0 | 32,397 | 0 | 25 | 9,110 | 8,774 | 4,516 | 4,258 | 485 | 24 |
-- -*-haskell-*-
-- Vision (for the Voice): an XMMS2 client.
--
-- Author: Oleg Belozeorov
-- Created: 21 Jun. 2010
--
-- Copyright (C) 2010 Oleg Belozeorov
--
-- 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 F... | upwawet/vision | src/Config.hs | gpl-3.0 | 3,474 | 0 | 16 | 896 | 802 | 398 | 404 | -1 | -1 |
module Exercises where
import Data.Char
import Data.List
import Lab2.Util.Ibans
import Lab2.Util.Infix
import Lab2.Util.Primes
import Lab2.Util.Random
import Test.QuickCheck
-- Define Main --
main = do
putStrLn $ "===================="
putStrLn $ "Assignment 2 / Lab 2"
putStrLn $ "===================="
... | vdweegen/UvA-Software_Testing | Lab2/Bauke/Exercises.hs | gpl-3.0 | 13,505 | 0 | 11 | 3,129 | 3,809 | 2,004 | 1,805 | 213 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Css.GraphCss where
import Clay
import Prelude hiding ((**))
import Data.Monoid
import Css.Constants
{- graphStyles
- Generates all CSS for the graph page. -}
graphStyles :: Css
graphStyles = do
graphContainer
sidebarCSS
nodeCSS
pathCSS
resetCSS
title... | cchens/courseography | hs/Css/GraphCss.hs | gpl-3.0 | 9,239 | 0 | 22 | 3,837 | 2,407 | 1,003 | 1,404 | 321 | 1 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE... | olorin/amazonka | core/src/Network/AWS/Data/Body.hs | mpl-2.0 | 7,729 | 0 | 16 | 1,957 | 1,644 | 887 | 757 | 160 | 3 |
module Main where
import System.Console.Haskeline
import System.IO
import Mal
main :: IO ()
main = runInputT defaultSettings loop
where
loop = do
minput <- getInputLine "user> "
case minput of
Nothing -> return ()
Just input -> do
outputStrLn $ rep input
loop
| joncol/mal | haskell/step0/app/Main.hs | mpl-2.0 | 320 | 0 | 15 | 103 | 95 | 47 | 48 | 13 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.ReplicaPool
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla ... | brendanhay/gogol | gogol-replicapool/gen/Network/Google/ReplicaPool.hs | mpl-2.0 | 6,203 | 0 | 13 | 1,482 | 731 | 524 | 207 | 179 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/Testers/Update.hs | mpl-2.0 | 4,079 | 0 | 17 | 960 | 538 | 318 | 220 | 86 | 1 |
module HLint.HLint where
import "hint" HLint.Default
import "hint" HLint.Builtin.All
ignore "Use camelCase"
ignore "Use fewer imports"
| DougBurke/swish | HLint.hs | lgpl-2.1 | 139 | 0 | 5 | 20 | 31 | 17 | 14 | -1 | -1 |
-- TODO: remove `killall xmobar` once xmobar will use stdin reader.
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import XMonad.Actions.Submap
import XMonad.Config
import qualified Data.Map as M
import XMonad.Util.SpawnOnce
import XMonad.Util.EZConfig
-... | defanor/dotfiles | .xmonad/xmonad.hs | unlicense | 5,815 | 0 | 14 | 1,053 | 351 | 204 | 147 | 28 | 1 |
module Tables.A007318Spec (main, spec) where
import Test.Hspec
import Tables.A007318 (a007318)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A007318" $
it "correctly computes the first 20 elements" $
take 20 (map a007318 [0..]) `shouldBe` expectedValue where
expectedValue = [1,1,1,1,2,1,1,... | peterokagey/haskellOEIS | test/Tables/A007318Spec.hs | apache-2.0 | 349 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
module StoneTransfer.A292726Spec (main, spec) where
import Test.Hspec
import StoneTransfer.A292726 (a292726)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A292726" $
it "correctly computes the first 10 elements" $
take 10 (map a292726 [1..]) `shouldBe` expectedValue where
expectedValue = [... | peterokagey/haskellOEIS | test/StoneTransfer/A292726Spec.hs | apache-2.0 | 345 | 0 | 10 | 59 | 130 | 75 | 55 | 10 | 1 |
module PowerDivisibility.A048798Spec (main, spec) where
import Test.Hspec
import PowerDivisibility.A048798 (a048798)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A048798" $
it "correctly computes the first 20 elements" $
take 20 (map a048798 [1..]) `shouldBe` expectedValue where
expectedV... | peterokagey/haskellOEIS | test/PowerDivisibility/A048798Spec.hs | apache-2.0 | 389 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
{- Copyright 2014 Romain Edelmann
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | redelmann/haskell-distribution | Data/Distribution/Aggregator.hs | apache-2.0 | 3,747 | 0 | 12 | 806 | 561 | 322 | 239 | 41 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QFont.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 mod... | keera-studios/hsQt | Qtc/Enums/Gui/QFont.hs | bsd-2-clause | 11,201 | 0 | 18 | 2,513 | 3,147 | 1,583 | 1,564 | 312 | 1 |
module Network.Minecraft.Internal.Field (
FieldValue(..),
buildField,
getField
) where
import Control.Applicative
import Control.Monad
import Data.Serialize (encode)
import Data.Serialize.Builder
import Data.Serialize.Get
import Data.Serialize.Put (execPut)
import Data.Serialize.IEEE754
import Data.Bits
import Data... | ziocroc/Minetlib | Network/Minecraft/Internal/Field.hs | bsd-2-clause | 6,878 | 110 | 20 | 1,527 | 2,564 | 1,317 | 1,247 | 169 | 12 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE NoImplicitPrelude #-}
module System.HAProxy.ParsersSpec (spec) where
import System.HAProxy.Parsers
import System.HAProxy.Types
import SpecHelper
import Data.Attoparsec.Text
spec :: Spec
spec = do
describe "Deserializeable ShowInfoResp" $... | MichaelXavier/haproxy-haskell | test/System/HAProxy/ParsersSpec.hs | bsd-2-clause | 1,355 | 2 | 15 | 582 | 178 | 94 | 84 | 34 | 1 |
{-|
Copyright : (C) 2013-2016, University of Twente
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <christiaan.baaij@gmail.com>
-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
mo... | ggreif/clash-compiler | clash-ghc/src-ghc/CLaSH/GHC/LoadInterfaceFiles.hs | bsd-2-clause | 6,144 | 0 | 24 | 1,933 | 1,553 | 804 | 749 | 138 | 8 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- | Main entry point to floskell.
module Main ( main ) where
import Control.Applicative ( many, optional )
import Control.Exception ( catch, throw )
import qualified Data.Aeson.Encode.Pretty as J... | ennocramer/floskell | src/main/Main.hs | bsd-3-clause | 7,187 | 0 | 22 | 2,587 | 1,671 | 876 | 795 | 132 | 6 |
{-# LANGUAGE NamedFieldPuns #-}
-- | cabal-install CLI command: repl
--
module Distribution.Client.CmdRepl (
-- * The @repl@ CLI and action
replCommand,
replAction,
-- * Internals exposed for testing
TargetProblem(..),
selectPackageTargets,
selectComponentTarget
) where
import Distribut... | mydaum/cabal | cabal-install/Distribution/Client/CmdRepl.hs | bsd-3-clause | 11,995 | 0 | 29 | 2,835 | 1,686 | 898 | 788 | 178 | 3 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
-- | Interpreting a CFG derivation with quantifiers
-- as a string in Japanese.
-- That is, we generate a yield of a CFG derivation,
-- this time in Japanese.
--
module Lambda.QCFGJ where
import Lambda.QCFG ... | suhailshergill/liboleg | Lambda/QCFGJ.hs | bsd-3-clause | 1,558 | 0 | 13 | 391 | 398 | 216 | 182 | 22 | 1 |
module Control.Access.RoleBased.Internal.RoleMap where
------------------------------------------------------------------------------
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as M
import Data.HashSet (HashSet)
import qualified Data.HashSet as S
import Data... | sopvop/access-rolebased | src/Control/Access/RoleBased/Internal/RoleMap.hs | bsd-3-clause | 2,128 | 0 | 15 | 426 | 512 | 279 | 233 | 33 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE Undecida... | duairc/symbols | types/src/Type/List.hs | bsd-3-clause | 5,331 | 0 | 9 | 896 | 704 | 441 | 263 | -1 | -1 |
{-# LANGUAGE RebindableSyntax #-}
-- Copyright : (C) 2009 Corey O'Connor
-- License : BSD-style (see the file LICENSE)
import Bind.Marshal.Prelude
import Bind.Marshal.Verify
import Bind.Marshal.TypePrelude
main = run_test $ do
returnM () :: Test ()
| coreyoconnor/bind-marshal | test/verify_type_prelude.hs | bsd-3-clause | 265 | 0 | 9 | 51 | 47 | 27 | 20 | 6 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.RoleAnnots.Check
-- Copyright : (C) 2014 Richard Eisenberg
-- License : BSD-style (see LICENSE)
-- Maintainer : Richard Eisenberg (eir@cis.upenn.edu)
-- Stability : experimental
-- Portabil... | goldfirere/no-role-annots | Language/Haskell/RoleAnnots/Check.hs | bsd-3-clause | 2,963 | 0 | 18 | 594 | 352 | 210 | 142 | 17 | 4 |
{-
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Kubernetes API version: v1.9.12
Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
-}
{-|
Module : Kubernetes.OpenAPI.API.Authent... | denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/API/AuthenticationV1beta1.hs | bsd-3-clause | 4,162 | 0 | 9 | 503 | 694 | 446 | 248 | -1 | -1 |
---------------------------------------------------------------------------------
-- |
-- Module : Math.ConjugateGradient
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : stable
--
-- (The linear equation solver library is hosted at <http://github.com/... | LeventErkok/conjugateGradient | Math/ConjugateGradient.hs | bsd-3-clause | 11,717 | 0 | 20 | 3,317 | 1,944 | 1,091 | 853 | 99 | 2 |
module Development.GCCXML.Parser.Config where
data ParserConf = ParserConf {
workingDirectory :: FilePath,
includePaths :: [FilePath],
defineSymbols :: [String],
undefineSymbols :: [String],
cFlags :: String,
compiler :: Maybe String
} deriving (Eq, Show, Read)
va... | avaitla/Haskell-to-C---Bridge | src/GCCXML/Parser/Config.hs | bsd-3-clause | 675 | 0 | 9 | 170 | 165 | 99 | 66 | 19 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell ... | time-cube/time-cube | src/Data/Time/Cube/Parser.hs | bsd-3-clause | 10,884 | 1 | 33 | 2,861 | 3,674 | 1,887 | 1,787 | -1 | -1 |
module Sklite.Util
( replace
)
where
import Control.Applicative
replace :: (Eq a) => a -> [a] -> [a] -> [a]
replace from to cs = concat $ (\c -> if c == from then to else [c]) <$> cs | GaloisInc/sk-dev-platform | user/sklite/src/Sklite/Util.hs | bsd-3-clause | 192 | 0 | 10 | 48 | 94 | 54 | 40 | 5 | 2 |
-- Copyright (c) 2015, Travis Bemann
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- o Redistributions of source code must retain the above copyright notice, this
-- list of conditio... | tabemann/amphibian | src_old/Network/IRC/Client/Amphibian/Plugin.hs | bsd-3-clause | 8,078 | 0 | 15 | 2,014 | 1,429 | 760 | 669 | 150 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Pushbullet (
sendPush
, module PBT
)where
import Control.Lens ((&), (?~))
import Data.Aeson
import qualified Data.HashMap.Strict as H
import Data.Monoid
import Network.Pushbullet.Internal
import ... | KevinCotrone/pushbullet | src/Network/Pushbullet.hs | bsd-3-clause | 1,096 | 0 | 12 | 322 | 237 | 132 | 105 | 26 | 1 |
{--
Copyright (c) 2006, Peng Li
2006, Stephan A. Zdancewic
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this l... | Tener/HaNS | src/Network/TCP/LTS/Time.hs | bsd-3-clause | 9,592 | 0 | 30 | 2,832 | 2,623 | 1,386 | 1,237 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Advent.Day9 where
import Data.Attoparsec.Combinator
import Data.Attoparsec.Text
import Data.Char
import qualified Data.List as L
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data... | micxjo/hs-advent | src/Advent/Day9.hs | bsd-3-clause | 1,585 | 0 | 12 | 374 | 630 | 332 | 298 | 45 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Network.Wai.Middleware.HmacAuth
-- Description : WAI HMAC Authentication Middleware
-- Copyright : (c) 2015 Christopher Reichert
-- License : BSD3
-- Maintainer : Christopher Reichert <creichert07@gmail.com>
-- St... | creichert/wai-middleware-hmac | Network/Wai/Middleware/HmacAuth.hs | bsd-3-clause | 11,199 | 0 | 23 | 3,630 | 1,800 | 1,006 | 794 | 187 | 9 |
;
; HSP help managerp HELP\[Xt@C
; (檪u;vÌsÍRgƵijêÜ·)
;
%type
à ½ß
%ver
3.4
%note
ver3.4W½ß
%date
2013/12/09
%author
onitama
%url
http://hsp.tv/
%port
Win
Cli
Let
%index
await
êèÌÔÅÒÂ
%group
vO§ä½ß
%prm
p1
p1=0`(0) : ... | zakki/openhsp | package/hsphelp/i_prog.hs | bsd-3-clause | 32,916 | 12,557 | 22 | 3,167 | 22,905 | 14,190 | 8,715 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Saturnin.Jobs
( JobRequest (..)
, CmdResult (..)
, JobResult (..)
, Job (..)
, RemoteJob (..)
, mkRemoteJob
, runRemoteJob
, RemoteJobRunnerState (..)
)
where
import Control.Applicative
import Control.Monad
import Control.Monad.State
import ... | yaccz/saturnin | library/Saturnin/Jobs.hs | bsd-3-clause | 5,896 | 0 | 15 | 1,683 | 1,483 | 778 | 705 | 152 | 2 |
{-# language CPP #-}
-- | = Name
--
-- VK_EXT_conservative_rasterization - device extension
--
-- == VK_EXT_conservative_rasterization
--
-- [__Name String__]
-- @VK_EXT_conservative_rasterization@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 102
--
-- [__Revisio... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_EXT_conservative_rasterization.hs | bsd-3-clause | 28,371 | 1 | 14 | 4,775 | 3,326 | 1,975 | 1,351 | -1 | -1 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE JavaScriptFFI #-}
module Reflex.Dom.Internal.Foreign ( module Reflex.Dom.Internal.Foreign
, runWebGUI
) where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Fo... | manyoo/reflex-dom | src-ghcjs/Reflex/Dom/Internal/Foreign.hs | bsd-3-clause | 1,640 | 21 | 11 | 288 | 417 | 224 | 193 | 31 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPattern... | GaloisInc/stack | src/Stack/Package.hs | bsd-3-clause | 33,224 | 0 | 24 | 10,468 | 7,926 | 4,102 | 3,824 | 713 | 10 |
module PFDS.Sec5.Ex1Spec
(
spec
) where
import Test.Hspec
import Test.QuickCheck
import Test.Hspec.QuickCheck (prop)
import PFDS.Sec5.Ex1
spec :: Spec
spec =
describe "check" $
prop "if q has >=2 elems, f & r shouldn't be empty" prop_check
prop_check :: ([Int], [Int]) -> Bool
prop_c... | matonix/pfds | test/PFDS/Sec5/Ex1Spec.hs | bsd-3-clause | 456 | 0 | 9 | 131 | 158 | 86 | 72 | 17 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TupleSections #-}
-- | Defunctionalization of typed, monomorphic Futhark programs without modules.
module Futhark.Internalise.Defunctionalise (transformProg) where
import qualified Control.Arr... | HIPERFIT/futhark | src/Futhark/Internalise/Defunctionalise.hs | isc | 49,226 | 0 | 29 | 12,893 | 15,940 | 7,945 | 7,995 | 1,024 | 25 |
import Graphics.UI.SDL
import Control.Monad
import Control.Applicative
import System.Random
import Control.Monad.Identity
import Control.Arrow hiding (loop)
windowW, windowH :: Double
windowW = 800
windowH = 600
main :: IO ()
main = withInit [InitEverything] $ do
screen <- setVideoMode (floor windowW) (floor wind... | skeskinen/pong | Main.hs | mit | 3,886 | 0 | 16 | 965 | 1,806 | 939 | 867 | 93 | 12 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.Pos.Crypto.Bi
( constantByteString
, exampleProtocolMagic
, getBytes
, tests
) where
import Universum
import Cardano.Crypto.Wallet (XPrv, unXPrv, xprv, xpub)
import Crypto.Hash (Bl... | input-output-hk/pos-haskell-prototype | crypto/test/Test/Pos/Crypto/Bi.hs | mit | 15,156 | 0 | 14 | 2,227 | 2,428 | 1,341 | 1,087 | -1 | -1 |
main = f 1
f :: Eq a => Int -> [a]
f _ = []
| roberth/uu-helium | test/correct/OverloadedMain.hs | gpl-3.0 | 46 | 0 | 7 | 18 | 38 | 19 | 19 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/GetDataSource.hs | mpl-2.0 | 11,371 | 0 | 41 | 2,423 | 1,721 | 1,011 | 710 | 168 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Data.Map (fromList, findWithDefault, Map, insert)
import Control.Concurrent.STM
import Control.Concurrent (forkIO)
import Network (listenOn, withSocketsDo, accept, PortID(..), Socket)
import Prelude hiding (lookup, take)
import Data.ByteString.Char8 (ByteString, pack)
import S... | ajmccluskey/redish | src/Main.hs | bsd-3-clause | 3,457 | 0 | 12 | 890 | 1,253 | 635 | 618 | 93 | 3 |
{-#LANGUAGE OverloadedStrings#-}
{-translation from Julia code, for several purposes
1) what we can do better
2) what is Julia code good at
3) what is Haskell code good at
4) revise and documentate the codes
5) better error handling, complete program
6) similarity Julia learnt from Haskell
-- copy from IonTorren... | Min-/fourseq | src/lib/DataTypes.hs | bsd-3-clause | 1,746 | 38 | 9 | 413 | 521 | 305 | 216 | 52 | 0 |
module Syntax.FuncSpec (funcSpec) where
import Syntax.Tree
import Syntax.Env as Env
import Syntax.Parser
import Syntax.Common
import Test.Hspec
import Test.Hspec.Megaparsec
import TestHelper.Parser
funcSpec :: Spec
funcSpec = do
funcDeclSpec
funcCallSpec
funcDeclSpec :: Spec
funcDeclSpec = do
describe "f... | BakerSmithA/Turing | test/Syntax/FuncSpec.hs | bsd-3-clause | 9,174 | 0 | 23 | 2,844 | 2,476 | 1,255 | 1,221 | 139 | 1 |
{-# LANGUAGE
RecordWildCards
#-}
module Distribution.Server.Features.Distro.Distributions
( DistroName(..)
, Distributions(..)
, emptyDistributions
, addDistro
, removeDistro
, updatePackageList
, enumerate
, isDistribution
, DistroVersions(..)
, emptyDistroVersions
, ... | edsko/hackage-server | Distribution/Server/Features/Distro/Distributions.hs | bsd-3-clause | 5,389 | 0 | 16 | 1,214 | 1,186 | 641 | 545 | 98 | 3 |
module Data.IORefEx where
import Data.IORef
import Control.Monad.Reader
import Control.Monad.Trans
askG :: (MonadReader r m) => (r -> a) -> m a
askG f = liftM f ask
readRef :: (MonadReader r m, MonadIO m) => (r -> IORef a) -> m a
readRef f = askG f >>= liftIO . readIORef
writeRef :: (MonadReader r m, Mo... | ierton/vsim | src/Data/IORefEx.hs | bsd-3-clause | 543 | 0 | 9 | 134 | 272 | 140 | 132 | 12 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Allergies
( Allergen ( Cats
, Chocolate
, Eggs
, Peanuts
, Pollen
, Shellfis... | enolive/exercism | haskell/allergies/test/Tests.hs | mit | 3,322 | 0 | 15 | 1,775 | 580 | 312 | 268 | 72 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module Run where
import Control.Exception
import Control.Monad
import System.Environment
import System.FileLock
import System.FilePath
import System.Process
import Data.Version (showV... | sol/tinc | src/Run.hs | mit | 2,014 | 0 | 18 | 511 | 596 | 292 | 304 | 56 | 7 |
{- |
Module : $Header$
Description : definition of 3-dimensional vector operations, transformations
between rotation matrices and rotation quaternions
Copyright : (c) Robert Savu and Uni Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Robert.Savu@dfki.de
Stability ... | keithodulaigh/Hets | FreeCAD/VecTools.hs | gpl-2.0 | 3,266 | 2 | 15 | 1,265 | 1,536 | 747 | 789 | 68 | 1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
module Cryptol.TypeCheck.PP
( NameMap, WithNames... | iblumenfeld/cryptol | src/Cryptol/TypeCheck/PP.hs | bsd-3-clause | 1,780 | 0 | 10 | 388 | 445 | 248 | 197 | 34 | 1 |
{-# LANGUAGE BangPatterns, CPP, RankNTypes, MagicHash, UnboxedTuples, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, DeriveDataTypeable, UnliftedFFITypes #-}
#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE RoleAnnotations #-}
#endif
{-# OPTIONS_HADDOCK hide #-}
------------------------------------------------... | beni55/haste-compiler | libraries/ghc-7.10/array/Data/Array/Base.hs | bsd-3-clause | 65,172 | 0 | 27 | 15,780 | 16,697 | 8,790 | 7,907 | -1 | -1 |
module Test () where
{-@ posPlus :: x:{v: Int | v >= 0} -> {v: Int | v >= x} @-}
posPlus :: Int -> Int
posPlus x = if (x > 0)
then 2 + (posPlus (x - 1))
else 0
goo = posPlus (-3)
{-@ poo :: x:Int -> {v: Int | v >= x } @-}
poo x = if x > 0 then posPlus x else x
| abakst/liquidhaskell | tests/neg/partial.hs | bsd-3-clause | 294 | 0 | 10 | 104 | 94 | 53 | 41 | 7 | 2 |
module NoCaseExpand where
-- time 3.6s w/ "--no-case-expand" flag VS 8.5 s w/o
{- LIQUID "--no-case-expand" @-}
data TokenType =
Space | Keyword | Keyglyph | Layout | Comment | Conid | Varid |
Conop | Varop | String | Char | Number | Cpp | Error |
Definition
context :: [(TokenType, String)] -> [(T... | abakst/liquidhaskell | tests/pos/NoCaseExpand.hs | bsd-3-clause | 523 | 0 | 9 | 99 | 184 | 111 | 73 | 11 | 1 |
{-|
Module : IRTS.DumpBC
Description : Serialise Idris to its IBC format.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
module IRTS.DumpBC where
import Idris.Core.TT
import IRTS.Bytecode
import IRTS.Lang
import IRTS.Simplified
import Data.List
interMap :: [a] -> [b] -> (a -> [b]) -> [b]... | ben-schulz/Idris-dev | src/IRTS/DumpBC.hs | bsd-3-clause | 3,232 | 0 | 17 | 934 | 1,278 | 628 | 650 | 67 | 22 |
module Main where
import Graphics.UI.WX
main :: IO ()
main = start gui
gui :: IO ()
gui = do f <- frame [text := "Hello World!"]
staticText f [text := "How you doing?"]
return ()
| gimbo/cabal-macosx | examples/wxHello/src/Main.hs | bsd-3-clause | 200 | 0 | 10 | 57 | 83 | 42 | 41 | 8 | 1 |
import Text.Pandoc.JSON
import Text.Pandoc.Walk
import Data.Char (toUpper)
main :: IO ()
main = toJSONFilter capitalizeHeaders
capitalizeHeaders :: Block -> Block
capitalizeHeaders (Header 1 attr xs) = Header 1 attr $ walk capitalize xs
capitalizeHeaders x = x
capitalize :: Inline -> Inline
capitalize (Str xs) = Str... | ddssff/pandoc | man/capitalizeHeaders.hs | gpl-2.0 | 506 | 0 | 7 | 80 | 131 | 68 | 63 | 11 | 1 |
module T9762B (b) where
import T9762A (a)
b :: Int
b = a+1
| urbanslug/ghc | testsuite/tests/ghci/scripts/T9762B.hs | bsd-3-clause | 59 | 0 | 5 | 13 | 31 | 19 | 12 | 4 | 1 |
-- | Put common type definitions here to break recursive module dependencies.
module RegAlloc.Linear.Base (
BlockAssignment,
Loc(..),
regsOfLoc,
-- for stats
SpillReason(..),
RegAllocStats(..),
-- the allocator monad
RA_State(..),
)
where
import Reg... | siddhanathan/ghc | compiler/nativeGen/RegAlloc/Linear/Base.hs | bsd-3-clause | 3,760 | 0 | 10 | 1,158 | 389 | 243 | 146 | 64 | 1 |
-- !!! exporting tycon (but not dcon with same name.)
module M where
import Mod147_A
x = D 4
| hferreiro/replay | testsuite/tests/module/mod147.hs | bsd-3-clause | 95 | 0 | 5 | 21 | 16 | 10 | 6 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- |
-- Module : Network.Wamp.State
-- Description : Client state
-- Copyright : (c) Maciej Kazulak, 2015
-- License : MIT
-- Maintainer : kazulakm@gmail.com
-- Stability : experimental
-- Portability : portable
--
module Network.Wam... | mulderr/haskell-wamp | wamp-client/Network/Wamp/State.hs | mit | 7,960 | 0 | 11 | 1,612 | 2,164 | 1,125 | 1,039 | 180 | 1 |
-- |
-- Module : Occlusion.Behaviours
-- Description :
-- Copyright : (c) Jonatan H Sundqvist, 2015
-- License : MIT
-- Maintainer : Jonatan H Sundqvist
-- Stability : experimental|stable
-- Portability : POSIX (not sure)
--
-- Created September 25 2015
-- TODO | -
-- -
-- SPEC | -
-- -
... | SwiftsNamesake/Occlusion | src/Occlusion/Behaviours.hs | mit | 3,341 | 8 | 11 | 408 | 532 | 298 | 234 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Handler.Library where
import Data.PersistSemVer
import Data.SemVer (toText)... | rgrempel/frelm.org | src/Handler/Library.hs | mit | 5,147 | 0 | 20 | 2,127 | 436 | 242 | 194 | 42 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module SuperUserSpark.Check.Types where
import Import
import SuperUserSpark.Bake.Types
import SuperUserSpark.Diagnose.Types
data CheckAssignment = CheckAssignment
{ checkCardReference :: BakeCardReference
, checkSettings :: CheckSettings
} deriving (Show, Eq, Generic)
ins... | NorfairKing/super-user-spark | src/SuperUserSpark/Check/Types.hs | mit | 2,087 | 0 | 8 | 481 | 464 | 257 | 207 | 58 | 1 |
module Mapa where
import Data.Char (isDigit)
import Data.List
import Tarefa1Lib
data State = St {
size::Int, -- size
br::[(Int,Int)], -- bricks
stn::[(Int,Int)], -- extra stones (spiral)
pws::[(Int,Int)], -- pwup +
fls::[(Int,Int)], -- pwup !
bb :: [(Int,Int,Int,Int,Int)], -- bomb * x,y,play... | hpacheco/HAAP | examples/gameworker/li1g100/Mapa.hs | mit | 4,254 | 0 | 16 | 1,227 | 2,575 | 1,432 | 1,143 | 88 | 6 |
{-@ myProgram :: i:[a] -> {o:[a] | (len i) <= (len o)} @-}
myProgram :: [a] -> [a]
myProgram = foldl (\xs x -> xs++[x,x]) []
{-@ exs :: [([Int],[Int])<{\i o -> (len i) <= (len o)}>] @-}
exs :: [([Int], [Int])]
--exs = [([1, 2, 3], myProgram [1,2,3])]
exs = [([1, 2, 3], [1,2,3,4,5,6])]
| santolucito/ives | tests/newFold.hs | mit | 289 | 0 | 9 | 57 | 112 | 70 | 42 | 4 | 1 |
module PDUTypeSpec (spec) where
import Test.Hspec
import Dicom.Network.Associate.Types
spec::Spec
spec = describe "Test PDUType Values" $ do
it "Unknown PDU" $ do
getPDUTypeVal UNKNOWN_PDU `shouldBe` 0
toStructType 0 `shouldBe` UNKNOWN_PDU
it "... | danplubell/dicom-network | test-suite/PDUTypeSpec.hs | mit | 1,440 | 0 | 12 | 606 | 310 | 151 | 159 | 29 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.AudioContext
(js_newAudioContext, newAudioContext, js_createBuffer,
createBuffer, js_createBufferFromArrayBuffer,
createBufferFromArrayBuffer, js_decodeAudioData, decodeAudioData,
js... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/AudioContext.hs | mit | 19,951 | 222 | 13 | 3,868 | 3,554 | 1,885 | 1,669 | 326 | 1 |
module Text.Ponder.Memo
( memoParse
, memoize
, memoChar
, memoStr
) where
import Control.Monad.Identity
import Control.Monad.Error
import Control.Monad.State
import Text.Ponder
memoParse :: Parser a -> String -> Memo
memoParse p s = runIdentity $ execStateT (runErrorT $ runStateT (runStateT p s) 1) []
memoize :: St... | matt76k/ponder | Text/Ponder/Memo.hs | mit | 2,409 | 0 | 23 | 1,100 | 952 | 481 | 471 | 52 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.