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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[Simplify]{The main module of the simplifier}
-}
{-# LANGUAGE CPP #-}
module Simplify ( simplTopBinds, simplExpr ) where
#include "HsVersions.h"
import DynFlags
import SimplMonad
import Type hiding ( substTy, extendTvSubst, substTyVar )
import Sim... | gcampax/ghc | compiler/simplCore/Simplify.hs | bsd-3-clause | 118,609 | 18 | 25 | 36,268 | 14,239 | 7,535 | 6,704 | -1 | -1 |
#!/usr/bin/env runhaskell
import Distribution.PackageDescription
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
main :: IO ()
main = defaultMain
| jeffwheeler/pointedlist | Setup.hs | bsd-3-clause | 168 | 0 | 6 | 16 | 33 | 19 | 14 | 5 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
module Data.StreamLike where
import Data.ListLike as LL
import Data.Word
import Data.Bits
import Data.Functor
import Data.ByteString as B
import Control.Comonad
-- | Stream type. s is a stream like list... | ierton/yteratee | src/Data/StreamLike.hs | bsd-3-clause | 1,841 | 0 | 11 | 486 | 240 | 148 | 92 | 17 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- | The Scale module implements scales.
module Music.Diatonic.Scale (
Scale, Scl(..),
majorScale, minorScale, majorPentatonicScale, minorPentatonicScale, minorHarmonicScale, minorMelodicScale,
tetrachord
) where
import Music.Diatonic
data Scale = Diatonic Quali... | xpika/music-diatonic | Music/Diatonic/Scale.hs | bsd-3-clause | 3,559 | 0 | 12 | 796 | 1,240 | 671 | 569 | 66 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Network.HTTP.HandleStream
-- Copyright : (c) 2008- Sigbjorn Finne
-- License : BSD
--
-- Maintainer : Sigbjorn Finne <[email protected]>
-- Stability : experimental
-- Portability : non-portable (n... | astro/HTTPbis | Network/HTTP/HandleStream.hs | bsd-3-clause | 10,063 | 65 | 20 | 2,431 | 2,044 | 1,044 | 1,000 | 144 | 6 |
module Sexy.Instances.Plus.Double where
import Sexy.Classes (Plus(..))
import Sexy.Data (Double)
import qualified Prelude as P
instance Plus Double where
(+) = (P.+) | DanBurton/sexy | src/Sexy/Instances/Plus/Double.hs | bsd-3-clause | 169 | 0 | 6 | 24 | 57 | 38 | 19 | 6 | 0 |
-----------------------------------------------------------------------------
--
-- Module : GameOfLife.Ui.Text
-- Copyright : 2016 Author name here
-- License : BSD3
--
-- Maintainer : [email protected]
-- Stability :
-- Portability :
--
-- |
--
------------------------------------------------------... | AM636E/HaskellGameOfLife | src/GameOfLife/Ui/Text.hs | bsd-3-clause | 2,502 | 0 | 20 | 750 | 682 | 361 | 321 | 49 | 2 |
import NLP.DictParser
main :: IO ()
main = getContents >>= \c -> print (parseString c)
| mwotton/dictparser | src/main.hs | bsd-3-clause | 99 | 1 | 9 | 27 | 42 | 20 | 22 | 3 | 1 |
module Main where
import Data.Graph.Inductive.Graph
import Data.Graph.Inductive.Tree (Gr)
import System.Exit
import Flow
source = 1
sink = 2
node = 3
graph :: Gr String Int
graph = insEdge (node, sink, 1) . insEdge (source, node, 3) . insEdge (source, sink, 10) $
insNodes [(source, "source"), (sink, "sink"), (no... | thsutton/mf | src/Main.hs | bsd-3-clause | 911 | 0 | 10 | 176 | 346 | 174 | 172 | 30 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE Strict #-}
module Layers.Pool where
import Network
import Util
import Static
import Data.Singletons.TypeLits
import Data.Array.Repa
... | jonascarpay/convoluted | src/Layers/Pool.hs | bsd-3-clause | 1,383 | 0 | 16 | 442 | 543 | 282 | 261 | -1 | -1 |
-- | Quick, hacky sendmail wrapper
module Sihemo.Sendmail
( sendmail
) where
import System.Process (readProcess)
sendmail :: String -- ^ Recipient
-> String -- ^ Subject
-> [String] -- ^ Content (lines)
-> IO () -- ^ Blocks until mail is sent
sendmail recipient subject bo... | jaspervdj/sihemo | src/Sihemo/Sendmail.hs | bsd-3-clause | 497 | 0 | 12 | 161 | 115 | 63 | 52 | 14 | 1 |
module Derivative where
import qualified Data.Map as M
import Control.Monad (sequence)
data Expr = Con String
| Num Double
| Fun String Int
| Add [Expr]
| Mul [Expr]
| Div Expr Expr
| Neg Expr
| Cos Expr
| Sin Expr
|... | GintMist/double-pendulum | src/derivative.hs | bsd-3-clause | 3,964 | 0 | 13 | 1,038 | 2,276 | 1,147 | 1,129 | 88 | 2 |
module Main where
import System.Environment
import Data.Tree
import Data.Char
data Op = Plus | Minus | Times | Div deriving Show
data Elem = Op Op | Int Int deriving Show
type Expr = Tree Elem
lexer :: String -> [ Elem ]
lexer "" = [ ]
lexer ( ' ' : cs ) = lexer cs
lexer ( '+' : cs ) = Op Plus : lexer cs
lexer ( '... | YoshikuniJujo/toyhaskell_haskell | tests/testOp.hs | bsd-3-clause | 1,089 | 38 | 11 | 314 | 646 | 330 | 316 | 31 | 1 |
-- |
-- Module: WildBind.X11.KeySym
-- Description: Re-export KeySyms
-- Maintainer: Toshio Ito <[email protected]>
--
-- This module re-exports X11 'KeySym's.
--
-- @since 0.2.0.0
module WildBind.X11.KeySym
( -- * The type
KeySym,
-- * Alphabet
xK_a,
xK_b,
xK_c,
... | debug-ito/wild-bind | wild-bind-x11/src/WildBind/X11/KeySym.hs | bsd-3-clause | 7,315 | 0 | 4 | 3,663 | 1,079 | 726 | 353 | 351 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
-- |
-- Module : Data.Array.Accelerate.Math.DFT
-- Copyright : [2012] Manuel M T Chakravarty, Gabriele Keller, Trevor L. McDonell
-- License : BSD3
--
-- Maintainer : Manuel M T Chakravarty <[email protected]>
-- Stability : expe... | thielema/accelerate-fft | Data/Array/Accelerate/Math/DFT.hs | bsd-3-clause | 4,284 | 0 | 20 | 1,305 | 1,016 | 554 | 462 | 48 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE JavaScriptFFI #-}
{-# OPTIONS_HADDOCK hide #-}
module JavaScript.Blob (
Blob
, readBlob
, isBlob
) where
import Control.Exception (mask_)
import Data.ByteString (ByteString)
#ifdef ghcjs_HOST_OS
import GHCJS.Foreign (bufferBy... | mstksg/ghcjs-websockets | src/JavaScript/Blob.hs | mit | 1,311 | 22 | 8 | 353 | 238 | 139 | 99 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- Various orphan instances and functions that we don't want to appear in client
module Unison.ABT.Extra where
import Control.Applicative
import Data.Bytes.Serial (Serial(..), Serial1(..))
import Data.Bytes.VarInt (VarInt(..))
import Data.List... | CGenie/platform | node/src/Unison/ABT/Extra.hs | mit | 3,610 | 0 | 17 | 843 | 1,389 | 722 | 667 | 68 | 7 |
{- |
Module : ./Common/Lib/Maybe.hs
Description : MaybeT monad transformer without the non-portable features
Copyright : C. Maeder and Uni Bremen 2002-2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : experimental
Portability : portable
This m... | spechub/Hets | Common/Lib/Maybe.hs | gpl-2.0 | 1,090 | 0 | 9 | 216 | 239 | 127 | 112 | 15 | 1 |
{-# Language TemplateHaskell #-}
{-# Language OverloadedStrings #-}
module BitcoinCore.Keys
( PublicKeyRep(..)
, Address(..)
, WIFPrivateKey(..)
, genKeys
, getAddress
, getWIFPrivateKey
, getPrivateKeyFromWIF
, getPubKey
, btcCurve
, serializePrivateKey
, deserializePrivateKey
, serializePublic... | clample/lamdabtc | backend/src/BitcoinCore/Keys.hs | bsd-3-clause | 5,582 | 0 | 14 | 1,009 | 1,335 | 731 | 604 | 148 | 5 |
module Main where
import Weigh
import Tidal.UIB
main :: IO ()
main =
mainWith $ do
euclidB
fixB
| d0kt0r0/Tidal | bench/Memory/Main.hs | gpl-3.0 | 113 | 0 | 7 | 35 | 37 | 20 | 17 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Network.MPD.Commands.Mount
Copyright : (c) Joachim Fasting 2014
License : MIT
Maintainer : [email protected]
Stability : stable
Portability : unportable
Mounting remote storage.
-}
module Network.MPD.Commands.Mount
( mount
, unmount
, listMount... | bens/libmpd-haskell | src/Network/MPD/Commands/Mount.hs | lgpl-2.1 | 847 | 0 | 9 | 154 | 208 | 121 | 87 | 17 | 1 |
module NestedImporting2 where
import NestedImporting2.A
main :: Fay ()
main = print r
| fpco/fay | tests/NestedImporting2.hs | bsd-3-clause | 88 | 0 | 6 | 15 | 27 | 15 | 12 | 4 | 1 |
module Root.Src.Main where
main = do putStrLn "Hello Haskell World!" | codeboardio/kali | test/src_examples/haskell/several_files3/Root/Src/Main.hs | mit | 68 | 0 | 7 | 9 | 18 | 10 | 8 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.Write
-- License : GPL-2
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.Ex.Commands.Write (parse) where
import ... | TOSPIO/yi | src/library/Yi/Keymap/Vim/Ex/Commands/Write.hs | gpl-2.0 | 2,270 | 0 | 16 | 687 | 571 | 330 | 241 | 40 | 3 |
-- {-# LANGUAGE NoImplicitPrelude #-}
-- {-# LANGUAGE QuasiQuotes #-}
-- {-# LANGUAGE TemplateHaskell #-}
-- | Test suite for GHCi like applications including both GHCi and Intero.
module Stack.GhciSpec where
import Test.Hspec
spec :: Spec
spec = return ()
{- Commented out as part of the fix for https://github.com/... | MichielDerhaeg/stack | src/test/Stack/GhciSpec.hs | bsd-3-clause | 9,341 | 0 | 6 | 2,415 | 31 | 20 | 11 | 4 | 1 |
{-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, OverloadedStrings #-}
module YesodCoreTest.Csrf (csrfSpec, Widget, resourcesApp) where
import Yesod.Core
import Test.Hspec
import Network.Wai
import Network.Wai.Test
import Web.Cookie
import qualified Data.Map as Map
import Data.ByteStri... | MaxGabriel/yesod | yesod-core/test/YesodCoreTest/Csrf.hs | mit | 3,256 | 0 | 18 | 740 | 756 | 378 | 378 | 63 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module Yesod.Test
, module Model
, module Foundation
, module Database.Persist
, runDB
, Spec
, Example
) where
import Yesod.Test
import Database.Persist hiding (get)
import Database.Persist.Sql (SqlPersistM, runSqlPersistMPool)
imp... | zhy0216/haskell-learning | yosog/tests/TestImport.hs | mit | 583 | 0 | 8 | 118 | 149 | 87 | 62 | 21 | 1 |
module Crosscells.Puzzle
( Op(..)
, Constraint(..)
, Puzzle
, compile
) where
import Data.List
import Data.Maybe
import Data.Ord
import Crosscells.Region
import Crosscells.Tokens
type Puzzle = [(Constraint, [(Coord, Op)])]
data Op = Add Int | Mul Int
deriving (Read, Show, Ord, Eq)
data Constraint = Co... | glguy/5puzzle | Crosscells/Puzzle.hs | isc | 1,792 | 0 | 18 | 546 | 677 | 363 | 314 | 49 | 6 |
{-# LANGUAGE OverloadedStrings #-}
module SymBoilerPlate where
import SymMap
import Control.Monad
import Data.Aeson
import Data.HashMap.Strict as H
import System.IO.Unsafe
import System.Random
{-@ nonDet :: a -> x:Int -> {v:Int | 0 <= v && v < x } @-}
nonDet :: a -> Int -> Int
nonDet _ x = nonDetRange 0 x
{-@ nonD... | abakst/symmetry | checker/include/SymBoilerPlateQC.hs | mit | 3,533 | 2 | 14 | 1,312 | 1,057 | 551 | 506 | 75 | 2 |
-- Get the lowest common multiple of all integers between 1 and 20, that is, the lowest number that is divisible by all numbers from 1 to 20
main = print getProblem5Value
getProblem5Value :: Integer
getProblem5Value = getLeastCommonMultiple [1..20]
-- Lowest Common Multiple: takes a list of numbers and returns the l... | jchitel/ProjectEuler.hs | Problems/Problem0005.hs | mit | 1,334 | 0 | 10 | 295 | 246 | 128 | 118 | 15 | 2 |
{-# Language BangPatterns #-}
{-# Language GeneralizedNewtypeDeriving #-}
{-# Language Rank2Types #-}
module Unison.Runtime.Bits where
import Data.Tuple (swap)
import Data.List
import Unison.Runtime.Unfold (Unfold)
import qualified Unison.Runtime.Unfold as U
newtype Bits = Bits { bitstream :: Unfold Bit } deriving (... | nightscape/platform | node/src/Unison/Runtime/Bits.hs | mit | 3,275 | 0 | 16 | 765 | 1,594 | 861 | 733 | 80 | 5 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- module
module RCL.Error where
-- imports
import Control.Monad.Error
-- exported functions
withError :: MonadError a m => Either a b -> m b
withError = either throwError return
testError :: MonadError e m => m a -> m Bool
testError e = (e >> return False) ... | nicuveo/RCL | src/RCL/Error.hs | mit | 353 | 0 | 8 | 78 | 109 | 57 | 52 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module DarkSky.Response.DataBlock where
import DarkSky.Response.Icon
import DarkSky.Response.DataPoint (DataPoint)
import Data.Aeson
import Data.Text (Text)
data DataBlock = DataBlock
{ data' :: [DataPoint]
, summary :: Maybe Text
, icon :: Maybe Icon
} deriving (Eq, Show)
... | peterstuart/dark-sky | src/DarkSky/Response/DataBlock.hs | mit | 737 | 0 | 12 | 197 | 203 | 116 | 87 | 29 | 1 |
import Chorale.Test.Common as ChoraleTestCommon
import Test.Framework
main :: IO ()
main = defaultMainWithArgs testsToRun ["--maximum-generated-tests=1000"]
testsToRun :: [Test]
testsToRun = ChoraleTestCommon.tests
| mocnik-science/chorale | tests/Test.hs | mit | 218 | 0 | 6 | 24 | 52 | 30 | 22 | 6 | 1 |
-- 54 - 60
-- https://wiki.haskell.org/99_questions/54A_to_60
module NinetyNine.P5X where
import Data.List (findIndex, genericIndex)
import Data.Maybe (fromJust)
data BTree a = Empty | Branch a (BTree a) (BTree a)
deriving (Eq, Ord, Show)
{-
54A. Check whether a given term represents a binary tree.
In Prolog or ... | airt/Haskell-99 | src/NinetyNine/P5X.hs | mit | 8,529 | 0 | 11 | 2,036 | 1,149 | 593 | 556 | 50 | 4 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings, TupleSections, LambdaCase #-}
module PrevNextPost where
import Control.Applicative (Alternative (..))
import Data.Char
import Data.Maybe
import Data.Monoid
import qualifi... | holdenlee/philosophocle | src/PrevNextPost.hs | mit | 2,716 | 0 | 16 | 715 | 876 | 442 | 434 | 65 | 2 |
module Api.Controllers.User
( authenticate
, create
, unverifiedEdit
, verifyEdit
) where
import Api.Types.Fields (UserToken (..))
import Api.Types.Server (ApiActionM, ApiException (..), mailer)
import Control.Monad.Reader (asks, lift)
import Control.Applicative ((<$>), (<|>))
import Control.Monad.IO.Class (liftIO)
im... | bendyworks/api-server | lib/Api/Controllers/User.hs | mit | 2,392 | 0 | 17 | 530 | 680 | 369 | 311 | 57 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (foldM)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Forth (ForthError(..), emptyState, evalText, toList)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = Tr... | exercism/xhaskell | exercises/practice/forth/test/Tests.hs | mit | 6,377 | 1 | 13 | 2,029 | 1,663 | 844 | 819 | 127 | 1 |
{-# LANGUAGE DataKinds, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, ScopedTypeVariables, TypeOperators #-}
module Hevents.Eff.Demo where
-- * Imports, stuff to make the compiler happy
import Control.Category
import Control.Concurrent.Async
import Control.Concurrent.STM
i... | abailly/hevents | test/Hevents/Eff/Demo.hs | mit | 7,032 | 0 | 16 | 1,936 | 1,808 | 955 | 853 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariable... | gibiansky/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Layout/Types.hs | mit | 7,299 | 0 | 49 | 2,550 | 1,705 | 945 | 760 | 155 | 2 |
module Wyas.Types
( LispVal(..)
, LispError(..)
, ThrowsError
, trapError
, extractValue
) where
import Control.Monad.Except
import Text.ParserCombinators.Parsec (ParseError)
data LispVal = Atom String
| Bool Bool
| Character Char
| Do... | saclark/wyas | src/Wyas/Types.hs | mit | 2,120 | 0 | 7 | 559 | 649 | 349 | 300 | 52 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Jabara.Util.MonthSpec (spec) where
import Data.Time.Calendar
import Jabara.Util.Month
import Test.Hspec
import Test.Hspec.QuickCheck (prop)
import Text.Read
spec :: Spec
spec = do
describe "read month" $ do
it "r... | jabaraster/jabara-util | test/Jabara/Util/MonthSpec.hs | mit | 701 | 0 | 17 | 248 | 196 | 102 | 94 | 19 | 2 |
module Y2018.M07.D03.Exercise where
{--
Yesterday, we translated JSON that was a mapping of String -> String to a
Codex that was a mapping Vertex -> Relations
where Relations was Map Vertex (Vertex, Strength) and we learned that the
keys of the relations were really just indices of the arrayed (Vertex,Strength)
pairi... | geophf/1HaskellADay | exercises/HAD/Y2018/M07/D03/Exercise.hs | mit | 1,543 | 0 | 7 | 294 | 130 | 74 | 56 | 14 | 1 |
module Tools.BlankChopperSpec (main, spec) where
import Test.Hspec
import Tools.BlankChopper
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "chop" $ do
context "breaks on spaces" $ do
itChopsAsSpecSamples
[ ("x y", ["x", "y"])
, ("a b", ["a", "b"])
, (" m n ... | DominikJaniec/LearnHaskell | problems/calculator/test/Tools/BlankChopperSpec.hs | mit | 1,578 | 0 | 16 | 435 | 496 | 290 | 206 | 35 | 1 |
module Handler.CacheSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getCacheR" $ do
error "Spec not implemented: getCacheR"
| swamp-agr/carbuyer-advisor | test/Handler/CacheSpec.hs | mit | 171 | 0 | 11 | 39 | 44 | 23 | 21 | 6 | 1 |
{-# LANGUAGE
TypeFamilies,
KindSignatures,
ConstraintKinds,
ExplicitNamespaces,
GADTs,
TypeOperators,
DataKinds,
RankNTypes,
AllowAmbiguousTypes,
RecordWildCards
#-}
module ConstraintWitness.Internal (
(:~:)(..),
Witness,
canonicalWitness,
expose, useWitness
... | Solonarv/constraint-witness | plugin/ConstraintWitness/Internal.hs | mit | 2,684 | 0 | 10 | 563 | 380 | 234 | 146 | 33 | 1 |
-- Project Euler Problem 22 - names scores
--
-- Sum of letter values in names weighted by position in list
--
-- import Data.String
import Data.List
alph = zip ['A'..'Z'] [1..26]
elim_just :: Maybe a -> a
elim_just (Just a) = a
wordscore x = sum [ elim_just (lookup a alph) | a <- x]
-- str = "\"MARY\",\"PATRICIA\"... | yunwilliamyu/programming-exercises | project_euler/p022_names_scores.hs | cc0-1.0 | 978 | 4 | 13 | 213 | 429 | 224 | 205 | 18 | 2 |
module MonsterParser (parseMonsterFile) where
import Text.Parsec
import Text.Parsec.String (Parser, parseFromFile)
import qualified Monster as M
import Rdice (Dice(ZeroDie), d)
import GeneralParse
import Types as T
import qualified Data.Map as Map
monsterFile :: Parser [M.Monster]
monsterFile = junk >> monsterEntry `... | kryft/fsil | MonsterParser.hs | gpl-2.0 | 7,111 | 0 | 19 | 1,979 | 2,035 | 1,061 | 974 | 183 | 8 |
-- | Tables of portage specific convertations
module Portage.Tables
( set_build_slot
) where
import Portage.Dependency.Builder
import Portage.Dependency.Types
import Portage.PackageId
import Data.Monoid
set_build_slot :: Dependency -> Dependency
set_build_slot =
overAtom $ \a@(Atom pn dr (DAttr _ u)) ->
... | Heather/hackport | Portage/Tables.hs | gpl-3.0 | 784 | 0 | 12 | 177 | 261 | 137 | 124 | 19 | 2 |
module Util where
import Data.Either
import DFA
import Parser
fromRight = either undefined id
eq s1 s2 = shortestWord $ symmetricDiff (dfa s1) (dfa s2)
where
dfa = toDFA . fromRight . parseRegex
| TeofilC/regeq | src/Util.hs | gpl-3.0 | 204 | 0 | 8 | 42 | 71 | 38 | 33 | 7 | 1 |
{-# LANGUAGE LambdaCase #-}
module HaSnip.Protocol.Ben where
import Foreign.Ptr
import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB
import qualified Data.ByteString.Char8 as CB
import Data.Word
import Control.Concurrent
import Control.Monad
import Network.Socket(SockAddr(SockA... | Ericson2314/hasnip | src/HaSnip/Protocol/Ben.hs | gpl-3.0 | 2,279 | 0 | 16 | 620 | 599 | 323 | 276 | 54 | 5 |
module Text.Lox.Types where
type Id = Char
type Op = Char
data Term = Const Int
| Var Id
| Fn Id [Term]
| Operation Op Term Term
deriving (Show)
data Fml = Atom Id
| Eq Term Term
| Neq Term Term
| Pred Id [Term]
| Not Fml
| Forall ... | knuton/lox | Text/Lox/Types.hs | gpl-3.0 | 538 | 0 | 7 | 258 | 163 | 96 | 67 | 23 | 0 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 [email protected]
--
-- This file is part of grid.
--
-- grid 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, either version 3 of the Lice... | karamellpelle/grid | designer/source/Game/Grid/GridWorld/SegmentArray.hs | gpl-3.0 | 7,674 | 0 | 51 | 2,294 | 1,474 | 800 | 674 | 73 | 1 |
answer :: Int
answer = foldl1 lcm [1..20]
| rodgzilla/project-euler | problem_005/problem.hs | gpl-3.0 | 42 | 0 | 6 | 8 | 21 | 11 | 10 | 2 | 1 |
{- Hexadecimal utilkity functions -}
module Hex (hexEncode,
hexDecode,
triples,
) where
import Numeric (readHex)
import Data.Char (ord,
chr)
fromHex :: String -> Int
fromHex = fst.head.readHex
hexChars :: String
hexChars = ['0'..'9'] ++ ['a'..'f']
hexDigitToCha... | CharlesRandles/cryptoChallenge | hex.hs | gpl-3.0 | 1,270 | 0 | 10 | 298 | 512 | 273 | 239 | 38 | 1 |
{-# LANGUAGE ImplicitParams, CPP #-}
{-# OPTIONS_GHC -Wall #-}
-- module SXXVector (MyVector, populateVector, printVector) where
module SXXVector where
import qualified Data.Vector.Unboxed.Mutable as V
import Control.Monad.Primitive (PrimState)
import Data.Int (Int32, Int16)
#if __GLASGOW_HASKELL__ < 706
import D... | ninedotnine/bugfree-computing-machine | src/SXXVector.hs | gpl-3.0 | 2,823 | 0 | 10 | 614 | 898 | 491 | 407 | 57 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Language.VHDL.Lexer
( abstractLiteral
, antiQ
, bitStringLiteral
, braces
, brackets
, charLiteral
, colon
, comma
, commaSep
, commaSep1
, decimal
, dot
, float
, hexadecimal
, identifier
, integer
, lexeme
... | truls/language-vhdl-quote | src/Language/VHDL/Lexer.hs | mpl-2.0 | 19,020 | 0 | 20 | 6,054 | 4,613 | 2,649 | 1,964 | 799 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-support/gen/Network/AWS/Support/DescribeTrustedAdvisorCheckSummaries.hs | mpl-2.0 | 5,113 | 0 | 10 | 834 | 548 | 329 | 219 | 62 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Soundness results for query resolution according to the paper 1
module CoALP.Sound (
res
) where
import CoALP.Program (
DerTree (..)
, RewTree (..)
, Trans (..)
, AndNode (..)
, OrNode (..)
, Succ (..)
, VR
, Program
, Clause
, GuardingContext
, VR
, Progr... | frantisekfarka/CoALP | src/CoALP/Sound.hs | lgpl-3.0 | 2,804 | 132 | 8 | 649 | 1,221 | 664 | 557 | 73 | 4 |
{-
Copyrights (c) 2016. Samsung Electronics Ltd. All right reserved.
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 l... | ryzhyk/cocoon | cocoon/MiniNet/MiniNet.hs | apache-2.0 | 5,845 | 0 | 23 | 2,053 | 1,680 | 909 | 771 | 92 | 6 |
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------... | ideas-edu/ideas | src/Ideas/Service/FeedbackScript/Run.hs | apache-2.0 | 7,515 | 0 | 14 | 1,890 | 2,465 | 1,278 | 1,187 | 139 | 10 |
-------------------------------------------------------------------------------
-- Experimental test for evaluating Queues performance
--
-- Data Structures. Grado en Informática. UMA.
-- Pepe Gallardo, 2012
-------------------------------------------------------------------------------
module Demos.Queue.Queue... | Saeron/haskell | data.structures/haskell/Demos/Queue/QueuesPerformance.hs | apache-2.0 | 1,417 | 0 | 14 | 268 | 406 | 207 | 199 | 27 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.PrettyPrint.HughesPJ
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : [email protected]
-- Stability : provisional
... | lwchkg/sunlight-x | test/code-snippets/haskell.hs | apache-2.0 | 34,428 | 0 | 27 | 12,005 | 6,308 | 3,370 | 2,938 | 384 | 18 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.SecurityContext where
import GHC.Generics
import Openshift.V1.Capabilities
import Openshift.V1.SELinuxOptions
import qualified Dat... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/SecurityContext.hs | apache-2.0 | 2,184 | 0 | 9 | 343 | 130 | 79 | 51 | 19 | 0 |
module Ticket75 where
data a :- b = Q
-- | A reference to ':-'
f :: Int
f = undefined
| nominolo/haddock2 | tests/golden-tests/tests/Ticket75.hs | bsd-2-clause | 88 | 0 | 5 | 23 | 25 | 16 | 9 | -1 | -1 |
{-Joseph Eremondi UU# 4229924
Utrecht University, APA 2015
Project one: dataflow analysis
March 17, 2015 -}
{-# LANGUAGE RecordWildCards #-}
{-|
General framework for constructing lattices and finding fixpoints
of monotone functions.
|-}
module Optimize.MonotoneFramework (
AnalysisDirection(..),
ProgramInfo... | JoeyEremondi/utrecht-apa-p1 | src/Optimize/MonotoneFramework.hs | bsd-3-clause | 4,433 | 0 | 20 | 1,113 | 1,112 | 626 | 486 | 78 | 4 |
{-# LANGUAGE NoMonomorphismRestriction,
ScopedTypeVariables#-}
module Scan where
import Obsidian
import Data.Word
import Data.Bits
import Control.Monad
import Prelude hiding (map,zipWith,zip,sum,replicate,take,drop,iterate,last)
import qualified Prelude as P
-----------------------------------------... | svenssonjoel/ObsidianGFX | Examples/ScanBench/Scan.hs | bsd-3-clause | 4,464 | 0 | 17 | 1,166 | 1,599 | 812 | 787 | 100 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Client.MenuLayerT where
import Control.Lens (makeLenses)
import Types
makeLenses ''MenuLayerT
newMenuLayerT :: MenuLayerT
newMenuLayerT = MenuLayerT
{ _mlDraw = Nothing
, _mlKey = Nothing
}
| ksaveljev/hake-2 | src/Client/MenuLayerT.hs | bsd-3-clause | 267 | 0 | 6 | 66 | 52 | 31 | 21 | 9 | 1 |
module Proper.TestUtils(testFunction) where
import Test.HUnit
testFunction func cases = runTestTT $ makeTestCases func cases
makeTestCases func cases =
TestList $ map (\(input, expected) -> testCase func input expected) cases
testCase func input expected =
TestCase (assertEqual ("Input: " ++ show input) expecte... | dillonhuff/Proper | test/Proper/TestUtils.hs | bsd-3-clause | 335 | 0 | 10 | 51 | 116 | 60 | 56 | 7 | 1 |
main :: IO ()
main = putStrLn "Test suite not yet implemented."
| denibertovic/watcher | test/Spec.hs | bsd-3-clause | 64 | 0 | 6 | 12 | 19 | 9 | 10 | 2 | 1 |
import Intake.Core
import Intake.Job
import System.Exit
main = defaultMain'
[
-- Run `intake run a` and capture its output as SHORT_ID and ID.
defaultJob
{ jobCommand = "./dist/build/intake/intake"
, jobArguments = words "run a"
, jobStderr = Just ""
, jobStdout = Just "{{SHORT_ID}} {{ID}}\n"
}
-- Wa... | noteed/intake | tests/intake-run-00.hs | bsd-3-clause | 1,024 | 0 | 9 | 214 | 163 | 96 | 67 | 24 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
-- | Definition of the MonetDB5/SQL backend for DSH: SQL code generation a... | ulricha/dsh-sql | src/Database/DSH/Backend/Sql/M5.hs | bsd-3-clause | 1,237 | 0 | 8 | 248 | 168 | 105 | 63 | 22 | 0 |
module Main where
import Test.Framework
import qualified TestTerm
import qualified TestTheta
import qualified TestASUP
main :: IO ()
main = defaultMain tests
tests :: [Test]
tests = [ TestTerm.tests
, TestTheta.tests
, TestASUP.tests
]
| projedi/type-inference-rank2 | tests/TestMain.hs | bsd-3-clause | 264 | 0 | 6 | 62 | 67 | 41 | 26 | 11 | 1 |
module Arcade.Sequence
( Sequence(..)
) where
import Data.Word
-- wrapping 16 bit sequence numbers
newtype Sequence = Sequence Word16
instance Eq Sequence where
Sequence a == Sequence b = a == b
instance Ord Sequence where
compare (Sequence s1) (Sequence s2) = case compare s1 s2 of
LT | s2 - s1 <= 32768... | ekmett/arcade | src/Arcade/Sequence.hs | bsd-3-clause | 370 | 0 | 13 | 92 | 143 | 72 | 71 | 11 | 0 |
-- Example of Container for Multiple Types
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeF... | notae/haskell-exercise | pack/Container4.hs | bsd-3-clause | 3,207 | 0 | 14 | 814 | 834 | 463 | 371 | -1 | -1 |
module Data.Int.Dom.Common
( Mask
, mkMask
, negative
, zero
, Depth
, depth
, Prefix
, mkPrefix
) where
import Control.Monad ((<=<))
import Data.Bits
import Data.Function (on)
import Data.Functor ((<$>))
import Data.Word (Word)
import Prelude hiding (in... | sonyandy/fd | src/Data/Int/Dom/Common.hs | bsd-3-clause | 1,456 | 0 | 12 | 380 | 561 | 306 | 255 | 51 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module Pack2 where
import Control.Applicative... | notae/haskell-exercise | pack/Pack2.hs | bsd-3-clause | 5,650 | 0 | 14 | 1,319 | 2,124 | 1,142 | 982 | 99 | 1 |
-- example2
import Data.IORef
import Control.Applicative
import Control.Monad
import Control.Exception (SomeException)
import qualified Control.Exception as E
import Control.Concurrent (threadDelay)
import System.IO.Unsafe (unsafePerformIO)
import System.Timeout (timeout)
{-# NOINLINE numHandles #-}
numHandles :: IO... | Yuras/io-region | misc/imask/example2.hs | bsd-3-clause | 1,794 | 0 | 13 | 363 | 687 | 344 | 343 | 55 | 2 |
module PrettyPrinter where
import Syntax
import Text.PrettyPrint
pprExpr :: CoreExpr -> Doc
pprExpr (ENum n) = int n
pprExpr (EVar v) = text v
pprExpr (EBinApp binOp e1 e2)
= hcat
[ pprExpr e1 <+> text (show binOp) <+> pprExpr e2]
pprExpr (ECase e alts) = empty --TODO
pprExpr (EConstr n1 n2) = empty -... | MarkX95/TinyHask | PrettyPrinter.hs | bsd-3-clause | 1,145 | 0 | 12 | 319 | 490 | 249 | 241 | 40 | 1 |
module Network.TigHTTP.Token (
isTokenChar,
isTextChar,
isQdtextChar,
) where
import Data.Char (isAscii)
isCtl, isSeparator, isTokenChar, isTextChar, isQdtextChar :: Char -> Bool
isCtl = (`elem` (['\0' .. '\31'] ++ "\DEL"))
isSeparator = (`elem` "()<>@,;:\\\"/[]?={} \t")
isTokenChar = (&&) <$> not . isCtl <*> n... | YoshikuniJujo/tighttp | src/Network/TigHTTP/Token.hs | bsd-3-clause | 433 | 8 | 8 | 71 | 150 | 96 | 54 | 11 | 1 |
-- | Render an abstract shell script as a bash script
module Shell.Formatter.Bash (
runBash,
bashFormatter
) where
import qualified Text.PrettyPrint.Mainland as PP
import qualified Shell.Diagnostic as D
import qualified Shell.Formatter.Base as F
import qualified Shell.Internal as I
import qualified Shell.Optimi... | travitch/shellDSL | src/Shell/Formatter/Bash.hs | bsd-3-clause | 1,071 | 0 | 12 | 250 | 278 | 157 | 121 | 23 | 2 |
module Trainer.Internal where
boxMueller :: Double -> Double -> Double -> Double -> Double
boxMueller μ σ r1 r2 = μ + σ * sqrt (-2*log r1) * cos (2*pi*r2)
positiveStdNormal :: Double -> Double -> Double -> Double
positiveStdNormal hi r1 r2 = min hi (abs bm)
where bm = boxMueller 0 (hi/25) r... | epsilonhalbe/VocabuLambda | Trainer/Internal.hs | bsd-3-clause | 330 | 0 | 10 | 86 | 145 | 74 | 71 | 6 | 1 |
------------------------------------------------------------------------------
-- |
-- Module : Data.Datamining.Clustering.Gsom
-- Copyright : (c) 2009 Stephan Günther
-- License : BSD3
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- The network cr... | gnn/hsgsom | Data/Datamining/Clustering/Gsom/coordinates.hs | bsd-3-clause | 1,733 | 0 | 14 | 297 | 278 | 167 | 111 | 16 | 1 |
{-# LANGUAGE PatternGuards #-}
-- |
-- Module : Scion.Types.Notes
-- Copyright : (c) Thomas Schilling 2009
-- License : BSD-style
--
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- Notes, i.e., warnings, errors, etc.
--
module Scion.Types.Notes
( Locat... | nominolo/scion | lib/Scion/Types/Notes.hs | bsd-3-clause | 8,890 | 0 | 12 | 2,118 | 1,764 | 1,003 | 761 | 155 | 2 |
--------------------------------------------------------------------------------
--
-- Copyright (c) 2011 - 2014 Tad Doxsee
-- All rights reserved.
--
-- Author: Tad Doxsee
--
--------------------------------------------------------------------------------
module Main where
import RegTesterLib (CmdMaker, regTester... | tdox/regTester | src/regTester2.hs | bsd-3-clause | 500 | 0 | 10 | 72 | 86 | 50 | 36 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Module : Network.AWS.Data.Internal.JSON
-- Copyright : (c) 2013-2015 Brendan Hay <[email protected]>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found ... | romanb/amazonka | core/src/Network/AWS/Data/Internal/JSON.hs | mpl-2.0 | 1,719 | 0 | 10 | 525 | 367 | 214 | 153 | 36 | 2 |
{-# LANGUAGE RecordWildCards #-}
-- Chi square tests for random generators
module MWC.ChiSquare (
tests
) where
import Control.Applicative
import Control.Monad
import Data.Typeable
import Data.Word
import Data.List (find)
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.... | bos/mwc-random | mwc-random-bench/test/MWC/ChiSquare.hs | bsd-2-clause | 5,175 | 0 | 15 | 1,353 | 1,552 | 843 | 709 | 110 | 2 |
{-# LANGUAGE TypeOperators, GADTs, KindSignatures, ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts, PatternGuards, ViewPatterns, ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP
----... | conal/lambda-ccc | src/LambdaCCC/Unused/ToCircuit.hs | bsd-3-clause | 4,036 | 0 | 8 | 785 | 800 | 438 | 362 | 42 | 1 |
{-# LANGUAGE TypeFamilies, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, GADTs, ScopedTypeVariables, FunctionalDependencies, RecursiveDo, UndecidableInstances, GeneralizedNewtypeDeriving, StandaloneDeriving, EmptyDataDecls, NoMonomorphismRestriction, TypeOperators, DeriveDataTypeable, PackageI... | k0001/reflex | src/Reflex/Dynamic.hs | bsd-3-clause | 22,941 | 0 | 26 | 5,743 | 6,593 | 3,425 | 3,168 | 307 | 5 |
import qualified Data.Text.IO as T
import qualified Data.Text as T
import qualified Data.Text.Lazy.IO as TL
import qualified Data.Text.Lazy as TL
import Pipes
import qualified Pipes.Text as TP
import qualified Pipes.ByteString as BP
import Pipes.Safe
main = textaction
big = "../../examples/txt/words2.txt"
textaction... | bitemyapp/text-pipes | bench/IO.hs | bsd-3-clause | 441 | 0 | 11 | 68 | 130 | 81 | 49 | 12 | 1 |
{-# LANGUAGE GADTs #-}
module Syntax.Tree where
--------------------------------------------------------------------------------
-- Identifiers
--------------------------------------------------------------------------------
type Identifier = String
type SnakeId = Identifier
type CamelId = Identifier
-- Used ... | BakerSmithA/Turing | src/Syntax/Tree.hs | bsd-3-clause | 5,552 | 0 | 8 | 1,059 | 726 | 436 | 290 | 80 | 1 |
{- |
Module : $Header$
Description : intermediate calculus table
Copyright : (c) Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portability : portable
-}
module CASL.CompositionTable.ModelTable where
import CASL.Compositi... | mariefarrell/Hets | CASL/CompositionTable/ModelTable.hs | gpl-2.0 | 2,353 | 0 | 14 | 465 | 769 | 409 | 360 | 47 | 2 |
import Control.Monad as CM(forM,filterM)
yes = flip mapM | bitemyapp/apply-refact | tests/examples/Default123.hs | bsd-3-clause | 57 | 0 | 5 | 8 | 24 | 14 | 10 | 2 | 1 |
module B2 where
data Data1 a
= C1 a Int Int | C4 Float | C2 Int | C3 Float
addedC4 = error "added C4 Float to Data1"
g (C1 x y z) (C1 n m o) = y + m
g (C4 a) b = addedC4
g a (C4 b) = addedC4
g (C2 x) (C2 y) = x - y
g (C3 x) (C3 k) = 42
| kmate/HaRe | old/testing/addCon/B2AST.hs | bsd-3-clause | 245 | 0 | 7 | 78 | 155 | 81 | 74 | 9 | 1 |
module Syntax (module S) where
import BaseSyntax as S
import SyntaxRec as S
import SyntaxRecPretty as S
| forste/haReFork | tools/base/syntax/Syntax.hs | bsd-3-clause | 106 | 0 | 4 | 19 | 25 | 19 | 6 | 4 | 0 |
module HAD.Y2014.M03.D13.Solution where
import Control.Applicative
-- | pairToList Trnsform a pair of same type elements in a list of two
-- elements.
--
-- Of course, the major challenge is to find a point free function
-- (without lambda)
--
-- prop> replicate 2 (x :: Int) == pairToList (x,x)
--
-- prop> (\(f,s) -... | 1HaskellADay/1HAD | exercises/HAD/Y2014/M03/D13/Solution.hs | mit | 421 | 0 | 9 | 79 | 70 | 48 | 22 | 4 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- | Description: interpret flags parsed by "IHaskell.Flags"
module IHaskell.Convert.Args (ConvertSpec(..), fromJustConvertSpec, toConvertSpec) where
import IHaskellPrelude
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import qualified Data.ByteStri... | artuuge/IHaskell | src/IHaskell/Convert/Args.hs | mit | 4,837 | 0 | 14 | 1,045 | 1,214 | 656 | 558 | 88 | 5 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1993-1998
This is useful, general stuff for the Native Code Generator.
Provide trees (of instructions), so that lists of instructions
can be appended in linear time.
-}
{-# LANGUAGE CPP #-}
module OrdList (
OrdList,
nilO... | tjakway/ghcjvm | compiler/utils/OrdList.hs | bsd-3-clause | 3,188 | 0 | 9 | 929 | 1,451 | 740 | 711 | 83 | 6 |
{-# OPTIONS_GHC -Wunused-binds #-}
{-# LANGUAGE PatternSynonyms #-}
module Foo (pattern P) where
-- x is used!!
x :: Int
x = 0
pattern P :: Int
pattern P <- _ where
P = x
| ezyang/ghc | testsuite/tests/rename/should_compile/T12548.hs | bsd-3-clause | 182 | 0 | 5 | 46 | 45 | 28 | 17 | 8 | 1 |
module TcFail209a where
g :: ((Show a, Num a), Eq a) => a -> a
g = undefined
| urbanslug/ghc | testsuite/tests/typecheck/should_fail/tcfail209a.hs | bsd-3-clause | 78 | 1 | 8 | 19 | 41 | 23 | 18 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.